fix click event if iframe mode is loaded on contentwrapper

This commit is contained in:
REJack 2021-09-17 21:28:20 +02:00
parent 3267f781b9
commit ab0ebc9a88
173 changed files with 96241 additions and 81251 deletions

View file

@ -261,7 +261,7 @@ class IFrame {
this._fixHeight()
}, 1)
})
if ($('body').hasClass(CLASS_NAME_IFRAME_MODE)) {
if ($(SELECTOR_CONTENT_WRAPPER).hasClass(CLASS_NAME_IFRAME_MODE)) {
$(document).on('click', `${SELECTOR_SIDEBAR_MENU_ITEM}, ${SELECTOR_SIDEBAR_SEARCH_ITEM}`, e => {
e.preventDefault()
this.openTabSidebar(e.target)

145
dist/js/adminlte.js vendored
View file

@ -42,12 +42,15 @@
content: '.card-body',
loadInContent: true,
loadOnInit: true,
loadErrorTemplate: true,
responseType: '',
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
errorTemplate: '<span class="text-danger"></span>',
onLoadStart: function onLoadStart() {},
onLoadDone: function onLoadDone(response) {
return response;
}
},
onLoadFail: function onLoadFail(_jqXHR, _textStatus, _errorThrown) {}
};
var CardRefresh = /*#__PURE__*/function () {
@ -87,7 +90,17 @@
_this._settings.onLoadDone.call($__default['default'](_this), response);
_this._removeOverlay();
}, this._settings.responseType !== '' && this._settings.responseType);
}, this._settings.responseType !== '' && this._settings.responseType).fail(function (jqXHR, textStatus, errorThrown) {
_this._removeOverlay();
if (_this._settings.loadErrorTemplate) {
var msg = $__default['default'](_this._settings.errorTemplate).text(errorThrown);
_this._parent.find(_this._settings.content).empty().append(msg);
}
_this._settings.onLoadFail.call($__default['default'](_this), jqXHR, textStatus, errorThrown);
});
$__default['default'](this._element).trigger($__default['default'].Event(EVENT_LOADED));
};
@ -1039,6 +1052,7 @@
var JQUERY_NO_CONFLICT$8 = $__default['default'].fn[NAME$8];
var SELECTOR_DATA_WIDGET$2 = '[data-widget="fullscreen"]';
var SELECTOR_ICON = SELECTOR_DATA_WIDGET$2 + " i";
var EVENT_FULLSCREEN_CHANGE = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';
var Default$8 = {
minimizeIcon: 'fa-compress-arrows-alt',
maximizeIcon: 'fa-expand-arrows-alt'
@ -1065,6 +1079,14 @@
}
};
_proto.toggleIcon = function toggleIcon() {
if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) {
$__default['default'](SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon);
} else {
$__default['default'](SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon);
}
};
_proto.fullscreen = function fullscreen() {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
@ -1073,8 +1095,6 @@
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
}
$__default['default'](SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon);
};
_proto.windowed = function windowed() {
@ -1085,8 +1105,6 @@
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
$__default['default'](SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon);
} // Static
;
@ -1102,7 +1120,7 @@
var plugin = new Fullscreen($__default['default'](this), _options);
$__default['default'](this).data(DATA_KEY$8, typeof config === 'object' ? config : data);
if (typeof config === 'string' && /toggle|fullscreen|windowed/.test(config)) {
if (typeof config === 'string' && /toggle|toggleIcon|fullscreen|windowed/.test(config)) {
plugin[config]();
} else {
plugin.init();
@ -1120,6 +1138,9 @@
$__default['default'](document).on('click', SELECTOR_DATA_WIDGET$2, function () {
Fullscreen._jQueryInterface.call($__default['default'](this), 'toggle');
});
$__default['default'](document).on(EVENT_FULLSCREEN_CHANGE, function () {
Fullscreen._jQueryInterface.call($__default['default'](SELECTOR_DATA_WIDGET$2), 'toggleIcon');
});
/**
* jQuery API
* ====================================================
@ -1154,11 +1175,11 @@
var SELECTOR_DATA_TOGGLE_FULLSCREEN = '[data-widget="iframe-fullscreen"]';
var SELECTOR_CONTENT_WRAPPER = '.content-wrapper';
var SELECTOR_CONTENT_IFRAME = SELECTOR_CONTENT_WRAPPER + " iframe";
var SELECTOR_TAB_NAV = SELECTOR_DATA_TOGGLE$1 + ".iframe-mode .nav";
var SELECTOR_TAB_NAVBAR_NAV = SELECTOR_DATA_TOGGLE$1 + ".iframe-mode .navbar-nav";
var SELECTOR_TAB_NAV = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .nav";
var SELECTOR_TAB_NAVBAR_NAV = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .navbar-nav";
var SELECTOR_TAB_NAVBAR_NAV_ITEM = SELECTOR_TAB_NAVBAR_NAV + " .nav-item";
var SELECTOR_TAB_NAVBAR_NAV_LINK = SELECTOR_TAB_NAVBAR_NAV + " .nav-link";
var SELECTOR_TAB_CONTENT = SELECTOR_DATA_TOGGLE$1 + ".iframe-mode .tab-content";
var SELECTOR_TAB_CONTENT = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .tab-content";
var SELECTOR_TAB_EMPTY = SELECTOR_TAB_CONTENT + " .tab-empty";
var SELECTOR_TAB_LOADING = SELECTOR_TAB_CONTENT + " .tab-loading";
var SELECTOR_TAB_PANE = SELECTOR_TAB_CONTENT + " .tab-pane";
@ -1166,7 +1187,7 @@
var SELECTOR_SIDEBAR_SEARCH_ITEM = '.sidebar-search-results .list-group-item';
var SELECTOR_HEADER_MENU_ITEM = '.main-header .nav-item a.nav-link';
var SELECTOR_HEADER_DROPDOWN_ITEM = '.main-header a.dropdown-item';
var CLASS_NAME_IFRAME_MODE = 'iframe-mode';
var CLASS_NAME_IFRAME_MODE$1 = 'iframe-mode';
var CLASS_NAME_FULLSCREEN_MODE = 'iframe-mode-fullscreen';
var Default$7 = {
onTabClick: function onTabClick(item) {
@ -1181,6 +1202,7 @@
autoIframeMode: true,
autoItemActive: true,
autoShowNewTab: true,
autoDarkMode: false,
allowDuplicates: false,
loadingScreen: true,
useNavbarItems: true,
@ -1282,7 +1304,7 @@
return;
}
var uniqueName = link.replace('./', '').replace(/["&'./:=?[\]]/gi, '-').replace(/(--)/gi, '');
var uniqueName = link.replace('./', '').replace(/["#&'./:=?[\]]/gi, '-').replace(/(--)/gi, '');
var navId = "tab-" + uniqueName;
if (!this._config.allowDuplicates && $__default['default']("#" + navId).length > 0) {
@ -1359,9 +1381,9 @@
if ($__default['default']('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
$__default['default'](SELECTOR_DATA_TOGGLE_FULLSCREEN + " i").removeClass(this._config.iconMinimize).addClass(this._config.iconMaximize);
$__default['default']('body').removeClass(CLASS_NAME_FULLSCREEN_MODE);
$__default['default'](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).height('auto');
$__default['default'](SELECTOR_CONTENT_WRAPPER).height('auto');
$__default['default'](SELECTOR_CONTENT_IFRAME).height('auto');
$__default['default'](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).height('100%');
$__default['default'](SELECTOR_CONTENT_WRAPPER).height('100%');
$__default['default'](SELECTOR_CONTENT_IFRAME).height('100%');
} else {
$__default['default'](SELECTOR_DATA_TOGGLE_FULLSCREEN + " i").removeClass(this._config.iconMaximize).addClass(this._config.iconMinimize);
$__default['default']('body').addClass(CLASS_NAME_FULLSCREEN_MODE);
@ -1374,19 +1396,26 @@
;
_proto._init = function _init() {
if ($__default['default'](SELECTOR_TAB_CONTENT).children().length > 2) {
var $el = $__default['default'](SELECTOR_TAB_PANE + ":first-child");
$el.show();
this._setItemActive($el.find('iframe').attr('src'));
}
this._setupListeners();
this._fixHeight(true);
};
_proto._initFrameElement = function _initFrameElement() {
if (window.frameElement && this._config.autoIframeMode) {
$__default['default']('body').addClass(CLASS_NAME_IFRAME_MODE);
} else if ($__default['default'](SELECTOR_CONTENT_WRAPPER).hasClass(CLASS_NAME_IFRAME_MODE)) {
if ($__default['default'](SELECTOR_TAB_CONTENT).children().length > 2) {
var $el = $__default['default'](SELECTOR_TAB_PANE + ":first-child");
$el.show();
var $body = $__default['default']('body');
$body.addClass(CLASS_NAME_IFRAME_MODE$1);
this._setItemActive($el.find('iframe').attr('src'));
if (this._config.autoDarkMode) {
$body.addClass('dark-mode');
}
this._setupListeners();
this._fixHeight(true);
}
};
@ -1405,18 +1434,21 @@
_this2._fixHeight();
}, 1);
});
$__default['default'](document).on('click', SELECTOR_SIDEBAR_MENU_ITEM + ", " + SELECTOR_SIDEBAR_SEARCH_ITEM, function (e) {
e.preventDefault();
_this2.openTabSidebar(e.target);
});
if (this._config.useNavbarItems) {
$__default['default'](document).on('click', SELECTOR_HEADER_MENU_ITEM + ", " + SELECTOR_HEADER_DROPDOWN_ITEM, function (e) {
if ($__default['default']('body').hasClass(CLASS_NAME_IFRAME_MODE$1)) {
$__default['default'](document).on('click', SELECTOR_SIDEBAR_MENU_ITEM + ", " + SELECTOR_SIDEBAR_SEARCH_ITEM, function (e) {
e.preventDefault();
_this2.openTabSidebar(e.target);
});
if (this._config.useNavbarItems) {
$__default['default'](document).on('click', SELECTOR_HEADER_MENU_ITEM + ", " + SELECTOR_HEADER_DROPDOWN_ITEM, function (e) {
e.preventDefault();
_this2.openTabSidebar(e.target);
});
}
}
$__default['default'](document).on('click', SELECTOR_TAB_NAVBAR_NAV_LINK, function (e) {
@ -1537,24 +1569,25 @@
} // Static
;
IFrame._jQueryInterface = function _jQueryInterface(operation) {
var data = $__default['default'](this).data(DATA_KEY$7);
IFrame._jQueryInterface = function _jQueryInterface(config) {
if ($__default['default'](SELECTOR_DATA_TOGGLE$1).length > 0) {
var data = $__default['default'](this).data(DATA_KEY$7);
var _options = $__default['default'].extend({}, Default$7, $__default['default'](this).data());
if (!data) {
data = new IFrame(this, _options);
$__default['default'](this).data(DATA_KEY$7, data);
}
if (typeof operation === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(operation)) {
var _data;
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
if (!data) {
data = $__default['default'](this).data();
}
(_data = data)[operation].apply(_data, args);
var _options = $__default['default'].extend({}, Default$7, typeof config === 'object' ? config : data);
localStorage.setItem('AdminLTE:IFrame:Options', JSON.stringify(_options));
var plugin = new IFrame($__default['default'](this), _options);
$__default['default'](this).data(DATA_KEY$7, typeof config === 'object' ? config : data);
if (typeof config === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(config)) {
plugin[config]();
}
} else {
new IFrame($__default['default'](this), JSON.parse(localStorage.getItem('AdminLTE:IFrame:Options')))._initFrameElement();
}
};
@ -1612,6 +1645,7 @@
var CLASS_NAME_LAYOUT_FIXED = 'layout-fixed';
var CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open';
var CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open';
var CLASS_NAME_IFRAME_MODE = 'iframe-mode';
var Default$6 = {
scrollbarTheme: 'os-theme-light',
scrollbarAutoHide: 'l',
@ -1648,7 +1682,7 @@
var heights = {
window: $__default['default'](window).height(),
header: $__default['default'](SELECTOR_HEADER).length > 0 ? $__default['default'](SELECTOR_HEADER).outerHeight() : 0,
header: $__default['default'](SELECTOR_HEADER).length > 0 && !$__default['default']('body').hasClass('layout-navbar-fixed') ? $__default['default'](SELECTOR_HEADER).outerHeight() : 0,
footer: $__default['default'](SELECTOR_FOOTER).length > 0 ? $__default['default'](SELECTOR_FOOTER).outerHeight() : 0,
sidebar: $__default['default'](SELECTOR_SIDEBAR$1).length > 0 ? $__default['default'](SELECTOR_SIDEBAR$1).height() : 0,
controlSidebar: controlSidebar
@ -1668,9 +1702,9 @@
if (max === heights.controlSidebar) {
$contentSelector.css(this._config.panelAutoHeightMode, max + offset);
} else if (max === heights.window) {
$contentSelector.css(this._config.panelAutoHeightMode, max + offset - heights.header - heights.footer);
$contentSelector.css(this._config.panelAutoHeightMode, max + offset - (heights.footer == 0 ? 0 : heights.header - heights.footer));
} else {
$contentSelector.css(this._config.panelAutoHeightMode, max + offset - heights.header);
$contentSelector.css(this._config.panelAutoHeightMode, max + offset - (heights.footer == 0 ? 0 : heights.header));
}
if (this._isFooterFixed()) {
@ -1700,7 +1734,11 @@
var $body = $__default['default']('body');
var $selector = $__default['default'](SELECTOR_LOGIN_BOX + ", " + SELECTOR_REGISTER_BOX);
if ($selector.length === 0) {
if ($body.hasClass(CLASS_NAME_IFRAME_MODE)) {
$body.css('height', '100%');
$__default['default']('.wrapper').css('height', '100%');
$__default['default']('html').css('height', '100%');
} else if ($selector.length === 0) {
$body.css('height', 'auto');
$__default['default']('html').css('height', 'auto');
} else {
@ -2153,7 +2191,7 @@
this._addNotFound();
} else {
endResults.each(function (i, result) {
$__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).append(_this2._renderItem(escape(result.name), escape(result.link), result.path));
$__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).append(_this2._renderItem(escape(result.name), encodeURI(result.link), result.path));
});
}
@ -2218,6 +2256,7 @@
path = path.join(" " + this.options.arrowSign + " ");
name = unescape(name);
link = decodeURI(link);
if (this.options.highlightName || this.options.highlightPath) {
var searchValue = $__default['default'](SELECTOR_SEARCH_INPUT$1).val().toLowerCase();
@ -2850,7 +2889,7 @@
treeviewMenu.stop().slideUp(this._config.animationSpeed, function () {
$__default['default'](_this2._element).trigger(collapsedEvent);
treeviewMenu.find(SELECTOR_OPEN + " > " + SELECTOR_TREEVIEW_MENU).slideUp();
treeviewMenu.find(SELECTOR_OPEN).removeClass(CLASS_NAME_OPEN);
treeviewMenu.find(SELECTOR_OPEN).removeClass(CLASS_NAME_IS_OPENING + " " + CLASS_NAME_OPEN);
});
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
/*!
* Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
* @package bootstrap-colorpicker
* @version v3.2.0
* @version v3.4.0
* @license MIT
* @link https://itsjavi.com/bootstrap-colorpicker/
* @link https://github.com/itsjavi/bootstrap-colorpicker.git
@ -426,6 +426,7 @@ var ColorItem = function () {
/**
* @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data
* @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.
* @param {boolean} disableHexInputFallback Disable fixing hex3 format
*/
}], [{
@ -447,10 +448,11 @@ var ColorItem = function () {
function ColorItem() {
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var disableHexInputFallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
_classCallCheck(this, ColorItem);
this.replace(color, format);
this.replace(color, format, disableHexInputFallback);
}
/**
@ -459,6 +461,7 @@ var ColorItem = function () {
*
* @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed)
* @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.
* @param {boolean} disableHexInputFallback Disable fixing hex3 format
* @example color.replace('rgb(255,0,0)', 'hsl');
* @example color.replace(hsvaColorData);
*/
@ -468,6 +471,7 @@ var ColorItem = function () {
key: 'replace',
value: function replace(color) {
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var disableHexInputFallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
format = ColorItem.sanitizeFormat(format);
@ -484,7 +488,7 @@ var ColorItem = function () {
* @type {QixColor}
* @private
*/
this._color = ColorItem.parse(color);
this._color = ColorItem.parse(color, disableHexInputFallback);
if (this._color === null) {
this._color = (0, _color2.default)();
@ -504,6 +508,7 @@ var ColorItem = function () {
* parsed.
*
* @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data
* @param {boolean} disableHexInputFallback Disable fixing hex3 format
* @example let qColor = ColorItem.parse('rgb(255,0,0)');
* @static
* @returns {QixColor|null}
@ -973,6 +978,8 @@ var ColorItem = function () {
}], [{
key: 'parse',
value: function parse(color) {
var disableHexInputFallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (color instanceof _color2.default) {
return color;
}
@ -997,6 +1004,10 @@ var ColorItem = function () {
format = 'hsv';
}
if (ColorItem.isHex(color) && color.length !== 6 && color.length !== 7 && disableHexInputFallback) {
return null;
}
try {
return (0, _color2.default)(color, format);
} catch (e) {
@ -1248,6 +1259,18 @@ exports.default = {
* @default true
*/
autoInputFallback: true,
/**
* If true, valid HEX3 colors will be converted to HEX6, even with
* autoInputFallback set to false
* if false, HEX3 colors will not be converted to HEX6, when autoInputFallback is false
* (this has been an issue, when using HEX6 colors with
* autoInputFallback set to false, HEX3 colors were
* automatically converting to HEX6)
*
* @type {boolean}
* @default false
*/
autoHexInputFallback: true,
/**
* If true a hash will be prepended to hexadecimal colors.
* If false, the hash will be removed.
@ -3013,7 +3036,7 @@ var Colorpicker = function () {
this.addonHandler.unbind();
this.pickerHandler.unbind();
this.element.removeClass('colorpicker-element').removeData('colorpicker', 'color').off('.colorpicker');
this.element.removeClass('colorpicker-element').removeData('colorpicker').removeData('color').off('.colorpicker');
/**
* (Colorpicker) When the instance is destroyed with all events unbound.
@ -3107,7 +3130,7 @@ var Colorpicker = function () {
return;
}
ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null;
ch.color = val ? ch.createColor(val, this.options.autoInputFallback, this.options.autoHexInputFallback) : null;
/**
* (Colorpicker) When the color is set programmatically with setValue().
@ -4164,7 +4187,12 @@ var PopupHandler = function () {
this.popoverTarget.popover(_jquery2.default.extend(true, {}, _options2.default.popover, cp.options.popover, { trigger: 'manual', content: cp.picker, html: true }));
this.popoverTip = (0, _jquery2.default)(this.popoverTarget.popover('getTipElement').data('bs.popover').tip);
/* Bootstrap 5 added an official method to get the popover instance */
/* global bootstrap */
var useGetInstance = window.bootstrap && window.bootstrap.Popover && window.bootstrap.Popover.getInstance;
this.popoverTip = useGetInstance ? (0, _jquery2.default)(bootstrap.Popover.getInstance(this.popoverTarget[0]).getTipElement()) : (0, _jquery2.default)(this.popoverTarget.popover('getTipElement').data('bs.popover').tip);
this.popoverTip.addClass('colorpicker-bs-popover');
this.popoverTarget.on('shown.bs.popover', _jquery2.default.proxy(this.fireShow, this));
@ -5814,6 +5842,7 @@ var ColorHandler = function () {
* @fires Colorpicker#colorpickerInvalid
* @param {*} val
* @param {boolean} fallbackOnInvalid
* @param {boolean} autoHexInputFallback
* @returns {ColorItem}
*/
@ -5821,8 +5850,11 @@ var ColorHandler = function () {
key: 'createColor',
value: function createColor(val) {
var fallbackOnInvalid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var autoHexInputFallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var color = new _ColorItem2.default(this.resolveColorDelegate(val), this.format);
var disableHexInputFallback = !fallbackOnInvalid && !autoHexInputFallback;
var color = new _ColorItem2.default(this.resolveColorDelegate(val), this.format, disableHexInputFallback);
if (!color.isValid()) {
if (fallbackOnInvalid) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -24,9 +24,11 @@
function getRange(allowFolded) {
var range = finder(cm, pos);
if (!range || range.to.line - range.from.line < minSize) return null;
if (force === "fold") return range;
var marks = cm.findMarksAt(range.from);
for (var i = 0; i < marks.length; ++i) {
if (marks[i].__isFold && force !== "fold") {
if (marks[i].__isFold) {
if (!allowFolded) return null;
range.cleared = true;
marks[i].clear();
@ -99,18 +101,18 @@
cm.foldCode(cm.getCursor(), null, "fold");
};
CodeMirror.commands.unfold = function(cm) {
cm.foldCode(cm.getCursor(), null, "unfold");
cm.foldCode(cm.getCursor(), { scanUp: false }, "unfold");
};
CodeMirror.commands.foldAll = function(cm) {
cm.operation(function() {
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
cm.foldCode(CodeMirror.Pos(i, 0), null, "fold");
cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "fold");
});
};
CodeMirror.commands.unfoldAll = function(cm) {
cm.operation(function() {
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold");
cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "unfold");
});
};

View file

@ -224,6 +224,7 @@
}
function Widget(completion, data) {
this.id = "cm-complete-" + Math.floor(Math.random(1e6))
this.completion = completion;
this.data = data;
this.picked = false;
@ -232,6 +233,9 @@
var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;
var hints = this.hints = ownerDocument.createElement("ul");
hints.setAttribute("role", "listbox")
hints.setAttribute("aria-expanded", "true")
hints.id = this.id
var theme = completion.cm.options.theme;
hints.className = "CodeMirror-hints " + theme;
this.selectedHint = data.selectedHint || 0;
@ -242,6 +246,9 @@
var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
if (cur.className != null) className = cur.className + " " + className;
elt.className = className;
if (i == this.selectedHint) elt.setAttribute("aria-selected", "true")
elt.id = this.id + "-" + i
elt.setAttribute("role", "option")
if (cur.render) cur.render(elt, data, cur);
else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));
elt.hintId = i;
@ -267,6 +274,9 @@
var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);
var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);
container.appendChild(hints);
cm.getInputField().setAttribute("aria-autocomplete", "list")
cm.getInputField().setAttribute("aria-owns", this.id)
cm.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint)
var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect();
var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false;
@ -293,6 +303,7 @@
}
}
var overlapX = box.right - winW;
if (scrolls) overlapX += cm.display.nativeBarWidth;
if (overlapX > 0) {
if (box.right - box.left > winW) {
hints.style.width = (winW - 5) + "px";
@ -321,6 +332,7 @@
cm.on("scroll", this.onScroll = function() {
var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
if (!startScroll) startScroll = cm.getScrollInfo();
var newTop = top + startScroll.top - curScroll.top;
var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);
if (!below) point += hints.offsetHeight;
@ -362,6 +374,9 @@
this.completion.widget = null;
if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints);
this.completion.cm.removeKeyMap(this.keyMap);
var input = this.completion.cm.getInputField()
input.removeAttribute("aria-activedescendant")
input.removeAttribute("aria-owns")
var cm = this.completion.cm;
if (this.completion.options.closeOnUnfocus) {
@ -389,9 +404,14 @@
i = avoidWrap ? 0 : this.data.list.length - 1;
if (this.selectedHint == i) return;
var node = this.hints.childNodes[this.selectedHint];
if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
if (node) {
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node.removeAttribute("aria-selected")
}
node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
node.setAttribute("aria-selected", "true")
this.completion.cm.getInputField().setAttribute("aria-activedescendant", node.id)
this.scrollToActive()
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},

View file

@ -69,3 +69,11 @@
background-position: right bottom;
width: 100%; height: 100%;
}
.CodeMirror-lint-line-error {
background-color: rgba(183, 76, 81, 0.08);
}
.CodeMirror-lint-line-warning {
background-color: rgba(255, 211, 0, 0.1);
}

View file

@ -11,6 +11,7 @@
})(function(CodeMirror) {
"use strict";
var GUTTER_ID = "CodeMirror-lint-markers";
var LINT_LINE_ID = "CodeMirror-lint-line-";
function showTooltip(cm, e, content) {
var tt = document.createElement("div");
@ -58,29 +59,54 @@
CodeMirror.on(node, "mouseout", hide);
}
function LintState(cm, options, hasGutter) {
function LintState(cm, conf, hasGutter) {
this.marked = [];
this.options = options;
if (conf instanceof Function) conf = {getAnnotations: conf};
if (!conf || conf === true) conf = {};
this.options = {};
this.linterOptions = conf.options || {};
for (var prop in defaults) this.options[prop] = defaults[prop];
for (var prop in conf) {
if (defaults.hasOwnProperty(prop)) {
if (conf[prop] != null) this.options[prop] = conf[prop];
} else if (!conf.options) {
this.linterOptions[prop] = conf[prop];
}
}
this.timeout = null;
this.hasGutter = hasGutter;
this.onMouseOver = function(e) { onMouseOver(cm, e); };
this.waitingFor = 0
}
function parseOptions(_cm, options) {
if (options instanceof Function) return {getAnnotations: options};
if (!options || options === true) options = {};
return options;
var defaults = {
highlightLines: false,
tooltips: true,
delay: 500,
lintOnChange: true,
getAnnotations: null,
async: false,
selfContain: null,
formatAnnotation: null,
onUpdateLinting: null
}
function clearMarks(cm) {
var state = cm.state.lint;
if (state.hasGutter) cm.clearGutter(GUTTER_ID);
if (state.options.highlightLines) clearErrorLines(cm);
for (var i = 0; i < state.marked.length; ++i)
state.marked[i].clear();
state.marked.length = 0;
}
function clearErrorLines(cm) {
cm.eachLine(function(line) {
var has = line.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(line.wrapClass);
if (has) cm.removeLineClass(line, "wrap", has[0]);
})
}
function makeMarker(cm, labels, severity, multiple, tooltips) {
var marker = document.createElement("div"), inner = marker;
marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity;
@ -123,7 +149,7 @@
return tip;
}
function lintAsync(cm, getAnnotations, passOptions) {
function lintAsync(cm, getAnnotations) {
var state = cm.state.lint
var id = ++state.waitingFor
function abort() {
@ -136,22 +162,23 @@
if (state.waitingFor != id) return
if (arg2 && annotations instanceof CodeMirror) annotations = arg2
cm.operation(function() {updateLinting(cm, annotations)})
}, passOptions, cm);
}, state.linterOptions, cm);
}
function startLinting(cm) {
var state = cm.state.lint, options = state.options;
var state = cm.state.lint;
if (!state) return;
var options = state.options;
/*
* Passing rules in `options` property prevents JSHint (and other linters) from complaining
* about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
*/
var passOptions = options.options || options;
var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
if (!getAnnotations) return;
if (options.async || getAnnotations.async) {
lintAsync(cm, getAnnotations, passOptions)
lintAsync(cm, getAnnotations)
} else {
var annotations = getAnnotations(cm.getValue(), passOptions, cm);
var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm);
if (!annotations) return;
if (annotations.then) annotations.then(function(issues) {
cm.operation(function() {updateLinting(cm, issues)})
@ -161,8 +188,10 @@
}
function updateLinting(cm, annotationsNotSorted) {
var state = cm.state.lint;
if (!state) return;
var options = state.options;
clearMarks(cm);
var state = cm.state.lint, options = state.options;
var annotations = groupByLine(annotationsNotSorted);
@ -194,7 +223,10 @@
// use original annotations[line] to show multiple messages
if (state.hasGutter)
cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1,
state.options.tooltips));
options.tooltips));
if (options.highlightLines)
cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity);
}
if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
}
@ -203,7 +235,7 @@
var state = cm.state.lint;
if (!state) return;
clearTimeout(state.timeout);
state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);
state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay);
}
function popupTooltips(cm, annotations, e) {
@ -243,8 +275,8 @@
if (val) {
var gutters = cm.getOption("gutters"), hasLintGutter = false;
for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
if (state.options.lintOnChange !== false)
var state = cm.state.lint = new LintState(cm, val, hasLintGutter);
if (state.options.lintOnChange)
cm.on("change", onChange);
if (state.options.tooltips != false && state.options.tooltips != "gutter")
CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
@ -254,6 +286,6 @@
});
CodeMirror.defineExtension("performLint", function() {
if (this.state.lint) startLinting(this);
startLinting(this);
});
});

View file

@ -508,6 +508,7 @@
copy.title = dv.edit.phrase(editOriginals ? "Push to left" : "Revert chunk");
copy.chunk = chunk;
copy.style.top = (chunk.origTo > chunk.origFrom ? top : dv.edit.heightAtLine(chunk.editFrom, "local") - sTopEdit) + "px";
copy.setAttribute("role", "button");
if (editOriginals) {
var topReverse = dv.edit.heightAtLine(chunk.editFrom, "local") - sTopEdit;
@ -518,6 +519,7 @@
origFrom: chunk.editFrom, origTo: chunk.editTo};
copyReverse.style.top = topReverse + "px";
dv.type == "right" ? copyReverse.style.left = "2px" : copyReverse.style.right = "2px";
copyReverse.setAttribute("role", "button");
}
}
}
@ -599,6 +601,7 @@
function buildGap(dv) {
var lock = dv.lockButton = elt("div", null, "CodeMirror-merge-scrolllock");
lock.setAttribute("role", "button");
var lockWrap = elt("div", [lock], "CodeMirror-merge-scrolllock-wrap");
CodeMirror.on(lock, "click", function() { setScrollLock(dv, !dv.lockScroll); });
var gapElts = [lockWrap];

View file

@ -68,6 +68,7 @@
var flags = "";
if (val instanceof RegExp) {
if (val.ignoreCase) flags = "i";
if (val.unicode) flags += "u"
val = val.source;
} else {
val = String(val);

View file

@ -251,6 +251,7 @@
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min;
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) };
CodeMirror.countColumn = countColumn;
CodeMirror.defaults = { indentUnit: 2 };
@ -322,7 +323,7 @@
if (!stream.string && mode.blankLine) { mode.blankLine(state); }
while (!stream.eol()) {
var style = mode.token(stream, state);
callback(stream.current(), style, i, stream.start, state);
callback(stream.current(), style, i, stream.start, state, mode);
stream.start = stream.pos;
}
}

View file

@ -67,7 +67,7 @@ CodeMirror.runMode = function(string, modespec, callback, options) {
if (!stream.string && mode.blankLine) mode.blankLine(state);
while (!stream.eol()) {
var style = mode.token(stream, state);
callback(stream.current(), style, i, stream.start, state);
callback(stream.current(), style, i, stream.start, state, mode);
stream.start = stream.pos;
}
}

View file

@ -320,7 +320,7 @@ CodeMirror.runMode = function(string, modespec, callback, options) {
if (!stream.string && mode.blankLine) { mode.blankLine(state); }
while (!stream.eol()) {
var style = mode.token(stream, state);
callback(stream.current(), style, i, stream.start, state);
callback(stream.current(), style, i, stream.start, state, mode);
stream.start = stream.pos;
}
}

View file

@ -189,18 +189,43 @@
if (state.annotate) { state.annotate.clear(); state.annotate = null; }
});}
function el(tag, attrs) {
var element = tag ? document.createElement(tag) : document.createDocumentFragment();
for (var key in attrs) {
element[key] = attrs[key];
}
for (var i = 2; i < arguments.length; i++) {
var child = arguments[i]
element.appendChild(typeof child == "string" ? document.createTextNode(child) : child);
}
return element;
}
function getQueryDialog(cm) {
return '<span class="CodeMirror-search-label">' + cm.phrase("Search:") + '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + cm.phrase("(Use /re/ syntax for regexp search)") + '</span>';
return el("", null,
el("span", {className: "CodeMirror-search-label"}, cm.phrase("Search:")), " ",
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",
el("span", {style: "color: #888", className: "CodeMirror-search-hint"},
cm.phrase("(Use /re/ syntax for regexp search)")));
}
function getReplaceQueryDialog(cm) {
return ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + cm.phrase("(Use /re/ syntax for regexp search)") + '</span>';
return el("", null, " ",
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",
el("span", {style: "color: #888", className: "CodeMirror-search-hint"},
cm.phrase("(Use /re/ syntax for regexp search)")));
}
function getReplacementQueryDialog(cm) {
return '<span class="CodeMirror-search-label">' + cm.phrase("With:") + '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
return el("", null,
el("span", {className: "CodeMirror-search-label"}, cm.phrase("With:")), " ",
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}));
}
function getDoReplaceConfirm(cm) {
return '<span class="CodeMirror-search-label">' + cm.phrase("Replace?") + '</span> <button>' + cm.phrase("Yes") + '</button> <button>' + cm.phrase("No") + '</button> <button>' + cm.phrase("All") + '</button> <button>' + cm.phrase("Stop") + '</button> ';
return el("", null,
el("span", {className: "CodeMirror-search-label"}, cm.phrase("Replace?")), " ",
el("button", {}, cm.phrase("Yes")), " ",
el("button", {}, cm.phrase("No")), " ",
el("button", {}, cm.phrase("All")), " ",
el("button", {}, cm.phrase("Stop")));
}
function replaceAll(cm, query, text) {
@ -217,8 +242,11 @@
function replace(cm, all) {
if (cm.getOption("readOnly")) return;
var query = cm.getSelection() || getSearchState(cm).lastQuery;
var dialogText = '<span class="CodeMirror-search-label">' + (all ? cm.phrase("Replace all:") : cm.phrase("Replace:")) + '</span>';
dialog(cm, dialogText + getReplaceQueryDialog(cm), dialogText, query, function(query) {
var dialogText = all ? cm.phrase("Replace all:") : cm.phrase("Replace:")
var fragment = el("", null,
el("span", {className: "CodeMirror-search-label"}, dialogText),
getReplaceQueryDialog(cm))
dialog(cm, fragment, dialogText, query, function(query) {
if (!query) return;
query = parseQuery(query);
dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function(text) {

View file

@ -231,8 +231,7 @@
var content = ts.options.completionTip ? ts.options.completionTip(cur.data) : cur.data.doc;
if (content) {
tooltip = makeTooltip(node.parentNode.getBoundingClientRect().right + window.pageXOffset,
node.getBoundingClientRect().top + window.pageYOffset, content, cm);
tooltip.className += " " + cls + "hint-doc";
node.getBoundingClientRect().top + window.pageYOffset, content, cm, cls + "hint-doc");
}
});
c(obj);
@ -637,12 +636,44 @@
}
}
function makeTooltip(x, y, content, cm) {
var node = elt("div", cls + "tooltip", content);
function makeTooltip(x, y, content, cm, className) {
var node = elt("div", cls + "tooltip" + " " + (className || ""), content);
node.style.left = x + "px";
node.style.top = y + "px";
var container = ((cm.options || {}).hintOptions || {}).container || document.body;
container.appendChild(node);
var pos = cm.cursorCoords();
var winW = window.innerWidth;
var winH = window.innerHeight;
var box = node.getBoundingClientRect();
var hints = document.querySelector(".CodeMirror-hints");
var overlapY = box.bottom - winH;
var overlapX = box.right - winW;
if (hints && overlapX > 0) {
node.style.left = 0;
var box = node.getBoundingClientRect();
node.style.left = (x = x - hints.offsetWidth - box.width) + "px";
overlapX = box.right - winW;
}
if (overlapY > 0) {
var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
if (curTop - height > 0) { // Fits above cursor
node.style.top = (pos.top - height) + "px";
} else if (height > winH) {
node.style.height = (winH - 5) + "px";
node.style.top = (pos.bottom - box.top) + "px";
}
}
if (overlapX > 0) {
if (box.right - box.left > winW) {
node.style.width = (winW - 5) + "px";
overlapX -= (box.right - box.left) - winW;
}
node.style.left = (x - overlapX) + "px";
}
return node;
}

View file

@ -68,7 +68,6 @@
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;

View file

@ -1311,6 +1311,7 @@
if (span.marker == marker) { return span }
} }
}
// Remove a span from an array, returning undefined if no spans are
// left (we don't store arrays for lines without spans).
function removeMarkedSpan(spans, span) {
@ -1319,9 +1320,16 @@
{ if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
return r
}
// Add a span to a line.
function addMarkedSpan(line, span) {
line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
function addMarkedSpan(line, span, op) {
var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));
if (inThisOp && inThisOp.has(line.markedSpans)) {
line.markedSpans.push(span);
} else {
line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
if (inThisOp) { inThisOp.add(line.markedSpans); }
}
span.marker.attachLine(line);
}
@ -2186,6 +2194,7 @@
if (cm.options.lineNumbers || markers) {
var wrap$1 = ensureLineWrapped(lineView);
var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
gutterWrap.setAttribute("aria-hidden", "true");
cm.display.input.setUneditable(gutterWrap);
wrap$1.insertBefore(gutterWrap, lineView.text);
if (lineView.line.gutterClass)
@ -3163,6 +3172,11 @@
cursor.style.top = pos.top + "px";
cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) {
var charPos = charCoords(cm, head, "div", null, null);
cursor.style.width = Math.max(0, charPos.right - charPos.left) + "px";
}
if (pos.other) {
// Secondary cursor, shown when on a 'jump' in bi-directional text
var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
@ -3430,8 +3444,8 @@
// Set pos and end to the cursor positions around the character pos sticks to
// If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
// If pos == Pos(_, 0, "before"), pos and end are unchanged
pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
}
for (var limit = 0; limit < 5; limit++) {
var changed = false;
@ -3782,7 +3796,8 @@
scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
scrollToPos: null, // Used to scroll to a specific position
focus: false,
id: ++nextOpId // Unique ID
id: ++nextOpId, // Unique ID
markArrays: null // Used by addMarkedSpan
};
pushOperation(cm.curOp);
}
@ -4235,6 +4250,8 @@
function updateGutterSpace(display) {
var width = display.gutters.offsetWidth;
display.sizer.style.marginLeft = width + "px";
// Send an event to consumers responding to changes in gutter width.
signalLater(display, "gutterChanged", display);
}
function setDocumentHeight(cm, measure) {
@ -4374,6 +4391,10 @@
// The element in which the editor lives.
d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
// This attribute is respected by automatic translation systems such as Google Translate,
// and may also be respected by tools used by human translators.
d.wrapper.setAttribute('translate', 'no');
// Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
@ -4782,6 +4803,7 @@
estimateLineHeights(cm);
loadMode(cm);
setDirectionClass(cm);
cm.options.direction = doc.direction;
if (!cm.options.lineWrapping) { findMaxLine(cm); }
cm.options.mode = doc.modeOption;
regChange(cm);
@ -5958,7 +5980,7 @@
if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
addMarkedSpan(line, new MarkedSpan(marker,
curLine == from.line ? from.ch : null,
curLine == to.line ? to.ch : null));
curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);
++curLine;
});
// lineIsHidden depends on the presence of the spans, so needs a second pass
@ -6130,6 +6152,7 @@
getRange: function(from, to, lineSep) {
var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
if (lineSep === false) { return lines }
if (lineSep === '') { return lines.join('') }
return lines.join(lineSep || this.lineSeparator())
},
@ -6684,10 +6707,9 @@
// Very basic readline/emacs-style bindings, which are standard on Mac.
keyMap.emacsy = {
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
"Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
"Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
"Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
"Ctrl-O": "openLine"
"Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp",
"Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine",
"Ctrl-T": "transposeChars", "Ctrl-O": "openLine"
};
keyMap.macDefault = {
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
@ -8833,7 +8855,7 @@
var kludge = hiddenTextarea(), te = kludge.firstChild;
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
te.value = lastCopied.text.join("\n");
var hadFocus = document.activeElement;
var hadFocus = activeElt();
selectInput(te);
setTimeout(function () {
cm.display.lineSpace.removeChild(kludge);
@ -8856,7 +8878,7 @@
ContentEditableInput.prototype.prepareSelection = function () {
var result = prepareSelection(this.cm, false);
result.focus = document.activeElement == this.div;
result.focus = activeElt() == this.div;
return result
};
@ -8952,7 +8974,7 @@
ContentEditableInput.prototype.focus = function () {
if (this.cm.options.readOnly != "nocursor") {
if (!this.selectionInEditor() || document.activeElement != this.div)
if (!this.selectionInEditor() || activeElt() != this.div)
{ this.showSelection(this.prepareSelection(), true); }
this.div.focus();
}
@ -9794,7 +9816,7 @@
addLegacyProps(CodeMirror);
CodeMirror.version = "5.60.0";
CodeMirror.version = "5.62.3";
return CodeMirror;

View file

@ -11,6 +11,7 @@
})(function(CodeMirror) {
"use strict";
var cmds = CodeMirror.commands;
var Pos = CodeMirror.Pos;
function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
@ -30,7 +31,8 @@
var lastKill = null;
function kill(cm, from, to, ring, text) {
// Internal generic kill function, used by several mapped kill "family" functions.
function _kill(cm, from, to, ring, text) {
if (text == null) text = cm.getRange(from, to);
if (ring == "grow" && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen))
@ -156,17 +158,17 @@
var i = selections.length;
while (i--) {
cursor = selections[i].head;
kill(cm, cursor, findEnd(cm, cursor, by, dir), ring);
_kill(cm, cursor, findEnd(cm, cursor, by, dir), ring);
}
}
function killRegion(cm, ring) {
function _killRegion(cm, ring) {
if (cm.somethingSelected()) {
var selections = cm.listSelections(), selection;
var i = selections.length;
while (i--) {
selection = selections[i];
kill(cm, selection.anchor, selection.head, ring);
_kill(cm, selection.anchor, selection.head, ring);
}
return true;
}
@ -205,13 +207,6 @@
}
}
function addPrefixMap(cm) {
cm.state.emacsPrefixMap = true;
cm.addKeyMap(prefixMap);
cm.on("keyHandled", maybeRemovePrefixMap);
cm.on("inputRead", maybeRemovePrefixMap);
}
function maybeRemovePrefixMap(cm, arg) {
if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return;
cm.removeKeyMap(prefixMap);
@ -222,7 +217,7 @@
// Utilities
function setMark(cm) {
cmds.setMark = function (cm) {
cm.setCursor(cm.getCursor());
cm.setExtending(!cm.getExtending());
cm.on("change", function() { cm.setExtending(false); });
@ -276,145 +271,266 @@
}
}
function quit(cm) {
// Commands. Names should match emacs function names (albeit in camelCase)
// except where emacs function names collide with code mirror core commands.
cmds.killRegion = function(cm) {
_kill(cm, cm.getCursor("start"), cm.getCursor("end"), true);
};
// Maps to emacs kill-line
cmds.killLineEmacs = repeated(function(cm) {
var start = cm.getCursor(), end = cm.clipPos(Pos(start.line));
var text = cm.getRange(start, end);
if (!/\S/.test(text)) {
text += "\n";
end = Pos(start.line + 1, 0);
}
_kill(cm, start, end, "grow", text);
});
cmds.killRingSave = function(cm) {
addToRing(cm.getSelection());
clearMark(cm);
};
cmds.yank = function(cm) {
var start = cm.getCursor();
cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste");
cm.setSelection(start, cm.getCursor());
};
cmds.yankPop = function(cm) {
cm.replaceSelection(popFromRing(), "around", "paste");
};
cmds.forwardChar = move(byChar, 1);
cmds.backwardChar = move(byChar, -1)
cmds.deleteChar = function(cm) { killTo(cm, byChar, 1, false); };
cmds.deleteForwardChar = function(cm) {
_killRegion(cm, false) || killTo(cm, byChar, 1, false);
};
cmds.deleteBackwardChar = function(cm) {
_killRegion(cm, false) || killTo(cm, byChar, -1, false);
};
cmds.forwardWord = move(byWord, 1);
cmds.backwardWord = move(byWord, -1);
cmds.killWord = function(cm) { killTo(cm, byWord, 1, "grow"); };
cmds.backwardKillWord = function(cm) { killTo(cm, byWord, -1, "grow"); };
cmds.nextLine = move(byLine, 1);
cmds.previousLine = move(byLine, -1);
cmds.scrollDownCommand = move(byPage, -1);
cmds.scrollUpCommand = move(byPage, 1);
cmds.backwardParagraph = move(byParagraph, -1);
cmds.forwardParagraph = move(byParagraph, 1);
cmds.backwardSentence = move(bySentence, -1);
cmds.forwardSentence = move(bySentence, 1);
cmds.killSentence = function(cm) { killTo(cm, bySentence, 1, "grow"); };
cmds.backwardKillSentence = function(cm) {
_kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), "grow");
};
cmds.killSexp = function(cm) { killTo(cm, byExpr, 1, "grow"); };
cmds.backwardKillSexp = function(cm) { killTo(cm, byExpr, -1, "grow"); };
cmds.forwardSexp = move(byExpr, 1);
cmds.backwardSexp = move(byExpr, -1);
cmds.markSexp = function(cm) {
var cursor = cm.getCursor();
cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor);
};
cmds.transposeSexps = function(cm) {
var leftStart = byExpr(cm, cm.getCursor(), -1);
var leftEnd = byExpr(cm, leftStart, 1);
var rightEnd = byExpr(cm, leftEnd, 1);
var rightStart = byExpr(cm, rightEnd, -1);
cm.replaceRange(cm.getRange(rightStart, rightEnd) +
cm.getRange(leftEnd, rightStart) +
cm.getRange(leftStart, leftEnd), leftStart, rightEnd);
};
cmds.backwardUpList = repeated(toEnclosingExpr);
cmds.justOneSpace = function(cm) {
var pos = cm.getCursor(), from = pos.ch;
var to = pos.ch, text = cm.getLine(pos.line);
while (from && /\s/.test(text.charAt(from - 1))) --from;
while (to < text.length && /\s/.test(text.charAt(to))) ++to;
cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to));
};
cmds.openLine = repeated(function(cm) {
cm.replaceSelection("\n", "start");
});
// maps to emacs 'transpose-chars'
cmds.transposeCharsRepeatable = repeated(function(cm) {
cm.execCommand("transposeChars");
});
cmds.capitalizeWord = repeated(function(cm) {
operateOnWord(cm, function(w) {
var letter = w.search(/\w/);
if (letter == -1) return w;
return w.slice(0, letter) + w.charAt(letter).toUpperCase() +
w.slice(letter + 1).toLowerCase();
});
});
cmds.upcaseWord = repeated(function(cm) {
operateOnWord(cm, function(w) { return w.toUpperCase(); });
});
cmds.downcaseWord = repeated(function(cm) {
operateOnWord(cm, function(w) { return w.toLowerCase(); });
});
// maps to emacs 'undo'
cmds.undoRepeatable = repeated("undo");
cmds.keyboardQuit = function(cm) {
cm.execCommand("clearSearch");
clearMark(cm);
}
CodeMirror.emacs = {kill: kill, killRegion: killRegion, repeated: repeated};
cmds.newline = repeated(function(cm) { cm.replaceSelection("\n", "end"); });
cmds.gotoLine = function(cm) {
var prefix = getPrefix(cm, true);
if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1);
getInput(cm, "Goto line", function(str) {
var num;
if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0)
cm.setCursor(num - 1);
});
};
cmds.indentRigidly = function(cm) {
cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit"));
};
cmds.exchangePointAndMark = function(cm) {
cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor"));
};
cmds.quotedInsertTab = repeated("insertTab");
cmds.universalArgument = function addPrefixMap(cm) {
cm.state.emacsPrefixMap = true;
cm.addKeyMap(prefixMap);
cm.on("keyHandled", maybeRemovePrefixMap);
cm.on("inputRead", maybeRemovePrefixMap);
};
CodeMirror.emacs = {kill: _kill, killRegion: _killRegion, repeated: repeated};
// Actual keymap
var keyMap = CodeMirror.keyMap.emacs = CodeMirror.normalizeKeyMap({
"Ctrl-W": function(cm) {kill(cm, cm.getCursor("start"), cm.getCursor("end"), true);},
"Ctrl-K": repeated(function(cm) {
var start = cm.getCursor(), end = cm.clipPos(Pos(start.line));
var text = cm.getRange(start, end);
if (!/\S/.test(text)) {
text += "\n";
end = Pos(start.line + 1, 0);
}
kill(cm, start, end, "grow", text);
}),
"Alt-W": function(cm) {
addToRing(cm.getSelection());
clearMark(cm);
},
"Ctrl-Y": function(cm) {
var start = cm.getCursor();
cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste");
cm.setSelection(start, cm.getCursor());
},
"Alt-Y": function(cm) {cm.replaceSelection(popFromRing(), "around", "paste");},
"Ctrl-Space": setMark, "Ctrl-Shift-2": setMark,
"Ctrl-F": move(byChar, 1), "Ctrl-B": move(byChar, -1),
"Right": move(byChar, 1), "Left": move(byChar, -1),
"Ctrl-D": function(cm) { killTo(cm, byChar, 1, false); },
"Delete": function(cm) { killRegion(cm, false) || killTo(cm, byChar, 1, false); },
"Ctrl-H": function(cm) { killTo(cm, byChar, -1, false); },
"Backspace": function(cm) { killRegion(cm, false) || killTo(cm, byChar, -1, false); },
"Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1),
"Alt-Right": move(byWord, 1), "Alt-Left": move(byWord, -1),
"Alt-D": function(cm) { killTo(cm, byWord, 1, "grow"); },
"Alt-Backspace": function(cm) { killTo(cm, byWord, -1, "grow"); },
"Ctrl-N": move(byLine, 1), "Ctrl-P": move(byLine, -1),
"Down": move(byLine, 1), "Up": move(byLine, -1),
"Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
"End": "goLineEnd", "Home": "goLineStart",
"Alt-V": move(byPage, -1), "Ctrl-V": move(byPage, 1),
"PageUp": move(byPage, -1), "PageDown": move(byPage, 1),
"Ctrl-Up": move(byParagraph, -1), "Ctrl-Down": move(byParagraph, 1),
"Alt-A": move(bySentence, -1), "Alt-E": move(bySentence, 1),
"Alt-K": function(cm) { killTo(cm, bySentence, 1, "grow"); },
"Ctrl-Alt-K": function(cm) { killTo(cm, byExpr, 1, "grow"); },
"Ctrl-Alt-Backspace": function(cm) { killTo(cm, byExpr, -1, "grow"); },
"Ctrl-Alt-F": move(byExpr, 1), "Ctrl-Alt-B": move(byExpr, -1, "grow"),
"Shift-Ctrl-Alt-2": function(cm) {
var cursor = cm.getCursor();
cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor);
},
"Ctrl-Alt-T": function(cm) {
var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1);
var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1);
cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) +
cm.getRange(leftStart, leftEnd), leftStart, rightEnd);
},
"Ctrl-Alt-U": repeated(toEnclosingExpr),
"Alt-Space": function(cm) {
var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line);
while (from && /\s/.test(text.charAt(from - 1))) --from;
while (to < text.length && /\s/.test(text.charAt(to))) ++to;
cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to));
},
"Ctrl-O": repeated(function(cm) { cm.replaceSelection("\n", "start"); }),
"Ctrl-T": repeated(function(cm) {
cm.execCommand("transposeChars");
}),
"Alt-C": repeated(function(cm) {
operateOnWord(cm, function(w) {
var letter = w.search(/\w/);
if (letter == -1) return w;
return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase();
});
}),
"Alt-U": repeated(function(cm) {
operateOnWord(cm, function(w) { return w.toUpperCase(); });
}),
"Alt-L": repeated(function(cm) {
operateOnWord(cm, function(w) { return w.toLowerCase(); });
}),
"Ctrl-W": "killRegion",
"Ctrl-K": "killLineEmacs",
"Alt-W": "killRingSave",
"Ctrl-Y": "yank",
"Alt-Y": "yankPop",
"Ctrl-Space": "setMark",
"Ctrl-Shift-2": "setMark",
"Ctrl-F": "forwardChar",
"Ctrl-B": "backwardChar",
"Right": "forwardChar",
"Left": "backwardChar",
"Ctrl-D": "deleteChar",
"Delete": "deleteForwardChar",
"Ctrl-H": "deleteBackwardChar",
"Backspace": "deleteBackwardChar",
"Alt-F": "forwardWord",
"Alt-B": "backwardWord",
"Alt-Right": "forwardWord",
"Alt-Left": "backwardWord",
"Alt-D": "killWord",
"Alt-Backspace": "backwardKillWord",
"Ctrl-N": "nextLine",
"Ctrl-P": "previousLine",
"Down": "nextLine",
"Up": "previousLine",
"Ctrl-A": "goLineStart",
"Ctrl-E": "goLineEnd",
"End": "goLineEnd",
"Home": "goLineStart",
"Alt-V": "scrollDownCommand",
"Ctrl-V": "scrollUpCommand",
"PageUp": "scrollDownCommand",
"PageDown": "scrollUpCommand",
"Ctrl-Up": "backwardParagraph",
"Ctrl-Down": "forwardParagraph",
"Alt-{": "backwardParagraph",
"Alt-}": "forwardParagraph",
"Alt-A": "backwardSentence",
"Alt-E": "forwardSentence",
"Alt-K": "killSentence",
"Ctrl-X Delete": "backwardKillSentence",
"Ctrl-Alt-K": "killSexp",
"Ctrl-Alt-Backspace": "backwardKillSexp",
"Ctrl-Alt-F": "forwardSexp",
"Ctrl-Alt-B": "backwardSexp",
"Shift-Ctrl-Alt-2": "markSexp",
"Ctrl-Alt-T": "transposeSexps",
"Ctrl-Alt-U": "backwardUpList",
"Alt-Space": "justOneSpace",
"Ctrl-O": "openLine",
"Ctrl-T": "transposeCharsRepeatable",
"Alt-C": "capitalizeWord",
"Alt-U": "upcaseWord",
"Alt-L": "downcaseWord",
"Alt-;": "toggleComment",
"Ctrl-/": repeated("undo"), "Shift-Ctrl--": repeated("undo"),
"Ctrl-Z": repeated("undo"), "Cmd-Z": repeated("undo"),
"Ctrl-/": "undoRepeatable",
"Shift-Ctrl--": "undoRepeatable",
"Ctrl-Z": "undoRepeatable",
"Cmd-Z": "undoRepeatable",
"Ctrl-X U": "undoRepeatable",
"Shift-Ctrl-Z": "redo",
"Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd",
"Ctrl-S": "findPersistentNext", "Ctrl-R": "findPersistentPrev", "Ctrl-G": quit, "Shift-Alt-5": "replace",
"Shift-Alt-,": "goDocStart",
"Shift-Alt-.": "goDocEnd",
"Ctrl-S": "findPersistentNext",
"Ctrl-R": "findPersistentPrev",
"Ctrl-G": "keyboardQuit",
"Shift-Alt-5": "replace",
"Alt-/": "autocomplete",
"Enter": "newlineAndIndent",
"Ctrl-J": repeated(function(cm) { cm.replaceSelection("\n", "end"); }),
"Ctrl-J": "newline",
"Tab": "indentAuto",
"Alt-G G": function(cm) {
var prefix = getPrefix(cm, true);
if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1);
getInput(cm, "Goto line", function(str) {
var num;
if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0)
cm.setCursor(num - 1);
});
},
"Ctrl-X Tab": function(cm) {
cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit"));
},
"Ctrl-X Ctrl-X": function(cm) {
cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor"));
},
"Alt-G G": "gotoLine",
"Ctrl-X Tab": "indentRigidly",
"Ctrl-X Ctrl-X": "exchangePointAndMark",
"Ctrl-X Ctrl-S": "save",
"Ctrl-X Ctrl-W": "save",
"Ctrl-X S": "saveAll",
"Ctrl-X F": "open",
"Ctrl-X U": repeated("undo"),
"Ctrl-X K": "close",
"Ctrl-X Delete": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), "grow"); },
"Ctrl-X H": "selectAll",
"Ctrl-Q Tab": repeated("insertTab"),
"Ctrl-U": addPrefixMap,
"Ctrl-Q Tab": "quotedInsertTab",
"Ctrl-U": "universalArgument",
"fallthrough": "default"
});

View file

@ -420,6 +420,9 @@
var numbers = makeKeyRange(48, 10);
var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);
var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '_', '/']);
var upperCaseChars;
try { upperCaseChars = new RegExp("^[\\p{Lu}]$", "u"); }
catch (_) { upperCaseChars = /^[A-Z]$/; }
function isLine(cm, line) {
return line >= cm.firstLine() && line <= cm.lastLine();
@ -434,7 +437,7 @@
return numberRegex.test(k);
}
function isUpperCase(k) {
return (/^[A-Z]$/).test(k);
return upperCaseChars.test(k);
}
function isWhiteSpaceString(k) {
return (/^\s*$/).test(k);
@ -658,7 +661,7 @@
this.latestRegister = registerName;
if (cm.openDialog) {
this.onRecordingDone = cm.openDialog(
'(recording)['+registerName+']', null, {bottom:true});
document.createTextNode('(recording)['+registerName+']'), null, {bottom:true});
}
this.isRecording = true;
}

View file

@ -484,7 +484,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
"instanceof interface native new package private protected public " +
"return static strictfp super switch synchronized this throw throws transient " +
"try volatile while @interface"),
types: words("byte short int long float double boolean char void Boolean Byte Character Double Float " +
types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " +
"Integer Long Number Object Short String StringBuffer StringBuilder Void"),
blockKeywords: words("catch class do else finally for if switch try while"),
defKeywords: words("class interface enum @interface"),
@ -659,7 +659,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
"file import where by get set abstract enum open inner override private public internal " +
"protected catch finally out final vararg reified dynamic companion constructor init " +
"sealed field property receiver param sparam lateinit data inline noinline tailrec " +
"external annotation crossinline const operator infix suspend actual expect setparam"
"external annotation crossinline const operator infix suspend actual expect setparam value"
),
types: words(
/* package java.lang */

View file

@ -195,7 +195,7 @@ CodeMirror.defineMode("cobol", function () {
case "string": // multi-line string parsing mode
var next = false;
while ((next = stream.next()) != null) {
if (next == "\"" || next == "\'") {
if ((next == "\"" || next == "\'") && !stream.match(/['"]/, false)) {
state.mode = false;
break;
}

View file

@ -164,10 +164,10 @@
} else {
if(delim = stream.match(/^%([^\w\s=])/)) {
delim = delim[1];
} else if (stream.match(/^%[a-zA-Z0-9_\u009F-\uFFFF]*/)) {
} else if (stream.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/)) {
// Macro variables
return "meta";
} else {
} else if (stream.eat('%')) {
// '%' operator
return "operator";
}

View file

@ -482,7 +482,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"cue-before", "cursor", "direction", "display", "dominant-baseline",
"drop-initial-after-adjust", "drop-initial-after-align",
"drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
"drop-initial-value", "elevation", "empty-cells", "fit", "fit-position",
"drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
"flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
"flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
"font", "font-family", "font-feature-settings", "font-kerning",
@ -564,7 +564,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
], propertyKeywords = keySet(propertyKeywords_);
var nonStandardPropertyKeywords_ = [
"border-block", "border-block-color", "border-block-end",
"accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
"border-block-end-color", "border-block-end-style", "border-block-end-width",
"border-block-start", "border-block-start-color", "border-block-start-style",
"border-block-start-width", "border-block-style", "border-block-width",
@ -572,9 +572,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"border-inline-end-color", "border-inline-end-style",
"border-inline-end-width", "border-inline-start", "border-inline-start-color",
"border-inline-start-style", "border-inline-start-width",
"border-inline-style", "border-inline-width", "margin-block",
"border-inline-style", "border-inline-width", "content-visibility", "margin-block",
"margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
"margin-inline-start", "padding-block", "padding-block-end",
"margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
"padding-block-start", "padding-inline", "padding-inline-end",
"padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
@ -598,16 +598,16 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
"darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
"darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
"deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
@ -617,7 +617,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
"slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
"whitesmoke", "yellow", "yellowgreen"
], colorKeywords = keySet(colorKeywords_);
@ -628,21 +628,21 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
"avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
"bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
"both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button", "button-bevel",
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
"compact", "condensed", "contain", "content", "contents",
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
"content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
"cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
"dot-dash", "dot-dot-dash",
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
"dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
@ -652,10 +652,10 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
"extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
"forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
@ -689,11 +689,11 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
"s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
"s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
"scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
"searchfield-cancel-button", "searchfield-decoration",
"searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
"semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
"simp-chinese-formal", "simp-chinese-informal", "single",
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",

View file

@ -16,6 +16,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
var statementIndent = parserConfig.statementIndent;
var jsonldMode = parserConfig.jsonld;
var jsonMode = parserConfig.json || jsonldMode;
var trackScope = parserConfig.trackScope !== false
var isTS = parserConfig.typescript;
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
@ -231,6 +232,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
}
function inScope(state, varname) {
if (!trackScope) return false
for (var v = state.localVars; v; v = v.next)
if (v.name == varname) return true;
for (var cx = state.context; cx; cx = cx.prev) {
@ -277,6 +279,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
function register(varname) {
var state = cx.state;
cx.marked = "def";
if (!trackScope) return
if (state.context) {
if (state.lexical.info == "var" && state.context && state.context.block) {
// FIXME function decls are also not block scoped
@ -376,7 +379,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
}
if (type == "function") return cont(functiondef);
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
if (type == "class" || (isTS && value == "interface")) {
cx.marked = "keyword"
return cont(pushlex("form", type == "class" ? type : value), className, poplex)
@ -479,7 +482,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
function quasi(type, value) {
if (type != "quasi") return pass();
if (value.slice(value.length - 2) != "${") return cont(quasi);
return cont(expression, continueQuasi);
return cont(maybeexpression, continueQuasi);
}
function continueQuasi(type) {
if (type == "}") {
@ -619,6 +622,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
if (type == "quasi") { return pass(quasiType, afterType); }
}
function maybeReturnType(type) {
if (type == "=>") return cont(typeexpr)
@ -644,6 +648,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
return cont()
}
}
function quasiType(type, value) {
if (type != "quasi") return pass();
if (value.slice(value.length - 2) != "${") return cont(quasiType);
return cont(typeexpr, continueQuasiType);
}
function continueQuasiType(type) {
if (type == "}") {
cx.marked = "string-2";
cx.state.tokenize = tokenQuasi;
return cont(quasiType);
}
}
function typearg(type, value) {
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
if (type == ":") return cont(typeexpr)
@ -783,6 +799,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (value == "@") return cont(expression, classBody)
}
function classfield(type, value) {
if (value == "!") return cont(classfield)
if (value == "?") return cont(classfield)
if (type == ":") return cont(typeexpr, maybeAssign)
if (value == "=") return cont(expressionNoComma)
@ -883,7 +900,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
var c = state.cc[i];
if (c == poplex) lexical = lexical.prev;
else if (c != maybeelse) break;
else if (c != maybeelse && c != popcontext) break;
}
while ((lexical.type == "stat" || lexical.type == "form") &&
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
@ -920,8 +937,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
expressionAllowed: expressionAllowed,
skipExpression: function(state) {
var top = state.cc[state.cc.length - 1]
if (top == expression || top == expressionNoComma) state.cc.pop()
parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null))
}
};
});

View file

@ -104,9 +104,9 @@
function jsToken(stream, state, cx) {
if (stream.peek() == "<" && jsMode.expressionAllowed(stream, cx.state)) {
jsMode.skipExpression(cx.state)
state.context = new Context(CodeMirror.startState(xmlMode, jsMode.indent(cx.state, "", "")),
xmlMode, 0, state.context)
jsMode.skipExpression(cx.state)
return null
}

View file

@ -12,9 +12,10 @@
"use strict";
CodeMirror.defineMode("julia", function(config, parserConf) {
function wordRegexp(words, end) {
function wordRegexp(words, end, pre) {
if (typeof pre === "undefined") { pre = ""; }
if (typeof end === "undefined") { end = "\\b"; }
return new RegExp("^((" + words.join(")|(") + "))" + end);
return new RegExp("^" + pre + "((" + words.join(")|(") + "))" + end);
}
var octChar = "\\\\[0-7]{1,3}";
@ -22,13 +23,18 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
var sChar = "\\\\[abefnrtv0%?'\"\\\\]";
var uChar = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])";
var asciiOperatorsList = [
"[<>]:", "[<>=]=", "<<=?", ">>>?=?", "=>", "--?>", "<--[->]?", "\\/\\/",
"\\.{2,3}", "[\\.\\\\%*+\\-<>!\\/^|&]=?", "\\?", "\\$", "~", ":"
];
var operators = parserConf.operators || wordRegexp([
"[<>]:", "[<>=]=", "<<=?", ">>>?=?", "=>", "->", "\\/\\/",
"[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?", "\\?", "\\$", "~", ":",
"\\u00D7", "\\u2208", "\\u2209", "\\u220B", "\\u220C", "\\u2218",
"\\u221A", "\\u221B", "\\u2229", "\\u222A", "\\u2260", "\\u2264",
"\\u2265", "\\u2286", "\\u2288", "\\u228A", "\\u22C5",
"\\b(in|isa)\\b(?!\.?\\()"], "");
"[<>]:", "[<>=]=", "<<=?", ">>>?=?", "=>", "--?>", "<--[->]?", "\\/\\/",
"[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?", "\\?", "\\$", "~", ":",
"\\u00D7", "\\u2208", "\\u2209", "\\u220B", "\\u220C", "\\u2218",
"\\u221A", "\\u221B", "\\u2229", "\\u222A", "\\u2260", "\\u2264",
"\\u2265", "\\u2286", "\\u2288", "\\u228A", "\\u22C5",
"\\b(in|isa)\\b(?!\.?\\()"
], "");
var delimiters = parserConf.delimiters || /^[;,()[\]{}]/;
var identifiers = parserConf.identifiers ||
/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/;
@ -57,10 +63,13 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
var keywords = wordRegexp(keywordsList);
var builtins = wordRegexp(builtinsList);
var macro = /^@[_A-Za-z][\w]*/;
var macro = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/;
var symbol = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/;
var stringPrefixes = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;
var macroOperators = wordRegexp(asciiOperatorsList, "", "@");
var symbolOperators = wordRegexp(asciiOperatorsList, "", ":");
function inArray(state) {
return (state.nestedArrays > 0);
}
@ -165,8 +174,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
}
// Handle symbols
if (!leavingExpr && stream.match(symbol) ||
stream.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/)) {
if (!leavingExpr && (stream.match(symbol) || stream.match(symbolOperators))) {
return "builtin";
}
@ -212,7 +220,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
return state.tokenize(stream, state);
}
if (stream.match(macro)) {
if (stream.match(macro) || stream.match(macroOperators)) {
return "meta";
}

View file

@ -19,7 +19,7 @@
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"]},
{name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
{name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
{name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
@ -76,7 +76,7 @@
{name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
{name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
{name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]},
{name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
{name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
{name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},

File diff suppressed because one or more lines are too long

View file

@ -62,7 +62,7 @@
var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
myKeywords = myKeywords.concat(["nonlocal", "False", "True", "None", "async", "await"]);
myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]);
var stringPrefixes = new RegExp("^(([rbuf]|(br)|(fr))?('{3}|\"{3}|['\"]))", "i");
var stringPrefixes = new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|\"{3}|['\"]))", "i");
} else {
var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/;
myKeywords = myKeywords.concat(["exec", "print"]);
@ -298,7 +298,10 @@
}
function tokenLexer(stream, state) {
if (stream.sol()) state.beginningOfLine = true;
if (stream.sol()) {
state.beginningOfLine = true;
state.dedent = false;
}
var style = state.tokenize(stream, state);
var current = stream.current();
@ -315,10 +318,10 @@
// Handle scope changes.
if (current == "pass" || current == "return")
state.dedent += 1;
state.dedent = true;
if (current == "lambda") state.lambda = true;
if (current == ":" && !state.lambda && top(state).type == "py")
if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\s*(?:#|$)/, false))
pushPyScope(state);
if (current.length == 1 && !/string|comment/.test(style)) {
@ -332,10 +335,8 @@
else return ERRORCLASS;
}
}
if (state.dedent > 0 && stream.eol() && top(state).type == "py") {
if (state.scopes.length > 1) state.scopes.pop();
state.dedent -= 1;
}
if (state.dedent && stream.eol() && top(state).type == "py" && state.scopes.length > 1)
state.scopes.pop();
return style;
}
@ -370,14 +371,16 @@
if (state.tokenize != tokenBase)
return state.tokenize.isString ? CodeMirror.Pass : 0;
var scope = top(state), closing = scope.type == textAfter.charAt(0)
var scope = top(state)
var closing = scope.type == textAfter.charAt(0) ||
scope.type == "py" && !state.dedent && /^(else:|elif |except |finally:)/.test(textAfter)
if (scope.align != null)
return scope.align - (closing ? 1 : 0)
else
return scope.offset - (closing ? hangingIndent : 0)
},
electricInput: /^\s*[\}\]\)]$/,
electricInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
closeBrackets: {triples: "'\""},
lineComment: "#",
fold: "indent"

View file

@ -54,9 +54,9 @@ CodeMirror.defineMode("r", function(config) {
} else if (ch == "`") {
stream.match(/[^`]+`/);
return "variable-3";
} else if (ch == "." && stream.match(/.[.\d]+/)) {
} else if (ch == "." && stream.match(/.(?:[.]|\d+)/)) {
return "keyword";
} else if (/[\w\.]/.test(ch) && ch != "_") {
} else if (/[a-zA-Z\.]/.test(ch)) {
stream.eatWhile(/[\w\.]/);
var word = stream.current();
if (atoms.propertyIsEnumerable(word)) return "atom";

View file

@ -24,6 +24,8 @@
"@inject?": paramData,
"@state": paramData,
"template": { soyState: "templ-def", variableScope: true},
"extern": {soyState: "param-def"},
"export": {soyState: "export"},
"literal": { },
"msg": {},
"fallbackmsg": { noEndTag: true, reduceIndent: true},
@ -31,6 +33,8 @@
"plural": {},
"let": { soyState: "var-def" },
"if": {},
"javaimpl": {},
"jsimpl": {},
"elseif": { noEndTag: true, reduceIndent: true},
"else": { noEndTag: true, reduceIndent: true},
"switch": {},
@ -46,6 +50,8 @@
"delcall": { soyState: "templ-ref" },
"log": {},
"element": { variableScope: true },
"velog": {},
"const": { soyState: "const-def"},
};
var indentingTags = Object.keys(tags).filter(function(tag) {
@ -522,6 +528,27 @@
return this.token(stream, state);
}
return tokenUntil(stream, state, /\{\/literal}/);
case "export":
if (match = stream.match(/\w+/)) {
state.soyState.pop();
if (match == "const") {
state.soyState.push("const-def")
return "keyword";
} else if (match == "extern") {
state.soyState.push("param-def")
return "keyword";
}
} else {
stream.next();
}
return null;
case "const-def":
if (stream.match(/^\w+/)) {
state.soyState.pop();
return "def";
}
stream.next();
return null;
}
if (stream.match('{literal}')) {
@ -552,7 +579,8 @@
state.context = new Context(state.context, state.tag, tag.variableScope ? state.variables : null);
// Otherwise close the current context.
} else if (endTag) {
if (!state.context || state.context.tag != tagName) {
var isBalancedForExtern = tagName == 'extern' && (state.context && state.context.tag == 'export');
if (!state.context || ((state.context.tag != tagName) && !isBalancedForExtern)) {
tagError = true;
} else if (state.context) {
if (state.context.kind) {

View file

@ -95,7 +95,7 @@ CodeMirror.defineMode("sparql", function(config) {
}
function eatPnLocal(stream) {
while (stream.match(/([:\w\d._-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-fA-F0-9][a-fA-F0-9])/));
stream.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i);
}
function tokenLiteral(quote) {

View file

@ -82,6 +82,7 @@ CodeMirror.defineMode("velocity", function() {
}
// variable?
else if (ch == "$") {
stream.eat("!");
stream.eatWhile(/[\w\d\$_\.{}-]/);
// is it one of the specials?
if (specials && specials.propertyIsEnumerable(stream.current())) {

View file

@ -18,6 +18,8 @@ var kKeywords = [
"call(_indirect|_ref)?",
"current_memory",
"\\bdata\\b",
"catch(_all)?",
"delegate",
"drop",
"elem",
"else",
@ -36,13 +38,17 @@ var kKeywords = [
"offset",
"param",
"result",
"rethrow",
"return(_call(_indirect|_ref)?)?",
"select",
"start",
"table(\\.(size|get|set|size|grow|fill|init|copy))?",
"then",
"throw",
"try",
"type",
"unreachable",
"unwind",
// Numeric opcodes.
"i(32|64)\\.(store(8|16)|(load(8|16)_[su]))",

View file

@ -17,51 +17,55 @@
var yamlMode = CodeMirror.getMode(config, "yaml")
var innerMode = CodeMirror.getMode(config, parserConfig && parserConfig.base || "gfm")
function curMode(state) {
return state.state == BODY ? innerMode : yamlMode
function localMode(state) {
return state.state == FRONTMATTER ? {mode: yamlMode, state: state.yaml} : {mode: innerMode, state: state.inner}
}
return {
startState: function () {
return {
state: START,
inner: CodeMirror.startState(yamlMode)
yaml: null,
inner: CodeMirror.startState(innerMode)
}
},
copyState: function (state) {
return {
state: state.state,
inner: CodeMirror.copyState(curMode(state), state.inner)
yaml: state.yaml && CodeMirror.copyState(yamlMode, state.yaml),
inner: CodeMirror.copyState(innerMode, state.inner)
}
},
token: function (stream, state) {
if (state.state == START) {
if (stream.match('---', false)) {
state.state = FRONTMATTER
return yamlMode.token(stream, state.inner)
state.yaml = CodeMirror.startState(yamlMode)
return yamlMode.token(stream, state.yaml)
} else {
state.state = BODY
state.inner = CodeMirror.startState(innerMode)
return innerMode.token(stream, state.inner)
}
} else if (state.state == FRONTMATTER) {
var end = stream.sol() && stream.match(/(---|\.\.\.)/, false)
var style = yamlMode.token(stream, state.inner)
var style = yamlMode.token(stream, state.yaml)
if (end) {
state.state = BODY
state.inner = CodeMirror.startState(innerMode)
state.yaml = null
}
return style
} else {
return innerMode.token(stream, state.inner)
}
},
innerMode: function (state) {
return {mode: curMode(state), state: state.inner}
innerMode: localMode,
indent: function(state, a, b) {
var m = localMode(state)
return m.mode.indent ? m.mode.indent(m.state, a, b) : CodeMirror.Pass
},
blankLine: function (state) {
var mode = curMode(state)
if (mode.blankLine) return mode.blankLine(state.inner)
var m = localMode(state)
if (m.mode.blankLine) return m.mode.blankLine(m.state)
}
}
})

268
plugins/codemirror/theme/abbott.css vendored Normal file
View file

@ -0,0 +1,268 @@
/*
* abbott.css
* A warm, dark theme for prose and code, with pastels and pretty greens.
*
* Ported from abbott.vim (https://github.com/bcat/abbott.vim) version 2.1.
* Original design and CodeMirror port by Jonathan Rascher.
*
* This theme shares the following color palette with the Vim color scheme.
*
* Brown shades:
* bistre: #231c14
* chocolate: #3c3022
* cocoa: #745d42
* vanilla_cream: #fef3b4
*
* Red shades:
* crimson: #d80450
* cinnabar: #f63f05
*
* Green shades:
* dark_olive: #273900
* forest_green: #24a507
* chartreuse: #a0ea00
* pastel_chartreuse: #d8ff84
*
* Yellow shades:
* marigold: #fbb32f
* lemon_meringue: #fbec5d
*
* Blue shades:
* cornflower_blue: #3f91f1
* periwinkle_blue: #8ccdf0
*
* Magenta shades:
* french_pink: #ec6c99
* lavender: #e6a2f3
*
* Cyan shades:
* zomp: #39a78d
* seafoam_green: #00ff7f
*/
/* Style the UI: */
/* Equivalent to Vim's Normal group. */
.cm-s-abbott.CodeMirror {
background: #231c14 /* bistre */;
color: #d8ff84 /* pastel_chartreuse */;
}
/* Roughly equivalent to Vim's LineNr group. */
.cm-s-abbott .CodeMirror-gutters {
background: #231c14 /* bistre */;
border: none;
}
.cm-s-abbott .CodeMirror-linenumber { color: #fbec5d /* lemon_meringue */; }
.cm-s-abbott .CodeMirror-guttermarker { color: #f63f05 /* cinnabar */; }
/* Roughly equivalent to Vim's FoldColumn group. */
.cm-s-abbott .CodeMirror-guttermarker-subtle { color: #fbb32f /* marigold */; }
/*
* Roughly equivalent to Vim's CursorColumn group. (We use a brighter color
* since Vim's cursorcolumn option highlights a whole column, whereas
* CodeMirror's rule just highlights a thin line.)
*/
.cm-s-abbott .CodeMirror-ruler { border-color: #745d42 /* cocoa */; }
/* Equivalent to Vim's Cursor group in insert mode. */
.cm-s-abbott .CodeMirror-cursor { border-color: #a0ea00 /* chartreuse */; }
/* Equivalent to Vim's Cursor group in normal mode. */
.cm-s-abbott.cm-fat-cursor .CodeMirror-cursor,
.cm-s-abbott .cm-animate-fat-cursor {
/*
* CodeMirror doesn't allow changing the foreground color of the character
* under the cursor, so we can't use a reverse video effect for the cursor.
* Instead, make it semitransparent.
*/
background: rgba(160, 234, 0, 0.5) /* chartreuse */;
}
.cm-s-abbott.cm-fat-cursor .CodeMirror-cursors {
/*
* Boost the z-index so the fat cursor shows up on top of text and
* matchingbracket/matchingtag highlights.
*/
z-index: 3;
}
/* Equivalent to Vim's Cursor group in replace mode. */
.cm-s-abbott .CodeMirror-overwrite .CodeMirror-cursor {
border-bottom: 1px solid #a0ea00 /* chartreuse */;
border-left: none;
width: auto;
}
/* Roughly equivalent to Vim's CursorIM group. */
.cm-s-abbott .CodeMirror-secondarycursor {
border-color: #00ff7f /* seafoam_green */;
}
/* Roughly equivalent to Vim's Visual group. */
.cm-s-abbott .CodeMirror-selected,
.cm-s-abbott.CodeMirror-focused .CodeMirror-selected {
background: #273900 /* dark_olive */;
}
.cm-s-abbott .CodeMirror-line::selection,
.cm-s-abbott .CodeMirror-line > span::selection,
.cm-s-abbott .CodeMirror-line > span > span::selection {
background: #273900 /* dark_olive */;
}
.cm-s-abbott .CodeMirror-line::-moz-selection,
.cm-s-abbott .CodeMirror-line > span::-moz-selection,
.cm-s-abbott .CodeMirror-line > span > span::-moz-selection {
background: #273900 /* dark_olive */;
}
/* Roughly equivalent to Vim's SpecialKey group. */
.cm-s-abbott .cm-tab { color: #00ff7f /* seafoam_green */; }
/* Equivalent to Vim's Search group. */
.cm-s-abbott .cm-searching {
background: #fef3b4 /* vanilla_cream */ !important;
color: #231c14 /* bistre */ !important;
}
/* Style syntax highlighting modes: */
/* Equivalent to Vim's Comment group. */
.cm-s-abbott span.cm-comment {
color: #fbb32f /* marigold */;
font-style: italic;
}
/* Equivalent to Vim's String group. */
.cm-s-abbott span.cm-string,
.cm-s-abbott span.cm-string-2 {
color: #e6a2f3 /* lavender */;
}
/* Equivalent to Vim's Constant group. */
.cm-s-abbott span.cm-number,
.cm-s-abbott span.cm-string.cm-url { color: #f63f05 /* cinnabar */; }
/* Roughly equivalent to Vim's SpecialKey group. */
.cm-s-abbott span.cm-invalidchar { color: #00ff7f /* seafoam_green */; }
/* Equivalent to Vim's Special group. */
.cm-s-abbott span.cm-atom { color: #fef3b4 /* vanilla_cream */; }
/* Equivalent to Vim's Delimiter group. */
.cm-s-abbott span.cm-bracket,
.cm-s-abbott span.cm-punctuation {
color: #fef3b4 /* vanilla_cream */;
}
/* Equivalent Vim's Operator group. */
.cm-s-abbott span.cm-operator { font-weight: bold; }
/* Roughly equivalent to Vim's Identifier group. */
.cm-s-abbott span.cm-def,
.cm-s-abbott span.cm-variable,
.cm-s-abbott span.cm-variable-2,
.cm-s-abbott span.cm-variable-3 {
color: #8ccdf0 /* periwinkle_blue */;
}
/* Roughly equivalent to Vim's Function group. */
.cm-s-abbott span.cm-builtin,
.cm-s-abbott span.cm-property,
.cm-s-abbott span.cm-qualifier {
color: #3f91f1 /* cornflower_blue */;
}
/* Equivalent to Vim's Type group. */
.cm-s-abbott span.cm-type { color: #24a507 /* forest_green */; }
/* Equivalent to Vim's Keyword group. */
.cm-s-abbott span.cm-keyword {
color: #d80450 /* crimson */;
font-weight: bold;
}
/* Equivalent to Vim's PreProc group. */
.cm-s-abbott span.cm-meta { color: #ec6c99 /* french_pink */; }
/* Equivalent to Vim's htmlTagName group (linked to Statement). */
.cm-s-abbott span.cm-tag {
color: #d80450 /* crimson */;
font-weight: bold;
}
/* Equivalent to Vim's htmlArg group (linked to Type). */
.cm-s-abbott span.cm-attribute { color: #24a507 /* forest_green */; }
/* Equivalent to Vim's htmlH1, markdownH1, etc. groups (linked to Title). */
.cm-s-abbott span.cm-header {
color: #d80450 /* crimson */;
font-weight: bold;
}
/* Equivalent to Vim's markdownRule group (linked to PreProc). */
.cm-s-abbott span.cm-hr { color: #ec6c99 /* french_pink */; }
/* Roughly equivalent to Vim's Underlined group. */
.cm-s-abbott span.cm-link { color: #e6a2f3 /* lavender */; }
/* Equivalent to Vim's diffRemoved group. */
.cm-s-abbott span.cm-negative {
background: #d80450 /* crimson */;
color: #231c14 /* bistre */;
}
/* Equivalent to Vim's diffAdded group. */
.cm-s-abbott span.cm-positive {
background: #a0ea00 /* chartreuse */;
color: #231c14 /* bistre */;
font-weight: bold;
}
/* Equivalent to Vim's Error group. */
.cm-s-abbott span.cm-error {
background: #d80450 /* crimson */;
color: #231c14 /* bistre */;
}
/* Style addons: */
/* Equivalent to Vim's MatchParen group. */
.cm-s-abbott span.CodeMirror-matchingbracket {
background: #745d42 /* cocoa */ !important;
color: #231c14 /* bistre */ !important;
font-weight: bold;
}
/*
* Roughly equivalent to Vim's Error group. (Vim doesn't seem to have a direct
* equivalent in its own matchparen plugin, but many syntax highlighting plugins
* mark mismatched brackets as Error.)
*/
.cm-s-abbott span.CodeMirror-nonmatchingbracket {
background: #d80450 /* crimson */ !important;
color: #231c14 /* bistre */ !important;
}
.cm-s-abbott .CodeMirror-matchingtag,
.cm-s-abbott .cm-matchhighlight {
outline: 1px solid #39a78d /* zomp */;
}
/* Equivalent to Vim's CursorLine group. */
.cm-s-abbott .CodeMirror-activeline-background,
.cm-s-abbott .CodeMirror-activeline-gutter {
background: #3c3022 /* chocolate */;
}
/* Equivalent to Vim's CursorLineNr group. */
.cm-s-abbott .CodeMirror-activeline-gutter .CodeMirror-linenumber {
color: #d8ff84 /* pastel_chartreuse */;
font-weight: bold;
}
/* Roughly equivalent to Vim's Folded group. */
.cm-s-abbott .CodeMirror-foldmarker {
color: #f63f05 /* cinnabar */;
text-shadow: none;
}

View file

@ -9,6 +9,8 @@
.cm-s-ayu-dark .CodeMirror-guttermarker-subtle { color: #3d424d; }
.cm-s-ayu-dark .CodeMirror-linenumber { color: #3d424d; }
.cm-s-ayu-dark .CodeMirror-cursor { border-left: 1px solid #e6b450; }
.cm-s-ayu-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; }
.cm-s-ayu-dark .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
.cm-s-ayu-dark span.cm-comment { color: #626a73; }
.cm-s-ayu-dark span.cm-atom { color: #ae81ff; }

View file

@ -8,7 +8,9 @@
.cm-s-ayu-mirage .CodeMirror-guttermarker { color: white; }
.cm-s-ayu-mirage .CodeMirror-guttermarker-subtle { color: rgba(112, 122, 140, 66); }
.cm-s-ayu-mirage .CodeMirror-linenumber { color: rgba(61, 66, 77, 99); }
.cm-s-ayu-mirage .CodeMirror-cursor { border-left: 1px solid #ffcc66; }
.cm-s-ayu-mirage .CodeMirror-cursor { border-left: 1px solid #ffcc66; }
.cm-s-ayu-mirage.cm-fat-cursor .CodeMirror-cursor {background-color: #a2a8a175 !important;}
.cm-s-ayu-mirage .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
.cm-s-ayu-mirage span.cm-comment { color: #5c6773; font-style:italic; }
.cm-s-ayu-mirage span.cm-atom { color: #ae81ff; }

View file

@ -17,6 +17,8 @@
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
.cm-s-base16-dark .CodeMirror-linenumber { color: #505050; }
.cm-s-base16-dark .CodeMirror-cursor { border-left: 1px solid #b0b0b0; }
.cm-s-base16-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; }
.cm-s-base16-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
.cm-s-base16-dark span.cm-comment { color: #8f5536; }
.cm-s-base16-dark span.cm-atom { color: #aa759f; }

View file

@ -11,6 +11,8 @@
.cm-s-gruvbox-dark .CodeMirror-gutters {background: #282828; border-right: 0px;}
.cm-s-gruvbox-dark .CodeMirror-linenumber {color: #7c6f64;}
.cm-s-gruvbox-dark .CodeMirror-cursor { border-left: 1px solid #ebdbb2; }
.cm-s-gruvbox-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; }
.cm-s-gruvbox-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; }
.cm-s-gruvbox-dark div.CodeMirror-selected { background: #928374; }
.cm-s-gruvbox-dark span.cm-meta { color: #83a598; }

30
plugins/codemirror/theme/juejin.css vendored Normal file
View file

@ -0,0 +1,30 @@
.cm-s-juejin.CodeMirror {
background: #f8f9fa;
}
.cm-s-juejin .cm-header,
.cm-s-juejin .cm-def {
color: #1ba2f0;
}
.cm-s-juejin .cm-comment {
color: #009e9d;
}
.cm-s-juejin .cm-quote,
.cm-s-juejin .cm-link,
.cm-s-juejin .cm-strong,
.cm-s-juejin .cm-attribute {
color: #fd7741;
}
.cm-s-juejin .cm-url,
.cm-s-juejin .cm-keyword,
.cm-s-juejin .cm-builtin {
color: #bb51b8;
}
.cm-s-juejin .cm-hr {
color: #909090;
}
.cm-s-juejin .cm-tag {
color: #107000;
}
.cm-s-juejin .cm-variable-2 {
color: #0050a0;
}

View file

@ -24,6 +24,12 @@
.cm-s-material-ocean .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material-ocean.cm-fat-cursor .CodeMirror-cursor {
background-color: #a2a8a175 !important;
}
.cm-s-material-ocean .cm-animate-fat-cursor {
background-color: #a2a8a175 !important;
}
.cm-s-material-ocean div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
@ -132,4 +138,4 @@
.cm-s-material-ocean .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
}

View file

@ -24,6 +24,12 @@
.cm-s-material-palenight .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material-palenight.cm-fat-cursor .CodeMirror-cursor {
background-color: #607c8b80 !important;
}
.cm-s-material-palenight .cm-animate-fat-cursor {
background-color: #607c8b80 !important;
}
.cm-s-material-palenight div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
@ -132,4 +138,4 @@
.cm-s-material-palenight .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
}

View file

@ -24,6 +24,12 @@
.cm-s-material .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material.cm-fat-cursor .CodeMirror-cursor {
background-color: #5d6d5c80 !important;
}
.cm-s-material .cm-animate-fat-cursor {
background-color: #5d6d5c80 !important;
}
.cm-s-material div.CodeMirror-selected {
background: rgba(128, 203, 196, 0.2);
@ -132,4 +138,4 @@
.cm-s-material .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
}

View file

@ -16,6 +16,8 @@
.cm-s-oceanic-next .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-oceanic-next .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-oceanic-next .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
.cm-s-oceanic-next.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; }
.cm-s-oceanic-next .cm-animate-fat-cursor { background-color: #a2a8a175 !important; }
.cm-s-oceanic-next span.cm-comment { color: #65737E; }
.cm-s-oceanic-next span.cm-atom { color: #C594C5; }

View file

@ -1 +1 @@
div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;background:#0275d8;cursor:pointer}div.dtk-focus-alt div.dt-autofill-handle{background:#ff8b33}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#0275d8;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:60px;margin:-2px 0}
div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;background:#0275d8;cursor:pointer}div.dtk-focus-alt div.dt-autofill-handle{background:#ff8b33}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#0275d8;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);z-index:10}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:60px;margin:-2px 0}

View file

@ -2,4 +2,4 @@
Bootstrap integration for DataTables' AutoFill
©2015 SpryMedia Ltd - datatables.net/license
*/
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-bs4")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="btn btn-primary";return a});
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-autofill"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c){a||(a=window);c&&c.fn.dataTable||(c=require("datatables.net-bs4")(a,c).$);c.fn.dataTable.AutoFill||require("datatables.net-autofill")(a,c);return b(c,a,a.document)}:b(jQuery,window,document)})(function(b,a,c,d){b=b.fn.dataTable;b.AutoFill.classes.btn="btn btn-primary";return b});

View file

@ -1,15 +1,15 @@
/*! AutoFill 2.3.5
* ©2008-2020 SpryMedia Ltd - datatables.net/license
/*! AutoFill 2.3.9
* ©2008-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary AutoFill
* @description Add Excel like click and drag auto-fill options to DataTables
* @version 2.3.5
* @version 2.3.9
* @file dataTables.autoFill.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2010-2020 SpryMedia Ltd.
* @copyright Copyright 2010-2021 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@ -603,8 +603,8 @@ $.extend( AutoFill.prototype, {
// jQuery doesn't give a `table` as the offset parent oddly, so use DOM directly
currOffsetParent = $( currNode.offsetParent );
top += positionTop + parseInt( currOffsetParent.css('border-top-width') ) * 1;
left += positionLeft + parseInt( currOffsetParent.css('border-left-width') ) * 1;
top += positionTop + parseInt( currOffsetParent.css('border-top-width') || 0 ) * 1;
left += positionLeft + parseInt( currOffsetParent.css('border-left-width') || 0 ) * 1;
// Emergency fall back. Shouldn't happen, but just in case!
if ( currNode.nodeName.toLowerCase() === 'body' ) {
@ -1027,7 +1027,7 @@ AutoFill.actions = {
},
option: function ( dt, cells ) {
return dt.i18n('autoFill.fill', 'Fill all cells with <i>'+cells[0][0].label+'</i>' );
return dt.i18n('autoFill.fill', 'Fill all cells with <i>%d</i>', cells[0][0].label );
},
execute: function ( dt, cells, node ) {
@ -1102,7 +1102,7 @@ AutoFill.actions = {
* @static
* @type String
*/
AutoFill.version = '2.3.5';
AutoFill.version = '2.3.9';
/**

View file

@ -1,26 +1,46 @@
/*!
AutoFill 2.3.5
©2008-2020 SpryMedia Ltd - datatables.net/license
Copyright 2010-2021 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
AutoFill 2.3.9
©2008-2021 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return e(g,window,document)}):"object"===typeof exports?module.exports=function(g,i){g||(g=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(g,i).$;return e(i,g,g.document)}:e(jQuery,window,document)})(function(e,g,i,r){var l=e.fn.dataTable,t=0,k=function(b,c){if(!l.versionCheck||!l.versionCheck("1.10.8"))throw"Warning: AutoFill requires DataTables 1.10.8 or greater";this.c=e.extend(!0,{},l.defaults.autoFill,
k.defaults,c);this.s={dt:new l.Api(b),namespace:".autoFill"+t++,scroll:{},scrollInterval:null,handle:{height:0,width:0},enabled:!1};this.dom={handle:e('<div class="dt-autofill-handle"/>'),select:{top:e('<div class="dt-autofill-select top"/>'),right:e('<div class="dt-autofill-select right"/>'),bottom:e('<div class="dt-autofill-select bottom"/>'),left:e('<div class="dt-autofill-select left"/>')},background:e('<div class="dt-autofill-background"/>'),list:e('<div class="dt-autofill-list">'+this.s.dt.i18n("autoFill.info",
"")+"<ul/></div>"),dtScroll:null,offsetParent:null};this._constructor()};e.extend(k.prototype,{enabled:function(){return this.s.enabled},enable:function(b){var c=this;if(!1===b)return this.disable();this.s.enabled=!0;this._focusListener();this.dom.handle.on("mousedown",function(a){c._mousedown(a);return!1});return this},disable:function(){this.s.enabled=!1;this._focusListenerRemove();return this},_constructor:function(){var b=this,c=this.s.dt,a=e("div.dataTables_scrollBody",this.s.dt.table().container());
c.settings()[0].autoFill=this;a.length&&(this.dom.dtScroll=a,"static"===a.css("position")&&a.css("position","relative"));!1!==this.c.enable&&this.enable();c.on("destroy.autoFill",function(){b._focusListenerRemove()})},_attach:function(b){var c=this.s.dt,a=c.cell(b).index(),d=this.dom.handle,f=this.s.handle;if(!a||-1===c.columns(this.c.columns).indexes().indexOf(a.column))this._detach();else{this.dom.offsetParent||(this.dom.offsetParent=e(c.table().node()).offsetParent());if(!f.height||!f.width)d.appendTo("body"),
f.height=d.outerHeight(),f.width=d.outerWidth();c=this._getPosition(b,this.dom.offsetParent);this.dom.attachedTo=b;d.css({top:c.top+b.offsetHeight-f.height,left:c.left+b.offsetWidth-f.width}).appendTo(this.dom.offsetParent)}},_actionSelector:function(b){var c=this,a=this.s.dt,d=k.actions,f=[];e.each(d,function(c,d){d.available(a,b)&&f.push(c)});if(1===f.length&&!1===this.c.alwaysAsk){var j=d[f[0]].execute(a,b);this._update(j,b)}else if(1<f.length){var h=this.dom.list.children("ul").empty();f.push("cancel");
e.each(f,function(f,j){h.append(e("<li/>").append('<div class="dt-autofill-question">'+d[j].option(a,b)+"<div>").append(e('<div class="dt-autofill-button">').append(e('<button class="'+k.classes.btn+'">'+a.i18n("autoFill.button","&gt;")+"</button>").on("click",function(){var f=d[j].execute(a,b,e(this).closest("li"));c._update(f,b);c.dom.background.remove();c.dom.list.remove()}))))});this.dom.background.appendTo("body");this.dom.list.appendTo("body");this.dom.list.css("margin-top",-1*(this.dom.list.outerHeight()/
2))}},_detach:function(){this.dom.attachedTo=null;this.dom.handle.detach()},_drawSelection:function(b){var c=this.s.dt,a=this.s.start,d=e(this.dom.start),f={row:this.c.vertical?c.rows({page:"current"}).nodes().indexOf(b.parentNode):a.row,column:this.c.horizontal?e(b).index():a.column},b=c.column.index("toData",f.column),j=c.row(":eq("+f.row+")",{page:"current"}),j=e(c.cell(j.index(),b).node());if(c.cell(j).any()&&-1!==c.columns(this.c.columns).indexes().indexOf(b)){this.s.end=f;var h,c=a.row<f.row?
d:j;h=a.row<f.row?j:d;b=a.column<f.column?d:j;d=a.column<f.column?j:d;c=this._getPosition(c.get(0)).top;b=this._getPosition(b.get(0)).left;a=this._getPosition(h.get(0)).top+h.outerHeight()-c;d=this._getPosition(d.get(0)).left+d.outerWidth()-b;f=this.dom.select;f.top.css({top:c,left:b,width:d});f.left.css({top:c,left:b,height:a});f.bottom.css({top:c+a,left:b,width:d});f.right.css({top:c,left:b+d,height:a})}},_editor:function(b){var c=this.s.dt,a=this.c.editor;if(a){for(var d={},f=[],e=a.fields(),h=
0,i=b.length;h<i;h++)for(var p=0,k=b[h].length;p<k;p++){var n=b[h][p],g=c.settings()[0].aoColumns[n.index.column],o=g.editField;if(o===r)for(var g=g.mData,q=0,l=e.length;q<l;q++){var s=a.field(e[q]);if(s.dataSrc()===g){o=s.name();break}}if(!o)throw"Could not automatically determine field data. Please see https://datatables.net/tn/11";d[o]||(d[o]={});g=c.row(n.index.row).id();d[o][g]=n.set;f.push(n.index)}a.bubble(f,!1).multiSet(d).submit()}},_emitEvent:function(b,c){this.s.dt.iterator("table",function(a){e(a.nTable).triggerHandler(b+
".dt",c)})},_focusListener:function(){var b=this,c=this.s.dt,a=this.s.namespace,d=null!==this.c.focus?this.c.focus:c.init().keys||c.settings()[0].keytable?"focus":"hover";if("focus"===d)c.on("key-focus.autoFill",function(a,c,d){b._attach(d.node())}).on("key-blur.autoFill",function(){b._detach()});else if("click"===d)e(c.table().body()).on("click"+a,"td, th",function(){b._attach(this)}),e(i.body).on("click"+a,function(a){e(a.target).parents().filter(c.table().body()).length||b._detach()});else e(c.table().body()).on("mouseenter"+
a,"td, th",function(){b._attach(this)}).on("mouseleave"+a,function(a){e(a.relatedTarget).hasClass("dt-autofill-handle")||b._detach()})},_focusListenerRemove:function(){var b=this.s.dt;b.off(".autoFill");e(b.table().body()).off(this.s.namespace);e(i.body).off(this.s.namespace)},_getPosition:function(b,c){var a=b,d,f=0,j=0;c||(c=e(e(this.s.dt.table().node())[0].offsetParent));do{var h=a.offsetTop,i=a.offsetLeft;d=e(a.offsetParent);f+=h+1*parseInt(d.css("border-top-width"));j+=i+1*parseInt(d.css("border-left-width"));
if("body"===a.nodeName.toLowerCase())break;a=d.get(0)}while(d.get(0)!==c.get(0));return{top:f,left:j}},_mousedown:function(b){var c=this,a=this.s.dt;this.dom.start=this.dom.attachedTo;this.s.start={row:a.rows({page:"current"}).nodes().indexOf(e(this.dom.start).parent()[0]),column:e(this.dom.start).index()};e(i.body).on("mousemove.autoFill",function(a){c._mousemove(a)}).on("mouseup.autoFill",function(a){c._mouseup(a)});var d=this.dom.select,a=e(a.table().node()).offsetParent();d.top.appendTo(a);d.left.appendTo(a);
d.right.appendTo(a);d.bottom.appendTo(a);this._drawSelection(this.dom.start,b);this.dom.handle.css("display","none");b=this.dom.dtScroll;this.s.scroll={windowHeight:e(g).height(),windowWidth:e(g).width(),dtTop:b?b.offset().top:null,dtLeft:b?b.offset().left:null,dtHeight:b?b.outerHeight():null,dtWidth:b?b.outerWidth():null}},_mousemove:function(b){var c=b.target.nodeName.toLowerCase();"td"!==c&&"th"!==c||(this._drawSelection(b.target,b),this._shiftScroll(b))},_mouseup:function(b){e(i.body).off(".autoFill");
var c=this,a=this.s.dt,d=this.dom.select;d.top.remove();d.left.remove();d.right.remove();d.bottom.remove();this.dom.handle.css("display","block");var d=this.s.start,f=this.s.end;if(!(d.row===f.row&&d.column===f.column)){var j=a.cell(":eq("+d.row+")",d.column+":visible",{page:"current"});if(e("div.DTE",j.node()).length){var h=a.editor();h.on("submitSuccess.dtaf close.dtaf",function(){h.off(".dtaf");setTimeout(function(){c._mouseup(b)},100)}).on("submitComplete.dtaf preSubmitCancelled.dtaf close.dtaf",
function(){h.off(".dtaf")});h.submit()}else{for(var g=this._range(d.row,f.row),d=this._range(d.column,f.column),f=[],k=a.settings()[0],l=k.aoColumns,n=a.columns(this.c.columns).indexes(),m=0;m<g.length;m++)f.push(e.map(d,function(b){var c=a.row(":eq("+g[m]+")",{page:"current"}),b=a.cell(c.index(),b+":visible"),c=b.data(),d=b.index(),f=l[d.column].editField;f!==r&&(c=k.oApi._fnGetObjectDataFn(f)(a.row(d.row).data()));if(-1!==n.indexOf(d.column))return{cell:b,data:c,label:b.data(),index:d}}));this._actionSelector(f);
clearInterval(this.s.scrollInterval);this.s.scrollInterval=null}}},_range:function(b,c){var a=[],d;if(b<=c)for(d=b;d<=c;d++)a.push(d);else for(d=b;d>=c;d--)a.push(d);return a},_shiftScroll:function(b){var c=this,a=this.s.scroll,d=!1,f=b.pageY-i.body.scrollTop,e=b.pageX-i.body.scrollLeft,h,g,k,l;65>f?h=-5:f>a.windowHeight-65&&(h=5);65>e?g=-5:e>a.windowWidth-65&&(g=5);null!==a.dtTop&&b.pageY<a.dtTop+65?k=-5:null!==a.dtTop&&b.pageY>a.dtTop+a.dtHeight-65&&(k=5);null!==a.dtLeft&&b.pageX<a.dtLeft+65?l=
-5:null!==a.dtLeft&&b.pageX>a.dtLeft+a.dtWidth-65&&(l=5);h||g||k||l?(a.windowVert=h,a.windowHoriz=g,a.dtVert=k,a.dtHoriz=l,d=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null);!this.s.scrollInterval&&d&&(this.s.scrollInterval=setInterval(function(){if(a.windowVert)i.body.scrollTop=i.body.scrollTop+a.windowVert;if(a.windowHoriz)i.body.scrollLeft=i.body.scrollLeft+a.windowHoriz;if(a.dtVert||a.dtHoriz){var b=c.dom.dtScroll[0];if(a.dtVert)b.scrollTop=b.scrollTop+
a.dtVert;if(a.dtHoriz)b.scrollLeft=b.scrollLeft+a.dtHoriz}},20))},_update:function(b,c){if(!1!==b){var a=this.s.dt,d,f=a.columns(this.c.columns).indexes();this._emitEvent("preAutoFill",[a,c]);this._editor(c);if(null!==this.c.update?this.c.update:!this.c.editor){for(var e=0,h=c.length;e<h;e++)for(var g=0,i=c[e].length;g<i;g++)d=c[e][g],-1!==f.indexOf(d.index.column)&&d.cell.data(d.set);a.draw(!1)}this._emitEvent("autoFill",[a,c])}}});k.actions={increment:{available:function(b,c){var a=c[0][0].label;
return!isNaN(a-parseFloat(a))},option:function(b){return b.i18n("autoFill.increment",'Increment / decrement each cell by: <input type="number" value="1">')},execute:function(b,c,a){for(var b=1*c[0][0].data,a=1*e("input",a).val(),d=0,f=c.length;d<f;d++)for(var j=0,g=c[d].length;j<g;j++)c[d][j].set=b,b+=a}},fill:{available:function(){return!0},option:function(b,c){return b.i18n("autoFill.fill","Fill all cells with <i>"+c[0][0].label+"</i>")},execute:function(b,c){for(var a=c[0][0].data,d=0,f=c.length;d<
f;d++)for(var e=0,g=c[d].length;e<g;e++)c[d][e].set=a}},fillHorizontal:{available:function(b,c){return 1<c.length&&1<c[0].length},option:function(b){return b.i18n("autoFill.fillHorizontal","Fill cells horizontally")},execute:function(b,c){for(var a=0,d=c.length;a<d;a++)for(var f=0,e=c[a].length;f<e;f++)c[a][f].set=c[a][0].data}},fillVertical:{available:function(b,c){return 1<c.length},option:function(b){return b.i18n("autoFill.fillVertical","Fill cells vertically")},execute:function(b,c){for(var a=
0,d=c.length;a<d;a++)for(var e=0,g=c[a].length;e<g;e++)c[a][e].set=c[0][e].data}},cancel:{available:function(){return!1},option:function(b){return b.i18n("autoFill.cancel","Cancel")},execute:function(){return!1}}};k.version="2.3.5";k.defaults={alwaysAsk:!1,focus:null,columns:"",enable:!0,update:null,editor:null,vertical:!0,horizontal:!0};k.classes={btn:"btn"};var m=e.fn.dataTable.Api;m.register("autoFill()",function(){return this});m.register("autoFill().enabled()",function(){var b=this.context[0];
return b.autoFill?b.autoFill.enabled():!1});m.register("autoFill().enable()",function(b){return this.iterator("table",function(c){c.autoFill&&c.autoFill.enable(b)})});m.register("autoFill().disable()",function(){return this.iterator("table",function(b){b.autoFill&&b.autoFill.disable()})});e(i).on("preInit.dt.autofill",function(b,c){if("dt"===b.namespace){var a=c.oInit.autoFill,d=l.defaults.autoFill;if(a||d)d=e.extend({},a,d),!1!==a&&new k(c,d)}});l.AutoFill=k;return l.AutoFill=k});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(c){var h=0;return function(){return h<c.length?{done:!1,value:c[h++]}:{done:!0}}};$jscomp.arrayIterator=function(c){return{next:$jscomp.arrayIteratorImpl(c)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,h,g){if(c==Array.prototype||c==Object.prototype)return c;c[h]=g.value;return c};$jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var h=0;h<c.length;++h){var g=c[h];if(g&&g.Math==Math)return g}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(c,h){var g=$jscomp.propertyToPolyfillSymbol[h];if(null==g)return c[h];g=c[g];return void 0!==g?g:c[h]};
$jscomp.polyfill=function(c,h,g,k){h&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(c,h,g,k):$jscomp.polyfillUnisolated(c,h,g,k))};$jscomp.polyfillUnisolated=function(c,h,g,k){g=$jscomp.global;c=c.split(".");for(k=0;k<c.length-1;k++){var l=c[k];if(!(l in g))return;g=g[l]}c=c[c.length-1];k=g[c];h=h(k);h!=k&&null!=h&&$jscomp.defineProperty(g,c,{configurable:!0,writable:!0,value:h})};
$jscomp.polyfillIsolated=function(c,h,g,k){var l=c.split(".");c=1===l.length;k=l[0];k=!c&&k in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<l.length-1;y++){var r=l[y];if(!(r in k))return;k=k[r]}l=l[l.length-1];g=$jscomp.IS_SYMBOL_NATIVE&&"es6"===g?k[l]:null;h=h(g);null!=h&&(c?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:h}):h!==g&&($jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+l,l=
$jscomp.propertyToPolyfillSymbol[l],$jscomp.defineProperty(k,l,{configurable:!0,writable:!0,value:h})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(c){if(c)return c;var h=function(l,y){this.$jscomp$symbol$id_=l;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:y})};h.prototype.toString=function(){return this.$jscomp$symbol$id_};var g=0,k=function(l){if(this instanceof k)throw new TypeError("Symbol is not a constructor");return new h("jscomp_symbol_"+(l||"")+"_"+g++,l)};return k},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol.iterator",function(c){if(c)return c;c=Symbol("Symbol.iterator");for(var h="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),g=0;g<h.length;g++){var k=$jscomp.global[h[g]];"function"===typeof k&&"function"!=typeof k.prototype[c]&&$jscomp.defineProperty(k.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return c},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(c){c={next:c};c[Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,h){c instanceof String&&(c+="");var g=0,k={next:function(){if(g<c.length){var l=g++;return{value:h(l,c[l]),done:!1}}k.next=function(){return{done:!0,value:void 0}};return k.next()}};k[Symbol.iterator]=function(){return k};return k};
$jscomp.polyfill("Array.prototype.keys",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(h){return h})}},"es6","es3");
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return c(h,window,document)}):"object"===typeof exports?module.exports=function(h,g){h||(h=window);g&&g.fn.dataTable||(g=require("datatables.net")(h,g).$);return c(g,h,h.document)}:c(jQuery,window,document)})(function(c,h,g,k){var l=c.fn.dataTable,y=0,r=function(a,d){if(!l.versionCheck||!l.versionCheck("1.10.8"))throw"Warning: AutoFill requires DataTables 1.10.8 or greater";this.c=c.extend(!0,{},l.defaults.autoFill,
r.defaults,d);this.s={dt:new l.Api(a),namespace:".autoFill"+y++,scroll:{},scrollInterval:null,handle:{height:0,width:0},enabled:!1};this.dom={handle:c('<div class="dt-autofill-handle"/>'),select:{top:c('<div class="dt-autofill-select top"/>'),right:c('<div class="dt-autofill-select right"/>'),bottom:c('<div class="dt-autofill-select bottom"/>'),left:c('<div class="dt-autofill-select left"/>')},background:c('<div class="dt-autofill-background"/>'),list:c('<div class="dt-autofill-list">'+this.s.dt.i18n("autoFill.info",
"")+"<ul/></div>"),dtScroll:null,offsetParent:null};this._constructor()};c.extend(r.prototype,{enabled:function(){return this.s.enabled},enable:function(a){var d=this;if(!1===a)return this.disable();this.s.enabled=!0;this._focusListener();this.dom.handle.on("mousedown",function(b){d._mousedown(b);return!1});return this},disable:function(){this.s.enabled=!1;this._focusListenerRemove();return this},_constructor:function(){var a=this,d=this.s.dt,b=c("div.dataTables_scrollBody",this.s.dt.table().container());
d.settings()[0].autoFill=this;b.length&&(this.dom.dtScroll=b,"static"===b.css("position")&&b.css("position","relative"));!1!==this.c.enable&&this.enable();d.on("destroy.autoFill",function(){a._focusListenerRemove()})},_attach:function(a){var d=this.s.dt,b=d.cell(a).index(),e=this.dom.handle,f=this.s.handle;b&&-1!==d.columns(this.c.columns).indexes().indexOf(b.column)?(this.dom.offsetParent||(this.dom.offsetParent=c(d.table().node()).offsetParent()),f.height&&f.width||(e.appendTo("body"),f.height=
e.outerHeight(),f.width=e.outerWidth()),d=this._getPosition(a,this.dom.offsetParent),this.dom.attachedTo=a,e.css({top:d.top+a.offsetHeight-f.height,left:d.left+a.offsetWidth-f.width}).appendTo(this.dom.offsetParent)):this._detach()},_actionSelector:function(a){var d=this,b=this.s.dt,e=r.actions,f=[];c.each(e,function(p,q){q.available(b,a)&&f.push(p)});if(1===f.length&&!1===this.c.alwaysAsk){var m=e[f[0]].execute(b,a);this._update(m,a)}else if(1<f.length){var n=this.dom.list.children("ul").empty();
f.push("cancel");c.each(f,function(p,q){n.append(c("<li/>").append('<div class="dt-autofill-question">'+e[q].option(b,a)+"<div>").append(c('<div class="dt-autofill-button">').append(c('<button class="'+r.classes.btn+'">'+b.i18n("autoFill.button","&gt;")+"</button>").on("click",function(){var v=e[q].execute(b,a,c(this).closest("li"));d._update(v,a);d.dom.background.remove();d.dom.list.remove()}))))});this.dom.background.appendTo("body");this.dom.list.appendTo("body");this.dom.list.css("margin-top",
this.dom.list.outerHeight()/2*-1)}},_detach:function(){this.dom.attachedTo=null;this.dom.handle.detach()},_drawSelection:function(a,d){var b=this.s.dt;d=this.s.start;var e=c(this.dom.start),f={row:this.c.vertical?b.rows({page:"current"}).nodes().indexOf(a.parentNode):d.row,column:this.c.horizontal?c(a).index():d.column};a=b.column.index("toData",f.column);var m=b.row(":eq("+f.row+")",{page:"current"});m=c(b.cell(m.index(),a).node());if(b.cell(m).any()&&-1!==b.columns(this.c.columns).indexes().indexOf(a)){this.s.end=
f;b=d.row<f.row?e:m;var n=d.row<f.row?m:e;a=d.column<f.column?e:m;e=d.column<f.column?m:e;b=this._getPosition(b.get(0)).top;a=this._getPosition(a.get(0)).left;d=this._getPosition(n.get(0)).top+n.outerHeight()-b;e=this._getPosition(e.get(0)).left+e.outerWidth()-a;f=this.dom.select;f.top.css({top:b,left:a,width:e});f.left.css({top:b,left:a,height:d});f.bottom.css({top:b+d,left:a,width:e});f.right.css({top:b,left:a+e,height:d})}},_editor:function(a){var d=this.s.dt,b=this.c.editor;if(b){for(var e={},
f=[],m=b.fields(),n=0,p=a.length;n<p;n++)for(var q=0,v=a[n].length;q<v;q++){var u=a[n][q],w=d.settings()[0].aoColumns[u.index.column],t=w.editField;if(t===k){w=w.mData;for(var x=0,z=m.length;x<z;x++){var A=b.field(m[x]);if(A.dataSrc()===w){t=A.name();break}}}if(!t)throw"Could not automatically determine field data. Please see https://datatables.net/tn/11";e[t]||(e[t]={});w=d.row(u.index.row).id();e[t][w]=u.set;f.push(u.index)}b.bubble(f,!1).multiSet(e).submit()}},_emitEvent:function(a,d){this.s.dt.iterator("table",
function(b,e){c(b.nTable).triggerHandler(a+".dt",d)})},_focusListener:function(){var a=this,d=this.s.dt,b=this.s.namespace,e=null!==this.c.focus?this.c.focus:d.init().keys||d.settings()[0].keytable?"focus":"hover";if("focus"===e)d.on("key-focus.autoFill",function(f,m,n){a._attach(n.node())}).on("key-blur.autoFill",function(f,m,n){a._detach()});else if("click"===e)c(d.table().body()).on("click"+b,"td, th",function(f){a._attach(this)}),c(g.body).on("click"+b,function(f){c(f.target).parents().filter(d.table().body()).length||
a._detach()});else c(d.table().body()).on("mouseenter"+b,"td, th",function(f){a._attach(this)}).on("mouseleave"+b,function(f){c(f.relatedTarget).hasClass("dt-autofill-handle")||a._detach()})},_focusListenerRemove:function(){var a=this.s.dt;a.off(".autoFill");c(a.table().body()).off(this.s.namespace);c(g.body).off(this.s.namespace)},_getPosition:function(a,d){var b=0,e=0;d||(d=c(c(this.s.dt.table().node())[0].offsetParent));do{var f=a.offsetTop,m=a.offsetLeft;var n=c(a.offsetParent);b+=f+1*parseInt(n.css("border-top-width")||
0);e+=m+1*parseInt(n.css("border-left-width")||0);if("body"===a.nodeName.toLowerCase())break;a=n.get(0)}while(n.get(0)!==d.get(0));return{top:b,left:e}},_mousedown:function(a){var d=this,b=this.s.dt;this.dom.start=this.dom.attachedTo;this.s.start={row:b.rows({page:"current"}).nodes().indexOf(c(this.dom.start).parent()[0]),column:c(this.dom.start).index()};c(g.body).on("mousemove.autoFill",function(f){d._mousemove(f)}).on("mouseup.autoFill",function(f){d._mouseup(f)});var e=this.dom.select;b=c(b.table().node()).offsetParent();
e.top.appendTo(b);e.left.appendTo(b);e.right.appendTo(b);e.bottom.appendTo(b);this._drawSelection(this.dom.start,a);this.dom.handle.css("display","none");a=this.dom.dtScroll;this.s.scroll={windowHeight:c(h).height(),windowWidth:c(h).width(),dtTop:a?a.offset().top:null,dtLeft:a?a.offset().left:null,dtHeight:a?a.outerHeight():null,dtWidth:a?a.outerWidth():null}},_mousemove:function(a){var d=a.target.nodeName.toLowerCase();if("td"===d||"th"===d)this._drawSelection(a.target,a),this._shiftScroll(a)},_mouseup:function(a){c(g.body).off(".autoFill");
var d=this,b=this.s.dt,e=this.dom.select;e.top.remove();e.left.remove();e.right.remove();e.bottom.remove();this.dom.handle.css("display","block");e=this.s.start;var f=this.s.end;if(e.row!==f.row||e.column!==f.column){var m=b.cell(":eq("+e.row+")",e.column+":visible",{page:"current"});if(c("div.DTE",m.node()).length){var n=b.editor();n.on("submitSuccess.dtaf close.dtaf",function(){n.off(".dtaf");setTimeout(function(){d._mouseup(a)},100)}).on("submitComplete.dtaf preSubmitCancelled.dtaf close.dtaf",
function(){n.off(".dtaf")});n.submit()}else{var p=this._range(e.row,f.row);e=this._range(e.column,f.column);f=[];for(var q=b.settings()[0],v=q.aoColumns,u=b.columns(this.c.columns).indexes(),w=0;w<p.length;w++)f.push(c.map(e,function(t){var x=b.row(":eq("+p[w]+")",{page:"current"});t=b.cell(x.index(),t+":visible");x=t.data();var z=t.index(),A=v[z.column].editField;A!==k&&(x=q.oApi._fnGetObjectDataFn(A)(b.row(z.row).data()));if(-1!==u.indexOf(z.column))return{cell:t,data:x,label:t.data(),index:z}}));
this._actionSelector(f);clearInterval(this.s.scrollInterval);this.s.scrollInterval=null}}},_range:function(a,d){var b=[];if(a<=d)for(;a<=d;a++)b.push(a);else for(;a>=d;a--)b.push(a);return b},_shiftScroll:function(a){var d=this,b=this.s.scroll,e=!1,f=a.pageY-g.body.scrollTop,m=a.pageX-g.body.scrollLeft,n,p,q,v;65>f?n=-5:f>b.windowHeight-65&&(n=5);65>m?p=-5:m>b.windowWidth-65&&(p=5);null!==b.dtTop&&a.pageY<b.dtTop+65?q=-5:null!==b.dtTop&&a.pageY>b.dtTop+b.dtHeight-65&&(q=5);null!==b.dtLeft&&a.pageX<
b.dtLeft+65?v=-5:null!==b.dtLeft&&a.pageX>b.dtLeft+b.dtWidth-65&&(v=5);n||p||q||v?(b.windowVert=n,b.windowHoriz=p,b.dtVert=q,b.dtHoriz=v,e=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null);!this.s.scrollInterval&&e&&(this.s.scrollInterval=setInterval(function(){b.windowVert&&(g.body.scrollTop+=b.windowVert);b.windowHoriz&&(g.body.scrollLeft+=b.windowHoriz);if(b.dtVert||b.dtHoriz){var u=d.dom.dtScroll[0];b.dtVert&&(u.scrollTop+=b.dtVert);b.dtHoriz&&(u.scrollLeft+=
b.dtHoriz)}},20))},_update:function(a,d){if(!1!==a){a=this.s.dt;var b=a.columns(this.c.columns).indexes();this._emitEvent("preAutoFill",[a,d]);this._editor(d);if(null!==this.c.update?this.c.update:!this.c.editor){for(var e=0,f=d.length;e<f;e++)for(var m=0,n=d[e].length;m<n;m++){var p=d[e][m];-1!==b.indexOf(p.index.column)&&p.cell.data(p.set)}a.draw(!1)}this._emitEvent("autoFill",[a,d])}}});r.actions={increment:{available:function(a,d){a=d[0][0].label;return!isNaN(a-parseFloat(a))},option:function(a,
d){return a.i18n("autoFill.increment",'Increment / decrement each cell by: <input type="number" value="1">')},execute:function(a,d,b){a=1*d[0][0].data;b=1*c("input",b).val();for(var e=0,f=d.length;e<f;e++)for(var m=0,n=d[e].length;m<n;m++)d[e][m].set=a,a+=b}},fill:{available:function(a,d){return!0},option:function(a,d){return a.i18n("autoFill.fill","Fill all cells with <i>%d</i>",d[0][0].label)},execute:function(a,d,b){a=d[0][0].data;b=0;for(var e=d.length;b<e;b++)for(var f=0,m=d[b].length;f<m;f++)d[b][f].set=
a}},fillHorizontal:{available:function(a,d){return 1<d.length&&1<d[0].length},option:function(a,d){return a.i18n("autoFill.fillHorizontal","Fill cells horizontally")},execute:function(a,d,b){a=0;for(b=d.length;a<b;a++)for(var e=0,f=d[a].length;e<f;e++)d[a][e].set=d[a][0].data}},fillVertical:{available:function(a,d){return 1<d.length},option:function(a,d){return a.i18n("autoFill.fillVertical","Fill cells vertically")},execute:function(a,d,b){a=0;for(b=d.length;a<b;a++)for(var e=0,f=d[a].length;e<f;e++)d[a][e].set=
d[0][e].data}},cancel:{available:function(){return!1},option:function(a){return a.i18n("autoFill.cancel","Cancel")},execute:function(){return!1}}};r.version="2.3.9";r.defaults={alwaysAsk:!1,focus:null,columns:"",enable:!0,update:null,editor:null,vertical:!0,horizontal:!0};r.classes={btn:"btn"};var B=c.fn.dataTable.Api;B.register("autoFill()",function(){return this});B.register("autoFill().enabled()",function(){var a=this.context[0];return a.autoFill?a.autoFill.enabled():!1});B.register("autoFill().enable()",
function(a){return this.iterator("table",function(d){d.autoFill&&d.autoFill.enable(a)})});B.register("autoFill().disable()",function(){return this.iterator("table",function(a){a.autoFill&&a.autoFill.disable()})});c(g).on("preInit.dt.autofill",function(a,d,b){"dt"===a.namespace&&(a=d.oInit.autoFill,b=l.defaults.autoFill,a||b)&&(b=c.extend({},a,b),!1!==a&&new r(d,b))});l.AutoFill=r;return l.AutoFill=r});

View file

@ -1,4 +1,85 @@
@charset "UTF-8";
td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;
cursor: pointer;
}
tr.dt-hasChild td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center;
}
table.dataTable th.dt-left,
table.dataTable td.dt-left {
text-align: left;
}
table.dataTable th.dt-center,
table.dataTable td.dt-center,
table.dataTable td.dataTables_empty {
text-align: center;
}
table.dataTable th.dt-right,
table.dataTable td.dt-right {
text-align: right;
}
table.dataTable th.dt-justify,
table.dataTable td.dt-justify {
text-align: justify;
}
table.dataTable th.dt-nowrap,
table.dataTable td.dt-nowrap {
white-space: nowrap;
}
table.dataTable thead th.dt-head-left,
table.dataTable thead td.dt-head-left,
table.dataTable tfoot th.dt-head-left,
table.dataTable tfoot td.dt-head-left {
text-align: left;
}
table.dataTable thead th.dt-head-center,
table.dataTable thead td.dt-head-center,
table.dataTable tfoot th.dt-head-center,
table.dataTable tfoot td.dt-head-center {
text-align: center;
}
table.dataTable thead th.dt-head-right,
table.dataTable thead td.dt-head-right,
table.dataTable tfoot th.dt-head-right,
table.dataTable tfoot td.dt-head-right {
text-align: right;
}
table.dataTable thead th.dt-head-justify,
table.dataTable thead td.dt-head-justify,
table.dataTable tfoot th.dt-head-justify,
table.dataTable tfoot td.dt-head-justify {
text-align: justify;
}
table.dataTable thead th.dt-head-nowrap,
table.dataTable thead td.dt-head-nowrap,
table.dataTable tfoot th.dt-head-nowrap,
table.dataTable tfoot td.dt-head-nowrap {
white-space: nowrap;
}
table.dataTable tbody th.dt-body-left,
table.dataTable tbody td.dt-body-left {
text-align: left;
}
table.dataTable tbody th.dt-body-center,
table.dataTable tbody td.dt-body-center {
text-align: center;
}
table.dataTable tbody th.dt-body-right,
table.dataTable tbody td.dt-body-right {
text-align: right;
}
table.dataTable tbody th.dt-body-justify,
table.dataTable tbody td.dt-body-justify {
text-align: justify;
}
table.dataTable tbody th.dt-body-nowrap,
table.dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
table.dataTable {
clear: both;
margin-top: 6px !important;
@ -126,21 +207,21 @@ div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table {
div.dataTables_scrollBody > table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table thead .sorting:before,
div.dataTables_scrollBody table thead .sorting_asc:before,
div.dataTables_scrollBody table thead .sorting_desc:before,
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
div.dataTables_scrollBody > table > thead .sorting:before,
div.dataTables_scrollBody > table > thead .sorting_asc:before,
div.dataTables_scrollBody > table > thead .sorting_desc:before,
div.dataTables_scrollBody > table > thead .sorting:after,
div.dataTables_scrollBody > table > thead .sorting_asc:after,
div.dataTables_scrollBody > table > thead .sorting_desc:after {
display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
div.dataTables_scrollBody > table > tbody tr:first-child th,
div.dataTables_scrollBody > table > tbody tr:first-child td {
border-top: none;
}

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,13 @@
DataTables Bootstrap 4 integration
©2011-2017 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d,m){var f=c.fn.dataTable;c.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
renderer:"bootstrap"});c.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,b,m=function(a){a.preventDefault();
!c(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l<h;l++)if(b=f[l],Array.isArray(b))q(d,b);else{g=e="";switch(b){case "ellipsis":e="&#x2026;";g="disabled";break;case "first":e=k.sFirst;g=b+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=b+(0<j?"":" disabled");break;case "next":e=k.sNext;g=b+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=b+(j<n-1?"":" disabled");break;default:e=b+1,g=j===b?"active":""}e&&(i=c("<li>",
{"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof b?a.sTableId+"_"+b:null}).append(c("<a>",{href:"#","aria-controls":a.sTableId,"aria-label":u[b],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:b},m),p++)}},i;try{i=c(h).find(d.activeElement).data("dt-idx")}catch(v){}q(c(h).empty().html('<ul class="pagination"/>').children("ul"),s);i!==m&&c(h).find("[data-dt-idx="+i+"]").trigger("focus")};return f});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};
$jscomp.polyfill=function(a,b,c,e){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,e):$jscomp.polyfillUnisolated(a,b,c,e))};$jscomp.polyfillUnisolated=function(a,b,c,e){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];if(!(d in c))return;c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var l=d[f];if(!(l in e))return;e=e[l]}d=d[d.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d=
$jscomp.propertyToPolyfillSymbol[d],$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3");
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net")(b,c).$);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,e){var d=a.fn.dataTable;a.extend(!0,d.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
renderer:"bootstrap"});a.extend(d.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});d.ext.renderer.pageButton.bootstrap=function(f,l,A,B,m,t){var u=new d.Api(f),C=f.oClasses,n=f.oLanguage.oPaginate,D=f.oLanguage.oAria.paginate||{},h,k,v=0,y=function(q,w){var x,E=function(p){p.preventDefault();
a(p.currentTarget).hasClass("disabled")||u.page()==p.data.action||u.page(p.data.action).draw("page")};var r=0;for(x=w.length;r<x;r++){var g=w[r];if(Array.isArray(g))y(q,g);else{k=h="";switch(g){case "ellipsis":h="&#x2026;";k="disabled";break;case "first":h=n.sFirst;k=g+(0<m?"":" disabled");break;case "previous":h=n.sPrevious;k=g+(0<m?"":" disabled");break;case "next":h=n.sNext;k=g+(m<t-1?"":" disabled");break;case "last":h=n.sLast;k=g+(m<t-1?"":" disabled");break;default:h=g+1,k=m===g?"active":""}if(h){var F=
a("<li>",{"class":C.sPageButton+" "+k,id:0===A&&"string"===typeof g?f.sTableId+"_"+g:null}).append(a("<a>",{href:"#","aria-controls":f.sTableId,"aria-label":D[g],"data-dt-idx":v,tabindex:f.iTabIndex,"class":"page-link"}).html(h)).appendTo(q);f.oApi._fnBindAction(F,{action:g},E);v++}}}};try{var z=a(l).find(c.activeElement).data("dt-idx")}catch(q){}y(a(l).empty().html('<ul class="pagination"/>').children("ul"),B);z!==e&&a(l).find("[data-dt-idx="+z+"]").trigger("focus")};return d});

View file

@ -962,7 +962,7 @@ DataTable.ext.buttons.csvHtml5 = {
}
if ( config.bom ) {
output = '\ufeff' + output;
output = String.fromCharCode(0xFEFF) + output;
}
_saveAs(

View file

@ -16,7 +16,7 @@ K=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d
g.messageTop+k+k+i);g.messageBottom&&(i=i+k+k+g.messageBottom);b.customize&&(i=b.customize(i,b,c));b=h("<textarea readonly/>").val(i).appendTo(d);if(j.queryCommandSupported("copy")){d.appendTo(c.table().container());b[0].focus();b[0].select();try{var f=j.execCommand("copy");d.remove();if(f){c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),c.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2E3);this.processing(!1);return}}catch(l){}}f=
h("<span>"+c.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(d);c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),f,0);b[0].focus();b[0].select();var o=h(f).closest(".dt-button-info"),n=function(){o.off("click.buttons-copy");h(j).off(".buttons-copy");c.buttons.info(!1)};o.on("click.buttons-copy",n);h(j).on("keydown.buttons-copy",function(a){27===
a.keyCode&&(n(),e.processing(!1))}).on("copy.buttons-copy cut.buttons-copy",function(){n();e.processing(!1)})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*"};p.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return f.FileReader!==r&&f.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,c,d,b){this.processing(!0);var a=I(c,b).str,d=c.buttons.exportInfo(b),e=b.charset;
b.customize&&(a=b.customize(a,b,c));!1!==e?(e||(e=j.characterSet||j.charset),e&&(e=";charset="+e)):e="";b.bom&&(a=""+a);u(new Blob([a],{type:"text/csv"+e}),d.filename,!0);this.processing(!1)},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};p.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return f.FileReader!==r&&(v||f.JSZip)!==r&&!J()&&z},text:function(a){return a.i18n("buttons.excel",
b.customize&&(a=b.customize(a,b,c));!1!==e?(e||(e=j.characterSet||j.charset),e&&(e=";charset="+e)):e="";b.bom&&(a=String.fromCharCode(65279)+a);u(new Blob([a],{type:"text/csv"+e}),d.filename,!0);this.processing(!1)},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};p.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return f.FileReader!==r&&(v||f.JSZip)!==r&&!J()&&z},text:function(a){return a.i18n("buttons.excel",
"Excel")},action:function(a,c,d,b){this.processing(!0);var e=this,g=0,k,a=function(a){return h.parseXML(B[a])},i=a("xl/worksheets/sheet1.xml"),l=i.getElementsByTagName("sheetData")[0],a={_rels:{".rels":a("_rels/.rels")},xl:{_rels:{"workbook.xml.rels":a("xl/_rels/workbook.xml.rels")},"workbook.xml":a("xl/workbook.xml"),"styles.xml":a("xl/styles.xml"),worksheets:{"sheet1.xml":i}},"[Content_Types].xml":a("[Content_Types].xml")},j=c.buttons.exportData(b.exportOptions),n,p,m=function(a){n=g+1;p=o(i,"row",
{attr:{r:n}});for(var c=0,d=a.length;c<d;c++){var e=w(c)+""+n,f=null;if(null===a[c]||a[c]===r||""===a[c])if(!0===b.createEmptyCells)a[c]="";else continue;var h=a[c];a[c]="function"===typeof a[c].trim?a[c].trim():a[c];for(var j=0,k=K.length;j<k;j++){var m=K[j];if(a[c].match&&!a[c].match(/^0\d+/)&&a[c].match(m.match)){f=a[c].replace(/[^\d\.\-]/g,"");m.fmt&&(f=m.fmt(f));f=o(i,"c",{attr:{r:e,s:m.style},children:[o(i,"v",{text:f})]});break}}f||("number"===typeof a[c]||a[c].match&&a[c].match(/^-?\d+(\.\d+)?$/)&&
!a[c].match(/^0\d+/)?f=o(i,"c",{attr:{t:"n",r:e},children:[o(i,"v",{text:a[c]})]}):(h=!h.replace?h:h.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""),f=o(i,"c",{attr:{t:"inlineStr",r:e},children:{row:o(i,"is",{children:{row:o(i,"t",{text:h,attr:{"xml:space":"preserve"}})}})}})));p.appendChild(f)}l.appendChild(p);g++};b.customizeData&&b.customizeData(j);var s=function(a,c){var b=h("mergeCells",i);b[0].appendChild(o(i,"mergeCell",{attr:{ref:"A"+a+":"+w(c)+a}}));b.attr("count",parseFloat(b.attr("count"))+

View file

@ -137,6 +137,17 @@ DataTable.ext.buttons.print = {
// Open a new window for the printable table
var win = window.open( '', '' );
if (! win) {
dt.buttons.info(
dt.i18n( 'buttons.printErrorTitle', 'Unable to open print view' ),
dt.i18n( 'buttons.printErrorMsg', 'Please allow popups in your browser for this site to be able to view the print view.' ),
5000
);
return;
}
win.document.close();
// Inject the title and also a copy of the style and link tags from this

View file

@ -1,5 +1,5 @@
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return e(f,window,document)}):"object"===typeof exports?module.exports=function(f,a){f||(f=window);if(!a||!a.fn.dataTable)a=require("datatables.net")(f,a).$;a.fn.dataTable.Buttons||require("datatables.net-buttons")(f,a);return e(a,f,f.document)}:e(jQuery,window,document)})(function(e,f,a,n){var i=e.fn.dataTable,c=a.createElement("a"),m=function(b){c.href=b;b=c.host;-1===b.indexOf("/")&&
0!==c.pathname.indexOf("/")&&(b+="/");return c.protocol+"//"+b+c.pathname+c.search};i.ext.buttons.print={className:"buttons-print",text:function(b){return b.i18n("buttons.print","Print")},action:function(b,a,c,h){var b=a.buttons.exportData(e.extend({decodeEntities:!1},h.exportOptions)),c=a.buttons.exportInfo(h),i=a.columns(h.exportOptions.columns).flatten().map(function(b){return a.settings()[0].aoColumns[a.column(b).index()].sClass}).toArray(),k=function(b,a){for(var d="<tr>",c=0,e=b.length;c<e;c++)d+=
"<"+a+" "+(i[c]?'class="'+i[c]+'"':"")+">"+(null===b[c]||b[c]===n?"":b[c])+"</"+a+">";return d+"</tr>"},d='<table class="'+a.table().node().className+'">';h.header&&(d+="<thead>"+k(b.header,"th")+"</thead>");for(var d=d+"<tbody>",l=0,o=b.body.length;l<o;l++)d+=k(b.body[l],"td");d+="</tbody>";h.footer&&b.footer&&(d+="<tfoot>"+k(b.footer,"th")+"</tfoot>");var d=d+"</table>",g=f.open("","");g.document.close();var j="<title>"+c.title+"</title>";e("style, link").each(function(){var b=j,a=e(this).clone()[0];
"link"===a.nodeName.toLowerCase()&&(a.href=m(a.href));j=b+a.outerHTML});try{g.document.head.innerHTML=j}catch(p){e(g.document.head).html(j)}g.document.body.innerHTML="<h1>"+c.title+"</h1><div>"+(c.messageTop||"")+"</div>"+d+"<div>"+(c.messageBottom||"")+"</div>";e(g.document.body).addClass("dt-print-view");e("img",g.document.body).each(function(b,a){a.setAttribute("src",m(a.getAttribute("src")))});h.customize&&h.customize(g,h,a);b=function(){h.autoPrint&&(g.print(),g.close())};navigator.userAgent.match(/Trident\/\d.\d/)?
b():g.setTimeout(b,1E3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};return i.Buttons});
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return c(f,window,document)}):"object"===typeof exports?module.exports=function(f,b){f||(f=window);if(!b||!b.fn.dataTable)b=require("datatables.net")(f,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(f,b);return c(b,f,f.document)}:c(jQuery,window,document)})(function(c,f,b,o){var j=c.fn.dataTable,h=b.createElement("a"),n=function(a){h.href=a;a=h.host;-1===a.indexOf("/")&&
0!==h.pathname.indexOf("/")&&(a+="/");return h.protocol+"//"+a+h.pathname+h.search};j.ext.buttons.print={className:"buttons-print",text:function(a){return a.i18n("buttons.print","Print")},action:function(a,g,b,i){var a=g.buttons.exportData(c.extend({decodeEntities:!1},i.exportOptions)),b=g.buttons.exportInfo(i),h=g.columns(i.exportOptions.columns).flatten().map(function(a){return g.settings()[0].aoColumns[g.column(a).index()].sClass}).toArray(),l=function(a,b){for(var d="<tr>",c=0,e=a.length;c<e;c++)d+=
"<"+b+" "+(h[c]?'class="'+h[c]+'"':"")+">"+(null===a[c]||a[c]===o?"":a[c])+"</"+b+">";return d+"</tr>"},d='<table class="'+g.table().node().className+'">';i.header&&(d+="<thead>"+l(a.header,"th")+"</thead>");for(var d=d+"<tbody>",m=0,j=a.body.length;m<j;m++)d+=l(a.body[m],"td");d+="</tbody>";i.footer&&a.footer&&(d+="<tfoot>"+l(a.footer,"th")+"</tfoot>");var d=d+"</table>",e=f.open("","");if(e){e.document.close();var k="<title>"+b.title+"</title>";c("style, link").each(function(){var a=k,b=c(this).clone()[0];
"link"===b.nodeName.toLowerCase()&&(b.href=n(b.href));k=a+b.outerHTML});try{e.document.head.innerHTML=k}catch(p){c(e.document.head).html(k)}e.document.body.innerHTML="<h1>"+b.title+"</h1><div>"+(b.messageTop||"")+"</div>"+d+"<div>"+(b.messageBottom||"")+"</div>";c(e.document.body).addClass("dt-print-view");c("img",e.document.body).each(function(a,b){b.setAttribute("src",n(b.getAttribute("src")))});i.customize&&i.customize(e,i,g);a=function(){i.autoPrint&&(e.print(),e.close())};navigator.userAgent.match(/Trident\/\d.\d/)?
a():e.setTimeout(a,1E3)}else g.buttons.info(g.i18n("buttons.printErrorTitle","Unable to open print view"),g.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5E3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};return j.Buttons});

View file

@ -1,4 +1,4 @@
/*! Buttons for DataTables 1.7.0
/*! Buttons for DataTables 1.7.1
* ©2016-2021 SpryMedia Ltd - datatables.net/license
*/
@ -1041,35 +1041,29 @@ $.extend( Buttons.prototype, {
// Align the popover relative to the DataTables container
// Useful for wide popovers such as SearchPanes
if (
position === 'absolute' &&
(
display.hasClass( options.rightAlignClassName ) ||
display.hasClass( options.leftAlignClassName ) ||
options.align === 'dt-container'
)
) {
if (position === 'absolute') {
// Align relative to the host button
var hostPosition = hostNode.position();
var buttonPosition = $(hostButton.node()).position();
display.css( {
top: hostPosition.top + hostNode.outerHeight(),
top: buttonPosition.top + hostNode.outerHeight(),
left: hostPosition.left
} );
// calculate overflow when positioned beneath
var collectionHeight = display.outerHeight();
var tableBottom = tableContainer.offset().top + tableContainer.height();
var listBottom = hostPosition.top + hostNode.outerHeight() + collectionHeight;
var listBottom = buttonPosition.top + hostNode.outerHeight() + collectionHeight;
var bottomOverflow = listBottom - tableBottom;
// calculate overflow when positioned above
var listTop = hostPosition.top - collectionHeight;
var listTop = buttonPosition.top - collectionHeight;
var tableTop = tableContainer.offset().top;
var topOverflow = tableTop - listTop;
// if bottom overflow is larger, move to the top because it fits better, or if dropup is requested
var moveTop = hostPosition.top - collectionHeight - 5;
var moveTop = buttonPosition.top - collectionHeight - 5;
if ( (bottomOverflow > topOverflow || options.dropup) && -moveTop < tableTop ) {
display.css( 'top', moveTop);
}
@ -1088,93 +1082,66 @@ $.extend( Buttons.prototype, {
var buttonsLeft = hostNode.offset().left;
var buttonsWidth = hostNode.outerWidth()
var buttonsRight = buttonsLeft + buttonsWidth;
// You've then got all the numbers you need to do some calculations and if statements,
// so we can do some quick JS maths and apply it only once
// If it has the right align class OR the buttons are right aligned OR the button container is floated right,
// then calculate left position for the popover to align the popover to the right hand
// side of the button - check to see if the left of the popover is inside the table container.
// If not, move the popover so it is, but not more than it means that the popover is to the right of the table container
var popoverShuffle = 0;
if ( display.hasClass( options.rightAlignClassName )) {
popoverShuffle = buttonsRight - popoverRight;
if(tableLeft > (popoverLeft + popoverShuffle)){
var leftGap = tableLeft - (popoverLeft + popoverShuffle);
var rightGap = tableRight - (popoverRight + popoverShuffle);
if (
display.hasClass( options.rightAlignClassName ) ||
display.hasClass( options.leftAlignClassName ) ||
options.align === 'dt-container'
){
// You've then got all the numbers you need to do some calculations and if statements,
// so we can do some quick JS maths and apply it only once
// If it has the right align class OR the buttons are right aligned OR the button container is floated right,
// then calculate left position for the popover to align the popover to the right hand
// side of the button - check to see if the left of the popover is inside the table container.
// If not, move the popover so it is, but not more than it means that the popover is to the right of the table container
var popoverShuffle = 0;
if ( display.hasClass( options.rightAlignClassName )) {
popoverShuffle = buttonsRight - popoverRight;
if(tableLeft > (popoverLeft + popoverShuffle)){
var leftGap = tableLeft - (popoverLeft + popoverShuffle);
var rightGap = tableRight - (popoverRight + popoverShuffle);
if(leftGap > rightGap){
popoverShuffle += rightGap;
}
else {
popoverShuffle += leftGap;
}
}
}
// else attempt to left align the popover to the button. Similar to above, if the popover's right goes past the table container's right,
// then move it back, but not so much that it goes past the left of the table container
else {
popoverShuffle = tableLeft - popoverLeft;
if(tableRight < (popoverRight + popoverShuffle)){
var leftGap = tableLeft - (popoverLeft + popoverShuffle);
var rightGap = tableRight - (popoverRight + popoverShuffle);
if(leftGap > rightGap ){
popoverShuffle += rightGap;
}
else {
popoverShuffle += leftGap;
}
if(leftGap > rightGap){
popoverShuffle += rightGap;
}
else {
popoverShuffle += leftGap;
}
}
display.css('left', display.position().left + popoverShuffle);
}
// else attempt to left align the popover to the button. Similar to above, if the popover's right goes past the table container's right,
// then move it back, but not so much that it goes past the left of the table container
else {
popoverShuffle = tableLeft - popoverLeft;
var top = hostNode.offset().top
var popoverShuffle = 0;
if(tableRight < (popoverRight + popoverShuffle)){
var leftGap = tableLeft - (popoverLeft + popoverShuffle);
var rightGap = tableRight - (popoverRight + popoverShuffle);
popoverShuffle = options.align === 'button-right'
? buttonsRight - popoverRight
: buttonsLeft - popoverLeft;
if(leftGap > rightGap ){
popoverShuffle += rightGap;
}
else {
popoverShuffle += leftGap;
}
}
display.css('left', display.position().left + popoverShuffle);
}
display.css('left', display.position().left + popoverShuffle);
}
else if (position === 'absolute') {
// Align relative to the host button
var hostPosition = hostNode.position();
display.css( {
top: hostPosition.top + hostNode.outerHeight(),
left: hostPosition.left
} );
// calculate overflow when positioned beneath
var collectionHeight = display.outerHeight();
var top = hostNode.offset().top
var popoverShuffle = 0;
// Get the size of the host buttons (left and width - and ...)
var buttonsLeft = hostNode.offset().left;
var buttonsWidth = hostNode.outerWidth()
var buttonsRight = buttonsLeft + buttonsWidth;
// Get the size of the popover (left and width - and ...)
var popoverLeft = display.offset().left;
var popoverWidth = content.width();
var popoverRight = popoverLeft + popoverWidth;
var moveTop = hostPosition.top - collectionHeight - 5;
var tableBottom = tableContainer.offset().top + tableContainer.height();
var listBottom = hostPosition.top + hostNode.outerHeight() + collectionHeight;
var bottomOverflow = listBottom - tableBottom;
// calculate overflow when positioned above
var listTop = hostPosition.top - collectionHeight;
var tableTop = tableContainer.offset().top;
var topOverflow = tableTop - listTop;
if ( (bottomOverflow > topOverflow || options.dropup) && -moveTop < tableTop ) {
display.css( 'top', moveTop);
}
popoverShuffle = options.align === 'button-right'
? buttonsRight - popoverRight
: buttonsLeft - popoverLeft;
display.css('left', display.position().left + popoverShuffle);
}
else {
// Fix position - centre on screen
@ -1479,19 +1446,19 @@ Buttons.stripData = function ( str, config ) {
// Always remove comments
str = str.replace( /<!\-\-.*?\-\->/g, '' );
if ( config.stripHtml ) {
if ( ! config || config.stripHtml ) {
str = str.replace( /<[^>]*>/g, '' );
}
if ( config.trim ) {
if ( ! config || config.trim ) {
str = str.replace( /^\s+|\s+$/g, '' );
}
if ( config.stripNewlines ) {
if ( ! config || config.stripNewlines ) {
str = str.replace( /\n/g, ' ' );
}
if ( config.decodeEntities ) {
if ( ! config || config.decodeEntities ) {
_exportTextarea.innerHTML = str;
str = _exportTextarea.value;
}
@ -1537,7 +1504,7 @@ Buttons.defaults = {
* @type {string}
* @static
*/
Buttons.version = '1.7.0';
Buttons.version = '1.7.1';
$.extend( _dtButtons, {

View file

@ -1,44 +1,43 @@
/*!
Buttons for DataTables 1.7.0
Buttons for DataTables 1.7.1
©2016-2021 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(r){return e(r,window,document)}):"object"===typeof exports?module.exports=function(r,q){r||(r=window);if(!q||!q.fn.dataTable)q=require("datatables.net")(r,q).$;return e(q,r,r.document)}:e(jQuery,window,document)})(function(e,r,q,m){function w(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function x(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&
c.call(a))}function z(a,b){var c=new i.Api(a),d=b?b:c.init().buttons||i.defaults.buttons;return(new n(c,d)).container()}var i=e.fn.dataTable,C=0,D=0,p=i.ext.buttons,n=function(a,b){if(!(this instanceof n))return function(b){return(new n(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},n.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new i.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+C++};this.dom={container:e("<"+
this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(n.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===m)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.button.active,c=e(c.node);if(b===m)return c.hasClass(d);c.toggleClass(d,b===m?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var d=b.split("-"),e=this.s,c=0,f=d.length-1;c<f;c++)e=
e.buttons[1*d[c]];c=e.buttons;b=1*d[d.length-1]}this._expandButton(c,a,e!==m,b);this._draw();return this},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);e(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){e("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b,c;b=0;for(c=a.length;b<c;b++)this.remove(a[b].node);this.dom.container.remove();a=this.s.dt.settings()[0];b=0;for(c=a.length;b<c;b++)if(a.inst===
this){a.splice(b,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);var c=this._nodeToButton(a);e(c.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return e(a.node)},processing:function(a,b){var c=this.s.dt,d=this._nodeToButton(a);if(b===m)return e(d.node).hasClass("processing");e(d.node).toggleClass("processing",b);e(c.table().node()).triggerHandler("buttons-processing.dt",
[b,c.button(a),c,e(a),d.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),d=this.s.dt;if(b.buttons.length)for(var g=b.buttons.length-1;0<=g;g--)this.remove(b.buttons[g].node);b.conf.destroy&&b.conf.destroy.call(d.button(a),d,e(a),b.conf);this._removeKey(b.conf);e(b.node).remove();a=e.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.collection.buttonLiner,d=c.inCollection&&d&&d.tag?d.tag:this.c.dom.buttonLiner.tag,
g=this.s.dt,f=e(c.node),h=function(a){return"function"===typeof a?a(g,f,c.conf):a};if(b===m)return h(c.conf.text);c.conf.text=b;d?f.children(d).html(h(b)):f.html(h(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],d=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var g=0,f=d.length;g<f;g++)this.add(d[g]);b.on("destroy",function(b,d){d===c&&a.destroy()});e("body").on("keyup."+this.s.namespace,function(b){if(!q.activeElement||
q.activeElement===q.body){var c=String.fromCharCode(b.keyCode).toLowerCase();a.s.listenKeys.toLowerCase().indexOf(c)!==-1&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=e.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,d=b.length;c<d;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,d){for(var g=
this.s.dt,f=0,b=!Array.isArray(b)?[b]:b,h=0,k=b.length;h<k;h++){var l=this._resolveExtends(b[h]);if(l)if(Array.isArray(l))this._expandButton(a,l,c,d);else{var j=this._buildButton(l,c);j&&(d!==m&&null!==d?(a.splice(d,0,j),d++):a.push(j),j.conf.buttons&&(j.collection=e("<"+this.c.dom.collection.tag+"/>"),j.conf._collection=j.collection,this._expandButton(j.buttons,j.conf.buttons,!0,d)),l.init&&l.init.call(g.button(j.node),g,e(j.node),l),f++)}}},_buildButton:function(a,b){var c=this.c.dom.button,d=this.c.dom.buttonLiner,
g=this.c.dom.collection,f=this.s.dt,h=function(b){return"function"===typeof b?b(f,j,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(d=g.buttonLiner);if(a.available&&!a.available(f,a))return!1;var k=function(a,b,c,d){d.action.call(b.button(c),a,b,c,d);e(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,d])},g=a.tag||c.tag,l=a.clickBlurs===m?!0:a.clickBlurs,j=e("<"+g+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",
function(b){b.preventDefault();!j.hasClass(c.disabled)&&a.action&&k(b,f,j,a);l&&j.trigger("blur")}).on("keyup.dtb",function(b){b.keyCode===13&&!j.hasClass(c.disabled)&&a.action&&k(b,f,j,a)});"a"===g.toLowerCase()&&j.attr("href","#");"button"===g.toLowerCase()&&j.attr("type","button");d.tag?(g=e("<"+d.tag+"/>").html(h(a.text)).addClass(d.className),"a"===d.tag.toLowerCase()&&g.attr("href","#"),j.append(g)):j.html(h(a.text));!1===a.enabled&&j.addClass(c.disabled);a.className&&j.addClass(a.className);
a.titleAttr&&j.attr("title",h(a.titleAttr));a.attr&&j.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+D++);d=(d=this.c.dom.buttonContainer)&&d.tag?e("<"+d.tag+"/>").addClass(d.className).append(j):j;this._addKey(a);this.c.buttonCreated&&(d=this.c.buttonCreated(a,d));return{conf:a,node:j.get(0),inserter:d,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var e=this._nodeToButton(a,
b[c].buttons);if(e)return e}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var e=this._nodeToHost(a,b[c].buttons);if(e)return e}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(d){for(var g=0,f=d.length;g<f;g++){var h=d[g].conf,k=d[g].node;if(h.key)if(h.key===a)b._buttonsHandled=!0,e(k).click();else if(e.isPlainObject(h.key)&&h.key.key===a&&(!h.key.shiftKey||b.shiftKey))if(!h.key.altKey||b.altKey)if(!h.key.ctrlKey||
b.ctrlKey)if(!h.key.metaKey||b.metaKey)b._buttonsHandled=!0,e(k).click();d[g].buttons.length&&c(d[g].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=e.isPlainObject(a.key)?a.key.key:a.key,a=this.s.listenKeys.split(""),b=e.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){for(var b=this.s.dt,c,d,g=function(c){for(var d=0;!e.isPlainObject(c)&&!Array.isArray(c);){if(c===m)return;if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"===
typeof c){if(!p[c])throw"Unknown button type: "+c;c=p[c]}d++;if(30<d)throw"Buttons: Too many iterations";}return Array.isArray(c)?c:e.extend({},c)},a=g(a);a&&a.extend;){if(!p[a.extend])throw"Cannot extend unknown button type: "+a.extend;var f=g(p[a.extend]);if(Array.isArray(f))return f;if(!f)return!1;c=f.className;a=e.extend({},f,a);c&&a.className!==c&&(a.className=c+" "+a.className);var h=a.postfixButtons;if(h){a.buttons||(a.buttons=[]);c=0;for(d=h.length;c<d;c++)a.buttons.push(h[c]);a.postfixButtons=
null}if(h=a.prefixButtons){a.buttons||(a.buttons=[]);c=0;for(d=h.length;c<d;c++)a.buttons.splice(c,0,h[c]);a.prefixButtons=null}a.extend=f.extend}return a},_popover:function(a,b,c){var d=this.c,g=e.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:d.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,rightAlignClassName:"dt-button-right",tag:d.dom.collection.tag},c),f=b.node(),h=function(){x(e(".dt-button-collection"),
g.fade,function(){e(this).detach()});e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");e("div.dt-button-background").off("click.dtb-collection");n.background(!1,g.backgroundClassName,g.fade,f);e("body").off(".dtb-collection");b.off("buttons-action.b-internal")};!1===a&&h();c=e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());c.length&&(f=c.eq(0),h());c=e("<div/>").addClass("dt-button-collection").addClass(g.collectionLayout).css("display",
"none");a=e(a).addClass(g.contentClassName).attr("role","menu").appendTo(c);f.attr("aria-expanded","true");f.parents("body")[0]!==q.body&&(f=q.body.lastChild);g.collectionTitle&&c.prepend('<div class="dt-button-collection-title">'+g.collectionTitle+"</div>");w(c.insertAfter(f),g.fade);var d=e(b.table().container()),k=c.css("position");"dt-container"===g.align&&(f=f.parent(),c.css("width",d.width()));if("absolute"===k&&(c.hasClass(g.rightAlignClassName)||c.hasClass(g.leftAlignClassName)||"dt-container"===
g.align)){var l=f.position();c.css({top:l.top+f.outerHeight(),left:l.left});var j=c.outerHeight(),i=d.offset().top+d.height(),t=l.top+f.outerHeight()+j,i=t-i,t=l.top-j,m=d.offset().top,u=l.top-j-5;(i>m-t||g.dropup)&&-u<m&&c.css("top",u);var l=d.offset().left,d=d.width(),d=l+d,k=c.offset().left,s=c.width(),s=k+s,o=f.offset().left,p=f.outerWidth(),p=o+p,o=0;c.hasClass(g.rightAlignClassName)?(o=p-s,l>k+o&&(k=l-(k+o),d-=s+o,o=k>d?o+d:o+k)):(o=l-k,d<s+o&&(k=l-(k+o),d-=s+o,o=k>d?o+d:o+k));c.css("left",
c.position().left+o)}else"absolute"===k?(l=f.position(),c.css({top:l.top+f.outerHeight(),left:l.left}),j=c.outerHeight(),k=f.offset().top,o=0,o=f.offset().left,p=f.outerWidth(),p=o+p,k=c.offset().left,s=a.width(),s=k+s,u=l.top-j-5,i=d.offset().top+d.height(),t=l.top+f.outerHeight()+j,i=t-i,t=l.top-j,m=d.offset().top,(i>m-t||g.dropup)&&-u<m&&c.css("top",u),o="button-right"===g.align?p-s:o-k,c.css("left",c.position().left+o)):(k=c.height()/2,k>e(r).height()/2&&(k=e(r).height()/2),c.css("marginTop",
-1*k));g.background&&n.background(!0,g.backgroundClassName,g.fade,f);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection",function(b){var c=e.fn.addBack?"addBack":"andSelf",d=e(b.target).parent()[0];(!e(b.target).parents()[c]().filter(a).length&&!e(d).hasClass("dt-buttons")||e(b.target).hasClass("dt-button-background"))&&h()}).on("keyup.dtb-collection",function(a){a.keyCode===27&&h()});g.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",
function(a,b,c,d){d[0]!==f[0]&&h()})},0);e(c).trigger("buttons-popover.dt")}});n.background=function(a,b,c,d){c===m&&(c=400);d||(d=q.body);a?w(e("<div/>").addClass(b).css("display","none").insertAfter(d),c):x(e("div."+b),c,function(){e(this).removeClass(b).remove()})};n.instanceSelector=function(a,b){if(a===m||null===a)return e.map(b,function(a){return a.inst});var c=[],d=e.map(b,function(a){return a.name}),g=function(a){if(Array.isArray(a))for(var h=0,k=a.length;h<k;h++)g(a[h]);else"string"===typeof a?
-1!==a.indexOf(",")?g(a.split(",")):(a=e.inArray(a.trim(),d),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};g(a);return c};n.buttonSelector=function(a,b){for(var c=[],d=function(a,b,c){for(var e,g,f=0,h=b.length;f<h;f++)if(e=b[f])g=c!==m?c+f:f+"",a.push({node:e.node,name:e.conf.name,idx:g}),e.buttons&&d(a,e.buttons,g+"-")},g=function(a,b){var f,h,i=[];d(i,b.s.buttons);f=e.map(i,function(a){return a.node});if(Array.isArray(a)||a instanceof e){f=0;for(h=a.length;f<h;f++)g(a[f],b)}else if(null===
a||a===m||"*"===a){f=0;for(h=i.length;f<h;f++)c.push({inst:b,node:i[f].node})}else if("number"===typeof a)c.push({inst:b,node:b.s.buttons[a].node});else if("string"===typeof a)if(-1!==a.indexOf(",")){i=a.split(",");f=0;for(h=i.length;f<h;f++)g(i[f].trim(),b)}else if(a.match(/^\d+(\-\d+)*$/))f=e.map(i,function(a){return a.idx}),c.push({inst:b,node:i[e.inArray(a,f)].node});else if(-1!==a.indexOf(":name")){var n=a.replace(":name","");f=0;for(h=i.length;f<h;f++)i[f].name===n&&c.push({inst:b,node:i[f].node})}else e(f).filter(a).each(function(){c.push({inst:b,
node:this})});else"object"===typeof a&&a.nodeName&&(i=e.inArray(a,f),-1!==i&&c.push({inst:b,node:f[i]}))},f=0,h=a.length;f<h;f++)g(b,a[f]);return c};n.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,"");b.stripHtml&&(a=a.replace(/<[^>]*>/g,""));b.trim&&(a=a.replace(/^\s+|\s+$/g,""));b.stripNewlines&&(a=a.replace(/\n/g," "));b.decodeEntities&&(A.innerHTML=a,a=A.value);return a};n.defaults={buttons:["copy",
"excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};n.version="1.7.0";e.extend(p,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b){b.attr("aria-expanded",!1)},action:function(a,b,c,d){a.stopPropagation();d._collection.parents("body").length?
this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(){if(p.copyHtml5)return"copyHtml5"},csv:function(a,b){if(p.csvHtml5&&p.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(p.excelHtml5&&p.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(p.pdfHtml5&&p.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var d=0;d<a.length;d++){var g=
a[d];e.isPlainObject(g)?(b.push(g.value),c.push(g.label)):(b.push(g),c.push(g))}return{extend:"collection",text:function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())},className:"buttons-page-length",autoClose:!0,buttons:e.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var e=this,c=function(){e.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,
b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(c.text)})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});i.Api.register("buttons()",function(a,b){b===m&&(b=a,a=m);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return n.buttonSelector(n.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});i.Api.register("button()",function(a,b){var c=this.buttons(a,b);1<c.length&&
c.splice(1,c.length);return c});i.Api.registerPlural("buttons().active()","button().active()",function(a){return a===m?this.map(function(a){return a.inst.active(a.node)}):this.each(function(b){b.inst.active(b.node,a)})});i.Api.registerPlural("buttons().action()","button().action()",function(a){return a===m?this.map(function(a){return a.inst.action(a.node)}):this.each(function(b){b.inst.action(b.node,a)})});i.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,
a)})});i.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});i.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=e();e(this.each(function(b){a=a.add(b.inst.node(b.node))}));return a});i.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===m?this.map(function(a){return a.inst.processing(a.node)}):this.each(function(b){b.inst.processing(b.node,a)})});i.Api.registerPlural("buttons().text()",
"button().text()",function(a){return a===m?this.map(function(a){return a.inst.text(a.node)}):this.each(function(b){b.inst.text(b.node,a)})});i.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});i.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});i.Api.register("buttons().containers()",function(){var a=e(),b=this._groupSelector;
this.iterator(!0,"table",function(c){if(c._buttons)for(var c=n.instanceSelector(b,c._buttons),d=0,e=c.length;d<e;d++)a=a.add(c[d].container())});return a});i.Api.register("buttons().container()",function(){return this.containers().eq(0)});i.Api.register("button().add()",function(a,b){var c=this.context;c.length&&(c=n.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});i.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});
return this});i.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var v;i.Api.register("buttons.info()",function(a,b,c){var d=this;if(!1===a)return this.off("destroy.btn-info"),x(e("#datatables_buttons_info"),400,function(){e(this).remove()}),clearTimeout(v),v=null,this;v&&clearTimeout(v);e("#datatables_buttons_info").length&&e("#datatables_buttons_info").remove();w(e('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a?
"<h2>"+a+"</h2>":"").append(e("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==m&&0!==c&&(v=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});return this});i.Api.register("buttons.exportData()",function(a){if(this.context.length){var b=new i.Api(this.context[0]),c=e.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,
trim:!0,format:{header:function(a){return n.stripData(a,c)},footer:function(a){return n.stripData(a,c)},body:function(a){return n.stripData(a,c)}},customizeData:null},a),a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header();return c.format.header(d.innerHTML,a,d)}).toArray(),d=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,g=e.extend({},c.modifier);b.select&&"function"===
typeof b.select.info&&g.selected===m&&b.rows(c.rows,e.extend({selected:!0},g)).any()&&e.extend(g,{selected:!0});for(var g=b.rows(c.rows,g).indexes().toArray(),f=b.cells(g,c.columns),g=f.render(c.orthogonal).toArray(),f=f.nodes().toArray(),h=a.length,k=[],l=0,j=0,p=0<h?g.length/h:0;j<p;j++){for(var q=[h],r=0;r<h;r++)q[r]=c.format.body(g[l],j,r,f[l]),l++;k[j]=q}a={header:a,footer:d,body:k};c.customizeData&&c.customizeData(a);return a}});i.Api.register("buttons.exportInfo()",function(a){a||(a={});var b;
var c=a;b="*"===c.filename&&"*"!==c.title&&c.title!==m&&null!==c.title&&""!==c.title?c.title:c.filename;"function"===typeof b&&(b=b());b===m||null===b?b=null:(-1!==b.indexOf("*")&&(b=b.replace("*",e("head > title").text()).trim()),b=b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(c=y(c.extension))||(c=""),b+=c);c=y(a.title);c=null===c?null:-1!==c.indexOf("*")?c.replace("*",e("head > title").text()||"Exported data"):c;return{filename:b,title:c,messageTop:B(this,a.message||a.messageTop,"top"),
messageBottom:B(this,a.messageBottom,"bottom")}});var y=function(a){return null===a||a===m?null:"function"===typeof a?a():a},B=function(a,b,c){b=y(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},A=e("<textarea/>")[0];e.fn.dataTable.Buttons=n;e.fn.DataTable.Buttons=n;e(q).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||i.defaults.buttons;c&&!b._buttons&&(new n(b,c)).container()}});
i.ext.feature.push({fnInit:z,cFeature:"B"});i.ext.features&&i.ext.features.register("buttons",z);return n});
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(r){return e(r,window,document)}):"object"===typeof exports?module.exports=function(r,q){r||(r=window);if(!q||!q.fn.dataTable)q=require("datatables.net")(r,q).$;return e(q,r,r.document)}:e(jQuery,window,document)})(function(e,r,q,l){function t(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function u(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&
c.call(a))}function w(a,b){var c=new j.Api(a),d=b?b:c.init().buttons||j.defaults.buttons;return(new o(c,d)).container()}var j=e.fn.dataTable,z=0,A=0,p=j.ext.buttons,o=function(a,b){if(!(this instanceof o))return function(b){return(new o(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},o.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new j.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+z++};this.dom={container:e("<"+
this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(o.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===l)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.button.active,c=e(c.node);if(b===l)return c.hasClass(d);c.toggleClass(d,b===l?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var d=b.split("-"),e=this.s,c=0,h=d.length-1;c<h;c++)e=
e.buttons[1*d[c]];c=e.buttons;b=1*d[d.length-1]}this._expandButton(c,a,e!==l,b);this._draw();return this},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);e(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){e("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b,c;b=0;for(c=a.length;b<c;b++)this.remove(a[b].node);this.dom.container.remove();a=this.s.dt.settings()[0];b=0;for(c=a.length;b<c;b++)if(a.inst===
this){a.splice(b,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);var c=this._nodeToButton(a);e(c.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return e(a.node)},processing:function(a,b){var c=this.s.dt,d=this._nodeToButton(a);if(b===l)return e(d.node).hasClass("processing");e(d.node).toggleClass("processing",b);e(c.table().node()).triggerHandler("buttons-processing.dt",
[b,c.button(a),c,e(a),d.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),d=this.s.dt;if(b.buttons.length)for(var f=b.buttons.length-1;0<=f;f--)this.remove(b.buttons[f].node);b.conf.destroy&&b.conf.destroy.call(d.button(a),d,e(a),b.conf);this._removeKey(b.conf);e(b.node).remove();a=e.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.collection.buttonLiner,d=c.inCollection&&d&&d.tag?d.tag:this.c.dom.buttonLiner.tag,
f=this.s.dt,h=e(c.node),i=function(a){return"function"===typeof a?a(f,h,c.conf):a};if(b===l)return i(c.conf.text);c.conf.text=b;d?h.children(d).html(i(b)):h.html(i(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],d=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var f=0,h=d.length;f<h;f++)this.add(d[f]);b.on("destroy",function(b,d){d===c&&a.destroy()});e("body").on("keyup."+this.s.namespace,function(b){if(!q.activeElement||
q.activeElement===q.body){var c=String.fromCharCode(b.keyCode).toLowerCase();a.s.listenKeys.toLowerCase().indexOf(c)!==-1&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=e.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,d=b.length;c<d;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,d){for(var f=
this.s.dt,h=0,b=!Array.isArray(b)?[b]:b,i=0,k=b.length;i<k;i++){var m=this._resolveExtends(b[i]);if(m)if(Array.isArray(m))this._expandButton(a,m,c,d);else{var g=this._buildButton(m,c);g&&(d!==l&&null!==d?(a.splice(d,0,g),d++):a.push(g),g.conf.buttons&&(g.collection=e("<"+this.c.dom.collection.tag+"/>"),g.conf._collection=g.collection,this._expandButton(g.buttons,g.conf.buttons,!0,d)),m.init&&m.init.call(f.button(g.node),f,e(g.node),m),h++)}}},_buildButton:function(a,b){var c=this.c.dom.button,d=this.c.dom.buttonLiner,
f=this.c.dom.collection,h=this.s.dt,i=function(b){return"function"===typeof b?b(h,g,a):b};b&&f.button&&(c=f.button);b&&f.buttonLiner&&(d=f.buttonLiner);if(a.available&&!a.available(h,a))return!1;var k=function(a,b,c,d){d.action.call(b.button(c),a,b,c,d);e(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,d])},f=a.tag||c.tag,m=a.clickBlurs===l?!0:a.clickBlurs,g=e("<"+f+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",
function(b){b.preventDefault();!g.hasClass(c.disabled)&&a.action&&k(b,h,g,a);m&&g.trigger("blur")}).on("keyup.dtb",function(b){b.keyCode===13&&!g.hasClass(c.disabled)&&a.action&&k(b,h,g,a)});"a"===f.toLowerCase()&&g.attr("href","#");"button"===f.toLowerCase()&&g.attr("type","button");d.tag?(f=e("<"+d.tag+"/>").html(i(a.text)).addClass(d.className),"a"===d.tag.toLowerCase()&&f.attr("href","#"),g.append(f)):g.html(i(a.text));!1===a.enabled&&g.addClass(c.disabled);a.className&&g.addClass(a.className);
a.titleAttr&&g.attr("title",i(a.titleAttr));a.attr&&g.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+A++);d=(d=this.c.dom.buttonContainer)&&d.tag?e("<"+d.tag+"/>").addClass(d.className).append(g):g;this._addKey(a);this.c.buttonCreated&&(d=this.c.buttonCreated(a,d));return{conf:a,node:g.get(0),inserter:d,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var e=this._nodeToButton(a,
b[c].buttons);if(e)return e}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var e=this._nodeToHost(a,b[c].buttons);if(e)return e}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(d){for(var f=0,h=d.length;f<h;f++){var i=d[f].conf,k=d[f].node;if(i.key)if(i.key===a)b._buttonsHandled=!0,e(k).click();else if(e.isPlainObject(i.key)&&i.key.key===a&&(!i.key.shiftKey||b.shiftKey))if(!i.key.altKey||b.altKey)if(!i.key.ctrlKey||
b.ctrlKey)if(!i.key.metaKey||b.metaKey)b._buttonsHandled=!0,e(k).click();d[f].buttons.length&&c(d[f].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=e.isPlainObject(a.key)?a.key.key:a.key,a=this.s.listenKeys.split(""),b=e.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){for(var b=this.s.dt,c,d,f=function(c){for(var d=0;!e.isPlainObject(c)&&!Array.isArray(c);){if(c===l)return;if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"===
typeof c){if(!p[c])throw"Unknown button type: "+c;c=p[c]}d++;if(30<d)throw"Buttons: Too many iterations";}return Array.isArray(c)?c:e.extend({},c)},a=f(a);a&&a.extend;){if(!p[a.extend])throw"Cannot extend unknown button type: "+a.extend;var h=f(p[a.extend]);if(Array.isArray(h))return h;if(!h)return!1;c=h.className;a=e.extend({},h,a);c&&a.className!==c&&(a.className=c+" "+a.className);var i=a.postfixButtons;if(i){a.buttons||(a.buttons=[]);c=0;for(d=i.length;c<d;c++)a.buttons.push(i[c]);a.postfixButtons=
null}if(i=a.prefixButtons){a.buttons||(a.buttons=[]);c=0;for(d=i.length;c<d;c++)a.buttons.splice(c,0,i[c]);a.prefixButtons=null}a.extend=h.extend}return a},_popover:function(a,b,c){var d=this.c,f=e.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:d.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,rightAlignClassName:"dt-button-right",tag:d.dom.collection.tag},c),h=b.node(),i=function(){u(e(".dt-button-collection"),
f.fade,function(){e(this).detach()});e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");e("div.dt-button-background").off("click.dtb-collection");o.background(!1,f.backgroundClassName,f.fade,h);e("body").off(".dtb-collection");b.off("buttons-action.b-internal")};!1===a&&i();c=e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());c.length&&(h=c.eq(0),i());c=e("<div/>").addClass("dt-button-collection").addClass(f.collectionLayout).css("display",
"none");a=e(a).addClass(f.contentClassName).attr("role","menu").appendTo(c);h.attr("aria-expanded","true");h.parents("body")[0]!==q.body&&(h=q.body.lastChild);f.collectionTitle&&c.prepend('<div class="dt-button-collection-title">'+f.collectionTitle+"</div>");t(c.insertAfter(h),f.fade);var d=e(b.table().container()),k=c.css("position");"dt-container"===f.align&&(h=h.parent(),c.css("width",d.width()));if("absolute"===k){var m=h.position(),k=e(b.node()).position();c.css({top:k.top+h.outerHeight(),left:m.left});
var m=c.outerHeight(),g=d.offset().top+d.height(),g=k.top+h.outerHeight()+m-g,j=k.top-m,n=d.offset().top,k=k.top-m-5;(g>n-j||f.dropup)&&-k<n&&c.css("top",k);var k=d.offset().left,d=d.width(),d=k+d,m=c.offset().left,g=c.width(),g=m+g,j=h.offset().left,n=h.outerWidth(),l=j+n;c.hasClass(f.rightAlignClassName)||c.hasClass(f.leftAlignClassName)||"dt-container"===f.align?(n=0,c.hasClass(f.rightAlignClassName)?(n=l-g,k>m+n&&(k-=m+n,d-=g+n,n=k>d?n+d:n+k)):(n=k-m,d<g+n&&(k-=m+n,d-=g+n,n=k>d?n+d:n+k))):(d=
h.offset().top,n=0,n="button-right"===f.align?l-g:j-m);c.css("left",c.position().left+n)}else d=c.height()/2,d>e(r).height()/2&&(d=e(r).height()/2),c.css("marginTop",-1*d);f.background&&o.background(!0,f.backgroundClassName,f.fade,h);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection",function(b){var c=e.fn.addBack?"addBack":"andSelf",d=e(b.target).parent()[0];(!e(b.target).parents()[c]().filter(a).length&&!e(d).hasClass("dt-buttons")||e(b.target).hasClass("dt-button-background"))&&
i()}).on("keyup.dtb-collection",function(a){a.keyCode===27&&i()});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(a,b,c,d){d[0]!==h[0]&&i()})},0);e(c).trigger("buttons-popover.dt")}});o.background=function(a,b,c,d){c===l&&(c=400);d||(d=q.body);a?t(e("<div/>").addClass(b).css("display","none").insertAfter(d),c):u(e("div."+b),c,function(){e(this).removeClass(b).remove()})};o.instanceSelector=function(a,b){if(a===l||null===a)return e.map(b,function(a){return a.inst});var c=
[],d=e.map(b,function(a){return a.name}),f=function(a){if(Array.isArray(a))for(var i=0,k=a.length;i<k;i++)f(a[i]);else"string"===typeof a?-1!==a.indexOf(",")?f(a.split(",")):(a=e.inArray(a.trim(),d),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};f(a);return c};o.buttonSelector=function(a,b){for(var c=[],d=function(a,b,c){for(var e,f,h=0,i=b.length;h<i;h++)if(e=b[h])f=c!==l?c+h:h+"",a.push({node:e.node,name:e.conf.name,idx:f}),e.buttons&&d(a,e.buttons,f+"-")},f=function(a,b){var g,
h,i=[];d(i,b.s.buttons);g=e.map(i,function(a){return a.node});if(Array.isArray(a)||a instanceof e){g=0;for(h=a.length;g<h;g++)f(a[g],b)}else if(null===a||a===l||"*"===a){g=0;for(h=i.length;g<h;g++)c.push({inst:b,node:i[g].node})}else if("number"===typeof a)c.push({inst:b,node:b.s.buttons[a].node});else if("string"===typeof a)if(-1!==a.indexOf(",")){i=a.split(",");g=0;for(h=i.length;g<h;g++)f(i[g].trim(),b)}else if(a.match(/^\d+(\-\d+)*$/))g=e.map(i,function(a){return a.idx}),c.push({inst:b,node:i[e.inArray(a,
g)].node});else if(-1!==a.indexOf(":name")){var j=a.replace(":name","");g=0;for(h=i.length;g<h;g++)i[g].name===j&&c.push({inst:b,node:i[g].node})}else e(g).filter(a).each(function(){c.push({inst:b,node:this})});else"object"===typeof a&&a.nodeName&&(i=e.inArray(a,g),-1!==i&&c.push({inst:b,node:g[i]}))},h=0,i=a.length;h<i;h++)f(b,a[h]);return c};o.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,
"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)x.innerHTML=a,a=x.value;return a};o.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};o.version="1.7.1";
e.extend(p,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b){b.attr("aria-expanded",!1)},action:function(a,b,c,d){a.stopPropagation();d._collection.parents("body").length?this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(){if(p.copyHtml5)return"copyHtml5"},csv:function(a,b){if(p.csvHtml5&&p.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(p.excelHtml5&&p.excelHtml5.available(a,
b))return"excelHtml5"},pdf:function(a,b){if(p.pdfHtml5&&p.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var d=0;d<a.length;d++){var f=a[d];e.isPlainObject(f)?(b.push(f.value),c.push(f.label)):(b.push(f),c.push(f))}return{extend:"collection",text:function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())},className:"buttons-page-length",autoClose:!0,
buttons:e.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var e=this,c=function(){e.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(c.text)})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});j.Api.register("buttons()",function(a,b){b===l&&(b=a,a=l);this.selector.buttonGroup=
a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return o.buttonSelector(o.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});j.Api.register("button()",function(a,b){var c=this.buttons(a,b);1<c.length&&c.splice(1,c.length);return c});j.Api.registerPlural("buttons().active()","button().active()",function(a){return a===l?this.map(function(a){return a.inst.active(a.node)}):this.each(function(b){b.inst.active(b.node,a)})});j.Api.registerPlural("buttons().action()","button().action()",
function(a){return a===l?this.map(function(a){return a.inst.action(a.node)}):this.each(function(b){b.inst.action(b.node,a)})});j.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});j.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});j.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=e();e(this.each(function(b){a=a.add(b.inst.node(b.node))}));
return a});j.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===l?this.map(function(a){return a.inst.processing(a.node)}):this.each(function(b){b.inst.processing(b.node,a)})});j.Api.registerPlural("buttons().text()","button().text()",function(a){return a===l?this.map(function(a){return a.inst.text(a.node)}):this.each(function(b){b.inst.text(b.node,a)})});j.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});
j.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});j.Api.register("buttons().containers()",function(){var a=e(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons)for(var c=o.instanceSelector(b,c._buttons),d=0,e=c.length;d<e;d++)a=a.add(c[d].container())});return a});j.Api.register("buttons().container()",function(){return this.containers().eq(0)});j.Api.register("button().add()",function(a,
b){var c=this.context;c.length&&(c=o.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});j.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});j.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var s;j.Api.register("buttons.info()",function(a,b,c){var d=this;if(!1===a)return this.off("destroy.btn-info"),
u(e("#datatables_buttons_info"),400,function(){e(this).remove()}),clearTimeout(s),s=null,this;s&&clearTimeout(s);e("#datatables_buttons_info").length&&e("#datatables_buttons_info").remove();t(e('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a?"<h2>"+a+"</h2>":"").append(e("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==l&&0!==c&&(s=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});
return this});j.Api.register("buttons.exportData()",function(a){if(this.context.length){var b=new j.Api(this.context[0]),c=e.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return o.stripData(a,c)},footer:function(a){return o.stripData(a,c)},body:function(a){return o.stripData(a,c)}},customizeData:null},a),a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header();
return c.format.header(d.innerHTML,a,d)}).toArray(),d=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,f=e.extend({},c.modifier);b.select&&"function"===typeof b.select.info&&f.selected===l&&b.rows(c.rows,e.extend({selected:!0},f)).any()&&e.extend(f,{selected:!0});for(var f=b.rows(c.rows,f).indexes().toArray(),h=b.cells(f,c.columns),f=h.render(c.orthogonal).toArray(),h=h.nodes().toArray(),i=a.length,
k=[],m=0,g=0,q=0<i?f.length/i:0;g<q;g++){for(var n=[i],p=0;p<i;p++)n[p]=c.format.body(f[m],g,p,h[m]),m++;k[g]=n}a={header:a,footer:d,body:k};c.customizeData&&c.customizeData(a);return a}});j.Api.register("buttons.exportInfo()",function(a){a||(a={});var b;var c=a;b="*"===c.filename&&"*"!==c.title&&c.title!==l&&null!==c.title&&""!==c.title?c.title:c.filename;"function"===typeof b&&(b=b());b===l||null===b?b=null:(-1!==b.indexOf("*")&&(b=b.replace("*",e("head > title").text()).trim()),b=b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,
""),(c=v(c.extension))||(c=""),b+=c);c=v(a.title);c=null===c?null:-1!==c.indexOf("*")?c.replace("*",e("head > title").text()||"Exported data"):c;return{filename:b,title:c,messageTop:y(this,a.message||a.messageTop,"top"),messageBottom:y(this,a.messageBottom,"bottom")}});var v=function(a){return null===a||a===l?null:"function"===typeof a?a():a},y=function(a,b,c){b=v(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":
b},x=e("<textarea/>")[0];e.fn.dataTable.Buttons=o;e.fn.DataTable.Buttons=o;e(q).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||j.defaults.buttons;c&&!b._buttons&&(new o(b,c)).container()}});j.ext.feature.push({fnInit:w,cFeature:"B"});j.ext.features&&j.ext.features.register("buttons",w);return o});

View file

@ -1,15 +1,15 @@
/*! ColReorder 1.5.3
* ©2010-2020 SpryMedia Ltd - datatables.net/license
/*! ColReorder 1.5.4
* ©2010-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary ColReorder
* @description Provide the ability to reorder columns in a DataTable
* @version 1.5.3
* @version 1.5.4
* @file dataTables.colReorder.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2010-2020 SpryMedia Ltd.
* @copyright Copyright 2010-2021 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@ -1374,7 +1374,7 @@ ColReorder.defaults = {
* @type String
* @default As code
*/
ColReorder.version = "1.5.3";
ColReorder.version = "1.5.4";

View file

@ -1,6 +1,6 @@
/*!
ColReorder 1.5.3
©2010-2020 SpryMedia Ltd - datatables.net/license
ColReorder 1.5.4
©2010-2021 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(p){return e(p,window,document)}):"object"===typeof exports?module.exports=function(p,o){p||(p=window);if(!o||!o.fn.dataTable)o=require("datatables.net")(p,o).$;return e(o,p,p.document)}:e(jQuery,window,document)})(function(e,p,o,s){function r(a){for(var b=[],d=0,f=a.length;d<f;d++)b[a[d]]=d;return b}function q(a,b,d){b=a.splice(b,1)[0];a.splice(d,0,b)}function t(a,b,d){for(var f=[],e=0,c=a.childNodes.length;e<
c;e++)1==a.childNodes[e].nodeType&&f.push(a.childNodes[e]);b=f[b];null!==d?a.insertBefore(b,f[d]):a.appendChild(b)}var u=e.fn.dataTable;e.fn.dataTableExt.oApi.fnColReorder=function(a,b,d,f,h){var c,g,j,l,n,i=a.aoColumns.length,k;n=function(a,b,c){if(a[b]&&"function"!==typeof a[b]){var d=a[b].split("."),e=d.shift();isNaN(1*e)||(a[b]=c[1*e]+"."+d.join("."))}};if(b!=d)if(0>b||b>=i)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+b);else if(0>d||d>=i)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+
@ -23,7 +23,7 @@ this.s.mouse.toIndex),this.s.mouse.fromIndex=this.s.mouse.toIndex,(""!==this.s.d
this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))},_fnRegions:function(){var a=this.s.dt.aoColumns,b=this._fnIsLtr();this.s.aoTargets.splice(0,this.s.aoTargets.length);var d=e(this.s.dt.nTable).offset().left,f=[];e.each(a,function(a,c){if(c.bVisible&&"none"!==c.nTh.style.display){var h=e(c.nTh),i=h.offset().left;b&&(i+=h.outerWidth());f.push({index:a,bound:i});d=i}else f.push({index:a,bound:d})});
var h=f[0],a=e(a[h.index].nTh).outerWidth();this.s.aoTargets.push({to:0,x:h.bound-a});for(h=0;h<f.length;h++){var a=f[h],c=a.index;a.index<this.s.mouse.fromIndex&&c++;this.s.aoTargets.push({to:c,x:a.bound})}0!==this.s.fixedRight&&this.s.aoTargets.splice(this.s.aoTargets.length-this.s.fixedRight);0!==this.s.fixed&&this.s.aoTargets.splice(0,this.s.fixed)},_fnCreateDragNode:function(){var a=""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY,b=this.s.dt.aoColumns[this.s.mouse.targetIndex].nTh,d=b.parentNode,
f=d.parentNode,h=f.parentNode,c=e(b).clone();this.dom.drag=e(h.cloneNode(!1)).addClass("DTCR_clonedTable").append(e(f.cloneNode(!1)).append(e(d.cloneNode(!1)).append(c[0]))).css({position:"absolute",top:0,left:0,width:e(b).outerWidth(),height:e(b).outerHeight()}).appendTo("body");this.dom.pointer=e("<div></div>").addClass("DTCR_pointer").css({position:"absolute",top:a?e("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:e(this.s.dt.nTable).offset().top,height:a?e("div.dataTables_scroll",
this.s.dt.nTableWrapper).height():e(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){e.each(this.s.dt.aoColumns,function(a,b){e(b.nTh).attr("data-column-index",a)})},_fnCursorPosition:function(a,b){return-1!==a.type.indexOf("touch")?a.originalEvent.touches[0][b]:a[b]},_fnIsLtr:function(){return"rtl"!==e(this.s.dt.nTable).css("direction")}});i.defaults={aiOrder:null,bEnable:!0,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null};i.version="1.5.3";
this.s.dt.nTableWrapper).height():e(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){e.each(this.s.dt.aoColumns,function(a,b){e(b.nTh).attr("data-column-index",a)})},_fnCursorPosition:function(a,b){return-1!==a.type.indexOf("touch")?a.originalEvent.touches[0][b]:a[b]},_fnIsLtr:function(){return"rtl"!==e(this.s.dt.nTable).css("direction")}});i.defaults={aiOrder:null,bEnable:!0,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null};i.version="1.5.4";
e.fn.dataTable.ColReorder=i;e.fn.DataTable.ColReorder=i;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.10.8")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInstance;a._colReorder?b.oApi._fnLog(a,1,"ColReorder attempted to initialise twice. Ignoring second"):(b=a.oInit,new i(a,b.colReorder||b.oColReorder||{}));return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.10.8 or greater - www.datatables.net/download");
e(o).on("preInit.dt.colReorder",function(a,b){if("dt"===a.namespace){var d=b.oInit.colReorder,f=u.defaults.colReorder;if(d||f)f=e.extend({},d,f),!1!==d&&new i(b,f)}});e.fn.dataTable.Api.register("colReorder.reset()",function(){return this.iterator("table",function(a){a._colReorder.fnReset()})});e.fn.dataTable.Api.register("colReorder.order()",function(a,b){return a?this.iterator("table",function(d){d._colReorder.fnOrder(a,b)}):this.context.length?this.context[0]._colReorder.fnOrder():null});e.fn.dataTable.Api.register("colReorder.transpose()",
function(a,b){return this.context.length&&this.context[0]._colReorder?this.context[0]._colReorder.fnTranspose(a,b):a});e.fn.dataTable.Api.register("colReorder.move()",function(a,b,d,e){this.context.length&&(this.context[0]._colReorder.s.dt.oInstance.fnColReorder(a,b,d,e),this.context[0]._colReorder._fnSetColumnIndexes());return this});e.fn.dataTable.Api.register("colReorder.enable()",function(a){return this.iterator("table",function(b){b._colReorder&&b._colReorder.fnEnable(a)})});e.fn.dataTable.Api.register("colReorder.disable()",

View file

@ -1,15 +1,15 @@
/*! FixedColumns 3.3.2
* ©2010-2020 SpryMedia Ltd - datatables.net/license
/*! FixedColumns 3.3.3
* ©2010-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary FixedColumns
* @description Freeze columns in place on a scrolling DataTable
* @version 3.3.2
* @version 3.3.3
* @file dataTables.fixedColumns.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2010-2020 SpryMedia Ltd.
* @copyright Copyright 2010-2021 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@ -1573,7 +1573,7 @@ FixedColumns.defaults = /** @lends FixedColumns.defaults */{
* @default See code
* @static
*/
FixedColumns.version = "3.3.2";
FixedColumns.version = "3.3.3";

View file

@ -1,6 +1,6 @@
/*!
FixedColumns 3.3.2
©2010-2020 SpryMedia Ltd - datatables.net/license
FixedColumns 3.3.3
©2010-2021 SpryMedia Ltd - datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(p){return d(p,window,document)}):"object"===typeof exports?module.exports=function(p,r){p||(p=window);if(!r||!r.fn.dataTable)r=require("datatables.net")(p,r).$;return d(r,p,p.document)}:d(jQuery,window,document)})(function(d,p,r,t){var s=d.fn.dataTable,u,m=function(a,b){var c=this;if(this instanceof m){if(b===t||!0===b)b={};var e=d.fn.dataTable.camelToHungarian;e&&(e(m.defaults,m.defaults,!0),e(m.defaults,
b));e=(new d.fn.dataTable.Api(a)).settings()[0];this.s={dt:e,iTableColumns:e.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[],rtl:"rtl"===d(e.nTable).css("direction")};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};if(e._oFixedColumns)throw"FixedColumns already initialised on this table";
@ -31,7 +31,7 @@ h.style.height:(b.forcer=h.cloneNode(!0),b.liner.appendChild(b.forcer)));b.liner
n,!0)}else{n=this._fnCopyLayout(k.aoFooter,c,!1);b=[];k.oApi._fnDetectHeader(b,d(">tfoot",a.footer)[0]);g=0;for(h=n.length;g<h;g++){i=0;for(j=n[g].length;i<j;i++)b[g][i].cell.className=n[g][i].cell.className}}this._fnEqualiseHeights("tfoot",this.dom.footer,a.footer)}b=k.oApi._fnGetUniqueThs(k,d(">thead",a.header)[0]);d(b).each(function(a){l=c[a];this.style.width=f.s.aiInnerWidths[l]+"px"});null!==f.s.dt.nTFoot&&(b=k.oApi._fnGetUniqueThs(k,d(">tfoot",a.footer)[0]),d(b).each(function(a){l=c[a];this.style.width=
f.s.aiInnerWidths[l]+"px"}))},_fnGetTrNodes:function(a){for(var b=[],c=0,d=a.childNodes.length;c<d;c++)"TR"==a.childNodes[c].nodeName.toUpperCase()&&b.push(a.childNodes[c]);return b},_fnEqualiseHeights:function(a,b,c){if(!("none"==this.s.sHeightMatch&&"thead"!==a&&"tfoot"!==a)){var e,f,g=b.getElementsByTagName(a)[0],c=c.getElementsByTagName(a)[0],a=d(">"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();for(var g=this._fnGetTrNodes(g),b=this._fnGetTrNodes(c),h=[],c=0,a=b.length;c<a;c++)e=
g[c].offsetHeight,f=b[c].offsetHeight,e=f>e?f:e,"semiauto"==this.s.sHeightMatch&&(g[c]._DTTC_iHeight=e),h.push(e);c=0;for(a=b.length;c<a;c++)b[c].style.height=h[c]+"px",g[c].style.height=h[c]+"px"}},_firefoxScrollError:function(){if(u===t){var a=d("<div/>").css({position:"absolute",top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");u=a[0].clientWidth===a[0].offsetWidth&&0!==this._fnDTOverflow().bar;a.remove()}return u}});m.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,
sHeightMatch:"semiauto"};m.version="3.3.2";s.Api.register("fixedColumns()",function(){return this});s.Api.register("fixedColumns().update()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});s.Api.register("fixedColumns().relayout()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});s.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&
sHeightMatch:"semiauto"};m.version="3.3.3";s.Api.register("fixedColumns()",function(){return this});s.Api.register("fixedColumns().update()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});s.Api.register("fixedColumns().relayout()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});s.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&
a._oFixedColumns.fnRecalculateHeight(this.row(b).node())})});s.Api.register("fixedColumns().rowIndex()",function(a){a=d(a);return a.parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[a.index()]:this.row(a).index()});s.Api.register("fixedColumns().cellIndex()",function(a){a=d(a);if(a.parents(".DTFC_Cloned").length){var b=a.parent().index(),b=this.rows({page:"current"}).indexes()[b],a=a.parents(".DTFC_LeftWrapper").length?a.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+
a.index();return{row:b,column:this.column.index("toData",a),columnVisible:a}}return this.cell(a).index()});s.Api.registerPlural("cells().fixedNodes()","cell().fixedNode()",function(){return this.iterator("cell",function(a,b,c){return a._oFixedColumns?a._oFixedColumns.fnToFixedNode(b,c):this.cell(b,c).node()},1)});d(r).on("init.dt.fixedColumns",function(a,b){if("dt"===a.namespace){var c=b.oInit.fixedColumns,e=s.defaults.fixedColumns;if(c||e)e=d.extend({},c,e),!1!==c&&new m(b,e)}});d.fn.dataTable.FixedColumns=
m;return d.fn.DataTable.FixedColumns=m});

View file

@ -1,4 +1,4 @@
/*! FixedHeader 3.1.8
/*! FixedHeader 3.1.9
* ©2009-2021 SpryMedia Ltd - datatables.net/license
*/
@ -6,7 +6,7 @@
* @summary FixedHeader
* @description Fix a table's header or footer, so it is always visible while
* scrolling
* @version 3.1.8
* @version 3.1.9
* @file dataTables.fixedHeader.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
@ -622,7 +622,7 @@ $.extend( FixedHeader.prototype, {
* @type {String}
* @static
*/
FixedHeader.version = "3.1.8";
FixedHeader.version = "3.1.9";
/**
* Defaults

View file

@ -1,5 +1,5 @@
/*!
FixedHeader 3.1.8
FixedHeader 3.1.9
©2009-2021 SpryMedia Ltd - datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return d(g,window,document)}):"object"===typeof exports?module.exports=function(g,j){g||(g=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(g,j).$;return d(j,g,g.document)}:d(jQuery,window,document)})(function(d,g,j,k){var i=d.fn.dataTable,l=0,h=function(a,b){if(!(this instanceof h))throw"FixedHeader must be initialised with the 'new' keyword.";!0===b&&(b={});a=new i.Api(a);this.c=d.extend(!0,
@ -13,7 +13,7 @@ b).css("min-width","")},_horizontal:function(a,b){var e=this.dom[a],c=this.s.pos
c.placeholder=null),this._unsize(b),"header"===b?c.host.prepend(i):c.host.append(i),c.floating)c.floating.remove(),c.floating=null}else"in"===a?(this._clone(b,e),c.floating.addClass("fixedHeader-floating").css("header"===b?"top":"bottom",this.c[b+"Offset"]).css("left",f.left+"px"),g(f.width),"footer"===b&&c.floating.css("top","")):"below"===a?(this._clone(b,e),c.floating.addClass("fixedHeader-locked").css("top",f.tfootTop-f.theadHeight).css("left",f.left+"px"),g(f.width)):"above"===a&&(this._clone(b,
e),c.floating.addClass("fixedHeader-locked").css("top",f.tbodyTop).css("left",f.left+"px"),g(f.width));h&&h!==j.activeElement&&setTimeout(function(){h.focus()},10);this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[b+"Mode"]=a},_positions:function(){var a=this.s.dt.table(),b=this.s.position,e=this.dom,a=d(a.node()),c=a.children("thead"),f=a.children("tfoot"),e=e.tbody;b.visible=a.is(":visible");b.width=a.outerWidth();b.left=a.offset().left;b.theadTop=c.offset().top;b.tbodyTop=e.offset().top;
b.tbodyHeight=e.outerHeight();b.theadHeight=b.tbodyTop-b.theadTop;f.length?(b.tfootTop=f.offset().top,b.tfootBottom=b.tfootTop+f.outerHeight(),b.tfootHeight=b.tfootBottom-b.tfootTop):(b.tfootTop=b.tbodyTop+e.outerHeight(),b.tfootBottom=b.tfootTop,b.tfootHeight=b.tfootTop)},_scroll:function(a){var b=d(j).scrollTop(),e=d(j).scrollLeft(),c=this.s.position,f;this.c.header&&(f=this.s.enable?!c.visible||b<=c.theadTop-this.c.headerOffset?"in-place":b<=c.tfootTop-c.theadHeight-this.c.headerOffset?"in":"below":
"in-place",(a||f!==this.s.headerMode)&&this._modeChange(f,"header",a),this._horizontal("header",e));this.c.footer&&this.dom.tfoot.length&&(b=this.s.enable?!c.visible||b+c.windowHeight>=c.tfootBottom+this.c.footerOffset?"in-place":c.windowHeight+b>c.tbodyTop+c.tfootHeight+this.c.footerOffset?"in":"above":"in-place",(a||b!==this.s.footerMode)&&this._modeChange(b,"footer",a),this._horizontal("footer",e))}});h.version="3.1.8";h.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};d.fn.dataTable.FixedHeader=
"in-place",(a||f!==this.s.headerMode)&&this._modeChange(f,"header",a),this._horizontal("header",e));this.c.footer&&this.dom.tfoot.length&&(b=this.s.enable?!c.visible||b+c.windowHeight>=c.tfootBottom+this.c.footerOffset?"in-place":c.windowHeight+b>c.tbodyTop+c.tfootHeight+this.c.footerOffset?"in":"above":"in-place",(a||b!==this.s.footerMode)&&this._modeChange(b,"footer",a),this._horizontal("footer",e))}});h.version="3.1.9";h.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};d.fn.dataTable.FixedHeader=
h;d.fn.DataTable.FixedHeader=h;d(j).on("init.dt.dtfh",function(a,b){if("dt"===a.namespace){var e=b.oInit.fixedHeader,c=i.defaults.fixedHeader;if((e||c)&&!b._fixedHeader)c=d.extend({},c,e),!1!==e&&new h(b,c)}});i.Api.register("fixedHeader()",function(){});i.Api.register("fixedHeader.adjust()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.update()})});i.Api.register("fixedHeader.enable()",function(a){return this.iterator("table",function(b){b=b._fixedHeader;a=a!==k?a:!0;
b&&a!==b.enabled()&&b.enable(a)})});i.Api.register("fixedHeader.enabled()",function(){if(this.context.length){var a=this.context[0]._fixedHeader;if(a)return a.enabled()}return!1});i.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.enabled()&&a.enable(!1)})});d.each(["header","footer"],function(a,b){i.Api.register("fixedHeader."+b+"Offset()",function(a){var c=this.context;return a===k?c.length&&c[0]._fixedHeader?c[0]._fixedHeader[b+"Offset"]():
k:this.iterator("table",function(c){if(c=c._fixedHeader)c[b+"Offset"](a)})})});return h});

View file

@ -1,11 +1,11 @@
/*! KeyTable 2.6.1
/*! KeyTable 2.6.4
* ©2009-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary KeyTable
* @description Spreadsheet like keyboard navigation for DataTables
* @version 2.6.1
* @version 2.6.4
* @file dataTables.keyTable.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
@ -471,8 +471,10 @@ $.extend( KeyTable.prototype, {
if ( editor ) {
// Got Editor - need to activate inline editing,
// set the value and submit
var options = that._inlineOptions(focused.cell.index());
editor
.inline( focused.cell.index() )
.inline(options.cell, options.field, options.options)
.set( editor.displayed()[0], pastedText )
.submit();
}
@ -562,6 +564,8 @@ $.extend( KeyTable.prototype, {
}
var editInline = function () {
var options = that._inlineOptions(editCell.index());
editor
.one( 'open'+namespace, function () {
// Remove cancel open
@ -616,7 +620,7 @@ $.extend( KeyTable.prototype, {
// might be that the open event handler isn't needed
editor.off( namespace );
} )
.inline( editCell.index() );
.inline(options.cell, options.field, options.options);
};
// Editor 1.7 listens for `return` on keyup, so if return is the trigger
@ -635,6 +639,20 @@ $.extend( KeyTable.prototype, {
},
_inlineOptions: function (cellIdx)
{
if (this.c.editorOptions) {
return this.c.editorOptions(cellIdx);
}
return {
cell: cellIdx,
field: undefined,
options: undefined
};
},
/**
* Emit an event on the DataTable for listeners
*
@ -841,7 +859,7 @@ $.extend( KeyTable.prototype, {
break;
case 27: // esc
if ( this.s.blurable && enable === true ) {
if ( this.c.blurable && enable === true ) {
this._blur();
}
break;
@ -1023,6 +1041,16 @@ $.extend( KeyTable.prototype, {
row = currRow,
column = columns[ currCol ]; // row is the display, column is an index
// If the direction is rtl then the logic needs to be inverted from this point forwards
if($(dt.table().node()).css('direction') === 'rtl') {
if(direction === 'right') {
direction = 'left';
}
else if(direction === 'left'){
direction = 'right';
}
}
if ( direction === 'right' ) {
if ( currCol >= columns.length - 1 ) {
row++;
@ -1188,6 +1216,12 @@ KeyTable.defaults = {
*/
editOnFocus: false,
/**
* Options to pass to Editor's inline method
* @type {function}
*/
editorOptions: null,
/**
* Select a cell to automatically select on start up. `null` for no
* automatic selection
@ -1210,7 +1244,7 @@ KeyTable.defaults = {
KeyTable.version = "2.6.1";
KeyTable.version = "2.6.4";
$.fn.dataTable.KeyTable = KeyTable;

View file

@ -1,26 +1,47 @@
/*!
KeyTable 2.6.1
Copyright 2009-2021 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
KeyTable 2.6.4
©2009-2021 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(j){return e(j,window,document)}):"object"===typeof exports?module.exports=function(j,k){j||(j=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(j,k).$;return e(k,j,j.document)}:e(jQuery,window,document)})(function(e,j,k,n){var l=e.fn.dataTable,o=0,p=0,m=function(a,b){if(!l.versionCheck||!l.versionCheck("1.10.8"))throw"KeyTable requires DataTables 1.10.8 or newer";this.c=e.extend(!0,{},l.defaults.keyTable,
m.defaults,b);this.s={dt:new l.Api(a),enable:!0,focusDraw:!1,waitingForDraw:!1,lastFocus:null,namespace:".keyTable-"+o++,tabInput:null};this.dom={};var d=this.s.dt.settings()[0],c=d.keytable;if(c)return c;d.keytable=this;this._constructor()};e.extend(m.prototype,{blur:function(){this._blur()},enable:function(a){this.s.enable=a},enabled:function(){return this.s.enable},focus:function(a,b){this._focus(this.s.dt.cell(a,b))},focused:function(a){if(!this.s.lastFocus)return!1;var b=this.s.lastFocus.cell.index();
return a.row===b.row&&a.column===b.column},_constructor:function(){this._tabInput();var a=this,b=this.s.dt,d=e(b.table().node()),c=this.s.namespace,f=!1;"static"===d.css("position")&&d.css("position","relative");e(b.table().body()).on("click"+c,"th, td",function(c){if(!1!==a.s.enable){var d=b.cell(this);d.any()&&a._focus(d,null,!1,c)}});e(k).on("keydown"+c,function(b){f||a._key(b)});if(this.c.blurable)e(k).on("mousedown"+c,function(c){e(c.target).parents(".dataTables_filter").length&&a._blur();e(c.target).parents().filter(b.table().container()).length||
e(c.target).parents("div.DTE").length||!e(c.target).parents("div.editor-datetime").length&&!e(c.target).parents("div.dt-datetime").length&&(e(c.target).parents().filter(".DTFC_Cloned").length||a._blur())});if(this.c.editor){var i=this.c.editor;i.on("open.keyTableMain",function(b,d){"inline"!==d&&a.s.enable&&(a.enable(!1),i.one("close"+c,function(){a.enable(!0)}))});if(this.c.editOnFocus)b.on("key-focus"+c+" key-refocus"+c,function(b,c,d,f){a._editor(null,f,!0)});b.on("key"+c,function(b,c,d,f,g){a._editor(d,
g,!1)});e(b.table().body()).on("dblclick"+c,"th, td",function(c){!1!==a.s.enable&&b.cell(this).any()&&(a.s.lastFocus&&this!==a.s.lastFocus.cell.node()||a._editor(null,c,!0))});i.on("preSubmit",function(){f=!0}).on("preSubmitCancelled",function(){f=!1}).on("submitComplete",function(){f=!1})}if(b.settings()[0].oFeatures.bStateSave)b.on("stateSaveParams"+c,function(b,c,d){d.keyTable=a.s.lastFocus?a.s.lastFocus.cell.index():null});b.on("column-visibility"+c,function(){a._tabInput()});b.on("draw"+c,function(c){a._tabInput();
if(!a.s.focusDraw&&a.s.lastFocus){var d=a.s.lastFocus.relative,f=b.page.info(),g=d.row+f.start;0!==f.recordsDisplay&&(g>=f.recordsDisplay&&(g=f.recordsDisplay-1),a._focus(g,d.column,!0,c))}});this.c.clipboard&&this._clipboard();b.on("destroy"+c,function(){a._blur(!0);b.off(c);e(b.table().body()).off("click"+c,"th, td").off("dblclick"+c,"th, td");e(k).off("mousedown"+c).off("keydown"+c).off("copy"+c).off("paste"+c)});var g=b.state.loaded();if(g&&g.keyTable)b.one("init",function(){var a=b.cell(g.keyTable);
a.any()&&a.focus()});else this.c.focus&&b.cell(this.c.focus).focus()},_blur:function(a){if(this.s.enable&&this.s.lastFocus){var b=this.s.lastFocus.cell;e(b.node()).removeClass(this.c.className);this.s.lastFocus=null;a||(this._updateFixedColumns(b.index().column),this._emitEvent("key-blur",[this.s.dt,b]))}},_clipboard:function(){var a=this.s.dt,b=this,d=this.s.namespace;j.getSelection&&(e(k).on("copy"+d,function(a){var a=a.originalEvent,d=j.getSelection().toString(),e=b.s.lastFocus;!d&&e&&(a.clipboardData.setData("text/plain",
e.cell.render(b.c.clipboardOrthogonal)),a.preventDefault())}),e(k).on("paste"+d,function(c){var c=c.originalEvent,d=b.s.lastFocus,e=k.activeElement,g=b.c.editor,h;if(d&&(!e||"body"===e.nodeName.toLowerCase()))c.preventDefault(),j.clipboardData&&j.clipboardData.getData?h=j.clipboardData.getData("Text"):c.clipboardData&&c.clipboardData.getData&&(h=c.clipboardData.getData("text/plain")),g?g.inline(d.cell.index()).set(g.displayed()[0],h).submit():(d.cell.data(h),a.draw(!1))}))},_columns:function(){var a=
this.s.dt,b=a.columns(this.c.columns).indexes(),d=[];a.columns(":visible").every(function(a){-1!==b.indexOf(a)&&d.push(a)});return d},_editor:function(a,b,d){if(this.s.lastFocus&&!(b&&"draw"===b.type)){var c=this,f=this.s.dt,i=this.c.editor,g=this.s.lastFocus.cell,h=this.s.namespace+"e"+p++;if(!e("div.DTE",g.node()).length&&!(null!==a&&(0<=a&&9>=a||11===a||12===a||14<=a&&31>=a||112<=a&&123>=a||127<=a&&159>=a))){b&&(b.stopPropagation(),13===a&&b.preventDefault());var j=function(){i.one("open"+h,function(){i.off("cancelOpen"+
h);d||e("div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea").select();f.keys.enable(d?"tab-only":"navigation-only");f.on("key-blur.editor",function(a,b,c){i.displayed()&&c.node()===g.node()&&i.submit()});d&&e(f.table().container()).addClass("dtk-focus-alt");i.on("preSubmitCancelled"+h,function(){setTimeout(function(){c._focus(g,null,false)},50)});i.on("submitUnsuccessful"+h,function(){c._focus(g,null,false)});i.one("close"+h,function(){f.keys.enable(true);f.off("key-blur.editor");
i.off(h);e(f.table().container()).removeClass("dtk-focus-alt");if(c.s.returnSubmit){c.s.returnSubmit=false;c._emitEvent("key-return-submit",[f,g])}})}).one("cancelOpen"+h,function(){i.off(h)}).inline(g.index())};13===a?(d=!0,e(k).one("keyup",function(){j()})):j()}}},_emitEvent:function(a,b){this.s.dt.iterator("table",function(d){e(d.nTable).triggerHandler(a,b)})},_focus:function(a,b,d,c){var f=this,i=this.s.dt,g=i.page.info(),h=this.s.lastFocus;c||(c=null);if(this.s.enable){if("number"!==typeof a){if(!a.any())return;
var l=a.index(),b=l.column,a=i.rows({filter:"applied",order:"applied"}).indexes().indexOf(l.row);if(0>a)return;g.serverSide&&(a+=g.start)}if(-1!==g.length&&(a<g.start||a>=g.start+g.length))this.s.focusDraw=!0,this.s.waitingForDraw=!0,i.one("draw",function(){f.s.focusDraw=!1;f.s.waitingForDraw=!1;f._focus(a,b,n,c)}).page(Math.floor(a/g.length)).draw(!1);else if(-1!==e.inArray(b,this._columns())){g.serverSide&&(a-=g.start);g=i.cells(null,b,{search:"applied",order:"applied"}).flatten();g=i.cell(g[a]);
if(h){if(h.node===g.node()){this._emitEvent("key-refocus",[this.s.dt,g,c||null]);return}this._blur()}this._removeOtherFocus();h=e(g.node());h.addClass(this.c.className);this._updateFixedColumns(b);if(d===n||!0===d)this._scroll(e(j),e(k.body),h,"offset"),d=i.table().body().parentNode,d!==i.table().header().parentNode&&(d=e(d.parentNode),this._scroll(d,d,h,"position"));this.s.lastFocus={cell:g,node:g.node(),relative:{row:i.rows({page:"current"}).indexes().indexOf(g.index().row),column:g.index().column}};
this._emitEvent("key-focus",[this.s.dt,g,c||null]);i.state.save()}}},_key:function(a){if(this.s.waitingForDraw)a.preventDefault();else{var b=this.s.enable;this.s.returnSubmit=("navigation-only"===b||"tab-only"===b)&&13===a.keyCode?!0:!1;var d=!0===b||"navigation-only"===b;if(b&&(!(0===a.keyCode||a.ctrlKey||a.metaKey||a.altKey)||a.ctrlKey&&a.altKey)){var c=this.s.lastFocus;if(c)if(this.s.dt.cell(c.node).any()){var c=this.s.dt,f=this.s.dt.settings()[0].oScroll.sY?!0:!1;if(!(this.c.keys&&-1===e.inArray(a.keyCode,
this.c.keys)))switch(a.keyCode){case 9:this._shift(a,a.shiftKey?"left":"right",!0);break;case 27:this.s.blurable&&!0===b&&this._blur();break;case 33:case 34:d&&!f&&(a.preventDefault(),c.page(33===a.keyCode?"previous":"next").draw(!1));break;case 35:case 36:d&&(a.preventDefault(),b=c.cells({page:"current"}).indexes(),d=this._columns(),this._focus(c.cell(b[35===a.keyCode?b.length-1:d[0]]),null,!0,a));break;case 37:d&&this._shift(a,"left");break;case 38:d&&this._shift(a,"up");break;case 39:d&&this._shift(a,
"right");break;case 40:d&&this._shift(a,"down");break;case 113:if(this.c.editor){this._editor(null,a,!0);break}default:!0===b&&this._emitEvent("key",[c,a.keyCode,this.s.lastFocus.cell,a])}}else this.s.lastFocus=null}}},_removeOtherFocus:function(){var a=this.s.dt.table().node();e.fn.dataTable.tables({api:!0}).iterator("table",function(){this.table().node()!==a&&this.cell.blur()})},_scroll:function(a,b,d,c){var f=d[c](),e=d.outerHeight(),g=d.outerWidth(),h=b.scrollTop(),j=b.scrollLeft(),k=a.height(),
a=a.width();"position"===c&&(f.top+=parseInt(d.closest("table").css("top"),10));f.top<h&&b.scrollTop(f.top);f.left<j&&b.scrollLeft(f.left);f.top+e>h+k&&e<k&&b.scrollTop(f.top+e-k);f.left+g>j+a&&g<a&&b.scrollLeft(f.left+g-a)},_shift:function(a,b,d){var c=this.s.dt,f=c.page.info(),i=f.recordsDisplay,g=this._columns(),h=this.s.lastFocus;if(h){var j=h.cell;j&&((h=c.rows({filter:"applied",order:"applied"}).indexes().indexOf(j.index().row),f.serverSide&&(h+=f.start),c=c.columns(g).indexes().indexOf(j.index().column),
f=h,h=g[c],"right"===b?c>=g.length-1?(f++,h=g[0]):h=g[c+1]:"left"===b?0===c?(f--,h=g[g.length-1]):h=g[c-1]:"up"===b?f--:"down"===b&&f++,0<=f&&f<i&&-1!==e.inArray(h,g))?(a&&a.preventDefault(),this._focus(f,h,!0,a)):!d||!this.c.blurable?a&&a.preventDefault():this._blur())}},_tabInput:function(){var a=this,b=this.s.dt,d=null!==this.c.tabIndex?this.c.tabIndex:b.settings()[0].iTabIndex;-1!=d&&(this.s.tabInput||(d=e('<div><input type="text" tabindex="'+d+'"/></div>').css({position:"absolute",height:1,width:0,
overflow:"hidden"}),d.children().on("focus",function(c){var d=b.cell(":eq(0)",a._columns(),{page:"current"});d.any()&&a._focus(d,null,!0,c)}),this.s.tabInput=d),(d=this.s.dt.cell(":eq(0)","0:visible",{page:"current",order:"current"}).node())&&e(d).prepend(this.s.tabInput))},_updateFixedColumns:function(a){var b=this.s.dt,d=b.settings()[0];if(d._oFixedColumns){var c=d.aoColumns.length-d._oFixedColumns.s.iRightColumns;(a<d._oFixedColumns.s.iLeftColumns||a>=c)&&b.fixedColumns().update()}}});m.defaults=
{blurable:!0,className:"focus",clipboard:!0,clipboardOrthogonal:"display",columns:"",editor:null,editOnFocus:!1,focus:null,keys:null,tabIndex:null};m.version="2.6.1";e.fn.dataTable.KeyTable=m;e.fn.DataTable.KeyTable=m;l.Api.register("cell.blur()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.blur()})});l.Api.register("cell().focus()",function(){return this.iterator("cell",function(a,b,d){a.keytable&&a.keytable.focus(b,d)})});l.Api.register("keys.disable()",function(){return this.iterator("table",
function(a){a.keytable&&a.keytable.enable(!1)})});l.Api.register("keys.enable()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable.enable(a===n?!0:a)})});l.Api.register("keys.enabled()",function(){var a=this.context;return a.length?a[0].keytable?a[0].keytable.enabled():!1:!1});l.Api.register("keys.move()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable._shift(null,a,!1)})});l.ext.selector.cell.push(function(a,b,d){var b=b.focused,a=a.keytable,
c=[];if(!a||b===n)return d;for(var f=0,e=d.length;f<e;f++)(!0===b&&a.focused(d[f])||!1===b&&!a.focused(d[f]))&&c.push(d[f]);return c});e(k).on("preInit.dt.dtk",function(a,b){if("dt"===a.namespace){var d=b.oInit.keys,c=l.defaults.keys;if(d||c)c=e.extend({},c,d),!1!==d&&new m(b,c)}});return m});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(c){var h=0;return function(){return h<c.length?{done:!1,value:c[h++]}:{done:!0}}};$jscomp.arrayIterator=function(c){return{next:$jscomp.arrayIteratorImpl(c)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,h,k){if(c==Array.prototype||c==Object.prototype)return c;c[h]=k.value;return c};$jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var h=0;h<c.length;++h){var k=c[h];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(c,h){var k=$jscomp.propertyToPolyfillSymbol[h];if(null==k)return c[h];k=c[k];return void 0!==k?k:c[h]};
$jscomp.polyfill=function(c,h,k,m){h&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(c,h,k,m):$jscomp.polyfillUnisolated(c,h,k,m))};$jscomp.polyfillUnisolated=function(c,h,k,m){k=$jscomp.global;c=c.split(".");for(m=0;m<c.length-1;m++){var n=c[m];if(!(n in k))return;k=k[n]}c=c[c.length-1];m=k[c];h=h(m);h!=m&&null!=h&&$jscomp.defineProperty(k,c,{configurable:!0,writable:!0,value:h})};
$jscomp.polyfillIsolated=function(c,h,k,m){var n=c.split(".");c=1===n.length;m=n[0];m=!c&&m in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var u=0;u<n.length-1;u++){var w=n[u];if(!(w in m))return;m=m[w]}n=n[n.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?m[n]:null;h=h(k);null!=h&&(c?$jscomp.defineProperty($jscomp.polyfills,n,{configurable:!0,writable:!0,value:h}):h!==k&&($jscomp.propertyToPolyfillSymbol[n]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(n):$jscomp.POLYFILL_PREFIX+n,n=
$jscomp.propertyToPolyfillSymbol[n],$jscomp.defineProperty(m,n,{configurable:!0,writable:!0,value:h})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(c){if(c)return c;var h=function(n,u){this.$jscomp$symbol$id_=n;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:u})};h.prototype.toString=function(){return this.$jscomp$symbol$id_};var k=0,m=function(n){if(this instanceof m)throw new TypeError("Symbol is not a constructor");return new h("jscomp_symbol_"+(n||"")+"_"+k++,n)};return m},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol.iterator",function(c){if(c)return c;c=Symbol("Symbol.iterator");for(var h="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),k=0;k<h.length;k++){var m=$jscomp.global[h[k]];"function"===typeof m&&"function"!=typeof m.prototype[c]&&$jscomp.defineProperty(m.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return c},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(c){c={next:c};c[Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,h){c instanceof String&&(c+="");var k=0,m={next:function(){if(k<c.length){var n=k++;return{value:h(n,c[n]),done:!1}}m.next=function(){return{done:!0,value:void 0}};return m.next()}};m[Symbol.iterator]=function(){return m};return m};
$jscomp.polyfill("Array.prototype.keys",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(h){return h})}},"es6","es3");
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return c(h,window,document)}):"object"===typeof exports?module.exports=function(h,k){h||(h=window);k&&k.fn.dataTable||(k=require("datatables.net")(h,k).$);return c(k,h,h.document)}:c(jQuery,window,document)})(function(c,h,k,m){var n=c.fn.dataTable,u=0,w=0,t=function(a,b){if(!n.versionCheck||!n.versionCheck("1.10.8"))throw"KeyTable requires DataTables 1.10.8 or newer";this.c=c.extend(!0,{},n.defaults.keyTable,
t.defaults,b);this.s={dt:new n.Api(a),enable:!0,focusDraw:!1,waitingForDraw:!1,lastFocus:null,namespace:".keyTable-"+u++,tabInput:null};this.dom={};a=this.s.dt.settings()[0];if(b=a.keytable)return b;a.keytable=this;this._constructor()};c.extend(t.prototype,{blur:function(){this._blur()},enable:function(a){this.s.enable=a},enabled:function(){return this.s.enable},focus:function(a,b){this._focus(this.s.dt.cell(a,b))},focused:function(a){if(!this.s.lastFocus)return!1;var b=this.s.lastFocus.cell.index();
return a.row===b.row&&a.column===b.column},_constructor:function(){this._tabInput();var a=this,b=this.s.dt,e=c(b.table().node()),d=this.s.namespace,f=!1;"static"===e.css("position")&&e.css("position","relative");c(b.table().body()).on("click"+d,"th, td",function(g){if(!1!==a.s.enable){var q=b.cell(this);q.any()&&a._focus(q,null,!1,g)}});c(k).on("keydown"+d,function(g){f||a._key(g)});if(this.c.blurable)c(k).on("mousedown"+d,function(g){c(g.target).parents(".dataTables_filter").length&&a._blur();c(g.target).parents().filter(b.table().container()).length||
c(g.target).parents("div.DTE").length||c(g.target).parents("div.editor-datetime").length||c(g.target).parents("div.dt-datetime").length||c(g.target).parents().filter(".DTFC_Cloned").length||a._blur()});if(this.c.editor){var p=this.c.editor;p.on("open.keyTableMain",function(g,q,r){"inline"!==q&&a.s.enable&&(a.enable(!1),p.one("close"+d,function(){a.enable(!0)}))});if(this.c.editOnFocus)b.on("key-focus"+d+" key-refocus"+d,function(g,q,r,v){a._editor(null,v,!0)});b.on("key"+d,function(g,q,r,v,x){a._editor(r,
x,!1)});c(b.table().body()).on("dblclick"+d,"th, td",function(g){!1!==a.s.enable&&b.cell(this).any()&&(a.s.lastFocus&&this!==a.s.lastFocus.cell.node()||a._editor(null,g,!0))});p.on("preSubmit",function(){f=!0}).on("preSubmitCancelled",function(){f=!1}).on("submitComplete",function(){f=!1})}if(b.settings()[0].oFeatures.bStateSave)b.on("stateSaveParams"+d,function(g,q,r){r.keyTable=a.s.lastFocus?a.s.lastFocus.cell.index():null});b.on("column-visibility"+d,function(g){a._tabInput()});b.on("draw"+d,function(g){a._tabInput();
if(!a.s.focusDraw&&a.s.lastFocus){var q=a.s.lastFocus.relative,r=b.page.info(),v=q.row+r.start;0!==r.recordsDisplay&&(v>=r.recordsDisplay&&(v=r.recordsDisplay-1),a._focus(v,q.column,!0,g))}});this.c.clipboard&&this._clipboard();b.on("destroy"+d,function(){a._blur(!0);b.off(d);c(b.table().body()).off("click"+d,"th, td").off("dblclick"+d,"th, td");c(k).off("mousedown"+d).off("keydown"+d).off("copy"+d).off("paste"+d)});var l=b.state.loaded();if(l&&l.keyTable)b.one("init",function(){var g=b.cell(l.keyTable);
g.any()&&g.focus()});else this.c.focus&&b.cell(this.c.focus).focus()},_blur:function(a){if(this.s.enable&&this.s.lastFocus){var b=this.s.lastFocus.cell;c(b.node()).removeClass(this.c.className);this.s.lastFocus=null;a||(this._updateFixedColumns(b.index().column),this._emitEvent("key-blur",[this.s.dt,b]))}},_clipboard:function(){var a=this.s.dt,b=this,e=this.s.namespace;h.getSelection&&(c(k).on("copy"+e,function(d){d=d.originalEvent;var f=h.getSelection().toString(),p=b.s.lastFocus;!f&&p&&(d.clipboardData.setData("text/plain",
p.cell.render(b.c.clipboardOrthogonal)),d.preventDefault())}),c(k).on("paste"+e,function(d){var f=d.originalEvent,p=b.s.lastFocus,l=k.activeElement;d=b.c.editor;var g;!p||l&&"body"!==l.nodeName.toLowerCase()||(f.preventDefault(),h.clipboardData&&h.clipboardData.getData?g=h.clipboardData.getData("Text"):f.clipboardData&&f.clipboardData.getData&&(g=f.clipboardData.getData("text/plain")),d?(f=b._inlineOptions(p.cell.index()),d.inline(f.cell,f.field,f.options).set(d.displayed()[0],g).submit()):(p.cell.data(g),
a.draw(!1)))}))},_columns:function(){var a=this.s.dt,b=a.columns(this.c.columns).indexes(),e=[];a.columns(":visible").every(function(d){-1!==b.indexOf(d)&&e.push(d)});return e},_editor:function(a,b,e){if(this.s.lastFocus&&(!b||"draw"!==b.type)){var d=this,f=this.s.dt,p=this.c.editor,l=this.s.lastFocus.cell,g=this.s.namespace+"e"+w++;if(!(c("div.DTE",l.node()).length||null!==a&&(0<=a&&9>=a||11===a||12===a||14<=a&&31>=a||112<=a&&123>=a||127<=a&&159>=a))){b&&(b.stopPropagation(),13===a&&b.preventDefault());
var q=function(){var r=d._inlineOptions(l.index());p.one("open"+g,function(){p.off("cancelOpen"+g);e||c("div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea").select();f.keys.enable(e?"tab-only":"navigation-only");f.on("key-blur.editor",function(v,x,y){p.displayed()&&y.node()===l.node()&&p.submit()});e&&c(f.table().container()).addClass("dtk-focus-alt");p.on("preSubmitCancelled"+g,function(){setTimeout(function(){d._focus(l,null,!1)},50)});p.on("submitUnsuccessful"+g,function(){d._focus(l,
null,!1)});p.one("close"+g,function(){f.keys.enable(!0);f.off("key-blur.editor");p.off(g);c(f.table().container()).removeClass("dtk-focus-alt");d.s.returnSubmit&&(d.s.returnSubmit=!1,d._emitEvent("key-return-submit",[f,l]))})}).one("cancelOpen"+g,function(){p.off(g)}).inline(r.cell,r.field,r.options)};13===a?(e=!0,c(k).one("keyup",function(){q()})):q()}}},_inlineOptions:function(a){return this.c.editorOptions?this.c.editorOptions(a):{cell:a,field:m,options:m}},_emitEvent:function(a,b){this.s.dt.iterator("table",
function(e,d){c(e.nTable).triggerHandler(a,b)})},_focus:function(a,b,e,d){var f=this,p=this.s.dt,l=p.page.info(),g=this.s.lastFocus;d||(d=null);if(this.s.enable){if("number"!==typeof a){if(!a.any())return;var q=a.index();b=q.column;a=p.rows({filter:"applied",order:"applied"}).indexes().indexOf(q.row);if(0>a)return;l.serverSide&&(a+=l.start)}if(-1!==l.length&&(a<l.start||a>=l.start+l.length))this.s.focusDraw=!0,this.s.waitingForDraw=!0,p.one("draw",function(){f.s.focusDraw=!1;f.s.waitingForDraw=!1;
f._focus(a,b,m,d)}).page(Math.floor(a/l.length)).draw(!1);else if(-1!==c.inArray(b,this._columns())){l.serverSide&&(a-=l.start);l=p.cells(null,b,{search:"applied",order:"applied"}).flatten();l=p.cell(l[a]);if(g){if(g.node===l.node()){this._emitEvent("key-refocus",[this.s.dt,l,d||null]);return}this._blur()}this._removeOtherFocus();g=c(l.node());g.addClass(this.c.className);this._updateFixedColumns(b);if(e===m||!0===e)this._scroll(c(h),c(k.body),g,"offset"),e=p.table().body().parentNode,e!==p.table().header().parentNode&&
(e=c(e.parentNode),this._scroll(e,e,g,"position"));this.s.lastFocus={cell:l,node:l.node(),relative:{row:p.rows({page:"current"}).indexes().indexOf(l.index().row),column:l.index().column}};this._emitEvent("key-focus",[this.s.dt,l,d||null]);p.state.save()}}},_key:function(a){if(this.s.waitingForDraw)a.preventDefault();else{var b=this.s.enable;this.s.returnSubmit="navigation-only"!==b&&"tab-only"!==b||13!==a.keyCode?!1:!0;var e=!0===b||"navigation-only"===b;if(b&&(!(0===a.keyCode||a.ctrlKey||a.metaKey||
a.altKey)||a.ctrlKey&&a.altKey)){var d=this.s.lastFocus;if(d)if(this.s.dt.cell(d.node).any()){d=this.s.dt;var f=this.s.dt.settings()[0].oScroll.sY?!0:!1;if(!this.c.keys||-1!==c.inArray(a.keyCode,this.c.keys))switch(a.keyCode){case 9:this._shift(a,a.shiftKey?"left":"right",!0);break;case 27:this.c.blurable&&!0===b&&this._blur();break;case 33:case 34:e&&!f&&(a.preventDefault(),d.page(33===a.keyCode?"previous":"next").draw(!1));break;case 35:case 36:e&&(a.preventDefault(),b=d.cells({page:"current"}).indexes(),
e=this._columns(),this._focus(d.cell(b[35===a.keyCode?b.length-1:e[0]]),null,!0,a));break;case 37:e&&this._shift(a,"left");break;case 38:e&&this._shift(a,"up");break;case 39:e&&this._shift(a,"right");break;case 40:e&&this._shift(a,"down");break;case 113:if(this.c.editor){this._editor(null,a,!0);break}default:!0===b&&this._emitEvent("key",[d,a.keyCode,this.s.lastFocus.cell,a])}}else this.s.lastFocus=null}}},_removeOtherFocus:function(){var a=this.s.dt.table().node();c.fn.dataTable.tables({api:!0}).iterator("table",
function(b){this.table().node()!==a&&this.cell.blur()})},_scroll:function(a,b,e,d){var f=e[d](),p=e.outerHeight(),l=e.outerWidth(),g=b.scrollTop(),q=b.scrollLeft(),r=a.height();a=a.width();"position"===d&&(f.top+=parseInt(e.closest("table").css("top"),10));f.top<g&&b.scrollTop(f.top);f.left<q&&b.scrollLeft(f.left);f.top+p>g+r&&p<r&&b.scrollTop(f.top+p-r);f.left+l>q+a&&l<a&&b.scrollLeft(f.left+l-a)},_shift:function(a,b,e){var d=this.s.dt,f=d.page.info(),p=f.recordsDisplay,l=this._columns(),g=this.s.lastFocus;
if(g){var q=g.cell;q&&(g=d.rows({filter:"applied",order:"applied"}).indexes().indexOf(q.index().row),f.serverSide&&(g+=f.start),f=d.columns(l).indexes().indexOf(q.index().column),q=l[f],"rtl"===c(d.table().node()).css("direction")&&("right"===b?b="left":"left"===b&&(b="right")),"right"===b?f>=l.length-1?(g++,q=l[0]):q=l[f+1]:"left"===b?0===f?(g--,q=l[l.length-1]):q=l[f-1]:"up"===b?g--:"down"===b&&g++,0<=g&&g<p&&-1!==c.inArray(q,l)?(a&&a.preventDefault(),this._focus(g,q,!0,a)):e&&this.c.blurable?this._blur():
a&&a.preventDefault())}},_tabInput:function(){var a=this,b=this.s.dt,e=null!==this.c.tabIndex?this.c.tabIndex:b.settings()[0].iTabIndex;-1!=e&&(this.s.tabInput||(e=c('<div><input type="text" tabindex="'+e+'"/></div>').css({position:"absolute",height:1,width:0,overflow:"hidden"}),e.children().on("focus",function(d){var f=b.cell(":eq(0)",a._columns(),{page:"current"});f.any()&&a._focus(f,null,!0,d)}),this.s.tabInput=e),(e=this.s.dt.cell(":eq(0)","0:visible",{page:"current",order:"current"}).node())&&
c(e).prepend(this.s.tabInput))},_updateFixedColumns:function(a){var b=this.s.dt,e=b.settings()[0];if(e._oFixedColumns){var d=e.aoColumns.length-e._oFixedColumns.s.iRightColumns;(a<e._oFixedColumns.s.iLeftColumns||a>=d)&&b.fixedColumns().update()}}});t.defaults={blurable:!0,className:"focus",clipboard:!0,clipboardOrthogonal:"display",columns:"",editor:null,editOnFocus:!1,editorOptions:null,focus:null,keys:null,tabIndex:null};t.version="2.6.4";c.fn.dataTable.KeyTable=t;c.fn.DataTable.KeyTable=t;n.Api.register("cell.blur()",
function(){return this.iterator("table",function(a){a.keytable&&a.keytable.blur()})});n.Api.register("cell().focus()",function(){return this.iterator("cell",function(a,b,e){a.keytable&&a.keytable.focus(b,e)})});n.Api.register("keys.disable()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.enable(!1)})});n.Api.register("keys.enable()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable.enable(a===m?!0:a)})});n.Api.register("keys.enabled()",function(a){a=
this.context;return a.length?a[0].keytable?a[0].keytable.enabled():!1:!1});n.Api.register("keys.move()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable._shift(null,a,!1)})});n.ext.selector.cell.push(function(a,b,e){b=b.focused;a=a.keytable;var d=[];if(!a||b===m)return e;for(var f=0,p=e.length;f<p;f++)(!0===b&&a.focused(e[f])||!1===b&&!a.focused(e[f]))&&d.push(e[f]);return d});c(k).on("preInit.dt.dtk",function(a,b,e){"dt"===a.namespace&&(a=b.oInit.keys,e=n.defaults.keys,
a||e)&&(e=c.extend({},e,a),!1!==a&&new t(b,e))});return t});

View file

@ -2,4 +2,4 @@
Bootstrap 4 styling wrapper for KeyTable
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-keytable"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.KeyTable||require("datatables.net-keytable")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){return c.fn.dataTable});
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-keytable"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs4")(a,b).$);b.fn.dataTable.KeyTable||require("datatables.net-keytable")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});

View file

@ -183,8 +183,3 @@ div.dtr-modal div.dtr-modal-background {
div.dtr-bs-modal table.table tr:first-child td {
border-top: none;
}
table.dataTable.dtr-inline.collapsed.table-sm > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed.table-sm > tbody > tr > th:first-child:before {
top: 5px;
}

View file

@ -1 +1 @@
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before{top:50%;left:5px;height:1em;width:1em;margin-top:-9px;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before{content:"-";background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control:before{left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:.8em;width:.8em;margin-top:-0.5em;margin-left:-0.5em;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-column>tbody>tr.parent td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent th.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:"-";background-color:#d33333}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:.5em;box-shadow:0 12px 30px rgba(0, 0, 0, 0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0, 0, 0, 0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none}table.dataTable.dtr-inline.collapsed.table-sm>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.table-sm>tbody>tr>th:first-child:before{top:5px}
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before{top:50%;left:5px;height:1em;width:1em;margin-top:-9px;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before{content:"-";background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control:before{left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:.8em;width:.8em;margin-top:-0.5em;margin-left:-0.5em;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-column>tbody>tr.parent td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent th.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:"-";background-color:#d33333}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:.5em;box-shadow:0 12px 30px rgba(0, 0, 0, 0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0, 0, 0, 0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none}

View file

@ -1,11 +1,11 @@
/*! Responsive 2.2.7
/*! Responsive 2.2.9
* 2014-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary Responsive
* @description Responsive tables plug-in for DataTables
* @version 2.2.7
* @version 2.2.9
* @file dataTables.responsive.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
@ -1443,7 +1443,7 @@ Api.registerPlural( 'columns().responsiveHidden()', 'column().responsiveHidden()
* @name Responsive.version
* @static
*/
Responsive.version = '2.2.7';
Responsive.version = '2.2.9';
$.fn.dataTable.Responsive = Responsive;

View file

@ -1,32 +1,48 @@
/*!
Responsive 2.2.7
Copyright 2014-2021 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
Responsive 2.2.9
2014-2021 SpryMedia Ltd - datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(m){return d(m,window,document)}):"object"===typeof exports?module.exports=function(m,l){m||(m=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(m,l).$;return d(l,m,m.document)}:d(jQuery,window,document)})(function(d,m,l,q){function t(a,b,c){var e=b+"-"+c;if(n[e])return n[e];for(var d=[],a=a.cell(b,c).node().childNodes,b=0,c=a.length;b<c;b++)d.push(a[b]);return n[e]=d}function r(a,b,c){var e=b+
"-"+c;if(n[e]){for(var a=a.cell(b,c).node(),c=n[e][0].parentNode.childNodes,b=[],d=0,g=c.length;d<g;d++)b.push(c[d]);c=0;for(d=b.length;c<d;c++)a.appendChild(b[c]);n[e]=q}}var o=d.fn.dataTable,i=function(a,b){if(!o.versionCheck||!o.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new o.Api(a),columns:[],current:[]};this.s.dt.settings()[0].responsive||(b&&"string"===typeof b.details?b.details={type:b.details}:b&&!1===b.details?b.details={type:!1}:
b&&!0===b.details&&(b.details={type:"inline"}),this.c=d.extend(!0,{},i.defaults,o.defaults.responsive,b),a.responsive=this,this._constructor())};d.extend(i.prototype,{_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],e=d(m).innerWidth();b.settings()[0]._responsive=this;d(m).on("resize.dtr orientationchange.dtr",o.util.throttle(function(){var b=d(m).innerWidth();b!==e&&(a._resize(),e=b)}));c.oApi._fnCallbackReg(c,"aoRowCreatedCallback",function(c){-1!==d.inArray(!1,a.s.current)&&d(">td, >th",
c).each(function(c){c=b.column.index("toData",c);!1===a.s.current[c]&&d(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");d(b.table().body()).off(".dtr");d(m).off("resize.dtr orientationchange.dtr");b.cells(".dtr-control").nodes().to$().removeClass("dtr-control");d.each(a.s.current,function(b,c){!1===c&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.width<b.width?1:a.width>b.width?-1:0});this._classLogic();this._resizeAuto();c=this.c.details;!1!==
c.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._timer&&clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize(!0);a._redrawChildren()},100)}),b.on("draw.dtr",function(){a._redrawChildren()}),d(b.table().node()).addClass("dtr-"+c.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize(true)});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("preXhr.dtr",function(){var c=[];
b.rows().every(function(){this.child.isShown()&&c.push(this.id(true))});b.one("draw.dtr",function(){a._resizeAuto();a._resize();b.rows(c).every(function(){a._detailsDisplay(this,false)})})});b.on("draw.dtr",function(){a._controlClass()}).on("init.dtr",function(c){if(c.namespace==="dt"){a._resizeAuto();a._resize();d.inArray(false,a.s.current)&&b.columns.adjust()}});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,c=this.s.columns,e,f,g=c.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,
b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),j=d.map(c,function(c,e){return!1===b.column(e).visible()?"not-visible":c.auto&&null===c.minWidth?!1:!0===c.auto?"-":-1!==d.inArray(a,c.includeIn)}),h=0;e=0;for(f=j.length;e<f;e++)!0===j[e]&&(h+=c[e].minWidth);e=b.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;h=b.table().container().offsetWidth-e-h;e=0;for(f=j.length;e<f;e++)c[e].control&&(h-=c[e].minWidth);var s=!1;e=0;for(f=g.length;e<f;e++){var k=g[e].columnIdx;
"-"===j[k]&&(!c[k].control&&c[k].minWidth)&&(s||0>h-c[k].minWidth?(s=!0,j[k]=!1):j[k]=!0,h-=c[k].minWidth)}g=!1;e=0;for(f=c.length;e<f;e++)if(!c[e].control&&!c[e].never&&!1===j[e]){g=!0;break}e=0;for(f=c.length;e<f;e++)c[e].control&&(j[e]=g),"not-visible"===j[e]&&(j[e]=!1);-1===d.inArray(!0,j)&&(j[0]=!0);return j},_classLogic:function(){var a=this,b=this.c.breakpoints,c=this.s.dt,e=c.columns().eq(0).map(function(a){var b=this.column(a),e=b.header().className,a=c.settings()[0].aoColumns[a].responsivePriority,
b=b.header().getAttribute("data-priority");a===q&&(a=b===q||null===b?1E4:1*b);return{className:e,includeIn:[],auto:!1,control:!1,never:e.match(/\bnever\b/)?!0:!1,priority:a}}),f=function(a,b){var c=e[a].includeIn;-1===d.inArray(b,c)&&c.push(b)},g=function(c,d,g,k){if(g)if("max-"===g){k=a._find(d).width;d=0;for(g=b.length;d<g;d++)b[d].width<=k&&f(c,b[d].name)}else if("min-"===g){k=a._find(d).width;d=0;for(g=b.length;d<g;d++)b[d].width>=k&&f(c,b[d].name)}else{if("not-"===g){d=0;for(g=b.length;d<g;d++)-1===
b[d].name.indexOf(k)&&f(c,b[d].name)}}else e[c].includeIn.push(d)};e.each(function(a,c){for(var e=a.className.split(" "),f=!1,i=0,m=e.length;i<m;i++){var l=e[i].trim();if("all"===l){f=!0;a.includeIn=d.map(b,function(a){return a.name});return}if("none"===l||a.never){f=!0;return}if("control"===l||"dtr-control"===l){f=!0;a.control=!0;return}d.each(b,function(a,b){var d=b.name.split("-"),e=l.match(RegExp("(min\\-|max\\-|not\\-)?("+d[0]+")(\\-[_a-zA-Z0-9])?"));e&&(f=!0,e[2]===d[0]&&e[3]==="-"+d[1]?g(c,
b.name,e[1],e[2]+e[3]):e[2]===d[0]&&!e[3]&&g(c,b.name,e[1],e[2]))})}f||(a.auto=!0)});this.s.columns=e},_controlClass:function(){if("inline"===this.c.details.type){var a=this.s.dt,b=d.inArray(!0,this.s.current);a.cells(null,function(a){return a!==b},{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control");a.cells(null,b,{page:"current"}).nodes().to$().addClass("dtr-control")}},_detailsDisplay:function(a,b){var c=this,e=this.s.dt,f=this.c.details;if(f&&!1!==f.type){var g=f.display(a,
b,function(){return f.renderer(e,a[0],c._detailsObj(a[0]))});(!0===g||!1===g)&&d(e.table().node()).triggerHandler("responsive-display.dt",[e,a,g,b])}},_detailsInit:function(){var a=this,b=this.s.dt,c=this.c.details;"inline"===c.type&&(c.target="td.dtr-control, th.dtr-control");b.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();d(b.table().body()).on("keyup.dtr","td, th",function(a){a.keyCode===13&&d(this).data("dtr-keyboard")&&d(this).click()});var e=c.target;if(e!==q||null!==e)d(b.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",
"string"===typeof e?e:"td, th",function(c){if(d(b.table().node()).hasClass("collapsed")&&d.inArray(d(this).closest("tr").get(0),b.rows().nodes().toArray())!==-1){if(typeof e==="number"){var g=e<0?b.columns().eq(0).length+e:e;if(b.cell(this).index().column!==g)return}g=b.row(d(this).closest("tr"));c.type==="click"?a._detailsDisplay(g,false):c.type==="mousedown"?d(this).css("outline","none"):c.type==="mouseup"&&d(this).trigger("blur").css("outline","")}})},_detailsObj:function(a){var b=this,c=this.s.dt;
return d.map(this.s.columns,function(e,f){if(!e.never&&!e.control){var g=c.settings()[0].aoColumns[f];return{className:g.sClass,columnIndex:f,data:c.cell(a,f).render(b.c.orthogonal),hidden:c.column(f).visible()&&!b.s.current[f],rowIndex:a,title:null!==g.sTitle?g.sTitle:d(c.column(f).header()).text()}}})},_find:function(a){for(var b=this.c.breakpoints,c=0,d=b.length;c<d;c++)if(b[c].name===a)return b[c]},_redrawChildren:function(){var a=this,b=this.s.dt;b.rows({page:"current"}).iterator("row",function(c,
d){b.row(d);a._detailsDisplay(b.row(d),!0)})},_resize:function(a){var b=this,c=this.s.dt,e=d(m).innerWidth(),f=this.c.breakpoints,g=f[0].name,j=this.s.columns,h,i=this.s.current.slice();for(h=f.length-1;0<=h;h--)if(e<=f[h].width){g=f[h].name;break}var k=this._columnsVisiblity(g);this.s.current=k;f=!1;h=0;for(e=j.length;h<e;h++)if(!1===k[h]&&!j[h].never&&!j[h].control&&!1===!c.column(h).visible()){f=!0;break}d(c.table().node()).toggleClass("collapsed",f);var l=!1,n=0;c.columns().eq(0).each(function(c,
d){!0===k[d]&&n++;if(a||k[d]!==i[d])l=!0,b._setColumnVis(c,k[d])});l&&(this._redrawChildren(),d(c.table().node()).trigger("responsive-resize.dt",[c,this.s.current]),0===c.page.info().recordsDisplay&&d("td",c.table().body()).eq(0).attr("colspan",n));b._controlClass()},_resizeAuto:function(){var a=this.s.dt,b=this.s.columns;if(this.c.auto&&-1!==d.inArray(!0,d.map(b,function(a){return a.auto}))){d.isEmptyObject(n)||d.each(n,function(b){b=b.split("-");r(a,1*b[0],1*b[1])});a.table().node();var c=a.table().node().cloneNode(!1),
e=d(a.table().header().cloneNode(!1)).appendTo(c),f=d(a.table().body()).clone(!1,!1).empty().appendTo(c);c.style.width="auto";var g=a.columns().header().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell").css("width","auto").css("min-width",0);d(f).append(d(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(f=a.table().footer()){var f=d(f.cloneNode(!1)).appendTo(c),j=a.columns().footer().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display",
"table-cell");d("<tr/>").append(j).appendTo(f)}d("<tr/>").append(g).appendTo(e);"inline"===this.c.details.type&&d(c).addClass("dtr-inline collapsed");d(c).find("[name]").removeAttr("name");d(c).css("position","relative");c=d("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(c);c.insertBefore(a.table().node());g.each(function(d){d=a.column.index("fromVisible",d);b[d].minWidth=this.offsetWidth||0});c.remove()}},_responsiveOnlyHidden:function(){var a=this.s.dt;return d.map(this.s.current,
function(b,d){return!1===a.column(d).visible()?!0:b})},_setColumnVis:function(a,b){var c=this.s.dt,e=b?"":"none";d(c.column(a).header()).css("display",e);d(c.column(a).footer()).css("display",e);c.column(a).nodes().to$().css("display",e);d.isEmptyObject(n)||c.cells(null,a).indexes().each(function(a){r(c,a.row,a.column)})},_tabIndexes:function(){var a=this.s.dt,b=a.cells({page:"current"}).nodes().to$(),c=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");
"number"===typeof e?a.cells(null,e,{page:"current"}).nodes().to$().attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===e&&(e=">td:first-child, >th:first-child"),d(e,a.rows({page:"current"}).nodes()).attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1))}});i.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];i.display={childRow:function(a,b,c){if(b){if(d(a.node()).hasClass("parent"))return a.child(c(),
"child").show(),!0}else{if(a.child.isShown())return a.child(!1),d(a.node()).removeClass("parent"),!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,c){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),d(a.node()).removeClass("parent"),!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0},modal:function(a){return function(b,c,e){if(c)d("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();
d(l).off("keypress.dtr")},g=d('<div class="dtr-modal"/>').append(d('<div class="dtr-modal-display"/>').append(d('<div class="dtr-modal-content"/>').append(e())).append(d('<div class="dtr-modal-close">&times;</div>').click(function(){f()}))).append(d('<div class="dtr-modal-background"/>').click(function(){f()})).appendTo("body");d(l).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&d("div.dtr-modal-content").prepend("<h2>"+a.header(b)+"</h2>")}}};var n={};i.renderer=
{listHiddenNodes:function(){return function(a,b,c){var e=d('<ul data-dtr-index="'+b+'" class="dtr-details"/>'),f=!1;d.each(c,function(b,c){c.hidden&&(d("<li "+(c.className?'class="'+c.className+'"':"")+' data-dtr-index="'+c.columnIndex+'" data-dt-row="'+c.rowIndex+'" data-dt-column="'+c.columnIndex+'"><span class="dtr-title">'+c.title+"</span> </li>").append(d('<span class="dtr-data"/>').append(t(a,c.rowIndex,c.columnIndex))).appendTo(e),f=!0)});return f?e:!1}},listHidden:function(){return function(a,
b,c){return(a=d.map(c,function(a){var b=a.className?'class="'+a.className+'"':"";return a.hidden?"<li "+b+' data-dtr-index="'+a.columnIndex+'" data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><span class="dtr-title">'+a.title+'</span> <span class="dtr-data">'+a.data+"</span></li>":""}).join(""))?d('<ul data-dtr-index="'+b+'" class="dtr-details"/>').append(a):!1}},tableAll:function(a){a=d.extend({tableClass:""},a);return function(b,c,e){b=d.map(e,function(a){return"<tr "+(a.className?
'class="'+a.className+'"':"")+' data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><td>'+a.title+":</td> <td>"+a.data+"</td></tr>"}).join("");return d('<table class="'+a.tableClass+' dtr-details" width="100%"/>').append(b)}}};i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var p=d.fn.dataTable.Api;p.register("responsive()",function(){return this});p.register("responsive.index()",
function(a){a=d(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});p.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});p.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});p.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==d.inArray(!1,a._responsive._responsiveOnlyHidden()):
!1});p.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,b){return a._responsive?a._responsive._responsiveOnlyHidden()[b]:!1},1)});i.version="2.2.7";d.fn.dataTable.Responsive=i;d.fn.DataTable.Responsive=i;d(l).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(d(b.nTable).hasClass("responsive")||d(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||o.defaults.responsive)){var c=b.oInit.responsive;!1!==c&&new i(b,
d.isPlainObject(c)?c:{})}});return i});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,k,m){b instanceof String&&(b=String(b));for(var n=b.length,p=0;p<n;p++){var y=b[p];if(k.call(m,y,p,b))return{i:p,v:y}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,k,m){if(b==Array.prototype||b==Object.prototype)return b;b[k]=m.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var k=0;k<b.length;++k){var m=b[k];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,k){var m=$jscomp.propertyToPolyfillSymbol[k];if(null==m)return b[k];m=b[m];return void 0!==m?m:b[k]};
$jscomp.polyfill=function(b,k,m,n){k&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,k,m,n):$jscomp.polyfillUnisolated(b,k,m,n))};$jscomp.polyfillUnisolated=function(b,k,m,n){m=$jscomp.global;b=b.split(".");for(n=0;n<b.length-1;n++){var p=b[n];if(!(p in m))return;m=m[p]}b=b[b.length-1];n=m[b];k=k(n);k!=n&&null!=k&&$jscomp.defineProperty(m,b,{configurable:!0,writable:!0,value:k})};
$jscomp.polyfillIsolated=function(b,k,m,n){var p=b.split(".");b=1===p.length;n=p[0];n=!b&&n in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<p.length-1;y++){var z=p[y];if(!(z in n))return;n=n[z]}p=p[p.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?n[p]:null;k=k(m);null!=k&&(b?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:k}):k!==m&&($jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+p,p=
$jscomp.propertyToPolyfillSymbol[p],$jscomp.defineProperty(n,p,{configurable:!0,writable:!0,value:k})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(k,m){return $jscomp.findInternal(this,k,m).v}},"es6","es3");
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(k){return b(k,window,document)}):"object"===typeof exports?module.exports=function(k,m){k||(k=window);m&&m.fn.dataTable||(m=require("datatables.net")(k,m).$);return b(m,k,k.document)}:b(jQuery,window,document)})(function(b,k,m,n){function p(a,c,d){var f=c+"-"+d;if(A[f])return A[f];var g=[];a=a.cell(c,d).node().childNodes;c=0;for(d=a.length;c<d;c++)g.push(a[c]);return A[f]=g}function y(a,c,d){var f=c+"-"+
d;if(A[f]){a=a.cell(c,d).node();d=A[f][0].parentNode.childNodes;c=[];for(var g=0,l=d.length;g<l;g++)c.push(d[g]);d=0;for(g=c.length;d<g;d++)a.appendChild(c[d]);A[f]=n}}var z=b.fn.dataTable,u=function(a,c){if(!z.versionCheck||!z.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new z.Api(a),columns:[],current:[]};this.s.dt.settings()[0].responsive||(c&&"string"===typeof c.details?c.details={type:c.details}:c&&!1===c.details?c.details={type:!1}:c&&
!0===c.details&&(c.details={type:"inline"}),this.c=b.extend(!0,{},u.defaults,z.defaults.responsive,c),a.responsive=this,this._constructor())};b.extend(u.prototype,{_constructor:function(){var a=this,c=this.s.dt,d=c.settings()[0],f=b(k).innerWidth();c.settings()[0]._responsive=this;b(k).on("resize.dtr orientationchange.dtr",z.util.throttle(function(){var g=b(k).innerWidth();g!==f&&(a._resize(),f=g)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(g,l,h){-1!==b.inArray(!1,a.s.current)&&b(">td, >th",
g).each(function(e){e=c.column.index("toData",e);!1===a.s.current[e]&&b(this).css("display","none")})});c.on("destroy.dtr",function(){c.off(".dtr");b(c.table().body()).off(".dtr");b(k).off("resize.dtr orientationchange.dtr");c.cells(".dtr-control").nodes().to$().removeClass("dtr-control");b.each(a.s.current,function(g,l){!1===l&&a._setColumnVis(g,!0)})});this.c.breakpoints.sort(function(g,l){return g.width<l.width?1:g.width>l.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==
d.type&&(a._detailsInit(),c.on("column-visibility.dtr",function(){a._timer&&clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize(!0);a._redrawChildren()},100)}),c.on("draw.dtr",function(){a._redrawChildren()}),b(c.table().node()).addClass("dtr-"+d.type));c.on("column-reorder.dtr",function(g,l,h){a._classLogic();a._resizeAuto();a._resize(!0)});c.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});c.on("preXhr.dtr",function(){var g=
[];c.rows().every(function(){this.child.isShown()&&g.push(this.id(!0))});c.one("draw.dtr",function(){a._resizeAuto();a._resize();c.rows(g).every(function(){a._detailsDisplay(this,!1)})})});c.on("draw.dtr",function(){a._controlClass()}).on("init.dtr",function(g,l,h){"dt"===g.namespace&&(a._resizeAuto(),a._resize(),b.inArray(!1,a.s.current)&&c.columns.adjust())});this._resize()},_columnsVisiblity:function(a){var c=this.s.dt,d=this.s.columns,f,g=d.map(function(t,v){return{columnIdx:v,priority:t.priority}}).sort(function(t,
v){return t.priority!==v.priority?t.priority-v.priority:t.columnIdx-v.columnIdx}),l=b.map(d,function(t,v){return!1===c.column(v).visible()?"not-visible":t.auto&&null===t.minWidth?!1:!0===t.auto?"-":-1!==b.inArray(a,t.includeIn)}),h=0;var e=0;for(f=l.length;e<f;e++)!0===l[e]&&(h+=d[e].minWidth);e=c.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;h=c.table().container().offsetWidth-e-h;e=0;for(f=l.length;e<f;e++)d[e].control&&(h-=d[e].minWidth);var r=!1;e=0;for(f=g.length;e<f;e++){var q=g[e].columnIdx;
"-"===l[q]&&!d[q].control&&d[q].minWidth&&(r||0>h-d[q].minWidth?(r=!0,l[q]=!1):l[q]=!0,h-=d[q].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&!1===l[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(l[e]=g),"not-visible"===l[e]&&(l[e]=!1);-1===b.inArray(!0,l)&&(l[0]=!0);return l},_classLogic:function(){var a=this,c=this.c.breakpoints,d=this.s.dt,f=d.columns().eq(0).map(function(h){var e=this.column(h),r=e.header().className;h=d.settings()[0].aoColumns[h].responsivePriority;
e=e.header().getAttribute("data-priority");h===n&&(h=e===n||null===e?1E4:1*e);return{className:r,includeIn:[],auto:!1,control:!1,never:r.match(/\bnever\b/)?!0:!1,priority:h}}),g=function(h,e){h=f[h].includeIn;-1===b.inArray(e,h)&&h.push(e)},l=function(h,e,r,q){if(!r)f[h].includeIn.push(e);else if("max-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width<=q&&g(h,c[e].name);else if("min-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width>=q&&g(h,c[e].name);else if("not-"===r)for(e=
0,r=c.length;e<r;e++)-1===c[e].name.indexOf(q)&&g(h,c[e].name)};f.each(function(h,e){for(var r=h.className.split(" "),q=!1,t=0,v=r.length;t<v;t++){var B=r[t].trim();if("all"===B){q=!0;h.includeIn=b.map(c,function(w){return w.name});return}if("none"===B||h.never){q=!0;return}if("control"===B||"dtr-control"===B){q=!0;h.control=!0;return}b.each(c,function(w,D){w=D.name.split("-");var x=B.match(new RegExp("(min\\-|max\\-|not\\-)?("+w[0]+")(\\-[_a-zA-Z0-9])?"));x&&(q=!0,x[2]===w[0]&&x[3]==="-"+w[1]?l(e,
D.name,x[1],x[2]+x[3]):x[2]!==w[0]||x[3]||l(e,D.name,x[1],x[2]))})}q||(h.auto=!0)});this.s.columns=f},_controlClass:function(){if("inline"===this.c.details.type){var a=this.s.dt,c=b.inArray(!0,this.s.current);a.cells(null,function(d){return d!==c},{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control");a.cells(null,c,{page:"current"}).nodes().to$().addClass("dtr-control")}},_detailsDisplay:function(a,c){var d=this,f=this.s.dt,g=this.c.details;if(g&&!1!==g.type){var l=g.display(a,
c,function(){return g.renderer(f,a[0],d._detailsObj(a[0]))});!0!==l&&!1!==l||b(f.table().node()).triggerHandler("responsive-display.dt",[f,a,l,c])}},_detailsInit:function(){var a=this,c=this.s.dt,d=this.c.details;"inline"===d.type&&(d.target="td.dtr-control, th.dtr-control");c.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();b(c.table().body()).on("keyup.dtr","td, th",function(g){13===g.keyCode&&b(this).data("dtr-keyboard")&&b(this).click()});var f=d.target;d="string"===typeof f?f:"td, th";
if(f!==n||null!==f)b(c.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",d,function(g){if(b(c.table().node()).hasClass("collapsed")&&-1!==b.inArray(b(this).closest("tr").get(0),c.rows().nodes().toArray())){if("number"===typeof f){var l=0>f?c.columns().eq(0).length+f:f;if(c.cell(this).index().column!==l)return}l=c.row(b(this).closest("tr"));"click"===g.type?a._detailsDisplay(l,!1):"mousedown"===g.type?b(this).css("outline","none"):"mouseup"===g.type&&b(this).trigger("blur").css("outline","")}})},
_detailsObj:function(a){var c=this,d=this.s.dt;return b.map(this.s.columns,function(f,g){if(!f.never&&!f.control)return f=d.settings()[0].aoColumns[g],{className:f.sClass,columnIndex:g,data:d.cell(a,g).render(c.c.orthogonal),hidden:d.column(g).visible()&&!c.s.current[g],rowIndex:a,title:null!==f.sTitle?f.sTitle:b(d.column(g).header()).text()}})},_find:function(a){for(var c=this.c.breakpoints,d=0,f=c.length;d<f;d++)if(c[d].name===a)return c[d]},_redrawChildren:function(){var a=this,c=this.s.dt;c.rows({page:"current"}).iterator("row",
function(d,f){c.row(f);a._detailsDisplay(c.row(f),!0)})},_resize:function(a){var c=this,d=this.s.dt,f=b(k).innerWidth(),g=this.c.breakpoints,l=g[0].name,h=this.s.columns,e,r=this.s.current.slice();for(e=g.length-1;0<=e;e--)if(f<=g[e].width){l=g[e].name;break}var q=this._columnsVisiblity(l);this.s.current=q;g=!1;e=0;for(f=h.length;e<f;e++)if(!1===q[e]&&!h[e].never&&!h[e].control&&!1===!d.column(e).visible()){g=!0;break}b(d.table().node()).toggleClass("collapsed",g);var t=!1,v=0;d.columns().eq(0).each(function(B,
w){!0===q[w]&&v++;if(a||q[w]!==r[w])t=!0,c._setColumnVis(B,q[w])});t&&(this._redrawChildren(),b(d.table().node()).trigger("responsive-resize.dt",[d,this.s.current]),0===d.page.info().recordsDisplay&&b("td",d.table().body()).eq(0).attr("colspan",v));c._controlClass()},_resizeAuto:function(){var a=this.s.dt,c=this.s.columns;if(this.c.auto&&-1!==b.inArray(!0,b.map(c,function(e){return e.auto}))){b.isEmptyObject(A)||b.each(A,function(e){e=e.split("-");y(a,1*e[0],1*e[1])});a.table().node();var d=a.table().node().cloneNode(!1),
f=b(a.table().header().cloneNode(!1)).appendTo(d),g=b(a.table().body()).clone(!1,!1).empty().appendTo(d);d.style.width="auto";var l=a.columns().header().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display","table-cell").css("width","auto").css("min-width",0);b(g).append(b(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(g=a.table().footer()){g=b(g.cloneNode(!1)).appendTo(d);var h=a.columns().footer().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display",
"table-cell");b("<tr/>").append(h).appendTo(g)}b("<tr/>").append(l).appendTo(f);"inline"===this.c.details.type&&b(d).addClass("dtr-inline collapsed");b(d).find("[name]").removeAttr("name");b(d).css("position","relative");d=b("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(d);d.insertBefore(a.table().node());l.each(function(e){e=a.column.index("fromVisible",e);c[e].minWidth=this.offsetWidth||0});d.remove()}},_responsiveOnlyHidden:function(){var a=this.s.dt;return b.map(this.s.current,
function(c,d){return!1===a.column(d).visible()?!0:c})},_setColumnVis:function(a,c){var d=this.s.dt;c=c?"":"none";b(d.column(a).header()).css("display",c);b(d.column(a).footer()).css("display",c);d.column(a).nodes().to$().css("display",c);b.isEmptyObject(A)||d.cells(null,a).indexes().each(function(f){y(d,f.row,f.column)})},_tabIndexes:function(){var a=this.s.dt,c=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],f=this.c.details.target;c.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");
"number"===typeof f?a.cells(null,f,{page:"current"}).nodes().to$().attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===f&&(f=">td:first-child, >th:first-child"),b(f,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1))}});u.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];u.display={childRow:function(a,c,d){if(c){if(b(a.node()).hasClass("parent"))return a.child(d(),
"child").show(),!0}else{if(a.child.isShown())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,c,d){if(!c&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0},modal:function(a){return function(c,d,f){if(d)b("div.dtr-modal-content").empty().append(f());else{var g=function(){l.remove();
b(m).off("keypress.dtr")},l=b('<div class="dtr-modal"/>').append(b('<div class="dtr-modal-display"/>').append(b('<div class="dtr-modal-content"/>').append(f())).append(b('<div class="dtr-modal-close">&times;</div>').click(function(){g()}))).append(b('<div class="dtr-modal-background"/>').click(function(){g()})).appendTo("body");b(m).on("keyup.dtr",function(h){27===h.keyCode&&(h.stopPropagation(),g())})}a&&a.header&&b("div.dtr-modal-content").prepend("<h2>"+a.header(c)+"</h2>")}}};var A={};u.renderer=
{listHiddenNodes:function(){return function(a,c,d){var f=b('<ul data-dtr-index="'+c+'" class="dtr-details"/>'),g=!1;b.each(d,function(l,h){h.hidden&&(b("<li "+(h.className?'class="'+h.className+'"':"")+' data-dtr-index="'+h.columnIndex+'" data-dt-row="'+h.rowIndex+'" data-dt-column="'+h.columnIndex+'"><span class="dtr-title">'+h.title+"</span> </li>").append(b('<span class="dtr-data"/>').append(p(a,h.rowIndex,h.columnIndex))).appendTo(f),g=!0)});return g?f:!1}},listHidden:function(){return function(a,
c,d){return(a=b.map(d,function(f){var g=f.className?'class="'+f.className+'"':"";return f.hidden?"<li "+g+' data-dtr-index="'+f.columnIndex+'" data-dt-row="'+f.rowIndex+'" data-dt-column="'+f.columnIndex+'"><span class="dtr-title">'+f.title+'</span> <span class="dtr-data">'+f.data+"</span></li>":""}).join(""))?b('<ul data-dtr-index="'+c+'" class="dtr-details"/>').append(a):!1}},tableAll:function(a){a=b.extend({tableClass:""},a);return function(c,d,f){c=b.map(f,function(g){return"<tr "+(g.className?
'class="'+g.className+'"':"")+' data-dt-row="'+g.rowIndex+'" data-dt-column="'+g.columnIndex+'"><td>'+g.title+":</td> <td>"+g.data+"</td></tr>"}).join("");return b('<table class="'+a.tableClass+' dtr-details" width="100%"/>').append(c)}}};u.defaults={breakpoints:u.breakpoints,auto:!0,details:{display:u.display.childRow,renderer:u.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var C=b.fn.dataTable.Api;C.register("responsive()",function(){return this});C.register("responsive.index()",
function(a){a=b(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});C.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});C.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});C.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==b.inArray(!1,a._responsive._responsiveOnlyHidden()):
!1});C.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,c){return a._responsive?a._responsive._responsiveOnlyHidden()[c]:!1},1)});u.version="2.2.9";b.fn.dataTable.Responsive=u;b.fn.DataTable.Responsive=u;b(m).on("preInit.dt.dtr",function(a,c,d){"dt"===a.namespace&&(b(c.nTable).hasClass("responsive")||b(c.nTable).hasClass("dt-responsive")||c.oInit.responsive||z.defaults.responsive)&&(a=c.oInit.responsive,!1!==a&&new u(c,
b.isPlainObject(a)?a:{}))});return u});

View file

@ -2,5 +2,11 @@
Bootstrap 4 integration for DataTables' Responsive
©2016 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Responsive||require("datatables.net-responsive")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable,b=a.Responsive.display,g=b.modal,e=c('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"/></div></div></div>');
b.modal=function(a){return function(b,d,f){if(c.fn.modal){if(!d){if(a&&a.header){var d=e.find("div.modal-header"),h=d.find("button").detach();d.empty().append('<h4 class="modal-title">'+a.header(b)+"</h4>").append(h)}e.find("div.modal-body").empty().append(f());e.appendTo("body").modal()}}else g(b,d,f)}};return a.Responsive});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};
$jscomp.polyfill=function(a,b,c,e){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,e):$jscomp.polyfillUnisolated(a,b,c,e))};$jscomp.polyfillUnisolated=function(a,b,c,e){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];if(!(d in c))return;c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var g=d[f];if(!(g in e))return;e=e[g]}d=d[d.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d=
$jscomp.propertyToPolyfillSymbol[d],$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3");
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net-bs4")(b,c).$);c.fn.dataTable.Responsive||require("datatables.net-responsive")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,e){b=a.fn.dataTable;c=b.Responsive.display;var d=c.modal,f=a('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"/></div></div></div>');
c.modal=function(g){return function(k,h,l){if(!a.fn.modal)d(k,h,l);else if(!h){if(g&&g.header){h=f.find("div.modal-header");var m=h.find("button").detach();h.empty().append('<h4 class="modal-title">'+g.header(k)+"</h4>").append(m)}f.find("div.modal-body").empty().append(l());f.appendTo("body").modal()}}};return b.Responsive});

View file

@ -7,7 +7,10 @@ table.dataTable tr.dtrg-group.dtrg-level-0 td {
}
table.dataTable tr.dtrg-group.dtrg-level-1 td,
table.dataTable tr.dtrg-group.dtrg-level-2 td {
table.dataTable tr.dtrg-group.dtrg-level-2 td,
table.dataTable tr.dtrg-group.dtrg-level-3 td,
table.dataTable tr.dtrg-group.dtrg-level-4 td,
table.dataTable tr.dtrg-group.dtrg-level-5 td {
background-color: #f0f0f0;
padding-top: 0.25em;
padding-bottom: 0.25em;
@ -17,4 +20,20 @@ table.dataTable tr.dtrg-group.dtrg-level-2 td {
table.dataTable tr.dtrg-group.dtrg-level-2 td {
background-color: #f3f3f3;
padding-left: 2.5em;
}
table.dataTable tr.dtrg-group.dtrg-level-3 td {
background-color: #f3f3f3;
padding-left: 3em;
}
table.dataTable tr.dtrg-group.dtrg-level-4 td {
background-color: #f3f3f3;
padding-left: 3.5em;
}
table.dataTable tr.dtrg-group.dtrg-level-5 td {
background-color: #f3f3f3;
padding-left: 4em;
}

View file

@ -1 +1 @@
table.dataTable tr.dtrg-group td{background-color:#e0e0e0}table.dataTable tr.dtrg-group.dtrg-level-0 td{font-weight:bold}table.dataTable tr.dtrg-group.dtrg-level-1 td,table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f0f0f0;padding-top:0.25em;padding-bottom:0.25em;padding-left:2em;font-size:0.9em}table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f3f3f3}
table.dataTable tr.dtrg-group td{background-color:#e0e0e0}table.dataTable tr.dtrg-group.dtrg-level-0 td{font-weight:bold}table.dataTable tr.dtrg-group.dtrg-level-1 td,table.dataTable tr.dtrg-group.dtrg-level-2 td,table.dataTable tr.dtrg-group.dtrg-level-3 td,table.dataTable tr.dtrg-group.dtrg-level-4 td,table.dataTable tr.dtrg-group.dtrg-level-5 td{background-color:#f0f0f0;padding-top:.25em;padding-bottom:.25em;padding-left:2em;font-size:.9em}table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f3f3f3;padding-left:2.5em}table.dataTable tr.dtrg-group.dtrg-level-3 td{background-color:#f3f3f3;padding-left:3em}table.dataTable tr.dtrg-group.dtrg-level-4 td{background-color:#f3f3f3;padding-left:3.5em}table.dataTable tr.dtrg-group.dtrg-level-5 td{background-color:#f3f3f3;padding-left:4em}

View file

@ -1,15 +1,15 @@
/*! RowGroup 1.1.2
* ©2017-2020 SpryMedia Ltd - datatables.net/license
/*! RowGroup 1.1.3
* ©2017-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary RowGroup
* @description RowGrouping for DataTables
* @version 1.1.2
* @version 1.1.3
* @file dataTables.rowGroup.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact datatables.net
* @copyright Copyright 2017-2020 SpryMedia Ltd.
* @copyright Copyright 2017-2021 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@ -230,7 +230,7 @@ $.extend( RowGroup.prototype, {
* @private
*/
_group: function ( level, rows ) {
var fns = $.isArray( this.c.dataSrc ) ? this.c.dataSrc : [ this.c.dataSrc ];
var fns = Array.isArray( this.c.dataSrc ) ? this.c.dataSrc : [ this.c.dataSrc ];
var fn = DataTable.ext.oApi._fnGetObjectDataFn( fns[ level ] );
var dt = this.s.dt;
var group, last;
@ -413,7 +413,7 @@ RowGroup.defaults = {
};
RowGroup.version = "1.1.2";
RowGroup.version = "1.1.3";
$.fn.dataTable.RowGroup = RowGroup;

View file

@ -1,12 +1,12 @@
/*!
RowGroup 1.1.2
©2017-2020 SpryMedia Ltd - datatables.net/license
RowGroup 1.1.3
©2017-2021 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(i){return c(i,window,document)}):"object"===typeof exports?module.exports=function(i,d){i||(i=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(i,d).$;return c(d,i,i.document)}:c(jQuery,window,document)})(function(c,i,d,k){var e=c.fn.dataTable,g=function(a,b){if(!e.versionCheck||!e.versionCheck("1.10.8"))throw"RowGroup requires DataTables 1.10.8 or newer";this.c=c.extend(!0,{},e.defaults.rowGroup,
g.defaults,b);this.s={dt:new e.Api(a)};this.dom={};var m=this.s.dt.settings()[0],f=m.rowGroup;if(f)return f;m.rowGroup=this;this._constructor()};c.extend(g.prototype,{dataSrc:function(a){if(a===k)return this.c.dataSrc;var b=this.s.dt;this.c.dataSrc=a;c(b.table().node()).triggerHandler("rowgroup-datasrc.dt",[b,a]);return this},disable:function(){this.c.enable=!1;return this},enable:function(a){if(!1===a)return this.disable();this.c.enable=!0;return this},enabled:function(){return this.c.enable},_constructor:function(){var a=
this,b=this.s.dt,c=b.settings()[0];b.on("draw.dtrg",function(b,e){a.c.enable&&c===e&&a._draw()});b.on("column-visibility.dt.dtrg responsive-resize.dt.dtrg",function(){a._adjustColspan()});b.on("destroy",function(){b.off(".dtrg")})},_adjustColspan:function(){c("tr."+this.c.className,this.s.dt.table().body()).find("td:visible").attr("colspan",this._colspan())},_colspan:function(){return this.s.dt.columns().visible().reduce(function(a,b){return a+b},0)},_draw:function(){var a=this._group(0,this.s.dt.rows({page:"current"}).indexes());
this._groupDisplay(0,a)},_group:function(a,b){for(var m=c.isArray(this.c.dataSrc)?this.c.dataSrc:[this.c.dataSrc],f=e.ext.oApi._fnGetObjectDataFn(m[a]),i=this.s.dt,j,g,l=[],h=0,d=b.length;h<d;h++){var n=b[h];j=i.row(n).data();j=f(j);if(null===j||j===k)j=this.c.emptyDataGroup;if(g===k||j!==g)l.push({dataPoint:j,rows:[]}),g=j;l[l.length-1].rows.push(n)}if(m[a+1]!==k){h=0;for(d=l.length;h<d;h++)l[h].children=this._group(a+1,l[h].rows)}return l},_groupDisplay:function(a,b){for(var c=this.s.dt,f,e=0,g=
b.length;e<g;e++){var d=b[e],i=d.dataPoint,h=d.rows;this.c.startRender&&(f=this.c.startRender.call(this,c.rows(h),i,a),(f=this._rowWrap(f,this.c.startClassName,a))&&f.insertBefore(c.row(h[0]).node()));this.c.endRender&&(f=this.c.endRender.call(this,c.rows(h),i,a),(f=this._rowWrap(f,this.c.endClassName,a))&&f.insertAfter(c.row(h[h.length-1]).node()));d.children&&this._groupDisplay(a+1,d.children)}},_rowWrap:function(a,b,e){if(null===a||""===a)a=this.c.emptyDataGroup;return a===k||null===a?null:("object"===
typeof a&&a.nodeName&&"tr"===a.nodeName.toLowerCase()?c(a):a instanceof c&&a.length&&"tr"===a[0].nodeName.toLowerCase()?a:c("<tr/>").append(c("<td/>").attr("colspan",this._colspan()).append(a))).addClass(this.c.className).addClass(b).addClass("dtrg-level-"+e)}});g.defaults={className:"dtrg-group",dataSrc:0,emptyDataGroup:"No group",enable:!0,endClassName:"dtrg-end",endRender:null,startClassName:"dtrg-start",startRender:function(a,b){return b}};g.version="1.1.2";c.fn.dataTable.RowGroup=g;c.fn.DataTable.RowGroup=
g;e.Api.register("rowGroup()",function(){return this});e.Api.register("rowGroup().disable()",function(){return this.iterator("table",function(a){a.rowGroup&&a.rowGroup.enable(!1)})});e.Api.register("rowGroup().enable()",function(a){return this.iterator("table",function(b){b.rowGroup&&b.rowGroup.enable(a===k?!0:a)})});e.Api.register("rowGroup().enabled()",function(){var a=this.context;return a.length&&a[0].rowGroup?a[0].rowGroup.enabled():!1});e.Api.register("rowGroup().dataSrc()",function(a){return a===
k?this.context[0].rowGroup.dataSrc():this.iterator("table",function(b){b.rowGroup&&b.rowGroup.dataSrc(a)})});c(d).on("preInit.dt.dtrg",function(a,b){if("dt"===a.namespace){var d=b.oInit.rowGroup,f=e.defaults.rowGroup;if(d||f)f=c.extend({},f,d),!1!==d&&new g(b,f)}});return g});
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(f){return c(f,window,document)}):"object"===typeof exports?module.exports=function(f,i){f||(f=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(f,i).$;return c(i,f,f.document)}:c(jQuery,window,document)})(function(c,f,i,k){var d=c.fn.dataTable,g=function(a,b){if(!d.versionCheck||!d.versionCheck("1.10.8"))throw"RowGroup requires DataTables 1.10.8 or newer";this.c=c.extend(!0,{},d.defaults.rowGroup,
g.defaults,b);this.s={dt:new d.Api(a)};this.dom={};var m=this.s.dt.settings()[0],e=m.rowGroup;if(e)return e;m.rowGroup=this;this._constructor()};c.extend(g.prototype,{dataSrc:function(a){if(a===k)return this.c.dataSrc;var b=this.s.dt;this.c.dataSrc=a;c(b.table().node()).triggerHandler("rowgroup-datasrc.dt",[b,a]);return this},disable:function(){this.c.enable=!1;return this},enable:function(a){if(!1===a)return this.disable();this.c.enable=!0;return this},enabled:function(){return this.c.enable},_constructor:function(){var a=
this,b=this.s.dt,m=b.settings()[0];b.on("draw.dtrg",function(b,c){a.c.enable&&m===c&&a._draw()});b.on("column-visibility.dt.dtrg responsive-resize.dt.dtrg",function(){a._adjustColspan()});b.on("destroy",function(){b.off(".dtrg")})},_adjustColspan:function(){c("tr."+this.c.className,this.s.dt.table().body()).find("td:visible").attr("colspan",this._colspan())},_colspan:function(){return this.s.dt.columns().visible().reduce(function(a,b){return a+b},0)},_draw:function(){var a=this._group(0,this.s.dt.rows({page:"current"}).indexes());
this._groupDisplay(0,a)},_group:function(a,b){for(var c=Array.isArray(this.c.dataSrc)?this.c.dataSrc:[this.c.dataSrc],e=d.ext.oApi._fnGetObjectDataFn(c[a]),f=this.s.dt,j,g,l=[],h=0,i=b.length;h<i;h++){var n=b[h];j=f.row(n).data();j=e(j);if(null===j||j===k)j=this.c.emptyDataGroup;if(g===k||j!==g)l.push({dataPoint:j,rows:[]}),g=j;l[l.length-1].rows.push(n)}if(c[a+1]!==k){h=0;for(i=l.length;h<i;h++)l[h].children=this._group(a+1,l[h].rows)}return l},_groupDisplay:function(a,b){for(var c=this.s.dt,e,g=
0,i=b.length;g<i;g++){var d=b[g],f=d.dataPoint,h=d.rows;this.c.startRender&&(e=this.c.startRender.call(this,c.rows(h),f,a),(e=this._rowWrap(e,this.c.startClassName,a))&&e.insertBefore(c.row(h[0]).node()));this.c.endRender&&(e=this.c.endRender.call(this,c.rows(h),f,a),(e=this._rowWrap(e,this.c.endClassName,a))&&e.insertAfter(c.row(h[h.length-1]).node()));d.children&&this._groupDisplay(a+1,d.children)}},_rowWrap:function(a,b,d){if(null===a||""===a)a=this.c.emptyDataGroup;return a===k||null===a?null:
("object"===typeof a&&a.nodeName&&"tr"===a.nodeName.toLowerCase()?c(a):a instanceof c&&a.length&&"tr"===a[0].nodeName.toLowerCase()?a:c("<tr/>").append(c("<td/>").attr("colspan",this._colspan()).append(a))).addClass(this.c.className).addClass(b).addClass("dtrg-level-"+d)}});g.defaults={className:"dtrg-group",dataSrc:0,emptyDataGroup:"No group",enable:!0,endClassName:"dtrg-end",endRender:null,startClassName:"dtrg-start",startRender:function(a,b){return b}};g.version="1.1.3";c.fn.dataTable.RowGroup=
g;c.fn.DataTable.RowGroup=g;d.Api.register("rowGroup()",function(){return this});d.Api.register("rowGroup().disable()",function(){return this.iterator("table",function(a){a.rowGroup&&a.rowGroup.enable(!1)})});d.Api.register("rowGroup().enable()",function(a){return this.iterator("table",function(b){b.rowGroup&&b.rowGroup.enable(a===k?!0:a)})});d.Api.register("rowGroup().enabled()",function(){var a=this.context;return a.length&&a[0].rowGroup?a[0].rowGroup.enabled():!1});d.Api.register("rowGroup().dataSrc()",
function(a){return a===k?this.context[0].rowGroup.dataSrc():this.iterator("table",function(b){b.rowGroup&&b.rowGroup.dataSrc(a)})});c(i).on("preInit.dt.dtrg",function(a,b){if("dt"===a.namespace){var f=b.oInit.rowGroup,e=d.defaults.rowGroup;if(f||e)e=c.extend({},e,f),!1!==f&&new g(b,e)}});return g});

View file

@ -8,7 +8,7 @@ table.dt-rowReorder-float {
}
tr.dt-rowReorder-moving {
outline: 2px solid #888888;
outline: 2px solid #888;
outline-offset: -2px;
}

View file

@ -1 +1 @@
table.dt-rowReorder-float{position:absolute !important;opacity:0.8;table-layout:fixed;outline:2px solid #0275d8;outline-offset:-2px;z-index:2001}tr.dt-rowReorder-moving{outline:2px solid #888888;outline-offset:-2px}body.dt-rowReorder-noOverflow{overflow-x:hidden}table.dataTable td.reorder{text-align:center;cursor:move}
table.dt-rowReorder-float{position:absolute !important;opacity:.8;table-layout:fixed;outline:2px solid #0275d8;outline-offset:-2px;z-index:2001}tr.dt-rowReorder-moving{outline:2px solid #888;outline-offset:-2px}body.dt-rowReorder-noOverflow{overflow-x:hidden}table.dataTable td.reorder{text-align:center;cursor:move}

View file

@ -1 +1 @@
div.dts{display:block !important}div.dts tbody th,div.dts tbody td{white-space:nowrap}div.dts div.dts_loading{z-index:1}div.dts div.dts_label{position:absolute;right:10px;background:rgba(0,0,0,0.8);color:white;box-shadow:3px 3px 10px rgba(0,0,0,0.5);text-align:right;border-radius:3px;padding:0.4em;z-index:2;display:none}div.dts div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, #fff 10px, #fff 20px)}div.dts div.dataTables_scrollBody table{z-index:2}div.dts div.dataTables_paginate,div.dts div.dataTables_length{display:none}div.DTS div.dataTables_scrollBody table{background-color:white}
div.dts{display:block !important}div.dts tbody th,div.dts tbody td{white-space:nowrap}div.dts div.dts_loading{z-index:1}div.dts div.dts_label{position:absolute;right:10px;background:rgba(0, 0, 0, 0.8);color:white;box-shadow:3px 3px 10px rgba(0, 0, 0, 0.5);text-align:right;border-radius:3px;padding:.4em;z-index:2;display:none}div.dts div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px)}div.dts div.dataTables_scrollBody table{z-index:2}div.dts div.dataTables_paginate,div.dts div.dataTables_length{display:none}div.DTS div.dataTables_scrollBody table{background-color:white}

View file

@ -1,15 +1,15 @@
/*! Scroller 2.0.3
* ©2011-2020 SpryMedia Ltd - datatables.net/license
/*! Scroller 2.0.5
* ©2011-2021 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary Scroller
* @description Virtual rendering for DataTables
* @version 2.0.3
* @version 2.0.5
* @file dataTables.scroller.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2011-2020 SpryMedia Ltd.
* @copyright Copyright 2011-2021 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@ -82,7 +82,7 @@ var DataTable = $.fn.dataTable;
* @constructor
* @global
* @param {object} dt DataTables settings object or API instance
* @param {object} [opts={}] Configuration object for FixedColumns. Options
* @param {object} [opts={}] Configuration object for Scroller. Options
* are defined by {@link Scroller.defaults}
*
* @requires jQuery 1.7+
@ -216,7 +216,8 @@ var Scroller = function ( dt, opts ) {
* @default 0
*/
viewport: null,
labelFactor: 1
labelHeight: 0,
xbar: 0
},
topRowFloat: 0,
@ -295,7 +296,9 @@ $.extend( Scroller.prototype, {
}
var label = this.dom.label.outerHeight();
heights.labelFactor = (heights.viewport-label) / heights.scroll;
heights.xbar = this.dom.scroller.offsetHeight - this.dom.scroller.clientHeight;
heights.labelHeight = label;
if ( redraw === undefined || redraw )
{
@ -748,6 +751,8 @@ $.extend( Scroller.prototype, {
}, 0 );
}
$(this.s.dt.nTable).triggerHandler('position.dts.dt', tableTop);
// Hide the loading indicator
if ( this.dom.loader && this.s.loaderVisible ) {
this.dom.loader.css( 'display', 'none' );
@ -1066,9 +1071,11 @@ $.extend( Scroller.prototype, {
this.s.labelVisible = true;
}
if (this.s.labelVisible) {
var labelFactor = (heights.viewport-heights.labelHeight - heights.xbar) / heights.scroll;
this.dom.label
.html( this.s.dt.fnFormatNumber( parseInt( this.s.topRowFloat, 10 )+1 ) )
.css( 'top', iScrollTop + (iScrollTop * heights.labelFactor ) )
.css( 'top', iScrollTop + (iScrollTop * labelFactor) )
.css( 'display', 'block' );
}
},
@ -1191,7 +1198,7 @@ Scroller.oDefaults = Scroller.defaults;
* @name Scroller.version
* @static
*/
Scroller.version = "2.0.3";
Scroller.version = "2.0.5";

View file

@ -1,28 +1,44 @@
/*!
Scroller 2.0.3
©2011-2020 SpryMedia Ltd - datatables.net/license
Copyright 2011-2021 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
Scroller 2.0.5
©2011-2021 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return e(g,window,document)}):"object"===typeof exports?module.exports=function(g,i){g||(g=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(g,i).$;return e(i,g,g.document)}:e(jQuery,window,document)})(function(e,g,i,l){var m=e.fn.dataTable,h=function(a,b){if(this instanceof h){b===l&&(b={});var c=e.fn.dataTable.Api(a);this.s={dt:c.settings()[0],dtApi:c,tableTop:0,tableBottom:0,redrawTop:0,
redrawBottom:0,autoHeight:!0,viewportRows:0,stateTO:null,stateSaveThrottle:function(){},drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null,labelFactor:1},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1,forceReposition:!1,baseRowTop:0,baseScrollTop:0,mousedown:!1,lastScrollTop:0};this.s=e.extend(this.s,h.oDefaults,b);this.s.heights.row=this.s.rowHeight;this.dom={force:i.createElement("div"),label:e('<div class="dts_label">0</div>'),scroller:null,table:null,
loader:null};this.s.dt.oScroller||(this.s.dt.oScroller=this,this.construct())}else alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};e.extend(h.prototype,{measure:function(a){this.s.autoHeight&&this._calcRowHeight();var b=this.s.heights;b.row&&(b.viewport=this._parseHeight(e(this.dom.scroller).css("max-height")),this.s.viewportRows=parseInt(b.viewport/b.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);var c=this.dom.label.outerHeight();b.labelFactor=
(b.viewport-c)/b.scroll;(a===l||a)&&this.s.dt.oInstance.fnDraw(!1)},pageInfo:function(){var a=this.dom.scroller.scrollTop,b=this.s.dt.fnRecordsDisplay(),c=Math.ceil(this.pixelsToRow(a+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.pixelsToRow(a,!1,this.s.ani)),end:b<c?b-1:c-1}},pixelsToRow:function(a,b,c){a-=this.s.baseScrollTop;c=c?(this._domain("physicalToVirtual",this.s.baseScrollTop)+a)/this.s.heights.row:a/this.s.heights.row+this.s.baseRowTop;return b||b===l?parseInt(c,
10):c},rowToPixels:function(a,b,c){a-=this.s.baseRowTop;c=c?this._domain("virtualToPhysical",this.s.baseScrollTop):this.s.baseScrollTop;c+=a*this.s.heights.row;return b||b===l?parseInt(c,10):c},scrollToRow:function(a,b){var c=this,d=!1,f=this.rowToPixels(a),k=a-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>k&&(k=0);if((f>this.s.redrawBottom||f<this.s.redrawTop)&&this.s.dt._iDisplayStart!==k)d=!0,f=this._domain("virtualToPhysical",a*this.s.heights.row),this.s.redrawTop<f&&f<this.s.redrawBottom&&
(this.s.forceReposition=!0,b=!1);b===l||b?(this.s.ani=d,e(this.dom.scroller).animate({scrollTop:f},function(){setTimeout(function(){c.s.ani=!1},250)})):e(this.dom.scroller).scrollTop(f)},construct:function(){var a=this,b=this.s.dtApi;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);
this.dom.scroller.style.position="relative";this.dom.table=e(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";e(b.table().container()).addClass("dts DTS");this.s.loadingIndicator&&(this.dom.loader=e('<div class="dataTables_processing dts_loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader));this.dom.label.appendTo(this.dom.scroller);
this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1);this.s.ingnoreScroll=!0;e(this.dom.scroller).on("scroll.dt-scroller",function(){a._scroll.call(a)});e(this.dom.scroller).on("touchstart.dt-scroller",function(){a._scroll.call(a)});e(this.dom.scroller).on("mousedown.dt-scroller",function(){a.s.mousedown=true}).on("mouseup.dt-scroller",function(){a.s.labelVisible=false;a.s.mousedown=false;a.dom.label.css("display","none")});e(g).on("resize.dt-scroller",function(){a.measure(false);
a._info()});var c=!0,d=b.state.loaded();b.on("stateSaveParams.scroller",function(b,e,g){if(c&&d){g.scroller=d.scroller;c=false}else g.scroller={topRow:a.s.topRowFloat,baseScrollTop:a.s.baseScrollTop,baseRowTop:a.s.baseRowTop,scrollTop:a.s.lastScrollTop}});d&&d.scroller&&(this.s.topRowFloat=d.scroller.topRow,this.s.baseScrollTop=d.scroller.baseScrollTop,this.s.baseRowTop=d.scroller.baseRowTop);this.measure(!1);a.s.stateSaveThrottle=a.s.dt.oApi._fnThrottle(function(){a.s.dtApi.state.save()},500);b.on("init.scroller",
function(){a.measure(false);a.s.scrollType="jump";a._draw();b.on("draw.scroller",function(){a._draw()})});b.on("preDraw.dt.scroller",function(){a._scrollForce()});b.on("destroy.scroller",function(){e(g).off("resize.dt-scroller");e(a.dom.scroller).off(".dt-scroller");e(a.s.dt.nTable).off(".scroller");e(a.s.dt.nTableWrapper).removeClass("DTS");e("div.DTS_Loading",a.dom.scroller.parentNode).remove();a.dom.table.style.position="";a.dom.table.style.top="";a.dom.table.style.left=""})}else this.s.dt.oApi._fnLog(this.s.dt,
0,"Pagination must be enabled for Scroller")},_calcRowHeight:function(){var a=this.s.dt,b=a.nTable,c=b.cloneNode(!1),d=e("<tbody/>").appendTo(c),f=e('<div class="'+a.oClasses.sWrapper+' DTS"><div class="'+a.oClasses.sScrollWrapper+'"><div class="'+a.oClasses.sScrollBody+'"></div></div></div>');e("tbody tr:lt(4)",b).clone().appendTo(d);var k=e("tr",d).length;if(1===k)d.prepend("<tr><td>&#160;</td></tr>"),d.append("<tr><td>&#160;</td></tr>");else for(;3>k;k++)d.append("<tr><td>&#160;</td></tr>");e("div."+
a.oClasses.sScrollBody,f).append(c);a=this.s.dt.nHolding||b.parentNode;e(a).is(":visible")||(a="body");f.find("input").removeAttr("name");f.appendTo(a);this.s.heights.row=e("tr",d).eq(1).outerHeight();f.remove()},_draw:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d=e(this.s.dt.nTable).height(),f=this.s.dt._iDisplayStart,k=this.s.dt._iDisplayLength,g=this.s.dt.fnRecordsDisplay();this.s.skip=!0;if((this.s.dt.bSorted||this.s.dt.bFiltered)&&0===f&&!this.s.dt._drawHold)this.s.topRowFloat=
0;c="jump"===this.s.scrollType?this._domain("virtualToPhysical",this.s.topRowFloat*b.row):c;this.s.baseScrollTop=c;this.s.baseRowTop=this.s.topRowFloat;var h=c-(this.s.topRowFloat-f)*b.row;0===f?h=0:f+k>=g&&(h=b.scroll-d);this.dom.table.style.top=h+"px";this.s.tableTop=h;this.s.tableBottom=d+this.s.tableTop;d=(c-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=c-d;this.s.redrawBottom=c+d>b.scroll-b.viewport-b.row?b.scroll-b.viewport-b.row:c+d;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==
this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.scroller?((b=(this.s.dt.sAjaxSource||a.s.dt.ajax)&&!this.s.dt.oFeatures.bServerSide?!0:!1)&&2==this.s.dt.iDraw||!b&&1==this.s.dt.iDraw)&&setTimeout(function(){e(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.scroller.scrollTop);setTimeout(function(){a.s.ingnoreScroll=!1},0)},0):a.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout(function(){a._info.call(a)},0);this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display",
"none"),this.s.loaderVisible=!1)},_domain:function(a,b){var c=this.s.heights,d;if(c.virtual===c.scroll||1E4>b)return b;if("virtualToPhysical"===a&&b>=c.virtual-1E4)return d=c.virtual-b,c.scroll-d;if("physicalToVirtual"===a&&b>=c.scroll-1E4)return d=c.scroll-b,c.virtual-d;c=(c.virtual-1E4-1E4)/(c.scroll-1E4-1E4);d=1E4-1E4*c;return"virtualToPhysical"===a?(b-d)/c:c*b+d},_info:function(){if(this.s.dt.oFeatures.bInfo){var a=this.s.dt,b=a.oLanguage,c=this.dom.scroller.scrollTop,d=Math.floor(this.pixelsToRow(c,
!1,this.s.ani)+1),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),c=Math.ceil(this.pixelsToRow(c+this.s.heights.viewport,!1,this.s.ani)),c=g<c?g:c,h=a.fnFormatNumber(d),i=a.fnFormatNumber(c),j=a.fnFormatNumber(f),l=a.fnFormatNumber(g),h=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfoEmpty+b.sInfoPostFix:0===a.fnRecordsDisplay()?b.sInfoEmpty+" "+b.sInfoFiltered.replace("_MAX_",j)+b.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfo.replace("_START_",h).replace("_END_",
i).replace("_MAX_",j).replace("_TOTAL_",l)+b.sInfoPostFix:b.sInfo.replace("_START_",h).replace("_END_",i).replace("_MAX_",j).replace("_TOTAL_",l)+" "+b.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+b.sInfoPostFix;(b=b.fnInfoCallback)&&(h=b.call(a.oInstance,a,d,c,f,g,h));d=a.aanFeatures.i;if("undefined"!=typeof d){f=0;for(g=d.length;f<g;f++)e(d[f]).html(h)}e(a.nTable).triggerHandler("info.dt")}},_parseHeight:function(a){var b,c=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|em|rem|vh)$/.exec(a);
if(null===c)return 0;a=parseFloat(c[1]);c=c[2];"px"===c?b=a:"vh"===c?b=a/100*e(g).height():"rem"===c?b=a*parseFloat(e(":root").css("font-size")):"em"===c&&(b=a*parseFloat(e("body").css("font-size")));return b?b:0},_scroll:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d;if(!this.s.skip&&!this.s.ingnoreScroll&&c!==this.s.lastScrollTop)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{this._info();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dtApi.state.save()},
250);this.s.scrollType=Math.abs(c-this.s.lastScrollTop)>b.viewport?"jump":"cont";this.s.topRowFloat="cont"===this.s.scrollType?this.pixelsToRow(c,!1,!1):this._domain("physicalToVirtual",c)/b.row;0>this.s.topRowFloat&&(this.s.topRowFloat=0);if(this.s.forceReposition||c<this.s.redrawTop||c>this.s.redrawBottom){if(d=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows),d=parseInt(this.s.topRowFloat,10)-d,this.s.forceReposition=!1,0>=d?d=0:d+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?
(d=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>d&&(d=0)):0!==d%2&&d++,this.s.targetTop=d,d!=this.s.dt._iDisplayStart)if(this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop,d=function(){a.s.dt._iDisplayStart=a.s.targetTop;a.s.dt.oApi._fnDraw(a.s.dt)},this.s.dt.oFeatures.bServerSide?(this.s.forceReposition=!0,clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(d,this.s.serverWait)):d(),this.dom.loader&&!this.s.loaderVisible)this.dom.loader.css("display",
"block"),this.s.loaderVisible=!0}else this.s.topRowFloat=this.pixelsToRow(c,!1,!0);this.s.lastScrollTop=c;this.s.stateSaveThrottle();"jump"===this.s.scrollType&&this.s.mousedown&&(this.s.labelVisible=!0);this.s.labelVisible&&this.dom.label.html(this.s.dt.fnFormatNumber(parseInt(this.s.topRowFloat,10)+1)).css("top",c+c*b.labelFactor).css("display","block")}},_scrollForce:function(){var a=this.s.heights;a.virtual=a.row*this.s.dt.fnRecordsDisplay();a.scroll=a.virtual;1E6<a.scroll&&(a.scroll=1E6);this.dom.force.style.height=
a.scroll>this.s.heights.row?a.scroll+"px":this.s.heights.row+"px"}});h.defaults={boundaryScale:0.5,displayBuffer:9,loadingIndicator:!1,rowHeight:"auto",serverWait:200};h.oDefaults=h.defaults;h.version="2.0.3";e(i).on("preInit.dt.dtscroller",function(a,b){if("dt"===a.namespace){var c=b.oInit.scroller,d=m.defaults.scroller;if(c||d)d=e.extend({},c,d),!1!==c&&new h(b,d)}});e.fn.dataTable.Scroller=h;e.fn.DataTable.Scroller=h;var j=e.fn.dataTable.Api;j.register("scroller()",function(){return this});j.register("scroller().rowToPixels()",
function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.rowToPixels(a,b,c)});j.register("scroller().pixelsToRow()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.pixelsToRow(a,b,c)});j.register(["scroller().scrollToRow()","scroller.toPosition()"],function(a,b){this.iterator("table",function(c){c.oScroller&&c.oScroller.scrollToRow(a,b)});return this});j.register("row().scrollTo()",function(a){var b=this;this.iterator("row",function(c,
d){if(c.oScroller){var e=b.rows({order:"applied",search:"applied"}).indexes().indexOf(d);c.oScroller.scrollToRow(e,a)}});return this});j.register("scroller.measure()",function(a){this.iterator("table",function(b){b.oScroller&&b.oScroller.measure(a)});return this});j.register("scroller.page()",function(){var a=this.context;if(a.length&&a[0].oScroller)return a[0].oScroller.pageInfo()});return h});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,f,g){c instanceof String&&(c=String(c));for(var h=c.length,k=0;k<h;k++){var m=c[k];if(f.call(g,m,k,c))return{i:k,v:m}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,f,g){if(c==Array.prototype||c==Object.prototype)return c;c[f]=g.value;return c};$jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var f=0;f<c.length;++f){var g=c[f];if(g&&g.Math==Math)return g}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(c,f){var g=$jscomp.propertyToPolyfillSymbol[f];if(null==g)return c[f];g=c[g];return void 0!==g?g:c[f]};
$jscomp.polyfill=function(c,f,g,h){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(c,f,g,h):$jscomp.polyfillUnisolated(c,f,g,h))};$jscomp.polyfillUnisolated=function(c,f,g,h){g=$jscomp.global;c=c.split(".");for(h=0;h<c.length-1;h++){var k=c[h];if(!(k in g))return;g=g[k]}c=c[c.length-1];h=g[c];f=f(h);f!=h&&null!=f&&$jscomp.defineProperty(g,c,{configurable:!0,writable:!0,value:f})};
$jscomp.polyfillIsolated=function(c,f,g,h){var k=c.split(".");c=1===k.length;h=k[0];h=!c&&h in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var m=0;m<k.length-1;m++){var q=k[m];if(!(q in h))return;h=h[q]}k=k[k.length-1];g=$jscomp.IS_SYMBOL_NATIVE&&"es6"===g?h[k]:null;f=f(g);null!=f&&(c?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:f}):f!==g&&($jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(k):$jscomp.POLYFILL_PREFIX+k,k=
$jscomp.propertyToPolyfillSymbol[k],$jscomp.defineProperty(h,k,{configurable:!0,writable:!0,value:f})))};$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(f,g){return $jscomp.findInternal(this,f,g).v}},"es6","es3");
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(f){return c(f,window,document)}):"object"===typeof exports?module.exports=function(f,g){f||(f=window);g&&g.fn.dataTable||(g=require("datatables.net")(f,g).$);return c(g,f,f.document)}:c(jQuery,window,document)})(function(c,f,g,h){var k=c.fn.dataTable,m=function(a,b){this instanceof m?(b===h&&(b={}),a=c.fn.dataTable.Api(a),this.s={dt:a.settings()[0],dtApi:a,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,
autoHeight:!0,viewportRows:0,stateTO:null,stateSaveThrottle:function(){},drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null,labelHeight:0,xbar:0},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1,forceReposition:!1,baseRowTop:0,baseScrollTop:0,mousedown:!1,lastScrollTop:0},this.s=c.extend(this.s,m.oDefaults,b),this.s.heights.row=this.s.rowHeight,this.dom={force:g.createElement("div"),label:c('<div class="dts_label">0</div>'),scroller:null,table:null,loader:null},
this.s.dt.oScroller||(this.s.dt.oScroller=this,this.construct())):alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};c.extend(m.prototype,{measure:function(a){this.s.autoHeight&&this._calcRowHeight();var b=this.s.heights;b.row&&(b.viewport=this._parseHeight(c(this.dom.scroller).css("max-height")),this.s.viewportRows=parseInt(b.viewport/b.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);var d=this.dom.label.outerHeight();b.xbar=this.dom.scroller.offsetHeight-
this.dom.scroller.clientHeight;b.labelHeight=d;(a===h||a)&&this.s.dt.oInstance.fnDraw(!1)},pageInfo:function(){var a=this.dom.scroller.scrollTop,b=this.s.dt.fnRecordsDisplay(),d=Math.ceil(this.pixelsToRow(a+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.pixelsToRow(a,!1,this.s.ani)),end:b<d?b-1:d-1}},pixelsToRow:function(a,b,d){a-=this.s.baseScrollTop;d=d?(this._domain("physicalToVirtual",this.s.baseScrollTop)+a)/this.s.heights.row:a/this.s.heights.row+this.s.baseRowTop;return b||
b===h?parseInt(d,10):d},rowToPixels:function(a,b,d){a-=this.s.baseRowTop;d=d?this._domain("virtualToPhysical",this.s.baseScrollTop):this.s.baseScrollTop;d+=a*this.s.heights.row;return b||b===h?parseInt(d,10):d},scrollToRow:function(a,b){var d=this,e=!1,l=this.rowToPixels(a),n=a-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>n&&(n=0);(l>this.s.redrawBottom||l<this.s.redrawTop)&&this.s.dt._iDisplayStart!==n&&(e=!0,l=this._domain("virtualToPhysical",a*this.s.heights.row),this.s.redrawTop<l&&l<this.s.redrawBottom&&
(this.s.forceReposition=!0,b=!1));b===h||b?(this.s.ani=e,c(this.dom.scroller).animate({scrollTop:l},function(){setTimeout(function(){d.s.ani=!1},250)})):c(this.dom.scroller).scrollTop(l)},construct:function(){var a=this,b=this.s.dtApi;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=c("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);
this.dom.scroller.style.position="relative";this.dom.table=c(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";c(b.table().container()).addClass("dts DTS");this.s.loadingIndicator&&(this.dom.loader=c('<div class="dataTables_processing dts_loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),c(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader));this.dom.label.appendTo(this.dom.scroller);
this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1);this.s.ingnoreScroll=!0;c(this.dom.scroller).on("scroll.dt-scroller",function(l){a._scroll.call(a)});c(this.dom.scroller).on("touchstart.dt-scroller",function(){a._scroll.call(a)});c(this.dom.scroller).on("mousedown.dt-scroller",function(){a.s.mousedown=!0}).on("mouseup.dt-scroller",function(){a.s.labelVisible=!1;a.s.mousedown=!1;a.dom.label.css("display","none")});c(f).on("resize.dt-scroller",function(){a.measure(!1);a._info()});
var d=!0,e=b.state.loaded();b.on("stateSaveParams.scroller",function(l,n,p){d&&e?(p.scroller=e.scroller,d=!1):p.scroller={topRow:a.s.topRowFloat,baseScrollTop:a.s.baseScrollTop,baseRowTop:a.s.baseRowTop,scrollTop:a.s.lastScrollTop}});e&&e.scroller&&(this.s.topRowFloat=e.scroller.topRow,this.s.baseScrollTop=e.scroller.baseScrollTop,this.s.baseRowTop=e.scroller.baseRowTop);this.measure(!1);a.s.stateSaveThrottle=a.s.dt.oApi._fnThrottle(function(){a.s.dtApi.state.save()},500);b.on("init.scroller",function(){a.measure(!1);
a.s.scrollType="jump";a._draw();b.on("draw.scroller",function(){a._draw()})});b.on("preDraw.dt.scroller",function(){a._scrollForce()});b.on("destroy.scroller",function(){c(f).off("resize.dt-scroller");c(a.dom.scroller).off(".dt-scroller");c(a.s.dt.nTable).off(".scroller");c(a.s.dt.nTableWrapper).removeClass("DTS");c("div.DTS_Loading",a.dom.scroller.parentNode).remove();a.dom.table.style.position="";a.dom.table.style.top="";a.dom.table.style.left=""})}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},
_calcRowHeight:function(){var a=this.s.dt,b=a.nTable,d=b.cloneNode(!1),e=c("<tbody/>").appendTo(d),l=c('<div class="'+a.oClasses.sWrapper+' DTS"><div class="'+a.oClasses.sScrollWrapper+'"><div class="'+a.oClasses.sScrollBody+'"></div></div></div>');c("tbody tr:lt(4)",b).clone().appendTo(e);var n=c("tr",e).length;if(1===n)e.prepend("<tr><td>&#160;</td></tr>"),e.append("<tr><td>&#160;</td></tr>");else for(;3>n;n++)e.append("<tr><td>&#160;</td></tr>");c("div."+a.oClasses.sScrollBody,l).append(d);a=this.s.dt.nHolding||
b.parentNode;c(a).is(":visible")||(a="body");l.find("input").removeAttr("name");l.appendTo(a);this.s.heights.row=c("tr",e).eq(1).outerHeight();l.remove()},_draw:function(){var a=this,b=this.s.heights,d=this.dom.scroller.scrollTop,e=c(this.s.dt.nTable).height(),l=this.s.dt._iDisplayStart,n=this.s.dt._iDisplayLength,p=this.s.dt.fnRecordsDisplay();this.s.skip=!0;!this.s.dt.bSorted&&!this.s.dt.bFiltered||0!==l||this.s.dt._drawHold||(this.s.topRowFloat=0);d="jump"===this.s.scrollType?this._domain("virtualToPhysical",
this.s.topRowFloat*b.row):d;this.s.baseScrollTop=d;this.s.baseRowTop=this.s.topRowFloat;var r=d-(this.s.topRowFloat-l)*b.row;0===l?r=0:l+n>=p&&(r=b.scroll-e);this.dom.table.style.top=r+"px";this.s.tableTop=r;this.s.tableBottom=e+this.s.tableTop;e=(d-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=d-e;this.s.redrawBottom=d+e>b.scroll-b.viewport-b.row?b.scroll-b.viewport-b.row:d+e;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.scroller?
((b=!this.s.dt.sAjaxSource&&!a.s.dt.ajax||this.s.dt.oFeatures.bServerSide?!1:!0)&&2==this.s.dt.iDraw||!b&&1==this.s.dt.iDraw)&&setTimeout(function(){c(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.scroller.scrollTop);setTimeout(function(){a.s.ingnoreScroll=!1},0)},0):a.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout(function(){a._info.call(a)},0);c(this.s.dt.nTable).triggerHandler("position.dts.dt",r);this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=
!1)},_domain:function(a,b){var d=this.s.heights;if(d.virtual===d.scroll||1E4>b)return b;if("virtualToPhysical"===a&&b>=d.virtual-1E4)return a=d.virtual-b,d.scroll-a;if("physicalToVirtual"===a&&b>=d.scroll-1E4)return a=d.scroll-b,d.virtual-a;d=(d.virtual-1E4-1E4)/(d.scroll-1E4-1E4);var e=1E4-1E4*d;return"virtualToPhysical"===a?(b-e)/d:d*b+e},_info:function(){if(this.s.dt.oFeatures.bInfo){var a=this.s.dt,b=a.oLanguage,d=this.dom.scroller.scrollTop,e=Math.floor(this.pixelsToRow(d,!1,this.s.ani)+1),l=
a.fnRecordsTotal(),n=a.fnRecordsDisplay();d=Math.ceil(this.pixelsToRow(d+this.s.heights.viewport,!1,this.s.ani));d=n<d?n:d;var p=a.fnFormatNumber(e),r=a.fnFormatNumber(d),t=a.fnFormatNumber(l),u=a.fnFormatNumber(n);p=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfoEmpty+b.sInfoPostFix:0===a.fnRecordsDisplay()?b.sInfoEmpty+" "+b.sInfoFiltered.replace("_MAX_",t)+b.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfo.replace("_START_",p).replace("_END_",r).replace("_MAX_",
t).replace("_TOTAL_",u)+b.sInfoPostFix:b.sInfo.replace("_START_",p).replace("_END_",r).replace("_MAX_",t).replace("_TOTAL_",u)+" "+b.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+b.sInfoPostFix;(b=b.fnInfoCallback)&&(p=b.call(a.oInstance,a,e,d,l,n,p));e=a.aanFeatures.i;if("undefined"!=typeof e)for(l=0,n=e.length;l<n;l++)c(e[l]).html(p);c(a.nTable).triggerHandler("info.dt")}},_parseHeight:function(a){var b,d=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|em|rem|vh)$/.exec(a);if(null===d)return 0;
a=parseFloat(d[1]);d=d[2];"px"===d?b=a:"vh"===d?b=a/100*c(f).height():"rem"===d?b=a*parseFloat(c(":root").css("font-size")):"em"===d&&(b=a*parseFloat(c("body").css("font-size")));return b?b:0},_scroll:function(){var a=this,b=this.s.heights,d=this.dom.scroller.scrollTop;if(!this.s.skip&&!this.s.ingnoreScroll&&d!==this.s.lastScrollTop)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{this._info();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dtApi.state.save()},
250);this.s.scrollType=Math.abs(d-this.s.lastScrollTop)>b.viewport?"jump":"cont";this.s.topRowFloat="cont"===this.s.scrollType?this.pixelsToRow(d,!1,!1):this._domain("physicalToVirtual",d)/b.row;0>this.s.topRowFloat&&(this.s.topRowFloat=0);if(this.s.forceReposition||d<this.s.redrawTop||d>this.s.redrawBottom){var e=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);e=parseInt(this.s.topRowFloat,10)-e;this.s.forceReposition=!1;0>=e?e=0:e+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?
(e=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>e&&(e=0)):0!==e%2&&e++;this.s.targetTop=e;e!=this.s.dt._iDisplayStart&&(this.s.tableTop=c(this.s.dt.nTable).offset().top,this.s.tableBottom=c(this.s.dt.nTable).height()+this.s.tableTop,e=function(){a.s.dt._iDisplayStart=a.s.targetTop;a.s.dt.oApi._fnDraw(a.s.dt)},this.s.dt.oFeatures.bServerSide?(this.s.forceReposition=!0,clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(e,this.s.serverWait)):e(),this.dom.loader&&!this.s.loaderVisible&&
(this.dom.loader.css("display","block"),this.s.loaderVisible=!0))}else this.s.topRowFloat=this.pixelsToRow(d,!1,!0);this.s.lastScrollTop=d;this.s.stateSaveThrottle();"jump"===this.s.scrollType&&this.s.mousedown&&(this.s.labelVisible=!0);this.s.labelVisible&&(b=(b.viewport-b.labelHeight-b.xbar)/b.scroll,this.dom.label.html(this.s.dt.fnFormatNumber(parseInt(this.s.topRowFloat,10)+1)).css("top",d+d*b).css("display","block"))}},_scrollForce:function(){var a=this.s.heights;a.virtual=a.row*this.s.dt.fnRecordsDisplay();
a.scroll=a.virtual;1E6<a.scroll&&(a.scroll=1E6);this.dom.force.style.height=a.scroll>this.s.heights.row?a.scroll+"px":this.s.heights.row+"px"}});m.defaults={boundaryScale:.5,displayBuffer:9,loadingIndicator:!1,rowHeight:"auto",serverWait:200};m.oDefaults=m.defaults;m.version="2.0.5";c(g).on("preInit.dt.dtscroller",function(a,b){if("dt"===a.namespace){a=b.oInit.scroller;var d=k.defaults.scroller;if(a||d)d=c.extend({},a,d),!1!==a&&new m(b,d)}});c.fn.dataTable.Scroller=m;c.fn.DataTable.Scroller=m;var q=
c.fn.dataTable.Api;q.register("scroller()",function(){return this});q.register("scroller().rowToPixels()",function(a,b,d){var e=this.context;if(e.length&&e[0].oScroller)return e[0].oScroller.rowToPixels(a,b,d)});q.register("scroller().pixelsToRow()",function(a,b,d){var e=this.context;if(e.length&&e[0].oScroller)return e[0].oScroller.pixelsToRow(a,b,d)});q.register(["scroller().scrollToRow()","scroller.toPosition()"],function(a,b){this.iterator("table",function(d){d.oScroller&&d.oScroller.scrollToRow(a,
b)});return this});q.register("row().scrollTo()",function(a){var b=this;this.iterator("row",function(d,e){d.oScroller&&(e=b.rows({order:"applied",search:"applied"}).indexes().indexOf(e),d.oScroller.scrollToRow(e,a))});return this});q.register("scroller.measure()",function(a){this.iterator("table",function(b){b.oScroller&&b.oScroller.measure(a)});return this});q.register("scroller.page()",function(){var a=this.context;if(a.length&&a[0].oScroller)return a[0].oScroller.pageInfo()});return m});

View file

@ -2,4 +2,4 @@
Bootstrap 4 styling wrapper for Scroller
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-scroller"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Scroller||require("datatables.net-scroller")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){return c.fn.dataTable});
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-scroller"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs4")(a,b).$);b.fn.dataTable.Scroller||require("datatables.net-scroller")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});

View file

@ -1,213 +1,9 @@
div.dt-datetime {
position: absolute;
background-color: white;
z-index: 2050;
border: 1px solid #ccc;
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
padding: 0 20px 6px 20px;
width: 275px;
}
div.dt-datetime.inline {
position: relative;
box-shadow: none;
}
div.dt-datetime div.dt-datetime-title {
text-align: center;
padding: 5px 0px 3px;
}
div.dt-datetime table {
border-spacing: 0;
margin: 12px 0;
width: 100%;
}
div.dt-datetime table.dt-datetime-table-nospace {
margin-top: -12px;
}
div.dt-datetime table th {
font-size: 0.8em;
color: #777;
font-weight: normal;
width: 14.285714286%;
padding: 0 0 4px 0;
text-align: center;
}
div.dt-datetime table td {
font-size: 0.9em;
color: #444;
padding: 0;
}
div.dt-datetime table td.selectable {
text-align: center;
background: #f5f5f5;
}
div.dt-datetime table td.selectable.disabled {
color: #aaa;
background: white;
}
div.dt-datetime table td.selectable.disabled button:hover {
color: #aaa;
background: white;
}
div.dt-datetime table td.selectable.now {
background-color: #ddd;
}
div.dt-datetime table td.selectable.now button {
font-weight: bold;
}
div.dt-datetime table td.selectable.selected button {
background: #4E6CA3;
color: white;
border-radius: 2px;
}
div.dt-datetime table td.selectable button:hover {
background: #ff8000;
color: white;
border-radius: 2px;
}
div.dt-datetime table td.dt-datetime-week {
font-size: 0.7em;
}
div.dt-datetime table button {
width: 100%;
box-sizing: border-box;
border: none;
background: transparent;
font-size: inherit;
color: inherit;
text-align: center;
padding: 4px 0;
cursor: pointer;
margin: 0;
}
div.dt-datetime table button span {
display: inline-block;
min-width: 14px;
text-align: right;
}
div.dt-datetime table.weekNumber th {
width: 12.5%;
}
div.dt-datetime div.dt-datetime-calendar table {
margin-top: 0;
}
div.dt-datetime div.dt-datetime-label {
position: relative;
display: inline-block;
height: 30px;
padding: 5px 6px;
border: 1px solid transparent;
box-sizing: border-box;
cursor: pointer;
}
div.dt-datetime div.dt-datetime-label:hover {
border: 1px solid #ddd;
border-radius: 2px;
background-color: #f5f5f5;
}
div.dt-datetime div.dt-datetime-label select {
position: absolute;
top: 6px;
left: 0;
cursor: pointer;
opacity: 0;
}
div.dt-datetime.horizontal {
width: 550px;
}
div.dt-datetime.horizontal div.dt-datetime-date,
div.dt-datetime.horizontal div.dt-datetime-time {
width: 48%;
}
div.dt-datetime.horizontal div.dt-datetime-time {
margin-left: 4%;
}
div.dt-datetime div.dt-datetime-date {
position: relative;
float: left;
width: 100%;
}
div.dt-datetime div.dt-datetime-time {
position: relative;
float: left;
width: 100%;
text-align: center;
}
div.dt-datetime div.dt-datetime-time > span {
vertical-align: middle;
}
div.dt-datetime div.dt-datetime-time th {
text-align: left;
}
div.dt-datetime div.dt-datetime-time div.dt-datetime-timeblock {
display: inline-block;
vertical-align: middle;
}
div.dt-datetime div.dt-datetime-iconLeft,
div.dt-datetime div.dt-datetime-iconRight,
div.dt-datetime div.dt-datetime-iconUp,
div.dt-datetime div.dt-datetime-iconDown {
width: 30px;
height: 30px;
background-position: center;
background-repeat: no-repeat;
opacity: 0.3;
overflow: hidden;
box-sizing: border-box;
}
div.dt-datetime div.dt-datetime-iconLeft:hover,
div.dt-datetime div.dt-datetime-iconRight:hover,
div.dt-datetime div.dt-datetime-iconUp:hover,
div.dt-datetime div.dt-datetime-iconDown:hover {
border: 1px solid #ccc;
border-radius: 2px;
background-color: #f0f0f0;
opacity: 0.6;
}
div.dt-datetime div.dt-datetime-iconLeft button,
div.dt-datetime div.dt-datetime-iconRight button,
div.dt-datetime div.dt-datetime-iconUp button,
div.dt-datetime div.dt-datetime-iconDown button {
border: none;
background: transparent;
text-indent: 30px;
height: 100%;
width: 100%;
cursor: pointer;
}
div.dt-datetime div.dt-datetime-iconLeft {
position: absolute;
top: 5px;
left: 5px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");
}
div.dt-datetime div.dt-datetime-iconRight {
position: absolute;
top: 5px;
right: 5px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");
}
div.dt-datetime div.dt-datetime-iconUp {
height: 20px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAL0lEQVR4AWOgJmBhxCvLyopHnpmVjY2VCadeoCxIHrcsWJ4RlyxCHlMWCTBRJxwAjrIBDMWSiM0AAAAASUVORK5CYII=");
}
div.dt-datetime div.dt-datetime-iconDown {
height: 20px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAMElEQVR4AWOgDmBiRQIsmPKMrGxQgJDFlEfIYpoPk8Utz8qM232MYFfhkQfKUg8AANefAQxecJ58AAAAAElFTkSuQmCC");
}
div.dt-datetime-error {
clear: both;
padding: 0 1em;
max-width: 240px;
font-size: 11px;
line-height: 1.25em;
text-align: center;
color: #b11f1f;
}
div.dt-button-collection {
overflow: visible !important;
}
div.dt-button-collection div.dtsb-searchBuilder {
width: 100% !important;
}
.dtsb-greyscale {
border: 1px solid #cecece !important;
@ -270,6 +66,7 @@ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {
padding: 0.4em;
margin-right: 0.8em;
max-width: 20em;
background-color: rgba(200, 200, 200, 0.3);
}
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown option.dtsb-notItalic,
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic {
@ -329,12 +126,17 @@ div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic
border-radius: 0px;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 40px;
flex-basis: 3em;
margin: 0px;
}
div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup {
border: none;
border-radius: 0px;
width: 30px;
width: 2em;
margin: 0px;
}
div.dt-button-collection div.dtsb-searchBuilder {
padding-left: 10px;
padding-right: 10px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,131 +1,136 @@
(function(){var x=function(a,b,d,c){var e=b.moment?b.moment:b.dayjs?b.dayjs:null,i=function(b,d){this.c=a.extend(!0,{},i.defaults,d);var c=this.c.classPrefix,g=this.c.i18n;if(!e&&"YYYY-MM-DD"!==this.c.format)throw"DateTime: Without momentjs or dayjs only the format 'YYYY-MM-DD' can be used";"string"===typeof this.c.minDate&&(this.c.minDate=new Date(this.c.minDate));"string"===typeof this.c.maxDate&&(this.c.maxDate=new Date(this.c.maxDate));g=a('<div class="'+c+'"><div class="'+c+'-date"><div class="'+
c+'-title"><div class="'+c+'-iconLeft"><button>'+g.previous+'</button></div><div class="'+c+'-iconRight"><button>'+g.next+'</button></div><div class="'+c+'-label"><span></span><select class="'+c+'-month"></select></div><div class="'+c+'-label"><span></span><select class="'+c+'-year"></select></div></div><div class="'+c+'-calendar"></div></div><div class="'+c+'-time"><div class="'+c+'-hours"></div><div class="'+c+'-minutes"></div><div class="'+c+'-seconds"></div></div><div class="'+c+'-error"></div></div>');
this.dom={container:g,date:g.find("."+c+"-date"),title:g.find("."+c+"-title"),calendar:g.find("."+c+"-calendar"),time:g.find("."+c+"-time"),error:g.find("."+c+"-error"),input:a(b)};this.s={d:null,display:null,minutesRange:null,secondsRange:null,namespace:"dateime-"+i._instance++,parts:{date:null!==this.c.format.match(/[YMD]|L(?!T)|l/),time:null!==this.c.format.match(/[Hhm]|LT|LTS/),seconds:-1!==this.c.format.indexOf("s"),hours12:null!==this.c.format.match(/[haA]/)}};this.dom.container.append(this.dom.date).append(this.dom.time).append(this.dom.error);
this.dom.date.append(this.dom.title).append(this.dom.calendar);this._constructor()};a.extend(i.prototype,{destroy:function(){this._hide(!0);this.dom.container.off().empty();this.dom.input.off(".datetime")},errorMsg:function(a){var b=this.dom.error;a?b.html(a):b.empty();return this},hide:function(){this._hide();return this},max:function(a){this.c.maxDate="string"===typeof a?new Date(a):a;this._optionsTitle();this._setCalander();return this},min:function(a){this.c.minDate="string"===typeof a?new Date(a):
a;this._optionsTitle();this._setCalander();return this},owns:function(b){return 0<a(b).parents().filter(this.dom.container).length},val:function(a,b){if(a===c)return this.s.d;if(a instanceof Date)this.s.d=this._dateToUtc(a);else if(null===a||""===a)this.s.d=null;else if("--now"===a)this.s.d=new Date;else if("string"===typeof a)if(e){var d=e.utc(a,this.c.format,this.c.locale,this.c.strict);this.s.d=d.isValid()?d.toDate():null}else d=a.match(/(\d{4})\-(\d{2})\-(\d{2})/),this.s.d=d?new Date(Date.UTC(d[1],
d[2]-1,d[3])):null;if(b||b===c)this.s.d?this._writeOutput():this.dom.input.val(a);this.s.d||(this.s.d=this._dateToUtc(new Date));this.s.display=new Date(this.s.d.toString());this.s.display.setUTCDate(1);this._setTitle();this._setCalander();this._setTime();return this},_constructor:function(){var d=this,c=this.c.classPrefix,g=function(){d.c.onChange.call(d,d.dom.input.val(),d.s.d,d.dom.input)};this.s.parts.date||this.dom.date.css("display","none");this.s.parts.time||this.dom.time.css("display","none");
this.s.parts.seconds||(this.dom.time.children("div."+c+"-seconds").remove(),this.dom.time.children("span").eq(1).remove());this._optionsTitle();b.allan=this;"hidden"===this.dom.input.attr("type")&&(this.dom.container.addClass("inline"),this.c.attachTo="input",this.val(this.dom.input.val(),!1),this._show());this.dom.input.attr("autocomplete","off").on("focus.datetime click.datetime",function(){if(!d.dom.container.is(":visible")&&!d.dom.input.is(":disabled")){d.val(d.dom.input.val(),false);d._show()}}).on("keyup.datetime",
function(){d.dom.container.is(":visible")&&d.val(d.dom.input.val(),false)});this.dom.container.on("change","select",function(){var b=a(this),e=b.val();if(b.hasClass(c+"-month")){d._correctMonth(d.s.display,e);d._setTitle();d._setCalander()}else if(b.hasClass(c+"-year")){d.s.display.setUTCFullYear(e);d._setTitle();d._setCalander()}else if(b.hasClass(c+"-hours")||b.hasClass(c+"-ampm")){if(d.s.parts.hours12){b=a(d.dom.container).find("."+c+"-hours").val()*1;e=a(d.dom.container).find("."+c+"-ampm").val()===
"pm";d.s.d.setUTCHours(b===12&&!e?0:e&&b!==12?b+12:b)}else d.s.d.setUTCHours(e);d._setTime();d._writeOutput(true);g()}else if(b.hasClass(c+"-minutes")){d.s.d.setUTCMinutes(e);d._setTime();d._writeOutput(true);g()}else if(b.hasClass(c+"-seconds")){d.s.d.setSeconds(e);d._setTime();d._writeOutput(true);g()}d.dom.input.focus();d._position()}).on("click",function(b){var e=d.s.d,i=b.target.nodeName.toLowerCase(),h=i==="span"?b.target.parentNode:b.target,i=h.nodeName.toLowerCase();if(i!=="select"){b.stopPropagation();
if(i==="button"){h=a(h);b=h.parent();if(b.hasClass("disabled")&&!b.hasClass("range"))h.blur();else if(b.hasClass(c+"-iconLeft")){d.s.display.setUTCMonth(d.s.display.getUTCMonth()-1);d._setTitle();d._setCalander();d.dom.input.focus()}else if(b.hasClass(c+"-iconRight")){d._correctMonth(d.s.display,d.s.display.getUTCMonth()+1);d._setTitle();d._setCalander();d.dom.input.focus()}else{if(h.parents("."+c+"-time").length){i=h.data("value");h=h.data("unit");if(h==="minutes"){if(b.hasClass("disabled")&&b.hasClass("range")){d.s.minutesRange=
i;d._setTime();return}d.s.minutesRange=null}if(h==="seconds"){if(b.hasClass("disabled")&&b.hasClass("range")){d.s.secondsRange=i;d._setTime();return}d.s.secondsRange=null}if(i==="am")if(e.getUTCHours()>=12)i=e.getUTCHours()-12;else return;else if(i==="pm")if(e.getUTCHours()<12)i=e.getUTCHours()+12;else return;e[h==="hours"?"setUTCHours":h==="minutes"?"setUTCMinutes":"setSeconds"](i);d._setTime();d._writeOutput(true)}else{e||(e=d._dateToUtc(new Date));e.setUTCDate(1);e.setUTCFullYear(h.data("year"));
e.setUTCMonth(h.data("month"));e.setUTCDate(h.data("day"));d._writeOutput(true);d.s.parts.time?d._setCalander():setTimeout(function(){d._hide()},10)}g()}}else d.dom.input.focus()}})},_compareDates:function(a,b){return this._dateToUtcString(a)===this._dateToUtcString(b)},_correctMonth:function(a,b){var d=this._daysInMonth(a.getUTCFullYear(),b),c=a.getUTCDate()>d;a.setUTCMonth(b);c&&(a.setUTCDate(d),a.setUTCMonth(b))},_daysInMonth:function(a,b){return[31,0===a%4&&(0!==a%100||0===a%400)?29:28,31,30,
31,30,31,31,30,31,30,31][b]},_dateToUtc:function(a){return new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()))},_dateToUtcString:function(a){return a.getUTCFullYear()+"-"+this._pad(a.getUTCMonth()+1)+"-"+this._pad(a.getUTCDate())},_hide:function(c){if(c||"hidden"!==this.dom.input.attr("type"))c=this.s.namespace,this.dom.container.detach(),a(b).off("."+c),a(d).off("keydown."+c),a("div.dataTables_scrollBody").off("scroll."+c),a("div.DTE_Body_Content").off("scroll."+
c),a("body").off("click."+c)},_hours24To12:function(a){return 0===a?12:12<a?a-12:a},_htmlDay:function(a){if(a.empty)return'<td class="empty"></td>';var b=["selectable"],d=this.c.classPrefix;a.disabled&&b.push("disabled");a.today&&b.push("now");a.selected&&b.push("selected");return'<td data-day="'+a.day+'" class="'+b.join(" ")+'"><button class="'+d+"-button "+d+'-day" type="button" data-year="'+a.year+'" data-month="'+a.month+'" data-day="'+a.day+'"><span>'+a.day+"</span></button></td>"},_htmlMonth:function(b,
d){var c=this._dateToUtc(new Date),g=this._daysInMonth(b,d),e=(new Date(Date.UTC(b,d,1))).getUTCDay(),i=[],h=[];0<this.c.firstDay&&(e-=this.c.firstDay,0>e&&(e+=7));for(var f=g+e,j=f;7<j;)j-=7;var f=f+(7-j),k=this.c.minDate,j=this.c.maxDate;k&&(k.setUTCHours(0),k.setUTCMinutes(0),k.setSeconds(0));j&&(j.setUTCHours(23),j.setUTCMinutes(59),j.setSeconds(59));for(var l=0,n=0;l<f;l++){var m=new Date(Date.UTC(b,d,1+(l-e))),o=this.s.d?this._compareDates(m,this.s.d):!1,z=this._compareDates(m,c),q=l<e||l>=
g+e,w=k&&m<k||j&&m>j,t=this.c.disableDays;Array.isArray(t)&&-1!==a.inArray(m.getUTCDay(),t)?w=!0:"function"===typeof t&&!0===t(m)&&(w=!0);h.push(this._htmlDay({day:1+(l-e),month:d,year:b,selected:o,today:z,disabled:w,empty:q}));7===++n&&(this.c.showWeekNumber&&h.unshift(this._htmlWeekOfYear(l-e,d,b)),i.push("<tr>"+h.join("")+"</tr>"),h=[],n=0)}c=this.c.classPrefix;g=c+"-table";this.c.showWeekNumber&&(g+=" weekNumber");k&&(k=k>=new Date(Date.UTC(b,d,1,0,0,0)),this.dom.title.find("div."+c+"-iconLeft").css("display",
k?"none":"block"));j&&(j=j<new Date(Date.UTC(b,d+1,1,0,0,0)),this.dom.title.find("div."+c+"-iconRight").css("display",j?"none":"block"));return'<table class="'+g+'"><thead>'+this._htmlMonthHead()+"</thead><tbody>"+i.join("")+"</tbody></table>"},_htmlMonthHead:function(){var a=[],b=this.c.firstDay,d=this.c.i18n,c=function(a){for(a+=b;7<=a;)a-=7;return d.weekdays[a]};this.c.showWeekNumber&&a.push("<th></th>");for(var g=0;7>g;g++)a.push("<th>"+c(g)+"</th>");return a.join("")},_htmlWeekOfYear:function(a,
b,d){a=new Date(d,b,a,0,0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));d=Math.ceil(((a-new Date(d,0,1))/864E5+1)/7);return'<td class="'+this.c.classPrefix+'-week">'+d+"</td>"},_options:function(a,b,d){d||(d=b);a=this.dom.container.find("select."+this.c.classPrefix+"-"+a);a.empty();for(var c=0,g=b.length;c<g;c++)a.append('<option value="'+b[c]+'">'+d[c]+"</option>")},_optionSet:function(a,b){var d=this.dom.container.find("select."+this.c.classPrefix+"-"+a),c=d.parent().children("span");d.val(b);d=
d.find("option:selected");c.html(0!==d.length?d.text():this.c.i18n.unknown)},_optionsTime:function(b,d,c,g,e){var i=this.c.classPrefix,h=this.dom.container.find("div."+i+"-"+b),f,j=12===d?function(a){return a}:this._pad,i=this.c.classPrefix,k=i+"-table",l=this.c.i18n;if(h.length){var n="";f=10;var m=function(e,h,f){12===d&&"number"===typeof e&&(12<=c&&(e+=12),12==e?e=0:24==e&&(e=12));var j=c===e||"am"===e&&12>c||"pm"===e&&12<=c?"selected":"";g&&-1===a.inArray(e,g)&&(j+=" disabled");f&&(j+=" "+f);
return'<td class="selectable '+j+'"><button class="'+i+"-button "+i+'-day" type="button" data-unit="'+b+'" data-value="'+e+'"><span>'+h+"</span></button></td>"};if(12===d){n+="<tr>";for(e=1;6>=e;e++)n+=m(e,j(e));n+=m("am",l.amPm[0]);n+="</tr><tr>";for(e=7;12>=e;e++)n+=m(e,j(e));n+=m("pm",l.amPm[1]);n+="</tr>";f=7}else{if(24===d){var o=0;for(f=0;4>f;f++){n+="<tr>";for(e=0;6>e;e++)n+=m(o,j(o)),o++;n+="</tr>"}}else{n+="<tr>";for(f=0;60>f;f+=10)n+=m(f,j(f),"range");e=null!==e?e:10*Math.floor(c/10);n=
n+"</tr>"+('</tbody></thead><table class="'+k+" "+k+'-nospace"><tbody>')+"<tr>";for(f=e+1;f<e+10;f++)n+=m(f,j(f));n+="</tr>"}f=6}h.empty().append('<table class="'+k+'"><thead><tr><th colspan="'+f+'">'+l[b]+"</th></tr></thead><tbody>"+n+"</tbody></table>")}},_optionsTitle:function(){var a=this.c.i18n,b=this.c.minDate,d=this.c.maxDate,b=b?b.getFullYear():null,d=d?d.getFullYear():null,b=null!==b?b:(new Date).getFullYear()-this.c.yearRange,d=null!==d?d:(new Date).getFullYear()+this.c.yearRange;this._options("month",
this._range(0,11),a.months);this._options("year",this._range(b,d))},_pad:function(a){return 10>a?"0"+a:a},_position:function(){var d="input"===this.c.attachTo?this.dom.input.position():this.dom.input.offset(),c=this.dom.container,e=this.dom.input.outerHeight();if(c.hasClass("inline"))c.insertAfter(this.dom.input);else{this.s.parts.date&&this.s.parts.time&&550<a(b).width()?c.addClass("horizontal"):c.removeClass("horizontal");"input"===this.c.attachTo?c.css({top:d.top+e,left:d.left}).insertAfter(this.dom.input):
c.css({top:d.top+e,left:d.left}).appendTo("body");var g=c.outerHeight(),i=c.outerWidth(),h=a(b).scrollTop();d.top+e+g-h>a(b).height()&&(e=d.top-g,c.css("top",0>e?0:e));i+d.left>a(b).width()&&(d=a(b).width()-i,"input"===this.c.attachTo&&(d-=a(c).offsetParent().offset().left),c.css("left",0>d?0:d))}},_range:function(a,b,d){var c=[];for(d||(d=1);a<=b;a+=d)c.push(a);return c},_setCalander:function(){this.s.display&&this.dom.calendar.empty().append(this._htmlMonth(this.s.display.getUTCFullYear(),this.s.display.getUTCMonth()))},
_setTitle:function(){this._optionSet("month",this.s.display.getUTCMonth());this._optionSet("year",this.s.display.getUTCFullYear())},_setTime:function(){var a=this,b=this.s.d,d=b?b.getUTCHours():0,c=function(b){return a.c[b+"Available"]?a.c[b+"Available"]:a._range(0,59,a.c[b+"Increment"])};this._optionsTime("hours",this.s.parts.hours12?12:24,d,this.c.hoursAvailable);this._optionsTime("minutes",60,b?b.getUTCMinutes():0,c("minutes"),this.s.minutesRange);this._optionsTime("seconds",60,b?b.getSeconds():
0,c("seconds"),this.s.secondsRange)},_show:function(){var c=this,e=this.s.namespace;this._position();a(b).on("scroll."+e+" resize."+e,function(){c._hide()});a("div.DTE_Body_Content").on("scroll."+e,function(){c._hide()});a("div.dataTables_scrollBody").on("scroll."+e,function(){c._hide()});var g=this.dom.input[0].offsetParent;if(g!==d.body)a(g).on("scroll."+e,function(){c._hide()});a(d).on("keydown."+e,function(a){(9===a.keyCode||27===a.keyCode||13===a.keyCode)&&c._hide()});setTimeout(function(){a("body").on("click."+
e,function(b){!a(b.target).parents().filter(c.dom.container).length&&b.target!==c.dom.input[0]&&c._hide()})},10)},_writeOutput:function(a){var b=this.s.d,d=e?e.utc(b,c,this.c.locale,this.c.strict).format(this.c.format):b.getUTCFullYear()+"-"+this._pad(b.getUTCMonth()+1)+"-"+this._pad(b.getUTCDate());this.dom.input.val(d).trigger("change",{write:b});"hidden"===this.dom.input.attr("type")&&this.val(d,!1);a&&this.dom.input.focus()}});i.use=function(a){e=a};i._instance=0;i.defaults={attachTo:"body",classPrefix:"dt-datetime",
disableDays:null,firstDay:1,format:"YYYY-MM-DD",hoursAvailable:null,i18n:{previous:"Previous",next:"Next",months:"January February March April May June July August September October November December".split(" "),weekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),amPm:["am","pm"],hours:"Hour",minutes:"Minute",seconds:"Second",unknown:"-"},maxDate:null,minDate:null,minutesAvailable:null,minutesIncrement:1,strict:!0,locale:"en",onChange:function(){},secondsAvailable:null,secondsIncrement:1,showWeekNumber:!1,
yearRange:25};i.version="1.0.1";b.DateTime||(b.DateTime=i);a.fn.dtDateTime=function(a){return this.each(function(){new i(this,a)})};a.fn.dataTable&&(a.fn.dataTable.DateTime=i,a.fn.DataTable.DateTime=i);return i};"function"===typeof define&&define.amd?define(["jquery"],function(a){return x(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);return x(b,a,a.document)}:x(jQuery,window,document);var e,q,o=window.moment,l,c=function(a,b,d,g,h){var i=this;void 0===g&&
(g=0);void 0===h&&(h=1);if(!q||!q.versionCheck||!q.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");this.classes=e.extend(!0,{},c.classes);this.c=e.extend(!0,{},c.defaults,e.fn.dataTable.ext.searchBuilder,b);b=this.c.i18n;this.s={condition:void 0,conditions:{},data:void 0,dataIdx:-1,dataPoints:[],depth:h,dt:a,filled:!1,index:g,momentFormat:!1,topGroup:d,type:"",value:[]};this.dom={buttons:e("<div/>").addClass(this.classes.buttonContainer),condition:e("<select disabled/>").addClass(this.classes.condition).addClass(this.classes.dropDown).addClass(this.classes.italic).attr("autocomplete",
"hacking"),conditionTitle:e('<option value="" disabled selected hidden/>').text(this.s.dt.i18n("searchBuilder.condition",b.condition)),container:e("<div/>").addClass(this.classes.container),data:e("<select/>").addClass(this.classes.data).addClass(this.classes.dropDown).addClass(this.classes.italic),dataTitle:e('<option value="" disabled selected hidden/>').text(this.s.dt.i18n("searchBuilder.data",b.data)),defaultValue:e("<select disabled/>").addClass(this.classes.value).addClass(this.classes.dropDown),
"delete":e("<button>&times</button>").addClass(this.classes["delete"]).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.deleteTitle",b.deleteTitle)).attr("type","button"),left:e("<button><</button>").addClass(this.classes.left).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.leftTitle",b.leftTitle)).attr("type","button"),right:e("<button>></button>").addClass(this.classes.right).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.rightTitle",
b.rightTitle)).attr("type","button"),value:[e("<select disabled/>").addClass(this.classes.value).addClass(this.classes.dropDown).addClass(this.classes.italic)],valueTitle:e('<option value="--valueTitle--" selected/>').text(this.s.dt.i18n("searchBuilder.value",b.value))};if(this.c.greyscale){e(this.dom.data).addClass(this.classes.greyscale);e(this.dom.condition).addClass(this.classes.greyscale);e(this.dom.defaultValue).addClass(this.classes.greyscale);a=0;for(d=this.dom.value;a<d.length;a++)e(d[a]).addClass(this.classes.greyscale)}this.s.dt.on("draw.dtsp",
function(){i._adjustCriteria()});this.s.dt.on("buttons-action",function(){i._adjustCriteria()});e(window).on("resize.dtsp",q.util.throttle(function(){i._adjustCriteria()}));this._buildCriteria();return this};c.prototype.updateArrows=function(a,b){void 0===a&&(a=!1);void 0===b&&(b=!0);e(this.dom.container).empty().append(this.dom.data).append(this.dom.condition).append(this.dom.value[0]);e(this.dom.value[0]).trigger("dtsb-inserted");for(var d=1;d<this.dom.value.length;d++)e(this.dom.container).append(this.dom.value[d]),
e(this.dom.value[d]).trigger("dtsb-inserted");1<this.s.depth&&e(this.dom.buttons).append(this.dom.left);(!1===this.c.depthLimit||this.s.depth<this.c.depthLimit)&&a?e(this.dom.buttons).append(this.dom.right):e(this.dom.right).remove();e(this.dom.buttons).append(this.dom["delete"]);e(this.dom.container).append(this.dom.buttons);b&&this._adjustCriteria()};c.prototype.destroy=function(){e(this.dom.data).off(".dtsb");e(this.dom.condition).off(".dtsb");e(this.dom["delete"]).off(".dtsb");for(var a=0,b=this.dom.value;a<
b.length;a++)e(b[a]).off(".dtsb");e(this.dom.container).remove()};c.prototype.search=function(a,b){var d=this.s.conditions[this.s.condition];if(void 0!==this.s.condition&&void 0!==d){-1!==this.s.type.indexOf("num")&&""!==this.s.dt.settings()[0].oLanguage.sDecimal&&(a[this.s.dataIdx]=a[this.s.dataIdx].replace(this.s.dt.settings()[0].oLanguage.sDecimal,"."));var c=a[this.s.dataIdx];"search"!==this.c.orthogonal.search&&(c=this.s.dt.settings()[0],c=c.oApi._fnGetCellData(c,b,this.s.dataIdx,"string"===
typeof this.c.orthogonal?this.c.orthogonal:this.c.orthogonal.search));"array"===this.s.type&&(Array.isArray(c)||(c=[c]),c.sort());return d.search(c,this.s.value,this)}};c.prototype.getDetails=function(){var a=this.s.value;if(-1!==this.s.type.indexOf("num")&&""!==this.s.dt.settings()[0].oLanguage.sDecimal)for(var b=0;b<this.s.value.length;b++)-1!==this.s.value[b].indexOf(".")&&(a[b]=this.s.value[b].replace(".",this.s.dt.settings()[0].oLanguage.sDecimal));return{condition:this.s.condition,data:this.s.data,
value:a}};c.prototype.getNode=function(){return this.dom.container};c.prototype.populate=function(){this._populateData();-1!==this.s.dataIdx&&(this._populateCondition(),void 0!==this.s.condition&&this._populateValue())};c.prototype.rebuild=function(a){var b=!1,d;this._populateData();if(void 0!==a.data){var c=this.classes.italic,h=this.dom.data;e(this.dom.data).children("option").each(function(){e(this).text()===a.data&&(e(this).attr("selected",!0),e(h).removeClass(c),b=!0,d=e(this).val())})}if(b){this.s.data=
a.data;this.s.dataIdx=d;e(this.dom.dataTitle).remove();this._populateCondition();e(this.dom.conditionTitle).remove();var i;e(this.dom.condition).children("option").each(function(){void 0!==a.condition&&(e(this).val()===a.condition&&"string"===typeof a.condition)&&(e(this).attr("selected",!0),i=e(this).val())});this.s.condition=i;void 0!==this.s.condition?(e(this.dom.conditionTitle).remove(),e(this.dom.condition).removeClass(this.classes.italic),this._populateValue(a)):e(this.dom.conditionTitle).prependTo(this.dom.condition).attr("selected",
!0)}};c.prototype.setListeners=function(){var a=this;e(this.dom.data).unbind("input change").on("input change",function(){e(a.dom.dataTitle).attr("selected",!1);e(a.dom.data).removeClass(a.classes.italic);a.s.dataIdx=e(a.dom.data).children("option:selected").val();a.s.data=e(a.dom.data).children("option:selected").text();a.c.orthogonal=a._getOptions().orthogonal;a._clearCondition();a._clearValue();a._populateCondition();a.s.filled&&(a.s.filled=!1,a.s.dt.draw(),a.setListeners());a.s.dt.state.save()});
e(this.dom.condition).unbind("input change").on("input change",function(){e(a.dom.conditionTitle).attr("selected",!1);e(a.dom.condition).removeClass(a.classes.italic);for(var b=e(a.dom.condition).children("option:selected").val(),d=0,c=Object.keys(a.s.conditions);d<c.length;d++)if(c[d]===b){a.s.condition=b;break}a._clearValue();a._populateValue();b=0;for(d=a.dom.value;b<d.length;b++)c=d[b],a.s.filled&&0!==e(a.dom.container).has(c).length&&(a.s.filled=!1,a.s.dt.draw(),a.setListeners());a.s.dt.draw()})};
c.prototype._adjustCriteria=function(){if(0!==e(document).has(this.dom.container).length){var a,b;a=this.dom.value[this.dom.value.length-1];if(0!==e(this.dom.container).has(a).length){b=e(a).outerWidth(!0);a=e(a).offset().left+b;var d=e(this.dom.left).offset(),c=e(this.dom.right).offset(),h=e(this.dom["delete"]).offset(),i=0!==e(this.dom.container).has(this.dom.left).length,f=0!==e(this.dom.container).has(this.dom.right).length,j=i?d.left:f?c.left:h.left;15>j-a||i&&d.top!==h.top||f&&c.top!==h.top?
(e(this.dom.container).parent().addClass(this.classes.vertical),e(this.s.topGroup).trigger("dtsb-redrawContents")):15<j-(e(this.dom.data).offset().left+e(this.dom.data).outerWidth(!0)+e(this.dom.condition).outerWidth(!0)+b)&&(e(this.dom.container).parent().removeClass(this.classes.vertical),e(this.s.topGroup).trigger("dtsb-redrawContents"))}}};c.prototype._buildCriteria=function(){e(this.dom.data).append(this.dom.dataTitle);e(this.dom.condition).append(this.dom.conditionTitle);e(this.dom.container).append(this.dom.data).append(this.dom.condition);
for(var a=0,b=this.dom.value;a<b.length;a++){var d=b[a];e(d).append(this.dom.valueTitle);e(this.dom.container).append(d)}e(this.dom.container).append(this.dom["delete"]).append(this.dom.right);this.setListeners()};c.prototype._clearCondition=function(){e(this.dom.condition).empty();e(this.dom.conditionTitle).attr("selected",!0).attr("disabled",!0);e(this.dom.condition).prepend(this.dom.conditionTitle).prop("selectedIndex",0);this.s.conditions={};this.s.condition=void 0};c.prototype._clearValue=function(){if(void 0!==
this.s.condition){for(var a=0,b=this.dom.value;a<b.length;a++){var d=b[a];e(d).remove()}this.dom.value=[].concat(this.s.conditions[this.s.condition].init(this,c.updateListener));e(this.dom.value[0]).insertAfter(this.dom.condition).trigger("dtsb-inserted");for(d=1;d<this.dom.value.length;d++)e(this.dom.value[d]).insertAfter(this.dom.value[d-1]).trigger("dtsb-inserted")}else{a=0;for(b=this.dom.value;a<b.length;a++)d=b[a],e(d).remove();e(this.dom.valueTitle).attr("selected",!0);e(this.dom.defaultValue).append(this.dom.valueTitle).insertAfter(this.dom.condition)}this.s.value=
[]};c.prototype._getOptions=function(){return e.extend(!0,{},c.defaults,this.s.dt.settings()[0].aoColumns[this.s.dataIdx].searchBuilder)};c.prototype._populateCondition=function(){var a=[],b=Object.keys(this.s.conditions).length;if(0===b){b=e(this.dom.data).children("option:selected").val();this.s.type=this.s.dt.columns().type().toArray()[b];null===this.s.type&&(this.s.dt.draw(),this.setListeners(),this.s.type=this.s.dt.columns().type().toArray()[b]);e(this.dom.condition).attr("disabled",!1).empty().append(this.dom.conditionTitle).addClass(this.classes.italic);
e(this.dom.conditionTitle).attr("selected",!0);b=this.s.dt.settings()[0].oLanguage.sDecimal;""!==b&&this.s.type.indexOf(b)===this.s.type.length-b.length&&(-1!==this.s.type.indexOf("num-fmt")?this.s.type=this.s.type.replace(b,""):-1!==this.s.type.indexOf("num")&&(this.s.type=this.s.type.replace(b,"")));var d=void 0!==this.c.conditions[this.s.type]?this.c.conditions[this.s.type]:-1!==this.s.type.indexOf("moment")?this.c.conditions.moment:this.c.conditions.string;-1!==this.s.type.indexOf("moment")&&
(this.s.momentFormat=this.s.type.replace(/moment\-/g,""));for(var c=0,h=Object.keys(d);c<h.length;c++){var i=h[c];null!==d[i]&&(this.s.conditions[i]=d[i],b=d[i].conditionName,"function"===typeof b&&(b=b(this.s.dt,this.c.i18n)),a.push(e("<option>",{text:b,value:i}).addClass(this.classes.option).addClass(this.classes.notItalic)))}}else if(0<b){e(this.dom.condition).empty().attr("disabled",!1).addClass(this.classes.italic);d=0;for(c=Object.keys(this.s.conditions);d<c.length;d++)i=c[d],b=this.s.conditions[i].conditionName,
"function"===typeof b&&(b=b(this.s.dt,this.c.i18n)),i=e("<option>",{text:b,value:i}).addClass(this.classes.option).addClass(this.classes.notItalic),void 0!==this.s.condition&&this.s.condition===b&&(e(i).attr("selected",!0),e(this.dom.condition).removeClass(this.classes.italic)),a.push(i)}else{e(this.dom.condition).attr("disabled",!0).addClass(this.classes.italic);return}for(b=0;b<a.length;b++)i=a[b],e(this.dom.condition).append(i);e(this.dom.condition).prop("selectedIndex",0)};c.prototype._populateData=
function(){var a=this;e(this.dom.data).empty().append(this.dom.dataTitle);if(0===this.s.dataPoints.length)this.s.dt.columns().every(function(b){if(!0===a.c.columns||-1!==a.s.dt.columns(a.c.columns).indexes().toArray().indexOf(b)){for(var d=!1,c=0,g=a.s.dataPoints;c<g.length;c++)if(g[c].index===b){d=!0;break}d||(b={text:a.s.dt.settings()[0].aoColumns[b].sTitle,index:b},a.s.dataPoints.push(b),e(a.dom.data).append(e("<option>",{text:b.text,value:b.index}).addClass(a.classes.option).addClass(a.classes.notItalic)))}});
else for(var b=function(b){d.s.dt.columns().every(function(d){a.s.dt.settings()[0].aoColumns[d].sTitle===b.text&&(b.index=d)});var c=e("<option>",{text:b.text,value:b.index}).addClass(d.classes.option).addClass(d.classes.notItalic);d.s.data===b.text&&(d.s.dataIdx=b.index,e(c).attr("selected",!0),e(d.dom.data).removeClass(d.classes.italic));e(d.dom.data).append(c)},d=this,c=0,h=this.s.dataPoints;c<h.length;c++)b(h[c])};c.prototype._populateValue=function(a){var b=this,d=this.s.filled;this.s.filled=
!1;e(this.dom.defaultValue).remove();for(var g=0,h=this.dom.value;g<h.length;g++)e(h[g]).remove();g=e(this.dom.container).children();if(3<g.length)for(h=2;h<g.length-1;h++)e(g[h]).remove();void 0!==a&&this.s.dt.columns().every(function(d){b.s.dt.settings()[0].aoColumns[d].sTitle===a.data&&(b.s.dataIdx=d)});this.dom.value=[].concat(this.s.conditions[this.s.condition].init(this,c.updateListener,void 0!==a?a.value:void 0));void 0!==a&&void 0!==a.value&&(this.s.value=a.value);e(this.dom.value[0]).insertAfter(this.dom.condition).trigger("dtsb-inserted");
for(h=1;h<this.dom.value.length;h++)e(this.dom.value[h]).insertAfter(this.dom.value[h-1]).trigger("dtsb-inserted");this.s.filled=this.s.conditions[this.s.condition].isInputValid(this.dom.value,this);this.setListeners();d!==this.s.filled&&(this.s.dt.draw(),this.setListeners())};c.version="1.0.0";c.classes={button:"dtsb-button",buttonContainer:"dtsb-buttonContainer",condition:"dtsb-condition",container:"dtsb-criteria",data:"dtsb-data","delete":"dtsb-delete",dropDown:"dtsb-dropDown",greyscale:"dtsb-greyscale",
input:"dtsb-input",italic:"dtsb-italic",joiner:"dtsp-joiner",left:"dtsb-left",notItalic:"dtsb-notItalic",option:"dtsb-option",right:"dtsb-right",value:"dtsb-value",vertical:"dtsb-vertical"};c.initSelect=function(a,b,d,g){void 0===d&&(d=null);void 0===g&&(g=!1);var h=e(a.dom.data).children("option:selected").val(),i=a.s.dt.rows().indexes().toArray(),f=a.s.dt.settings()[0],j=e("<select/>").addClass(c.classes.value).addClass(c.classes.dropDown).addClass(c.classes.italic).append(a.dom.valueTitle).on("input change",
function(){e(this).removeClass(c.classes.italic);b(a,this)});a.c.greyscale&&e(j).addClass(c.classes.greyscale);for(var k=[],l=[],m=0;m<i.length;m++){var o=i[m],p=f.oApi._fnGetCellData(f,o,h,"string"===typeof a.c.orthogonal?a.c.orthogonal:a.c.orthogonal.search),p="string"===typeof p?p.replace(/[\r\n\u2028]/g," "):p,o=f.oApi._fnGetCellData(f,o,h,"string"===typeof a.c.orthogonal?a.c.orthogonal:a.c.orthogonal.display);"array"===a.s.type&&(p=!Array.isArray(p)?[p]:p=p.sort(),o=!Array.isArray(o)?[o]:o=o.sort());
var q=function(b,g){var h=e("<option>",{text:typeof g==="string"?g.replace(/(<([^>]+)>)/ig,""):g,type:Array.isArray(b)?"Array":"String",value:a.s.type.indexOf("html")!==-1&&b!==null&&typeof b==="string"?b.replace(/(<([^>]+)>)/ig,""):b}).addClass(a.classes.option).addClass(a.classes.notItalic),f=e(h).val();if(k.indexOf(f)===-1){k.push(f);l.push(h);d!==null&&Array.isArray(d[0])&&(d[0]=d[0].sort().join(","));if(d!==null&&h.val()===d[0]){h.attr("selected",true);e(j).removeClass(c.classes.italic)}}};if(g)for(var r=
0;r<p.length;r++)q(p[r],o[r]);else q(p,o)}l.sort(function(b,d){if("string"===a.s.type||"num"===a.s.type||"html"===a.s.type||"html-num"===a.s.type)return e(b).val()<e(d).val()?-1:e(b).val()<e(d).val()?1:0;if("num-fmt"===a.s.type||"html-num-fmt"===a.s.type)return+e(b).val().replace(/[^0-9.]/g,"")<+e(d).val().replace(/[^0-9.]/g,"")?-1:+e(b).val().replace(/[^0-9.]/g,"")<+e(d).val().replace(/[^0-9.]/g,"")?1:0});for(g=0;g<l.length;g++)h=l[g],e(j).append(h);return j};c.initSelectArray=function(a,b,d){void 0===
d&&(d=null);return c.initSelect(a,b,d,!0)};c.initInput=function(a,b,d){void 0===d&&(d=null);var g=e("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input",function(){b(a,this)});a.c.greyscale&&e(g).addClass(c.classes.greyscale);null!==d&&e(g).val(d[0]);return g};c.init2Input=function(a,b,d){void 0===d&&(d=null);var g=[e("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input",function(){b(a,this)}),e("<span>").addClass(a.classes.joiner).text(a.s.dt.i18n("searchBuilder.valueJoiner",
a.c.i18n.valueJoiner)),e("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input",function(){b(a,this)})];a.c.greyscale&&(e(g[0]).addClass(c.classes.greyscale),e(g[2]).addClass(c.classes.greyscale));null!==d&&(e(g[0]).val(d[0]),e(g[2]).val(d[1]));a.s.dt.off("draw");a.s.dt.one("draw",function(){e(a.s.topGroup).trigger("dtsb-redrawContents")});return g};c.initDate=function(a,b,d){void 0===d&&(d=null);var g=e("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",
format:a.s.momentFormat?a.s.momentFormat:void 0}).on("input change",function(){b(a,this)});a.c.greyscale&&e(g).addClass(c.classes.greyscale);null!==d&&e(g).val(d[0]);return g};c.initNoValue=function(a){a.s.dt.off("draw");a.s.dt.one("draw",function(){e(a.s.topGroup).trigger("dtsb-redrawContents")})};c.init2Date=function(a,b,d){void 0===d&&(d=null);var g=[e("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",format:a.s.momentFormat?a.s.momentFormat:void 0}).on("input change",
function(){b(a,this)}),e("<span>").addClass(a.classes.joiner).text(a.s.dt.i18n("searchBuilder.valueJoiner",a.c.i18n.valueJoiner)),e("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",format:a.s.momentFormat?a.s.momentFormat:void 0}).on("input change",function(){b(a,this)})];a.c.greyscale&&(e(g[0]).addClass(c.classes.greyscale),e(g[2]).addClass(c.classes.greyscale));null!==d&&0<d.length&&(e(g[0]).val(d[0]),e(g[2]).val(d[1]));a.s.dt.off("draw");a.s.dt.one("draw",
function(){e(a.s.topGroup).trigger("dtsb-redrawContents")});return g};c.isInputValidSelect=function(a){for(var b=!0,d=0;d<a.length;d++){var g=a[d];e(g).children("option:selected").length===e(g).children("option").length-e(g).children("option."+c.classes.notItalic).length&&(1===e(g).children("option:selected").length&&e(g).children("option:selected")[0]===e(g).children("option:hidden")[0])&&(b=!1)}return b};c.isInputValidInput=function(a){for(var b=!0,d=0;d<a.length;d++){var c=a[d];e(c).is("input")&&
0===e(c).val().length&&(b=!1)}return b};c.inputValueSelect=function(a){for(var b=[],d=0;d<a.length;d++){var c=a[d];if(e(c).is("select")){var h=e(c).children("option:selected").val();b.push("Array"===e(c).children("option:selected").attr("type")?h.split(",").sort():h)}}return b};c.inputValueInput=function(a){for(var b=[],d=0;d<a.length;d++){var c=a[d];e(c).is("input")&&b.push(e(c).val())}return b};c.updateListener=function(a,b){var d=a.s.conditions[a.s.condition];a.s.filled=d.isInputValid(a.dom.value,
a);a.s.value=d.inputValue(a.dom.value,a);Array.isArray(a.s.value)||(a.s.value=[a.s.value]);for(d=0;d<a.s.value.length;d++)Array.isArray(a.s.value[d])?a.s.value[d].sort():""!==a.s.dt.settings()[0].oLanguage.sDecimal&&(a.s.value[d]=a.s.value[d].replace(a.s.dt.settings()[0].oLanguage.sDecimal,"."));for(var c=null,h=null,d=0;d<a.dom.value.length;d++)b===a.dom.value[d][0]&&(c=d,void 0!==b.selectionStart&&(h=b.selectionStart));a.s.dt.draw();null!==c&&(e(a.dom.value[c]).removeClass(a.classes.italic),e(a.dom.value[c]).focus(),
null!==h&&e(a.dom.value[c])[0].setSelectionRange(h,h))};c.dateConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.equals",b.conditions.date.equals)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return a===b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.not",b.conditions.date.not)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return a!==b[0]}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.before",b.conditions.date.before)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return a<b[0]}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.after",b.conditions.date.after)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return a>b[0]}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.between",b.conditions.date.between)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return b[0]<b[1]?b[0]<=a&&a<=b[1]:b[1]<=a&&a<=b[0]}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notBetween",b.conditions.date.notBetween)},init:c.init2Date,
inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|\-|\,)/g,"-");return b[0]<b[1]?!(b[0]<=a&&a<=b[1]):!(b[1]<=a&&a<=b[0])}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.empty",b.conditions.date.empty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notEmpty",
b.conditions.date.notEmpty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.momentDateConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.equals",b.conditions.moment.equals)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return o(a,d.s.momentFormat).valueOf()===o(b[0],d.s.momentFormat).valueOf()}},"!=":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.moment.not",b.conditions.moment.not)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return o(a,d.s.momentFormat).valueOf()!==o(b[0],d.s.momentFormat).valueOf()}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.before",b.conditions.moment.before)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return o(a,d.s.momentFormat).valueOf()<
o(b[0],d.s.momentFormat).valueOf()}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.after",b.conditions.moment.after)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return o(a,d.s.momentFormat).valueOf()>o(b[0],d.s.momentFormat).valueOf()}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.between",b.conditions.moment.between)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b,d){var a=o(a,d.s.momentFormat).valueOf(),c=o(b[0],d.s.momentFormat).valueOf(),b=o(b[1],d.s.momentFormat).valueOf();return c<b?c<=a&&a<=b:b<=a&&a<=c}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.notBetween",b.conditions.moment.notBetween)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){var a=o(a,d.s.momentFormat).valueOf(),c=o(b[0],d.s.momentFormat).valueOf(),b=o(b[1],d.s.momentFormat).valueOf();
return c<b?!(+c<=+a&&+a<=+b):!(+b<=+a&&+a<=+c)}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.empty",b.conditions.moment.empty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.moment.notEmpty",b.conditions.moment.notEmpty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},
search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.numConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.equals",b.conditions.number.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return+a===+b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.not",b.conditions.number.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,
search:function(a,b){return+a!==+b[0]}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lt",b.conditions.number.lt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a<+b[0]}},"<=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lte",b.conditions.number.lte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a<=+b[0]}},">=":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.number.gte",b.conditions.number.gte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a>=+b[0]}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gt",b.conditions.number.gt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a>+b[0]}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.between",
b.conditions.number.between)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+b[0]<+b[1]?+b[0]<=+a&&+a<=+b[1]:+b[1]<=+a&&+a<=+b[0]}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notBetween",b.conditions.number.notBetween)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+b[0]<+b[1]?!(+b[0]<=+a&&+a<=+b[1]):!(+b[1]<=+a&&+a<=+b[0])}},"null":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.number.empty",b.conditions.number.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notEmpty",b.conditions.number.notEmpty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.numFmtConditions=
{"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.equals",b.conditions.number.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+d===+c}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.not",b.conditions.number.not)},
init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+d!==+c}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lt",b.conditions.number.lt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){var d=0===
a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+d<+c}},"<=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lte",b.conditions.number.lte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,
""):b[0].replace(/[^0-9.]/g,"");return+d<=+c}},">=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gte",b.conditions.number.gte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+d>=+c}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gt",
b.conditions.number.gt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+d>+c}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.between",b.conditions.number.between)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,""),e=0===b[1].indexOf("-")?"-"+b[1].replace(/[^0-9.]/g,""):b[1].replace(/[^0-9.]/g,"");return+c<+e?+c<=+d&&+d<=+e:+e<=+d&&+d<=+c}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notBetween",b.conditions.number.notBetween)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){var d=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,""),c=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,""),e=0===b[1].indexOf("-")?"-"+b[1].replace(/[^0-9.]/g,""):b[1].replace(/[^0-9.]/g,"");return+c<+e?!(+c<=+d&&+d<=+e):!(+e<=+d&&+d<=+c)}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.empty",b.conditions.number.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},
search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notEmpty",b.conditions.number.notEmpty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.stringConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.equals",b.conditions.string.equals)},init:c.initSelect,inputValue:c.inputValueSelect,
isInputValid:c.isInputValidSelect,search:function(a,b){return a===b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.not",b.conditions.string.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidInput,search:function(a,b){return a!==b[0]}},starts:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.startsWith",b.conditions.string.startsWith)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){return 0===a.toLowerCase().indexOf(b[0].toLowerCase())}},contains:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.contains",b.conditions.string.contains)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return-1!==a.toLowerCase().indexOf(b[0].toLowerCase())}},ends:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.endsWith",b.conditions.string.endsWith)},init:c.initInput,inputValue:c.inputValueInput,
isInputValid:c.isInputValidInput,search:function(a,b){return a.toLowerCase().endsWith(b[0].toLowerCase())}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.empty",b.conditions.string.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.notEmpty",b.conditions.string.notEmpty)},isInputValid:function(){return!0},
init:c.initNoValue,inputValue:function(){},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.arrayConditions={contains:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.contains",b.conditions.array.contains)},init:c.initSelectArray,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return-1!==a.indexOf(b[0])}},without:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.without",b.conditions.array.without)},
init:c.initSelectArray,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return-1===a.indexOf(b[0])}},"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.equals",b.conditions.array.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){if(a.length===b[0].length){for(var d=0;d<a.length;d++)if(a[d]!==b[0][d])return!1;return!0}return!1}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.not",
b.conditions.array.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){if(a.length===b[0].length){for(var d=0;d<a.length;d++)if(a[d]!==b[0][d])return!0;return!1}return!0}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.empty",b.conditions.array.empty)},init:c.initNoValue,isInputValid:function(){return!0},inputValue:function(){},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.array.notEmpty",b.conditions.array.notEmpty)},isInputValid:function(){return!0},init:c.initNoValue,inputValue:function(){},search:function(a){return null!==a&&void 0!==a&&0!==a.length}}};c.defaults={columns:!0,conditions:{array:c.arrayConditions,date:c.dateConditions,html:c.stringConditions,"html-num":c.numConditions,"html-num-fmt":c.numFmtConditions,moment:c.momentDateConditions,num:c.numConditions,"num-fmt":c.numFmtConditions,string:c.stringConditions},
depthLimit:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",button:{"0":"Search Builder",_:"Search Builder (%d)"},clearAll:"Clear All",condition:"Condition",data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",rightTitle:"Indent criteria",title:{"0":"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},logic:"AND",orthogonal:{display:"display",search:"filter"},preDefined:!1};l=c;var f,u,r,k=function(a,
b,d,c,e,i){void 0===c&&(c=0);void 0===e&&(e=!1);void 0===i&&(i=1);if(!u||!u.versionCheck||!u.versionCheck("1.10.0"))throw Error("SearchBuilder requires DataTables 1.10 or newer");this.classes=f.extend(!0,{},k.classes);this.c=f.extend(!0,{},k.defaults,b);this.s={criteria:[],depth:i,dt:a,index:c,isChild:e,logic:void 0,opts:b,toDrop:void 0,topGroup:d};this.dom={add:f("<button/>").addClass(this.classes.add).addClass(this.classes.button).attr("type","button"),clear:f("<button>&times</button>").addClass(this.classes.button).addClass(this.classes.clearGroup).attr("type",
"button"),container:f("<div/>").addClass(this.classes.group),logic:f("<button/>").addClass(this.classes.logic).addClass(this.classes.button).attr("type","button"),logicContainer:f("<div/>").addClass(this.classes.logicContainer)};void 0===this.s.topGroup&&(this.s.topGroup=this.dom.container);this._setup();return this};k.prototype.destroy=function(){f(this.dom.add).off(".dtsb");f(this.dom.logic).off(".dtsb");f(this.dom.container).trigger("dtsb-destroy").remove();this.s.criteria=[]};k.prototype.getDetails=
function(){if(0===this.s.criteria.length)return{};for(var a={criteria:[],logic:this.s.logic},b=0,d=this.s.criteria;b<d.length;b++)a.criteria.push(d[b].criteria.getDetails());return a};k.prototype.getNode=function(){return this.dom.container};k.prototype.rebuild=function(a){if(!(void 0===a.criteria||null===a.criteria||0===a.criteria.length)){this.s.logic=a.logic;f(this.dom.logic).text("OR"===this.s.logic?this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr):this.s.dt.i18n("searchBuilder.logicAnd",
this.c.i18n.logicAnd));for(var b=0,d=a.criteria;b<d.length;b++)a=d[b],void 0!==a.logic?this._addPrevGroup(a):void 0===a.logic&&this._addPrevCriteria(a);b=0;for(d=this.s.criteria;b<d.length;b++)a=d[b],a.criteria instanceof l&&(a.criteria.updateArrows(1<this.s.criteria.length,!1),this._setCriteriaListeners(a.criteria))}};k.prototype.redrawContents=function(){f(this.dom.container).empty().append(this.dom.logicContainer).append(this.dom.add);this.s.criteria.sort(function(a,b){return a.criteria.s.index<
b.criteria.s.index?-1:a.criteria.s.index>b.criteria.s.index?1:0});this.setListeners();for(var a=0;a<this.s.criteria.length;a++){var b=this.s.criteria[a].criteria;b instanceof l?(this.s.criteria[a].index=a,this.s.criteria[a].criteria.s.index=a,f(this.s.criteria[a].criteria.dom.container).insertBefore(this.dom.add),this._setCriteriaListeners(b),this.s.criteria[a].criteria.rebuild(this.s.criteria[a].criteria.getDetails())):b instanceof k&&0<b.s.criteria.length?(this.s.criteria[a].index=a,this.s.criteria[a].criteria.s.index=
a,f(this.s.criteria[a].criteria.dom.container).insertBefore(this.dom.add),b.redrawContents(),this._setGroupListeners(b)):(this.s.criteria.splice(a,1),a--)}this.setupLogic()};k.prototype.search=function(a,b){return"AND"===this.s.logic?this._andSearch(a,b):"OR"===this.s.logic?this._orSearch(a,b):!0};k.prototype.setupLogic=function(){f(this.dom.logicContainer).remove();f(this.dom.clear).remove();if(1>this.s.criteria.length)this.s.isChild||(f(this.dom.container).trigger("dtsb-destroy"),f(this.dom.container).css("margin-left",
0));else{var a=f(this.dom.container).height()-2;f(this.dom.clear).height("0px");f(this.dom.logicContainer).append(this.dom.clear).width(a);f(this.dom.container).prepend(this.dom.logicContainer);this._setLogicListener();f(this.dom.container).css("margin-left",f(this.dom.logicContainer).outerHeight(!0));var a=f(this.dom.logicContainer).offset(),b=a.left,d=f(this.dom.container).offset().left,b=b-(b-d)-f(this.dom.logicContainer).outerHeight(!0);f(this.dom.logicContainer).offset({left:b});b=f(this.dom.logicContainer).next();
a=a.top;b=f(b).offset().top;a-=a-b;f(this.dom.logicContainer).offset({top:a});f(this.dom.clear).outerHeight(f(this.dom.logicContainer).height());this._setClearListener()}};k.prototype.setListeners=function(){var a=this;f(this.dom.add).unbind("click");f(this.dom.add).on("click",function(){a.s.isChild||f(a.dom.container).prepend(a.dom.logicContainer);a.addCriteria();f(a.dom.container).trigger("dtsb-add");a.s.dt.state.save();return!1});for(var b=0,d=this.s.criteria;b<d.length;b++)d[b].criteria.setListeners();
this._setClearListener();this._setLogicListener()};k.prototype.addCriteria=function(a,b){void 0===a&&(a=null);void 0===b&&(b=!0);var d=null===a?this.s.criteria.length:a.s.index,c=new l(this.s.dt,this.s.opts,this.s.topGroup,d,this.s.depth);null!==a&&(c.c=a.c,c.s=a.s,c.s.depth=this.s.depth,c.classes=a.classes);c.populate();for(var e=!1,i=0;i<this.s.criteria.length;i++)0===i&&this.s.criteria[i].criteria.s.index>c.s.index?(f(c.getNode()).insertBefore(this.s.criteria[i].criteria.dom.container),e=!0):i<
this.s.criteria.length-1&&(this.s.criteria[i].criteria.s.index<c.s.index&&this.s.criteria[i+1].criteria.s.index>c.s.index)&&(f(c.getNode()).insertAfter(this.s.criteria[i].criteria.dom.container),e=!0);e||f(c.getNode()).insertBefore(this.dom.add);this.s.criteria.push({criteria:c,index:d});this.s.criteria=this.s.criteria.sort(function(a,b){return a.criteria.s.index-b.criteria.s.index});d=0;for(e=this.s.criteria;d<e.length;d++)i=e[d],i.criteria instanceof l&&i.criteria.updateArrows(1<this.s.criteria.length,
b);this._setCriteriaListeners(c);c.setListeners();this.setupLogic()};k.prototype.checkFilled=function(){for(var a=0,b=this.s.criteria;a<b.length;a++){var d=b[a];if(d.criteria instanceof l&&d.criteria.s.filled||d.criteria instanceof k&&d.criteria.checkFilled())return!0}return!1};k.prototype.count=function(){for(var a=0,b=0,d=this.s.criteria;b<d.length;b++){var c=d[b];c.criteria instanceof k?a+=c.criteria.count():a++}return a};k.prototype._addPrevGroup=function(a){var b=this.s.criteria.length,d=new k(this.s.dt,
this.c,this.s.topGroup,b,!0,this.s.depth+1);this.s.criteria.push({criteria:d,index:b,logic:d.s.logic});d.rebuild(a);this.s.criteria[b].criteria=d;f(this.s.topGroup).trigger("dtsb-redrawContents");this._setGroupListeners(d)};k.prototype._addPrevCriteria=function(a){var b=this.s.criteria.length,d=new l(this.s.dt,this.s.opts,this.s.topGroup,b,this.s.depth);d.populate();this.s.criteria.push({criteria:d,index:b});d.rebuild(a);this.s.criteria[b].criteria=d;f(this.s.topGroup).trigger("dtsb-redrawContents")};
k.prototype._andSearch=function(a,b){if(0===this.s.criteria.length)return!0;for(var d=0,c=this.s.criteria;d<c.length;d++){var e=c[d];if((!(e.criteria instanceof l)||e.criteria.s.filled)&&!e.criteria.search(a,b))return!1}return!0};k.prototype._orSearch=function(a,b){if(0===this.s.criteria.length)return!0;for(var d=!1,c=0,e=this.s.criteria;c<e.length;c++){var f=e[c];if(f.criteria instanceof l&&f.criteria.s.filled){if(d=!0,f.criteria.search(a,b))return!0}else if(f.criteria instanceof k&&f.criteria.checkFilled()&&
(d=!0,f.criteria.search(a,b)))return!0}return!d};k.prototype._removeCriteria=function(a,b){void 0===b&&(b=!1);if(1>=this.s.criteria.length&&this.s.isChild)this.destroy();else{for(var d=void 0,c=0;c<this.s.criteria.length;c++)if(this.s.criteria[c].index===a.s.index&&(!b||this.s.criteria[c].criteria instanceof k))d=c;void 0!==d&&this.s.criteria.splice(d,1);for(c=0;c<this.s.criteria.length;c++)this.s.criteria[c].index=c,this.s.criteria[c].criteria.s.index=c}};k.prototype._setCriteriaListeners=function(a){var b=
this;f(a.dom["delete"]).unbind("click").on("click",function(){b._removeCriteria(a);f(a.dom.container).remove();for(var c=0,e=b.s.criteria;c<e.length;c++){var h=e[c];h.criteria instanceof l&&h.criteria.updateArrows(1<b.s.criteria.length)}a.destroy();b.s.dt.draw();f(b.s.topGroup).trigger("dtsb-redrawContents");f(b.s.topGroup).trigger("dtsb-updateTitle");return!1});f(a.dom.right).unbind("click").on("click",function(){var c=a.s.index,e=new k(b.s.dt,b.s.opts,b.s.topGroup,a.s.index,!0,b.s.depth+1);e.addCriteria(a);
b.s.criteria[c].criteria=e;b.s.criteria[c].logic="AND";f(b.s.topGroup).trigger("dtsb-redrawContents");b._setGroupListeners(e);return!1});f(a.dom.left).unbind("click").on("click",function(){b.s.toDrop=new l(b.s.dt,b.s.opts,b.s.topGroup,a.s.index);b.s.toDrop.s=a.s;b.s.toDrop.c=a.c;b.s.toDrop.classes=a.classes;b.s.toDrop.populate();var c=b.s.toDrop.s.index;f(b.dom.container).trigger("dtsb-dropCriteria");a.s.index=c;b._removeCriteria(a);f(b.s.topGroup).trigger("dtsb-redrawContents");b.s.dt.draw();return!1})};
k.prototype._setClearListener=function(){var a=this;f(this.dom.clear).unbind("click").on("click",function(){if(!a.s.isChild)return f(a.dom.container).trigger("dtsb-clearContents"),!1;a.destroy();f(a.s.topGroup).trigger("dtsb-updateTitle");f(a.s.topGroup).trigger("dtsb-redrawContents");return!1})};k.prototype._setGroupListeners=function(a){var b=this;f(a.dom.add).unbind("click").on("click",function(){b.setupLogic();f(b.dom.container).trigger("dtsb-add");return!1});f(a.dom.container).unbind("dtsb-add").on("dtsb-add",
function(){b.setupLogic();f(b.dom.container).trigger("dtsb-add");return!1});f(a.dom.container).unbind("dtsb-destroy").on("dtsb-destroy",function(){b._removeCriteria(a,!0);f(a.dom.container).remove();b.setupLogic();return!1});f(a.dom.container).unbind("dtsb-dropCriteria").on("dtsb-dropCriteria",function(){var c=a.s.toDrop;c.s.index=a.s.index;c.updateArrows(1<b.s.criteria.length,!1);b.addCriteria(c,!1);return!1});a.setListeners()};k.prototype._setup=function(){this.setListeners();f(this.dom.add).text(this.s.dt.i18n("searchBuilder.add",
this.c.i18n.add));f(this.dom.logic).text("OR"===this.c.logic?this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr):this.s.dt.i18n("searchBuilder.logicAnd",this.c.i18n.logicAnd));this.s.logic="OR"===this.c.logic?"OR":"AND";this.c.greyscale&&f(this.dom.logic).addClass(this.classes.greyscale);f(this.dom.logicContainer).append(this.dom.logic).append(this.dom.clear);this.s.isChild&&f(this.dom.container).append(this.dom.logicContainer);f(this.dom.container).append(this.dom.add)};k.prototype._setLogicListener=
function(){var a=this;f(this.dom.logic).unbind("click").on("click",function(){a._toggleLogic();a.s.dt.draw();for(var b=0,c=a.s.criteria;b<c.length;b++)c[b].criteria.setListeners()})};k.prototype._toggleLogic=function(){"OR"===this.s.logic?(this.s.logic="AND",f(this.dom.logic).text(this.s.dt.i18n("searchBuilder.logicAnd",this.c.i18n.logicAnd))):"AND"===this.s.logic&&(this.s.logic="OR",f(this.dom.logic).text(this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr)))};k.version="1.0.0";k.classes=
{add:"dtsb-add",button:"dtsb-button",clearGroup:"dtsb-clearGroup",greyscale:"dtsb-greyscale",group:"dtsb-group",inputButton:"dtsb-iptbtn",logic:"dtsb-logic",logicContainer:"dtsb-logicContainer"};k.defaults={columns:!0,conditions:{date:l.dateConditions,html:l.stringConditions,"html-num":l.numConditions,"html-num-fmt":l.numFmtConditions,moment:l.momentDateConditions,num:l.numConditions,"num-fmt":l.numFmtConditions,string:l.stringConditions},depthLimit:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",
button:{"0":"Search Builder",_:"Search Builder (%d)"},clearAll:"Clear All",condition:"Condition",data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",rightTitle:"Indent criteria",title:{"0":"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},logic:"AND",orthogonal:{display:"display",search:"filter"},preDefined:!1};r=k;var j,s,v,m=function(a,b){var c=this;if(!s||!s.versionCheck||!s.versionCheck("1.10.0"))throw Error("SearchBuilder requires DataTables 1.10 or newer");
var e=new s.Api(a);this.classes=j.extend(!0,{},m.classes);this.c=j.extend(!0,{},m.defaults,b);this.dom={clearAll:j('<button type="button">'+e.i18n("searchBuilder.clearAll",this.c.i18n.clearAll)+"</button>").addClass(this.classes.clearAll).addClass(this.classes.button).attr("type","button"),container:j("<div/>").addClass(this.classes.container),title:j("<div/>").addClass(this.classes.title),titleRow:j("<div/>").addClass(this.classes.titleRow),topGroup:void 0};this.s={dt:e,opts:b,search:void 0,topGroup:void 0};
if(void 0===e.settings()[0]._searchBuilder){e.settings()[0]._searchBuilder=this;if(this.s.dt.settings()[0]._bInitComplete)this._setUp();else e.one("init.dt",function(){c._setUp()});return this}};m.prototype.getDetails=function(){return this.s.topGroup.getDetails()};m.prototype.getNode=function(){return this.dom.container};m.prototype.rebuild=function(a){j(this.dom.clearAll).click();if(void 0===a||null===a)return this;this.s.topGroup.rebuild(a);this.s.dt.draw();this.s.topGroup.setListeners();return this};
m.prototype._applyPreDefDefaults=function(a){var b=this;void 0!==a.criteria&&void 0===a.logic&&(a.logic="AND");for(var c=function(a){a.criteria!==void 0?a=e._applyPreDefDefaults(a):e.s.dt.columns().every(function(c){if(b.s.dt.settings()[0].aoColumns[c].sTitle===a.data)a.dataIdx=c})},e=this,f=0,i=a.criteria;f<i.length;f++)c(i[f]);return a};m.prototype._setUp=function(a){var b=this;void 0===a&&(a=!0);this.s.topGroup=new r(this.s.dt,this.c,void 0);this._setClearListener();this.s.dt.on("stateSaveParams",
function(a,c,e){e.searchBuilder=b.getDetails();e.page=b.s.dt.page()});this._build();a&&(a=this.s.dt.state.loaded(),null!==a&&void 0!==a.searchBuilder?(this.s.topGroup.rebuild(a.searchBuilder),j(this.s.topGroup.dom.container).trigger("dtsb-redrawContents"),this.s.dt.page(a.page).draw("page"),this.s.topGroup.setListeners()):!1!==this.c.preDefined&&(this.c.preDefined=this._applyPreDefDefaults(this.c.preDefined),this.rebuild(this.c.preDefined)));this._setEmptyListener();this.s.dt.state.save()};m.prototype._updateTitle=
function(a){j(this.dom.title).text(this.s.dt.i18n("searchBuilder.title",this.c.i18n.title,a))};m.prototype._build=function(){var a=this;j(this.dom.clearAll).remove();j(this.dom.container).empty();var b=this.s.topGroup.count();this._updateTitle(b);j(this.dom.titleRow).append(this.dom.title);j(this.dom.container).append(this.dom.titleRow);this.dom.topGroup=this.s.topGroup.getNode();j(this.dom.container).append(this.dom.topGroup);this._setRedrawListener();var c=this.s.dt.table(0).node();-1===j.fn.dataTable.ext.search.indexOf(this.s.search)&&
(this.s.search=function(b,e,f){return b.nTable!==c?!0:a.s.topGroup.search(e,f)},j.fn.dataTable.ext.search.push(this.s.search));j.fn.DataTable.Api.registerPlural("columns().type()","column().type()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].sType},1)});this.s.dt.on("destroy.dt",function(){j(a.dom.container).remove();j(a.dom.clearAll).remove();for(var b=j.fn.dataTable.ext.search.indexOf(a.s.search);b!==-1;){j.fn.dataTable.ext.search.splice(b,1);b=j.fn.dataTable.ext.search.indexOf(a.s.search)}})};
m.prototype._checkClear=function(){0<this.s.topGroup.s.criteria.length?(j(this.dom.clearAll).insertAfter(this.dom.title),this._setClearListener()):j(this.dom.clearAll).remove()};m.prototype._filterChanged=function(a){var b=this.c.filterChanged;"function"===typeof b&&b(a,this.s.dt.i18n("searchBuilder.button",this.c.i18n.button,a))};m.prototype._setClearListener=function(){var a=this;j(this.dom.clearAll).unbind("click");j(this.dom.clearAll).on("click",function(){a.s.topGroup=new r(a.s.dt,a.c,void 0);
a._build();a.s.dt.draw();a.s.topGroup.setListeners();j(a.dom.clearAll).remove();a._setEmptyListener();a._filterChanged(0);return!1})};m.prototype._setRedrawListener=function(){var a=this;j(this.s.topGroup.dom.container).unbind("dtsb-redrawContents");j(this.s.topGroup.dom.container).on("dtsb-redrawContents",function(){a._checkClear();a.s.topGroup.redrawContents();a.s.topGroup.setupLogic();a._setEmptyListener();var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b);a.s.dt.state.save()});j(this.s.topGroup.dom.container).unbind("dtsb-clearContents");
j(this.s.topGroup.dom.container).on("dtsb-clearContents",function(){a._setUp(!1);a._filterChanged(0);a.s.dt.draw()});j(this.s.topGroup.dom.container).on("dtsb-updateTitle",function(){var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b)})};m.prototype._setEmptyListener=function(){var a=this;j(this.s.topGroup.dom.add).on("click",function(){a._checkClear()});j(this.s.topGroup.dom.container).on("dtsb-destroy",function(){j(a.dom.clearAll).remove()})};m.version="1.0.1";m.classes={button:"dtsb-button",
clearAll:"dtsb-clearAll",container:"dtsb-searchBuilder",inputButton:"dtsb-iptbtn",title:"dtsb-title",titleRow:"dtsb-titleRow"};m.defaults={columns:!0,conditions:{date:l.dateConditions,html:l.stringConditions,"html-num":l.numConditions,"html-num-fmt":l.numFmtConditions,moment:l.momentDateConditions,num:l.numConditions,"num-fmt":l.numFmtConditions,string:l.stringConditions},depthLimit:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",button:{"0":"Search Builder",_:"Search Builder (%d)"},
clearAll:"Clear All",condition:"Condition",conditions:{array:{contains:"Contains",empty:"Empty",equals:"Equals",not:"Not",notEmpty:"Not Empty",without:"Without"},date:{after:"After",before:"Before",between:"Between",empty:"Empty",equals:"Equals",not:"Not",notBetween:"Not Between",notEmpty:"Not Empty"},moment:{after:"After",before:"Before",between:"Between",empty:"Empty",equals:"Equals",not:"Not",notBetween:"Not Between",notEmpty:"Not Empty"},number:{between:"Between",empty:"Empty",equals:"Equals",
gt:"Greater Than",gte:"Greater Than Equal To",lt:"Less Than",lte:"Less Than Equal To",not:"Not",notBetween:"Not Between",notEmpty:"Not Empty"},string:{contains:"Contains",empty:"Empty",endsWith:"Ends With",equals:"Equals",not:"Not",notEmpty:"Not Empty",startsWith:"Starts With"}},data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",rightTitle:"Indent criteria",title:{"0":"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},
logic:"AND",orthogonal:{display:"display",search:"filter"},preDefined:!1};v=m;var y=function(a,b,c){function g(a,b){var c=new h.Api(a),d=b?b:c.init().searchBuilder||h.defaults.searchBuilder;return(new v(c,d)).getNode()}j=a;s=a.fn.DataTable;f=a;u=a.fn.dataTable;e=a;var h=q=a.fn.dataTable;a.fn.dataTable.SearchBuilder=v;a.fn.DataTable.SearchBuilder=v;a.fn.dataTable.Group=r;a.fn.DataTable.Group=r;a.fn.dataTable.Criteria=l;a.fn.DataTable.Criteria=l;b=a.fn.dataTable.Api.register;a.fn.dataTable.ext.searchBuilder=
{conditions:{}};a.fn.dataTable.ext.buttons.searchBuilder={action:function(a,b,c,d){a.stopPropagation();this.popover(d._searchBuilder.getNode(),{align:"dt-container"})},config:{},init:function(b,c,d){var e=new a.fn.dataTable.SearchBuilder(b,a.extend({filterChanged:function(a,d){b.button(c).text(d)}},d.config));b.button(c).text(d.text||b.i18n("searchBuilder.button",e.c.i18n.button,0));d._searchBuilder=e},text:null};b("searchBuilder.getDetails()",function(){return this.context[0]._searchBuilder.getDetails()});
b("searchBuilder.rebuild()",function(a){this.context[0]._searchBuilder.rebuild(a);return this});b("searchBuilder.container()",function(){return this.context[0]._searchBuilder.getNode()});a(c).on("preInit.dt.dtsp",function(a,b){if("dt"===a.namespace&&(b.oInit.searchBuilder||h.defaults.searchBuilder))b._searchBuilder||g(b)});h.ext.feature.push({cFeature:"Q",fnInit:g});h.ext.features&&h.ext.features.register("searchBuilder",g)};"function"===typeof define&&define.amd?define(["jquery","datatables.net"],
function(a){return y(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net")(a,b).$;return y(b,a,a.document)}:y(window.jQuery,window,document)})();
/*!
SearchBuilder 1.1.0
©SpryMedia Ltd - datatables.net/license/mit
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,m,l){if(k==Array.prototype||k==Object.prototype)return k;k[m]=l.value;return k};
$jscomp.getGlobal=function(k){k=["object"==typeof globalThis&&globalThis,k,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var m=0;m<k.length;++m){var l=k[m];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(k,m){var l=$jscomp.propertyToPolyfillSymbol[m];if(null==l)return k[m];l=k[l];return void 0!==l?l:k[m]};$jscomp.polyfill=function(k,m,l,h){m&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(k,m,l,h):$jscomp.polyfillUnisolated(k,m,l,h))};
$jscomp.polyfillUnisolated=function(k,m,l,h){l=$jscomp.global;k=k.split(".");for(h=0;h<k.length-1;h++){var p=k[h];if(!(p in l))return;l=l[p]}k=k[k.length-1];h=l[k];m=m(h);m!=h&&null!=m&&$jscomp.defineProperty(l,k,{configurable:!0,writable:!0,value:m})};
$jscomp.polyfillIsolated=function(k,m,l,h){var p=k.split(".");k=1===p.length;h=p[0];h=!k&&h in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var t=0;t<p.length-1;t++){var u=p[t];if(!(u in h))return;h=h[u]}p=p[p.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?h[p]:null;m=m(l);null!=m&&(k?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:m}):m!==l&&($jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+p,p=
$jscomp.propertyToPolyfillSymbol[p],$jscomp.defineProperty(h,p,{configurable:!0,writable:!0,value:m})))};$jscomp.polyfill("Object.is",function(k){return k?k:function(m,l){return m===l?0!==m||1/m===1/l:m!==m&&l!==l}},"es6","es3");$jscomp.polyfill("Array.prototype.includes",function(k){return k?k:function(m,l){var h=this;h instanceof String&&(h=String(h));var p=h.length;l=l||0;for(0>l&&(l=Math.max(l+p,0));l<p;l++){var t=h[l];if(t===m||Object.is(t,m))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(k,m,l){if(null==k)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(m instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return k+""};$jscomp.polyfill("String.prototype.includes",function(k){return k?k:function(m,l){return-1!==$jscomp.checkStringArgs(this,m,"includes").indexOf(m,l||0)}},"es6","es3");
$jscomp.arrayIteratorImpl=function(k){var m=0;return function(){return m<k.length?{done:!1,value:k[m++]}:{done:!0}}};$jscomp.arrayIterator=function(k){return{next:$jscomp.arrayIteratorImpl(k)}};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(k){if(k)return k;var m=function(p,t){this.$jscomp$symbol$id_=p;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:t})};m.prototype.toString=function(){return this.$jscomp$symbol$id_};var l=0,h=function(p){if(this instanceof h)throw new TypeError("Symbol is not a constructor");return new m("jscomp_symbol_"+(p||"")+"_"+l++,p)};return h},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol.iterator",function(k){if(k)return k;k=Symbol("Symbol.iterator");for(var m="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),l=0;l<m.length;l++){var h=$jscomp.global[m[l]];"function"===typeof h&&"function"!=typeof h.prototype[k]&&$jscomp.defineProperty(h.prototype,k,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return k},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(k){k={next:k};k[Symbol.iterator]=function(){return this};return k};$jscomp.iteratorFromArray=function(k,m){k instanceof String&&(k+="");var l=0,h={next:function(){if(l<k.length){var p=l++;return{value:m(p,k[p]),done:!1}}h.next=function(){return{done:!0,value:void 0}};return h.next()}};h[Symbol.iterator]=function(){return h};return h};
$jscomp.polyfill("Array.prototype.keys",function(k){return k?k:function(){return $jscomp.iteratorFromArray(this,function(m){return m})}},"es6","es3");$jscomp.polyfill("String.prototype.startsWith",function(k){return k?k:function(m,l){var h=$jscomp.checkStringArgs(this,m,"startsWith");m+="";var p=h.length,t=m.length;l=Math.max(0,Math.min(l|0,h.length));for(var u=0;u<t&&l<p;)if(h[l++]!=m[u++])return!1;return u>=t}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(k){return k?k:function(m,l){var h=$jscomp.checkStringArgs(this,m,"endsWith");m+="";void 0===l&&(l=h.length);l=Math.max(0,Math.min(l|0,h.length));for(var p=m.length;0<p&&0<l;)if(h[--l]!=m[--p])return!1;return 0>=p}},"es6","es3");
(function(){function k(c){h=c;p=c.fn.dataTable}function m(c){B=c;E=c.fn.dataTable}function l(c){x=c;D=c.fn.DataTable}var h,p,t=window.moment,u=window.luxon,q=function(){function c(a,b,d,e,f){var g=this;void 0===e&&(e=0);void 0===f&&(f=1);if(!p||!p.versionCheck||!p.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");this.classes=h.extend(!0,{},c.classes);this.c=h.extend(!0,{},c.defaults,h.fn.dataTable.ext.searchBuilder,b);b=this.c.i18n;this.s={condition:void 0,conditions:{},
data:void 0,dataIdx:-1,dataPoints:[],dateFormat:!1,depth:f,dt:a,filled:!1,index:e,origData:void 0,topGroup:d,type:"",value:[]};this.dom={buttons:h("<div/>").addClass(this.classes.buttonContainer),condition:h("<select disabled/>").addClass(this.classes.condition).addClass(this.classes.dropDown).addClass(this.classes.italic).attr("autocomplete","hacking"),conditionTitle:h('<option value="" disabled selected hidden/>').text(this.s.dt.i18n("searchBuilder.condition",b.condition)),container:h("<div/>").addClass(this.classes.container),
data:h("<select/>").addClass(this.classes.data).addClass(this.classes.dropDown).addClass(this.classes.italic),dataTitle:h('<option value="" disabled selected hidden/>').text(this.s.dt.i18n("searchBuilder.data",b.data)),defaultValue:h("<select disabled/>").addClass(this.classes.value).addClass(this.classes.dropDown).addClass(this.classes.select),"delete":h("<button>&times</button>").addClass(this.classes["delete"]).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.deleteTitle",
b.deleteTitle)).attr("type","button"),left:h("<button><</button>").addClass(this.classes.left).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.leftTitle",b.leftTitle)).attr("type","button"),right:h("<button>></button>").addClass(this.classes.right).addClass(this.classes.button).attr("title",this.s.dt.i18n("searchBuilder.rightTitle",b.rightTitle)).attr("type","button"),value:[h("<select disabled/>").addClass(this.classes.value).addClass(this.classes.dropDown).addClass(this.classes.italic).addClass(this.classes.select)],
valueTitle:h('<option value="--valueTitle--" selected/>').text(this.s.dt.i18n("searchBuilder.value",b.value))};if(this.c.greyscale)for(this.dom.data.addClass(this.classes.greyscale),this.dom.condition.addClass(this.classes.greyscale),this.dom.defaultValue.addClass(this.classes.greyscale),a=0,d=this.dom.value;a<d.length;a++)d[a].addClass(this.classes.greyscale);this.s.dt.on("draw.dtsp",function(){g._adjustCriteria()});this.s.dt.on("buttons-action",function(){g._adjustCriteria()});h(window).on("resize.dtsp",
p.util.throttle(function(){g._adjustCriteria()}));this._buildCriteria();return this}c.prototype.updateArrows=function(a,b){void 0===a&&(a=!1);void 0===b&&(b=!0);this.dom.container.children().detach();this.dom.container.append(this.dom.data).append(this.dom.condition).append(this.dom.value[0]);this.setListeners();void 0!==this.dom.value[0]&&this.dom.value[0].trigger("dtsb-inserted");for(var d=1;d<this.dom.value.length;d++)this.dom.container.append(this.dom.value[d]),this.dom.value[d].trigger("dtsb-inserted");
1<this.s.depth&&this.dom.buttons.append(this.dom.left);(!1===this.c.depthLimit||this.s.depth<this.c.depthLimit)&&a?this.dom.buttons.append(this.dom.right):this.dom.right.remove();this.dom.buttons.append(this.dom["delete"]);this.dom.container.append(this.dom.buttons);b&&this._adjustCriteria()};c.prototype.destroy=function(){this.dom.data.off(".dtsb");this.dom.condition.off(".dtsb");this.dom["delete"].off(".dtsb");for(var a=0,b=this.dom.value;a<b.length;a++)b[a].off(".dtsb");this.dom.container.remove()};
c.prototype.search=function(a,b){var d=this.s.conditions[this.s.condition];if(void 0!==this.s.condition&&void 0!==d){var e=a[this.s.dataIdx];if(this.s.type.includes("num")&&(""!==this.s.dt.settings()[0].oLanguage.sDecimal||""!==this.s.dt.settings()[0].oLanguage.sThousands)){e=[a[this.s.dataIdx]];""!==this.s.dt.settings()[0].oLanguage.sDecimal&&(e=a[this.s.dataIdx].split(this.s.dt.settings()[0].oLanguage.sDecimal));if(""!==this.s.dt.settings()[0].oLanguage.sThousands)for(a=0;a<e.length;a++)e[a]=e[a].replace(this.s.dt.settings()[0].oLanguage.sThousands,
",");e=e.join(".")}"filter"!==this.c.orthogonal.search&&(e=this.s.dt.settings()[0],e=e.oApi._fnGetCellData(e,b,this.s.dataIdx,"string"===typeof this.c.orthogonal?this.c.orthogonal:this.c.orthogonal.search));if("array"===this.s.type)for(Array.isArray(e)||(e=[e]),e.sort(),b=0,a=e;b<a.length;b++){var f=a[b];f&&f.replace(/[\r\n\u2028]/g," ")}else null!==e&&(e=e.replace(/[\r\n\u2028]/g," "));this.s.type.includes("html")&&(e=e.replace(/(<([^>]+)>)/ig,""));null===e&&(e="");return d.search(e,this.s.value,
this)}};c.prototype.getDetails=function(){var a=this.s.value;if(null!==this.s.type&&this.s.type.includes("num")&&(""!==this.s.dt.settings()[0].oLanguage.sDecimal||""!==this.s.dt.settings()[0].oLanguage.sThousands))for(var b=0;b<this.s.value.length;b++){var d=[this.s.value[b].toString()];""!==this.s.dt.settings()[0].oLanguage.sDecimal&&(d=this.s.value[b].split(this.s.dt.settings()[0].oLanguage.sDecimal));if(""!==this.s.dt.settings()[0].oLanguage.sThousands)for(var e=0;e<d.length;e++)d[e]=d[e].replace(this.s.dt.settings()[0].oLanguage.sThousands,
",");this.s.value[b]=d.join(".")}return{condition:this.s.condition,data:this.s.data,origData:this.s.origData,value:a}};c.prototype.getNode=function(){return this.dom.container};c.prototype.populate=function(){this._populateData();-1!==this.s.dataIdx&&(this._populateCondition(),void 0!==this.s.condition&&this._populateValue())};c.prototype.rebuild=function(a){var b=!1,d;this._populateData();if(void 0!==a.data){var e=this.classes.italic,f=this.dom.data;this.dom.data.children("option").each(function(){h(this).text()===
a.data&&(h(this).attr("selected",!0),f.removeClass(e),b=!0,d=h(this).val())})}if(b){this.s.data=a.data;this.s.origData=a.origData;this.s.dataIdx=d;this.c.orthogonal=this._getOptions().orthogonal;this.dom.dataTitle.remove();this._populateCondition();this.dom.conditionTitle.remove();var g;this.dom.condition.children("option").each(function(){void 0!==a.condition&&h(this).val()===a.condition&&"string"===typeof a.condition&&(h(this).attr("selected",!0),g=h(this).val())});this.s.condition=g;void 0!==this.s.condition?
(this.dom.conditionTitle.remove(),this.dom.condition.removeClass(this.classes.italic),this._populateValue(a)):this.dom.conditionTitle.prependTo(this.dom.condition).attr("selected","true")}};c.prototype.setListeners=function(){var a=this;this.dom.data.unbind("change").on("change",function(){a.dom.dataTitle.attr("selected","false");a.dom.data.removeClass(a.classes.italic);a.s.dataIdx=+a.dom.data.children("option:selected").val();a.s.data=a.dom.data.children("option:selected").text();a.s.origData=a.dom.data.children("option:selected").attr("origData");
a.c.orthogonal=a._getOptions().orthogonal;a._clearCondition();a._clearValue();a._populateCondition();a.s.filled&&(a.s.filled=!1,a.s.dt.draw(),a.setListeners());a.s.dt.state.save()});this.dom.condition.unbind("change").on("change",function(){a.dom.conditionTitle.attr("selected","false");a.dom.condition.removeClass(a.classes.italic);for(var b=a.dom.condition.children("option:selected").val(),d=0,e=Object.keys(a.s.conditions);d<e.length;d++)if(e[d]===b){a.s.condition=b;break}a._clearValue();a._populateValue();
b=0;for(d=a.dom.value;b<d.length;b++)e=d[b],a.s.filled&&void 0!==e&&0!==a.dom.container.has(e[0]).length&&(a.s.filled=!1,a.s.dt.draw(),a.setListeners());(0===a.dom.value.length||1===a.dom.value.length&&void 0===a.dom.value[0])&&a.s.dt.draw()})};c.prototype._adjustCriteria=function(){if(0!==h(document).has(this.dom.container).length){var a=this.dom.value[this.dom.value.length-1];if(void 0!==a&&0!==this.dom.container.has(a[0]).length){var b=a.outerWidth(!0);a=a.offset().left+b;var d=this.dom.left.offset(),
e=this.dom.right.offset(),f=this.dom["delete"].offset(),g=0!==this.dom.container.has(this.dom.left[0]).length,n=0!==this.dom.container.has(this.dom.right[0]).length,r=g?d.left:n?e.left:f.left;(15>r-a||g&&d.top!==f.top||n&&e.top!==f.top)&&!this.dom.container.parent().hasClass(this.classes.vertical)?(this.dom.container.parent().addClass(this.classes.vertical),this.s.topGroup.trigger("dtsb-redrawContents")):15<r-(this.dom.data.offset().left+this.dom.data.outerWidth(!0)+this.dom.condition.outerWidth(!0)+
b)&&this.dom.container.parent().hasClass(this.classes.vertical)&&(this.dom.container.parent().removeClass(this.classes.vertical),this.s.topGroup.trigger("dtsb-redrawContents"))}}};c.prototype._buildCriteria=function(){this.dom.data.append(this.dom.dataTitle);this.dom.condition.append(this.dom.conditionTitle);this.dom.container.append(this.dom.data).append(this.dom.condition);for(var a=0,b=this.dom.value;a<b.length;a++){var d=b[a];d.append(this.dom.valueTitle);this.dom.container.append(d)}this.dom.container.append(this.dom["delete"]).append(this.dom.right);
this.setListeners()};c.prototype._clearCondition=function(){this.dom.condition.empty();this.dom.conditionTitle.attr("selected","true").attr("disabled","true");this.dom.condition.prepend(this.dom.conditionTitle).prop("selectedIndex",0);this.s.conditions={};this.s.condition=void 0};c.prototype._clearValue=function(){if(void 0!==this.s.condition){if(0<this.dom.value.length&&void 0!==this.dom.value[0])for(var a=function(f){void 0!==f&&setTimeout(function(){f.remove()},50)},b=0,d=this.dom.value;b<d.length;b++){var e=
d[b];a(e)}this.dom.value=[].concat(this.s.conditions[this.s.condition].init(this,c.updateListener));if(0<this.dom.value.length&&void 0!==this.dom.value[0])for(this.dom.value[0].insertAfter(this.dom.condition).trigger("dtsb-inserted"),e=1;e<this.dom.value.length;e++)this.dom.value[e].insertAfter(this.dom.value[e-1]).trigger("dtsb-inserted")}else{a=function(f){void 0!==f&&setTimeout(function(){f.remove()},50)};b=0;for(d=this.dom.value;b<d.length;b++)e=d[b],a(e);this.dom.valueTitle.attr("selected","true");
this.dom.defaultValue.append(this.dom.valueTitle).insertAfter(this.dom.condition)}this.s.value=[];this.dom.value=[h("<select disabled/>").addClass(this.classes.value).addClass(this.classes.dropDown).addClass(this.classes.italic).addClass(this.classes.select).append(this.dom.valueTitle.clone())]};c.prototype._getOptions=function(){return h.extend(!0,{},c.defaults,this.s.dt.settings()[0].aoColumns[this.s.dataIdx].searchBuilder)};c.prototype._populateCondition=function(){var a=[],b=Object.keys(this.s.conditions).length;
if(0===b){b=+this.dom.data.children("option:selected").val();this.s.type=this.s.dt.columns().type().toArray()[b];null===this.s.type&&(this.s.dt.draw(!1),this.setListeners(),this.s.type=this.s.dt.columns().type().toArray()[b]);this.dom.condition.removeAttr("disabled").empty().append(this.dom.conditionTitle).addClass(this.classes.italic);this.dom.conditionTitle.attr("selected","true");b=this.s.dt.settings()[0].oLanguage.sDecimal;""!==b&&this.s.type.indexOf(b)===this.s.type.length-b.length&&(this.s.type.includes("num-fmt")?
this.s.type=this.s.type.replace(b,""):this.s.type.includes("num")&&(this.s.type=this.s.type.replace(b,"")));var d=void 0!==this.c.conditions[this.s.type]?this.c.conditions[this.s.type]:this.s.type.includes("moment")?this.c.conditions.moment:this.s.type.includes("luxon")?this.c.conditions.luxon:this.c.conditions.string;this.s.type.includes("moment")?this.s.dateFormat=this.s.type.replace(/moment-/g,""):this.s.type.includes("luxon")&&(this.s.dateFormat=this.s.type.replace(/luxon-/g,""));for(var e=0,
f=Object.keys(d);e<f.length;e++){var g=f[e];null!==d[g]&&(this.s.dt.page.info().serverSide&&d[g].init===c.initSelect&&(d[g].init=c.initInput,d[g].inputValue=c.inputValueInput,d[g].isInputValid=c.isInputValidInput),this.s.conditions[g]=d[g],b=d[g].conditionName,"function"===typeof b&&(b=b(this.s.dt,this.c.i18n)),a.push(h("<option>",{text:b,value:g}).addClass(this.classes.option).addClass(this.classes.notItalic)))}}else if(0<b)for(this.dom.condition.empty().removeAttr("disabled").addClass(this.classes.italic),
d=0,e=Object.keys(this.s.conditions);d<e.length;d++)g=e[d],b=this.s.conditions[g].conditionName,"function"===typeof b&&(b=b(this.s.dt,this.c.i18n)),g=h("<option>",{text:b,value:g}).addClass(this.classes.option).addClass(this.classes.notItalic),void 0!==this.s.condition&&this.s.condition===b&&(g.attr("selected",!0),this.dom.condition.removeClass(this.classes.italic)),a.push(g);else{this.dom.condition.attr("disabled","true").addClass(this.classes.italic);return}for(b=0;b<a.length;b++)this.dom.condition.append(a[b]);
this.dom.condition.prop("selectedIndex",0)};c.prototype._populateData=function(){var a=this;this.dom.data.empty().append(this.dom.dataTitle);if(0===this.s.dataPoints.length)this.s.dt.columns().every(function(g){if(!0===a.c.columns||a.s.dt.columns(a.c.columns).indexes().toArray().includes(g)){for(var n=!1,r=0,v=a.s.dataPoints;r<v.length;r++)if(v[r].index===g){n=!0;break}n||(n=a.s.dt.settings()[0].aoColumns[g],g={index:g,origData:n.data,text:(void 0===n.searchBuilderTitle?n.sTitle:n.searchBuilderTitle).replace(/(<([^>]+)>)/ig,
"")},a.s.dataPoints.push(g),a.dom.data.append(h("<option>",{text:g.text,value:g.index}).addClass(a.classes.option).addClass(a.classes.notItalic).attr("origData",n.data)))}});else for(var b=function(g){d.s.dt.columns().every(function(r){var v=a.s.dt.settings()[0].aoColumns[r];(void 0===v.searchBuilderTitle?v.sTitle:v.searchBuilderTitle).replace(/(<([^>]+)>)/ig,"")===g.text&&(g.index=r,g.origData=v.data)});var n=h("<option>",{text:g.text.replace(/(<([^>]+)>)/ig,""),value:g.index}).addClass(d.classes.option).addClass(d.classes.notItalic).attr("origData",
g.origData);d.s.data===g.text&&(d.s.dataIdx=g.index,n.attr("selected",!0),d.dom.data.removeClass(d.classes.italic));d.dom.data.append(n)},d=this,e=0,f=this.s.dataPoints;e<f.length;e++)b(f[e])};c.prototype._populateValue=function(a){var b=this,d=this.s.filled;this.s.filled=!1;setTimeout(function(){b.dom.defaultValue.remove()},50);for(var e=function(n){setTimeout(function(){void 0!==n&&n.remove()},50)},f=0,g=this.dom.value;f<g.length;f++)e(g[f]);e=this.dom.container.children();if(3<e.length)for(f=2;f<
e.length-1;f++)h(e[f]).remove();void 0!==a&&this.s.dt.columns().every(function(n){b.s.dt.settings()[0].aoColumns[n].sTitle===a.data&&(b.s.dataIdx=n)});this.dom.value=[].concat(this.s.conditions[this.s.condition].init(this,c.updateListener,void 0!==a?a.value:void 0));void 0!==a&&void 0!==a.value&&(this.s.value=a.value);void 0!==this.dom.value[0]&&this.dom.value[0].insertAfter(this.dom.condition).trigger("dtsb-inserted");for(f=1;f<this.dom.value.length;f++)this.dom.value[f].insertAfter(this.dom.value[f-
1]).trigger("dtsb-inserted");this.s.filled=this.s.conditions[this.s.condition].isInputValid(this.dom.value,this);this.setListeners();d!==this.s.filled&&(this.s.dt.draw(),this.setListeners())};c.prototype._throttle=function(a,b){void 0===b&&(b=200);var d=null,e=null,f=this;null===b&&(b=200);return function(){for(var g=[],n=0;n<arguments.length;n++)g[n]=arguments[n];n=+new Date;null!==d&&n<d+b?clearTimeout(e):d=n;e=setTimeout(function(){d=null;a.apply(f,g)},b)}};c.version="1.1.0";c.classes={button:"dtsb-button",
buttonContainer:"dtsb-buttonContainer",condition:"dtsb-condition",container:"dtsb-criteria",data:"dtsb-data","delete":"dtsb-delete",dropDown:"dtsb-dropDown",greyscale:"dtsb-greyscale",input:"dtsb-input",italic:"dtsb-italic",joiner:"dtsp-joiner",left:"dtsb-left",notItalic:"dtsb-notItalic",option:"dtsb-option",right:"dtsb-right",select:"dtsb-select",value:"dtsb-value",vertical:"dtsb-vertical"};c.initSelect=function(a,b,d,e){void 0===d&&(d=null);void 0===e&&(e=!1);var f=a.dom.data.children("option:selected").val(),
g=a.s.dt.rows().indexes().toArray(),n=a.s.dt.settings()[0],r=h("<select/>").addClass(c.classes.value).addClass(c.classes.dropDown).addClass(c.classes.italic).addClass(c.classes.select).append(a.dom.valueTitle).on("change",function(){h(this).removeClass(c.classes.italic);b(a,this)});a.c.greyscale&&r.addClass(c.classes.greyscale);for(var v=[],C=[],H=0;H<g.length;H++){var A=g[H],z=n.oApi._fnGetCellData(n,A,f,"string"===typeof a.c.orthogonal?a.c.orthogonal:a.c.orthogonal.search);z="string"===typeof z?
z.replace(/[\r\n\u2028]/g," "):z;A=n.oApi._fnGetCellData(n,A,f,"string"===typeof a.c.orthogonal?a.c.orthogonal:a.c.orthogonal.display);"array"===a.s.type&&(z=Array.isArray(z)?z=z.sort():[z],A=Array.isArray(A)?A=A.sort():[A]);var J=function(w,y){w=h("<option>",{type:Array.isArray(w)?"Array":"String",value:a.s.type.includes("html")&&null!==w&&"string"===typeof w?w.replace(/(<([^>]+)>)/ig,""):w}).addClass(a.classes.option).addClass(a.classes.notItalic).html("string"===typeof y?y.replace(/(<([^>]+)>)/ig,
""):y);y=w.val();-1===v.indexOf(y)&&(v.push(y),C.push(w),null!==d&&Array.isArray(d[0])&&(d[0]=d[0].sort().join(",")),null!==d&&w.val()===d[0]&&(w.attr("selected",!0),r.removeClass(c.classes.italic)))};if(e)for(var F=0;F<z.length;F++)J(z[F],A[F]);else J(z,A)}C.sort(function(w,y){if("array"===a.s.type||"string"===a.s.type||"html"===a.s.type)return w.val()<y.val()?-1:w.val()>y.val()?1:0;if("num"===a.s.type||"html-num"===a.s.type)return+w.val().replace(/(<([^>]+)>)/ig,"")<+y.val().replace(/(<([^>]+)>)/ig,
"")?-1:+w.val().replace(/(<([^>]+)>)/ig,"")>+y.val().replace(/(<([^>]+)>)/ig,"")?1:0;if("num-fmt"===a.s.type||"html-num-fmt"===a.s.type)return+w.val().replace(/[^0-9.]/g,"")<+y.val().replace(/[^0-9.]/g,"")?-1:+w.val().replace(/[^0-9.]/g,"")>+y.val().replace(/[^0-9.]/g,"")?1:0});for(e=0;e<C.length;e++)r.append(C[e]);return r};c.initSelectArray=function(a,b,d){void 0===d&&(d=null);return c.initSelect(a,b,d,!0)};c.initInput=function(a,b,d){void 0===d&&(d=null);var e=a.s.dt.settings()[0].searchDelay;
e=h("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input keypress",a._throttle(function(f){f=f.keyCode||f.which;if(!a.c.enterSearch||13===f)return b(a,this)},null===e?100:e));a.c.greyscale&&e.addClass(c.classes.greyscale);null!==d&&e.val(d[0]);a.s.dt.one("draw",function(){a.s.topGroup.trigger("dtsb-redrawLogic")});return e};c.init2Input=function(a,b,d){void 0===d&&(d=null);var e=a.s.dt.settings()[0].searchDelay;e=[h("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input keypress",
a._throttle(function(f){f=f.keyCode||f.which;if(!a.c.enterSearch||13===f)return b(a,this)},null===e?100:e)),h("<span>").addClass(a.classes.joiner).text(a.s.dt.i18n("searchBuilder.valueJoiner",a.c.i18n.valueJoiner)),h("<input/>").addClass(c.classes.value).addClass(c.classes.input).on("input keypress",a._throttle(function(f){f=f.keyCode||f.which;if(!a.c.enterSearch||13===f)return b(a,this)},null===e?100:e))];a.c.greyscale&&(e[0].addClass(c.classes.greyscale),e[2].addClass(c.classes.greyscale));null!==
d&&(e[0].val(d[0]),e[2].val(d[1]));a.s.dt.one("draw",function(){a.s.topGroup.trigger("dtsb-redrawLogic")});return e};c.initDate=function(a,b,d){void 0===d&&(d=null);var e=a.s.dt.settings()[0].searchDelay,f=h("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",format:a.s.dateFormat?a.s.dateFormat:void 0}).on("change",a._throttle(function(){return b(a,this)},null===e?100:e)).on("input keypress",a.c.enterSearch?function(g){a._throttle(function(){if(13===(g.keyCode||
g.which))return b(a,this)},null===e?100:e)}:a._throttle(function(){return b(a,this)},null===e?100:e));a.c.greyscale&&f.addClass(c.classes.greyscale);null!==d&&f.val(d[0]);a.s.dt.one("draw",function(){a.s.topGroup.trigger("dtsb-redrawLogic")});return f};c.initNoValue=function(a){a.s.dt.one("draw",function(){a.s.topGroup.trigger("dtsb-redrawLogic")})};c.init2Date=function(a,b,d){var e=this;void 0===d&&(d=null);var f=a.s.dt.settings()[0].searchDelay;f=[h("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",
format:a.s.dateFormat?a.s.dateFormat:void 0}).on("change",null!==f?a.s.dt.settings()[0].oApi._fnThrottle(function(){return b(a,this)},f):function(){b(a,e)}).on("input keypress",a.c.enterSearch||null===f?a.c.enterSearch?function(g){13===(g.keyCode||g.which)&&b(a,e)}:function(){b(a,e)}:a.s.dt.settings()[0].oApi._fnThrottle(function(){return b(a,this)},f)),h("<span>").addClass(a.classes.joiner).text(a.s.dt.i18n("searchBuilder.valueJoiner",a.c.i18n.valueJoiner)),h("<input/>").addClass(c.classes.value).addClass(c.classes.input).dtDateTime({attachTo:"input",
format:a.s.dateFormat?a.s.dateFormat:void 0}).on("change",null!==f?a.s.dt.settings()[0].oApi._fnThrottle(function(){return b(a,this)},f):function(){b(a,e)}).on("input keypress",a.c.enterSearch||null===f?a.c.enterSearch?function(g){13===(g.keyCode||g.which)&&b(a,e)}:function(){b(a,e)}:a.s.dt.settings()[0].oApi._fnThrottle(function(){return b(a,this)},f))];a.c.greyscale&&(f[0].addClass(c.classes.greyscale),f[2].addClass(c.classes.greyscale));null!==d&&0<d.length&&(f[0].val(d[0]),f[2].val(d[1]));a.s.dt.one("draw",
function(){a.s.topGroup.trigger("dtsb-redrawLogic")});return f};c.isInputValidSelect=function(a){for(var b=!0,d=0;d<a.length;d++){var e=a[d];e.children("option:selected").length===e.children("option").length-e.children("option."+c.classes.notItalic).length&&1===e.children("option:selected").length&&e.children("option:selected")[0]===e.children("option:hidden")[0]&&(b=!1)}return b};c.isInputValidInput=function(a){for(var b=!0,d=0;d<a.length;d++){var e=a[d];e.is("input")&&0===e.val().length&&(b=!1)}return b};
c.inputValueSelect=function(a){for(var b=[],d=0;d<a.length;d++){var e=a[d];if(e.is("select")){var f=e.children("option:selected").val();b.push("Array"===e.children("option:selected").attr("type")?f.split(",").sort():f)}}return b};c.inputValueInput=function(a){for(var b=[],d=0;d<a.length;d++){var e=a[d];e.is("input")&&b.push(e.val())}return b};c.updateListener=function(a,b){var d=a.s.conditions[a.s.condition];a.s.filled=d.isInputValid(a.dom.value,a);a.s.value=d.inputValue(a.dom.value,a);if(a.s.filled){Array.isArray(a.s.value)||
(a.s.value=[a.s.value]);for(d=0;d<a.s.value.length;d++)if(Array.isArray(a.s.value[d]))a.s.value[d].sort();else if(a.s.type.includes("num")&&(""!==a.s.dt.settings()[0].oLanguage.sDecimal||""!==a.s.dt.settings()[0].oLanguage.sThousands)){var e=[a.s.value[d].toString()];""!==a.s.dt.settings()[0].oLanguage.sDecimal&&(e=a.s.value[d].split(a.s.dt.settings()[0].oLanguage.sDecimal));if(""!==a.s.dt.settings()[0].oLanguage.sThousands)for(var f=0;f<e.length;f++)e[f]=e[f].replace(a.s.dt.settings()[0].oLanguage.sThousands,
",");a.s.value[d]=e.join(".")}f=e=null;for(d=0;d<a.dom.value.length;d++)b===a.dom.value[d][0]&&(e=d,void 0!==b.selectionStart&&(f=b.selectionStart));a.s.dt.draw();null!==e&&(a.dom.value[e].removeClass(a.classes.italic),a.dom.value[e].focus(),null!==f&&a.dom.value[e][0].setSelectionRange(f,f))}else a.s.dt.draw()};c.dateConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.equals",b.conditions.date.equals)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return a===b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.not",b.conditions.date.not)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return a!==b[0]}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.before",b.conditions.date.before)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return a<b[0]}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.after",b.conditions.date.after)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return a>b[0]}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.between",b.conditions.date.between)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,
search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return b[0]<b[1]?b[0]<=a&&a<=b[1]:b[1]<=a&&a<=b[0]}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notBetween",b.conditions.date.notBetween)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=a.replace(/(\/|-|,)/g,"-");return b[0]<b[1]?!(b[0]<=a&&a<=b[1]):!(b[1]<=a&&a<=b[0])}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.empty",
b.conditions.date.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notEmpty",b.conditions.date.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.momentDateConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.equals",
b.conditions.date.equals)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return t(a,d.s.dateFormat).valueOf()===t(b[0],d.s.dateFormat).valueOf()}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.not",b.conditions.date.not)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return t(a,d.s.dateFormat).valueOf()!==t(b[0],d.s.dateFormat).valueOf()}},"<":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.date.before",b.conditions.date.before)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return t(a,d.s.dateFormat).valueOf()<t(b[0],d.s.dateFormat).valueOf()}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.after",b.conditions.date.after)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return t(a,d.s.dateFormat).valueOf()>
t(b[0],d.s.dateFormat).valueOf()}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.between",b.conditions.date.between)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){a=t(a,d.s.dateFormat).valueOf();var e=t(b[0],d.s.dateFormat).valueOf();b=t(b[1],d.s.dateFormat).valueOf();return e<b?e<=a&&a<=b:b<=a&&a<=e}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notBetween",b.conditions.date.notBetween)},
init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){a=t(a,d.s.dateFormat).valueOf();var e=t(b[0],d.s.dateFormat).valueOf();b=t(b[1],d.s.dateFormat).valueOf();return e<b?!(+e<=+a&&+a<=+b):!(+b<=+a&&+a<=+e)}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.empty",b.conditions.date.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},
"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notEmpty",b.conditions.date.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.luxonDateConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.equals",b.conditions.date.equals)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return u.DateTime.fromFormat(a,
d.s.dateFormat).ts===u.DateTime.fromFormat(b[0],d.s.dateFormat).ts}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.not",b.conditions.date.not)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return u.DateTime.fromFormat(a,d.s.dateFormat).ts!==u.DateTime.fromFormat(b[0],d.s.dateFormat).ts}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.before",b.conditions.date.before)},init:c.initDate,
inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return u.DateTime.fromFormat(a,d.s.dateFormat).ts<u.DateTime.fromFormat(b[0],d.s.dateFormat).ts}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.after",b.conditions.date.after)},init:c.initDate,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){return u.DateTime.fromFormat(a,d.s.dateFormat).ts>u.DateTime.fromFormat(b[0],d.s.dateFormat).ts}},between:{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.date.between",b.conditions.date.between)},init:c.init2Date,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){a=u.DateTime.fromFormat(a,d.s.dateFormat).ts;var e=u.DateTime.fromFormat(b[0],d.s.dateFormat).ts;b=u.DateTime.fromFormat(b[1],d.s.dateFormat).ts;return e<b?e<=a&&a<=b:b<=a&&a<=e}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notBetween",b.conditions.date.notBetween)},init:c.init2Date,
inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b,d){a=u.DateTime.fromFormat(a,d.s.dateFormat).ts;var e=u.DateTime.fromFormat(b[0],d.s.dateFormat).ts;b=u.DateTime.fromFormat(b[1],d.s.dateFormat).ts;return e<b?!(+e<=+a&&+a<=+b):!(+b<=+a&&+a<=+e)}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.empty",b.conditions.date.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===
a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.date.notEmpty",b.conditions.date.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.numConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.equals",b.conditions.number.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,
search:function(a,b){return+a===+b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.not",b.conditions.number.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return+a!==+b[0]}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lt",b.conditions.number.lt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a<+b[0]}},"<=":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.number.lte",b.conditions.number.lte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a<=+b[0]}},">=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gte",b.conditions.number.gte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a>=+b[0]}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gt",
b.conditions.number.gt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+a>+b[0]}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.between",b.conditions.number.between)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+b[0]<+b[1]?+b[0]<=+a&&+a<=+b[1]:+b[1]<=+a&&+a<=+b[0]}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notBetween",
b.conditions.number.notBetween)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return+b[0]<+b[1]?!(+b[0]<=+a&&+a<=+b[1]):!(+b[1]<=+a&&+a<=+b[0])}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.empty",b.conditions.number.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notEmpty",
b.conditions.number.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.numFmtConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.equals",b.conditions.number.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?
"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+a===+b}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.not",b.conditions.number.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+a!==+b}},"<":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lt",
b.conditions.number.lt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+a<+b}},"<=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.lte",b.conditions.number.lte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,
b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+a<=+b}},">=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gte",b.conditions.number.gte)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,
""):b[0].replace(/[^0-9.]/g,"");return+a>=+b}},">":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.gt",b.conditions.number.gt)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");b=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");return+a>+b}},between:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.between",
b.conditions.number.between)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");var d=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");b=0===b[1].indexOf("-")?"-"+b[1].replace(/[^0-9.]/g,""):b[1].replace(/[^0-9.]/g,"");return+d<+b?+d<=+a&&+a<=+b:+b<=+a&&+a<=+d}},"!between":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notBetween",
b.conditions.number.notBetween)},init:c.init2Input,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){a=0===a.indexOf("-")?"-"+a.replace(/[^0-9.]/g,""):a.replace(/[^0-9.]/g,"");var d=0===b[0].indexOf("-")?"-"+b[0].replace(/[^0-9.]/g,""):b[0].replace(/[^0-9.]/g,"");b=0===b[1].indexOf("-")?"-"+b[1].replace(/[^0-9.]/g,""):b[1].replace(/[^0-9.]/g,"");return+d<+b?!(+d<=+a&&+a<=+b):!(+b<=+a&&+a<=+d)}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.empty",
b.conditions.number.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.number.notEmpty",b.conditions.number.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.stringConditions={"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.equals",
b.conditions.string.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return a===b[0]}},"!=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.not",b.conditions.string.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidInput,search:function(a,b){return a!==b[0]}},starts:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.startsWith",b.conditions.string.startsWith)},
init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return 0===a.toLowerCase().indexOf(b[0].toLowerCase())}},contains:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.contains",b.conditions.string.contains)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return a.toLowerCase().includes(b[0].toLowerCase())}},ends:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.endsWith",
b.conditions.string.endsWith)},init:c.initInput,inputValue:c.inputValueInput,isInputValid:c.isInputValidInput,search:function(a,b){return a.toLowerCase().endsWith(b[0].toLowerCase())}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.empty",b.conditions.string.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.string.notEmpty",
b.conditions.string.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return!(null===a||void 0===a||0===a.length)}}};c.arrayConditions={contains:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.contains",b.conditions.array.contains)},init:c.initSelectArray,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return a.includes(b[0])}},without:{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.without",
b.conditions.array.without)},init:c.initSelectArray,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){return-1===a.indexOf(b[0])}},"=":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.equals",b.conditions.array.equals)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){if(a.length===b[0].length){for(var d=0;d<a.length;d++)if(a[d]!==b[0][d])return!1;return!0}return!1}},"!=":{conditionName:function(a,
b){return a.i18n("searchBuilder.conditions.array.not",b.conditions.array.not)},init:c.initSelect,inputValue:c.inputValueSelect,isInputValid:c.isInputValidSelect,search:function(a,b){if(a.length===b[0].length){for(var d=0;d<a.length;d++)if(a[d]!==b[0][d])return!0;return!1}return!0}},"null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.empty",b.conditions.array.empty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null===
a||void 0===a||0===a.length}},"!null":{conditionName:function(a,b){return a.i18n("searchBuilder.conditions.array.notEmpty",b.conditions.array.notEmpty)},init:c.initNoValue,inputValue:function(){},isInputValid:function(){return!0},search:function(a){return null!==a&&void 0!==a&&0!==a.length}}};c.defaults={columns:!0,conditions:{array:c.arrayConditions,date:c.dateConditions,html:c.stringConditions,"html-num":c.numConditions,"html-num-fmt":c.numFmtConditions,luxon:c.luxonDateConditions,moment:c.momentDateConditions,
num:c.numConditions,"num-fmt":c.numFmtConditions,string:c.stringConditions},depthLimit:!1,enterSearch:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",button:{0:"Search Builder",_:"Search Builder (%d)"},clearAll:"Clear All",condition:"Condition",data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",rightTitle:"Indent criteria",title:{0:"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},logic:"AND",
orthogonal:{display:"display",search:"filter"},preDefined:!1};return c}(),B,E,G=function(){function c(a,b,d,e,f,g){void 0===e&&(e=0);void 0===f&&(f=!1);void 0===g&&(g=1);if(!E||!E.versionCheck||!E.versionCheck("1.10.0"))throw Error("SearchBuilder requires DataTables 1.10 or newer");this.classes=B.extend(!0,{},c.classes);this.c=B.extend(!0,{},c.defaults,b);this.s={criteria:[],depth:g,dt:a,index:e,isChild:f,logic:void 0,opts:b,toDrop:void 0,topGroup:d};this.dom={add:B("<button/>").addClass(this.classes.add).addClass(this.classes.button).attr("type",
"button"),clear:B("<button>&times</button>").addClass(this.classes.button).addClass(this.classes.clearGroup).attr("type","button"),container:B("<div/>").addClass(this.classes.group),logic:B("<button><div/></button>").addClass(this.classes.logic).addClass(this.classes.button).attr("type","button"),logicContainer:B("<div/>").addClass(this.classes.logicContainer)};void 0===this.s.topGroup&&(this.s.topGroup=this.dom.container);this._setup();return this}c.prototype.destroy=function(){this.dom.add.off(".dtsb");
this.dom.logic.off(".dtsb");this.dom.container.trigger("dtsb-destroy").remove();this.s.criteria=[]};c.prototype.getDetails=function(){if(0===this.s.criteria.length)return{};for(var a={criteria:[],logic:this.s.logic},b=0,d=this.s.criteria;b<d.length;b++)a.criteria.push(d[b].criteria.getDetails());return a};c.prototype.getNode=function(){return this.dom.container};c.prototype.rebuild=function(a){if(!(void 0===a.criteria||null===a.criteria||Array.isArray(a.criteria)&&0===a.criteria.length)){this.s.logic=
a.logic;this.dom.logic.children().first().text("OR"===this.s.logic?this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr):this.s.dt.i18n("searchBuilder.logicAnd",this.c.i18n.logicAnd));if(Array.isArray(a.criteria))for(var b=0,d=a.criteria;b<d.length;b++)a=d[b],void 0!==a.logic?this._addPrevGroup(a):void 0===a.logic&&this._addPrevCriteria(a);b=0;for(d=this.s.criteria;b<d.length;b++)a=d[b],a.criteria instanceof q&&(a.criteria.updateArrows(1<this.s.criteria.length,!1),this._setCriteriaListeners(a.criteria))}};
c.prototype.redrawContents=function(){this.dom.container.children().detach();this.dom.container.append(this.dom.logicContainer).append(this.dom.add);this.s.criteria.sort(function(d,e){return d.criteria.s.index<e.criteria.s.index?-1:d.criteria.s.index>e.criteria.s.index?1:0});this.setListeners();for(var a=0;a<this.s.criteria.length;a++){var b=this.s.criteria[a].criteria;b instanceof q?(this.s.criteria[a].index=a,this.s.criteria[a].criteria.s.index=a,this.s.criteria[a].criteria.dom.container.insertBefore(this.dom.add),
this._setCriteriaListeners(b),this.s.criteria[a].criteria.rebuild(this.s.criteria[a].criteria.getDetails())):b instanceof c&&0<b.s.criteria.length?(this.s.criteria[a].index=a,this.s.criteria[a].criteria.s.index=a,this.s.criteria[a].criteria.dom.container.insertBefore(this.dom.add),b.redrawContents(),this._setGroupListeners(b)):(this.s.criteria.splice(a,1),a--)}this.setupLogic()};c.prototype.redrawLogic=function(){for(var a=0,b=this.s.criteria;a<b.length;a++){var d=b[a];d instanceof c&&d.redrawLogic()}this.setupLogic()};
c.prototype.search=function(a,b){return"AND"===this.s.logic?this._andSearch(a,b):"OR"===this.s.logic?this._orSearch(a,b):!0};c.prototype.setupLogic=function(){this.dom.logicContainer.remove();this.dom.clear.remove();if(1>this.s.criteria.length)this.s.isChild||(this.dom.container.trigger("dtsb-destroy"),this.dom.container.css("margin-left",0));else{var a=this.dom.container.height()-1;this.dom.clear.height("0px");this.dom.logicContainer.append(this.dom.clear).width(a);this.dom.container.prepend(this.dom.logicContainer);
this._setLogicListener();this.dom.container.css("margin-left",this.dom.logicContainer.outerHeight(!0));a=this.dom.logicContainer.offset();var b=a.left,d=this.dom.container.offset().left;b=b-(b-d)-this.dom.logicContainer.outerHeight(!0);this.dom.logicContainer.offset({left:b});b=this.dom.logicContainer.next();a=a.top;b=B(b).offset().top;this.dom.logicContainer.offset({top:a-(a-b)});this.dom.clear.outerHeight(this.dom.logicContainer.height());this._setClearListener()}};c.prototype.setListeners=function(){var a=
this;this.dom.add.unbind("click");this.dom.add.on("click",function(){a.s.isChild||a.dom.container.prepend(a.dom.logicContainer);a.addCriteria();a.dom.container.trigger("dtsb-add");a.s.dt.state.save();return!1});for(var b=0,d=this.s.criteria;b<d.length;b++)d[b].criteria.setListeners();this._setClearListener();this._setLogicListener()};c.prototype.addCriteria=function(a,b){void 0===a&&(a=null);void 0===b&&(b=!0);var d=null===a?this.s.criteria.length:a.s.index,e=new q(this.s.dt,this.s.opts,this.s.topGroup,
d,this.s.depth);null!==a&&(e.c=a.c,e.s=a.s,e.s.depth=this.s.depth,e.classes=a.classes);e.populate();a=!1;for(var f=0;f<this.s.criteria.length;f++)0===f&&this.s.criteria[f].criteria.s.index>e.s.index?(e.getNode().insertBefore(this.s.criteria[f].criteria.dom.container),a=!0):f<this.s.criteria.length-1&&this.s.criteria[f].criteria.s.index<e.s.index&&this.s.criteria[f+1].criteria.s.index>e.s.index&&(e.getNode().insertAfter(this.s.criteria[f].criteria.dom.container),a=!0);a||e.getNode().insertBefore(this.dom.add);
this.s.criteria.push({criteria:e,index:d});this.s.criteria=this.s.criteria.sort(function(g,n){return g.criteria.s.index-n.criteria.s.index});d=0;for(a=this.s.criteria;d<a.length;d++)f=a[d],f.criteria instanceof q&&f.criteria.updateArrows(1<this.s.criteria.length,b);this._setCriteriaListeners(e);e.setListeners();this.setupLogic()};c.prototype.checkFilled=function(){for(var a=0,b=this.s.criteria;a<b.length;a++){var d=b[a];if(d.criteria instanceof q&&d.criteria.s.filled||d.criteria instanceof c&&d.criteria.checkFilled())return!0}return!1};
c.prototype.count=function(){for(var a=0,b=0,d=this.s.criteria;b<d.length;b++){var e=d[b];e.criteria instanceof c?a+=e.criteria.count():a++}return a};c.prototype._addPrevGroup=function(a){var b=this.s.criteria.length,d=new c(this.s.dt,this.c,this.s.topGroup,b,!0,this.s.depth+1);this.s.criteria.push({criteria:d,index:b,logic:d.s.logic});d.rebuild(a);this.s.criteria[b].criteria=d;this.s.topGroup.trigger("dtsb-redrawContents");this._setGroupListeners(d)};c.prototype._addPrevCriteria=function(a){var b=
this.s.criteria.length,d=new q(this.s.dt,this.s.opts,this.s.topGroup,b,this.s.depth);d.populate();this.s.criteria.push({criteria:d,index:b});d.rebuild(a);this.s.criteria[b].criteria=d;this.s.topGroup.trigger("dtsb-redrawContents")};c.prototype._andSearch=function(a,b){if(0===this.s.criteria.length)return!0;for(var d=0,e=this.s.criteria;d<e.length;d++){var f=e[d];if(!(f.criteria instanceof q&&!f.criteria.s.filled||f.criteria.search(a,b)))return!1}return!0};c.prototype._orSearch=function(a,b){if(0===
this.s.criteria.length)return!0;for(var d=!1,e=0,f=this.s.criteria;e<f.length;e++){var g=f[e];if(g.criteria instanceof q&&g.criteria.s.filled){if(d=!0,g.criteria.search(a,b))return!0}else if(g.criteria instanceof c&&g.criteria.checkFilled()&&(d=!0,g.criteria.search(a,b)))return!0}return!d};c.prototype._removeCriteria=function(a,b){void 0===b&&(b=!1);if(1>=this.s.criteria.length&&this.s.isChild)this.destroy();else{for(var d=void 0,e=0;e<this.s.criteria.length;e++)this.s.criteria[e].index===a.s.index&&
(!b||this.s.criteria[e].criteria instanceof c)&&(d=e);void 0!==d&&this.s.criteria.splice(d,1);for(e=0;e<this.s.criteria.length;e++)this.s.criteria[e].index=e,this.s.criteria[e].criteria.s.index=e}};c.prototype._setCriteriaListeners=function(a){var b=this;a.dom["delete"].unbind("click").on("click",function(){b._removeCriteria(a);a.dom.container.remove();for(var d=0,e=b.s.criteria;d<e.length;d++){var f=e[d];f.criteria instanceof q&&f.criteria.updateArrows(1<b.s.criteria.length)}a.destroy();b.s.dt.draw();
b.s.topGroup.trigger("dtsb-redrawContents");b.s.topGroup.trigger("dtsb-updateTitle");return!1});a.dom.right.unbind("click").on("click",function(){var d=a.s.index,e=new c(b.s.dt,b.s.opts,b.s.topGroup,a.s.index,!0,b.s.depth+1);e.addCriteria(a);b.s.criteria[d].criteria=e;b.s.criteria[d].logic="AND";b.s.topGroup.trigger("dtsb-redrawContents");b._setGroupListeners(e);return!1});a.dom.left.unbind("click").on("click",function(){b.s.toDrop=new q(b.s.dt,b.s.opts,b.s.topGroup,a.s.index);b.s.toDrop.s=a.s;b.s.toDrop.c=
a.c;b.s.toDrop.classes=a.classes;b.s.toDrop.populate();var d=b.s.toDrop.s.index;b.dom.container.trigger("dtsb-dropCriteria");a.s.index=d;b._removeCriteria(a);b.s.topGroup.trigger("dtsb-redrawContents");b.s.dt.draw();return!1})};c.prototype._setClearListener=function(){var a=this;this.dom.clear.unbind("click").on("click",function(){if(!a.s.isChild)return a.dom.container.trigger("dtsb-clearContents"),!1;a.destroy();a.s.topGroup.trigger("dtsb-updateTitle");a.s.topGroup.trigger("dtsb-redrawContents");
return!1})};c.prototype._setGroupListeners=function(a){var b=this;a.dom.add.unbind("click").on("click",function(){b.setupLogic();b.dom.container.trigger("dtsb-add");return!1});a.dom.container.unbind("dtsb-add").on("dtsb-add",function(){b.setupLogic();b.dom.container.trigger("dtsb-add");return!1});a.dom.container.unbind("dtsb-destroy").on("dtsb-destroy",function(){b._removeCriteria(a,!0);a.dom.container.remove();b.setupLogic();return!1});a.dom.container.unbind("dtsb-dropCriteria").on("dtsb-dropCriteria",
function(){var d=a.s.toDrop;d.s.index=a.s.index;d.updateArrows(1<b.s.criteria.length,!1);b.addCriteria(d,!1);return!1});a.setListeners()};c.prototype._setup=function(){this.setListeners();this.dom.add.text(this.s.dt.i18n("searchBuilder.add",this.c.i18n.add));this.dom.logic.children().first().text("OR"===this.c.logic?this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr):this.s.dt.i18n("searchBuilder.logicAnd",this.c.i18n.logicAnd));this.s.logic="OR"===this.c.logic?"OR":"AND";this.c.greyscale&&
this.dom.logic.addClass(this.classes.greyscale);this.dom.logicContainer.append(this.dom.logic).append(this.dom.clear);this.s.isChild&&this.dom.container.append(this.dom.logicContainer);this.dom.container.append(this.dom.add)};c.prototype._setLogicListener=function(){var a=this;this.dom.logic.unbind("click").on("click",function(){a._toggleLogic();a.s.dt.draw();for(var b=0,d=a.s.criteria;b<d.length;b++)d[b].criteria.setListeners()})};c.prototype._toggleLogic=function(){"OR"===this.s.logic?(this.s.logic=
"AND",this.dom.logic.children().first().text(this.s.dt.i18n("searchBuilder.logicAnd",this.c.i18n.logicAnd))):"AND"===this.s.logic&&(this.s.logic="OR",this.dom.logic.children().first().text(this.s.dt.i18n("searchBuilder.logicOr",this.c.i18n.logicOr)))};c.version="1.1.0";c.classes={add:"dtsb-add",button:"dtsb-button",clearGroup:"dtsb-clearGroup",greyscale:"dtsb-greyscale",group:"dtsb-group",inputButton:"dtsb-iptbtn",logic:"dtsb-logic",logicContainer:"dtsb-logicContainer"};c.defaults={columns:!0,conditions:{date:q.dateConditions,
html:q.stringConditions,"html-num":q.numConditions,"html-num-fmt":q.numFmtConditions,luxon:q.luxonDateConditions,moment:q.momentDateConditions,num:q.numConditions,"num-fmt":q.numFmtConditions,string:q.stringConditions},depthLimit:!1,enterSearch:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",button:{0:"Search Builder",_:"Search Builder (%d)"},clearAll:"Clear All",condition:"Condition",data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",
rightTitle:"Indent criteria",title:{0:"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},logic:"AND",orthogonal:{display:"display",search:"filter"},preDefined:!1};return c}(),x,D,I=function(){function c(a,b){var d=this;if(!D||!D.versionCheck||!D.versionCheck("1.10.0"))throw Error("SearchBuilder requires DataTables 1.10 or newer");a=new D.Api(a);this.classes=x.extend(!0,{},c.classes);this.c=x.extend(!0,{},c.defaults,b);this.dom={clearAll:x('<button type="button">'+
a.i18n("searchBuilder.clearAll",this.c.i18n.clearAll)+"</button>").addClass(this.classes.clearAll).addClass(this.classes.button).attr("type","button"),container:x("<div/>").addClass(this.classes.container),title:x("<div/>").addClass(this.classes.title),titleRow:x("<div/>").addClass(this.classes.titleRow),topGroup:void 0};this.s={dt:a,opts:b,search:void 0,topGroup:void 0};if(void 0===a.settings()[0]._searchBuilder){a.settings()[0]._searchBuilder=this;this.s.dt.one("preXhr",function(e,f,g){g.searchBuilder=
!1!==d.c.preDefined?d.c.preDefined:null});if(this.s.dt.settings()[0]._bInitComplete)this._setUp();else a.one("init.dt",function(){d._setUp()});return this}}c.prototype.getDetails=function(){return this.s.topGroup.getDetails()};c.prototype.getNode=function(){return this.dom.container};c.prototype.rebuild=function(a){this.dom.clearAll.click();if(void 0===a||null===a)return this;this.s.topGroup.rebuild(a);this.s.dt.draw(!1);this.s.topGroup.setListeners();return this};c.prototype._applyPreDefDefaults=
function(a){var b=this;void 0!==a.criteria&&void 0===a.logic&&(a.logic="AND");for(var d=function(n){void 0!==n.criteria?n=e._applyPreDefDefaults(n):e.s.dt.columns().every(function(r){b.s.dt.settings()[0].aoColumns[r].sTitle===n.data&&(n.dataIdx=r)})},e=this,f=0,g=a.criteria;f<g.length;f++)d(g[f]);return a};c.prototype._setUp=function(a){var b=this;void 0===a&&(a=!0);x.fn.DataTable.Api.registerPlural("columns().type()","column().type()",function(n,r){return this.iterator("column",function(v,C){return v.aoColumns[C].sType},
1)});if(!D.DateTime){var d=this.s.dt.columns().type().toArray(),e=this.s.dt.columns().toArray();void 0===d&&(this.s.dt.draw(!1),d=this.s.dt.columns().type().toArray());for(var f=0;f<e[0].length;f++){var g=d[e[0][f]];if((!0===this.c.columns||Array.isArray(this.c.columns)&&this.c.columns.includes(f))&&(g.includes("date")||g.includes("moment")||g.includes("luxon")))throw alert("SearchBuilder Requires DateTime when used with dates."),Error("SearchBuilder requires DateTime");}}this.s.topGroup=new G(this.s.dt,
this.c,void 0);this._setClearListener();this.s.dt.on("stateSaveParams",function(n,r,v){v.searchBuilder=b.getDetails();v.page=b.s.dt.page()});this._build();a&&(a=this.s.dt.state.loaded(),null!==a&&void 0!==a.searchBuilder?(this.s.topGroup.rebuild(a.searchBuilder),this.s.topGroup.dom.container.trigger("dtsb-redrawContents"),this.s.dt.page(a.page).draw("page"),this.s.topGroup.setListeners()):!1!==this.c.preDefined&&(this.c.preDefined=this._applyPreDefDefaults(this.c.preDefined),this.rebuild(this.c.preDefined)));
this._setEmptyListener();this.s.dt.state.save();this.s.dt.on("preXhr",function(n,r,v){v.searchBuilder=b.getDetails()})};c.prototype._updateTitle=function(a){this.dom.title.html(this.s.dt.i18n("searchBuilder.title",this.c.i18n.title,a))};c.prototype._build=function(){var a=this;this.dom.clearAll.remove();this.dom.container.empty();var b=this.s.topGroup.count();this._updateTitle(b);this.dom.titleRow.append(this.dom.title);this.dom.container.append(this.dom.titleRow);this.dom.topGroup=this.s.topGroup.getNode();
this.dom.container.append(this.dom.topGroup);this._setRedrawListener();var d=this.s.dt.table(0).node();x.fn.dataTable.ext.search.includes(this.s.search)||(this.s.search=function(e,f,g,n){return e.nTable!==d?!0:a.s.topGroup.search(f,g)},x.fn.dataTable.ext.search.push(this.s.search));this.s.dt.on("destroy.dt",function(){a.dom.container.remove();a.dom.clearAll.remove();for(var e=x.fn.dataTable.ext.search.indexOf(a.s.search);-1!==e;)x.fn.dataTable.ext.search.splice(e,1),e=x.fn.dataTable.ext.search.indexOf(a.s.search)})};
c.prototype._checkClear=function(){0<this.s.topGroup.s.criteria.length?(this.dom.clearAll.insertAfter(this.dom.title),this._setClearListener()):this.dom.clearAll.remove()};c.prototype._filterChanged=function(a){var b=this.c.filterChanged;"function"===typeof b&&b(a,this.s.dt.i18n("searchBuilder.button",this.c.i18n.button,a))};c.prototype._setClearListener=function(){var a=this;this.dom.clearAll.unbind("click");this.dom.clearAll.on("click",function(){a.s.topGroup=new G(a.s.dt,a.c,void 0);a._build();
a.s.dt.draw();a.s.topGroup.setListeners();a.dom.clearAll.remove();a._setEmptyListener();a._filterChanged(0);return!1})};c.prototype._setRedrawListener=function(){var a=this;this.s.topGroup.dom.container.unbind("dtsb-redrawContents");this.s.topGroup.dom.container.on("dtsb-redrawContents",function(){a._checkClear();a.s.topGroup.redrawContents();a.s.topGroup.setupLogic();a._setEmptyListener();var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b);a.s.dt.state.save()});this.s.topGroup.dom.container.unbind("dtsb-redrawLogic");
this.s.topGroup.dom.container.on("dtsb-redrawLogic",function(){a.s.topGroup.redrawLogic();var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b)});this.s.topGroup.dom.container.unbind("dtsb-add");this.s.topGroup.dom.container.on("dtsb-add",function(){var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b)});this.s.dt.on("postEdit postCreate postRemove",function(){a.s.topGroup.redrawContents()});this.s.topGroup.dom.container.unbind("dtsb-clearContents");this.s.topGroup.dom.container.on("dtsb-clearContents",
function(){a._setUp(!1);a._filterChanged(0);a.s.dt.draw()});this.s.topGroup.dom.container.on("dtsb-updateTitle",function(){var b=a.s.topGroup.count();a._updateTitle(b);a._filterChanged(b)})};c.prototype._setEmptyListener=function(){var a=this;this.s.topGroup.dom.add.on("click",function(){a._checkClear()});this.s.topGroup.dom.container.on("dtsb-destroy",function(){a.dom.clearAll.remove()})};c.version="1.1.0";c.classes={button:"dtsb-button",clearAll:"dtsb-clearAll",container:"dtsb-searchBuilder",inputButton:"dtsb-iptbtn",
title:"dtsb-title",titleRow:"dtsb-titleRow"};c.defaults={columns:!0,conditions:{date:q.dateConditions,html:q.stringConditions,"html-num":q.numConditions,"html-num-fmt":q.numFmtConditions,luxon:q.luxonDateConditions,moment:q.momentDateConditions,num:q.numConditions,"num-fmt":q.numFmtConditions,string:q.stringConditions},depthLimit:!1,enterSearch:!1,filterChanged:void 0,greyscale:!1,i18n:{add:"Add Condition",button:{0:"Search Builder",_:"Search Builder (%d)"},clearAll:"Clear All",condition:"Condition",
conditions:{array:{contains:"Contains",empty:"Empty",equals:"Equals",not:"Not",notEmpty:"Not Empty",without:"Without"},date:{after:"After",before:"Before",between:"Between",empty:"Empty",equals:"Equals",not:"Not",notBetween:"Not Between",notEmpty:"Not Empty"},number:{between:"Between",empty:"Empty",equals:"Equals",gt:"Greater Than",gte:"Greater Than Equal To",lt:"Less Than",lte:"Less Than Equal To",not:"Not",notBetween:"Not Between",notEmpty:"Not Empty"},string:{contains:"Contains",empty:"Empty",
endsWith:"Ends With",equals:"Equals",not:"Not",notEmpty:"Not Empty",startsWith:"Starts With"}},data:"Data",deleteTitle:"Delete filtering rule",leftTitle:"Outdent criteria",logicAnd:"And",logicOr:"Or",rightTitle:"Indent criteria",title:{0:"Custom Search Builder",_:"Custom Search Builder (%d)"},value:"Value",valueJoiner:"and"},logic:"AND",orthogonal:{display:"display",search:"filter"},preDefined:!1};return c}();(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,
window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return c(b,a,a.document)}:c(window.jQuery,window,document)})(function(c,a,b){function d(f,g){f=new e.Api(f);g=g?g:f.init().searchBuilder||e.defaults.searchBuilder;return(new I(f,g)).getNode()}l(c);m(c);k(c);var e=c.fn.dataTable;c.fn.dataTable.SearchBuilder=I;c.fn.DataTable.SearchBuilder=I;c.fn.dataTable.Group=G;c.fn.DataTable.Group=G;c.fn.dataTable.Criteria=
q;c.fn.DataTable.Criteria=q;a=c.fn.dataTable.Api.register;c.fn.dataTable.ext.searchBuilder={conditions:{}};c.fn.dataTable.ext.buttons.searchBuilder={action:function(f,g,n,r){f.stopPropagation();this.popover(r._searchBuilder.getNode(),{align:"dt-container"});void 0!==r._searchBuilder.s.topGroup&&r._searchBuilder.s.topGroup.dom.container.trigger("dtsb-redrawContents")},config:{},init:function(f,g,n){var r=new c.fn.dataTable.SearchBuilder(f,c.extend({filterChanged:function(v,C){f.button(g).text(C)}},
n.config));f.button(g).text(n.text||f.i18n("searchBuilder.button",r.c.i18n.button,0));n._searchBuilder=r},text:null};a("searchBuilder.getDetails()",function(){var f=this.context[0];return f._searchBuilder?f._searchBuilder.getDetails():null});a("searchBuilder.rebuild()",function(f){var g=this.context[0];if(void 0===g._searchBuilder)return null;g._searchBuilder.rebuild(f);return this});a("searchBuilder.container()",function(){var f=this.context[0];return f._searchBuilder?f._searchBuilder.getNode():
null});c(b).on("preInit.dt.dtsp",function(f,g,n){"dt"===f.namespace&&(g.oInit.searchBuilder||e.defaults.searchBuilder)&&(g._searchBuilder||d(g))});e.ext.feature.push({cFeature:"Q",fnInit:d});e.ext.features&&e.ext.features.register("searchBuilder",d)})})();

View file

@ -1,51 +1,49 @@
(function () {
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery', 'datatables.net-bs4', 'datatables.net-searchbuilder'], function ($) {
return factory($, window, document);
});
}
else if (typeof exports === 'object') {
// CommonJS
module.exports = function (root, $) {
if (!root) {
root = window;
}
if (!$ || !$.fn.dataTable) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
$ = require('datatables.net-bs4')(root, $).$;
}
if (!$.fn.dataTable.searchBuilder) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('datatables.net-searchbuilder')(root, $);
}
return factory($, root, root.document);
};
}
else {
// Browser
factory(jQuery, window, document);
}
}(function ($, window, document) {
'use strict';
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery', 'datatables.net-bs4', 'datatables.net-searchbuilder'], function ($) {
return factory($, window, document);
});
}
else if (typeof exports === 'object') {
// CommonJS
module.exports = function (root, $) {
if (!root) {
root = window;
}
if (!$ || !$.fn.dataTable) {
$ = require('datatables.net-bs4')(root, $).$;
}
if (!$.fn.dataTable.searchBuilder) {
require('datatables.net-searchbuilder')(root, $);
}
return factory($, root, root.document);
};
}
else {
// Browser
factory(jQuery, window, document);
}
}(function ($, window, document) {
var DataTable = $.fn.dataTable;
$.extend(true, DataTable.SearchBuilder.classes, {
clearAll: 'btn btn-light dtsb-clearAll'
});
$.extend(true, DataTable.Group.classes, {
add: 'btn btn-light dtsb-add',
clearGroup: 'btn btn-light dtsb-clearGroup',
logic: 'btn btn-light dtsb-logic'
});
$.extend(true, DataTable.Criteria.classes, {
condition: 'form-control dtsb-condition',
data: 'form-control dtsb-data',
"delete": 'btn btn-light dtsb-delete',
left: 'btn btn-light dtsb-left',
right: 'btn btn-light dtsb-right',
value: 'form-control dtsb-value'
});
return DataTable.searchPanes;
}));
}());
var dataTable = $.fn.dataTable;
$.extend(true, dataTable.SearchBuilder.classes, {
clearAll: 'btn btn-light dtsb-clearAll'
});
$.extend(true, dataTable.Group.classes, {
add: 'btn btn-light dtsb-add',
clearGroup: 'btn btn-light dtsb-clearGroup',
logic: 'btn btn-light dtsb-logic'
});
$.extend(true, dataTable.Criteria.classes, {
condition: 'form-control dtsb-condition',
data: 'form-control dtsb-data',
"delete": 'btn btn-light dtsb-delete',
left: 'btn btn-light dtsb-left',
right: 'btn btn-light dtsb-right',
value: 'form-control dtsb-value'
});
return dataTable.searchPanes;
}));

View file

@ -1,2 +1,2 @@
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-searchbuilder"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c){a||(a=window);if(!c||!c.fn.dataTable)c=require("datatables.net-bs4")(a,c).$;c.fn.dataTable.searchBuilder||require("datatables.net-searchbuilder")(a,c);return b(c,a,a.document)}:b(jQuery,window,document)})(function(b){var a=b.fn.dataTable;b.extend(!0,a.SearchBuilder.classes,{clearAll:"btn btn-light dtsb-clearAll"});
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-searchbuilder"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c){a||(a=window);c&&c.fn.dataTable||(c=require("datatables.net-bs4")(a,c).$);c.fn.dataTable.searchBuilder||require("datatables.net-searchbuilder")(a,c);return b(c,a,a.document)}:b(jQuery,window,document)})(function(b,a,c){a=b.fn.dataTable;b.extend(!0,a.SearchBuilder.classes,{clearAll:"btn btn-light dtsb-clearAll"});
b.extend(!0,a.Group.classes,{add:"btn btn-light dtsb-add",clearGroup:"btn btn-light dtsb-clearGroup",logic:"btn btn-light dtsb-logic"});b.extend(!0,a.Criteria.classes,{condition:"form-control dtsb-condition",data:"form-control dtsb-data","delete":"btn btn-light dtsb-delete",left:"btn btn-light dtsb-left",right:"btn btn-light dtsb-right",value:"form-control dtsb-value"});return a.searchPanes});

View file

@ -2,28 +2,50 @@ div.dtsp-topRow {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
border: 2px solid rgba(0, 0, 0, 0);
border-radius: 3px;
justify-content: space-around;
align-content: flex-start;
align-items: flex-start;
}
div.dtsp-topRow input.dtsp-search {
text-overflow: ellipsis;
min-width: 50px;
flex-basis: 90px;
max-width: none;
}
div.dtsp-topRow input.dtsp-search::placeholder {
color: black;
}
div.dtsp-topRow div.dtsp-subRow1 {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 0;
flex: 1 1 auto;
}
div.dtsp-topRow div.dtsp-searchCont {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 0;
div.dtsp-topRow div.dtsp-subRow1 div.dtsp-searchCont {
position: relative;
width: 100%;
}
div.dtsp-topRow div.dtsp-subRow1 input {
padding-right: 2em;
width: 100% !important;
box-sizing: border-box;
font-size: 1em;
}
div.dtsp-topRow div.dtsp-subRow1 button.dtsp-searchIcon {
position: absolute;
top: 0;
right: 0;
bottom: 0;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABbmlDQ1BpY2MAACiRdZE7SwNBFIU/EyWikRRaiFhsoWKhEBREO42FTZAQFYza7G5eQhKX3QQJtoKNhWAh2vgq/AfaCrYKgqAIIhb+Al+NhPVOEkiQZJbZ+3FmzmXmDHjCGTPrtAYhm8vb0bmQthxb0Xzv+PHRxRSabjrWTCQSpun4eaRF1YdR1av5voajM55wTGhpF54wLTsvPC0c3sxbineFe8y0Hhc+ER6x5YDCt0o3KvymOFXhL8X2YnQWPKqnlqpjo47NtJ0VHhYeyGYKZvU86ib+RG5pQWqfzH4coswRQsOgwDoZ8oxKzUlmjX3Bsm+eDfGY8rcoYosjRVq8I6IWpGtCalL0hHwZiir3/3k6yfGxSnd/CNpeXfdzEHz7UNpz3d9T1y2dgfcFrnM1/4bkNPkt+l5NGziGwDZc3tQ04wCudqD32dJtvSx5ZXqSSfi4gK4YdN9Dx2olq+o650+wuCVPdAeHRzAk+wNrfw8JaBFXEnV+AAAACXBIWXMAAA9hAAAPYQGoP6dpAAABMUlEQVQoU6XRr0vDQRjH8akoM4iIjqGoOIZ5oIjB5XWxajaYDGLSIhhNYjcPRDSJwbQNw+L+BNGgYYo/5pT5/shz8vDlBgMPXux7z3N3z+25VOofYyCyd4ZYCavI4gXPsRp9LqiDdrEMH+8wv8Vh8gBfWclFPOEUN3hAHjlMoRa7wTzBS5xgKLFglPkZLjDic6HyDsEMNvGR2Nxifoci3tEI+X770JU0XmPXIlax+LTPh83fFox1X6kxyzdjm9UcdXi9S+Vti6svfyNULhNR9TVsYNhW6Ff9KKCNR7/Zv6eeaQ+6+qcdpu9BqGlp1HFgud+FYdzzUcUExu0Q/cdzHGEFetIlXKPjK/sbqYoOftMiS+j9jzEJPd1Wt+5+kdR/9EM9ucIC5jCbyPc01Q32kfsBppYz3hYFcCwAAAAASUVORK5CYII=");
background-repeat: no-repeat;
background-position: center;
background-size: 12px;
}
div.dtsp-topRow div.dtsp-subRow2 {
white-space: nowrap;
flex: 0 0 auto;
}
div.dtsp-topRow button.dtsp-nameButton {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAABcGlDQ1BpY2MAACiRdZHNSwJBGMYftTDS8FCHkA57sOigIAXRMQzyYh3UIKvL7rirwe66zK6IdA26dBA6RF36OvQf1DXoWhAERRAR9B/0dQnZ3nEFJXSG2ffHs/O8zDwD+DM6M+yBJGCYDs+mU9JaYV0KviNMM4QoEjKzreXcUh59x88jfKI+JESv/vt6jlBRtRngGyKeYxZ3iBeIMzXHErxHPMbKcpH4hDjO6YDEt0JXPH4TXPL4SzDPZxcBv+gplbpY6WJW5gbxNHHM0KusfR5xk7BqruaoRmlNwEYWaaQgQUEVW9DhIEHVpMx6+5It3woq5GH0tVAHJ0cJZfLGSa1SV5WqRrpKU0dd5P4/T1ubnfG6h1PA4Kvrfk4CwX2g2XDd31PXbZ4BgRfg2uz4K5TT/DfpjY4WOwYiO8DlTUdTDoCrXWD82ZK53JICtPyaBnxcACMFYPQeGN7wsmr/x/kTkN+mJ7oDDo+AKdof2fwDCBRoDkL8UccAAAAJcEhZcwAAD2EAAA9hAag/p2kAAAK2SURBVFgJ7ZY9j41BFICvryCExrJBQ6HyEYVEIREaUZDQIRoR2ViJKCioxV+gkVXYTVZEQiEUhG2EQnxUCh0FKolY4ut5XnM2cyfva3Pt5m7EPcmzZ2bemTNnzjkzd1utnvQi0IvAfxiBy5z5FoxO89kPY+8mbMjtzs47RXs5/WVpbAG6bWExt5PuIibvhVkwmC+ck3eK9ln6/fAddFojYzBVuYSBpcnIEvRaqOw2RcaN18FPuJH0JvRUxbT3wWf4ltiKPgfVidWlbGZgPozDFfgAC+EA/K2EI4cwcAJ+gPaeQ+VQU2SOMMGcPgPl/m/V2p50rrbRsRgt9Iv5h6xtpP22Bz7Ce1C+gFFxfKzOmShcU+Qmyh2w3w8rIJfddHTck66EukL/xPhj+JM8rHNmFys0Pg4v0up3aFNlwR9NYyodd3OL/C64zpsymcTFcf6ElM4YzjAWKYrJkaq8kE/yUYNP4BoYvS1QRo+hNtF5xfkTUjoTheukSFFMjlTFm6PjceOca/SMpKfeCR1L6Uzk/y2WIkVhNFJlJAZhP+hYns7b9D3IPuhY5mYrIv8OrQJvR5NYyNaW4jsU8pSGNySiVx4o5tXq3JkoXE/mg5R/M8dGJCJpKhaDcjBRdbI/Rm8g69c122om33BHmj2CHoV5qa9jUXBraJ+G1fAVjIBO1klc87ro1K4JZ/K35SWW3TwcyDd6TecqnAEd8cGq2+w84xvBm1n3vS0izKkkwh5XNC/GmFPqqAtPF89AOScKuemaNzoTV1SD5dtSbmLf1/RV+tC0WTgcj6R7HEtrVGWaqu/lYDZ/2pvxQ/kIyw/gFByHC9AHw910hv1aUUumyd8yy0QfhmEkfiNod0Xusct68J1qc8Tdux0Z97Q+hsDb+AYGYEbF/4Guw2Q/qDPqZG/zXgT+3Qj8AtKnfWhFwmuAAAAAAElFTkSuQmCC");
@ -39,11 +61,26 @@ div.dtsp-topRow button.dtsp-countButton {
background-size: 18px;
vertical-align: bottom;
}
div.dtsp-topRow button.dtsp-searchIcon {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABcGlDQ1BpY2MAACiRdZHNSwJBGMYftTDS8FCHkA57sOigIAXRMQzyYh3UIKvL7rirwe66zK6IdA26dBA6RF36OvQf1DXoWhAERRAR9B/0dQnZ3nEFJXSG2ffHs/O8zDwD+DM6M+yBJGCYDs+mU9JaYV0KviNMM4QoEjKzreXcUh59x88jfKI+JESv/vt6jlBRtRngGyKeYxZ3iBeIMzXHErxHPMbKcpH4hDjO6YDEt0JXPH4TXPL4SzDPZxcBv+gplbpY6WJW5gbxNHHM0KusfR5xk7BqruaoRmlNwEYWaaQgQUEVW9DhIEHVpMx6+5It3woq5GH0tVAHJ0cJZfLGSa1SV5WqRrpKU0dd5P4/T1ubnfG6h1PA4Kvrfk4CwX2g2XDd31PXbZ4BgRfg2uz4K5TT/DfpjY4WOwYiO8DlTUdTDoCrXWD82ZK53JICtPyaBnxcACMFYPQeGN7wsmr/x/kTkN+mJ7oDDo+AKdof2fwDCBRoDkL8UccAAAAJcEhZcwAAD2EAAA9hAag/p2kAAAEnSURBVCgVpdG7SgNBFIDh1RhJsBBEsDIgIhaWFjZa2GtpKb6AnU0MprKOWEjK2IuFFxCxS2lhZyOWXh5AQVER/X+zuwwywoIHvp3dM3Nm55Ik/4i+P2or5FewiBIe0cEt8ogVz9LbhEVf+cgkcew1tvAZ5PPXGm9HOMEanMAYQhunaCAazuqA1UjvILl9HGPc/n4fabjPGbzjMM2FjfkDuPw5O8JilzgA9/OKWDynyWnbsPiF7yc4SRWxmEyTN7ZhsSd7gTLW8TuGSSzBcZd2hsV+n+MNC9jGCNzjPDwsz8XCO/x02Bqeptcxhg+4gjD8YxetLOkBGRbuwcIr+NdRLMPl3uMM2YHx2gsLd+D97qKEQuGe65jCAzbgVRWOCUZuovAfs5m/AdVxL0R1AIsLAAAAAElFTkSuQmCC");
background-repeat: no-repeat;
background-position: center;
background-size: 12px;
div.dtsp-topRow button.dtsp-collapseButton span.dtsp-caret {
position: relative;
top: 2px;
display: inline-block;
}
div.dtsp-topRow button.dtsp-collapseButton.dtsp-rotated {
transform: rotate(180deg);
}
div.dtsp-topRow.dtsp-bordered {
border: 2px solid #f0f0f0;
border-radius: 3px;
}
div.dtsp-topRow.dtsp-bordered:hover {
background-color: #f0f0f0;
opacity: 0.6;
border: 2px solid #cfcfcf;
border-radius: 3px;
cursor: pointer !important;
}
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane table thead th,
@ -55,79 +92,48 @@ div.dt-button-collection {
z-index: 2002;
}
div.dataTables_scrollBody {
background: white !important;
}
div.dtsp-columns-1 {
min-width: 98%;
max-width: 98%;
padding-left: 1%;
padding-right: 1%;
max-width: 100%;
margin: 0px !important;
}
div.dtsp-columns-2 {
min-width: 48%;
max-width: 48%;
padding-left: 1%;
padding-right: 1%;
max-width: 49%;
margin: 0px !important;
}
div.dtsp-columns-3 {
min-width: 30.333%;
max-width: 30.333%;
padding-left: 1%;
padding-right: 1%;
max-width: 32%;
margin: 0px !important;
}
div.dtsp-columns-4 {
min-width: 23%;
max-width: 23%;
padding-left: 1%;
padding-right: 1%;
max-width: 24%;
margin: 0px !important;
}
div.dtsp-columns-5 {
min-width: 18%;
max-width: 18%;
padding-left: 1%;
padding-right: 1%;
max-width: 19%;
margin: 0px !important;
}
div.dtsp-columns-6 {
min-width: 15.666%;
max-width: 15.666%;
padding-left: 0.5%;
padding-right: 0.5%;
max-width: 16%;
margin: 0px !important;
}
div.dtsp-columns-7 {
min-width: 13.28%;
max-width: 13.28%;
padding-left: 0.5%;
padding-right: 0.5%;
max-width: 14%;
margin: 0px !important;
}
div.dtsp-columns-8 {
min-width: 11.5%;
max-width: 11.5%;
padding-left: 0.5%;
padding-right: 0.5%;
min-width: 12%;
margin: 0px !important;
}
div.dtsp-columns-9 {
min-width: 11.111%;
max-width: 11.111%;
padding-left: 0.5%;
padding-right: 0.5%;
max-width: 10.5%;
margin: 0px !important;
}
@ -136,129 +142,35 @@ div.dt-button-collection {
}
div.dtsp-panesContainer {
width: 100%;
margin-bottom: 1em;
}
div.dtsp-panesContainer div.dataTables_wrapper {
width: 100%;
}
div.dtsp-searchPanes {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
align-content: flex-start;
align-items: stretch;
clear: both;
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_layout_cell {
padding: 0;
}
div.dtsp-searchPanes button.btn {
margin: 0;
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollHead {
display: none !important;
}
div.dtsp-searchPanes button.dtsp-clearAll {
max-width: 50px;
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody {
background: white !important;
border-bottom: none;
}
div.dtsp-columns-1,
div.dtsp-columns-2,
div.dtsp-columns-3,
div.dtsp-columns-4,
div.dtsp-columns-5,
div.dtsp-columns-6,
div.dtsp-columns-7,
div.dtsp-columns-8,
div.dtsp-columns-9 {
padding-left: 0px;
padding-right: 0px;
}
div.dtsp-searchPane {
flex-direction: row;
flex-wrap: nowrap;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 280px;
justify-content: space-around;
align-content: flex-start;
align-items: stretch;
padding-top: 0px;
padding-bottom: 5px;
margin: 5px 0;
margin-top: 0px;
margin-bottom: 0px;
font-size: 0.9em;
margin: 5px;
}
div.dtsp-searchPane div.dataTables_wrapper {
flex: 1;
}
div.dtsp-searchPane div.dataTables_wrapper div.dataTables_filter {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody thead {
display: none;
}
div.dtsp-searchPane div.dataTables_wrapper div.row div.col-sm-12:empty {
display: none;
}
div.dtsp-searchPane div.dataTables_wrapper div.row div.dataTables_filter {
display: none;
}
div.dtsp-searchPane div.btn-group {
padding: 0px;
}
div.dtsp-searchPane div.dtsp-topRow {
padding: 0px !important;
margin: 0px;
margin-bottom: 0.5rem;
}
div.dtsp-searchPane div.dtsp-topRow div.dtsp-subRows {
padding: 0px !important;
text-align: right;
}
div.dtsp-searchPane div.dtsp-topRow div.row {
width: 100%;
}
div.dtsp-searchPane div.dtsp-topRow button {
min-width: 35px;
max-width: 35px;
border: 1px solid #ced4da;
}
div.dtsp-searchPane div.dtsp-topRow div.dtsp-subRow2 {
margin-left: 5px;
}
div.dtsp-searchPane div.dtsp-topRow button.clearButton {
padding-left: 10px;
}
div.dtsp-searchPane thead {
display: none;
}
div.dtsp-searchPane .mb-3 {
margin-bottom: none !important;
}
div.dtsp-searchPane .col-sm-12 {
padding: 5px;
}
div.dtsp-searchPane .input-group {
padding: 0px !important;
}
div.dtsp-searchPane .input-group .input-group-append {
display: inline-block;
}
div.dtsp-searchPane div.dataTables_scrollHead {
display: none;
}
div.dtsp-searchPane div.dataTables_scrollBody {
padding: 2px;
border: 2px #f0f0f0 solid;
border-radius: 4px;
}
div.dtsp-searchPane div.dataTables_scrollBody:hover {
border: 2px solid #cfcfcf !important;
}
div.dtsp-searchPane div.dataTables_scrollBody table {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table {
table-layout: fixed;
}
div.dtsp-searchPane div.dataTables_scrollBody table tbody tr td.dtsp-nameColumn {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table tr > th,
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody table tr > td {
padding: 5px 10px;
}
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody td.dtsp-nameColumn {
width: 100% !important;
}
div.dtsp-searchPane div.dataTables_scrollBody table tbody tr div.dtsp-nameCont {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont {
width: 100%;
display: flex;
flex-direction: row;
@ -266,7 +178,11 @@ div.dtsp-searchPane div.dataTables_scrollBody table tbody tr div.dtsp-nameCont {
align-content: flex-start;
align-items: flex-start;
}
div.dtsp-searchPane div.dataTables_scrollBody table tbody tr div.dtsp-nameCont span.dtsp-name {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-name,
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill {
cursor: default;
}
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-name {
text-overflow: ellipsis;
overflow: hidden;
display: inline-block;
@ -274,74 +190,119 @@ div.dtsp-searchPane div.dataTables_scrollBody table tbody tr div.dtsp-nameCont s
white-space: nowrap;
flex-grow: 1;
}
div.dtsp-searchPane div.dataTables_scrollBody table tbody tr div.dtsp-nameCont span.badge {
min-width: 30px;
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill {
display: inline-block;
line-height: 1;
margin-top: 3.5px;
background-color: #cfcfcf;
text-align: center;
border: 1px solid #cfcfcf;
border-radius: 10px;
width: auto;
min-width: 30px;
color: black;
font-size: 0.9em;
padding: 0 4px;
}
div.dtsp-searchPane div.dataTables_scrollBody table tbody tr td.dtsp-countColumn {
text-align: right;
}
div.dtsp-searchPane .dtsp-searchIcon {
display: block;
position: relative;
padding: 18px 13px;
border: 1px solid #ced4da;
}
div.dtsp-searchPane div.dataTables_wrapper div.dataTables_filter {
div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody div.dtsp-nameCont span.dtsp-pill:empty {
display: none;
}
div.dtsp-searchPane div.dataTables_wrapper div.row {
margin-left: -7px;
margin-right: -7px;
}
div.dtsp-searchPane div.badge {
min-width: 30px;
}
div.dtsp-panes {
padding: 5px;
border: 2px solid #f0f0f0;
border-radius: 10px;
margin: 5px;
div.dtsp-panesContainer {
clear: both;
}
div.dtsp-panes div.dtsp-titleRow {
padding-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
}
div.dtsp-panes div.dtsp-title {
float: left;
margin-bottom: 0px;
margin-top: 10px;
padding-left: 0;
padding-right: 0;
text-align: center;
}
div.dtsp-panes button.dtsp-clearAll {
div.dtsp-panesContainer div.dtsp-searchPanes {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-content: flex-start;
align-items: stretch;
clear: both;
text-align: left;
}
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane {
flex-grow: 1;
flex-shrink: 0;
font-size: 0.9em;
margin-top: 15px !important;
}
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper {
flex: 1;
box-sizing: border-box;
}
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper div.dataTables_filter {
display: none;
}
div.dtsp-panesContainer div.dtsp-title {
float: left;
padding: 10px 0;
}
div.dtsp-panesContainer button.dtsp-clearAll,
div.dtsp-panesContainer button.dtsp-collapseAll,
div.dtsp-panesContainer button.dtsp-showAll {
float: right;
padding: 10px;
font-size: 1em;
}
div.dtsp-hidden {
display: none !important;
}
@media screen and (max-width: 767px) {
div.dtsp-columns-4,
div.dtsp-columns-5,
div.dtsp-columns-6 {
max-width: 31% !important;
min-width: 31% !important;
}
div.dtsp-panesContainer button.dtsp-clearAll,
div.dtsp-panesContainer button.dtsp-showAll {
margin-left: 3px;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow {
margin: 0.5em 0;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow div.dtsp-subRow2 {
margin-left: 0.5em;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow button {
border: 1px solid #ced4da;
width: 35px;
line-height: 20px;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow div.dtsp-subRow1 button {
border-right: none;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow span.dtsp-caret {
top: 4px;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow button.dtsp-rotated {
transform: none;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow button.dtsp-rotated span {
transform: rotate(180deg);
top: -4px;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow.dtsp-bordered:hover button.disabled {
cursor: pointer !important;
pointer-events: none;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dtsp-topRow.dtsp-bordered:hover input.dtsp-paneInputButton {
pointer-events: none;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dataTables_wrapper {
border: 2px #f0f0f0 solid;
border-radius: 4px;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dataTables_wrapper:hover {
border: 2px solid #cfcfcf !important;
}
div.dtsp-panesContainer div.dtsp-searchPane div.dataTables_wrapper div.dtsp-nameCont span.badge {
min-width: 30px;
line-height: 1.25em;
margin-top: 3.5px;
}
div.dtsp-panesContainer button.disabled {
cursor: not-allowed;
}
@media screen and (max-width: 640px) {
div.dtsp-searchPanes {
flex-direction: column !important;
}
div.dtsp-searchPane {
max-width: 98% !important;
min-width: 98% !important;
}
div.dt-button-collection div.dtsp-panesContainer {
padding-left: 10px;
padding-right: 10px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,91 +1,132 @@
/*!
SearchPanes 1.2.1
SearchPanes 1.4.0
2019-2020 SpryMedia Ltd - datatables.net/license
*/
(function(){var g,s,t,n=function(a,b,d,c,f,h){var e=this;void 0===h&&(h=null);if(!s||!s.versionCheck||!s.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!s.select)throw Error("SearchPane requires Select");a=new s.Api(a);this.classes=g.extend(!0,{},n.classes);this.c=g.extend(!0,{},n.defaults,b);this.customPaneSettings=h;this.s={cascadeRegen:!1,clearing:!1,colOpts:[],deselect:!1,displayed:!1,dt:a,dtPane:void 0,filteringActive:!1,index:d,indexes:[],lastCascade:!1,
lastSelect:!1,listSet:!1,name:void 0,redraw:!1,rowData:{arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map,totalOptions:0},scrollTop:0,searchFunction:void 0,selectPresent:!1,serverSelect:[],serverSelecting:!1,showFiltered:!1,tableLength:null,updating:!1};b=a.columns().eq(0).toArray().length;this.colExists=this.s.index<b;this.c.layout=c;b=parseInt(c.split("-")[1],10);this.dom={buttonGroup:g("<div/>").addClass(this.classes.buttonGroup),clear:g('<button type="button">&#215;</button>').addClass(this.classes.dull).addClass(this.classes.paneButton).addClass(this.classes.clearButton),
container:g("<div/>").addClass(this.classes.container).addClass(this.classes.layout+(10>b?c:c.split("-")[0]+"-9")),countButton:g('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:g("<table><thead><tr><th>"+(this.colExists?g(a.column(this.colExists?this.s.index:0).header()).text():this.customPaneSettings.header||"Custom Pane")+"</th><th/></tr></thead></table>"),lower:g("<div/>").addClass(this.classes.subRow2).addClass(this.classes.narrowButton),
nameButton:g('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.nameButton),panesContainer:f,searchBox:g("<input/>").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:g('<button type = "button" class="'+this.classes.searchIcon+'"></button>').addClass(this.classes.paneButton),searchCont:g("<div/>").addClass(this.classes.searchCont),searchLabelCont:g("<div/>").addClass(this.classes.searchLabelCont),topRow:g("<div/>").addClass(this.classes.topRow),
upper:g("<div/>").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.displayed=!1;a=this.s.dt;this.selections=[];this.s.colOpts=this.colExists?this._getOptions():this._getBonusOptions();var l=this.s.colOpts,c=g('<button type="button">X</button>').addClass(this.classes.paneButton);g(c).text(a.i18n("searchPanes.clearPane","X"));this.dom.container.addClass(l.className);this.dom.container.addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?this.customPaneSettings.className:
"");this.s.name=void 0!==this.s.colOpts.name?this.s.colOpts.name:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.name?this.customPaneSettings.name:this.colExists?g(a.column(this.s.index).header()).text():this.customPaneSettings.header||"Custom Pane";g(f).append(this.dom.container);var p=a.table(0).node();this.s.searchFunction=function(a,b,c){if(0===e.selections.length||a.nTable!==p)return!0;a=null;e.colExists&&(a=b[e.s.index],"filter"!==l.orthogonal.filter&&(a=e.s.rowData.filterMap.get(c),
a instanceof g.fn.dataTable.Api&&(a=a.toArray())));return e._search(a,c)};g.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)g(c).on("click",function(){e.dom.container.find(e.classes.search).each(function(){g(this).val("");g(this).trigger("input")});e.clearPane()});a.on("draw.dtsp",function(){e._adjustTopRow()});a.on("buttons-action",function(){e._adjustTopRow()});g(window).on("resize.dtsp",s.util.throttle(function(){e._adjustTopRow()}));a.on("column-reorder.dtsp",function(a,b,
c){e.s.index=c.mapping[e.s.index]});return this};n.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map,totalOptions:0}};n.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();this.updateTable();return this};n.prototype.destroy=function(){g(this.s.dtPane).off(".dtsp");g(this.s.dt).off(".dtsp");g(this.dom.nameButton).off(".dtsp");g(this.dom.countButton).off(".dtsp");g(this.dom.clear).off(".dtsp");
g(this.dom.searchButton).off(".dtsp");g(this.dom.container).remove();for(var a=g.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==a;)g.fn.dataTable.ext.search.splice(a,1),a=g.fn.dataTable.ext.search.indexOf(this.s.searchFunction);void 0!==this.s.dtPane&&this.s.dtPane.destroy();this.s.listSet=!1};n.prototype.getPaneCount=function(){return void 0!==this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:0};n.prototype.rebuildPane=function(a,b,d,c){void 0===a&&(a=!1);void 0===
b&&(b=null);void 0===d&&(d=null);void 0===c&&(c=!1);this.clearData();var f=[];this.s.serverSelect=[];var h=null;void 0!==this.s.dtPane&&(c&&(this.s.dt.page.info().serverSide?this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray():f=this.s.dtPane.rows({selected:!0}).data().toArray()),this.s.dtPane.clear().destroy(),h=g(this.dom.container).prev(),this.destroy(),this.s.dtPane=void 0,g.fn.dataTable.ext.search.push(this.s.searchFunction));this.dom.container.removeClass(this.classes.hidden);
this.s.displayed=!1;this._buildPane(!this.s.dt.page.info().serverSide?f:this.s.serverSelect,a,b,d,h);return this};n.prototype.removePane=function(){this.s.displayed=!1;g(this.dom.container).hide()};n.prototype.setCascadeRegen=function(a){this.s.cascadeRegen=a};n.prototype.setClear=function(a){this.s.clearing=a};n.prototype.updatePane=function(a){void 0===a&&(a=!1);this.s.updating=!0;this._updateCommon(a);this.s.updating=!1};n.prototype.updateTable=function(){this.selections=this.s.dtPane.rows({selected:!0}).data().toArray();
this._searchExtras();(this.c.cascadePanes||this.c.viewTotal)&&this.updatePane()};n.prototype._setListeners=function(){var a=this,b=this.s.rowData,d;this.s.dtPane.on("select.dtsp",function(){clearTimeout(d);a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.scrollTop=g(a.s.dtPane.table().node()).parent()[0].scrollTop,a.s.selectPresent=!0,a.s.dt.draw(!1)):(g(a.dom.clear).removeClass(a.classes.dull),a.s.selectPresent=
!0,a.s.updating||a._makeSelection(),a.s.selectPresent=!1)});this.s.dtPane.on("deselect.dtsp",function(){d=setTimeout(function(){a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.deselect=!0,a.s.dt.draw(!1)):(a.s.deselect=!0,0===a.s.dtPane.rows({selected:!0}).data().toArray().length&&g(a.dom.clear).addClass(a.classes.dull),a._makeSelection(),a.s.deselect=!1,a.s.dt.state.save())},50)});this.s.dt.on("stateSaveParams.dtsp",
function(c,d,h){if(g.isEmptyObject(h))a.s.dtPane.state.clear();else{var c=[],e,l,p,j;void 0!==a.s.dtPane&&(c=a.s.dtPane.rows({selected:!0}).data().map(function(a){return a.filter.toString()}).toArray(),e=g(a.dom.searchBox).val(),l=a.s.dtPane.order(),p=b.binsOriginal,j=b.arrayOriginal);void 0===h.searchPanes&&(h.searchPanes={});void 0===h.searchPanes.panes&&(h.searchPanes.panes=[]);for(d=0;d<h.searchPanes.panes.length;d++)h.searchPanes.panes[d].id===a.s.index&&(h.searchPanes.panes.splice(d,1),d--);
h.searchPanes.panes.push({arrayFilter:j,bins:p,id:a.s.index,order:l,searchTerm:e,selected:c})}});this.s.dtPane.on("user-select.dtsp",function(a,b,d,e,l){l.stopPropagation()});this.s.dtPane.on("draw.dtsp",function(){a._adjustTopRow()});g(this.dom.nameButton).on("click.dtsp",function(){var b=a.s.dtPane.order()[0][1];a.s.dtPane.order([0,"asc"===b?"desc":"asc"]).draw();a.s.dt.state.save()});g(this.dom.countButton).on("click.dtsp",function(){var b=a.s.dtPane.order()[0][1];a.s.dtPane.order([1,"asc"===b?
"desc":"asc"]).draw();a.s.dt.state.save()});g(this.dom.clear).on("click.dtsp",function(){a.dom.container.find("."+a.classes.search).each(function(){g(this).val("");g(this).trigger("input")});a.clearPane()});g(this.dom.searchButton).on("click.dtsp",function(){g(a.dom.searchBox).focus()});g(this.dom.searchBox).on("input.dtsp",function(){a.s.dtPane.search(g(a.dom.searchBox).val()).draw();a.s.dt.state.save()});this.s.dt.state.save();return!0};n.prototype._addOption=function(a,b,d,c,f,h){if(Array.isArray(a)||
a instanceof s.Api)if(a instanceof s.Api&&(a=a.toArray(),b=b.toArray()),a.length===b.length)for(var e=0;e<a.length;e++)h[a[e]]?h[a[e]]++:(h[a[e]]=1,f.push({display:b[e],filter:a[e],sort:d[e],type:c[e]})),this.s.rowData.totalOptions++;else throw Error("display and filter not the same length");else"string"===typeof this.s.colOpts.orthogonal?(h[a]?h[a]++:(h[a]=1,f.push({display:b,filter:a,sort:d,type:c})),this.s.rowData.totalOptions++):f.push({display:b,filter:a,sort:d,type:c})};n.prototype._addRow=
function(a,b,d,c,f,h,e){for(var l,g=0,j=this.s.indexes;g<j.length;g++){var i=j[g];i.filter===b&&(l=i.index)}void 0===l&&(l=this.s.indexes.length,this.s.indexes.push({filter:b,index:l}));return this.s.dtPane.row.add({className:e,display:""!==a?a:!1!==this.s.colOpts.emptyMessage?this.s.colOpts.emptyMessage:this.c.emptyMessage,filter:b,index:l,shown:d,sort:""!==f?f:!1!==this.s.colOpts.emptyMessage?this.s.colOpts.emptyMessage:this.c.emptyMessage,total:c,type:h})};n.prototype._adjustTopRow=function(){var a=
this.dom.container.find("."+this.classes.subRowsContainer),b=this.dom.container.find(".dtsp-subRow1"),d=this.dom.container.find(".dtsp-subRow2"),c=this.dom.container.find("."+this.classes.topRow);(252>g(a[0]).width()||252>g(c[0]).width())&&0!==g(a[0]).width()?(g(a[0]).addClass(this.classes.narrow),g(b[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),g(d[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):(g(a[0]).removeClass(this.classes.narrow),
g(b[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch),g(d[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};n.prototype._buildPane=function(a,b,d,c,f){var h=this;void 0===a&&(a=[]);void 0===b&&(b=!1);void 0===d&&(d=null);void 0===c&&(c=null);void 0===f&&(f=null);this.selections=[];var e=this.s.dt,l=e.column(this.colExists?this.s.index:0),p=this.s.colOpts,j=this.s.rowData,i=e.i18n("searchPanes.count","{total}"),n=e.i18n("searchPanes.countFiltered",
"{shown} ({total})"),k=e.state.loaded();this.s.listSet&&(k=e.state());if(this.colExists){var o=-1;if(k&&k.searchPanes&&k.searchPanes.panes)for(var m=0;m<k.searchPanes.panes.length;m++)if(k.searchPanes.panes[m].id===this.s.index){o=m;break}if((!1===p.show||void 0!==p.show&&!0!==p.show)&&-1===o)return this.dom.container.addClass(this.classes.hidden),this.s.displayed=!1;if(!0===p.show||-1!==o)this.s.displayed=!0;if(!this.s.dt.page.info().serverSide&&(null===d||null===d.searchPanes||null===d.searchPanes.options)){if(0===
j.arrayFilter.length){this._populatePane(b);this.s.rowData.totalOptions=0;this._detailsPane();if(k&&k.searchPanes&&k.searchPanes.panes&&-1===o){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}j.arrayOriginal=j.arrayTotals;j.binsOriginal=j.binsTotal}m=Object.keys(j.binsOriginal).length;b=this._uniqueRatio(m,e.rows()[0].length);if(!1===this.s.displayed&&((void 0===p.show&&null===p.threshold?b>this.c.threshold:b>p.threshold)||!0!==p.show&&1>=m)){this.dom.container.addClass(this.classes.hidden);
this.s.displayed=!1;return}this.c.viewTotal&&0===j.arrayTotals.length?(this.s.rowData.totalOptions=0,this._detailsPane()):j.binsTotal=j.bins;this.dom.container.addClass(this.classes.show);this.s.displayed=!0}else if(null!==d&&null!==d.searchPanes&&null!==d.searchPanes.options){if(void 0!==d.tableLength)this.s.tableLength=d.tableLength,this.s.rowData.totalOptions=this.s.tableLength;else if(null===this.s.tableLength||e.rows()[0].length>this.s.tableLength)this.s.tableLength=e.rows()[0].length,this.s.rowData.totalOptions=
this.s.tableLength;b=e.column(this.s.index).dataSrc();if(void 0!==d.searchPanes.options[b]){m=0;for(b=d.searchPanes.options[b];m<b.length;m++)o=b[m],this.s.rowData.arrayFilter.push({display:o.label,filter:o.value,sort:o.label,type:o.label}),this.s.rowData.bins[o.value]=this.c.viewTotal||this.c.cascadePanes?o.count:o.total,this.s.rowData.binsTotal[o.value]=o.total}m=Object.keys(j.binsTotal).length;b=this._uniqueRatio(m,this.s.tableLength);if(!1===this.s.displayed&&((void 0===p.show&&null===p.threshold?
b>this.c.threshold:b>p.threshold)||!0!==p.show&&1>=m)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.s.rowData.arrayOriginal=this.s.rowData.arrayFilter;this.s.rowData.binsOriginal=this.s.rowData.bins;this.s.displayed=!0}}else this.s.displayed=!0;this._displayPane();if(!this.s.listSet)this.dom.dtP.on("stateLoadParams.dt",function(a,b,c){g.isEmptyObject(e.state.loaded())&&g.each(c,function(a){delete c[a]})});null!==f&&0<g(this.dom.panesContainer).has(f).length?g(this.dom.container).insertAfter(f):
g(this.dom.panesContainer).prepend(this.dom.container);m=g.fn.dataTable.ext.errMode;g.fn.dataTable.ext.errMode="none";f=s.Scroller;this.s.dtPane=g(this.dom.dtP).DataTable(g.extend(!0,{columnDefs:[{className:"dtsp-nameColumn",data:"display",render:function(a,b,e){if(b==="sort")return e.sort;if(b==="type")return e.type;var c;(h.s.filteringActive||h.s.showFiltered)&&h.c.viewTotal?c=n.replace(/{total}/,e.total):c=i.replace(/{total}/,e.total);for(c=c.replace(/{shown}/,e.shown);c.indexOf("{total}")!==-1;)c=
c.replace(/{total}/,e.total);for(;c.indexOf("{shown}")!==-1;)c=c.replace(/{shown}/,e.shown);b='<span class="'+h.classes.pill+'">'+c+"</span>";if(h.c.hideCount||p.hideCount)b="";return'<div class="'+h.classes.nameCont+'"><span title="'+(typeof a==="string"&&a.match(/<[^>]*>/)!==null?a.replace(/<[^>]*>/g,""):a)+'" class="'+h.classes.name+'">'+a+"</span>"+b+"</div>"},targets:0,type:void 0!==e.settings()[0].aoColumns[this.s.index]?e.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+
this.classes.badgePill,data:"shown",orderData:[1,2],targets:1,visible:!1},{data:"total",targets:2,visible:!1}],deferRender:!0,dom:"t",info:!1,language:this.s.dt.settings()[0].oLanguage,paging:f?!0:!1,scrollX:!1,scrollY:"200px",scroller:f?!0:!1,select:!0,stateSave:e.settings()[0].oFeatures.bStateSave?!0:!1},this.c.dtOpts,void 0!==p?p.dtOpts:{},void 0!==this.s.colOpts.options||!this.colExists?{createdRow:function(a,b){g(a).addClass(b.className)}}:void 0,null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts?
this.customPaneSettings.dtOpts:{}));g(this.dom.dtP).addClass(this.classes.table);g(this.dom.searchBox).attr("placeholder",void 0!==p.header?p.header:this.colExists?e.settings()[0].aoColumns[this.s.index].sTitle:this.customPaneSettings.header||"Custom Pane");g.fn.dataTable.select.init(this.s.dtPane);g.fn.dataTable.ext.errMode=m;if(this.colExists){var l=(l=l.search())?l.substr(1,l.length-2).split("|"):[],q=0;j.arrayFilter.forEach(function(a){""===a.filter&&q++});m=0;for(f=j.arrayFilter.length;m<f;m++){for(var l=
!1,o=0,r=this.s.serverSelect;o<r.length;o++)b=r[o],b.filter===j.arrayFilter[m].filter&&(l=!0);if(this.s.dt.page.info().serverSide&&(!this.c.cascadePanes||this.c.cascadePanes&&0!==j.bins[j.arrayFilter[m].filter]||this.c.cascadePanes&&null!==c||l)){l=this._addRow(j.arrayFilter[m].display,j.arrayFilter[m].filter,c?j.binsTotal[j.arrayFilter[m].filter]:j.bins[j.arrayFilter[m].filter],this.c.viewTotal||c?String(j.binsTotal[j.arrayFilter[m].filter]):j.bins[j.arrayFilter[m].filter],j.arrayFilter[m].sort,
j.arrayFilter[m].type);o=0;for(r=this.s.serverSelect;o<r.length;o++)b=r[o],b.filter===j.arrayFilter[m].filter&&(this.s.serverSelecting=!0,l.select(),this.s.serverSelecting=!1)}else!this.s.dt.page.info().serverSide&&j.arrayFilter[m]&&(void 0!==j.bins[j.arrayFilter[m].filter]||!this.c.cascadePanes)?this._addRow(j.arrayFilter[m].display,j.arrayFilter[m].filter,j.bins[j.arrayFilter[m].filter],j.binsTotal[j.arrayFilter[m].filter],j.arrayFilter[m].sort,j.arrayFilter[m].type):this.s.dt.page.info().serverSide||
this._addRow("",q,q,"","","")}}s.select.init(this.s.dtPane);(void 0!==p.options||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options)&&this._getComparisonRows();this.s.dtPane.draw();this._adjustTopRow();this.s.listSet||(this._setListeners(),this.s.listSet=!0);for(c=0;c<a.length;c++)if(j=a[c],void 0!==j){m=0;for(f=this.s.dtPane.rows().indexes().toArray();m<f.length;m++)l=f[m],void 0!==this.s.dtPane.row(l).data()&&j.filter===this.s.dtPane.row(l).data().filter&&(this.s.dt.page.info().serverSide?
(this.s.serverSelecting=!0,this.s.dtPane.row(l).select(),this.s.serverSelecting=!1):this.s.dtPane.row(l).select())}this.s.dt.page.info().serverSide&&this.s.dtPane.search(g(this.dom.searchBox).val()).draw();if(k&&k.searchPanes&&k.searchPanes.panes&&(null===d||1===d.draw)){this.c.cascadePanes||this._reloadSelect(k);d=0;for(k=k.searchPanes.panes;d<k.length;d++)a=k[d],a.id===this.s.index&&(g(this.dom.searchBox).val(a.searchTerm),g(this.dom.searchBox).trigger("input"),this.s.dtPane.order(a.order).draw())}this.s.dt.state.save();
return!0};n.prototype._detailsPane=function(){var a=this.s.dt;this.s.rowData.arrayTotals=[];this.s.rowData.binsTotal={};var b=this.s.dt.settings()[0],a=a.rows().indexes();if(!this.s.dt.page.info().serverSide)for(var d=0;d<a.length;d++)this._populatePaneArray(a[d],this.s.rowData.arrayTotals,b,this.s.rowData.binsTotal)};n.prototype._displayPane=function(){var a=this.dom.container,b=this.s.colOpts,d=parseInt(this.c.layout.split("-")[1],10);g(this.dom.topRow).empty();g(this.dom.dtP).empty();g(this.dom.topRow).addClass(this.classes.topRow);
3<d&&g(this.dom.container).addClass(this.classes.smallGap);g(this.dom.topRow).addClass(this.classes.subRowsContainer);g(this.dom.upper).appendTo(this.dom.topRow);g(this.dom.lower).appendTo(this.dom.topRow);g(this.dom.searchCont).appendTo(this.dom.upper);g(this.dom.buttonGroup).appendTo(this.dom.lower);(!1===this.c.dtOpts.searching||void 0!==b.dtOpts&&!1===b.dtOpts.searching||!this.c.controls||!b.controls||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&
!this.customPaneSettings.dtOpts.searching)&&g(this.dom.searchBox).attr("disabled","disabled").removeClass(this.classes.paneInputButton).addClass(this.classes.disabledButton);g(this.dom.searchBox).appendTo(this.dom.searchCont);this._searchContSetup();this.c.clear&&(this.c.controls&&b.controls)&&g(this.dom.clear).appendTo(this.dom.buttonGroup);this.c.orderable&&(b.orderable&&this.c.controls&&b.controls)&&g(this.dom.nameButton).appendTo(this.dom.buttonGroup);!this.c.hideCount&&(!b.hideCount&&this.c.orderable&&
b.orderable&&this.c.controls&&b.controls)&&g(this.dom.countButton).appendTo(this.dom.buttonGroup);g(this.dom.topRow).prependTo(this.dom.container);g(a).append(this.dom.dtP);g(a).show()};n.prototype._getBonusOptions=function(){return g.extend(!0,{},n.defaults,{orthogonal:{threshold:null},threshold:null},void 0!==this.c?this.c:{})};n.prototype._getComparisonRows=function(){var a=this.s.colOpts,a=void 0!==a.options?a.options:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options?this.customPaneSettings.options:
void 0;if(void 0!==a){var b=this.s.dt.rows({search:"applied"}).data().toArray(),d=this.s.dt.rows({search:"applied"}),c=this.s.dt.rows().data().toArray(),f=this.s.dt.rows(),h=[];this.s.dtPane.clear();for(var e=0;e<a.length;e++){var l=a[e],g=""!==l.label?l.label:this.c.emptyMessage,j=l.className,i=g,k="function"===typeof l.value?l.value:[],n=0,o=g,m=0;if("function"===typeof l.value){for(var q=0;q<b.length;q++)l.value.call(this.s.dt,b[q],d[0][q])&&n++;for(q=0;q<c.length;q++)l.value.call(this.s.dt,c[q],
f[0][q])&&m++;"function"!==typeof k&&k.push(l.filter)}(!this.c.cascadePanes||this.c.cascadePanes&&0!==n)&&h.push(this._addRow(i,k,n,m,o,g,j))}return h}};n.prototype._getOptions=function(){return g.extend(!0,{},n.defaults,{emptyMessage:!1,orthogonal:{threshold:null},threshold:null},this.s.dt.settings()[0].aoColumns[this.s.index].searchPanes)};n.prototype._makeSelection=function(){this.updateTable();this.s.updating=!0;this.s.dt.draw();this.s.updating=!1};n.prototype._populatePane=function(a){void 0===
a&&(a=!1);var b=this.s.dt;this.s.rowData.arrayFilter=[];this.s.rowData.bins={};var d=this.s.dt.settings()[0];if(!this.s.dt.page.info().serverSide)for(var c=0,a=((this.c.cascadePanes||this.c.viewTotal)&&!this.s.clearing&&!a?b.rows({search:"applied"}).indexes():b.rows().indexes()).toArray();c<a.length;c++)this._populatePaneArray(a[c],this.s.rowData.arrayFilter,d)};n.prototype._populatePaneArray=function(a,b,d,c){void 0===c&&(c=this.s.rowData.bins);var f=this.s.colOpts;if("string"===typeof f.orthogonal)d=
d.oApi._fnGetCellData(d,a,this.s.index,f.orthogonal),this.s.rowData.filterMap.set(a,d),this._addOption(d,d,d,d,b,c);else{var h=d.oApi._fnGetCellData(d,a,this.s.index,f.orthogonal.search);null===h&&(h="");"string"===typeof h&&(h=h.replace(/<[^>]*>/g,""));this.s.rowData.filterMap.set(a,h);c[h]?c[h]++:(c[h]=1,this._addOption(h,d.oApi._fnGetCellData(d,a,this.s.index,f.orthogonal.display),d.oApi._fnGetCellData(d,a,this.s.index,f.orthogonal.sort),d.oApi._fnGetCellData(d,a,this.s.index,f.orthogonal.type),
b,c));this.s.rowData.totalOptions++}};n.prototype._reloadSelect=function(a){if(void 0!==a){for(var b,d=0;d<a.searchPanes.panes.length;d++)if(a.searchPanes.panes[d].id===this.s.index){b=d;break}if(void 0!==b)for(var d=this.s.dtPane,c=d.rows({order:"index"}).data().map(function(a){return null!==a.filter?a.filter.toString():null}).toArray(),f=0,a=a.searchPanes.panes[b].selected;f<a.length;f++){b=a[f];var h=-1;null!==b&&(h=c.indexOf(b.toString()));-1<h&&(this.s.serverSelecting=!0,d.row(h).select(),this.s.serverSelecting=
!1)}}};n.prototype._search=function(a,b){for(var d=this.s.colOpts,c=this.s.dt,f=0,h=this.selections;f<h.length;f++){var e=h[f];"string"===typeof e.filter&&(e.filter=e.filter.replaceAll("&amp;","&"));if(Array.isArray(a)){if(-1!==a.indexOf(e.filter))return!0}else if("function"===typeof e.filter)if(e.filter.call(c,c.row(b).data(),b)){if("or"===d.combiner)return!0}else{if("and"===d.combiner)return!1}else if(a===e.filter||!("string"===typeof a&&0===a.length)&&a==e.filter||null===e.filter&&"string"===typeof a&&
""===a)return!0}return"and"===d.combiner?!0:!1};n.prototype._searchContSetup=function(){this.c.controls&&this.s.colOpts.controls&&g(this.dom.searchButton).appendTo(this.dom.searchLabelCont);!1===this.c.dtOpts.searching||(!1===this.s.colOpts.dtOpts.searching||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&!this.customPaneSettings.dtOpts.searching)||g(this.dom.searchLabelCont).appendTo(this.dom.searchCont)};n.prototype._searchExtras=
function(){var a=this.s.updating;this.s.updating=!0;var b=this.s.dtPane.rows({selected:!0}).data().pluck("filter").toArray(),d=b.indexOf(!1!==this.s.colOpts.emptyMessage?this.s.colOpts.emptyMessage:this.c.emptyMessage),c=g(this.s.dtPane.table().container());-1<d&&(b[d]="");0<b.length?c.addClass(this.classes.selected):0===b.length&&c.removeClass(this.classes.selected);this.s.updating=a};n.prototype._uniqueRatio=function(a,b){return 0<b&&(0<this.s.rowData.totalOptions&&!this.s.dt.page.info().serverSide||
this.s.dt.page.info().serverSide&&0<this.s.tableLength)?a/this.s.rowData.totalOptions:1};n.prototype._updateCommon=function(a){void 0===a&&(a=!1);if(!this.s.dt.page.info().serverSide&&void 0!==this.s.dtPane&&(!this.s.filteringActive||this.c.cascadePanes||!0===a)&&(!0!==this.c.cascadePanes||!0!==this.s.selectPresent)&&(!this.s.lastSelect||!this.s.lastCascade)){var b=this.s.colOpts,d=this.s.dtPane.rows({selected:!0}).data().toArray(),a=g(this.s.dtPane.table().node()).parent()[0].scrollTop,c=this.s.rowData;
this.s.dtPane.clear();if(this.colExists){0===c.arrayFilter.length?this._populatePane():this.c.cascadePanes&&this.s.dt.rows().data().toArray().length===this.s.dt.rows({search:"applied"}).data().toArray().length?(c.arrayFilter=c.arrayOriginal,c.bins=c.binsOriginal):(this.c.viewTotal||this.c.cascadePanes)&&this._populatePane();this.c.viewTotal?this._detailsPane():c.binsTotal=c.bins;this.c.viewTotal&&!this.c.cascadePanes&&(c.arrayFilter=c.arrayTotals);for(var f=function(a){if(a&&(c.bins[a.filter]!==void 0&&
c.bins[a.filter]!==0&&h.c.cascadePanes||!h.c.cascadePanes||h.s.clearing)){var b=h._addRow(a.display,a.filter,!h.c.viewTotal?c.bins[a.filter]:c.bins[a.filter]!==void 0?c.bins[a.filter]:0,h.c.viewTotal?String(c.binsTotal[a.filter]):c.bins[a.filter],a.sort,a.type),e=d.findIndex(function(b){return b.filter===a.filter});if(e!==-1){b.select();d.splice(e,1)}}},h=this,e=0,l=c.arrayFilter;e<l.length;e++)f(l[e])}if(void 0!==b.searchPanes&&void 0!==b.searchPanes.options||void 0!==b.options||null!==this.customPaneSettings&&
void 0!==this.customPaneSettings.options){f=function(a){var b=d.findIndex(function(b){if(b.display===a.data().display)return!0});-1!==b&&(a.select(),d.splice(b,1))};e=0;for(l=this._getComparisonRows();e<l.length;e++)b=l[e],f(b)}for(f=0;f<d.length;f++)b=d[f],b=this._addRow(b.display,b.filter,0,this.c.viewTotal?b.total:0,b.display,b.display),this.s.updating=!0,b.select(),this.s.updating=!1;this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=a}};n.version="1.1.0";n.classes={buttonGroup:"dtsp-buttonGroup",
buttonSub:"dtsp-buttonSub",clear:"dtsp-clear",clearAll:"dtsp-clearAll",clearButton:"clearButton",container:"dtsp-searchPane",countButton:"dtsp-countButton",disabledButton:"dtsp-disabledButton",dull:"dtsp-dull",hidden:"dtsp-hidden",hide:"dtsp-hide",layout:"dtsp-",name:"dtsp-name",nameButton:"dtsp-nameButton",nameCont:"dtsp-nameCont",narrow:"dtsp-narrow",paneButton:"dtsp-paneButton",paneInputButton:"dtsp-paneInputButton",pill:"dtsp-pill",search:"dtsp-search",searchCont:"dtsp-searchCont",searchIcon:"dtsp-searchIcon",
searchLabelCont:"dtsp-searchButtonCont",selected:"dtsp-selected",smallGap:"dtsp-smallGap",subRow1:"dtsp-subRow1",subRow2:"dtsp-subRow2",subRowsContainer:"dtsp-subRowsContainer",title:"dtsp-title",topRow:"dtsp-topRow"};n.defaults={cascadePanes:!1,clear:!0,combiner:"or",controls:!0,container:function(a){return a.table().container()},dtOpts:{},emptyMessage:"<i>No Data</i>",hideCount:!1,layout:"columns-3",name:void 0,orderable:!0,orthogonal:{display:"display",filter:"filter",hideCount:!1,search:"filter",
show:void 0,sort:"sort",threshold:0.6,type:"type"},preSelect:[],threshold:0.6,viewTotal:!1};t=n;var i,r,u,k=function(a,b,d){var c=this;void 0===d&&(d=!1);this.regenerating=!1;if(!r||!r.versionCheck||!r.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!r.select)throw Error("SearchPane requires Select");var f=new r.Api(a);this.classes=i.extend(!0,{},k.classes);this.c=i.extend(!0,{},k.defaults,b);this.dom={clearAll:i('<button type="button">Clear All</button>').addClass(this.classes.clearAll),
container:i("<div/>").addClass(this.classes.panes).text(f.i18n("searchPanes.loadMessage","Loading Search Panes...")),emptyMessage:i("<div/>").addClass(this.classes.emptyMessage),options:i("<div/>").addClass(this.classes.container),panes:i("<div/>").addClass(this.classes.container),title:i("<div/>").addClass(this.classes.title),titleRow:i("<div/>").addClass(this.classes.titleRow),wrapper:i("<div/>")};this.s={colOpts:[],dt:f,filterCount:0,filterPane:-1,page:0,panes:[],selectionList:[],serverData:{},
stateRead:!1,updating:!1};if(void 0===f.settings()[0]._searchPanes){this._getState();if(this.s.dt.page.info().serverSide)f.on("preXhr.dt",function(a,b,d){void 0===d.searchPanes&&(d.searchPanes={});a=0;for(b=c.s.selectionList;a<b.length;a++){var f=b[a],g=c.s.dt.column(f.index).dataSrc();void 0===d.searchPanes[g]&&(d.searchPanes[g]={});for(var i=0;i<f.rows.length;i++)d.searchPanes[g][i]=f.rows[i].filter}});f.on("xhr",function(a,b,d){d&&(d.searchPanes&&d.searchPanes.options)&&(c.s.serverData=d,c.s.serverData.tableLength=
d.recordsTotal,c._serverTotals())});f.settings()[0]._searchPanes=this;this.dom.clearAll.text(f.i18n("searchPanes.clearMessage","Clear All"));if(this.s.dt.settings()[0]._bInitComplete||d)this._paneDeclare(f,a,b);else f.one("preInit.dt",function(){c._paneDeclare(f,a,b)});return this}};k.prototype.clearSelections=function(){this.dom.container.find(this.classes.search).each(function(){i(this).val("");i(this).trigger("input")});for(var a=[],b=0,d=this.s.panes;b<d.length;b++){var c=d[b];void 0!==c.s.dtPane&&
a.push(c.clearPane())}this.s.dt.draw();return a};k.prototype.getNode=function(){return this.dom.container};k.prototype.rebuild=function(a,b){void 0===a&&(a=!1);void 0===b&&(b=!1);i(this.dom.emptyMessage).remove();var d=[];!1===a&&i(this.dom.panes).empty();for(var c=0,f=this.s.panes;c<f.length;c++){var h=f[c];!1!==a&&h.s.index!==a||(h.clearData(),d.push(h.rebuildPane(void 0!==this.s.selectionList[this.s.selectionList.length-1]?h.s.index===this.s.selectionList[this.s.selectionList.length-1].index:!1,
this.s.dt.page.info().serverSide?this.s.serverData:void 0,null,b)),i(this.dom.panes).append(h.dom.container))}this.s.dt.page.info().serverSide||this.s.dt.draw();this.c.cascadePanes||this.c.viewTotal?this.redrawPanes(!0):this._updateSelection();this._updateFilterCount();this._attachPaneContainer();this.s.dt.draw();return 1===d.length?d[0]:d};k.prototype.redrawPanes=function(a){void 0===a&&(a=!1);var b=this.s.dt;if(!this.s.updating&&!this.s.dt.page.info().serverSide){var d=!0,c=this.s.filterPane;if(b.rows({search:"applied"}).data().toArray().length===
b.rows().data().toArray().length)d=!1;else if(this.c.viewTotal)for(var f=0,h=this.s.panes;f<h.length;f++){var e=h[f];if(void 0!==e.s.dtPane){var g=e.s.dtPane.rows({selected:!0}).data().toArray().length;if(0===g)for(var i=0,j=this.s.selectionList;i<j.length;i++){var k=j[i];k.index===e.s.index&&0!==k.rows.length&&(g=k.rows.length)}0<g&&-1===c?c=e.s.index:0<g&&(c=null)}}h=void 0;f=[];if(this.regenerating){h=-1;1===f.length&&(h=f[0].index);a=0;for(f=this.s.panes;a<f.length;a++)if(e=f[a],void 0!==e.s.dtPane){b=
!0;e.s.filteringActive=!0;if(-1!==c&&null!==c&&c===e.s.index||!1===d||e.s.index===h)b=!1,e.s.filteringActive=!1;e.updatePane(!b?b:d)}this._updateFilterCount()}else{g=0;for(i=this.s.panes;g<i.length;g++)if(e=i[g],e.s.selectPresent){this.s.selectionList.push({index:e.s.index,rows:e.s.dtPane.rows({selected:!0}).data().toArray(),protect:!1});b.state.save();break}else e.s.deselect&&(h=e.s.index,j=e.s.dtPane.rows({selected:!0}).data().toArray(),0<j.length&&this.s.selectionList.push({index:e.s.index,rows:j,
protect:!0}));if(0<this.s.selectionList.length){b=this.s.selectionList[this.s.selectionList.length-1].index;g=0;for(i=this.s.panes;g<i.length;g++)e=i[g],e.s.lastSelect=e.s.index===b}for(e=0;e<this.s.selectionList.length;e++)if(this.s.selectionList[e].index!==h||!0===this.s.selectionList[e].protect){b=!1;for(g=e+1;g<this.s.selectionList.length;g++)this.s.selectionList[g].index===this.s.selectionList[e].index&&(b=!0);b||(f.push(this.s.selectionList[e]),this.s.selectionList[e].protect=!1)}h=-1;1===f.length&&
(h=f[0].index);g=0;for(i=this.s.panes;g<i.length;g++)if(e=i[g],void 0!==e.s.dtPane){b=!0;e.s.filteringActive=!0;if(-1!==c&&null!==c&&c===e.s.index||!1===d||e.s.index===h)b=!1,e.s.filteringActive=!1;e.updatePane(!b?!1:d)}this._updateFilterCount();if(0<f.length&&(f.length<this.s.selectionList.length||a)){this._cascadeRegen(f);b=f[f.length-1].index;c=0;for(a=this.s.panes;c<a.length;c++)e=a[c],e.s.lastSelect=e.s.index===b}else if(0<f.length){e=0;for(a=this.s.panes;e<a.length;e++)if(f=a[e],void 0!==f.s.dtPane){b=
!0;f.s.filteringActive=!0;if(-1!==c&&null!==c&&c===f.s.index||!1===d)b=!1,f.s.filteringActive=!1;f.updatePane(!b?b:d)}}}d||(this.s.selectionList=[])}};k.prototype._attach=function(){var a=this;i(this.dom.container).removeClass(this.classes.hide);i(this.dom.titleRow).removeClass(this.classes.hide);i(this.dom.titleRow).remove();i(this.dom.title).appendTo(this.dom.titleRow);this.c.clear&&(i(this.dom.clearAll).appendTo(this.dom.titleRow),i(this.dom.clearAll).on("click.dtsps",function(){a.clearSelections()}));
i(this.dom.titleRow).appendTo(this.dom.container);for(var b=0,d=this.s.panes;b<d.length;b++)i(d[b].dom.container).appendTo(this.dom.panes);i(this.dom.panes).appendTo(this.dom.container);0===i("div."+this.classes.container).length&&i(this.dom.container).prependTo(this.s.dt);return this.dom.container};k.prototype._attachExtras=function(){i(this.dom.container).removeClass(this.classes.hide);i(this.dom.titleRow).removeClass(this.classes.hide);i(this.dom.titleRow).remove();i(this.dom.title).appendTo(this.dom.titleRow);
this.c.clear&&i(this.dom.clearAll).appendTo(this.dom.titleRow);i(this.dom.titleRow).appendTo(this.dom.container);return this.dom.container};k.prototype._attachMessage=function(){var a;try{a=this.s.dt.i18n("searchPanes.emptyPanes","No SearchPanes")}catch(b){a=null}if(null===a)i(this.dom.container).addClass(this.classes.hide),i(this.dom.titleRow).removeClass(this.classes.hide);else return i(this.dom.container).removeClass(this.classes.hide),i(this.dom.titleRow).addClass(this.classes.hide),i(this.dom.emptyMessage).text(a),
this.dom.emptyMessage.appendTo(this.dom.container),this.dom.container};k.prototype._attachPaneContainer=function(){for(var a=0,b=this.s.panes;a<b.length;a++)if(!0===b[a].s.displayed)return this._attach();return this._attachMessage()};k.prototype._cascadeRegen=function(a){this.regenerating=!0;var b=-1;1===a.length&&(b=a[0].index);for(var d=0,c=this.s.panes;d<c.length;d++){var f=c[d];f.setCascadeRegen(!0);f.setClear(!0);(void 0!==f.s.dtPane&&f.s.index===b||void 0!==f.s.dtPane)&&f.clearPane();f.setClear(!1)}this._makeCascadeSelections(a);
this.s.selectionList=a;a=0;for(b=this.s.panes;a<b.length;a++)f=b[a],f.setCascadeRegen(!1);this.regenerating=!1};k.prototype._checkMessage=function(){for(var a=0,b=this.s.panes;a<b.length;a++)if(!0===b[a].s.displayed)return;return this._attachMessage()};k.prototype._getState=function(){var a=this.s.dt.state.loaded();a&&(a.searchPanes&&void 0!==a.searchPanes.selectionList)&&(this.s.selectionList=a.searchPanes.selectionList)};k.prototype._makeCascadeSelections=function(a){for(var b=0;b<a.length;b++)for(var d=
function(e){if(e.s.index===a[b].index&&void 0!==e.s.dtPane){b===a.length-1&&(e.s.lastCascade=!0);0<e.s.dtPane.rows({selected:!0}).data().toArray().length&&void 0!==e.s.dtPane&&(e.setClear(!0),e.clearPane(),e.setClear(!1));for(var d=function(a){e.s.dtPane.rows().every(function(b){e.s.dtPane.row(b).data()!==void 0&&(a!==void 0&&e.s.dtPane.row(b).data().filter===a.filter)&&e.s.dtPane.row(b).select()})},f=0,h=a[b].rows;f<h.length;f++)d(h[f]);c._updateFilterCount();e.s.lastCascade=!1}},c=this,f=0,h=this.s.panes;f<
h.length;f++)d(h[f]);this.s.dt.state.save()};k.prototype._paneDeclare=function(a,b,d){var c=this;a.columns(0<this.c.columns.length?this.c.columns:void 0).eq(0).each(function(a){c.s.panes.push(new t(b,d,a,c.c.layout,c.dom.panes))});for(var f=a.columns().eq(0).toArray().length,h=this.c.panes.length,e=0;e<h;e++)this.s.panes.push(new t(b,d,f+e,this.c.layout,this.dom.panes,this.c.panes[e]));if(0<this.c.order.length){f=this.c.order.map(function(a){return c._findPane(a)});this.dom.panes.empty();this.s.panes=
f;f=0;for(h=this.s.panes;f<h.length;f++)this.dom.panes.append(h[f].dom.container)}this.s.dt.settings()[0]._bInitComplete?this._startup(a):this.s.dt.settings()[0].aoInitComplete.push({fn:function(){c._startup(a)}})};k.prototype._findPane=function(a){for(var b=0,d=this.s.panes;b<d.length;b++){var c=d[b];if(a===c.s.name)return c}};k.prototype._serverTotals=function(){for(var a=!1,b=!1,d=this.s.dt,c=0,f=this.s.panes;c<f.length;c++){var h=f[c];if(h.s.selectPresent){this.s.selectionList.push({index:h.s.index,
rows:h.s.dtPane.rows({selected:!0}).data().toArray(),protect:!1});d.state.save();h.s.selectPresent=!1;a=!0;break}else h.s.deselect&&(b=h.s.dtPane.rows({selected:!0}).data().toArray(),0<b.length&&this.s.selectionList.push({index:h.s.index,rows:b,protect:!0}),b=a=!0)}if(a){d=[];for(c=0;c<this.s.selectionList.length;c++){h=!1;for(f=c+1;f<this.s.selectionList.length;f++)this.s.selectionList[f].index===this.s.selectionList[c].index&&(h=!0);if(!h){for(var f=!1,a=0,e=this.s.panes;a<e.length;a++)h=e[a],h.s.index===
this.s.selectionList[c].index&&0<h.s.dtPane.rows({selected:!0}).data().toArray().length&&(f=!0);f&&d.push(this.s.selectionList[c])}}this.s.selectionList=d}else this.s.selectionList=[];d=-1;if(b&&1===this.s.selectionList.length){b=0;for(c=this.s.panes;b<c.length;b++)h=c[b],h.s.lastSelect=!1,h.s.deselect=!1,void 0!==h.s.dtPane&&0<h.s.dtPane.rows({selected:!0}).data().toArray().length&&(d=h.s.index)}else if(0<this.s.selectionList.length){b=this.s.selectionList[this.s.selectionList.length-1].index;c=
0;for(f=this.s.panes;c<f.length;c++)h=f[c],h.s.lastSelect=h.s.index===b,h.s.deselect=!1}else if(0===this.s.selectionList.length){b=0;for(c=this.s.panes;b<c.length;b++)h=c[b],h.s.lastSelect=!1,h.s.deselect=!1}i(this.dom.panes).empty();b=0;for(c=this.s.panes;b<c.length;b++)h=c[b],h.s.lastSelect?h._setListeners():h.rebuildPane(void 0,this.s.dt.page.info().serverSide?this.s.serverData:void 0,h.s.index===d?!0:null,!0),i(this.dom.panes).append(h.dom.container),void 0!==h.s.dtPane&&(i(h.s.dtPane.table().node()).parent()[0].scrollTop=
h.s.scrollTop,i.fn.dataTable.select.init(h.s.dtPane));this.s.dt.page.info().serverSide||this.s.dt.draw()};k.prototype._startup=function(a){var b=this;i(this.dom.container).text("");this._attachExtras();i(this.dom.container).append(this.dom.panes);i(this.dom.panes).empty();var d=this.s.dt.state.loaded();if(this.c.viewTotal&&!this.c.cascadePanes&&null!==d&&void 0!==d&&void 0!==d.searchPanes&&void 0!==d.searchPanes.panes){for(var c=!1,f=0,h=d.searchPanes.panes;f<h.length;f++){var e=h[f];if(0<e.selected.length){c=
!0;break}}if(c){c=0;for(f=this.s.panes;c<f.length;c++)e=f[c],e.s.showFiltered=!0}}c=0;for(f=this.s.panes;c<f.length;c++)e=f[c],e.rebuildPane(void 0,0<Object.keys(this.s.serverData).length?this.s.serverData:void 0),i(this.dom.panes).append(e.dom.container);this.s.dt.page.info().serverSide||this.s.dt.draw();!this.s.stateRead&&(null!==d&&void 0!==d)&&(this.s.dt.page(d.start/this.s.dt.page.len()),this.s.dt.draw("page"));this.s.stateRead=!0;if(this.c.viewTotal&&!this.c.cascadePanes){d=0;for(c=this.s.panes;d<
c.length;d++)e=c[d],e.updatePane()}this._updateFilterCount();this._checkMessage();a.on("preDraw.dtsps",function(){b._updateFilterCount();(b.c.cascadePanes||b.c.viewTotal)&&!b.s.dt.page.info().serverSide?b.redrawPanes():b._updateSelection();b.s.filterPane=-1});this.s.dt.on("stateSaveParams.dtsp",function(a,c,e){if(e.searchPanes===void 0)e.searchPanes={};e.searchPanes.selectionList=b.s.selectionList});if(this.s.dt.page.info().serverSide)a.off("page"),a.on("page",function(){b.s.page=b.s.dt.page()}),
a.off("preXhr.dt"),a.on("preXhr.dt",function(a,c,e){if(e.searchPanes===void 0)e.searchPanes={};for(var c=a=0,d=b.s.panes;c<d.length;c++){var f=d[c],h=b.s.dt.column(f.s.index).dataSrc();e.searchPanes[h]===void 0&&(e.searchPanes[h]={});if(f.s.dtPane!==void 0)for(var f=f.s.dtPane.rows({selected:true}).data().toArray(),g=0;g<f.length;g++){e.searchPanes[h][g]=f[g].filter;a++}}b.c.viewTotal&&b._prepViewTotal();if(a>0){if(a!==b.s.filterCount){e.start=0;b.s.page=0}else e.start=b.s.page*b.s.dt.page.len();
b.s.dt.page(b.s.page);b.s.filterCount=a}});else a.on("preXhr.dt",function(){for(var a=0,c=b.s.panes;a<c.length;a++)c[a].clearData()});this.s.dt.on("xhr",function(){var a=false;if(!b.s.dt.page.info().serverSide)b.s.dt.one("preDraw",function(){if(!a){var c=b.s.dt.page();a=true;i(b.dom.panes).empty();for(var e=0,d=b.s.panes;e<d.length;e++){var f=d[e];f.clearData();f.rebuildPane(b.s.selectionList[b.s.selectionList.length-1]!==void 0?f.s.index===b.s.selectionList[b.s.selectionList.length-1].index:false,
void 0,void 0,true);i(b.dom.panes).append(f.dom.container)}b.s.dt.page.info().serverSide||b.s.dt.draw();b.c.cascadePanes||b.c.viewTotal?b.redrawPanes(b.c.cascadePanes):b._updateSelection();b._checkMessage();b.s.dt.one("draw",function(){b.s.dt.page(c).draw(false)})}})});d=0;for(c=this.s.panes;d<c.length;d++)if(e=c[d],void 0!==e&&void 0!==e.s.dtPane&&(void 0!==e.s.colOpts.preSelect&&0<e.s.colOpts.preSelect.length||null!==e.customPaneSettings&&void 0!==e.customPaneSettings.preSelect&&0<e.customPaneSettings.preSelect.length)){f=
e.s.dtPane.rows().data().toArray().length;for(h=0;h<f;h++)(-1!==e.s.colOpts.preSelect.indexOf(e.s.dtPane.cell(h,0).data())||null!==e.customPaneSettings&&void 0!==e.customPaneSettings.preSelect&&-1!==e.customPaneSettings.preSelect.indexOf(e.s.dtPane.cell(h,0).data()))&&e.s.dtPane.row(h).select();e.updateTable()}if(void 0!==this.s.selectionList&&0<this.s.selectionList.length){d=this.s.selectionList[this.s.selectionList.length-1].index;c=0;for(f=this.s.panes;c<f.length;c++)e=f[c],e.s.lastSelect=e.s.index===
d}0<this.s.selectionList.length&&this.c.cascadePanes&&this._cascadeRegen(this.s.selectionList);this._updateFilterCount();a.on("destroy.dtsps",function(){for(var c=0,e=b.s.panes;c<e.length;c++)e[c].destroy();a.off(".dtsps");i(b.dom.clearAll).off(".dtsps");i(b.dom.container).remove();b.clearSelections()});if(this.c.clear)i(this.dom.clearAll).on("click.dtsps",function(){b.clearSelections()});a.settings()[0]._searchPanes=this};k.prototype._prepViewTotal=function(){for(var a=this.s.filterPane,b=!1,d=0,
c=this.s.panes;d<c.length;d++){var f=c[d];if(void 0!==f.s.dtPane){var h=f.s.dtPane.rows({selected:!0}).data().toArray().length;0<h&&-1===a?(a=f.s.index,b=!0):0<h&&(a=null)}}d=0;for(c=this.s.panes;d<c.length;d++)if(f=c[d],void 0!==f.s.dtPane&&(f.s.filteringActive=!0,-1!==a&&null!==a&&a===f.s.index||!1===b))f.s.filteringActive=!1};k.prototype._updateFilterCount=function(){for(var a=0,b=0,d=this.s.panes;b<d.length;b++){var c=d[b];void 0!==c.s.dtPane&&(a+=c.getPaneCount())}b=this.s.dt.i18n("searchPanes.title",
"Filters Active - %d",a);i(this.dom.title).text(b);void 0!==this.c.filterChanged&&"function"===typeof this.c.filterChanged&&this.c.filterChanged.call(this.s.dt,a)};k.prototype._updateSelection=function(){this.s.selectionList=[];for(var a=0,b=this.s.panes;a<b.length;a++){var d=b[a];void 0!==d.s.dtPane&&this.s.selectionList.push({index:d.s.index,rows:d.s.dtPane.rows({selected:!0}).data().toArray(),protect:!1})}this.s.dt.state.save()};k.version="1.2.1";k.classes={clear:"dtsp-clear",clearAll:"dtsp-clearAll",
container:"dtsp-searchPanes",emptyMessage:"dtsp-emptyMessage",hide:"dtsp-hidden",panes:"dtsp-panesContainer",search:"dtsp-search",title:"dtsp-title",titleRow:"dtsp-titleRow"};k.defaults={cascadePanes:!1,clear:!0,container:function(a){return a.table().container()},columns:[],filterChanged:void 0,layout:"columns-3",order:[],panes:[],viewTotal:!1};u=k;var v=function(a,b,d){function c(a,b){void 0===b&&(b=!1);var c=new f.Api(a),d=c.init().searchPanes||f.defaults.searchPanes;return(new u(c,d,b)).getNode()}
g=a;s=a.fn.dataTable;i=a;var f=r=a.fn.dataTable;a.fn.dataTable.SearchPanes=u;a.fn.DataTable.SearchPanes=u;a.fn.dataTable.SearchPane=t;a.fn.DataTable.SearchPane=t;b=a.fn.dataTable.Api.register;b("searchPanes()",function(){return this});b("searchPanes.clearSelections()",function(){return this.iterator("table",function(a){a._searchPanes&&a._searchPanes.clearSelections()})});b("searchPanes.rebuildPane()",function(a,b){return this.iterator("table",function(c){c._searchPanes&&c._searchPanes.rebuild(a,b)})});
b("searchPanes.container()",function(){var a=this.context[0];return a._searchPanes?a._searchPanes.getNode():null});a.fn.dataTable.ext.buttons.searchPanesClear={text:"Clear Panes",action:function(a,b){b.searchPanes.clearSelections()}};a.fn.dataTable.ext.buttons.searchPanes={action:function(a,b,c,d){a.stopPropagation();this.popover(d._panes.getNode(),{align:"dt-container"});d._panes.rebuild(void 0,!0)},config:{},init:function(b,c,d){var f=new a.fn.dataTable.SearchPanes(b,a.extend({filterChanged:function(a){b.button(c).text(b.i18n("searchPanes.collapse",
{"0":"SearchPanes",_:"SearchPanes (%d)"},a))}},d.config)),g=b.i18n("searchPanes.collapse","SearchPanes",0);b.button(c).text(g);d._panes=f},text:"Search Panes"};a(d).on("preInit.dt.dtsp",function(a,b){if("dt"===a.namespace&&(b.oInit.searchPanes||f.defaults.searchPanes))b._searchPanes||c(b,!0)});f.ext.feature.push({cFeature:"P",fnInit:c});f.ext.features&&f.ext.features.register("searchPanes",c)};"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return v(a,window,
document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net")(a,b).$;return v(b,a,a.document)}:v(window.jQuery,window,document)})();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.getGlobal=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var q=0;q<n.length;++q){var l=n[q];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.checkEs6ConformanceViaProxy=function(){try{var n={},q=Object.create(new $jscomp.global.Proxy(n,{get:function(l,r,t){return l==n&&"q"==r&&t==q}}));return!0===q.q}catch(l){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.arrayIteratorImpl=function(n){var q=0;return function(){return q<n.length?{done:!1,value:n[q++]}:{done:!0}}};$jscomp.arrayIterator=function(n){return{next:$jscomp.arrayIteratorImpl(n)}};
$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(n,q,l){if(n==Array.prototype||n==Object.prototype)return n;n[q]=l.value;return n};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;
$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(n,q){var l=$jscomp.propertyToPolyfillSymbol[q];if(null==l)return n[q];l=n[l];return void 0!==l?l:n[q]};$jscomp.polyfill=function(n,q,l,r){q&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(n,q,l,r):$jscomp.polyfillUnisolated(n,q,l,r))};
$jscomp.polyfillUnisolated=function(n,q,l,r){l=$jscomp.global;n=n.split(".");for(r=0;r<n.length-1;r++){var t=n[r];if(!(t in l))return;l=l[t]}n=n[n.length-1];r=l[n];q=q(r);q!=r&&null!=q&&$jscomp.defineProperty(l,n,{configurable:!0,writable:!0,value:q})};
$jscomp.polyfillIsolated=function(n,q,l,r){var t=n.split(".");n=1===t.length;r=t[0];r=!n&&r in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var v=0;v<t.length-1;v++){var A=t[v];if(!(A in r))return;r=r[A]}t=t[t.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?r[t]:null;q=q(l);null!=q&&(n?$jscomp.defineProperty($jscomp.polyfills,t,{configurable:!0,writable:!0,value:q}):q!==l&&($jscomp.propertyToPolyfillSymbol[t]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(t):$jscomp.POLYFILL_PREFIX+t,t=
$jscomp.propertyToPolyfillSymbol[t],$jscomp.defineProperty(r,t,{configurable:!0,writable:!0,value:q})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(n){if(n)return n;var q=function(t,v){this.$jscomp$symbol$id_=t;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:v})};q.prototype.toString=function(){return this.$jscomp$symbol$id_};var l=0,r=function(t){if(this instanceof r)throw new TypeError("Symbol is not a constructor");return new q("jscomp_symbol_"+(t||"")+"_"+l++,t)};return r},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol.iterator",function(n){if(n)return n;n=Symbol("Symbol.iterator");for(var q="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),l=0;l<q.length;l++){var r=$jscomp.global[q[l]];"function"===typeof r&&"function"!=typeof r.prototype[n]&&$jscomp.defineProperty(r.prototype,n,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return n},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(n){n={next:n};n[Symbol.iterator]=function(){return this};return n};$jscomp.makeIterator=function(n){var q="undefined"!=typeof Symbol&&Symbol.iterator&&n[Symbol.iterator];return q?q.call(n):$jscomp.arrayIterator(n)};$jscomp.owns=function(n,q){return Object.prototype.hasOwnProperty.call(n,q)};
$jscomp.polyfill("WeakMap",function(n){function q(){if(!n||!Object.seal)return!1;try{var a=Object.seal({}),b=Object.seal({}),c=new n([[a,2],[b,3]]);if(2!=c.get(a)||3!=c.get(b))return!1;c.delete(a);c.set(b,4);return!c.has(a)&&4==c.get(b)}catch(e){return!1}}function l(){}function r(a){var b=typeof a;return"object"===b&&null!==a||"function"===b}function t(a){if(!$jscomp.owns(a,A)){var b=new l;$jscomp.defineProperty(a,A,{value:b})}}function v(a){if(!$jscomp.ISOLATE_POLYFILLS){var b=Object[a];b&&(Object[a]=
function(c){if(c instanceof l)return c;Object.isExtensible(c)&&t(c);return b(c)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(n&&$jscomp.ES6_CONFORMANCE)return n}else if(q())return n;var A="$jscomp_hidden_"+Math.random();v("freeze");v("preventExtensions");v("seal");var F=0,h=function(a){this.id_=(F+=Math.random()+1).toString();if(a){a=$jscomp.makeIterator(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}};h.prototype.set=function(a,b){if(!r(a))throw Error("Invalid WeakMap key");
t(a);if(!$jscomp.owns(a,A))throw Error("WeakMap key fail: "+a);a[A][this.id_]=b;return this};h.prototype.get=function(a){return r(a)&&$jscomp.owns(a,A)?a[A][this.id_]:void 0};h.prototype.has=function(a){return r(a)&&$jscomp.owns(a,A)&&$jscomp.owns(a[A],this.id_)};h.prototype.delete=function(a){return r(a)&&$jscomp.owns(a,A)&&$jscomp.owns(a[A],this.id_)?delete a[A][this.id_]:!1};return h},"es6","es3");$jscomp.MapEntry=function(){};
$jscomp.polyfill("Map",function(n){function q(){if($jscomp.ASSUME_NO_NATIVE_MAP||!n||"function"!=typeof n||!n.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),a=new n($jscomp.makeIterator([[h,"s"]]));if("s"!=a.get(h)||1!=a.size||a.get({x:4})||a.set({x:4},"t")!=a||2!=a.size)return!1;var b=a.entries(),c=b.next();if(c.done||c.value[0]!=h||"s"!=c.value[1])return!1;c=b.next();return c.done||4!=c.value[0].x||"t"!=c.value[1]||!b.next().done?!1:!0}catch(e){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(n&&$jscomp.ES6_CONFORMANCE)return n}else if(q())return n;var l=new WeakMap,r=function(h){this.data_={};this.head_=A();this.size=0;if(h){h=$jscomp.makeIterator(h);for(var a;!(a=h.next()).done;)a=a.value,this.set(a[0],a[1])}};r.prototype.set=function(h,a){h=0===h?0:h;var b=t(this,h);b.list||(b.list=this.data_[b.id]=[]);b.entry?b.entry.value=a:(b.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:h,value:a},b.list.push(b.entry),
this.head_.previous.next=b.entry,this.head_.previous=b.entry,this.size++);return this};r.prototype.delete=function(h){h=t(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.data_[h.id],h.entry.previous.next=h.entry.next,h.entry.next.previous=h.entry.previous,h.entry.head=null,this.size--,!0):!1};r.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=A();this.size=0};r.prototype.has=function(h){return!!t(this,h).entry};r.prototype.get=function(h){return(h=
t(this,h).entry)&&h.value};r.prototype.entries=function(){return v(this,function(h){return[h.key,h.value]})};r.prototype.keys=function(){return v(this,function(h){return h.key})};r.prototype.values=function(){return v(this,function(h){return h.value})};r.prototype.forEach=function(h,a){for(var b=this.entries(),c;!(c=b.next()).done;)c=c.value,h.call(a,c[1],c[0],this)};r.prototype[Symbol.iterator]=r.prototype.entries;var t=function(h,a){var b=a&&typeof a;"object"==b||"function"==b?l.has(a)?b=l.get(a):
(b=""+ ++F,l.set(a,b)):b="p_"+a;var c=h.data_[b];if(c&&$jscomp.owns(h.data_,b))for(h=0;h<c.length;h++){var e=c[h];if(a!==a&&e.key!==e.key||a===e.key)return{id:b,list:c,index:h,entry:e}}return{id:b,list:c,index:-1,entry:void 0}},v=function(h,a){var b=h.head_;return $jscomp.iteratorPrototype(function(){if(b){for(;b.head!=h.head_;)b=b.previous;for(;b.next!=b.head;)return b=b.next,{done:!1,value:a(b)};b=null}return{done:!0,value:void 0}})},A=function(){var h={};return h.previous=h.next=h.head=h},F=0;
return r},"es6","es3");$jscomp.findInternal=function(n,q,l){n instanceof String&&(n=String(n));for(var r=n.length,t=0;t<r;t++){var v=n[t];if(q.call(l,v,t,n))return{i:t,v:v}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(n){return n?n:function(q,l){return $jscomp.findInternal(this,q,l).v}},"es6","es3");
$jscomp.iteratorFromArray=function(n,q){n instanceof String&&(n+="");var l=0,r={next:function(){if(l<n.length){var t=l++;return{value:q(t,n[t]),done:!1}}r.next=function(){return{done:!0,value:void 0}};return r.next()}};r[Symbol.iterator]=function(){return r};return r};$jscomp.polyfill("Array.prototype.keys",function(n){return n?n:function(){return $jscomp.iteratorFromArray(this,function(q){return q})}},"es6","es3");
$jscomp.polyfill("Object.is",function(n){return n?n:function(q,l){return q===l?0!==q||1/q===1/l:q!==q&&l!==l}},"es6","es3");$jscomp.polyfill("Array.prototype.includes",function(n){return n?n:function(q,l){var r=this;r instanceof String&&(r=String(r));var t=r.length;l=l||0;for(0>l&&(l=Math.max(l+t,0));l<t;l++){var v=r[l];if(v===q||Object.is(v,q))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(n,q,l){if(null==n)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(q instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return n+""};$jscomp.polyfill("String.prototype.includes",function(n){return n?n:function(q,l){return-1!==$jscomp.checkStringArgs(this,q,"includes").indexOf(q,l||0)}},"es6","es3");
$jscomp.polyfill("Array.prototype.findIndex",function(n){return n?n:function(q,l){return $jscomp.findInternal(this,q,l).i}},"es6","es3");
(function(){function n(h){l=h;r=h.fn.dataTable}function q(h){v=h;A=h.fn.dataTable}var l,r,t=function(){function h(a,b,c,e,d,f){var g=this;void 0===f&&(f=null);if(!r||!r.versionCheck||!r.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!r.select)throw Error("SearchPane requires Select");a=new r.Api(a);this.classes=l.extend(!0,{},h.classes);this.c=l.extend(!0,{},h.defaults,b);void 0!==b&&void 0!==b.hideCount&&void 0===b.viewCount&&(this.c.viewCount=!this.c.hideCount);
this.customPaneSettings=f;this.s={cascadeRegen:!1,clearing:!1,colOpts:[],deselect:!1,displayed:!1,dt:a,dtPane:void 0,filteringActive:!1,firstSet:!0,forceViewTotal:!1,index:c,indexes:[],lastCascade:!1,lastSelect:!1,listSet:!1,name:void 0,redraw:!1,rowData:{arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map,totalOptions:0},scrollTop:0,searchFunction:void 0,selectPresent:!1,serverSelect:[],serverSelecting:!1,showFiltered:!1,tableLength:null,updating:!1};
b=a.columns().eq(0).toArray().length;this.colExists=this.s.index<b;this.c.layout=e;b=parseInt(e.split("-")[1],10);this.dom={buttonGroup:l("<div/>").addClass(this.classes.buttonGroup),clear:l('<button type="button">&#215;</button>').addClass(this.classes.disabledButton).attr("disabled","true").addClass(this.classes.paneButton).addClass(this.classes.clearButton),collapseButton:l('<button type="button"><span class="dtsp-caret">&#x5e;</span></button>').addClass(this.classes.paneButton).addClass(this.classes.collapseButton),
container:l("<div/>").addClass(this.classes.container).addClass(this.classes.layout+(10>b?e:e.split("-")[0]+"-9")),countButton:l('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:l("<table><thead><tr><th>"+(this.colExists?l(a.column(this.colExists?this.s.index:0).header()).text():this.customPaneSettings.header||"Custom Pane")+"</th><th/></tr></thead></table>"),lower:l("<div/>").addClass(this.classes.subRow2).addClass(this.classes.narrowButton),
nameButton:l('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.nameButton),panesContainer:d,searchBox:l("<input/>").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:l('<button type = "button" class="'+this.classes.searchIcon+'"></button>').addClass(this.classes.paneButton),searchCont:l("<div/>").addClass(this.classes.searchCont),searchLabelCont:l("<div/>").addClass(this.classes.searchLabelCont),topRow:l("<div/>").addClass(this.classes.topRow),
upper:l("<div/>").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.displayed=!1;a=this.s.dt;this.selections=[];this.s.colOpts=this.colExists?this._getOptions():this._getBonusOptions();var k=this.s.colOpts;e=l('<button type="button">X</button>').addClass(this.classes.paneButton);e.text(a.i18n("searchPanes.clearPane",this.c.i18n.clearPane));this.dom.container.addClass(k.className);this.dom.container.addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?
this.customPaneSettings.className:"");this.s.name=void 0!==this.s.colOpts.name?this.s.colOpts.name:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.name?this.customPaneSettings.name:this.colExists?l(a.column(this.s.index).header()).text():this.customPaneSettings.header||"Custom Pane";l(d).append(this.dom.container);var p=a.table(0).node();this.s.searchFunction=function(m,x,z,y){if(0===g.selections.length||m.nTable!==p)return!0;m=null;g.colExists&&(m=x[g.s.index],"filter"!==k.orthogonal.filter&&
(m=g.s.rowData.filterMap.get(z),m instanceof l.fn.dataTable.Api&&(m=m.toArray())));return g._search(m,z)};l.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)e.on("click",function(){g.dom.container.find("."+g.classes.search.replace(/\s+/g,".")).each(function(){l(this).val("");l(this).trigger("input")});g.clearPane()});a.on("draw.dtsp",function(){g.adjustTopRow()});a.on("buttons-action",function(){g.adjustTopRow()});a.on("column-reorder.dtsp",function(m,x,z){g.s.index=z.mapping[g.s.index]});
return this}h.prototype.addRow=function(a,b,c,e,d,f,g){for(var k,p=0,m=this.s.indexes;p<m.length;p++){var x=m[p];x.filter===b&&(k=x.index)}void 0===k&&(k=this.s.indexes.length,this.s.indexes.push({filter:b,index:k}));return this.s.dtPane.row.add({className:g,display:""!==a?a:this.emptyMessage(),filter:b,index:k,shown:c,sort:d,total:e,type:f})};h.prototype.adjustTopRow=function(){var a=this.dom.container.find("."+this.classes.subRowsContainer.replace(/\s+/g,".")),b=this.dom.container.find("."+this.classes.subRow1.replace(/\s+/g,
".")),c=this.dom.container.find("."+this.classes.subRow2.replace(/\s+/g,".")),e=this.dom.container.find("."+this.classes.topRow.replace(/\s+/g,"."));(252>l(a[0]).width()||252>l(e[0]).width())&&0!==l(a[0]).width()?(l(a[0]).addClass(this.classes.narrow),l(b[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),l(c[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):(l(a[0]).removeClass(this.classes.narrow),l(b[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch),
l(c[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};h.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map,totalOptions:0}};h.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();this.updateTable();return this};h.prototype.collapse=function(){var a=this;this.s.displayed&&(this.c.collapse||!0===this.s.colOpts.collapse)&&!1!==this.s.colOpts.collapse&&(this.dom.collapseButton.addClass(this.classes.rotated),
l(this.s.dtPane.table().container()).addClass(this.classes.hidden),this.dom.topRow.addClass(this.classes.bordered),this.dom.countButton.addClass(this.classes.disabledButton),this.dom.nameButton.addClass(this.classes.disabledButton),this.dom.searchButton.addClass(this.classes.disabledButton),this.dom.topRow.one("click",function(){a.show()}))};h.prototype.destroy=function(){void 0!==this.s.dtPane&&this.s.dtPane.off(".dtsp");this.dom.nameButton.off(".dtsp");this.dom.collapseButton.off(".dtsp");this.dom.countButton.off(".dtsp");
this.dom.clear.off(".dtsp");this.dom.searchButton.off(".dtsp");this.dom.container.remove();for(var a=l.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==a;)l.fn.dataTable.ext.search.splice(a,1),a=l.fn.dataTable.ext.search.indexOf(this.s.searchFunction);void 0!==this.s.dtPane&&this.s.dtPane.destroy();this.s.listSet=!1};h.prototype.emptyMessage=function(){var a=this.c.i18n.emptyMessage;this.c.emptyMessage&&(a=this.c.emptyMessage);!1!==this.s.colOpts.emptyMessage&&null!==this.s.colOpts.emptyMessage&&
(a=this.s.colOpts.emptyMessage);return this.s.dt.i18n("searchPanes.emptyMessage",a)};h.prototype.getPaneCount=function(){return void 0!==this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:0};h.prototype.rebuildPane=function(a,b,c,e){void 0===a&&(a=!1);void 0===b&&(b=null);void 0===c&&(c=null);void 0===e&&(e=!1);this.clearData();var d=[];this.s.serverSelect=[];var f=null;void 0!==this.s.dtPane&&(e&&(this.s.dt.page.info().serverSide?this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray():
d=this.s.dtPane.rows({selected:!0}).data().toArray()),this.s.dtPane.clear().destroy(),f=this.dom.container.prev(),this.destroy(),this.s.dtPane=void 0,l.fn.dataTable.ext.search.push(this.s.searchFunction));this.dom.container.removeClass(this.classes.hidden);this.s.displayed=!1;this._buildPane(this.s.dt.page.info().serverSide?this.s.serverSelect:d,a,b,c,f);return this};h.prototype.removePane=function(){this.s.displayed=!1;this.dom.container.hide()};h.prototype.resize=function(a){this.c.layout=a;var b=
parseInt(a.split("-")[1],10);this.dom.container.removeClass().addClass(this.classes.container).addClass(this.classes.layout+(10>b?a:a.split("-")[0]+"-9")).addClass(this.s.colOpts.className).addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?this.customPaneSettings.className:"").addClass(this.classes.show);this.adjustTopRow()};h.prototype.setCascadeRegen=function(a){this.s.cascadeRegen=a};h.prototype.setClear=function(a){this.s.clearing=a};h.prototype.show=function(){this.s.displayed&&
(this.dom.collapseButton.removeClass(this.classes.rotated),l(this.s.dtPane.table().container()).removeClass(this.classes.hidden),this.dom.topRow.removeClass(this.classes.bordered),this.dom.countButton.removeClass(this.classes.disabledButton),this.dom.nameButton.removeClass(this.classes.disabledButton),this.dom.searchButton.removeClass(this.classes.disabledButton))};h.prototype.updatePane=function(a){void 0===a&&(a=!1);this.s.updating=!0;this._updateCommon(a);this.s.updating=!1};h.prototype.updateTable=
function(){this.selections=this.s.dtPane.rows({selected:!0}).data().toArray();this._searchExtras();(this.c.cascadePanes||this.c.viewTotal)&&this.updatePane()};h.prototype._setListeners=function(){var a=this,b=this.s.rowData,c;this.s.dtPane.off("select.dtsp");this.s.dtPane.on("select.dtsp",function(){clearTimeout(c);a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.scrollTop=l(a.s.dtPane.table().node()).parent()[0].scrollTop,
a.s.selectPresent=!0,a.s.dt.draw(!1)):a.s.updating||(a.s.selectPresent=!0,a._makeSelection(),a.s.selectPresent=!1);a.dom.clear.removeClass(a.classes.disabledButton).removeAttr("disabled")});this.s.dtPane.off("deselect.dtsp");this.s.dtPane.on("deselect.dtsp",function(){c=setTimeout(function(){a.s.scrollTop=l(a.s.dtPane.table().node()).parent()[0].scrollTop;a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.deselect=
!0,a.s.dt.draw(!1)):(a.s.deselect=!0,a._makeSelection(),a.s.deselect=!1);0===a.s.dtPane.rows({selected:!0}).data().toArray().length&&a.dom.clear.addClass(a.classes.disabledButton).attr("disabled","true")},50)});this.s.firstSet&&(this.s.firstSet=!1,this.s.dt.on("stateSaveParams.dtsp",function(e,d,f){if(l.isEmptyObject(f))a.s.dtPane.state.clear();else{e=[];if(void 0!==a.s.dtPane){e=a.s.dtPane.rows({selected:!0}).data().map(function(z){return z.filter.toString()}).toArray();var g=a.dom.searchBox.val();
var k=a.s.dtPane.order();var p=b.binsOriginal;var m=b.arrayOriginal;var x=a.dom.collapseButton.hasClass(a.classes.rotated)}void 0===f.searchPanes&&(f.searchPanes={});void 0===f.searchPanes.panes&&(f.searchPanes.panes=[]);for(d=0;d<f.searchPanes.panes.length;d++)f.searchPanes.panes[d].id===a.s.index&&(f.searchPanes.panes.splice(d,1),d--);f.searchPanes.panes.push({arrayFilter:m,bins:p,collapsed:x,id:a.s.index,order:k,searchTerm:g,selected:e})}}));this.s.dtPane.off("user-select.dtsp");this.s.dtPane.on("user-select.dtsp",
function(e,d,f,g,k){k.stopPropagation()});this.s.dtPane.off("draw.dtsp");this.s.dtPane.on("draw.dtsp",function(){a.adjustTopRow()});this.dom.nameButton.off("click.dtsp");this.dom.nameButton.on("click.dtsp",function(){var e=a.s.dtPane.order()[0][1];a.s.dtPane.order([0,"asc"===e?"desc":"asc"]).draw();a.s.dt.state.save()});this.dom.countButton.off("click.dtsp");this.dom.countButton.on("click.dtsp",function(){var e=a.s.dtPane.order()[0][1];a.s.dtPane.order([1,"asc"===e?"desc":"asc"]).draw();a.s.dt.state.save()});
this.dom.collapseButton.off("click.dtsp");this.dom.collapseButton.on("click.dtsp",function(e){e.stopPropagation();e=l(a.s.dtPane.table().container());a.dom.collapseButton.toggleClass(a.classes.rotated);e.toggleClass(a.classes.hidden);a.dom.topRow.toggleClass(a.classes.bordered);a.dom.countButton.toggleClass(a.classes.disabledButton);a.dom.nameButton.toggleClass(a.classes.disabledButton);a.dom.searchButton.toggleClass(a.classes.disabledButton);if(e.hasClass(a.classes.hidden))a.dom.topRow.on("click",
function(){return a.dom.collapseButton.click()});else a.dom.topRow.off("click");a.s.dt.state.save()});this.dom.clear.off("click.dtsp");this.dom.clear.on("click.dtsp",function(){a.dom.container.find("."+a.classes.search.replace(/ /g,".")).each(function(){l(this).val("");l(this).trigger("input")});a.clearPane()});this.dom.searchButton.off("click.dtsp");this.dom.searchButton.on("click.dtsp",function(){a.dom.searchBox.focus()});this.dom.searchBox.off("click.dtsp");this.dom.searchBox.on("input.dtsp",function(){var e=
a.dom.searchBox.val();a.s.dtPane.search(e).draw();"string"===typeof e&&(0<e.length||0===e.length&&0<a.s.dtPane.rows({selected:!0}).data().toArray().length)?a.dom.clear.removeClass(a.classes.disabledButton).removeAttr("disabled"):a.dom.clear.addClass(a.classes.disabledButton).attr("disabled","true");a.s.dt.state.save()});return!0};h.prototype._addOption=function(a,b,c,e,d,f){if(Array.isArray(a)||a instanceof r.Api)if(a instanceof r.Api&&(a=a.toArray(),b=b.toArray()),a.length===b.length)for(var g=0;g<
a.length;g++)f[a[g]]?f[a[g]]++:(f[a[g]]=1,d.push({display:b[g],filter:a[g],sort:c[g],type:e[g]})),this.s.rowData.totalOptions++;else throw Error("display and filter not the same length");else"string"===typeof this.s.colOpts.orthogonal?(f[a]?f[a]++:(f[a]=1,d.push({display:b,filter:a,sort:c,type:e})),this.s.rowData.totalOptions++):d.push({display:b,filter:a,sort:c,type:e})};h.prototype._buildPane=function(a,b,c,e,d){var f=this;void 0===a&&(a=[]);void 0===b&&(b=!1);void 0===c&&(c=null);void 0===e&&(e=
null);void 0===d&&(d=null);this.selections=[];var g=this.s.dt,k=g.column(this.colExists?this.s.index:0),p=this.s.colOpts,m=this.s.rowData,x=g.i18n("searchPanes.count",this.c.i18n.count),z=g.i18n("searchPanes.countFiltered",this.c.i18n.countFiltered),y=g.state.loaded();this.s.listSet&&(y=g.state());if(this.colExists){var w=-1;if(y&&y.searchPanes&&y.searchPanes.panes)for(var u=0;u<y.searchPanes.panes.length;u++)if(y.searchPanes.panes[u].id===this.s.index){w=u;break}if((!1===p.show||void 0!==p.show&&
!0!==p.show)&&-1===w)return this.dom.container.addClass(this.classes.hidden),this.s.displayed=!1;if(!0===p.show||-1!==w)this.s.displayed=!0;if(!this.s.dt.page.info().serverSide&&(null===c||null===c.searchPanes||null===c.searchPanes.options)){0===m.arrayFilter.length&&(this._populatePane(b),this.s.rowData.totalOptions=0,this._detailsPane(),m.arrayOriginal=m.arrayTotals,m.binsOriginal=m.binsTotal);u=Object.keys(m.binsOriginal).length;b=this._uniqueRatio(u,g.rows()[0].length);if(!1===this.s.displayed&&
((void 0===p.show&&null===p.threshold?b>this.c.threshold:b>p.threshold)||!0!==p.show&&1>=u)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.c.viewTotal&&0===m.arrayTotals.length?(this.s.rowData.totalOptions=0,this._detailsPane()):m.binsTotal=m.bins;this.dom.container.addClass(this.classes.show);this.s.displayed=!0}else if(null!==c&&null!==c.searchPanes&&null!==c.searchPanes.options){if(void 0!==c.tableLength)this.s.tableLength=c.tableLength,this.s.rowData.totalOptions=
this.s.tableLength;else if(null===this.s.tableLength||g.rows()[0].length>this.s.tableLength)this.s.tableLength=g.rows()[0].length,this.s.rowData.totalOptions=this.s.tableLength;b=g.column(this.s.index).dataSrc();if(void 0!==c.searchPanes.options[b])for(u=0,b=c.searchPanes.options[b];u<b.length;u++)w=b[u],this.s.rowData.arrayFilter.push({display:w.label,filter:w.value,sort:w.label,type:w.label}),this.s.rowData.bins[w.value]=this.c.viewTotal||this.c.cascadePanes?w.count:w.total,this.s.rowData.binsTotal[w.value]=
w.total;u=Object.keys(m.binsTotal).length;b=this._uniqueRatio(u,this.s.tableLength);if(!1===this.s.displayed&&((void 0===p.show&&null===p.threshold?b>this.c.threshold:b>p.threshold)||!0!==p.show&&1>=u)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.s.rowData.arrayOriginal=this.s.rowData.arrayFilter;this.s.rowData.binsOriginal=this.s.rowData.bins;this.s.displayed=!0}}else this.s.displayed=!0;this._displayPane();if(!this.s.listSet)this.dom.dtP.on("stateLoadParams.dt",
function(C,G,D){l.isEmptyObject(g.state.loaded())&&l.each(D,function(E,I){delete D[E]})});null!==d&&0<this.dom.panesContainer.has(d).length?this.dom.container.insertAfter(d):this.dom.panesContainer.prepend(this.dom.container);u=l.fn.dataTable.ext.errMode;l.fn.dataTable.ext.errMode="none";d=r.Scroller;this.s.dtPane=this.dom.dtP.DataTable(l.extend(!0,{columnDefs:[{className:"dtsp-nameColumn",data:"display",render:function(C,G,D){if("sort"===G)return D.sort;if("type"===G)return D.type;var E=(f.s.filteringActive||
f.s.showFiltered)&&f.c.viewTotal||f.c.viewTotal&&f.s.forceViewTotal?z.replace(/{total}/,D.total):x.replace(/{total}/,D.total);for(E=E.replace(/{shown}/,D.shown);E.includes("{total}");)E=E.replace(/{total}/,D.total);for(;E.includes("{shown}");)E=E.replace(/{shown}/,D.shown);D='<span class="'+f.classes.pill+'">'+E+"</span>";f.c.viewCount&&p.viewCount||(D="");return"filter"===G?"string"===typeof C&&null!==C.match(/<[^>]*>/)?C.replace(/<[^>]*>/g,""):C:'<div class="'+f.classes.nameCont+'"><span title="'+
("string"===typeof C&&null!==C.match(/<[^>]*>/)?C.replace(/<[^>]*>/g,""):C)+'" class="'+f.classes.name+'">'+C+"</span>"+D+"</div>"},targets:0,type:void 0!==g.settings()[0].aoColumns[this.s.index]?g.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+this.classes.badgePill,data:"shown",orderData:[1,2],searchable:!1,targets:1,visible:!1},{data:"total",searchable:!1,targets:2,visible:!1}],deferRender:!0,dom:"t",info:!1,language:this.s.dt.settings()[0].oLanguage,paging:d?
!0:!1,scrollX:!1,scrollY:"200px",scroller:d?!0:!1,select:!0,stateSave:g.settings()[0].oFeatures.bStateSave?!0:!1},this.c.dtOpts,void 0!==p?p.dtOpts:{},void 0===this.s.colOpts.options&&this.colExists?void 0:{createdRow:function(C,G,D){l(C).addClass(G.className)}},null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts?this.customPaneSettings.dtOpts:{},l.fn.dataTable.versionCheck("2")?{layout:{bottomLeft:null,bottomRight:null,topLeft:null,topRight:null}}:{}));this.dom.dtP.addClass(this.classes.table);
d="Custom Pane";this.customPaneSettings&&this.customPaneSettings.header?d=this.customPaneSettings.header:p.header?d=p.header:this.colExists&&(d=l.fn.dataTable.versionCheck("2")?g.column(this.s.index).title():g.settings()[0].aoColumns[this.s.index].sTitle);this.dom.searchBox.attr("placeholder",d);l.fn.dataTable.select.init(this.s.dtPane);l.fn.dataTable.ext.errMode=u;if(this.colExists){k=(k=k.search())?k.substr(1,k.length-2).split("|"):[];var B=0;m.arrayFilter.forEach(function(C){""===C.filter&&B++});
u=0;for(d=m.arrayFilter.length;u<d;u++){k=!1;w=0;for(var H=this.s.serverSelect;w<H.length;w++)b=H[w],b.filter===m.arrayFilter[u].filter&&(k=!0);if(this.s.dt.page.info().serverSide&&(!this.c.cascadePanes||this.c.cascadePanes&&0!==m.bins[m.arrayFilter[u].filter]||this.c.cascadePanes&&null!==e||k))for(k=this.addRow(m.arrayFilter[u].display,m.arrayFilter[u].filter,e?m.binsTotal[m.arrayFilter[u].filter]:m.bins[m.arrayFilter[u].filter],this.c.viewTotal||e?String(m.binsTotal[m.arrayFilter[u].filter]):m.bins[m.arrayFilter[u].filter],
m.arrayFilter[u].sort,m.arrayFilter[u].type),w=0,H=this.s.serverSelect;w<H.length;w++)b=H[w],b.filter===m.arrayFilter[u].filter&&(this.s.serverSelecting=!0,k.select(),this.s.serverSelecting=!1);else this.s.dt.page.info().serverSide||!m.arrayFilter[u]||void 0===m.bins[m.arrayFilter[u].filter]&&this.c.cascadePanes?this.s.dt.page.info().serverSide||this.addRow("",B,B,"","",""):this.addRow(m.arrayFilter[u].display,m.arrayFilter[u].filter,m.bins[m.arrayFilter[u].filter],m.binsTotal[m.arrayFilter[u].filter],
m.arrayFilter[u].sort,m.arrayFilter[u].type)}}r.select.init(this.s.dtPane);(void 0!==p.options||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options)&&this._getComparisonRows();this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=this.s.scrollTop;this.adjustTopRow();this.s.listSet||(this._setListeners(),this.s.listSet=!0);for(e=0;e<a.length;e++)if(m=a[e],void 0!==m)for(u=0,d=this.s.dtPane.rows().indexes().toArray();u<d.length;u++)k=d[u],void 0!==this.s.dtPane.row(k).data()&&
m.filter===this.s.dtPane.row(k).data().filter&&(this.s.dt.page.info().serverSide?(this.s.serverSelecting=!0,this.s.dtPane.row(k).select(),this.s.serverSelecting=!1):this.s.dtPane.row(k).select());this.s.dt.page.info().serverSide&&this.s.dtPane.search(this.dom.searchBox.val()).draw();(this.c.initCollapsed&&!1!==this.s.colOpts.initCollapsed||this.s.colOpts.initCollapsed)&&(this.c.collapse&&!1!==this.s.colOpts.collapse||this.s.colOpts.collapse)&&this.collapse();if(y&&y.searchPanes&&y.searchPanes.panes&&
(null===c||1===c.draw))for(this.c.cascadePanes||this._reloadSelect(y),c=0,y=y.searchPanes.panes;c<y.length;c++)a=y[c],a.id===this.s.index&&(a.searchTerm&&0<a.searchTerm.length&&(this.dom.searchBox.val(a.searchTerm),this.dom.searchBox.trigger("input")),this.s.dtPane.order(a.order).draw(),a.collapsed?this.collapse():this.show());return!0};h.prototype._detailsPane=function(){var a=this.s.dt;this.s.rowData.arrayTotals=[];this.s.rowData.binsTotal={};var b=this.s.dt.settings()[0];a=a.rows().indexes();if(!this.s.dt.page.info().serverSide)for(var c=
0;c<a.length;c++)this._populatePaneArray(a[c],this.s.rowData.arrayTotals,b,this.s.rowData.binsTotal)};h.prototype._displayPane=function(){var a=this.dom.container,b=this.s.colOpts,c=parseInt(this.c.layout.split("-")[1],10);this.dom.topRow.empty();this.dom.dtP.empty();this.dom.topRow.addClass(this.classes.topRow);3<c&&this.dom.container.addClass(this.classes.smallGap);this.dom.topRow.addClass(this.classes.subRowsContainer);this.dom.upper.appendTo(this.dom.topRow);this.dom.lower.appendTo(this.dom.topRow);
this.dom.searchCont.appendTo(this.dom.upper);this.dom.buttonGroup.appendTo(this.dom.lower);(!1===this.c.dtOpts.searching||void 0!==b.dtOpts&&!1===b.dtOpts.searching||!this.c.controls||!b.controls||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&!this.customPaneSettings.dtOpts.searching)&&this.dom.searchBox.removeClass(this.classes.paneInputButton).addClass(this.classes.disabledButton).attr("disabled","true");this.dom.searchBox.appendTo(this.dom.searchCont);
this._searchContSetup();this.c.clear&&this.c.controls&&b.controls&&this.dom.clear.appendTo(this.dom.buttonGroup);this.c.orderable&&b.orderable&&this.c.controls&&b.controls&&this.dom.nameButton.appendTo(this.dom.buttonGroup);this.c.viewCount&&b.viewCount&&this.c.orderable&&b.orderable&&this.c.controls&&b.controls&&this.dom.countButton.appendTo(this.dom.buttonGroup);(this.c.collapse&&!1!==this.s.colOpts.collapse||this.s.colOpts.collapse)&&this.c.controls&&b.controls&&this.dom.collapseButton.appendTo(this.dom.buttonGroup);
this.dom.topRow.prependTo(this.dom.container);a.append(this.dom.dtP);a.show()};h.prototype._getBonusOptions=function(){return l.extend(!0,{},h.defaults,{orthogonal:{threshold:null},threshold:null},void 0!==this.c?this.c:{})};h.prototype._getComparisonRows=function(){var a=this.s.colOpts;a=void 0!==a.options?a.options:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options?this.customPaneSettings.options:void 0;if(void 0!==a){var b=this.s.dt.rows({search:"applied"}).data().toArray(),
c=this.s.dt.rows({search:"applied"}),e=this.s.dt.rows().data().toArray(),d=this.s.dt.rows(),f=[];this.s.dtPane.clear();for(var g=0;g<a.length;g++){var k=a[g],p=""!==k.label?k.label:this.emptyMessage(),m=k.className,x=p,z="function"===typeof k.value?k.value:[],y=0,w=p,u=0;if("function"===typeof k.value){for(var B=0;B<b.length;B++)k.value.call(this.s.dt,b[B],c[0][B])&&y++;for(B=0;B<e.length;B++)k.value.call(this.s.dt,e[B],d[0][B])&&u++;"function"!==typeof z&&z.push(k.filter)}(!this.c.cascadePanes||
this.c.cascadePanes&&0!==y)&&f.push(this.addRow(x,z,y,u,w,p,m))}return f}};h.prototype._getOptions=function(){var a=this.s.dt.settings()[0].aoColumns[this.s.index].searchPanes,b=l.extend(!0,{},h.defaults,{collapse:null,emptyMessage:!1,initCollapsed:null,orthogonal:{threshold:null},threshold:null},a);void 0!==a&&void 0!==a.hideCount&&void 0===a.viewCount&&(b.viewCount=!a.hideCount);return b};h.prototype._makeSelection=function(){this.updateTable();this.s.updating=!0;this.s.dt.draw();this.s.updating=
!1};h.prototype._populatePane=function(a){void 0===a&&(a=!1);var b=this.s.dt;this.s.rowData.arrayFilter=[];this.s.rowData.bins={};var c=this.s.dt.settings()[0];if(!this.s.dt.page.info().serverSide){var e=0;for(a=(!this.c.cascadePanes&&!this.c.viewTotal||this.s.clearing||a?b.rows().indexes():b.rows({search:"applied"}).indexes()).toArray();e<a.length;e++)this._populatePaneArray(a[e],this.s.rowData.arrayFilter,c)}};h.prototype._populatePaneArray=function(a,b,c,e){void 0===e&&(e=this.s.rowData.bins);
var d=this.s.colOpts;if("string"===typeof d.orthogonal)c=c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal),this.s.rowData.filterMap.set(a,c),this._addOption(c,c,c,c,b,e);else{var f=c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.search);null===f&&(f="");"string"===typeof f&&(f=f.replace(/<[^>]*>/g,""));this.s.rowData.filterMap.set(a,f);e[f]?e[f]++:(e[f]=1,this._addOption(f,c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.display),c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.sort),
c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.type),b,e));this.s.rowData.totalOptions++}};h.prototype._reloadSelect=function(a){if(void 0!==a){for(var b,c=0;c<a.searchPanes.panes.length;c++)if(a.searchPanes.panes[c].id===this.s.index){b=c;break}if(void 0!==b){c=this.s.dtPane;var e=c.rows({order:"index"}).data().map(function(g){return null!==g.filter?g.filter.toString():null}).toArray(),d=0;for(a=a.searchPanes.panes[b].selected;d<a.length;d++){b=a[d];var f=-1;null!==b&&(f=e.indexOf(b.toString()));
-1<f&&(this.s.serverSelecting=!0,c.row(f).select(),this.s.serverSelecting=!1)}}}};h.prototype._search=function(a,b){for(var c=this.s.colOpts,e=this.s.dt,d=0,f=this.selections;d<f.length;d++){var g=f[d];"string"===typeof g.filter&&"string"===typeof a&&(g.filter=g.filter.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"'));if(Array.isArray(a)){if(a.includes(g.filter))return!0}else if("function"===typeof g.filter)if(g.filter.call(e,e.row(b).data(),b)){if("or"===c.combiner)return!0}else{if("and"===
c.combiner)return!1}else if(a===g.filter||("string"!==typeof a||0!==a.length)&&a==g.filter||null===g.filter&&"string"===typeof a&&""===a)return!0}return"and"===c.combiner?!0:!1};h.prototype._searchContSetup=function(){this.c.controls&&this.s.colOpts.controls&&this.dom.searchButton.appendTo(this.dom.searchLabelCont);!1===this.c.dtOpts.searching||!1===this.s.colOpts.dtOpts.searching||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&
!this.customPaneSettings.dtOpts.searching||this.dom.searchLabelCont.appendTo(this.dom.searchCont)};h.prototype._searchExtras=function(){var a=this.s.updating;this.s.updating=!0;var b=this.s.dtPane.rows({selected:!0}).data().pluck("filter").toArray(),c=b.indexOf(this.emptyMessage()),e=l(this.s.dtPane.table().container());-1<c&&(b[c]="");0<b.length?e.addClass(this.classes.selected):0===b.length&&e.removeClass(this.classes.selected);this.s.updating=a};h.prototype._uniqueRatio=function(a,b){return 0<
b&&(0<this.s.rowData.totalOptions&&!this.s.dt.page.info().serverSide||this.s.dt.page.info().serverSide&&0<this.s.tableLength)?a/this.s.rowData.totalOptions:1};h.prototype._updateCommon=function(a){void 0===a&&(a=!1);if(!(this.s.dt.page.info().serverSide||void 0===this.s.dtPane||this.s.filteringActive&&!this.c.cascadePanes&&!0!==a||!0===this.c.cascadePanes&&!0===this.s.selectPresent||this.s.lastSelect&&this.s.lastCascade)){a=this.s.colOpts;var b=this.s.dtPane.rows({selected:!0}).data().toArray(),c=
this.s.rowData;this.s.dtPane.clear();if(this.colExists){0===c.arrayFilter.length?this._populatePane(!this.s.filteringActive):this.c.cascadePanes&&this.s.dt.rows().data().toArray().length===this.s.dt.rows({search:"applied"}).data().toArray().length?(c.arrayFilter=c.arrayOriginal,c.bins=c.binsOriginal):(this.c.viewTotal||this.c.cascadePanes)&&this._populatePane(!this.s.filteringActive);this.c.viewTotal?this._detailsPane():c.binsTotal=c.bins;this.c.viewTotal&&!this.c.cascadePanes&&(c.arrayFilter=c.arrayTotals);
for(var e=function(k){if(k&&(void 0!==c.bins[k.filter]&&0!==c.bins[k.filter]&&d.c.cascadePanes||!d.c.cascadePanes||d.s.clearing)){var p=d.addRow(k.display,k.filter,d.c.viewTotal?void 0!==c.bins[k.filter]?c.bins[k.filter]:0:c.bins[k.filter],d.c.viewTotal?String(c.binsTotal[k.filter]):c.bins[k.filter],k.sort,k.type),m=b.findIndex(function(x){return x.filter===k.filter});-1!==m&&(p.select(),b.splice(m,1))}},d=this,f=0,g=c.arrayFilter;f<g.length;f++)e(g[f])}if(void 0!==a.searchPanes&&void 0!==a.searchPanes.options||
void 0!==a.options||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options)for(e=function(k){var p=b.findIndex(function(m){if(m.display===k.data().display)return!0});-1!==p&&(k.select(),b.splice(p,1))},f=0,g=this._getComparisonRows();f<g.length;f++)a=g[f],e(a);for(e=0;e<b.length;e++)a=b[e],a=this.addRow(a.display,a.filter,0,this.c.viewTotal?a.total:0,a.display,a.display),this.s.updating=!0,a.select(),this.s.updating=!1;this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=
this.s.scrollTop}};h.version="1.3.0";h.classes={bordered:"dtsp-bordered",buttonGroup:"dtsp-buttonGroup",buttonSub:"dtsp-buttonSub",clear:"dtsp-clear",clearAll:"dtsp-clearAll",clearButton:"clearButton",collapseAll:"dtsp-collapseAll",collapseButton:"dtsp-collapseButton",container:"dtsp-searchPane",countButton:"dtsp-countButton",disabledButton:"dtsp-disabledButton",hidden:"dtsp-hidden",hide:"dtsp-hide",layout:"dtsp-",name:"dtsp-name",nameButton:"dtsp-nameButton",nameCont:"dtsp-nameCont",narrow:"dtsp-narrow",
paneButton:"dtsp-paneButton",paneInputButton:"dtsp-paneInputButton",pill:"dtsp-pill",rotated:"dtsp-rotated",search:"dtsp-search",searchCont:"dtsp-searchCont",searchIcon:"dtsp-searchIcon",searchLabelCont:"dtsp-searchButtonCont",selected:"dtsp-selected",smallGap:"dtsp-smallGap",subRow1:"dtsp-subRow1",subRow2:"dtsp-subRow2",subRowsContainer:"dtsp-subRowsContainer",title:"dtsp-title",topRow:"dtsp-topRow"};h.defaults={cascadePanes:!1,clear:!0,collapse:!0,combiner:"or",container:function(a){return a.table().container()},
controls:!0,dtOpts:{},emptyMessage:null,hideCount:!1,i18n:{clearPane:"&times;",count:"{total}",countFiltered:"{shown} ({total})",emptyMessage:"<em>No data</em>"},initCollapsed:!1,layout:"auto",name:void 0,orderable:!0,orthogonal:{display:"display",filter:"filter",hideCount:!1,search:"filter",show:void 0,sort:"sort",threshold:.6,type:"type",viewCount:!0},preSelect:[],threshold:.6,viewCount:!0,viewTotal:!1};return h}(),v,A,F=function(){function h(a,b,c){var e=this;void 0===c&&(c=!1);this.regenerating=
!1;if(!A||!A.versionCheck||!A.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!A.select)throw Error("SearchPane requires Select");var d=new A.Api(a);this.classes=v.extend(!0,{},h.classes);this.c=v.extend(!0,{},h.defaults,b);this.dom={clearAll:v('<button type="button">Clear All</button>').addClass(this.classes.clearAll),collapseAll:v('<button type="button">Collapse All</button>').addClass(this.classes.collapseAll),container:v("<div/>").addClass(this.classes.panes).text(d.i18n("searchPanes.loadMessage",
this.c.i18n.loadMessage)),emptyMessage:v("<div/>").addClass(this.classes.emptyMessage),options:v("<div/>").addClass(this.classes.container),panes:v("<div/>").addClass(this.classes.container),showAll:v('<button type="button">Show All</button>').addClass(this.classes.showAll).addClass(this.classes.disabledButton).attr("disabled","true"),title:v("<div/>").addClass(this.classes.title),titleRow:v("<div/>").addClass(this.classes.titleRow),wrapper:v("<div/>")};this.s={colOpts:[],dt:d,filterCount:0,filterPane:-1,
page:0,paging:!1,panes:[],selectionList:[],serverData:{},stateRead:!1,updating:!1};if(void 0===d.settings()[0]._searchPanes){this._getState();if(this.s.dt.page.info().serverSide)d.on("preXhr.dt",function(f,g,k){void 0===k.searchPanes&&(k.searchPanes={});void 0===k.searchPanes_null&&(k.searchPanes_null={});f=0;for(g=e.s.selectionList;f<g.length;f++){var p=g[f],m=e.s.dt.column(p.index).dataSrc();void 0===k.searchPanes[m]&&(k.searchPanes[m]={});void 0===k.searchPanes_null[m]&&(k.searchPanes_null[m]=
{});for(var x=0;x<p.rows.length;x++)k.searchPanes[m][x]=p.rows[x].filter,null===k.searchPanes[m][x]&&(k.searchPanes_null[m][x]=!0)}});d.on("xhr",function(f,g,k,p){k&&k.searchPanes&&k.searchPanes.options&&(e.s.serverData=k,e.s.serverData.tableLength=k.recordsTotal,e._serverTotals())});d.settings()[0]._searchPanes=this;this.dom.clearAll.text(d.i18n("searchPanes.clearMessage",this.c.i18n.clearMessage));this.dom.collapseAll.text(d.i18n("searchPanes.collapseMessage",this.c.i18n.collapseMessage));this.dom.showAll.text(d.i18n("searchPanes.showMessage",
this.c.i18n.showMessage));if(this.s.dt.settings()[0]._bInitComplete||c)this._paneDeclare(d,a,b);else d.one("preInit.dt",function(f){e._paneDeclare(d,a,b)});return this}}h.prototype.clearSelections=function(){this.dom.container.find("."+this.classes.search.replace(/\s+/g,".")).each(function(){v(this).val("");v(this).trigger("input")});var a=[];this.s.selectionList=[];for(var b=0,c=this.s.panes;b<c.length;b++){var e=c[b];void 0!==e.s.dtPane&&a.push(e.clearPane())}return a};h.prototype.getNode=function(){return this.dom.container};
h.prototype.rebuild=function(a,b){void 0===a&&(a=!1);void 0===b&&(b=!1);this.dom.emptyMessage.remove();var c=[];!1===a&&this.dom.panes.empty();for(var e=0,d=this.s.panes;e<d.length;e++){var f=d[e];if(!1===a||f.s.index===a)f.clearData(),c.push(f.rebuildPane(void 0!==this.s.selectionList[this.s.selectionList.length-1]?f.s.index===this.s.selectionList[this.s.selectionList.length-1].index:!1,this.s.dt.page.info().serverSide?this.s.serverData:void 0,null,b)),this.dom.panes.append(f.dom.container)}this.c.cascadePanes||
this.c.viewTotal?this.redrawPanes(!0):this._updateSelection();this._updateFilterCount();this._attachPaneContainer();this.s.dt.draw(!b);this.resizePanes();return 1===c.length?c[0]:c};h.prototype.redrawPanes=function(a){void 0===a&&(a=!1);var b=this.s.dt;if(!this.s.updating&&!this.s.dt.page.info().serverSide){for(var c=!0,e=this.s.filterPane,d=null,f=0,g=this.s.panes;f<g.length;f++){var k=g[f];void 0!==k.s.dtPane&&(d+=k.s.dtPane.rows({selected:!0}).data().toArray().length)}if(0===d&&b.rows({search:"applied"}).data().toArray().length===
b.rows().data().toArray().length)c=!1;else if(this.c.viewTotal){b=0;for(f=this.s.panes;b<f.length;b++)if(k=f[b],void 0!==k.s.dtPane){g=k.s.dtPane.rows({selected:!0}).data().toArray().length;if(0===g)for(var p=0,m=this.s.selectionList;p<m.length;p++){var x=m[p];x.index===k.s.index&&0!==x.rows.length&&(g=x.rows.length)}0<g&&-1===e?e=k.s.index:0<g&&(e=null)}0===d&&(e=null)}f=void 0;b=[];if(this.regenerating)for(f=-1,1===b.length&&null!==d&&0!==d&&(f=b[0].index),a=0,b=this.s.panes;a<b.length;a++){if(k=
b[a],void 0!==k.s.dtPane){g=!0;k.s.filteringActive=!0;if(-1!==e&&null!==e&&e===k.s.index||!1===c||k.s.index===f)g=!1,k.s.filteringActive=!1;k.updatePane(g?c:g)}}else{g=0;for(p=this.s.panes;g<p.length;g++)if(k=p[g],k.s.selectPresent){this.s.selectionList.push({index:k.s.index,protect:!1,rows:k.s.dtPane.rows({selected:!0}).data().toArray()});break}else k.s.deselect&&(f=k.s.index,m=k.s.dtPane.rows({selected:!0}).data().toArray(),0<m.length&&this.s.selectionList.push({index:k.s.index,protect:!0,rows:m}));
if(0<this.s.selectionList.length)for(g=this.s.selectionList[this.s.selectionList.length-1].index,p=0,m=this.s.panes;p<m.length;p++)k=m[p],k.s.lastSelect=k.s.index===g;for(k=0;k<this.s.selectionList.length;k++)if(this.s.selectionList[k].index!==f||!0===this.s.selectionList[k].protect){g=!1;for(p=k+1;p<this.s.selectionList.length;p++)this.s.selectionList[p].index===this.s.selectionList[k].index&&(g=!0);g||(b.push(this.s.selectionList[k]),this.s.selectionList[k].protect=!1)}f=-1;1===b.length&&null!==
d&&0!==d&&(f=b[0].index);p=0;for(m=this.s.panes;p<m.length;p++)if(k=m[p],void 0!==k.s.dtPane){g=!0;k.s.filteringActive=!0;if(-1!==e&&null!==e&&e===k.s.index||!1===c||k.s.index===f)g=!1,k.s.filteringActive=!1;k.updatePane(g?c:!1)}if(0<b.length&&(b.length<this.s.selectionList.length||a))for(this._cascadeRegen(b,d),g=b[b.length-1].index,e=0,a=this.s.panes;e<a.length;e++)k=a[e],k.s.lastSelect=k.s.index===g;else if(0<b.length)for(k=0,a=this.s.panes;k<a.length;k++)if(b=a[k],void 0!==b.s.dtPane){g=!0;b.s.filteringActive=
!0;if(-1!==e&&null!==e&&e===b.s.index||!1===c||b.s.index===f)g=!1,b.s.filteringActive=!1;b.updatePane(g?c:g)}}this._updateFilterCount();c&&0!==d||(this.s.selectionList=[])}};h.prototype.resizePanes=function(){if("auto"===this.c.layout){var a=v(this.s.dt.searchPanes.container()).width(),b=Math.floor(a/260);a=1;for(var c=0,e=[],d=0,f=this.s.panes;d<f.length;d++){var g=f[d];g.s.displayed&&e.push(g.s.index)}g=e.length;if(b===g)a=b;else for(;1<b;b--)if(d=g%b,0===d){a=b;c=0;break}else d>c&&(a=b,c=d);e=
0!==c?e.slice(e.length-c,e.length):[];b=0;for(d=this.s.panes;b<d.length;b++)g=d[b],g.s.displayed&&(f="columns-"+(e.includes(g.s.index)?c:a),g.resize(f))}else for(a=0,c=this.s.panes;a<c.length;a++)g=c[a],g.adjustTopRow();return this};h.prototype._attach=function(){var a=this;this.dom.container.removeClass(this.classes.hide);this.dom.titleRow.removeClass(this.classes.hide);this.dom.titleRow.remove();this.dom.title.appendTo(this.dom.titleRow);this.c.clear&&(this.dom.clearAll.appendTo(this.dom.titleRow),
this.dom.clearAll.on("click.dtsps",function(){a.clearSelections()}));this.c.collapse&&this._setCollapseListener();this.dom.titleRow.appendTo(this.dom.container);for(var b=0,c=this.s.panes;b<c.length;b++)c[b].dom.container.appendTo(this.dom.panes);this.dom.panes.appendTo(this.dom.container);0===v("div."+this.classes.container).length&&this.dom.container.prependTo(this.s.dt);return this.dom.container};h.prototype._attachExtras=function(){this.dom.container.removeClass(this.classes.hide);this.dom.titleRow.removeClass(this.classes.hide);
this.dom.titleRow.remove();this.dom.title.appendTo(this.dom.titleRow);this.c.clear&&this.dom.clearAll.appendTo(this.dom.titleRow);this.c.collapse&&(this.dom.showAll.appendTo(this.dom.titleRow),this.dom.collapseAll.appendTo(this.dom.titleRow));this.dom.titleRow.appendTo(this.dom.container);return this.dom.container};h.prototype._attachMessage=function(){try{var a=this.s.dt.i18n("searchPanes.emptyPanes",this.c.i18n.emptyPanes)}catch(b){a=null}if(null===a)this.dom.container.addClass(this.classes.hide),
this.dom.titleRow.removeClass(this.classes.hide);else return this.dom.container.removeClass(this.classes.hide),this.dom.titleRow.addClass(this.classes.hide),this.dom.emptyMessage.text(a),this.dom.emptyMessage.appendTo(this.dom.container),this.dom.container};h.prototype._attachPaneContainer=function(){for(var a=0,b=this.s.panes;a<b.length;a++)if(!0===b[a].s.displayed)return this._attach();return this._attachMessage()};h.prototype._cascadeRegen=function(a,b){this.regenerating=!0;var c=-1;1===a.length&&
null!==b&&0!==b&&(c=a[0].index);for(var e=0,d=this.s.panes;e<d.length;e++)b=d[e],b.setCascadeRegen(!0),b.setClear(!0),(void 0!==b.s.dtPane&&b.s.index===c||void 0!==b.s.dtPane)&&b.clearPane(),b.setClear(!1);this.s.dt.draw();c=this.s.dt.rows({search:"applied"}).data().toArray().length;e=this.s.dt.rows().data().toArray().length;if(e!==c){d=0;for(var f=this.s.panes;d<f.length;d++)b=f[d],b.s.forceViewTotal=!0}d=0;for(f=this.s.panes;d<f.length;d++)b=f[d],b.updatePane(!0);this._makeCascadeSelections(a);
this.s.selectionList=a;a=0;for(d=this.s.panes;a<d.length;a++)b=d[a],b.setCascadeRegen(!1);this.regenerating=!1;if(e!==c)for(a=0,c=this.s.panes;a<c.length;a++)b=c[a],b.s.forceViewTotal=!1};h.prototype._checkMessage=function(){for(var a=0,b=this.s.panes;a<b.length;a++)if(!0===b[a].s.displayed){this.dom.emptyMessage.remove();this.dom.titleRow.removeClass(this.classes.hide);return}return this._attachMessage()};h.prototype._checkCollapse=function(){for(var a=!0,b=!0,c=0,e=this.s.panes;c<e.length;c++){var d=
e[c];d.s.displayed&&(d.dom.collapseButton.hasClass(d.classes.rotated)?(this.dom.showAll.removeClass(this.classes.disabledButton).removeAttr("disabled"),b=!1):(this.dom.collapseAll.removeClass(this.classes.disabledButton).removeAttr("disabled"),a=!1))}a&&this.dom.collapseAll.addClass(this.classes.disabledButton).attr("disabled","true");b&&this.dom.showAll.addClass(this.classes.disabledButton).attr("disabled","true")};h.prototype._collapseAll=function(){for(var a=0,b=this.s.panes;a<b.length;a++)b[a].collapse()};
h.prototype._getState=function(){var a=this.s.dt.state.loaded();a&&a.searchPanes&&void 0!==a.searchPanes.selectionList&&(this.s.selectionList=a.searchPanes.selectionList)};h.prototype._makeCascadeSelections=function(a){for(var b=0;b<a.length;b++)for(var c=function(f){if(f.s.index===a[b].index&&void 0!==f.s.dtPane){b===a.length-1&&(f.s.lastCascade=!0);0<f.s.dtPane.rows({selected:!0}).data().toArray().length&&void 0!==f.s.dtPane&&(f.setClear(!0),f.clearPane(),f.setClear(!1));for(var g=function(m){var x=
!1;f.s.dtPane.rows().every(function(z){void 0!==f.s.dtPane.row(z).data()&&void 0!==m&&f.s.dtPane.row(z).data().filter===m.filter&&(x=!0,f.s.dtPane.row(z).select())});x||f.addRow(m.display,m.filter,0,m.total,m.sort,m.type,m.className).select()},k=0,p=a[b].rows;k<p.length;k++)g(p[k]);f.s.scrollTop=v(f.s.dtPane.table().node()).parent()[0].scrollTop;f.s.dtPane.draw();f.s.dtPane.table().node().parentNode.scrollTop=f.s.scrollTop;f.s.lastCascade=!1}},e=0,d=this.s.panes;e<d.length;e++)c(d[e])};h.prototype._paneDeclare=
function(a,b,c){var e=this;a.columns(0<this.c.columns.length?this.c.columns:void 0).eq(0).each(function(k){e.s.panes.push(new t(b,c,k,e.c.layout,e.dom.panes))});for(var d=a.columns().eq(0).toArray().length,f=this.c.panes.length,g=0;g<f;g++)this.s.panes.push(new t(b,c,d+g,this.c.layout,this.dom.panes,this.c.panes[g]));if(0<this.c.order.length)for(d=this.c.order.map(function(k,p,m){return e._findPane(k)}),this.dom.panes.empty(),this.s.panes=d,d=0,f=this.s.panes;d<f.length;d++)this.dom.panes.append(f[d].dom.container);
this.s.dt.settings()[0]._bInitComplete?this._startup(a):this.s.dt.settings()[0].aoInitComplete.push({fn:function(){e._startup(a)}})};h.prototype._findPane=function(a){for(var b=0,c=this.s.panes;b<c.length;b++){var e=c[b];if(a===e.s.name)return e}};h.prototype._serverTotals=function(){for(var a=!1,b=!1,c=0,e=this.s.panes;c<e.length;c++){var d=e[c];if(d.s.selectPresent){this.s.selectionList.push({index:d.s.index,protect:!1,rows:d.s.dtPane.rows({selected:!0}).data().toArray()});d.s.selectPresent=!1;
a=!0;break}else d.s.deselect&&(b=d.s.dtPane.rows({selected:!0}).data().toArray(),0<b.length&&this.s.selectionList.push({index:d.s.index,protect:!0,rows:b}),b=a=!0)}if(a){c=[];for(e=0;e<this.s.selectionList.length;e++){d=!1;for(a=e+1;a<this.s.selectionList.length;a++)this.s.selectionList[a].index===this.s.selectionList[e].index&&(d=!0);if(!d){a=!1;for(var f=0,g=this.s.panes;f<g.length;f++)d=g[f],d.s.index===this.s.selectionList[e].index&&0<d.s.dtPane.rows({selected:!0}).data().toArray().length&&(a=
!0);a&&c.push(this.s.selectionList[e])}}this.s.selectionList=c}else this.s.selectionList=[];c=-1;if(b&&1===this.s.selectionList.length)for(b=0,e=this.s.panes;b<e.length;b++)d=e[b],d.s.lastSelect=!1,d.s.deselect=!1,void 0!==d.s.dtPane&&0<d.s.dtPane.rows({selected:!0}).data().toArray().length&&(c=d.s.index);else if(0<this.s.selectionList.length)for(b=this.s.selectionList[this.s.selectionList.length-1].index,e=0,a=this.s.panes;e<a.length;e++)d=a[e],d.s.lastSelect=d.s.index===b,d.s.deselect=!1;else if(0===
this.s.selectionList.length)for(b=0,e=this.s.panes;b<e.length;b++)d=e[b],d.s.lastSelect=!1,d.s.deselect=!1;this.dom.panes.empty();b=0;for(e=this.s.panes;b<e.length;b++)d=e[b],d.s.lastSelect?d._setListeners():d.rebuildPane(void 0,this.s.dt.page.info().serverSide?this.s.serverData:void 0,d.s.index===c?!0:null,!0),this.dom.panes.append(d.dom.container),void 0!==d.s.dtPane&&(v(d.s.dtPane.table().node()).parent()[0].scrollTop=d.s.scrollTop,v.fn.dataTable.select.init(d.s.dtPane));this._updateSelection()};
h.prototype._setCollapseListener=function(){var a=this;this.dom.collapseAll.on("click.dtsps",function(){a._collapseAll();a.dom.collapseAll.addClass(a.classes.disabledButton).attr("disabled","true");a.dom.showAll.removeClass(a.classes.disabledButton).removeAttr("disabled");a.s.dt.state.save()});this.dom.showAll.on("click.dtsps",function(){a._showAll();a.dom.showAll.addClass(a.classes.disabledButton).attr("disabled","true");a.dom.collapseAll.removeClass(a.classes.disabledButton).removeAttr("disabled");
a.s.dt.state.save()});for(var b=0,c=this.s.panes;b<c.length;b++)c[b].dom.collapseButton.on("click",function(){return a._checkCollapse()});this._checkCollapse()};h.prototype._showAll=function(){for(var a=0,b=this.s.panes;a<b.length;a++)b[a].show()};h.prototype._startup=function(a){var b=this;this.dom.container.text("");this._attachExtras();this.dom.container.append(this.dom.panes);this.dom.panes.empty();var c=this.s.dt.state.loaded();if(this.c.viewTotal&&!this.c.cascadePanes&&null!==c&&void 0!==c&&
void 0!==c.searchPanes&&void 0!==c.searchPanes.panes){for(var e=!1,d=0,f=c.searchPanes.panes;d<f.length;d++){var g=f[d];if(0<g.selected.length){e=!0;break}}if(e)for(e=0,d=this.s.panes;e<d.length;e++)g=d[e],g.s.showFiltered=!0}e=0;for(d=this.s.panes;e<d.length;e++)g=d[e],g.rebuildPane(void 0,0<Object.keys(this.s.serverData).length?this.s.serverData:void 0),this.dom.panes.append(g.dom.container);"auto"===this.c.layout&&this.resizePanes();this.s.stateRead||null===c||void 0===c||(this.s.dt.page(c.start/
this.s.dt.page.len()),this.s.dt.draw("page"));this.s.stateRead=!0;if(this.c.viewTotal&&!this.c.cascadePanes)for(c=0,e=this.s.panes;c<e.length;c++)g=e[c],g.updatePane();this._checkMessage();a.on("preDraw.dtsps",function(){b.s.updating||b.s.paging||(!b.c.cascadePanes&&!b.c.viewTotal||b.s.dt.page.info().serverSide?(b._updateFilterCount(),b._updateSelection()):b.redrawPanes(b.c.viewTotal),b.s.filterPane=-1);b.s.paging=!1});v(window).on("resize.dtsp",A.util.throttle(function(){b.resizePanes()}));this.s.dt.on("stateSaveParams.dtsp",
function(k,p,m){void 0===m.searchPanes&&(m.searchPanes={});m.searchPanes.selectionList=b.s.selectionList});a.off("page");a.on("page",function(){b.s.paging=!0;b.s.page=b.s.dt.page()});if(this.s.dt.page.info().serverSide)a.off("preXhr.dt"),a.on("preXhr.dt",function(k,p,m){void 0===m.searchPanes&&(m.searchPanes={});void 0===m.searchPanes_null&&(m.searchPanes_null={});p=k=0;for(var x=b.s.panes;p<x.length;p++){var z=x[p],y=b.s.dt.column(z.s.index).dataSrc();void 0===m.searchPanes[y]&&(m.searchPanes[y]=
{});void 0===m.searchPanes_null[y]&&(m.searchPanes_null[y]={});if(void 0!==z.s.dtPane){z=z.s.dtPane.rows({selected:!0}).data().toArray();for(var w=0;w<z.length;w++)m.searchPanes[y][w]=z[w].filter,null===m.searchPanes[y][w]&&(m.searchPanes_null[y][w]=!0),k++}}b.c.viewTotal&&b._prepViewTotal(k);0<k&&(k!==b.s.filterCount?(m.start=0,b.s.page=0):m.start=b.s.page*b.s.dt.page.len(),b.s.dt.page(b.s.page),b.s.filterCount=k)});else a.on("preXhr.dt",function(k,p,m){k=0;for(p=b.s.panes;k<p.length;k++)p[k].clearData()});
this.s.dt.on("xhr",function(k,p,m,x){if(p.nTable===b.s.dt.table().node()){var z=!1;if(!b.s.dt.page.info().serverSide)b.s.dt.one("preDraw",function(){if(!z){var y=b.s.dt.page();z=!0;b.s.updating=!0;b.dom.panes.empty();for(var w=0,u=b.s.panes;w<u.length;w++){var B=u[w];B.clearData();B.rebuildPane(void 0!==b.s.selectionList[b.s.selectionList.length-1]?B.s.index===b.s.selectionList[b.s.selectionList.length-1].index:!1,void 0,void 0,!0);b.dom.panes.append(B.dom.container)}b.s.dt.page.info().serverSide||
b.s.dt.draw();b.s.updating=!1;b.c.cascadePanes||b.c.viewTotal?b.redrawPanes(b.c.cascadePanes):b._updateSelection();b._checkMessage();b.s.dt.one("draw",function(){b.s.updating=!0;b.s.dt.page(y).draw(!1);b.s.updating=!1})}})}});c=0;for(e=this.s.panes;c<e.length;c++)if(g=e[c],void 0!==g&&void 0!==g.s.dtPane&&(void 0!==g.s.colOpts.preSelect&&0<g.s.colOpts.preSelect.length||null!==g.customPaneSettings&&void 0!==g.customPaneSettings.preSelect&&0<g.customPaneSettings.preSelect.length)){d=g.s.dtPane.rows().data().toArray().length;
for(f=0;f<d;f++)(g.s.colOpts.preSelect.includes(g.s.dtPane.cell(f,0).data())||null!==g.customPaneSettings&&void 0!==g.customPaneSettings.preSelect&&g.customPaneSettings.preSelect.includes(g.s.dtPane.cell(f,0).data()))&&g.s.dtPane.row(f).select();g.updateTable()}if(void 0!==this.s.selectionList&&0<this.s.selectionList.length)for(c=this.s.selectionList[this.s.selectionList.length-1].index,e=0,d=this.s.panes;e<d.length;e++)g=d[e],g.s.lastSelect=g.s.index===c;0<this.s.selectionList.length&&this.c.cascadePanes&&
this._cascadeRegen(this.s.selectionList,this.s.selectionList.length);this._updateFilterCount();a.on("destroy.dtsps",function(){for(var k=0,p=b.s.panes;k<p.length;k++)p[k].destroy();a.off(".dtsps");b.dom.collapseAll.off(".dtsps");b.dom.showAll.off(".dtsps");b.dom.clearAll.off(".dtsps");b.dom.container.remove();b.clearSelections()});this.c.collapse&&this._setCollapseListener();if(this.c.clear)this.dom.clearAll.on("click.dtsps",function(){b.clearSelections()});a.settings()[0]._searchPanes=this;this.s.dt.state.save()};
h.prototype._prepViewTotal=function(a){for(var b=this.s.filterPane,c=!1,e=0,d=this.s.panes;e<d.length;e++){var f=d[e];if(void 0!==f.s.dtPane){var g=f.s.dtPane.rows({selected:!0}).data().toArray().length;0<g&&-1===b?(b=f.s.index,c=!0):0<g&&(b=null)}}null!==a&&0!==a&&(b=null);a=0;for(e=this.s.panes;a<e.length;a++)if(f=e[a],void 0!==f.s.dtPane&&(f.s.filteringActive=!0,-1!==b&&null!==b&&b===f.s.index||!1===c))f.s.filteringActive=!1};h.prototype._updateFilterCount=function(){for(var a=0,b=0,c=this.s.panes;b<
c.length;b++){var e=c[b];void 0!==e.s.dtPane&&(a+=e.getPaneCount())}b=this.s.dt.i18n("searchPanes.title",this.c.i18n.title,a);this.dom.title.text(b);void 0!==this.c.filterChanged&&"function"===typeof this.c.filterChanged&&this.c.filterChanged.call(this.s.dt,a);0===a?this.dom.clearAll.addClass(this.classes.disabledButton).attr("disabled","true"):this.dom.clearAll.removeClass(this.classes.disabledButton).removeAttr("disabled")};h.prototype._updateSelection=function(){this.s.selectionList=[];for(var a=
0,b=this.s.panes;a<b.length;a++){var c=b[a];void 0!==c.s.dtPane&&this.s.selectionList.push({index:c.s.index,protect:!1,rows:c.s.dtPane.rows({selected:!0}).data().toArray()})}};h.version="1.4.0";h.classes={clear:"dtsp-clear",clearAll:"dtsp-clearAll",collapseAll:"dtsp-collapseAll",container:"dtsp-searchPanes",disabledButton:"dtsp-disabledButton",emptyMessage:"dtsp-emptyMessage",hide:"dtsp-hidden",panes:"dtsp-panesContainer",search:"dtsp-search",showAll:"dtsp-showAll",title:"dtsp-title",titleRow:"dtsp-titleRow"};
h.defaults={cascadePanes:!1,clear:!0,collapse:!0,columns:[],container:function(a){return a.table().container()},filterChanged:void 0,i18n:{clearMessage:"Clear All",clearPane:"&times;",collapse:{0:"SearchPanes",_:"SearchPanes (%d)"},collapseMessage:"Collapse All",count:"{total}",countFiltered:"{shown} ({total})",emptyMessage:"<em>No data</em>",emptyPanes:"No SearchPanes",loadMessage:"Loading Search Panes...",showMessage:"Show All",title:"Filters Active - %d"},layout:"auto",order:[],panes:[],viewTotal:!1};
return h}();(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return h(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return h(b,a,a.document)}:h(window.jQuery,window,document)})(function(h,a,b){function c(d,f,g){void 0===f&&(f=null);void 0===g&&(g=!1);d=new e.Api(d);f=f?f:d.init().searchPanes||e.defaults.searchPanes;return(new F(d,f,g)).getNode()}n(h);
q(h);var e=h.fn.dataTable;h.fn.dataTable.SearchPanes=F;h.fn.DataTable.SearchPanes=F;h.fn.dataTable.SearchPane=t;h.fn.DataTable.SearchPane=t;a=h.fn.dataTable.Api.register;a("searchPanes()",function(){return this});a("searchPanes.clearSelections()",function(){return this.iterator("table",function(d){d._searchPanes&&d._searchPanes.clearSelections()})});a("searchPanes.rebuildPane()",function(d,f){return this.iterator("table",function(g){g._searchPanes&&g._searchPanes.rebuild(d,f)})});a("searchPanes.resizePanes()",
function(){var d=this.context[0];return d._searchPanes?d._searchPanes.resizePanes():null});a("searchPanes.container()",function(){var d=this.context[0];return d._searchPanes?d._searchPanes.getNode():null});h.fn.dataTable.ext.buttons.searchPanesClear={action:function(d,f,g,k){f.searchPanes.clearSelections()},text:"Clear Panes"};h.fn.dataTable.ext.buttons.searchPanes={action:function(d,f,g,k){d.stopPropagation();this.popover(k._panes.getNode(),{align:"dt-container"});k._panes.rebuild(void 0,!0)},config:{},
init:function(d,f,g){var k=new h.fn.dataTable.SearchPanes(d,h.extend({filterChanged:function(m){d.button(f).text(d.i18n("searchPanes.collapse",void 0!==d.context[0].oLanguage.searchPanes?d.context[0].oLanguage.searchPanes.collapse:d.context[0]._searchPanes.c.i18n.collapse,m))}},g.config)),p=d.i18n("searchPanes.collapse",k.c.i18n.collapse,0);d.button(f).text(p);g._panes=k},text:"Search Panes"};h(b).on("preInit.dt.dtsp",function(d,f,g){"dt"===d.namespace&&(f.oInit.searchPanes||e.defaults.searchPanes)&&
(f._searchPanes||c(f,null,!0))});e.ext.feature.push({cFeature:"P",fnInit:c});e.ext.features&&e.ext.features.register("searchPanes",c)})})();

View file

@ -1,3 +1,6 @@
/*! Bootstrap integration for DataTables' SearchPanes
* ©2016 SpryMedia Ltd - datatables.net/license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
@ -12,11 +15,11 @@
root = window;
}
if (!$ || !$.fn.dataTable) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
$ = require('datatables.net-bs4')(root, $).$;
}
console.log($.fn.dataTable);
if (!$.fn.dataTable.SearchPanes) {
console.log("not present");
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('datatables.net-searchpanes')(root, $);
}
return factory($, root, root.document);
@ -28,31 +31,33 @@
}
}(function ($, window, document) {
'use strict';
var DataTable = $.fn.dataTable;
$.extend(true, DataTable.SearchPane.classes, {
buttonGroup: 'btn-group col justify-content-end',
var dataTable = $.fn.dataTable;
$.extend(true, dataTable.SearchPane.classes, {
buttonGroup: 'btn-group',
disabledButton: 'disabled',
dull: '',
narrow: 'col',
pane: {
container: 'table'
},
paneButton: 'btn btn-light',
pill: 'pill badge badge-pill badge-secondary',
search: 'col-sm form-control search',
searchCont: 'input-group col-sm',
search: 'form-control search',
searchCont: 'input-group',
searchLabelCont: 'input-group-append',
subRow1: 'dtsp-subRow1',
subRow2: 'dtsp-subRow2',
table: 'table table-sm table-borderless',
topRow: 'dtsp-topRow row'
topRow: 'dtsp-topRow'
});
$.extend(true, DataTable.SearchPanes.classes, {
clearAll: 'dtsp-clearAll col-auto btn btn-light',
$.extend(true, dataTable.SearchPanes.classes, {
clearAll: 'dtsp-clearAll btn btn-light',
collapseAll: 'dtsp-collapseAll btn btn-light',
container: 'dtsp-searchPanes',
panes: 'dtsp-panes dtsp-container',
title: 'dtsp-title col',
titleRow: 'dtsp-titleRow row'
disabledButton: 'disabled',
panes: 'dtsp-panes dtsp-panesContainer',
showAll: 'dtsp-showAll btn btn-light',
title: 'dtsp-title',
titleRow: 'dtsp-titleRow'
});
return DataTable.searchPanes;
return dataTable.searchPanes;
}));

View file

@ -1,3 +1,7 @@
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-searchpanes"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;console.log(b.fn.dataTable);b.fn.dataTable.SearchPanes||(console.log("not present"),require("datatables.net-searchpanes")(a,b));return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable;
c.extend(!0,a.SearchPane.classes,{buttonGroup:"btn-group col justify-content-end",disabledButton:"disabled",dull:"",narrow:"col",pane:{container:"table"},paneButton:"btn btn-light",pill:"pill badge badge-pill badge-secondary",search:"col-sm form-control search",searchCont:"input-group col-sm",searchLabelCont:"input-group-append",subRow1:"dtsp-subRow1",subRow2:"dtsp-subRow2",table:"table table-sm table-borderless",topRow:"dtsp-topRow row"});c.extend(!0,a.SearchPanes.classes,{clearAll:"dtsp-clearAll col-auto btn btn-light",
container:"dtsp-searchPanes",panes:"dtsp-panes dtsp-container",title:"dtsp-title col",titleRow:"dtsp-titleRow row"});return a.searchPanes});
/*!
Bootstrap integration for DataTables' SearchPanes
©2016 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-searchpanes"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs4")(a,b).$);b.fn.dataTable.SearchPanes||require("datatables.net-searchpanes")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b){a=c.fn.dataTable;c.extend(!0,a.SearchPane.classes,{buttonGroup:"btn-group",
disabledButton:"disabled",narrow:"col",pane:{container:"table"},paneButton:"btn btn-light",pill:"pill badge badge-pill badge-secondary",search:"form-control search",searchCont:"input-group",searchLabelCont:"input-group-append",subRow1:"dtsp-subRow1",subRow2:"dtsp-subRow2",table:"table table-sm table-borderless",topRow:"dtsp-topRow"});c.extend(!0,a.SearchPanes.classes,{clearAll:"dtsp-clearAll btn btn-light",collapseAll:"dtsp-collapseAll btn btn-light",container:"dtsp-searchPanes",disabledButton:"disabled",
panes:"dtsp-panes dtsp-panesContainer",showAll:"dtsp-showAll btn btn-light",title:"dtsp-title",titleRow:"dtsp-titleRow"});return a.searchPanes});

View file

@ -1,4 +1,4 @@
/*! Select for DataTables 1.3.2
/*! Select for DataTables 1.3.3
* 2015-2021 SpryMedia Ltd - datatables.net/license/mit
*/
@ -6,7 +6,7 @@
* @summary Select for DataTables
* @description A collection of API methods, events and buttons for DataTables
* that provides selection options of the items in a DataTable
* @version 1.3.2
* @version 1.3.3
* @file dataTables.select.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact datatables.net/forums
@ -54,7 +54,7 @@ var DataTable = $.fn.dataTable;
// Version information for debugger
DataTable.select = {};
DataTable.select.version = '1.3.2';
DataTable.select.version = '1.3.3';
DataTable.select.init = function ( dt ) {
var ctx = dt.settings()[0];

Some files were not shown because too many files have changed in this diff Show more