{"version":3,"file":"dataTables.mjs","sources":["../js/dataTables.mjs"],"sourcesContent":["/*! DataTables 2.1.8\n * © SpryMedia Ltd - datatables.net/license\n */\n\nimport jQuery from 'jquery';\n\n// DataTables code uses $ internally, but we want to be able to\n// reassign $ with the `use` method, so it is a regular var.\nvar $ = jQuery;\n\n\nvar DataTable = function ( selector, options )\n{\n\t// Check if called with a window or jQuery object for DOM less applications\n\t// This is for backwards compatibility\n\tif (DataTable.factory(selector, options)) {\n\t\treturn DataTable;\n\t}\n\n\t// When creating with `new`, create a new DataTable, returning the API instance\n\tif (this instanceof DataTable) {\n\t\treturn $(selector).DataTable(options);\n\t}\n\telse {\n\t\t// Argument switching\n\t\toptions = selector;\n\t}\n\n\tvar _that = this;\n\tvar emptyInit = options === undefined;\n\tvar len = this.length;\n\n\tif ( emptyInit ) {\n\t\toptions = {};\n\t}\n\n\t// Method to get DT API instance from jQuery object\n\tthis.api = function ()\n\t{\n\t\treturn new _Api( this );\n\t};\n\n\tthis.each(function() {\n\t\t// For each initialisation we want to give it a clean initialisation\n\t\t// object that can be bashed around\n\t\tvar o = {};\n\t\tvar oInit = len > 1 ? // optimisation for single table case\n\t\t\t_fnExtend( o, options, true ) :\n\t\t\toptions;\n\n\t\t\n\t\tvar i=0, iLen;\n\t\tvar sId = this.getAttribute( 'id' );\n\t\tvar defaults = DataTable.defaults;\n\t\tvar $this = $(this);\n\t\t\n\t\t\n\t\t/* Sanity check */\n\t\tif ( this.nodeName.toLowerCase() != 'table' )\n\t\t{\n\t\t\t_fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$(this).trigger( 'options.dt', oInit );\n\t\t\n\t\t/* Backwards compatibility for the defaults */\n\t\t_fnCompatOpts( defaults );\n\t\t_fnCompatCols( defaults.column );\n\t\t\n\t\t/* Convert the camel-case defaults to Hungarian */\n\t\t_fnCamelToHungarian( defaults, defaults, true );\n\t\t_fnCamelToHungarian( defaults.column, defaults.column, true );\n\t\t\n\t\t/* Setting up the initialisation object */\n\t\t_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true );\n\t\t\n\t\t\n\t\t\n\t\t/* Check to see if we are re-initialising a table */\n\t\tvar allSettings = DataTable.settings;\n\t\tfor ( i=0, iLen=allSettings.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tvar s = allSettings[i];\n\t\t\n\t\t\t/* Base check on table node */\n\t\t\tif (\n\t\t\t\ts.nTable == this ||\n\t\t\t\t(s.nTHead && s.nTHead.parentNode == this) ||\n\t\t\t\t(s.nTFoot && s.nTFoot.parentNode == this)\n\t\t\t) {\n\t\t\t\tvar bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;\n\t\t\t\tvar bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;\n\t\t\n\t\t\t\tif ( emptyInit || bRetrieve )\n\t\t\t\t{\n\t\t\t\t\treturn s.oInstance;\n\t\t\t\t}\n\t\t\t\telse if ( bDestroy )\n\t\t\t\t{\n\t\t\t\t\tnew DataTable.Api(s).destroy();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t/* If the element we are initialising has the same ID as a table which was previously\n\t\t\t * initialised, but the table nodes don't match (from before) then we destroy the old\n\t\t\t * instance by simply deleting it. This is under the assumption that the table has been\n\t\t\t * destroyed by other methods. Anyone using non-id selectors will need to do this manually\n\t\t\t */\n\t\t\tif ( s.sTableId == this.id )\n\t\t\t{\n\t\t\t\tallSettings.splice( i, 1 );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Ensure the table has an ID - required for accessibility */\n\t\tif ( sId === null || sId === \"\" )\n\t\t{\n\t\t\tsId = \"DataTables_Table_\"+(DataTable.ext._unique++);\n\t\t\tthis.id = sId;\n\t\t}\n\t\t\n\t\t/* Create the settings object for this table and set some of the default parameters */\n\t\tvar oSettings = $.extend( true, {}, DataTable.models.oSettings, {\n\t\t\t\"sDestroyWidth\": $this[0].style.width,\n\t\t\t\"sInstance\":     sId,\n\t\t\t\"sTableId\":      sId,\n\t\t\tcolgroup: $('<colgroup>').prependTo(this),\n\t\t\tfastData: function (row, column, type) {\n\t\t\t\treturn _fnGetCellData(oSettings, row, column, type);\n\t\t\t}\n\t\t} );\n\t\toSettings.nTable = this;\n\t\toSettings.oInit  = oInit;\n\t\t\n\t\tallSettings.push( oSettings );\n\t\t\n\t\t// Make a single API instance available for internal handling\n\t\toSettings.api = new _Api( oSettings );\n\t\t\n\t\t// Need to add the instance after the instance after the settings object has been added\n\t\t// to the settings array, so we can self reference the table instance if more than one\n\t\toSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();\n\t\t\n\t\t// Backwards compatibility, before we apply all the defaults\n\t\t_fnCompatOpts( oInit );\n\t\t\n\t\t// If the length menu is given, but the init display length is not, use the length menu\n\t\tif ( oInit.aLengthMenu && ! oInit.iDisplayLength )\n\t\t{\n\t\t\toInit.iDisplayLength = Array.isArray(oInit.aLengthMenu[0])\n\t\t\t\t? oInit.aLengthMenu[0][0]\n\t\t\t\t: $.isPlainObject( oInit.aLengthMenu[0] )\n\t\t\t\t\t? oInit.aLengthMenu[0].value\n\t\t\t\t\t: oInit.aLengthMenu[0];\n\t\t}\n\t\t\n\t\t// Apply the defaults and init options to make a single init object will all\n\t\t// options defined from defaults and instance options.\n\t\toInit = _fnExtend( $.extend( true, {}, defaults ), oInit );\n\t\t\n\t\t\n\t\t// Map the initialisation options onto the settings object\n\t\t_fnMap( oSettings.oFeatures, oInit, [\n\t\t\t\"bPaginate\",\n\t\t\t\"bLengthChange\",\n\t\t\t\"bFilter\",\n\t\t\t\"bSort\",\n\t\t\t\"bSortMulti\",\n\t\t\t\"bInfo\",\n\t\t\t\"bProcessing\",\n\t\t\t\"bAutoWidth\",\n\t\t\t\"bSortClasses\",\n\t\t\t\"bServerSide\",\n\t\t\t\"bDeferRender\"\n\t\t] );\n\t\t_fnMap( oSettings, oInit, [\n\t\t\t\"ajax\",\n\t\t\t\"fnFormatNumber\",\n\t\t\t\"sServerMethod\",\n\t\t\t\"aaSorting\",\n\t\t\t\"aaSortingFixed\",\n\t\t\t\"aLengthMenu\",\n\t\t\t\"sPaginationType\",\n\t\t\t\"iStateDuration\",\n\t\t\t\"bSortCellsTop\",\n\t\t\t\"iTabIndex\",\n\t\t\t\"sDom\",\n\t\t\t\"fnStateLoadCallback\",\n\t\t\t\"fnStateSaveCallback\",\n\t\t\t\"renderer\",\n\t\t\t\"searchDelay\",\n\t\t\t\"rowId\",\n\t\t\t\"caption\",\n\t\t\t\"layout\",\n\t\t\t\"orderDescReverse\",\n\t\t\t\"typeDetect\",\n\t\t\t[ \"iCookieDuration\", \"iStateDuration\" ], // backwards compat\n\t\t\t[ \"oSearch\", \"oPreviousSearch\" ],\n\t\t\t[ \"aoSearchCols\", \"aoPreSearchCols\" ],\n\t\t\t[ \"iDisplayLength\", \"_iDisplayLength\" ]\n\t\t] );\n\t\t_fnMap( oSettings.oScroll, oInit, [\n\t\t\t[ \"sScrollX\", \"sX\" ],\n\t\t\t[ \"sScrollXInner\", \"sXInner\" ],\n\t\t\t[ \"sScrollY\", \"sY\" ],\n\t\t\t[ \"bScrollCollapse\", \"bCollapse\" ]\n\t\t] );\n\t\t_fnMap( oSettings.oLanguage, oInit, \"fnInfoCallback\" );\n\t\t\n\t\t/* Callback functions which are array driven */\n\t\t_fnCallbackReg( oSettings, 'aoDrawCallback',       oInit.fnDrawCallback );\n\t\t_fnCallbackReg( oSettings, 'aoStateSaveParams',    oInit.fnStateSaveParams );\n\t\t_fnCallbackReg( oSettings, 'aoStateLoadParams',    oInit.fnStateLoadParams );\n\t\t_fnCallbackReg( oSettings, 'aoStateLoaded',        oInit.fnStateLoaded );\n\t\t_fnCallbackReg( oSettings, 'aoRowCallback',        oInit.fnRowCallback );\n\t\t_fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow );\n\t\t_fnCallbackReg( oSettings, 'aoHeaderCallback',     oInit.fnHeaderCallback );\n\t\t_fnCallbackReg( oSettings, 'aoFooterCallback',     oInit.fnFooterCallback );\n\t\t_fnCallbackReg( oSettings, 'aoInitComplete',       oInit.fnInitComplete );\n\t\t_fnCallbackReg( oSettings, 'aoPreDrawCallback',    oInit.fnPreDrawCallback );\n\t\t\n\t\toSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId );\n\t\t\n\t\t/* Browser support detection */\n\t\t_fnBrowserDetect( oSettings );\n\t\t\n\t\tvar oClasses = oSettings.oClasses;\n\t\t\n\t\t$.extend( oClasses, DataTable.ext.classes, oInit.oClasses );\n\t\t$this.addClass( oClasses.table );\n\t\t\n\t\tif (! oSettings.oFeatures.bPaginate) {\n\t\t\toInit.iDisplayStart = 0;\n\t\t}\n\t\t\n\t\tif ( oSettings.iInitDisplayStart === undefined )\n\t\t{\n\t\t\t/* Display start point, taking into account the save saving */\n\t\t\toSettings.iInitDisplayStart = oInit.iDisplayStart;\n\t\t\toSettings._iDisplayStart = oInit.iDisplayStart;\n\t\t}\n\t\t\n\t\tvar defer = oInit.iDeferLoading;\n\t\tif ( defer !== null )\n\t\t{\n\t\t\toSettings.deferLoading = true;\n\t\t\n\t\t\tvar tmp = Array.isArray(defer);\n\t\t\toSettings._iRecordsDisplay = tmp ? defer[0] : defer;\n\t\t\toSettings._iRecordsTotal = tmp ? defer[1] : defer;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Columns\n\t\t * See if we should load columns automatically or use defined ones\n\t\t */\n\t\tvar columnsInit = [];\n\t\tvar thead = this.getElementsByTagName('thead');\n\t\tvar initHeaderLayout = _fnDetectHeader( oSettings, thead[0] );\n\t\t\n\t\t// If we don't have a columns array, then generate one with nulls\n\t\tif ( oInit.aoColumns ) {\n\t\t\tcolumnsInit = oInit.aoColumns;\n\t\t}\n\t\telse if ( initHeaderLayout.length ) {\n\t\t\tfor ( i=0, iLen=initHeaderLayout[0].length ; i<iLen ; i++ ) {\n\t\t\t\tcolumnsInit.push( null );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add the columns\n\t\tfor ( i=0, iLen=columnsInit.length ; i<iLen ; i++ ) {\n\t\t\t_fnAddColumn( oSettings );\n\t\t}\n\t\t\n\t\t// Apply the column definitions\n\t\t_fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, columnsInit, initHeaderLayout, function (iCol, oDef) {\n\t\t\t_fnColumnOptions( oSettings, iCol, oDef );\n\t\t} );\n\t\t\n\t\t/* HTML5 attribute detection - build an mData object automatically if the\n\t\t * attributes are found\n\t\t */\n\t\tvar rowOne = $this.children('tbody').find('tr').eq(0);\n\t\t\n\t\tif ( rowOne.length ) {\n\t\t\tvar a = function ( cell, name ) {\n\t\t\t\treturn cell.getAttribute( 'data-'+name ) !== null ? name : null;\n\t\t\t};\n\t\t\n\t\t\t$( rowOne[0] ).children('th, td').each( function (i, cell) {\n\t\t\t\tvar col = oSettings.aoColumns[i];\n\t\t\n\t\t\t\tif (! col) {\n\t\t\t\t\t_fnLog( oSettings, 0, 'Incorrect column count', 18 );\n\t\t\t\t}\n\t\t\n\t\t\t\tif ( col.mData === i ) {\n\t\t\t\t\tvar sort = a( cell, 'sort' ) || a( cell, 'order' );\n\t\t\t\t\tvar filter = a( cell, 'filter' ) || a( cell, 'search' );\n\t\t\n\t\t\t\t\tif ( sort !== null || filter !== null ) {\n\t\t\t\t\t\tcol.mData = {\n\t\t\t\t\t\t\t_:      i+'.display',\n\t\t\t\t\t\t\tsort:   sort !== null   ? i+'.@data-'+sort   : undefined,\n\t\t\t\t\t\t\ttype:   sort !== null   ? i+'.@data-'+sort   : undefined,\n\t\t\t\t\t\t\tfilter: filter !== null ? i+'.@data-'+filter : undefined\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcol._isArrayHost = true;\n\t\t\n\t\t\t\t\t\t_fnColumnOptions( oSettings, i );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\t\n\t\t// Must be done after everything which can be overridden by the state saving!\n\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState );\n\t\t\n\t\tvar features = oSettings.oFeatures;\n\t\tif ( oInit.bStateSave )\n\t\t{\n\t\t\tfeatures.bStateSave = true;\n\t\t}\n\t\t\n\t\t// If aaSorting is not defined, then we use the first indicator in asSorting\n\t\t// in case that has been altered, so the default sort reflects that option\n\t\tif ( oInit.aaSorting === undefined ) {\n\t\t\tvar sorting = oSettings.aaSorting;\n\t\t\tfor ( i=0, iLen=sorting.length ; i<iLen ; i++ ) {\n\t\t\t\tsorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Do a first pass on the sorting classes (allows any size changes to be taken into\n\t\t// account, and also will apply sorting disabled classes if disabled\n\t\t_fnSortingClasses( oSettings );\n\t\t\n\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', function () {\n\t\t\tif ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {\n\t\t\t\t_fnSortingClasses( oSettings );\n\t\t\t}\n\t\t} );\n\t\t\n\t\t\n\t\t/*\n\t\t * Table HTML init\n\t\t * Cache the header, body and footer as required, creating them if needed\n\t\t */\n\t\tvar caption = $this.children('caption');\n\t\t\n\t\tif ( oSettings.caption ) {\n\t\t\tif ( caption.length === 0 ) {\n\t\t\t\tcaption = $('<caption/>').appendTo( $this );\n\t\t\t}\n\t\t\n\t\t\tcaption.html( oSettings.caption );\n\t\t}\n\t\t\n\t\t// Store the caption side, so we can remove the element from the document\n\t\t// when creating the element\n\t\tif (caption.length) {\n\t\t\tcaption[0]._captionSide = caption.css('caption-side');\n\t\t\toSettings.captionNode = caption[0];\n\t\t}\n\t\t\n\t\tif ( thead.length === 0 ) {\n\t\t\tthead = $('<thead/>').appendTo($this);\n\t\t}\n\t\toSettings.nTHead = thead[0];\n\t\t$('tr', thead).addClass(oClasses.thead.row);\n\t\t\n\t\tvar tbody = $this.children('tbody');\n\t\tif ( tbody.length === 0 ) {\n\t\t\ttbody = $('<tbody/>').insertAfter(thead);\n\t\t}\n\t\toSettings.nTBody = tbody[0];\n\t\t\n\t\tvar tfoot = $this.children('tfoot');\n\t\tif ( tfoot.length === 0 ) {\n\t\t\t// If we are a scrolling table, and no footer has been given, then we need to create\n\t\t\t// a tfoot element for the caption element to be appended to\n\t\t\ttfoot = $('<tfoot/>').appendTo($this);\n\t\t}\n\t\toSettings.nTFoot = tfoot[0];\n\t\t$('tr', tfoot).addClass(oClasses.tfoot.row);\n\t\t\n\t\t// Copy the data index array\n\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\n\t\t// Initialisation complete - table can be drawn\n\t\toSettings.bInitialised = true;\n\t\t\n\t\t// Language definitions\n\t\tvar oLanguage = oSettings.oLanguage;\n\t\t$.extend( true, oLanguage, oInit.oLanguage );\n\t\t\n\t\tif ( oLanguage.sUrl ) {\n\t\t\t// Get the language definitions from a file\n\t\t\t$.ajax( {\n\t\t\t\tdataType: 'json',\n\t\t\t\turl: oLanguage.sUrl,\n\t\t\t\tsuccess: function ( json ) {\n\t\t\t\t\t_fnCamelToHungarian( defaults.oLanguage, json );\n\t\t\t\t\t$.extend( true, oLanguage, json, oSettings.oInit.oLanguage );\n\t\t\n\t\t\t\t\t_fnCallbackFire( oSettings, null, 'i18n', [oSettings], true);\n\t\t\t\t\t_fnInitialise( oSettings );\n\t\t\t\t},\n\t\t\t\terror: function () {\n\t\t\t\t\t// Error occurred loading language file\n\t\t\t\t\t_fnLog( oSettings, 0, 'i18n file loading error', 21 );\n\t\t\n\t\t\t\t\t// Continue on as best we can\n\t\t\t\t\t_fnInitialise( oSettings );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\telse {\n\t\t\t_fnCallbackFire( oSettings, null, 'i18n', [oSettings], true);\n\t\t\t_fnInitialise( oSettings );\n\t\t}\n\t} );\n\t_that = null;\n\treturn this;\n};\n\n\n\n/**\n * DataTables extensions\n * \n * This namespace acts as a collection area for plug-ins that can be used to\n * extend DataTables capabilities. Indeed many of the build in methods\n * use this method to provide their own capabilities (sorting methods for\n * example).\n *\n * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy\n * reasons\n *\n *  @namespace\n */\nDataTable.ext = _ext = {\n\t/**\n\t * Buttons. For use with the Buttons extension for DataTables. This is\n\t * defined here so other extensions can define buttons regardless of load\n\t * order. It is _not_ used by DataTables core.\n\t *\n\t *  @type object\n\t *  @default {}\n\t */\n\tbuttons: {},\n\n\n\t/**\n\t * Element class names\n\t *\n\t *  @type object\n\t *  @default {}\n\t */\n\tclasses: {},\n\n\n\t/**\n\t * DataTables build type (expanded by the download builder)\n\t *\n\t *  @type string\n\t */\n\tbuilder: \"-source-\",\n\n\n\t/**\n\t * Error reporting.\n\t * \n\t * How should DataTables report an error. Can take the value 'alert',\n\t * 'throw', 'none' or a function.\n\t *\n\t *  @type string|function\n\t *  @default alert\n\t */\n\terrMode: \"alert\",\n\n\n\t/**\n\t * Legacy so v1 plug-ins don't throw js errors on load\n\t */\n\tfeature: [],\n\n\t/**\n\t * Feature plug-ins.\n\t * \n\t * This is an object of callbacks which provide the features for DataTables\n\t * to be initialised via the `layout` option.\n\t */\n\tfeatures: {},\n\n\n\t/**\n\t * Row searching.\n\t * \n\t * This method of searching is complimentary to the default type based\n\t * searching, and a lot more comprehensive as it allows you complete control\n\t * over the searching logic. Each element in this array is a function\n\t * (parameters described below) that is called for every row in the table,\n\t * and your logic decides if it should be included in the searching data set\n\t * or not.\n\t *\n\t * Searching functions have the following input parameters:\n\t *\n\t * 1. `{object}` DataTables settings object: see\n\t *    {@link DataTable.models.oSettings}\n\t * 2. `{array|object}` Data for the row to be processed (same as the\n\t *    original format that was passed in as the data source, or an array\n\t *    from a DOM data source\n\t * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which\n\t *    can be useful to retrieve the `TR` element if you need DOM interaction.\n\t *\n\t * And the following return is expected:\n\t *\n\t * * {boolean} Include the row in the searched result set (true) or not\n\t *   (false)\n\t *\n\t * Note that as with the main search ability in DataTables, technically this\n\t * is \"filtering\", since it is subtractive. However, for consistency in\n\t * naming we call it searching here.\n\t *\n\t *  @type array\n\t *  @default []\n\t *\n\t *  @example\n\t *    // The following example shows custom search being applied to the\n\t *    // fourth column (i.e. the data[3] index) based on two input values\n\t *    // from the end-user, matching the data in a certain range.\n\t *    $.fn.dataTable.ext.search.push(\n\t *      function( settings, data, dataIndex ) {\n\t *        var min = document.getElementById('min').value * 1;\n\t *        var max = document.getElementById('max').value * 1;\n\t *        var version = data[3] == \"-\" ? 0 : data[3]*1;\n\t *\n\t *        if ( min == \"\" && max == \"\" ) {\n\t *          return true;\n\t *        }\n\t *        else if ( min == \"\" && version < max ) {\n\t *          return true;\n\t *        }\n\t *        else if ( min < version && \"\" == max ) {\n\t *          return true;\n\t *        }\n\t *        else if ( min < version && version < max ) {\n\t *          return true;\n\t *        }\n\t *        return false;\n\t *      }\n\t *    );\n\t */\n\tsearch: [],\n\n\n\t/**\n\t * Selector extensions\n\t *\n\t * The `selector` option can be used to extend the options available for the\n\t * selector modifier options (`selector-modifier` object data type) that\n\t * each of the three built in selector types offer (row, column and cell +\n\t * their plural counterparts). For example the Select extension uses this\n\t * mechanism to provide an option to select only rows, columns and cells\n\t * that have been marked as selected by the end user (`{selected: true}`),\n\t * which can be used in conjunction with the existing built in selector\n\t * options.\n\t *\n\t * Each property is an array to which functions can be pushed. The functions\n\t * take three attributes:\n\t *\n\t * * Settings object for the host table\n\t * * Options object (`selector-modifier` object type)\n\t * * Array of selected item indexes\n\t *\n\t * The return is an array of the resulting item indexes after the custom\n\t * selector has been applied.\n\t *\n\t *  @type object\n\t */\n\tselector: {\n\t\tcell: [],\n\t\tcolumn: [],\n\t\trow: []\n\t},\n\n\n\t/**\n\t * Legacy configuration options. Enable and disable legacy options that\n\t * are available in DataTables.\n\t *\n\t *  @type object\n\t */\n\tlegacy: {\n\t\t/**\n\t\t * Enable / disable DataTables 1.9 compatible server-side processing\n\t\t * requests\n\t\t *\n\t\t *  @type boolean\n\t\t *  @default null\n\t\t */\n\t\tajax: null\n\t},\n\n\n\t/**\n\t * Pagination plug-in methods.\n\t * \n\t * Each entry in this object is a function and defines which buttons should\n\t * be shown by the pagination rendering method that is used for the table:\n\t * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the\n\t * buttons are displayed in the document, while the functions here tell it\n\t * what buttons to display. This is done by returning an array of button\n\t * descriptions (what each button will do).\n\t *\n\t * Pagination types (the four built in options and any additional plug-in\n\t * options defined here) can be used through the `paginationType`\n\t * initialisation parameter.\n\t *\n\t * The functions defined take two parameters:\n\t *\n\t * 1. `{int} page` The current page index\n\t * 2. `{int} pages` The number of pages in the table\n\t *\n\t * Each function is expected to return an array where each element of the\n\t * array can be one of:\n\t *\n\t * * `first` - Jump to first page when activated\n\t * * `last` - Jump to last page when activated\n\t * * `previous` - Show previous page when activated\n\t * * `next` - Show next page when activated\n\t * * `{int}` - Show page of the index given\n\t * * `{array}` - A nested array containing the above elements to add a\n\t *   containing 'DIV' element (might be useful for styling).\n\t *\n\t * Note that DataTables v1.9- used this object slightly differently whereby\n\t * an object with two functions would be defined for each plug-in. That\n\t * ability is still supported by DataTables 1.10+ to provide backwards\n\t * compatibility, but this option of use is now decremented and no longer\n\t * documented in DataTables 1.10+.\n\t *\n\t *  @type object\n\t *  @default {}\n\t *\n\t *  @example\n\t *    // Show previous, next and current page buttons only\n\t *    $.fn.dataTableExt.oPagination.current = function ( page, pages ) {\n\t *      return [ 'previous', page, 'next' ];\n\t *    };\n\t */\n\tpager: {},\n\n\n\trenderer: {\n\t\tpageButton: {},\n\t\theader: {}\n\t},\n\n\n\t/**\n\t * Ordering plug-ins - custom data source\n\t * \n\t * The extension options for ordering of data available here is complimentary\n\t * to the default type based ordering that DataTables typically uses. It\n\t * allows much greater control over the the data that is being used to\n\t * order a column, but is necessarily therefore more complex.\n\t * \n\t * This type of ordering is useful if you want to do ordering based on data\n\t * live from the DOM (for example the contents of an 'input' element) rather\n\t * than just the static string that DataTables knows of.\n\t * \n\t * The way these plug-ins work is that you create an array of the values you\n\t * wish to be ordering for the column in question and then return that\n\t * array. The data in the array much be in the index order of the rows in\n\t * the table (not the currently ordering order!). Which order data gathering\n\t * function is run here depends on the `dt-init columns.orderDataType`\n\t * parameter that is used for the column (if any).\n\t *\n\t * The functions defined take two parameters:\n\t *\n\t * 1. `{object}` DataTables settings object: see\n\t *    {@link DataTable.models.oSettings}\n\t * 2. `{int}` Target column index\n\t *\n\t * Each function is expected to return an array:\n\t *\n\t * * `{array}` Data for the column to be ordering upon\n\t *\n\t *  @type array\n\t *\n\t *  @example\n\t *    // Ordering using `input` node values\n\t *    $.fn.dataTable.ext.order['dom-text'] = function  ( settings, col )\n\t *    {\n\t *      return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {\n\t *        return $('input', td).val();\n\t *      } );\n\t *    }\n\t */\n\torder: {},\n\n\n\t/**\n\t * Type based plug-ins.\n\t *\n\t * Each column in DataTables has a type assigned to it, either by automatic\n\t * detection or by direct assignment using the `type` option for the column.\n\t * The type of a column will effect how it is ordering and search (plug-ins\n\t * can also make use of the column type if required).\n\t *\n\t * @namespace\n\t */\n\ttype: {\n\t\t/**\n\t\t * Automatic column class assignment\n\t\t */\n\t\tclassName: {},\n\n\t\t/**\n\t\t * Type detection functions.\n\t\t *\n\t\t * The functions defined in this object are used to automatically detect\n\t\t * a column's type, making initialisation of DataTables super easy, even\n\t\t * when complex data is in the table.\n\t\t *\n\t\t * The functions defined take two parameters:\n\t\t *\n\t     *  1. `{*}` Data from the column cell to be analysed\n\t     *  2. `{settings}` DataTables settings object. This can be used to\n\t     *     perform context specific type detection - for example detection\n\t     *     based on language settings such as using a comma for a decimal\n\t     *     place. Generally speaking the options from the settings will not\n\t     *     be required\n\t\t *\n\t\t * Each function is expected to return:\n\t\t *\n\t\t * * `{string|null}` Data type detected, or null if unknown (and thus\n\t\t *   pass it on to the other type detection functions.\n\t\t *\n\t\t *  @type array\n\t\t *\n\t\t *  @example\n\t\t *    // Currency type detection plug-in:\n\t\t *    $.fn.dataTable.ext.type.detect.push(\n\t\t *      function ( data, settings ) {\n\t\t *        // Check the numeric part\n\t\t *        if ( ! data.substring(1).match(/[0-9]/) ) {\n\t\t *          return null;\n\t\t *        }\n\t\t *\n\t\t *        // Check prefixed by currency\n\t\t *        if ( data.charAt(0) == '$' || data.charAt(0) == '&pound;' ) {\n\t\t *          return 'currency';\n\t\t *        }\n\t\t *        return null;\n\t\t *      }\n\t\t *    );\n\t\t */\n\t\tdetect: [],\n\n\t\t/**\n\t\t * Automatic renderer assignment\n\t\t */\n\t\trender: {},\n\n\n\t\t/**\n\t\t * Type based search formatting.\n\t\t *\n\t\t * The type based searching functions can be used to pre-format the\n\t\t * data to be search on. For example, it can be used to strip HTML\n\t\t * tags or to de-format telephone numbers for numeric only searching.\n\t\t *\n\t\t * Note that is a search is not defined for a column of a given type,\n\t\t * no search formatting will be performed.\n\t\t * \n\t\t * Pre-processing of searching data plug-ins - When you assign the sType\n\t\t * for a column (or have it automatically detected for you by DataTables\n\t\t * or a type detection plug-in), you will typically be using this for\n\t\t * custom sorting, but it can also be used to provide custom searching\n\t\t * by allowing you to pre-processing the data and returning the data in\n\t\t * the format that should be searched upon. This is done by adding\n\t\t * functions this object with a parameter name which matches the sType\n\t\t * for that target column. This is the corollary of <i>afnSortData</i>\n\t\t * for searching data.\n\t\t *\n\t\t * The functions defined take a single parameter:\n\t\t *\n\t     *  1. `{*}` Data from the column cell to be prepared for searching\n\t\t *\n\t\t * Each function is expected to return:\n\t\t *\n\t\t * * `{string|null}` Formatted string that will be used for the searching.\n\t\t *\n\t\t *  @type object\n\t\t *  @default {}\n\t\t *\n\t\t *  @example\n\t\t *    $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {\n\t\t *      return d.replace(/\\n/g,\" \").replace( /<.*?>/g, \"\" );\n\t\t *    }\n\t\t */\n\t\tsearch: {},\n\n\n\t\t/**\n\t\t * Type based ordering.\n\t\t *\n\t\t * The column type tells DataTables what ordering to apply to the table\n\t\t * when a column is sorted upon. The order for each type that is defined,\n\t\t * is defined by the functions available in this object.\n\t\t *\n\t\t * Each ordering option can be described by three properties added to\n\t\t * this object:\n\t\t *\n\t\t * * `{type}-pre` - Pre-formatting function\n\t\t * * `{type}-asc` - Ascending order function\n\t\t * * `{type}-desc` - Descending order function\n\t\t *\n\t\t * All three can be used together, only `{type}-pre` or only\n\t\t * `{type}-asc` and `{type}-desc` together. It is generally recommended\n\t\t * that only `{type}-pre` is used, as this provides the optimal\n\t\t * implementation in terms of speed, although the others are provided\n\t\t * for compatibility with existing Javascript sort functions.\n\t\t *\n\t\t * `{type}-pre`: Functions defined take a single parameter:\n\t\t *\n\t     *  1. `{*}` Data from the column cell to be prepared for ordering\n\t\t *\n\t\t * And return:\n\t\t *\n\t\t * * `{*}` Data to be sorted upon\n\t\t *\n\t\t * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort\n\t\t * functions, taking two parameters:\n\t\t *\n\t     *  1. `{*}` Data to compare to the second parameter\n\t     *  2. `{*}` Data to compare to the first parameter\n\t\t *\n\t\t * And returning:\n\t\t *\n\t\t * * `{*}` Ordering match: <0 if first parameter should be sorted lower\n\t\t *   than the second parameter, ===0 if the two parameters are equal and\n\t\t *   >0 if the first parameter should be sorted height than the second\n\t\t *   parameter.\n\t\t * \n\t\t *  @type object\n\t\t *  @default {}\n\t\t *\n\t\t *  @example\n\t\t *    // Numeric ordering of formatted numbers with a pre-formatter\n\t\t *    $.extend( $.fn.dataTable.ext.type.order, {\n\t\t *      \"string-pre\": function(x) {\n\t\t *        a = (a === \"-\" || a === \"\") ? 0 : a.replace( /[^\\d\\-\\.]/g, \"\" );\n\t\t *        return parseFloat( a );\n\t\t *      }\n\t\t *    } );\n\t\t *\n\t\t *  @example\n\t\t *    // Case-sensitive string ordering, with no pre-formatting method\n\t\t *    $.extend( $.fn.dataTable.ext.order, {\n\t\t *      \"string-case-asc\": function(x,y) {\n\t\t *        return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n\t\t *      },\n\t\t *      \"string-case-desc\": function(x,y) {\n\t\t *        return ((x < y) ? 1 : ((x > y) ? -1 : 0));\n\t\t *      }\n\t\t *    } );\n\t\t */\n\t\torder: {}\n\t},\n\n\t/**\n\t * Unique DataTables instance counter\n\t *\n\t * @type int\n\t * @private\n\t */\n\t_unique: 0,\n\n\n\t//\n\t// Depreciated\n\t// The following properties are retained for backwards compatibility only.\n\t// The should not be used in new projects and will be removed in a future\n\t// version\n\t//\n\n\t/**\n\t * Version check function.\n\t *  @type function\n\t *  @depreciated Since 1.10\n\t */\n\tfnVersionCheck: DataTable.fnVersionCheck,\n\n\n\t/**\n\t * Index for what 'this' index API functions should use\n\t *  @type int\n\t *  @deprecated Since v1.10\n\t */\n\tiApiIndex: 0,\n\n\n\t/**\n\t * Software version\n\t *  @type string\n\t *  @deprecated Since v1.10\n\t */\n\tsVersion: DataTable.version\n};\n\n\n//\n// Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts\n//\n$.extend( _ext, {\n\tafnFiltering: _ext.search,\n\taTypes:       _ext.type.detect,\n\tofnSearch:    _ext.type.search,\n\toSort:        _ext.type.order,\n\tafnSortData:  _ext.order,\n\taoFeatures:   _ext.feature,\n\toStdClasses:  _ext.classes,\n\toPagination:  _ext.pager\n} );\n\n\n$.extend( DataTable.ext.classes, {\n\tcontainer: 'dt-container',\n\tempty: {\n\t\trow: 'dt-empty'\n\t},\n\tinfo: {\n\t\tcontainer: 'dt-info'\n\t},\n\tlayout: {\n\t\trow: 'dt-layout-row',\n\t\tcell: 'dt-layout-cell',\n\t\ttableRow: 'dt-layout-table',\n\t\ttableCell: '',\n\t\tstart: 'dt-layout-start',\n\t\tend: 'dt-layout-end',\n\t\tfull: 'dt-layout-full'\n\t},\n\tlength: {\n\t\tcontainer: 'dt-length',\n\t\tselect: 'dt-input'\n\t},\n\torder: {\n\t\tcanAsc: 'dt-orderable-asc',\n\t\tcanDesc: 'dt-orderable-desc',\n\t\tisAsc: 'dt-ordering-asc',\n\t\tisDesc: 'dt-ordering-desc',\n\t\tnone: 'dt-orderable-none',\n\t\tposition: 'sorting_'\n\t},\n\tprocessing: {\n\t\tcontainer: 'dt-processing'\n\t},\n\tscrolling: {\n\t\tbody: 'dt-scroll-body',\n\t\tcontainer: 'dt-scroll',\n\t\tfooter: {\n\t\t\tself: 'dt-scroll-foot',\n\t\t\tinner: 'dt-scroll-footInner'\n\t\t},\n\t\theader: {\n\t\t\tself: 'dt-scroll-head',\n\t\t\tinner: 'dt-scroll-headInner'\n\t\t}\n\t},\n\tsearch: {\n\t\tcontainer: 'dt-search',\n\t\tinput: 'dt-input'\n\t},\n\ttable: 'dataTable',\t\n\ttbody: {\n\t\tcell: '',\n\t\trow: ''\n\t},\n\tthead: {\n\t\tcell: '',\n\t\trow: ''\n\t},\n\ttfoot: {\n\t\tcell: '',\n\t\trow: ''\n\t},\n\tpaging: {\n\t\tactive: 'current',\n\t\tbutton: 'dt-paging-button',\n\t\tcontainer: 'dt-paging',\n\t\tdisabled: 'disabled',\n\t\tnav: ''\n\t}\n} );\n\n\n/*\n * It is useful to have variables which are scoped locally so only the\n * DataTables functions can access them and they don't leak into global space.\n * At the same time these functions are often useful over multiple files in the\n * core and API, so we list, or at least document, all variables which are used\n * by DataTables as private variables here. This also ensures that there is no\n * clashing of variable names and that they can easily referenced for reuse.\n */\n\n\n// Defined else where\n//  _selector_run\n//  _selector_opts\n//  _selector_row_indexes\n\nvar _ext; // DataTable.ext\nvar _Api; // DataTable.Api\nvar _api_register; // DataTable.Api.register\nvar _api_registerPlural; // DataTable.Api.registerPlural\n\nvar _re_dic = {};\nvar _re_new_lines = /[\\r\\n\\u2028]/g;\nvar _re_html = /<([^>]*>)/g;\nvar _max_str_len = Math.pow(2, 28);\n\n// This is not strict ISO8601 - Date.parse() is quite lax, although\n// implementations differ between browsers.\nvar _re_date = /^\\d{2,4}[./-]\\d{1,2}[./-]\\d{1,2}([T ]{1}\\d{1,2}[:.]\\d{2}([.:]\\d{2})?)?$/;\n\n// Escape regular expression special characters\nvar _re_escape_regex = new RegExp( '(\\\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\', '$', '^', '-' ].join('|\\\\') + ')', 'g' );\n\n// https://en.wikipedia.org/wiki/Foreign_exchange_market\n// - \\u20BD - Russian ruble.\n// - \\u20a9 - South Korean Won\n// - \\u20BA - Turkish Lira\n// - \\u20B9 - Indian Rupee\n// - R - Brazil (R$) and South Africa\n// - fr - Swiss Franc\n// - kr - Swedish krona, Norwegian krone and Danish krone\n// - \\u2009 is thin space and \\u202F is narrow no-break space, both used in many\n// - Ƀ - Bitcoin\n// - Ξ - Ethereum\n//   standards as thousands separators.\nvar _re_formatted_numeric = /['\\u00A0,$£€¥%\\u2009\\u202F\\u20BD\\u20a9\\u20BArfkɃΞ]/gi;\n\n\nvar _empty = function ( d ) {\n\treturn !d || d === true || d === '-' ? true : false;\n};\n\n\nvar _intVal = function ( s ) {\n\tvar integer = parseInt( s, 10 );\n\treturn !isNaN(integer) && isFinite(s) ? integer : null;\n};\n\n// Convert from a formatted number with characters other than `.` as the\n// decimal place, to a Javascript number\nvar _numToDecimal = function ( num, decimalPoint ) {\n\t// Cache created regular expressions for speed as this function is called often\n\tif ( ! _re_dic[ decimalPoint ] ) {\n\t\t_re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );\n\t}\n\treturn typeof num === 'string' && decimalPoint !== '.' ?\n\t\tnum.replace( /\\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :\n\t\tnum;\n};\n\n\nvar _isNumber = function ( d, decimalPoint, formatted, allowEmpty ) {\n\tvar type = typeof d;\n\tvar strType = type === 'string';\n\n\tif ( type === 'number' || type === 'bigint') {\n\t\treturn true;\n\t}\n\n\t// If empty return immediately so there must be a number if it is a\n\t// formatted string (this stops the string \"k\", or \"kr\", etc being detected\n\t// as a formatted number for currency\n\tif ( allowEmpty && _empty( d ) ) {\n\t\treturn true;\n\t}\n\n\tif ( decimalPoint && strType ) {\n\t\td = _numToDecimal( d, decimalPoint );\n\t}\n\n\tif ( formatted && strType ) {\n\t\td = d.replace( _re_formatted_numeric, '' );\n\t}\n\n\treturn !isNaN( parseFloat(d) ) && isFinite( d );\n};\n\n\n// A string without HTML in it can be considered to be HTML still\nvar _isHtml = function ( d ) {\n\treturn _empty( d ) || typeof d === 'string';\n};\n\n// Is a string a number surrounded by HTML?\nvar _htmlNumeric = function ( d, decimalPoint, formatted, allowEmpty ) {\n\tif ( allowEmpty && _empty( d ) ) {\n\t\treturn true;\n\t}\n\n\t// input and select strings mean that this isn't just a number\n\tif (typeof d === 'string' && d.match(/<(input|select)/i)) {\n\t\treturn null;\n\t}\n\n\tvar html = _isHtml( d );\n\treturn ! html ?\n\t\tnull :\n\t\t_isNumber( _stripHtml( d ), decimalPoint, formatted, allowEmpty ) ?\n\t\t\ttrue :\n\t\t\tnull;\n};\n\n\nvar _pluck = function ( a, prop, prop2 ) {\n\tvar out = [];\n\tvar i=0, ien=a.length;\n\n\t// Could have the test in the loop for slightly smaller code, but speed\n\t// is essential here\n\tif ( prop2 !== undefined ) {\n\t\tfor ( ; i<ien ; i++ ) {\n\t\t\tif ( a[i] && a[i][ prop ] ) {\n\t\t\t\tout.push( a[i][ prop ][ prop2 ] );\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tfor ( ; i<ien ; i++ ) {\n\t\t\tif ( a[i] ) {\n\t\t\t\tout.push( a[i][ prop ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n};\n\n\n// Basically the same as _pluck, but rather than looping over `a` we use `order`\n// as the indexes to pick from `a`\nvar _pluck_order = function ( a, order, prop, prop2 )\n{\n\tvar out = [];\n\tvar i=0, ien=order.length;\n\n\t// Could have the test in the loop for slightly smaller code, but speed\n\t// is essential here\n\tif ( prop2 !== undefined ) {\n\t\tfor ( ; i<ien ; i++ ) {\n\t\t\tif ( a[ order[i] ] && a[ order[i] ][ prop ] ) {\n\t\t\t\tout.push( a[ order[i] ][ prop ][ prop2 ] );\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tfor ( ; i<ien ; i++ ) {\n\t\t\tif ( a[ order[i] ] ) {\n\t\t\t\tout.push( a[ order[i] ][ prop ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n};\n\n\nvar _range = function ( len, start )\n{\n\tvar out = [];\n\tvar end;\n\n\tif ( start === undefined ) {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\telse {\n\t\tend = start;\n\t\tstart = len;\n\t}\n\n\tfor ( var i=start ; i<end ; i++ ) {\n\t\tout.push( i );\n\t}\n\n\treturn out;\n};\n\n\nvar _removeEmpty = function ( a )\n{\n\tvar out = [];\n\n\tfor ( var i=0, ien=a.length ; i<ien ; i++ ) {\n\t\tif ( a[i] ) { // careful - will remove all falsy values!\n\t\t\tout.push( a[i] );\n\t\t}\n\t}\n\n\treturn out;\n};\n\n// Replaceable function in api.util\nvar _stripHtml = function (input) {\n\tif (! input || typeof input !== 'string') {\n\t\treturn input;\n\t}\n\n\t// Irrelevant check to workaround CodeQL's false positive on the regex\n\tif (input.length > _max_str_len) {\n\t\tthrow new Error('Exceeded max str len');\n\t}\n\n\tvar previous;\n\n\tinput = input.replace(_re_html, ''); // Complete tags\n\n\t// Safety for incomplete script tag - use do / while to ensure that\n\t// we get all instances\n\tdo {\n\t\tprevious = input;\n\t\tinput = input.replace(/<script/i, '');\n\t} while (input !== previous);\n\n\treturn previous;\n};\n\n// Replaceable function in api.util\nvar _escapeHtml = function ( d ) {\n\tif (Array.isArray(d)) {\n\t\td = d.join(',');\n\t}\n\n\treturn typeof d === 'string' ?\n\t\td\n\t\t\t.replace(/&/g, '&amp;')\n\t\t\t.replace(/</g, '&lt;')\n\t\t\t.replace(/>/g, '&gt;')\n\t\t\t.replace(/\"/g, '&quot;') :\n\t\td;\n};\n\n// Remove diacritics from a string by decomposing it and then removing\n// non-ascii characters\nvar _normalize = function (str, both) {\n\tif (typeof str !== 'string') {\n\t\treturn str;\n\t}\n\n\t// It is faster to just run `normalize` than it is to check if\n\t// we need to with a regex! (Check as it isn't available in old\n\t// Safari)\n\tvar res = str.normalize\n\t\t? str.normalize(\"NFD\")\n\t\t: str;\n\n\t// Equally, here we check if a regex is needed or not\n\treturn res.length !== str.length\n\t\t? (both === true ? str + ' ' : '' ) + res.replace(/[\\u0300-\\u036f]/g, \"\")\n\t\t: res;\n}\n\n/**\n * Determine if all values in the array are unique. This means we can short\n * cut the _unique method at the cost of a single loop. A sorted array is used\n * to easily check the values.\n *\n * @param  {array} src Source array\n * @return {boolean} true if all unique, false otherwise\n * @ignore\n */\nvar _areAllUnique = function ( src ) {\n\tif ( src.length < 2 ) {\n\t\treturn true;\n\t}\n\n\tvar sorted = src.slice().sort();\n\tvar last = sorted[0];\n\n\tfor ( var i=1, ien=sorted.length ; i<ien ; i++ ) {\n\t\tif ( sorted[i] === last ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlast = sorted[i];\n\t}\n\n\treturn true;\n};\n\n\n/**\n * Find the unique elements in a source array.\n *\n * @param  {array} src Source array\n * @return {array} Array of unique items\n * @ignore\n */\nvar _unique = function ( src )\n{\n\tif (Array.from && Set) {\n\t\treturn Array.from(new Set(src));\n\t}\n\n\tif ( _areAllUnique( src ) ) {\n\t\treturn src.slice();\n\t}\n\n\t// A faster unique method is to use object keys to identify used values,\n\t// but this doesn't work with arrays or objects, which we must also\n\t// consider. See jsperf.app/compare-array-unique-versions/4 for more\n\t// information.\n\tvar\n\t\tout = [],\n\t\tval,\n\t\ti, ien=src.length,\n\t\tj, k=0;\n\n\tagain: for ( i=0 ; i<ien ; i++ ) {\n\t\tval = src[i];\n\n\t\tfor ( j=0 ; j<k ; j++ ) {\n\t\t\tif ( out[j] === val ) {\n\t\t\t\tcontinue again;\n\t\t\t}\n\t\t}\n\n\t\tout.push( val );\n\t\tk++;\n\t}\n\n\treturn out;\n};\n\n// Surprisingly this is faster than [].concat.apply\n// https://jsperf.com/flatten-an-array-loop-vs-reduce/2\nvar _flatten = function (out, val) {\n\tif (Array.isArray(val)) {\n\t\tfor (var i=0 ; i<val.length ; i++) {\n\t\t\t_flatten(out, val[i]);\n\t\t}\n\t}\n\telse {\n\t\tout.push(val);\n\t}\n\n\treturn out;\n}\n\n// Similar to jQuery's addClass, but use classList.add\nfunction _addClass(el, name) {\n\tif (name) {\n\t\tname.split(' ').forEach(function (n) {\n\t\t\tif (n) {\n\t\t\t\t// `add` does deduplication, so no need to check `contains`\n\t\t\t\tel.classList.add(n);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * DataTables utility methods\n * \n * This namespace provides helper methods that DataTables uses internally to\n * create a DataTable, but which are not exclusively used only for DataTables.\n * These methods can be used by extension authors to save the duplication of\n * code.\n *\n *  @namespace\n */\nDataTable.util = {\n\t/**\n\t * Return a string with diacritic characters decomposed\n\t * @param {*} mixed Function or string to normalize\n\t * @param {*} both Return original string and the normalized string\n\t * @returns String or undefined\n\t */\n\tdiacritics: function (mixed, both) {\n\t\tvar type = typeof mixed;\n\n\t\tif (type !== 'function') {\n\t\t\treturn _normalize(mixed, both);\n\t\t}\n\t\t_normalize = mixed;\n\t},\n\n\t/**\n\t * Debounce a function\n\t *\n\t * @param {function} fn Function to be called\n\t * @param {integer} freq Call frequency in mS\n\t * @return {function} Wrapped function\n\t */\n\tdebounce: function ( fn, timeout ) {\n\t\tvar timer;\n\n\t\treturn function () {\n\t\t\tvar that = this;\n\t\t\tvar args = arguments;\n\n\t\t\tclearTimeout(timer);\n\n\t\t\ttimer = setTimeout( function () {\n\t\t\t\tfn.apply(that, args);\n\t\t\t}, timeout || 250 );\n\t\t};\n\t},\n\n\t/**\n\t * Throttle the calls to a function. Arguments and context are maintained\n\t * for the throttled function.\n\t *\n\t * @param {function} fn Function to be called\n\t * @param {integer} freq Call frequency in mS\n\t * @return {function} Wrapped function\n\t */\n\tthrottle: function ( fn, freq ) {\n\t\tvar\n\t\t\tfrequency = freq !== undefined ? freq : 200,\n\t\t\tlast,\n\t\t\ttimer;\n\n\t\treturn function () {\n\t\t\tvar\n\t\t\t\tthat = this,\n\t\t\t\tnow  = +new Date(),\n\t\t\t\targs = arguments;\n\n\t\t\tif ( last && now < last + frequency ) {\n\t\t\t\tclearTimeout( timer );\n\n\t\t\t\ttimer = setTimeout( function () {\n\t\t\t\t\tlast = undefined;\n\t\t\t\t\tfn.apply( that, args );\n\t\t\t\t}, frequency );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlast = now;\n\t\t\t\tfn.apply( that, args );\n\t\t\t}\n\t\t};\n\t},\n\n\t/**\n\t * Escape a string such that it can be used in a regular expression\n\t *\n\t *  @param {string} val string to escape\n\t *  @returns {string} escaped string\n\t */\n\tescapeRegex: function ( val ) {\n\t\treturn val.replace( _re_escape_regex, '\\\\$1' );\n\t},\n\n\t/**\n\t * Create a function that will write to a nested object or array\n\t * @param {*} source JSON notation string\n\t * @returns Write function\n\t */\n\tset: function ( source ) {\n\t\tif ( $.isPlainObject( source ) ) {\n\t\t\t/* Unlike get, only the underscore (global) option is used for for\n\t\t\t * setting data since we don't know the type here. This is why an object\n\t\t\t * option is not documented for `mData` (which is read/write), but it is\n\t\t\t * for `mRender` which is read only.\n\t\t\t */\n\t\t\treturn DataTable.util.set( source._ );\n\t\t}\n\t\telse if ( source === null ) {\n\t\t\t// Nothing to do when the data source is null\n\t\t\treturn function () {};\n\t\t}\n\t\telse if ( typeof source === 'function' ) {\n\t\t\treturn function (data, val, meta) {\n\t\t\t\tsource( data, 'set', val, meta );\n\t\t\t};\n\t\t}\n\t\telse if (\n\t\t\ttypeof source === 'string' && (source.indexOf('.') !== -1 ||\n\t\t\tsource.indexOf('[') !== -1 || source.indexOf('(') !== -1)\n\t\t) {\n\t\t\t// Like the get, we need to get data from a nested object\n\t\t\tvar setData = function (data, val, src) {\n\t\t\t\tvar a = _fnSplitObjNotation( src ), b;\n\t\t\t\tvar aLast = a[a.length-1];\n\t\t\t\tvar arrayNotation, funcNotation, o, innerSrc;\n\t\n\t\t\t\tfor ( var i=0, iLen=a.length-1 ; i<iLen ; i++ ) {\n\t\t\t\t\t// Protect against prototype pollution\n\t\t\t\t\tif (a[i] === '__proto__' || a[i] === 'constructor') {\n\t\t\t\t\t\tthrow new Error('Cannot set prototype values');\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Check if we are dealing with an array notation request\n\t\t\t\t\tarrayNotation = a[i].match(__reArray);\n\t\t\t\t\tfuncNotation = a[i].match(__reFn);\n\t\n\t\t\t\t\tif ( arrayNotation ) {\n\t\t\t\t\t\ta[i] = a[i].replace(__reArray, '');\n\t\t\t\t\t\tdata[ a[i] ] = [];\n\t\n\t\t\t\t\t\t// Get the remainder of the nested object to set so we can recurse\n\t\t\t\t\t\tb = a.slice();\n\t\t\t\t\t\tb.splice( 0, i+1 );\n\t\t\t\t\t\tinnerSrc = b.join('.');\n\t\n\t\t\t\t\t\t// Traverse each entry in the array setting the properties requested\n\t\t\t\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\t\t\t\tfor ( var j=0, jLen=val.length ; j<jLen ; j++ ) {\n\t\t\t\t\t\t\t\to = {};\n\t\t\t\t\t\t\t\tsetData( o, val[j], innerSrc );\n\t\t\t\t\t\t\t\tdata[ a[i] ].push( o );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// We've been asked to save data to an array, but it\n\t\t\t\t\t\t\t// isn't array data to be saved. Best that can be done\n\t\t\t\t\t\t\t// is to just save the value.\n\t\t\t\t\t\t\tdata[ a[i] ] = val;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// The inner call to setData has already traversed through the remainder\n\t\t\t\t\t\t// of the source and has set the data, thus we can exit here\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( funcNotation ) {\n\t\t\t\t\t\t// Function call\n\t\t\t\t\t\ta[i] = a[i].replace(__reFn, '');\n\t\t\t\t\t\tdata = data[ a[i] ]( val );\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If the nested object doesn't currently exist - since we are\n\t\t\t\t\t// trying to set the value - create it\n\t\t\t\t\tif ( data[ a[i] ] === null || data[ a[i] ] === undefined ) {\n\t\t\t\t\t\tdata[ a[i] ] = {};\n\t\t\t\t\t}\n\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t}\n\t\n\t\t\t\t// Last item in the input - i.e, the actual set\n\t\t\t\tif ( aLast.match(__reFn ) ) {\n\t\t\t\t\t// Function call\n\t\t\t\t\tdata = data[ aLast.replace(__reFn, '') ]( val );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// If array notation is used, we just want to strip it and use the property name\n\t\t\t\t\t// and assign the value. If it isn't used, then we get the result we want anyway\n\t\t\t\t\tdata[ aLast.replace(__reArray, '') ] = val;\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\treturn function (data, val) { // meta is also passed in, but not used\n\t\t\t\treturn setData( data, val, source );\n\t\t\t};\n\t\t}\n\t\telse {\n\t\t\t// Array or flat object mapping\n\t\t\treturn function (data, val) { // meta is also passed in, but not used\n\t\t\t\tdata[source] = val;\n\t\t\t};\n\t\t}\n\t},\n\n\t/**\n\t * Create a function that will read nested objects from arrays, based on JSON notation\n\t * @param {*} source JSON notation string\n\t * @returns Value read\n\t */\n\tget: function ( source ) {\n\t\tif ( $.isPlainObject( source ) ) {\n\t\t\t// Build an object of get functions, and wrap them in a single call\n\t\t\tvar o = {};\n\t\t\t$.each( source, function (key, val) {\n\t\t\t\tif ( val ) {\n\t\t\t\t\to[key] = DataTable.util.get( val );\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\treturn function (data, type, row, meta) {\n\t\t\t\tvar t = o[type] || o._;\n\t\t\t\treturn t !== undefined ?\n\t\t\t\t\tt(data, type, row, meta) :\n\t\t\t\t\tdata;\n\t\t\t};\n\t\t}\n\t\telse if ( source === null ) {\n\t\t\t// Give an empty string for rendering / sorting etc\n\t\t\treturn function (data) { // type, row and meta also passed, but not used\n\t\t\t\treturn data;\n\t\t\t};\n\t\t}\n\t\telse if ( typeof source === 'function' ) {\n\t\t\treturn function (data, type, row, meta) {\n\t\t\t\treturn source( data, type, row, meta );\n\t\t\t};\n\t\t}\n\t\telse if (\n\t\t\ttypeof source === 'string' && (source.indexOf('.') !== -1 ||\n\t\t\tsource.indexOf('[') !== -1 || source.indexOf('(') !== -1)\n\t\t) {\n\t\t\t/* If there is a . in the source string then the data source is in a\n\t\t\t * nested object so we loop over the data for each level to get the next\n\t\t\t * level down. On each loop we test for undefined, and if found immediately\n\t\t\t * return. This allows entire objects to be missing and sDefaultContent to\n\t\t\t * be used if defined, rather than throwing an error\n\t\t\t */\n\t\t\tvar fetchData = function (data, type, src) {\n\t\t\t\tvar arrayNotation, funcNotation, out, innerSrc;\n\t\n\t\t\t\tif ( src !== \"\" ) {\n\t\t\t\t\tvar a = _fnSplitObjNotation( src );\n\t\n\t\t\t\t\tfor ( var i=0, iLen=a.length ; i<iLen ; i++ ) {\n\t\t\t\t\t\t// Check if we are dealing with special notation\n\t\t\t\t\t\tarrayNotation = a[i].match(__reArray);\n\t\t\t\t\t\tfuncNotation = a[i].match(__reFn);\n\t\n\t\t\t\t\t\tif ( arrayNotation ) {\n\t\t\t\t\t\t\t// Array notation\n\t\t\t\t\t\t\ta[i] = a[i].replace(__reArray, '');\n\t\n\t\t\t\t\t\t\t// Condition allows simply [] to be passed in\n\t\t\t\t\t\t\tif ( a[i] !== \"\" ) {\n\t\t\t\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tout = [];\n\t\n\t\t\t\t\t\t\t// Get the remainder of the nested object to get\n\t\t\t\t\t\t\ta.splice( 0, i+1 );\n\t\t\t\t\t\t\tinnerSrc = a.join('.');\n\t\n\t\t\t\t\t\t\t// Traverse each entry in the array getting the properties requested\n\t\t\t\t\t\t\tif ( Array.isArray( data ) ) {\n\t\t\t\t\t\t\t\tfor ( var j=0, jLen=data.length ; j<jLen ; j++ ) {\n\t\t\t\t\t\t\t\t\tout.push( fetchData( data[j], type, innerSrc ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t// If a string is given in between the array notation indicators, that\n\t\t\t\t\t\t\t// is used to join the strings together, otherwise an array is returned\n\t\t\t\t\t\t\tvar join = arrayNotation[0].substring(1, arrayNotation[0].length-1);\n\t\t\t\t\t\t\tdata = (join===\"\") ? out : out.join(join);\n\t\n\t\t\t\t\t\t\t// The inner call to fetchData has already traversed through the remainder\n\t\t\t\t\t\t\t// of the source requested, so we exit from the loop\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( funcNotation ) {\n\t\t\t\t\t\t\t// Function call\n\t\t\t\t\t\t\ta[i] = a[i].replace(__reFn, '');\n\t\t\t\t\t\t\tdata = data[ a[i] ]();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (data === null || data[ a[i] ] === null) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( data === undefined || data[ a[i] ] === undefined ) {\n\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\treturn data;\n\t\t\t};\n\t\n\t\t\treturn function (data, type) { // row and meta also passed, but not used\n\t\t\t\treturn fetchData( data, type, source );\n\t\t\t};\n\t\t}\n\t\telse {\n\t\t\t// Array or flat object mapping\n\t\t\treturn function (data) { // row and meta also passed, but not used\n\t\t\t\treturn data[source];\n\t\t\t};\n\t\t}\n\t},\n\n\tstripHtml: function (mixed) {\n\t\tvar type = typeof mixed;\n\n\t\tif (type === 'function') {\n\t\t\t_stripHtml = mixed;\n\t\t\treturn;\n\t\t}\n\t\telse if (type === 'string') {\n\t\t\treturn _stripHtml(mixed);\n\t\t}\n\t\treturn mixed;\n\t},\n\n\tescapeHtml: function (mixed) {\n\t\tvar type = typeof mixed;\n\n\t\tif (type === 'function') {\n\t\t\t_escapeHtml = mixed;\n\t\t\treturn;\n\t\t}\n\t\telse if (type === 'string' || Array.isArray(mixed)) {\n\t\t\treturn _escapeHtml(mixed);\n\t\t}\n\t\treturn mixed;\n\t},\n\n\tunique: _unique\n};\n\n\n\n/**\n * Create a mapping object that allows camel case parameters to be looked up\n * for their Hungarian counterparts. The mapping is stored in a private\n * parameter called `_hungarianMap` which can be accessed on the source object.\n *  @param {object} o\n *  @memberof DataTable#oApi\n */\nfunction _fnHungarianMap ( o )\n{\n\tvar\n\t\thungarian = 'a aa ai ao as b fn i m o s ',\n\t\tmatch,\n\t\tnewKey,\n\t\tmap = {};\n\n\t$.each( o, function (key) {\n\t\tmatch = key.match(/^([^A-Z]+?)([A-Z])/);\n\n\t\tif ( match && hungarian.indexOf(match[1]+' ') !== -1 )\n\t\t{\n\t\t\tnewKey = key.replace( match[0], match[2].toLowerCase() );\n\t\t\tmap[ newKey ] = key;\n\n\t\t\tif ( match[1] === 'o' )\n\t\t\t{\n\t\t\t\t_fnHungarianMap( o[key] );\n\t\t\t}\n\t\t}\n\t} );\n\n\to._hungarianMap = map;\n}\n\n\n/**\n * Convert from camel case parameters to Hungarian, based on a Hungarian map\n * created by _fnHungarianMap.\n *  @param {object} src The model object which holds all parameters that can be\n *    mapped.\n *  @param {object} user The object to convert from camel case to Hungarian.\n *  @param {boolean} force When set to `true`, properties which already have a\n *    Hungarian value in the `user` object will be overwritten. Otherwise they\n *    won't be.\n *  @memberof DataTable#oApi\n */\nfunction _fnCamelToHungarian ( src, user, force )\n{\n\tif ( ! src._hungarianMap ) {\n\t\t_fnHungarianMap( src );\n\t}\n\n\tvar hungarianKey;\n\n\t$.each( user, function (key) {\n\t\thungarianKey = src._hungarianMap[ key ];\n\n\t\tif ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )\n\t\t{\n\t\t\t// For objects, we need to buzz down into the object to copy parameters\n\t\t\tif ( hungarianKey.charAt(0) === 'o' )\n\t\t\t{\n\t\t\t\t// Copy the camelCase options over to the hungarian\n\t\t\t\tif ( ! user[ hungarianKey ] ) {\n\t\t\t\t\tuser[ hungarianKey ] = {};\n\t\t\t\t}\n\t\t\t\t$.extend( true, user[hungarianKey], user[key] );\n\n\t\t\t\t_fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuser[hungarianKey] = user[ key ];\n\t\t\t}\n\t\t}\n\t} );\n}\n\n/**\n * Map one parameter onto another\n *  @param {object} o Object to map\n *  @param {*} knew The new parameter name\n *  @param {*} old The old parameter name\n */\nvar _fnCompatMap = function ( o, knew, old ) {\n\tif ( o[ knew ] !== undefined ) {\n\t\to[ old ] = o[ knew ];\n\t}\n};\n\n\n/**\n * Provide backwards compatibility for the main DT options. Note that the new\n * options are mapped onto the old parameters, so this is an external interface\n * change only.\n *  @param {object} init Object to map\n */\nfunction _fnCompatOpts ( init )\n{\n\t_fnCompatMap( init, 'ordering',      'bSort' );\n\t_fnCompatMap( init, 'orderMulti',    'bSortMulti' );\n\t_fnCompatMap( init, 'orderClasses',  'bSortClasses' );\n\t_fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );\n\t_fnCompatMap( init, 'order',         'aaSorting' );\n\t_fnCompatMap( init, 'orderFixed',    'aaSortingFixed' );\n\t_fnCompatMap( init, 'paging',        'bPaginate' );\n\t_fnCompatMap( init, 'pagingType',    'sPaginationType' );\n\t_fnCompatMap( init, 'pageLength',    'iDisplayLength' );\n\t_fnCompatMap( init, 'searching',     'bFilter' );\n\n\t// Boolean initialisation of x-scrolling\n\tif ( typeof init.sScrollX === 'boolean' ) {\n\t\tinit.sScrollX = init.sScrollX ? '100%' : '';\n\t}\n\tif ( typeof init.scrollX === 'boolean' ) {\n\t\tinit.scrollX = init.scrollX ? '100%' : '';\n\t}\n\n\t// Column search objects are in an array, so it needs to be converted\n\t// element by element\n\tvar searchCols = init.aoSearchCols;\n\n\tif ( searchCols ) {\n\t\tfor ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {\n\t\t\tif ( searchCols[i] ) {\n\t\t\t\t_fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Enable search delay if server-side processing is enabled\n\tif (init.serverSide && ! init.searchDelay) {\n\t\tinit.searchDelay = 400;\n\t}\n}\n\n\n/**\n * Provide backwards compatibility for column options. Note that the new options\n * are mapped onto the old parameters, so this is an external interface change\n * only.\n *  @param {object} init Object to map\n */\nfunction _fnCompatCols ( init )\n{\n\t_fnCompatMap( init, 'orderable',     'bSortable' );\n\t_fnCompatMap( init, 'orderData',     'aDataSort' );\n\t_fnCompatMap( init, 'orderSequence', 'asSorting' );\n\t_fnCompatMap( init, 'orderDataType', 'sortDataType' );\n\n\t// orderData can be given as an integer\n\tvar dataSort = init.aDataSort;\n\tif ( typeof dataSort === 'number' && ! Array.isArray( dataSort ) ) {\n\t\tinit.aDataSort = [ dataSort ];\n\t}\n}\n\n\n/**\n * Browser feature detection for capabilities, quirks\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnBrowserDetect( settings )\n{\n\t// We don't need to do this every time DataTables is constructed, the values\n\t// calculated are specific to the browser and OS configuration which we\n\t// don't expect to change between initialisations\n\tif ( ! DataTable.__browser ) {\n\t\tvar browser = {};\n\t\tDataTable.__browser = browser;\n\n\t\t// Scrolling feature / quirks detection\n\t\tvar n = $('<div/>')\n\t\t\t.css( {\n\t\t\t\tposition: 'fixed',\n\t\t\t\ttop: 0,\n\t\t\t\tleft: -1 * window.pageXOffset, // allow for scrolling\n\t\t\t\theight: 1,\n\t\t\t\twidth: 1,\n\t\t\t\toverflow: 'hidden'\n\t\t\t} )\n\t\t\t.append(\n\t\t\t\t$('<div/>')\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 1,\n\t\t\t\t\t\tleft: 1,\n\t\t\t\t\t\twidth: 100,\n\t\t\t\t\t\toverflow: 'scroll'\n\t\t\t\t\t} )\n\t\t\t\t\t.append(\n\t\t\t\t\t\t$('<div/>')\n\t\t\t\t\t\t\t.css( {\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\theight: 10\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t)\n\t\t\t)\n\t\t\t.appendTo( 'body' );\n\n\t\tvar outer = n.children();\n\t\tvar inner = outer.children();\n\n\t\t// Get scrollbar width\n\t\tbrowser.barWidth = outer[0].offsetWidth - outer[0].clientWidth;\n\n\t\t// In rtl text layout, some browsers (most, but not all) will place the\n\t\t// scrollbar on the left, rather than the right.\n\t\tbrowser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1;\n\n\t\tn.remove();\n\t}\n\n\t$.extend( settings.oBrowser, DataTable.__browser );\n\tsettings.oScroll.iBarWidth = DataTable.__browser.barWidth;\n}\n\n/**\n * Add a column to the list used for the table with default values\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnAddColumn( oSettings )\n{\n\t// Add column to aoColumns array\n\tvar oDefaults = DataTable.defaults.column;\n\tvar iCol = oSettings.aoColumns.length;\n\tvar oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {\n\t\t\"aDataSort\": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],\n\t\t\"mData\": oDefaults.mData ? oDefaults.mData : iCol,\n\t\tidx: iCol,\n\t\tsearchFixed: {},\n\t\tcolEl: $('<col>').attr('data-dt-column', iCol)\n\t} );\n\toSettings.aoColumns.push( oCol );\n\n\t// Add search object for column specific search. Note that the `searchCols[ iCol ]`\n\t// passed into extend can be undefined. This allows the user to give a default\n\t// with only some of the parameters defined, and also not give a default\n\tvar searchCols = oSettings.aoPreSearchCols;\n\tsearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );\n}\n\n\n/**\n * Apply options for a column\n *  @param {object} oSettings dataTables settings object\n *  @param {int} iCol column index to consider\n *  @param {object} oOptions object with sType, bVisible and bSearchable etc\n *  @memberof DataTable#oApi\n */\nfunction _fnColumnOptions( oSettings, iCol, oOptions )\n{\n\tvar oCol = oSettings.aoColumns[ iCol ];\n\n\t/* User specified column options */\n\tif ( oOptions !== undefined && oOptions !== null )\n\t{\n\t\t// Backwards compatibility\n\t\t_fnCompatCols( oOptions );\n\n\t\t// Map camel case parameters to their Hungarian counterparts\n\t\t_fnCamelToHungarian( DataTable.defaults.column, oOptions, true );\n\n\t\t/* Backwards compatibility for mDataProp */\n\t\tif ( oOptions.mDataProp !== undefined && !oOptions.mData )\n\t\t{\n\t\t\toOptions.mData = oOptions.mDataProp;\n\t\t}\n\n\t\tif ( oOptions.sType )\n\t\t{\n\t\t\toCol._sManualType = oOptions.sType;\n\t\t}\n\t\n\t\t// `class` is a reserved word in Javascript, so we need to provide\n\t\t// the ability to use a valid name for the camel case input\n\t\tif ( oOptions.className && ! oOptions.sClass )\n\t\t{\n\t\t\toOptions.sClass = oOptions.className;\n\t\t}\n\n\t\tvar origClass = oCol.sClass;\n\n\t\t$.extend( oCol, oOptions );\n\t\t_fnMap( oCol, oOptions, \"sWidth\", \"sWidthOrig\" );\n\n\t\t// Merge class from previously defined classes with this one, rather than just\n\t\t// overwriting it in the extend above\n\t\tif (origClass !== oCol.sClass) {\n\t\t\toCol.sClass = origClass + ' ' + oCol.sClass;\n\t\t}\n\n\t\t/* iDataSort to be applied (backwards compatibility), but aDataSort will take\n\t\t * priority if defined\n\t\t */\n\t\tif ( oOptions.iDataSort !== undefined )\n\t\t{\n\t\t\toCol.aDataSort = [ oOptions.iDataSort ];\n\t\t}\n\t\t_fnMap( oCol, oOptions, \"aDataSort\" );\n\t}\n\n\t/* Cache the data get and set functions for speed */\n\tvar mDataSrc = oCol.mData;\n\tvar mData = _fnGetObjectDataFn( mDataSrc );\n\n\t// The `render` option can be given as an array to access the helper rendering methods.\n\t// The first element is the rendering method to use, the rest are the parameters to pass\n\tif ( oCol.mRender && Array.isArray( oCol.mRender ) ) {\n\t\tvar copy = oCol.mRender.slice();\n\t\tvar name = copy.shift();\n\n\t\toCol.mRender = DataTable.render[name].apply(window, copy);\n\t}\n\n\toCol._render = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;\n\n\tvar attrTest = function( src ) {\n\t\treturn typeof src === 'string' && src.indexOf('@') !== -1;\n\t};\n\toCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (\n\t\tattrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)\n\t);\n\toCol._setter = null;\n\n\toCol.fnGetData = function (rowData, type, meta) {\n\t\tvar innerData = mData( rowData, type, undefined, meta );\n\n\t\treturn oCol._render && type ?\n\t\t\toCol._render( innerData, type, rowData, meta ) :\n\t\t\tinnerData;\n\t};\n\toCol.fnSetData = function ( rowData, val, meta ) {\n\t\treturn _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );\n\t};\n\n\t// Indicate if DataTables should read DOM data as an object or array\n\t// Used in _fnGetRowElements\n\tif ( typeof mDataSrc !== 'number' && ! oCol._isArrayHost ) {\n\t\toSettings._rowReadObject = true;\n\t}\n\n\t/* Feature sorting overrides column specific when off */\n\tif ( !oSettings.oFeatures.bSort )\n\t{\n\t\toCol.bSortable = false;\n\t}\n}\n\n\n/**\n * Adjust the table column widths for new data. Note: you would probably want to\n * do a redraw after calling this function!\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnAdjustColumnSizing ( settings )\n{\n\t_fnCalculateColumnWidths( settings );\n\t_fnColumnSizes( settings );\n\n\tvar scroll = settings.oScroll;\n\tif ( scroll.sY !== '' || scroll.sX !== '') {\n\t\t_fnScrollDraw( settings );\n\t}\n\n\t_fnCallbackFire( settings, null, 'column-sizing', [settings] );\n}\n\n/**\n * Apply column sizes\n *\n * @param {*} settings DataTables settings object\n */\nfunction _fnColumnSizes ( settings )\n{\n\tvar cols = settings.aoColumns;\n\n\tfor (var i=0 ; i<cols.length ; i++) {\n\t\tvar width = _fnColumnsSumWidth(settings, [i], false, false);\n\n\t\tcols[i].colEl.css('width', width);\n\t}\n}\n\n\n/**\n * Convert the index of a visible column to the index in the data array (take account\n * of hidden columns)\n *  @param {object} oSettings dataTables settings object\n *  @param {int} iMatch Visible column index to lookup\n *  @returns {int} i the data index\n *  @memberof DataTable#oApi\n */\nfunction _fnVisibleToColumnIndex( oSettings, iMatch )\n{\n\tvar aiVis = _fnGetColumns( oSettings, 'bVisible' );\n\n\treturn typeof aiVis[iMatch] === 'number' ?\n\t\taiVis[iMatch] :\n\t\tnull;\n}\n\n\n/**\n * Convert the index of an index in the data array and convert it to the visible\n *   column index (take account of hidden columns)\n *  @param {int} iMatch Column index to lookup\n *  @param {object} oSettings dataTables settings object\n *  @returns {int} i the data index\n *  @memberof DataTable#oApi\n */\nfunction _fnColumnIndexToVisible( oSettings, iMatch )\n{\n\tvar aiVis = _fnGetColumns( oSettings, 'bVisible' );\n\tvar iPos = aiVis.indexOf(iMatch);\n\n\treturn iPos !== -1 ? iPos : null;\n}\n\n\n/**\n * Get the number of visible columns\n *  @param {object} oSettings dataTables settings object\n *  @returns {int} i the number of visible columns\n *  @memberof DataTable#oApi\n */\nfunction _fnVisbleColumns( settings )\n{\n\tvar layout = settings.aoHeader;\n\tvar columns = settings.aoColumns;\n\tvar vis = 0;\n\n\tif ( layout.length ) {\n\t\tfor ( var i=0, ien=layout[0].length ; i<ien ; i++ ) {\n\t\t\tif ( columns[i].bVisible && $(layout[0][i].cell).css('display') !== 'none' ) {\n\t\t\t\tvis++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vis;\n}\n\n\n/**\n * Get an array of column indexes that match a given property\n *  @param {object} oSettings dataTables settings object\n *  @param {string} sParam Parameter in aoColumns to look for - typically\n *    bVisible or bSearchable\n *  @returns {array} Array of indexes with matched properties\n *  @memberof DataTable#oApi\n */\nfunction _fnGetColumns( oSettings, sParam )\n{\n\tvar a = [];\n\n\toSettings.aoColumns.map( function(val, i) {\n\t\tif ( val[sParam] ) {\n\t\t\ta.push( i );\n\t\t}\n\t} );\n\n\treturn a;\n}\n\n/**\n * Allow the result from a type detection function to be `true` while\n * translating that into a string. Old type detection functions will\n * return the type name if it passes. An obect store would be better,\n * but not backwards compatible.\n *\n * @param {*} typeDetect Object or function for type detection\n * @param {*} res Result from the type detection function\n * @returns Type name or false\n */\nfunction _typeResult (typeDetect, res) {\n\treturn res === true\n\t\t? typeDetect._name\n\t\t: res;\n}\n\n/**\n * Calculate the 'type' of a column\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnColumnTypes ( settings )\n{\n\tvar columns = settings.aoColumns;\n\tvar data = settings.aoData;\n\tvar types = DataTable.ext.type.detect;\n\tvar i, ien, j, jen, k, ken;\n\tvar col, detectedType, cache;\n\n\t// For each column, spin over the data type detection functions, seeing if one matches\n\tfor ( i=0, ien=columns.length ; i<ien ; i++ ) {\n\t\tcol = columns[i];\n\t\tcache = [];\n\n\t\tif ( ! col.sType && col._sManualType ) {\n\t\t\tcol.sType = col._sManualType;\n\t\t}\n\t\telse if ( ! col.sType ) {\n\t\t\t// With SSP type detection can be unreliable and error prone, so we provide a way\n\t\t\t// to turn it off.\n\t\t\tif (! settings.typeDetect) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( j=0, jen=types.length ; j<jen ; j++ ) {\n\t\t\t\tvar typeDetect = types[j];\n\n\t\t\t\t// There can be either one, or three type detection functions\n\t\t\t\tvar oneOf = typeDetect.oneOf;\n\t\t\t\tvar allOf = typeDetect.allOf || typeDetect;\n\t\t\t\tvar init = typeDetect.init;\n\t\t\t\tvar one = false;\n\n\t\t\t\tdetectedType = null;\n\n\t\t\t\t// Fast detect based on column assignment\n\t\t\t\tif (init) {\n\t\t\t\t\tdetectedType = _typeResult(typeDetect, init(settings, col, i));\n\n\t\t\t\t\tif (detectedType) {\n\t\t\t\t\t\tcol.sType = detectedType;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor ( k=0, ken=data.length ; k<ken ; k++ ) {\n\t\t\t\t\tif (! data[k]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Use a cache array so we only need to get the type data\n\t\t\t\t\t// from the formatter once (when using multiple detectors)\n\t\t\t\t\tif ( cache[k] === undefined ) {\n\t\t\t\t\t\tcache[k] = _fnGetCellData( settings, k, i, 'type' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only one data point in the column needs to match this function\n\t\t\t\t\tif (oneOf && ! one) {\n\t\t\t\t\t\tone = _typeResult(typeDetect, oneOf( cache[k], settings ));\n\t\t\t\t\t}\n\n\t\t\t\t\t// All data points need to match this function\n\t\t\t\t\tdetectedType = _typeResult(typeDetect, allOf( cache[k], settings ));\n\n\t\t\t\t\t// If null, then this type can't apply to this column, so\n\t\t\t\t\t// rather than testing all cells, break out. There is an\n\t\t\t\t\t// exception for the last type which is `html`. We need to\n\t\t\t\t\t// scan all rows since it is possible to mix string and HTML\n\t\t\t\t\t// types\n\t\t\t\t\tif ( ! detectedType && j !== types.length-3 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only a single match is needed for html type since it is\n\t\t\t\t\t// bottom of the pile and very similar to string - but it\n\t\t\t\t\t// must not be empty\n\t\t\t\t\tif ( detectedType === 'html' && ! _empty(cache[k]) ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Type is valid for all data points in the column - use this\n\t\t\t\t// type\n\t\t\t\tif ( (oneOf && one && detectedType) || (!oneOf && detectedType) ) {\n\t\t\t\t\tcol.sType = detectedType;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fall back - if no type was detected, always use string\n\t\t\tif ( ! col.sType ) {\n\t\t\t\tcol.sType = 'string';\n\t\t\t}\n\t\t}\n\n\t\t// Set class names for header / footer for auto type classes\n\t\tvar autoClass = _ext.type.className[col.sType];\n\n\t\tif (autoClass) {\n\t\t\t_columnAutoClass(settings.aoHeader, i, autoClass);\n\t\t\t_columnAutoClass(settings.aoFooter, i, autoClass);\n\t\t}\n\n\t\tvar renderer = _ext.type.render[col.sType];\n\n\t\t// This can only happen once! There is no way to remove\n\t\t// a renderer. After the first time the renderer has\n\t\t// already been set so createTr will run the renderer itself.\n\t\tif (renderer && ! col._render) {\n\t\t\tcol._render = DataTable.util.get(renderer);\n\n\t\t\t_columnAutoRender(settings, i);\n\t\t}\n\t}\n}\n\n/**\n * Apply an auto detected renderer to data which doesn't yet have\n * a renderer\n */\nfunction _columnAutoRender(settings, colIdx) {\n\tvar data = settings.aoData;\n\n\tfor (var i=0 ; i<data.length ; i++) {\n\t\tif (data[i].nTr) {\n\t\t\t// We have to update the display here since there is no\n\t\t\t// invalidation check for the data\n\t\t\tvar display = _fnGetCellData( settings, i, colIdx, 'display' );\n\n\t\t\tdata[i].displayData[colIdx] = display;\n\t\t\t_fnWriteCell(data[i].anCells[colIdx], display);\n\n\t\t\t// No need to update sort / filter data since it has\n\t\t\t// been invalidated and will be re-read with the\n\t\t\t// renderer now applied\n\t\t}\n\t}\n}\n\n/**\n * Apply a class name to a column's header cells\n */\nfunction _columnAutoClass(container, colIdx, className) {\n\tcontainer.forEach(function (row) {\n\t\tif (row[colIdx] && row[colIdx].unique) {\n\t\t\t_addClass(row[colIdx].cell, className);\n\t\t}\n\t});\n}\n\n/**\n * Take the column definitions and static columns arrays and calculate how\n * they relate to column indexes. The callback function will then apply the\n * definition found for a column to a suitable configuration object.\n *  @param {object} oSettings dataTables settings object\n *  @param {array} aoColDefs The aoColumnDefs array that is to be applied\n *  @param {array} aoCols The aoColumns array that defines columns individually\n *  @param {array} headerLayout Layout for header as it was loaded\n *  @param {function} fn Callback function - takes two parameters, the calculated\n *    column index and the definition for that column.\n *  @memberof DataTable#oApi\n */\nfunction _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, headerLayout, fn )\n{\n\tvar i, iLen, j, jLen, k, kLen, def;\n\tvar columns = oSettings.aoColumns;\n\n\tif ( aoCols ) {\n\t\tfor ( i=0, iLen=aoCols.length ; i<iLen ; i++ ) {\n\t\t\tif (aoCols[i] && aoCols[i].name) {\n\t\t\t\tcolumns[i].sName = aoCols[i].name;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Column definitions with aTargets\n\tif ( aoColDefs )\n\t{\n\t\t/* Loop over the definitions array - loop in reverse so first instance has priority */\n\t\tfor ( i=aoColDefs.length-1 ; i>=0 ; i-- )\n\t\t{\n\t\t\tdef = aoColDefs[i];\n\n\t\t\t/* Each definition can target multiple columns, as it is an array */\n\t\t\tvar aTargets = def.target !== undefined\n\t\t\t\t? def.target\n\t\t\t\t: def.targets !== undefined\n\t\t\t\t\t? def.targets\n\t\t\t\t\t: def.aTargets;\n\n\t\t\tif ( ! Array.isArray( aTargets ) )\n\t\t\t{\n\t\t\t\taTargets = [ aTargets ];\n\t\t\t}\n\n\t\t\tfor ( j=0, jLen=aTargets.length ; j<jLen ; j++ )\n\t\t\t{\n\t\t\t\tvar target = aTargets[j];\n\n\t\t\t\tif ( typeof target === 'number' && target >= 0 )\n\t\t\t\t{\n\t\t\t\t\t/* Add columns that we don't yet know about */\n\t\t\t\t\twhile( columns.length <= target )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnAddColumn( oSettings );\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Integer, basic index */\n\t\t\t\t\tfn( target, def );\n\t\t\t\t}\n\t\t\t\telse if ( typeof target === 'number' && target < 0 )\n\t\t\t\t{\n\t\t\t\t\t/* Negative integer, right to left column counting */\n\t\t\t\t\tfn( columns.length+target, def );\n\t\t\t\t}\n\t\t\t\telse if ( typeof target === 'string' )\n\t\t\t\t{\n\t\t\t\t\tfor ( k=0, kLen=columns.length ; k<kLen ; k++ ) {\n\t\t\t\t\t\tif (target === '_all') {\n\t\t\t\t\t\t\t// Apply to all columns\n\t\t\t\t\t\t\tfn( k, def );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (target.indexOf(':name') !== -1) {\n\t\t\t\t\t\t\t// Column selector\n\t\t\t\t\t\t\tif (columns[k].sName === target.replace(':name', '')) {\n\t\t\t\t\t\t\t\tfn( k, def );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Cell selector\n\t\t\t\t\t\t\theaderLayout.forEach(function (row) {\n\t\t\t\t\t\t\t\tif (row[k]) {\n\t\t\t\t\t\t\t\t\tvar cell = $(row[k].cell);\n\n\t\t\t\t\t\t\t\t\t// Legacy support. Note that it means that we don't support\n\t\t\t\t\t\t\t\t\t// an element name selector only, since they are treated as\n\t\t\t\t\t\t\t\t\t// class names for 1.x compat.\n\t\t\t\t\t\t\t\t\tif (target.match(/^[a-z][\\w-]*$/i)) {\n\t\t\t\t\t\t\t\t\t\ttarget = '.' + target;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (cell.is( target )) {\n\t\t\t\t\t\t\t\t\t\tfn( k, def );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Statically defined columns array\n\tif ( aoCols ) {\n\t\tfor ( i=0, iLen=aoCols.length ; i<iLen ; i++ ) {\n\t\t\tfn( i, aoCols[i] );\n\t\t}\n\t}\n}\n\n\n/**\n * Get the width for a given set of columns\n *\n * @param {*} settings DataTables settings object\n * @param {*} targets Columns - comma separated string or array of numbers\n * @param {*} original Use the original width (true) or calculated (false)\n * @param {*} incVisible Include visible columns (true) or not (false)\n * @returns Combined CSS value\n */\nfunction _fnColumnsSumWidth( settings, targets, original, incVisible ) {\n\tif ( ! Array.isArray( targets ) ) {\n\t\ttargets = _fnColumnsFromHeader( targets );\n\t}\n\n\tvar sum = 0;\n\tvar unit;\n\tvar columns = settings.aoColumns;\n\t\n\tfor ( var i=0, ien=targets.length ; i<ien ; i++ ) {\n\t\tvar column = columns[ targets[i] ];\n\t\tvar definedWidth = original ?\n\t\t\tcolumn.sWidthOrig :\n\t\t\tcolumn.sWidth;\n\n\t\tif ( ! incVisible && column.bVisible === false ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( definedWidth === null || definedWidth === undefined ) {\n\t\t\treturn null; // can't determine a defined width - browser defined\n\t\t}\n\t\telse if ( typeof definedWidth === 'number' ) {\n\t\t\tunit = 'px';\n\t\t\tsum += definedWidth;\n\t\t}\n\t\telse {\n\t\t\tvar matched = definedWidth.match(/([\\d\\.]+)([^\\d]*)/);\n\n\t\t\tif ( matched ) {\n\t\t\t\tsum += matched[1] * 1;\n\t\t\t\tunit = matched.length === 3 ?\n\t\t\t\t\tmatched[2] :\n\t\t\t\t\t'px';\n\t\t\t}\n\t\t}\n\t}\n\n\treturn sum + unit;\n}\n\nfunction _fnColumnsFromHeader( cell )\n{\n\tvar attr = $(cell).closest('[data-dt-column]').attr('data-dt-column');\n\n\tif ( ! attr ) {\n\t\treturn [];\n\t}\n\n\treturn attr.split(',').map( function (val) {\n\t\treturn val * 1;\n\t} );\n}\n/**\n * Add a data array to the table, creating DOM node etc. This is the parallel to\n * _fnGatherData, but for adding rows from a Javascript source, rather than a\n * DOM source.\n *  @param {object} settings dataTables settings object\n *  @param {array} data data array to be added\n *  @param {node} [tr] TR element to add to the table - optional. If not given,\n *    DataTables will create a row automatically\n *  @param {array} [tds] Array of TD|TH elements for the row - must be given\n *    if nTr is.\n *  @returns {int} >=0 if successful (index of new aoData entry), -1 if failed\n *  @memberof DataTable#oApi\n */\nfunction _fnAddData ( settings, dataIn, tr, tds )\n{\n\t/* Create the object for storing information about this new row */\n\tvar rowIdx = settings.aoData.length;\n\tvar rowModel = $.extend( true, {}, DataTable.models.oRow, {\n\t\tsrc: tr ? 'dom' : 'data',\n\t\tidx: rowIdx\n\t} );\n\n\trowModel._aData = dataIn;\n\tsettings.aoData.push( rowModel );\n\n\tvar columns = settings.aoColumns;\n\n\tfor ( var i=0, iLen=columns.length ; i<iLen ; i++ )\n\t{\n\t\t// Invalidate the column types as the new data needs to be revalidated\n\t\tcolumns[i].sType = null;\n\t}\n\n\t/* Add to the display array */\n\tsettings.aiDisplayMaster.push( rowIdx );\n\n\tvar id = settings.rowIdFn( dataIn );\n\tif ( id !== undefined ) {\n\t\tsettings.aIds[ id ] = rowModel;\n\t}\n\n\t/* Create the DOM information, or register it if already present */\n\tif ( tr || ! settings.oFeatures.bDeferRender )\n\t{\n\t\t_fnCreateTr( settings, rowIdx, tr, tds );\n\t}\n\n\treturn rowIdx;\n}\n\n\n/**\n * Add one or more TR elements to the table. Generally we'd expect to\n * use this for reading data from a DOM sourced table, but it could be\n * used for an TR element. Note that if a TR is given, it is used (i.e.\n * it is not cloned).\n *  @param {object} settings dataTables settings object\n *  @param {array|node|jQuery} trs The TR element(s) to add to the table\n *  @returns {array} Array of indexes for the added rows\n *  @memberof DataTable#oApi\n */\nfunction _fnAddTr( settings, trs )\n{\n\tvar row;\n\n\t// Allow an individual node to be passed in\n\tif ( ! (trs instanceof $) ) {\n\t\ttrs = $(trs);\n\t}\n\n\treturn trs.map( function (i, el) {\n\t\trow = _fnGetRowElements( settings, el );\n\t\treturn _fnAddData( settings, row.data, el, row.cells );\n\t} );\n}\n\n\n/**\n * Get the data for a given cell from the internal cache, taking into account data mapping\n *  @param {object} settings dataTables settings object\n *  @param {int} rowIdx aoData row id\n *  @param {int} colIdx Column index\n *  @param {string} type data get type ('display', 'type' 'filter|search' 'sort|order')\n *  @returns {*} Cell data\n *  @memberof DataTable#oApi\n */\nfunction _fnGetCellData( settings, rowIdx, colIdx, type )\n{\n\tif (type === 'search') {\n\t\ttype = 'filter';\n\t}\n\telse if (type === 'order') {\n\t\ttype = 'sort';\n\t}\n\n\tvar row = settings.aoData[rowIdx];\n\n\tif (! row) {\n\t\treturn undefined;\n\t}\n\n\tvar draw           = settings.iDraw;\n\tvar col            = settings.aoColumns[colIdx];\n\tvar rowData        = row._aData;\n\tvar defaultContent = col.sDefaultContent;\n\tvar cellData       = col.fnGetData( rowData, type, {\n\t\tsettings: settings,\n\t\trow:      rowIdx,\n\t\tcol:      colIdx\n\t} );\n\n\t// Allow for a node being returned for non-display types\n\tif (type !== 'display' && cellData && typeof cellData === 'object' && cellData.nodeName) {\n\t\tcellData = cellData.innerHTML;\n\t}\n\n\tif ( cellData === undefined ) {\n\t\tif ( settings.iDrawError != draw && defaultContent === null ) {\n\t\t\t_fnLog( settings, 0, \"Requested unknown parameter \"+\n\t\t\t\t(typeof col.mData=='function' ? '{function}' : \"'\"+col.mData+\"'\")+\n\t\t\t\t\" for row \"+rowIdx+\", column \"+colIdx, 4 );\n\t\t\tsettings.iDrawError = draw;\n\t\t}\n\t\treturn defaultContent;\n\t}\n\n\t// When the data source is null and a specific data type is requested (i.e.\n\t// not the original data), we can use default column data\n\tif ( (cellData === rowData || cellData === null) && defaultContent !== null && type !== undefined ) {\n\t\tcellData = defaultContent;\n\t}\n\telse if ( typeof cellData === 'function' ) {\n\t\t// If the data source is a function, then we run it and use the return,\n\t\t// executing in the scope of the data object (for instances)\n\t\treturn cellData.call( rowData );\n\t}\n\n\tif ( cellData === null && type === 'display' ) {\n\t\treturn '';\n\t}\n\n\tif ( type === 'filter' ) {\n\t\tvar fomatters = DataTable.ext.type.search;\n\n\t\tif ( fomatters[ col.sType ] ) {\n\t\t\tcellData = fomatters[ col.sType ]( cellData );\n\t\t}\n\t}\n\n\treturn cellData;\n}\n\n\n/**\n * Set the value for a specific cell, into the internal data cache\n *  @param {object} settings dataTables settings object\n *  @param {int} rowIdx aoData row id\n *  @param {int} colIdx Column index\n *  @param {*} val Value to set\n *  @memberof DataTable#oApi\n */\nfunction _fnSetCellData( settings, rowIdx, colIdx, val )\n{\n\tvar col     = settings.aoColumns[colIdx];\n\tvar rowData = settings.aoData[rowIdx]._aData;\n\n\tcol.fnSetData( rowData, val, {\n\t\tsettings: settings,\n\t\trow:      rowIdx,\n\t\tcol:      colIdx\n\t}  );\n}\n\n/**\n * Write a value to a cell\n * @param {*} td Cell\n * @param {*} val Value\n */\nfunction _fnWriteCell(td, val)\n{\n\tif (val && typeof val === 'object' && val.nodeName) {\n\t\t$(td)\n\t\t\t.empty()\n\t\t\t.append(val);\n\t}\n\telse {\n\t\ttd.innerHTML = val;\n\t}\n}\n\n\n// Private variable that is used to match action syntax in the data property object\nvar __reArray = /\\[.*?\\]$/;\nvar __reFn = /\\(\\)$/;\n\n/**\n * Split string on periods, taking into account escaped periods\n * @param  {string} str String to split\n * @return {array} Split string\n */\nfunction _fnSplitObjNotation( str )\n{\n\tvar parts = str.match(/(\\\\.|[^.])+/g) || [''];\n\n\treturn parts.map( function ( s ) {\n\t\treturn s.replace(/\\\\\\./g, '.');\n\t} );\n}\n\n\n/**\n * Return a function that can be used to get data from a source object, taking\n * into account the ability to use nested objects as a source\n *  @param {string|int|function} mSource The data source for the object\n *  @returns {function} Data get function\n *  @memberof DataTable#oApi\n */\nvar _fnGetObjectDataFn = DataTable.util.get;\n\n\n/**\n * Return a function that can be used to set data from a source object, taking\n * into account the ability to use nested objects as a source\n *  @param {string|int|function} mSource The data source for the object\n *  @returns {function} Data set function\n *  @memberof DataTable#oApi\n */\nvar _fnSetObjectDataFn = DataTable.util.set;\n\n\n/**\n * Return an array with the full table data\n *  @param {object} oSettings dataTables settings object\n *  @returns array {array} aData Master data array\n *  @memberof DataTable#oApi\n */\nfunction _fnGetDataMaster ( settings )\n{\n\treturn _pluck( settings.aoData, '_aData' );\n}\n\n\n/**\n * Nuke the table\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnClearTable( settings )\n{\n\tsettings.aoData.length = 0;\n\tsettings.aiDisplayMaster.length = 0;\n\tsettings.aiDisplay.length = 0;\n\tsettings.aIds = {};\n}\n\n\n/**\n * Mark cached data as invalid such that a re-read of the data will occur when\n * the cached data is next requested. Also update from the data source object.\n *\n * @param {object} settings DataTables settings object\n * @param {int}    rowIdx   Row index to invalidate\n * @param {string} [src]    Source to invalidate from: undefined, 'auto', 'dom'\n *     or 'data'\n * @param {int}    [colIdx] Column index to invalidate. If undefined the whole\n *     row will be invalidated\n * @memberof DataTable#oApi\n *\n * @todo For the modularisation of v1.11 this will need to become a callback, so\n *   the sort and filter methods can subscribe to it. That will required\n *   initialisation options for sorting, which is why it is not already baked in\n */\nfunction _fnInvalidate( settings, rowIdx, src, colIdx )\n{\n\tvar row = settings.aoData[ rowIdx ];\n\tvar i, ien;\n\n\t// Remove the cached data for the row\n\trow._aSortData = null;\n\trow._aFilterData = null;\n\trow.displayData = null;\n\n\t// Are we reading last data from DOM or the data object?\n\tif ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {\n\t\t// Read the data from the DOM\n\t\trow._aData = _fnGetRowElements(\n\t\t\t\tsettings, row, colIdx, colIdx === undefined ? undefined : row._aData\n\t\t\t)\n\t\t\t.data;\n\t}\n\telse {\n\t\t// Reading from data object, update the DOM\n\t\tvar cells = row.anCells;\n\t\tvar display = _fnGetRowDisplay(settings, rowIdx);\n\n\t\tif ( cells ) {\n\t\t\tif ( colIdx !== undefined ) {\n\t\t\t\t_fnWriteCell(cells[colIdx], display[colIdx]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor ( i=0, ien=cells.length ; i<ien ; i++ ) {\n\t\t\t\t\t_fnWriteCell(cells[i], display[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Column specific invalidation\n\tvar cols = settings.aoColumns;\n\tif ( colIdx !== undefined ) {\n\t\t// Type - the data might have changed\n\t\tcols[ colIdx ].sType = null;\n\n\t\t// Max length string. Its a fairly cheep recalculation, so not worth\n\t\t// something more complicated\n\t\tcols[ colIdx ].maxLenString = null;\n\t}\n\telse {\n\t\tfor ( i=0, ien=cols.length ; i<ien ; i++ ) {\n\t\t\tcols[i].sType = null;\n\t\t\tcols[i].maxLenString = null;\n\t\t}\n\n\t\t// Update DataTables special `DT_*` attributes for the row\n\t\t_fnRowAttributes( settings, row );\n\t}\n}\n\n\n/**\n * Build a data source object from an HTML row, reading the contents of the\n * cells that are in the row.\n *\n * @param {object} settings DataTables settings object\n * @param {node|object} TR element from which to read data or existing row\n *   object from which to re-read the data from the cells\n * @param {int} [colIdx] Optional column index\n * @param {array|object} [d] Data source object. If `colIdx` is given then this\n *   parameter should also be given and will be used to write the data into.\n *   Only the column in question will be written\n * @returns {object} Object with two parameters: `data` the data read, in\n *   document order, and `cells` and array of nodes (they can be useful to the\n *   caller, so rather than needing a second traversal to get them, just return\n *   them from here).\n * @memberof DataTable#oApi\n */\nfunction _fnGetRowElements( settings, row, colIdx, d )\n{\n\tvar\n\t\ttds = [],\n\t\ttd = row.firstChild,\n\t\tname, col, i=0, contents,\n\t\tcolumns = settings.aoColumns,\n\t\tobjectRead = settings._rowReadObject;\n\n\t// Allow the data object to be passed in, or construct\n\td = d !== undefined ?\n\t\td :\n\t\tobjectRead ?\n\t\t\t{} :\n\t\t\t[];\n\n\tvar attr = function ( str, td  ) {\n\t\tif ( typeof str === 'string' ) {\n\t\t\tvar idx = str.indexOf('@');\n\n\t\t\tif ( idx !== -1 ) {\n\t\t\t\tvar attr = str.substring( idx+1 );\n\t\t\t\tvar setter = _fnSetObjectDataFn( str );\n\t\t\t\tsetter( d, td.getAttribute( attr ) );\n\t\t\t}\n\t\t}\n\t};\n\n\t// Read data from a cell and store into the data object\n\tvar cellProcess = function ( cell ) {\n\t\tif ( colIdx === undefined || colIdx === i ) {\n\t\t\tcol = columns[i];\n\t\t\tcontents = (cell.innerHTML).trim();\n\n\t\t\tif ( col && col._bAttrSrc ) {\n\t\t\t\tvar setter = _fnSetObjectDataFn( col.mData._ );\n\t\t\t\tsetter( d, contents );\n\n\t\t\t\tattr( col.mData.sort, cell );\n\t\t\t\tattr( col.mData.type, cell );\n\t\t\t\tattr( col.mData.filter, cell );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Depending on the `data` option for the columns the data can\n\t\t\t\t// be read to either an object or an array.\n\t\t\t\tif ( objectRead ) {\n\t\t\t\t\tif ( ! col._setter ) {\n\t\t\t\t\t\t// Cache the setter function\n\t\t\t\t\t\tcol._setter = _fnSetObjectDataFn( col.mData );\n\t\t\t\t\t}\n\t\t\t\t\tcol._setter( d, contents );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\td[i] = contents;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ti++;\n\t};\n\n\tif ( td ) {\n\t\t// `tr` element was passed in\n\t\twhile ( td ) {\n\t\t\tname = td.nodeName.toUpperCase();\n\n\t\t\tif ( name == \"TD\" || name == \"TH\" ) {\n\t\t\t\tcellProcess( td );\n\t\t\t\ttds.push( td );\n\t\t\t}\n\n\t\t\ttd = td.nextSibling;\n\t\t}\n\t}\n\telse {\n\t\t// Existing row object passed in\n\t\ttds = row.anCells;\n\n\t\tfor ( var j=0, jen=tds.length ; j<jen ; j++ ) {\n\t\t\tcellProcess( tds[j] );\n\t\t}\n\t}\n\n\t// Read the ID from the DOM if present\n\tvar rowNode = row.firstChild ? row : row.nTr;\n\n\tif ( rowNode ) {\n\t\tvar id = rowNode.getAttribute( 'id' );\n\n\t\tif ( id ) {\n\t\t\t_fnSetObjectDataFn( settings.rowId )( d, id );\n\t\t}\n\t}\n\n\treturn {\n\t\tdata: d,\n\t\tcells: tds\n\t};\n}\n\n/**\n * Render and cache a row's display data for the columns, if required\n * @returns \n */\nfunction _fnGetRowDisplay (settings, rowIdx) {\n\tvar rowModal = settings.aoData[rowIdx];\n\tvar columns = settings.aoColumns;\n\n\tif (! rowModal.displayData) {\n\t\t// Need to render and cache\n\t\trowModal.displayData = [];\n\t\n\t\tfor ( var colIdx=0, len=columns.length ; colIdx<len ; colIdx++ ) {\n\t\t\trowModal.displayData.push(\n\t\t\t\t_fnGetCellData( settings, rowIdx, colIdx, 'display' )\n\t\t\t);\n\t\t}\n\t}\n\n\treturn rowModal.displayData;\n}\n\n/**\n * Create a new TR element (and it's TD children) for a row\n *  @param {object} oSettings dataTables settings object\n *  @param {int} iRow Row to consider\n *  @param {node} [nTrIn] TR element to add to the table - optional. If not given,\n *    DataTables will create a row automatically\n *  @param {array} [anTds] Array of TD|TH elements for the row - must be given\n *    if nTr is.\n *  @memberof DataTable#oApi\n */\nfunction _fnCreateTr ( oSettings, iRow, nTrIn, anTds )\n{\n\tvar\n\t\trow = oSettings.aoData[iRow],\n\t\trowData = row._aData,\n\t\tcells = [],\n\t\tnTr, nTd, oCol,\n\t\ti, iLen, create,\n\t\ttrClass = oSettings.oClasses.tbody.row;\n\n\tif ( row.nTr === null )\n\t{\n\t\tnTr = nTrIn || document.createElement('tr');\n\n\t\trow.nTr = nTr;\n\t\trow.anCells = cells;\n\n\t\t_addClass(nTr, trClass);\n\n\t\t/* Use a private property on the node to allow reserve mapping from the node\n\t\t * to the aoData array for fast look up\n\t\t */\n\t\tnTr._DT_RowIndex = iRow;\n\n\t\t/* Special parameters can be given by the data source to be used on the row */\n\t\t_fnRowAttributes( oSettings, row );\n\n\t\t/* Process each column */\n\t\tfor ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )\n\t\t{\n\t\t\toCol = oSettings.aoColumns[i];\n\t\t\tcreate = nTrIn && anTds[i] ? false : true;\n\n\t\t\tnTd = create ? document.createElement( oCol.sCellType ) : anTds[i];\n\n\t\t\tif (! nTd) {\n\t\t\t\t_fnLog( oSettings, 0, 'Incorrect column count', 18 );\n\t\t\t}\n\n\t\t\tnTd._DT_CellIndex = {\n\t\t\t\trow: iRow,\n\t\t\t\tcolumn: i\n\t\t\t};\n\t\t\t\n\t\t\tcells.push( nTd );\n\t\t\t\n\t\t\tvar display = _fnGetRowDisplay(oSettings, iRow);\n\n\t\t\t// Need to create the HTML if new, or if a rendering function is defined\n\t\t\tif (\n\t\t\t\tcreate ||\n\t\t\t\t(\n\t\t\t\t\t(oCol.mRender || oCol.mData !== i) &&\n\t\t\t\t\t(!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display')\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t_fnWriteCell(nTd, display[i]);\n\t\t\t}\n\n\t\t\t// column class\n\t\t\t_addClass(nTd, oCol.sClass);\n\n\t\t\t// Visibility - add or remove as required\n\t\t\tif ( oCol.bVisible && create )\n\t\t\t{\n\t\t\t\tnTr.appendChild( nTd );\n\t\t\t}\n\t\t\telse if ( ! oCol.bVisible && ! create )\n\t\t\t{\n\t\t\t\tnTd.parentNode.removeChild( nTd );\n\t\t\t}\n\n\t\t\tif ( oCol.fnCreatedCell )\n\t\t\t{\n\t\t\t\toCol.fnCreatedCell.call( oSettings.oInstance,\n\t\t\t\t\tnTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t_fnCallbackFire( oSettings, 'aoRowCreatedCallback', 'row-created', [nTr, rowData, iRow, cells] );\n\t}\n\telse {\n\t\t_addClass(row.nTr, trClass);\n\t}\n}\n\n\n/**\n * Add attributes to a row based on the special `DT_*` parameters in a data\n * source object.\n *  @param {object} settings DataTables settings object\n *  @param {object} DataTables row object for the row to be modified\n *  @memberof DataTable#oApi\n */\nfunction _fnRowAttributes( settings, row )\n{\n\tvar tr = row.nTr;\n\tvar data = row._aData;\n\n\tif ( tr ) {\n\t\tvar id = settings.rowIdFn( data );\n\n\t\tif ( id ) {\n\t\t\ttr.id = id;\n\t\t}\n\n\t\tif ( data.DT_RowClass ) {\n\t\t\t// Remove any classes added by DT_RowClass before\n\t\t\tvar a = data.DT_RowClass.split(' ');\n\t\t\trow.__rowc = row.__rowc ?\n\t\t\t\t_unique( row.__rowc.concat( a ) ) :\n\t\t\t\ta;\n\n\t\t\t$(tr)\n\t\t\t\t.removeClass( row.__rowc.join(' ') )\n\t\t\t\t.addClass( data.DT_RowClass );\n\t\t}\n\n\t\tif ( data.DT_RowAttr ) {\n\t\t\t$(tr).attr( data.DT_RowAttr );\n\t\t}\n\n\t\tif ( data.DT_RowData ) {\n\t\t\t$(tr).data( data.DT_RowData );\n\t\t}\n\t}\n}\n\n\n/**\n * Create the HTML header for the table\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnBuildHead( settings, side )\n{\n\tvar classes = settings.oClasses;\n\tvar columns = settings.aoColumns;\n\tvar i, ien, row;\n\tvar target = side === 'header'\n\t\t? settings.nTHead\n\t\t: settings.nTFoot;\n\tvar titleProp = side === 'header' ? 'sTitle' : side;\n\n\t// Footer might be defined\n\tif (! target) {\n\t\treturn;\n\t}\n\n\t// If no cells yet and we have content for them, then create\n\tif (side === 'header' || _pluck(settings.aoColumns, titleProp).join('')) {\n\t\trow = $('tr', target);\n\n\t\t// Add a row if needed\n\t\tif (! row.length) {\n\t\t\trow = $('<tr/>').appendTo(target)\n\t\t}\n\n\t\t// Add the number of cells needed to make up to the number of columns\n\t\tif (row.length === 1) {\n\t\t\tvar cells = $('td, th', row);\n\n\t\t\tfor ( i=cells.length, ien=columns.length ; i<ien ; i++ ) {\n\t\t\t\t$('<th/>')\n\t\t\t\t\t.html( columns[i][titleProp] || '' )\n\t\t\t\t\t.appendTo( row );\n\t\t\t}\n\t\t}\n\t}\n\n\tvar detected = _fnDetectHeader( settings, target, true );\n\n\tif (side === 'header') {\n\t\tsettings.aoHeader = detected;\n\t}\n\telse {\n\t\tsettings.aoFooter = detected;\n\t}\n\n\t// Every cell needs to be passed through the renderer\n\t$(target).children('tr').children('th, td')\n\t\t.each( function () {\n\t\t\t_fnRenderer( settings, side )(\n\t\t\t\tsettings, $(this), classes\n\t\t\t);\n\t\t} );\n}\n\n/**\n * Build a layout structure for a header or footer\n *\n * @param {*} settings DataTables settings\n * @param {*} source Source layout array\n * @param {*} incColumns What columns should be included\n * @returns Layout array\n */\nfunction _fnHeaderLayout( settings, source, incColumns )\n{\n\tvar row, column, cell;\n\tvar local = [];\n\tvar structure = [];\n\tvar columns = settings.aoColumns;\n\tvar columnCount = columns.length;\n\tvar rowspan, colspan;\n\n\tif ( ! source ) {\n\t\treturn;\n\t}\n\n\t// Default is to work on only visible columns\n\tif ( ! incColumns ) {\n\t\tincColumns = _range(columnCount)\n\t\t\t.filter(function (idx) {\n\t\t\t\treturn columns[idx].bVisible;\n\t\t\t});\n\t}\n\n\t// Make a copy of the master layout array, but with only the columns we want\n\tfor ( row=0 ; row<source.length ; row++ ) {\n\t\t// Remove any columns we haven't selected\n\t\tlocal[row] = source[row].slice().filter(function (cell, i) {\n\t\t\treturn incColumns.includes(i);\n\t\t});\n\n\t\t// Prep the structure array - it needs an element for each row\n\t\tstructure.push( [] );\n\t}\n\n\tfor ( row=0 ; row<local.length ; row++ ) {\n\t\tfor ( column=0 ; column<local[row].length ; column++ ) {\n\t\t\trowspan = 1;\n\t\t\tcolspan = 1;\n\n\t\t\t// Check to see if there is already a cell (row/colspan) covering our target\n\t\t\t// insert point. If there is, then there is nothing to do.\n\t\t\tif ( structure[row][column] === undefined ) {\n\t\t\t\tcell = local[row][column].cell;\n\n\t\t\t\t// Expand for rowspan\n\t\t\t\twhile (\n\t\t\t\t\tlocal[row+rowspan] !== undefined &&\n\t\t\t\t\tlocal[row][column].cell == local[row+rowspan][column].cell\n\t\t\t\t) {\n\t\t\t\t\tstructure[row+rowspan][column] = null;\n\t\t\t\t\trowspan++;\n\t\t\t\t}\n\n\t\t\t\t// And for colspan\n\t\t\t\twhile (\n\t\t\t\t\tlocal[row][column+colspan] !== undefined &&\n\t\t\t\t\tlocal[row][column].cell == local[row][column+colspan].cell\n\t\t\t\t) {\n\t\t\t\t\t// Which also needs to go over rows\n\t\t\t\t\tfor ( var k=0 ; k<rowspan ; k++ ) {\n\t\t\t\t\t\tstructure[row+k][column+colspan] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tcolspan++;\n\t\t\t\t}\n\n\t\t\t\tvar titleSpan = $('span.dt-column-title', cell);\n\n\t\t\t\tstructure[row][column] = {\n\t\t\t\t\tcell: cell,\n\t\t\t\t\tcolspan: colspan,\n\t\t\t\t\trowspan: rowspan,\n\t\t\t\t\ttitle: titleSpan.length\n\t\t\t\t\t\t? titleSpan.html()\n\t\t\t\t\t\t: $(cell).html()\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\treturn structure;\n}\n\n\n/**\n * Draw the header (or footer) element based on the column visibility states.\n *\n *  @param object oSettings dataTables settings object\n *  @param array aoSource Layout array from _fnDetectHeader\n *  @memberof DataTable#oApi\n */\nfunction _fnDrawHead( settings, source )\n{\n\tvar layout = _fnHeaderLayout(settings, source);\n\tvar tr, n;\n\n\tfor ( var row=0 ; row<source.length ; row++ ) {\n\t\ttr = source[row].row;\n\n\t\t// All cells are going to be replaced, so empty out the row\n\t\t// Can't use $().empty() as that kills event handlers\n\t\tif (tr) {\n\t\t\twhile( (n = tr.firstChild) ) {\n\t\t\t\ttr.removeChild( n );\n\t\t\t}\n\t\t}\n\n\t\tfor ( var column=0 ; column<layout[row].length ; column++ ) {\n\t\t\tvar point = layout[row][column];\n\n\t\t\tif (point) {\n\t\t\t\t$(point.cell)\n\t\t\t\t\t.appendTo(tr)\n\t\t\t\t\t.attr('rowspan', point.rowspan)\n\t\t\t\t\t.attr('colspan', point.colspan);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n/**\n * Insert the required TR nodes into the table for display\n *  @param {object} oSettings dataTables settings object\n *  @param ajaxComplete true after ajax call to complete rendering\n *  @memberof DataTable#oApi\n */\nfunction _fnDraw( oSettings, ajaxComplete )\n{\n\t// Allow for state saving and a custom start position\n\t_fnStart( oSettings );\n\n\t/* Provide a pre-callback function which can be used to cancel the draw is false is returned */\n\tvar aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );\n\tif ( aPreDraw.indexOf(false) !== -1 )\n\t{\n\t\t_fnProcessingDisplay( oSettings, false );\n\t\treturn;\n\t}\n\n\tvar anRows = [];\n\tvar iRowCount = 0;\n\tvar bServerSide = _fnDataSource( oSettings ) == 'ssp';\n\tvar aiDisplay = oSettings.aiDisplay;\n\tvar iDisplayStart = oSettings._iDisplayStart;\n\tvar iDisplayEnd = oSettings.fnDisplayEnd();\n\tvar columns = oSettings.aoColumns;\n\tvar body = $(oSettings.nTBody);\n\n\toSettings.bDrawing = true;\n\n\t/* Server-side processing draw intercept */\n\tif ( oSettings.deferLoading )\n\t{\n\t\toSettings.deferLoading = false;\n\t\toSettings.iDraw++;\n\t\t_fnProcessingDisplay( oSettings, false );\n\t}\n\telse if ( !bServerSide )\n\t{\n\t\toSettings.iDraw++;\n\t}\n\telse if ( !oSettings.bDestroying && !ajaxComplete)\n\t{\n\t\t// Show loading message for server-side processing\n\t\tif (oSettings.iDraw === 0) {\n\t\t\tbody.empty().append(_emptyRow(oSettings));\n\t\t}\n\n\t\t_fnAjaxUpdate( oSettings );\n\t\treturn;\n\t}\n\n\tif ( aiDisplay.length !== 0 )\n\t{\n\t\tvar iStart = bServerSide ? 0 : iDisplayStart;\n\t\tvar iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;\n\n\t\tfor ( var j=iStart ; j<iEnd ; j++ )\n\t\t{\n\t\t\tvar iDataIndex = aiDisplay[j];\n\t\t\tvar aoData = oSettings.aoData[ iDataIndex ];\n\t\t\tif ( aoData.nTr === null )\n\t\t\t{\n\t\t\t\t_fnCreateTr( oSettings, iDataIndex );\n\t\t\t}\n\n\t\t\tvar nRow = aoData.nTr;\n\n\t\t\t// Add various classes as needed\n\t\t\tfor (var i=0 ; i<columns.length ; i++) {\n\t\t\t\tvar col = columns[i];\n\t\t\t\tvar td = aoData.anCells[i];\n\n\t\t\t\t_addClass(td, _ext.type.className[col.sType]); // auto class\n\t\t\t\t_addClass(td, oSettings.oClasses.tbody.cell); // all cells\n\t\t\t}\n\n\t\t\t// Row callback functions - might want to manipulate the row\n\t\t\t// iRowCount and j are not currently documented. Are they at all\n\t\t\t// useful?\n\t\t\t_fnCallbackFire( oSettings, 'aoRowCallback', null,\n\t\t\t\t[nRow, aoData._aData, iRowCount, j, iDataIndex] );\n\n\t\t\tanRows.push( nRow );\n\t\t\tiRowCount++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tanRows[ 0 ] = _emptyRow(oSettings);\n\t}\n\n\t/* Header and footer callbacks */\n\t_fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],\n\t\t_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );\n\n\t_fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],\n\t\t_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );\n\n\t// replaceChildren is faster, but only became widespread in 2020,\n\t// so a fall back in jQuery is provided for older browsers.\n\tif (body[0].replaceChildren) {\n\t\tbody[0].replaceChildren.apply(body[0], anRows);\n\t}\n\telse {\n\t\tbody.children().detach();\n\t\tbody.append( $(anRows) );\n\t}\n\n\t// Empty table needs a specific class\n\t$(oSettings.nTableWrapper).toggleClass('dt-empty-footer', $('tr', oSettings.nTFoot).length === 0);\n\n\t/* Call all required callback functions for the end of a draw */\n\t_fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings], true );\n\n\t/* Draw is complete, sorting and filtering must be as well */\n\toSettings.bSorted = false;\n\toSettings.bFiltered = false;\n\toSettings.bDrawing = false;\n}\n\n\n/**\n * Redraw the table - taking account of the various features which are enabled\n *  @param {object} oSettings dataTables settings object\n *  @param {boolean} [holdPosition] Keep the current paging position. By default\n *    the paging is reset to the first page\n *  @memberof DataTable#oApi\n */\nfunction _fnReDraw( settings, holdPosition, recompute )\n{\n\tvar\n\t\tfeatures = settings.oFeatures,\n\t\tsort     = features.bSort,\n\t\tfilter   = features.bFilter;\n\n\tif (recompute === undefined || recompute === true) {\n\t\t// Resolve any column types that are unknown due to addition or invalidation\n\t\t_fnColumnTypes( settings );\n\n\t\tif ( sort ) {\n\t\t\t_fnSort( settings );\n\t\t}\n\n\t\tif ( filter ) {\n\t\t\t_fnFilterComplete( settings, settings.oPreviousSearch );\n\t\t}\n\t\telse {\n\t\t\t// No filtering, so we want to just use the display master\n\t\t\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\t\t}\n\t}\n\n\tif ( holdPosition !== true ) {\n\t\tsettings._iDisplayStart = 0;\n\t}\n\n\t// Let any modules know about the draw hold position state (used by\n\t// scrolling internally)\n\tsettings._drawHold = holdPosition;\n\n\t_fnDraw( settings );\n\n\tsettings._drawHold = false;\n}\n\n\n/*\n * Table is empty - create a row with an empty message in it\n */\nfunction _emptyRow ( settings ) {\n\tvar oLang = settings.oLanguage;\n\tvar zero = oLang.sZeroRecords;\n\tvar dataSrc = _fnDataSource( settings );\n\n\tif (\n\t\t(settings.iDraw < 1 && dataSrc === 'ssp') ||\n\t\t(settings.iDraw <= 1 && dataSrc === 'ajax')\n\t) {\n\t\tzero = oLang.sLoadingRecords;\n\t}\n\telse if ( oLang.sEmptyTable && settings.fnRecordsTotal() === 0 )\n\t{\n\t\tzero = oLang.sEmptyTable;\n\t}\n\n\treturn $( '<tr/>' )\n\t\t.append( $('<td />', {\n\t\t\t'colSpan': _fnVisbleColumns( settings ),\n\t\t\t'class':   settings.oClasses.empty.row\n\t\t} ).html( zero ) )[0];\n}\n\n\n/**\n * Expand the layout items into an object for the rendering function\n */\nfunction _layoutItems (row, align, items) {\n\tif ( Array.isArray(items)) {\n\t\tfor (var i=0 ; i<items.length ; i++) {\n\t\t\t_layoutItems(row, align, items[i]);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tvar rowCell = row[align];\n\n\t// If it is an object, then there can be multiple features contained in it\n\tif ( $.isPlainObject( items ) ) {\n\t\t// A feature plugin cannot be named \"features\" due to this check\n\t\tif (items.features) {\n\t\t\tif (items.rowId) {\n\t\t\t\trow.id = items.rowId;\n\t\t\t}\n\t\t\tif (items.rowClass) {\n\t\t\t\trow.className = items.rowClass;\n\t\t\t}\n\n\t\t\trowCell.id = items.id;\n\t\t\trowCell.className = items.className;\n\n\t\t\t_layoutItems(row, align, items.features);\n\t\t}\n\t\telse {\n\t\t\tObject.keys(items).map(function (key) {\n\t\t\t\trowCell.contents.push( {\n\t\t\t\t\tfeature: key,\n\t\t\t\t\topts: items[key]\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\telse {\n\t\trowCell.contents.push(items);\n\t}\n}\n\n/**\n * Find, or create a layout row\n */\nfunction _layoutGetRow(rows, rowNum, align) {\n\tvar row;\n\n\t// Find existing rows\n\tfor (var i=0; i<rows.length; i++) {\n\t\trow = rows[i];\n\n\t\tif (row.rowNum === rowNum) {\n\t\t\t// full is on its own, but start and end share a row\n\t\t\tif (\n\t\t\t\t(align === 'full' && row.full) ||\n\t\t\t\t((align === 'start' || align === 'end') && (row.start || row.end))\n\t\t\t) {\n\t\t\t\tif (! row[align]) {\n\t\t\t\t\trow[align] = {\n\t\t\t\t\t\tcontents: []\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn row;\n\t\t\t}\n\t\t}\n\t}\n\n\t// If we get this far, then there was no match, create a new row\n\trow = {\n\t\trowNum: rowNum\t\n\t};\n\n\trow[align] = {\n\t\tcontents: []\n\t};\n\n\trows.push(row);\n\n\treturn row;\n}\n\n/**\n * Convert a `layout` object given by a user to the object structure needed\n * for the renderer. This is done twice, once for above and once for below\n * the table. Ordering must also be considered.\n *\n * @param {*} settings DataTables settings object\n * @param {*} layout Layout object to convert\n * @param {string} side `top` or `bottom`\n * @returns Converted array structure - one item for each row.\n */\nfunction _layoutArray ( settings, layout, side ) {\n\tvar rows = [];\n\t\n\t// Split out into an array\n\t$.each( layout, function ( pos, items ) {\n\t\tif (items === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar parts = pos.match(/^([a-z]+)([0-9]*)([A-Za-z]*)$/);\n\t\tvar rowNum = parts[2]\n\t\t\t? parts[2] * 1\n\t\t\t: 0;\n\t\tvar align = parts[3]\n\t\t\t? parts[3].toLowerCase()\n\t\t\t: 'full';\n\n\t\t// Filter out the side we aren't interested in\n\t\tif (parts[1] !== side) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get or create the row we should attach to\n\t\tvar row = _layoutGetRow(rows, rowNum, align);\n\n\t\t_layoutItems(row, align, items);\n\t});\n\n\t// Order by item identifier\n\trows.sort( function ( a, b ) {\n\t\tvar order1 = a.rowNum;\n\t\tvar order2 = b.rowNum;\n\n\t\t// If both in the same row, then the row with `full` comes first\n\t\tif (order1 === order2) {\n\t\t\tvar ret = a.full && ! b.full ? -1 : 1;\n\n\t\t\treturn side === 'bottom'\n\t\t\t\t? ret * -1\n\t\t\t\t: ret;\n\t\t}\n\n\t\treturn order2 - order1;\n\t} );\n\n\t// Invert for below the table\n\tif ( side === 'bottom' ) {\n\t\trows.reverse();\n\t}\n\n\tfor (var row = 0; row<rows.length; row++) {\n\t\tdelete rows[row].rowNum;\n\n\t\t_layoutResolve(settings, rows[row]);\n\t}\n\n\treturn rows;\n}\n\n\n/**\n * Convert the contents of a row's layout object to nodes that can be inserted\n * into the document by a renderer. Execute functions, look up plug-ins, etc.\n *\n * @param {*} settings DataTables settings object\n * @param {*} row Layout object for this row\n */\nfunction _layoutResolve( settings, row ) {\n\tvar getFeature = function (feature, opts) {\n\t\tif ( ! _ext.features[ feature ] ) {\n\t\t\t_fnLog( settings, 0, 'Unknown feature: '+ feature );\n\t\t}\n\n\t\treturn _ext.features[ feature ].apply( this, [settings, opts] );\n\t};\n\n\tvar resolve = function ( item ) {\n\t\tif (! row[ item ]) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar line = row[ item ].contents;\n\n\t\tfor ( var i=0, ien=line.length ; i<ien ; i++ ) {\n\t\t\tif ( ! line[i] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ( typeof line[i] === 'string' ) {\n\t\t\t\tline[i] = getFeature( line[i], null );\n\t\t\t}\n\t\t\telse if ( $.isPlainObject(line[i]) ) {\n\t\t\t\t// If it's an object, it just has feature and opts properties from\n\t\t\t\t// the transform in _layoutArray\n\t\t\t\tline[i] = getFeature(line[i].feature, line[i].opts);\n\t\t\t}\n\t\t\telse if ( typeof line[i].node === 'function' ) {\n\t\t\t\tline[i] = line[i].node( settings );\n\t\t\t}\n\t\t\telse if ( typeof line[i] === 'function' ) {\n\t\t\t\tvar inst = line[i]( settings );\n\n\t\t\t\tline[i] = typeof inst.node === 'function' ?\n\t\t\t\t\tinst.node() :\n\t\t\t\t\tinst;\n\t\t\t}\n\t\t}\n\t};\n\n\tresolve('start');\n\tresolve('end');\n\tresolve('full');\n}\n\n\n/**\n * Add the options to the page HTML for the table\n *  @param {object} settings DataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnAddOptionsHtml ( settings )\n{\n\tvar classes = settings.oClasses;\n\tvar table = $(settings.nTable);\n\n\t// Wrapper div around everything DataTables controls\n\tvar insert = $('<div/>')\n\t\t.attr({\n\t\t\tid:      settings.sTableId+'_wrapper',\n\t\t\t'class': classes.container\n\t\t})\n\t\t.insertBefore(table);\n\n\tsettings.nTableWrapper = insert[0];\n\n\tif (settings.sDom) {\n\t\t// Legacy\n\t\t_fnLayoutDom(settings, settings.sDom, insert);\n\t}\n\telse {\n\t\tvar top = _layoutArray( settings, settings.layout, 'top' );\n\t\tvar bottom = _layoutArray( settings, settings.layout, 'bottom' );\n\t\tvar renderer = _fnRenderer( settings, 'layout' );\n\t\n\t\t// Everything above - the renderer will actually insert the contents into the document\n\t\ttop.forEach(function (item) {\n\t\t\trenderer( settings, insert, item );\n\t\t});\n\n\t\t// The table - always the center of attention\n\t\trenderer( settings, insert, {\n\t\t\tfull: {\n\t\t\t\ttable: true,\n\t\t\t\tcontents: [ _fnFeatureHtmlTable(settings) ]\n\t\t\t}\n\t\t} );\n\n\t\t// Everything below\n\t\tbottom.forEach(function (item) {\n\t\t\trenderer( settings, insert, item );\n\t\t});\n\t}\n\n\t// Processing floats on top, so it isn't an inserted feature\n\t_processingHtml( settings );\n}\n\n/**\n * Draw the table with the legacy DOM property\n * @param {*} settings DT settings object\n * @param {*} dom DOM string\n * @param {*} insert Insert point\n */\nfunction _fnLayoutDom( settings, dom, insert )\n{\n\tvar parts = dom.match(/(\".*?\")|('.*?')|./g);\n\tvar featureNode, option, newNode, next, attr;\n\n\tfor ( var i=0 ; i<parts.length ; i++ ) {\n\t\tfeatureNode = null;\n\t\toption = parts[i];\n\n\t\tif ( option == '<' ) {\n\t\t\t// New container div\n\t\t\tnewNode = $('<div/>');\n\n\t\t\t// Check to see if we should append an id and/or a class name to the container\n\t\t\tnext = parts[i+1];\n\n\t\t\tif ( next[0] == \"'\" || next[0] == '\"' ) {\n\t\t\t\tattr = next.replace(/['\"]/g, '');\n\n\t\t\t\tvar id = '', className;\n\n\t\t\t\t/* The attribute can be in the format of \"#id.class\", \"#id\" or \"class\" This logic\n\t\t\t\t * breaks the string into parts and applies them as needed\n\t\t\t\t */\n\t\t\t\tif ( attr.indexOf('.') != -1 ) {\n\t\t\t\t\tvar split = attr.split('.');\n\n\t\t\t\t\tid = split[0];\n\t\t\t\t\tclassName = split[1];\n\t\t\t\t}\n\t\t\t\telse if ( attr[0] == \"#\" ) {\n\t\t\t\t\tid = attr;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclassName = attr;\n\t\t\t\t}\n\n\t\t\t\tnewNode\n\t\t\t\t\t.attr('id', id.substring(1))\n\t\t\t\t\t.addClass(className);\n\n\t\t\t\ti++; // Move along the position array\n\t\t\t}\n\n\t\t\tinsert.append( newNode );\n\t\t\tinsert = newNode;\n\t\t}\n\t\telse if ( option == '>' ) {\n\t\t\t// End container div\n\t\t\tinsert = insert.parent();\n\t\t}\n\t\telse if ( option == 't' ) {\n\t\t\t// Table\n\t\t\tfeatureNode = _fnFeatureHtmlTable( settings );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDataTable.ext.feature.forEach(function(feature) {\n\t\t\t\tif ( option == feature.cFeature ) {\n\t\t\t\t\tfeatureNode = feature.fnInit( settings );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Add to the display\n\t\tif ( featureNode ) {\n\t\t\tinsert.append( featureNode );\n\t\t}\n\t}\n}\n\n\n/**\n * Use the DOM source to create up an array of header cells. The idea here is to\n * create a layout grid (array) of rows x columns, which contains a reference\n * to the cell that that point in the grid (regardless of col/rowspan), such that\n * any column / row could be removed and the new grid constructed\n *  @param {node} thead The header/footer element for the table\n *  @returns {array} Calculated layout array\n *  @memberof DataTable#oApi\n */\nfunction _fnDetectHeader ( settings, thead, write )\n{\n\tvar columns = settings.aoColumns;\n\tvar rows = $(thead).children('tr');\n\tvar row, cell;\n\tvar i, k, l, iLen, shifted, column, colspan, rowspan;\n\tvar isHeader = thead && thead.nodeName.toLowerCase() === 'thead';\n\tvar layout = [];\n\tvar unique;\n\tvar shift = function ( a, i, j ) {\n\t\tvar k = a[i];\n\t\twhile ( k[j] ) {\n\t\t\tj++;\n\t\t}\n\t\treturn j;\n\t};\n\n\t// We know how many rows there are in the layout - so prep it\n\tfor ( i=0, iLen=rows.length ; i<iLen ; i++ ) {\n\t\tlayout.push( [] );\n\t}\n\n\tfor ( i=0, iLen=rows.length ; i<iLen ; i++ ) {\n\t\trow = rows[i];\n\t\tcolumn = 0;\n\n\t\t// For every cell in the row..\n\t\tcell = row.firstChild;\n\t\twhile ( cell ) {\n\t\t\tif (\n\t\t\t\tcell.nodeName.toUpperCase() == 'TD' ||\n\t\t\t\tcell.nodeName.toUpperCase() == 'TH'\n\t\t\t) {\n\t\t\t\tvar cols = [];\n\n\t\t\t\t// Get the col and rowspan attributes from the DOM and sanitise them\n\t\t\t\tcolspan = cell.getAttribute('colspan') * 1;\n\t\t\t\trowspan = cell.getAttribute('rowspan') * 1;\n\t\t\t\tcolspan = (!colspan || colspan===0 || colspan===1) ? 1 : colspan;\n\t\t\t\trowspan = (!rowspan || rowspan===0 || rowspan===1) ? 1 : rowspan;\n\n\t\t\t\t// There might be colspan cells already in this row, so shift our target\n\t\t\t\t// accordingly\n\t\t\t\tshifted = shift( layout, i, column );\n\n\t\t\t\t// Cache calculation for unique columns\n\t\t\t\tunique = colspan === 1 ?\n\t\t\t\t\ttrue :\n\t\t\t\t\tfalse;\n\t\t\t\t\n\t\t\t\t// Perform header setup\n\t\t\t\tif ( write ) {\n\t\t\t\t\tif (unique) {\n\t\t\t\t\t\t// Allow column options to be set from HTML attributes\n\t\t\t\t\t\t_fnColumnOptions( settings, shifted, $(cell).data() );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Get the width for the column. This can be defined from the\n\t\t\t\t\t\t// width attribute, style attribute or `columns.width` option\n\t\t\t\t\t\tvar columnDef = columns[shifted];\n\t\t\t\t\t\tvar width = cell.getAttribute('width') || null;\n\t\t\t\t\t\tvar t = cell.style.width.match(/width:\\s*(\\d+[pxem%]+)/);\n\t\t\t\t\t\tif ( t ) {\n\t\t\t\t\t\t\twidth = t[1];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcolumnDef.sWidthOrig = columnDef.sWidth || width;\n\n\t\t\t\t\t\tif (isHeader) {\n\t\t\t\t\t\t\t// Column title handling - can be user set, or read from the DOM\n\t\t\t\t\t\t\t// This happens before the render, so the original is still in place\n\t\t\t\t\t\t\tif ( columnDef.sTitle !== null && ! columnDef.autoTitle ) {\n\t\t\t\t\t\t\t\tcell.innerHTML = columnDef.sTitle;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (! columnDef.sTitle && unique) {\n\t\t\t\t\t\t\t\tcolumnDef.sTitle = _stripHtml(cell.innerHTML);\n\t\t\t\t\t\t\t\tcolumnDef.autoTitle = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Footer specific operations\n\t\t\t\t\t\t\tif (columnDef.footer) {\n\t\t\t\t\t\t\t\tcell.innerHTML = columnDef.footer;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Fall back to the aria-label attribute on the table header if no ariaTitle is\n\t\t\t\t\t\t// provided.\n\t\t\t\t\t\tif (! columnDef.ariaTitle) {\n\t\t\t\t\t\t\tcolumnDef.ariaTitle = $(cell).attr(\"aria-label\") || columnDef.sTitle;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Column specific class names\n\t\t\t\t\t\tif ( columnDef.className ) {\n\t\t\t\t\t\t\t$(cell).addClass( columnDef.className );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wrap the column title so we can write to it in future\n\t\t\t\t\tif ( $('span.dt-column-title', cell).length === 0) {\n\t\t\t\t\t\t$('<span>')\n\t\t\t\t\t\t\t.addClass('dt-column-title')\n\t\t\t\t\t\t\t.append(cell.childNodes)\n\t\t\t\t\t\t\t.appendTo(cell);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isHeader && $('span.dt-column-order', cell).length === 0) {\n\t\t\t\t\t\t$('<span>')\n\t\t\t\t\t\t\t.addClass('dt-column-order')\n\t\t\t\t\t\t\t.appendTo(cell);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there is col / rowspan, copy the information into the layout grid\n\t\t\t\tfor ( l=0 ; l<colspan ; l++ ) {\n\t\t\t\t\tfor ( k=0 ; k<rowspan ; k++ ) {\n\t\t\t\t\t\tlayout[i+k][shifted+l] = {\n\t\t\t\t\t\t\tcell: cell,\n\t\t\t\t\t\t\tunique: unique\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tlayout[i+k].row = row;\n\t\t\t\t\t}\n\n\t\t\t\t\tcols.push( shifted+l );\n\t\t\t\t}\n\n\t\t\t\t// Assign an attribute so spanning cells can still be identified\n\t\t\t\t// as belonging to a column\n\t\t\t\tcell.setAttribute('data-dt-column', _unique(cols).join(','));\n\t\t\t}\n\n\t\t\tcell = cell.nextSibling;\n\t\t}\n\t}\n\n\treturn layout;\n}\n\n/**\n * Set the start position for draw\n *  @param {object} oSettings dataTables settings object\n */\nfunction _fnStart( oSettings )\n{\n\tvar bServerSide = _fnDataSource( oSettings ) == 'ssp';\n\tvar iInitDisplayStart = oSettings.iInitDisplayStart;\n\n\t// Check and see if we have an initial draw position from state saving\n\tif ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )\n\t{\n\t\toSettings._iDisplayStart = bServerSide ?\n\t\t\tiInitDisplayStart :\n\t\t\tiInitDisplayStart >= oSettings.fnRecordsDisplay() ?\n\t\t\t\t0 :\n\t\t\t\tiInitDisplayStart;\n\n\t\toSettings.iInitDisplayStart = -1;\n\t}\n}\n\n/**\n * Create an Ajax call based on the table's settings, taking into account that\n * parameters can have multiple forms, and backwards compatibility.\n *\n * @param {object} oSettings dataTables settings object\n * @param {array} data Data to send to the server, required by\n *     DataTables - may be augmented by developer callbacks\n * @param {function} fn Callback function to run when data is obtained\n */\nfunction _fnBuildAjax( oSettings, data, fn )\n{\n\tvar ajaxData;\n\tvar ajax = oSettings.ajax;\n\tvar instance = oSettings.oInstance;\n\tvar callback = function ( json ) {\n\t\tvar status = oSettings.jqXHR\n\t\t\t? oSettings.jqXHR.status\n\t\t\t: null;\n\n\t\tif ( json === null || (typeof status === 'number' && status == 204 ) ) {\n\t\t\tjson = {};\n\t\t\t_fnAjaxDataSrc( oSettings, json, [] );\n\t\t}\n\n\t\tvar error = json.error || json.sError;\n\t\tif ( error ) {\n\t\t\t_fnLog( oSettings, 0, error );\n\t\t}\n\n\t\t// Microsoft often wrap JSON as a string in another JSON object\n\t\t// Let's handle that automatically\n\t\tif (json.d && typeof json.d === 'string') {\n\t\t\ttry {\n\t\t\t\tjson = JSON.parse(json.d);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n\n\t\toSettings.json = json;\n\n\t\t_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR], true );\n\t\tfn( json );\n\t};\n\n\tif ( $.isPlainObject( ajax ) && ajax.data )\n\t{\n\t\tajaxData = ajax.data;\n\n\t\tvar newData = typeof ajaxData === 'function' ?\n\t\t\tajaxData( data, oSettings ) :  // fn can manipulate data or return\n\t\t\tajaxData;                      // an object object or array to merge\n\n\t\t// If the function returned something, use that alone\n\t\tdata = typeof ajaxData === 'function' && newData ?\n\t\t\tnewData :\n\t\t\t$.extend( true, data, newData );\n\n\t\t// Remove the data property as we've resolved it already and don't want\n\t\t// jQuery to do it again (it is restored at the end of the function)\n\t\tdelete ajax.data;\n\t}\n\n\tvar baseAjax = {\n\t\t\"url\": typeof ajax === 'string' ?\n\t\t\tajax :\n\t\t\t'',\n\t\t\"data\": data,\n\t\t\"success\": callback,\n\t\t\"dataType\": \"json\",\n\t\t\"cache\": false,\n\t\t\"type\": oSettings.sServerMethod,\n\t\t\"error\": function (xhr, error) {\n\t\t\tvar ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR], true );\n\n\t\t\tif ( ret.indexOf(true) === -1 ) {\n\t\t\t\tif ( error == \"parsererror\" ) {\n\t\t\t\t\t_fnLog( oSettings, 0, 'Invalid JSON response', 1 );\n\t\t\t\t}\n\t\t\t\telse if ( xhr.readyState === 4 ) {\n\t\t\t\t\t_fnLog( oSettings, 0, 'Ajax error', 7 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t}\n\t};\n\n\t// If `ajax` option is an object, extend and override our default base\n\tif ( $.isPlainObject( ajax ) ) {\n\t\t$.extend( baseAjax, ajax )\n\t}\n\n\t// Store the data submitted for the API\n\toSettings.oAjaxData = data;\n\n\t// Allow plug-ins and external processes to modify the data\n\t_fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data, baseAjax], true );\n\n\tif ( typeof ajax === 'function' )\n\t{\n\t\t// Is a function - let the caller define what needs to be done\n\t\toSettings.jqXHR = ajax.call( instance, data, callback, oSettings );\n\t}\n\telse if (ajax.url === '') {\n\t\t// No url, so don't load any data. Just apply an empty data array\n\t\t// to the object for the callback.\n\t\tvar empty = {};\n\n\t\tDataTable.util.set(ajax.dataSrc)(empty, []);\n\t\tcallback(empty);\n\t}\n\telse {\n\t\t// Object to extend the base settings\n\t\toSettings.jqXHR = $.ajax( baseAjax );\n\t}\n\n\t// Restore for next time around\n\tif ( ajaxData ) {\n\t\tajax.data = ajaxData;\n\t}\n}\n\n\n/**\n * Update the table using an Ajax call\n *  @param {object} settings dataTables settings object\n *  @returns {boolean} Block the table drawing or not\n *  @memberof DataTable#oApi\n */\nfunction _fnAjaxUpdate( settings )\n{\n\tsettings.iDraw++;\n\t_fnProcessingDisplay( settings, true );\n\n\t_fnBuildAjax(\n\t\tsettings,\n\t\t_fnAjaxParameters( settings ),\n\t\tfunction(json) {\n\t\t\t_fnAjaxUpdateDraw( settings, json );\n\t\t}\n\t);\n}\n\n\n/**\n * Build up the parameters in an object needed for a server-side processing\n * request.\n *  @param {object} oSettings dataTables settings object\n *  @returns {bool} block the table drawing or not\n *  @memberof DataTable#oApi\n */\nfunction _fnAjaxParameters( settings )\n{\n\tvar\n\t\tcolumns = settings.aoColumns,\n\t\tfeatures = settings.oFeatures,\n\t\tpreSearch = settings.oPreviousSearch,\n\t\tpreColSearch = settings.aoPreSearchCols,\n\t\tcolData = function ( idx, prop ) {\n\t\t\treturn typeof columns[idx][prop] === 'function' ?\n\t\t\t\t'function' :\n\t\t\t\tcolumns[idx][prop];\n\t\t};\n\n\treturn {\n\t\tdraw: settings.iDraw,\n\t\tcolumns: columns.map( function ( column, i ) {\n\t\t\treturn {\n\t\t\t\tdata: colData(i, 'mData'),\n\t\t\t\tname: column.sName,\n\t\t\t\tsearchable: column.bSearchable,\n\t\t\t\torderable: column.bSortable,\n\t\t\t\tsearch: {\n\t\t\t\t\tvalue: preColSearch[i].search,\n\t\t\t\t\tregex: preColSearch[i].regex,\n\t\t\t\t\tfixed: Object.keys(column.searchFixed).map( function(name) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tname: name,\n\t\t\t\t\t\t\tterm: column.searchFixed[name].toString()\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t};\n\t\t} ),\n\t\torder: _fnSortFlatten( settings ).map( function ( val ) {\n\t\t\treturn {\n\t\t\t\tcolumn: val.col,\n\t\t\t\tdir: val.dir,\n\t\t\t\tname: colData(val.col, 'sName')\n\t\t\t};\n\t\t} ),\n\t\tstart: settings._iDisplayStart,\n\t\tlength: features.bPaginate ?\n\t\t\tsettings._iDisplayLength :\n\t\t\t-1,\n\t\tsearch: {\n\t\t\tvalue: preSearch.search,\n\t\t\tregex: preSearch.regex,\n\t\t\tfixed: Object.keys(settings.searchFixed).map( function(name) {\n\t\t\t\treturn {\n\t\t\t\t\tname: name,\n\t\t\t\t\tterm: settings.searchFixed[name].toString()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t};\n}\n\n\n/**\n * Data the data from the server (nuking the old) and redraw the table\n *  @param {object} oSettings dataTables settings object\n *  @param {object} json json data return from the server.\n *  @param {string} json.sEcho Tracking flag for DataTables to match requests\n *  @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering\n *  @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering\n *  @param {array} json.aaData The data to display on this page\n *  @param {string} [json.sColumns] Column ordering (sName, comma separated)\n *  @memberof DataTable#oApi\n */\nfunction _fnAjaxUpdateDraw ( settings, json )\n{\n\tvar data = _fnAjaxDataSrc(settings, json);\n\tvar draw = _fnAjaxDataSrcParam(settings, 'draw', json);\n\tvar recordsTotal = _fnAjaxDataSrcParam(settings, 'recordsTotal', json);\n\tvar recordsFiltered = _fnAjaxDataSrcParam(settings, 'recordsFiltered', json);\n\n\tif ( draw !== undefined ) {\n\t\t// Protect against out of sequence returns\n\t\tif ( draw*1 < settings.iDraw ) {\n\t\t\treturn;\n\t\t}\n\t\tsettings.iDraw = draw * 1;\n\t}\n\n\t// No data in returned object, so rather than an array, we show an empty table\n\tif ( ! data ) {\n\t\tdata = [];\n\t}\n\n\t_fnClearTable( settings );\n\tsettings._iRecordsTotal   = parseInt(recordsTotal, 10);\n\tsettings._iRecordsDisplay = parseInt(recordsFiltered, 10);\n\n\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t_fnAddData( settings, data[i] );\n\t}\n\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\n\t_fnColumnTypes(settings);\n\t_fnDraw( settings, true );\n\t_fnInitComplete( settings );\n\t_fnProcessingDisplay( settings, false );\n}\n\n\n/**\n * Get the data from the JSON data source to use for drawing a table. Using\n * `_fnGetObjectDataFn` allows the data to be sourced from a property of the\n * source object, or from a processing function.\n *  @param {object} settings dataTables settings object\n *  @param  {object} json Data source object / array from the server\n *  @return {array} Array of data to use\n */\nfunction _fnAjaxDataSrc ( settings, json, write )\n{\n\tvar dataProp = 'data';\n\n\tif ($.isPlainObject( settings.ajax ) && settings.ajax.dataSrc !== undefined) {\n\t\t// Could in inside a `dataSrc` object, or not!\n\t\tvar dataSrc = settings.ajax.dataSrc;\n\n\t\t// string, function and object are valid types\n\t\tif (typeof dataSrc === 'string' || typeof dataSrc === 'function') {\n\t\t\tdataProp = dataSrc;\n\t\t}\n\t\telse if (dataSrc.data !== undefined) {\n\t\t\tdataProp = dataSrc.data;\n\t\t}\n\t}\n\n\tif ( ! write ) {\n\t\tif ( dataProp === 'data' ) {\n\t\t\t// If the default, then we still want to support the old style, and safely ignore\n\t\t\t// it if possible\n\t\t\treturn json.aaData || json[dataProp];\n\t\t}\n\n\t\treturn dataProp !== \"\" ?\n\t\t\t_fnGetObjectDataFn( dataProp )( json ) :\n\t\t\tjson;\n\t}\n\t\n\t// set\n\t_fnSetObjectDataFn( dataProp )( json, write );\n}\n\n/**\n * Very similar to _fnAjaxDataSrc, but for the other SSP properties\n * @param {*} settings DataTables settings object\n * @param {*} param Target parameter\n * @param {*} json JSON data\n * @returns Resolved value\n */\nfunction _fnAjaxDataSrcParam (settings, param, json) {\n\tvar dataSrc = $.isPlainObject( settings.ajax )\n\t\t? settings.ajax.dataSrc\n\t\t: null;\n\n\tif (dataSrc && dataSrc[param]) {\n\t\t// Get from custom location\n\t\treturn _fnGetObjectDataFn( dataSrc[param] )( json );\n\t}\n\n\t// else - Default behaviour\n\tvar old = '';\n\n\t// Legacy support\n\tif (param === 'draw') {\n\t\told = 'sEcho';\n\t}\n\telse if (param === 'recordsTotal') {\n\t\told = 'iTotalRecords';\n\t}\n\telse if (param === 'recordsFiltered') {\n\t\told = 'iTotalDisplayRecords';\n\t}\n\n\treturn json[old] !== undefined\n\t\t? json[old]\n\t\t: json[param];\n}\n\n\n/**\n * Filter the table using both the global filter and column based filtering\n *  @param {object} settings dataTables settings object\n *  @param {object} input search information\n *  @memberof DataTable#oApi\n */\nfunction _fnFilterComplete ( settings, input )\n{\n\tvar columnsSearch = settings.aoPreSearchCols;\n\n\t// In server-side processing all filtering is done by the server, so no point hanging around here\n\tif ( _fnDataSource( settings ) != 'ssp' )\n\t{\n\t\t// Check if any of the rows were invalidated\n\t\t_fnFilterData( settings );\n\n\t\t// Start from the full data set\n\t\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\n\t\t// Global filter first\n\t\t_fnFilter( settings.aiDisplay, settings, input.search, input );\n\n\t\t$.each(settings.searchFixed, function (name, term) {\n\t\t\t_fnFilter(settings.aiDisplay, settings, term, {});\n\t\t});\n\n\t\t// Then individual column filters\n\t\tfor ( var i=0 ; i<columnsSearch.length ; i++ )\n\t\t{\n\t\t\tvar col = columnsSearch[i];\n\n\t\t\t_fnFilter(\n\t\t\t\tsettings.aiDisplay,\n\t\t\t\tsettings,\n\t\t\t\tcol.search,\n\t\t\t\tcol,\n\t\t\t\ti\n\t\t\t);\n\n\t\t\t$.each(settings.aoColumns[i].searchFixed, function (name, term) {\n\t\t\t\t_fnFilter(settings.aiDisplay, settings, term, {}, i);\n\t\t\t});\n\t\t}\n\n\t\t// And finally global filtering\n\t\t_fnFilterCustom( settings );\n\t}\n\n\t// Tell the draw function we have been filtering\n\tsettings.bFiltered = true;\n\n\t_fnCallbackFire( settings, null, 'search', [settings] );\n}\n\n\n/**\n * Apply custom filtering functions\n * \n * This is legacy now that we have named functions, but it is widely used\n * from 1.x, so it is not yet deprecated.\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnFilterCustom( settings )\n{\n\tvar filters = DataTable.ext.search;\n\tvar displayRows = settings.aiDisplay;\n\tvar row, rowIdx;\n\n\tfor ( var i=0, ien=filters.length ; i<ien ; i++ ) {\n\t\tvar rows = [];\n\n\t\t// Loop over each row and see if it should be included\n\t\tfor ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {\n\t\t\trowIdx = displayRows[ j ];\n\t\t\trow = settings.aoData[ rowIdx ];\n\n\t\t\tif ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {\n\t\t\t\trows.push( rowIdx );\n\t\t\t}\n\t\t}\n\n\t\t// So the array reference doesn't break set the results into the\n\t\t// existing array\n\t\tdisplayRows.length = 0;\n\t\tdisplayRows.push.apply(displayRows, rows);\n\t}\n}\n\n\n/**\n * Filter the data table based on user input and draw the table\n */\nfunction _fnFilter( searchRows, settings, input, options, column )\n{\n\tif ( input === '' ) {\n\t\treturn;\n\t}\n\n\tvar i = 0;\n\tvar matched = [];\n\n\t// Search term can be a function, regex or string - if a string we apply our\n\t// smart filtering regex (assuming the options require that)\n\tvar searchFunc = typeof input === 'function' ? input : null;\n\tvar rpSearch = input instanceof RegExp\n\t\t? input\n\t\t: searchFunc\n\t\t\t? null\n\t\t\t: _fnFilterCreateSearch( input, options );\n\n\t// Then for each row, does the test pass. If not, lop the row from the array\n\tfor (i=0 ; i<searchRows.length ; i++) {\n\t\tvar row = settings.aoData[ searchRows[i] ];\n\t\tvar data = column === undefined\n\t\t\t? row._sFilterRow\n\t\t\t: row._aFilterData[ column ];\n\n\t\tif ( (searchFunc && searchFunc(data, row._aData, searchRows[i], column)) || (rpSearch && rpSearch.test(data)) ) {\n\t\t\tmatched.push(searchRows[i]);\n\t\t}\n\t}\n\n\t// Mutate the searchRows array\n\tsearchRows.length = matched.length;\n\n\tfor (i=0 ; i<matched.length ; i++) {\n\t\tsearchRows[i] = matched[i];\n\t}\n}\n\n\n/**\n * Build a regular expression object suitable for searching a table\n *  @param {string} sSearch string to search for\n *  @param {bool} bRegex treat as a regular expression or not\n *  @param {bool} bSmart perform smart filtering or not\n *  @param {bool} bCaseInsensitive Do case insensitive matching or not\n *  @returns {RegExp} constructed object\n *  @memberof DataTable#oApi\n */\nfunction _fnFilterCreateSearch( search, inOpts )\n{\n\tvar not = [];\n\tvar options = $.extend({}, {\n\t\tboundary: false,\n\t\tcaseInsensitive: true,\n\t\texact: false,\n\t\tregex: false,\n\t\tsmart: true\n\t}, inOpts);\n\n\tif (typeof search !== 'string') {\n\t\tsearch = search.toString();\n\t}\n\n\t// Remove diacritics if normalize is set up to do so\n\tsearch = _normalize(search);\n\n\tif (options.exact) {\n\t\treturn new RegExp(\n\t\t\t'^'+_fnEscapeRegex(search)+'$',\n\t\t\toptions.caseInsensitive ? 'i' : ''\n\t\t);\n\t}\n\n\tsearch = options.regex ?\n\t\tsearch :\n\t\t_fnEscapeRegex( search );\n\t\n\tif ( options.smart ) {\n\t\t/* For smart filtering we want to allow the search to work regardless of\n\t\t * word order. We also want double quoted text to be preserved, so word\n\t\t * order is important - a la google. And a negative look around for\n\t\t * finding rows which don't contain a given string.\n\t\t * \n\t\t * So this is the sort of thing we want to generate:\n\t\t * \n\t\t * ^(?=.*?\\bone\\b)(?=.*?\\btwo three\\b)(?=.*?\\bfour\\b).*$\n\t\t */\n\t\tvar parts = search.match( /!?[\"\\u201C][^\"\\u201D]+[\"\\u201D]|[^ ]+/g ) || [''];\n\t\tvar a = parts.map( function ( word ) {\n\t\t\tvar negative = false;\n\t\t\tvar m;\n\n\t\t\t// Determine if it is a \"does not include\"\n\t\t\tif ( word.charAt(0) === '!' ) {\n\t\t\t\tnegative = true;\n\t\t\t\tword = word.substring(1);\n\t\t\t}\n\n\t\t\t// Strip the quotes from around matched phrases\n\t\t\tif ( word.charAt(0) === '\"' ) {\n\t\t\t\tm = word.match( /^\"(.*)\"$/ );\n\t\t\t\tword = m ? m[1] : word;\n\t\t\t}\n\t\t\telse if ( word.charAt(0) === '\\u201C' ) {\n\t\t\t\t// Smart quote match (iPhone users)\n\t\t\t\tm = word.match( /^\\u201C(.*)\\u201D$/ );\n\t\t\t\tword = m ? m[1] : word;\n\t\t\t}\n\n\t\t\t// For our \"not\" case, we need to modify the string that is\n\t\t\t// allowed to match at the end of the expression.\n\t\t\tif (negative) {\n\t\t\t\tif (word.length > 1) {\n\t\t\t\t\tnot.push('(?!'+word+')');\n\t\t\t\t}\n\n\t\t\t\tword = '';\n\t\t\t}\n\n\t\t\treturn word.replace(/\"/g, '');\n\t\t} );\n\n\t\tvar match = not.length\n\t\t\t? not.join('')\n\t\t\t: '';\n\n\t\tvar boundary = options.boundary\n\t\t\t? '\\\\b'\n\t\t\t: '';\n\n\t\tsearch = '^(?=.*?'+boundary+a.join( ')(?=.*?'+boundary )+')('+match+'.)*$';\n\t}\n\n\treturn new RegExp( search, options.caseInsensitive ? 'i' : '' );\n}\n\n\n/**\n * Escape a string such that it can be used in a regular expression\n *  @param {string} sVal string to escape\n *  @returns {string} escaped string\n *  @memberof DataTable#oApi\n */\nvar _fnEscapeRegex = DataTable.util.escapeRegex;\n\nvar __filter_div = $('<div>')[0];\nvar __filter_div_textContent = __filter_div.textContent !== undefined;\n\n// Update the filtering data for each row if needed (by invalidation or first run)\nfunction _fnFilterData ( settings )\n{\n\tvar columns = settings.aoColumns;\n\tvar data = settings.aoData;\n\tvar column;\n\tvar j, jen, filterData, cellData, row;\n\tvar wasInvalidated = false;\n\n\tfor ( var rowIdx=0 ; rowIdx<data.length ; rowIdx++ ) {\n\t\tif (! data[rowIdx]) {\n\t\t\tcontinue;\n\t\t}\n\n\t\trow = data[rowIdx];\n\n\t\tif ( ! row._aFilterData ) {\n\t\t\tfilterData = [];\n\n\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\tcolumn = columns[j];\n\n\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\tcellData = _fnGetCellData( settings, rowIdx, j, 'filter' );\n\n\t\t\t\t\t// Search in DataTables is string based\n\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcellData = '';\n\t\t\t\t}\n\n\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t// method used here is much faster https://jsperf.com/html-decode\n\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t}\n\n\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\tcellData = cellData.replace(/[\\r\\n\\u2028]/g, '');\n\t\t\t\t}\n\n\t\t\t\tfilterData.push( cellData );\n\t\t\t}\n\n\t\t\trow._aFilterData = filterData;\n\t\t\trow._sFilterRow = filterData.join('  ');\n\t\t\twasInvalidated = true;\n\t\t}\n\t}\n\n\treturn wasInvalidated;\n}\n\n\n/**\n * Draw the table for the first time, adding all required features\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnInitialise ( settings )\n{\n\tvar i;\n\tvar init = settings.oInit;\n\tvar deferLoading = settings.deferLoading;\n\tvar dataSrc = _fnDataSource( settings );\n\n\t// Ensure that the table data is fully initialised\n\tif ( ! settings.bInitialised ) {\n\t\tsetTimeout( function(){ _fnInitialise( settings ); }, 200 );\n\t\treturn;\n\t}\n\n\t// Build the header / footer for the table\n\t_fnBuildHead( settings, 'header' );\n\t_fnBuildHead( settings, 'footer' );\n\n\t// Load the table's state (if needed) and then render around it and draw\n\t_fnLoadState( settings, init, function () {\n\t\t// Then draw the header / footer\n\t\t_fnDrawHead( settings, settings.aoHeader );\n\t\t_fnDrawHead( settings, settings.aoFooter );\n\n\t\t// Cache the paging start point, as the first redraw will reset it\n\t\tvar iAjaxStart = settings.iInitDisplayStart\n\n\t\t// Local data load\n\t\t// Check if there is data passing into the constructor\n\t\tif ( init.aaData ) {\n\t\t\tfor ( i=0 ; i<init.aaData.length ; i++ ) {\n\t\t\t\t_fnAddData( settings, init.aaData[ i ] );\n\t\t\t}\n\t\t}\n\t\telse if ( deferLoading || dataSrc == 'dom' ) {\n\t\t\t// Grab the data from the page\n\t\t\t_fnAddTr( settings, $(settings.nTBody).children('tr') );\n\t\t}\n\n\t\t// Filter not yet applied - copy the display master\n\t\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\n\t\t// Enable features\n\t\t_fnAddOptionsHtml( settings );\n\t\t_fnSortInit( settings );\n\n\t\t_colGroup( settings );\n\n\t\t/* Okay to show that something is going on now */\n\t\t_fnProcessingDisplay( settings, true );\n\n\t\t_fnCallbackFire( settings, null, 'preInit', [settings], true );\n\n\t\t// If there is default sorting required - let's do it. The sort function\n\t\t// will do the drawing for us. Otherwise we draw the table regardless of the\n\t\t// Ajax source - this allows the table to look initialised for Ajax sourcing\n\t\t// data (show 'loading' message possibly)\n\t\t_fnReDraw( settings );\n\n\t\t// Server-side processing init complete is done by _fnAjaxUpdateDraw\n\t\tif ( dataSrc != 'ssp' || deferLoading ) {\n\t\t\t// if there is an ajax source load the data\n\t\t\tif ( dataSrc == 'ajax' ) {\n\t\t\t\t_fnBuildAjax( settings, {}, function(json) {\n\t\t\t\t\tvar aData = _fnAjaxDataSrc( settings, json );\n\n\t\t\t\t\t// Got the data - add it to the table\n\t\t\t\t\tfor ( i=0 ; i<aData.length ; i++ ) {\n\t\t\t\t\t\t_fnAddData( settings, aData[i] );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reset the init display for cookie saving. We've already done\n\t\t\t\t\t// a filter, and therefore cleared it before. So we need to make\n\t\t\t\t\t// it appear 'fresh'\n\t\t\t\t\tsettings.iInitDisplayStart = iAjaxStart;\n\n\t\t\t\t\t_fnReDraw( settings );\n\t\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t\t\t_fnInitComplete( settings );\n\t\t\t\t}, settings );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_fnInitComplete( settings );\n\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t}\n\t\t}\n\t} );\n}\n\n\n/**\n * Draw the table for the first time, adding all required features\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnInitComplete ( settings )\n{\n\tif (settings._bInitComplete) {\n\t\treturn;\n\t}\n\n\tvar args = [settings, settings.json];\n\n\tsettings._bInitComplete = true;\n\n\t// Table is fully set up and we have data, so calculate the\n\t// column widths\n\t_fnAdjustColumnSizing( settings );\n\n\t_fnCallbackFire( settings, null, 'plugin-init', args, true );\n\t_fnCallbackFire( settings, 'aoInitComplete', 'init', args, true );\n}\n\nfunction _fnLengthChange ( settings, val )\n{\n\tvar len = parseInt( val, 10 );\n\tsettings._iDisplayLength = len;\n\n\t_fnLengthOverflow( settings );\n\n\t// Fire length change event\n\t_fnCallbackFire( settings, null, 'length', [settings, len] );\n}\n\n/**\n * Alter the display settings to change the page\n *  @param {object} settings DataTables settings object\n *  @param {string|int} action Paging action to take: \"first\", \"previous\",\n *    \"next\" or \"last\" or page number to jump to (integer)\n *  @param [bool] redraw Automatically draw the update or not\n *  @returns {bool} true page has changed, false - no change\n *  @memberof DataTable#oApi\n */\nfunction _fnPageChange ( settings, action, redraw )\n{\n\tvar\n\t\tstart     = settings._iDisplayStart,\n\t\tlen       = settings._iDisplayLength,\n\t\trecords   = settings.fnRecordsDisplay();\n\n\tif ( records === 0 || len === -1 )\n\t{\n\t\tstart = 0;\n\t}\n\telse if ( typeof action === \"number\" )\n\t{\n\t\tstart = action * len;\n\n\t\tif ( start > records )\n\t\t{\n\t\t\tstart = 0;\n\t\t}\n\t}\n\telse if ( action == \"first\" )\n\t{\n\t\tstart = 0;\n\t}\n\telse if ( action == \"previous\" )\n\t{\n\t\tstart = len >= 0 ?\n\t\t\tstart - len :\n\t\t\t0;\n\n\t\tif ( start < 0 )\n\t\t{\n\t\t\tstart = 0;\n\t\t}\n\t}\n\telse if ( action == \"next\" )\n\t{\n\t\tif ( start + len < records )\n\t\t{\n\t\t\tstart += len;\n\t\t}\n\t}\n\telse if ( action == \"last\" )\n\t{\n\t\tstart = Math.floor( (records-1) / len) * len;\n\t}\n\telse if ( action === 'ellipsis' )\n\t{\n\t\treturn;\n\t}\n\telse\n\t{\n\t\t_fnLog( settings, 0, \"Unknown paging action: \"+action, 5 );\n\t}\n\n\tvar changed = settings._iDisplayStart !== start;\n\tsettings._iDisplayStart = start;\n\n\t_fnCallbackFire( settings, null, changed ? 'page' : 'page-nc', [settings] );\n\n\tif ( changed && redraw ) {\n\t\t_fnDraw( settings );\n\t}\n\n\treturn changed;\n}\n\n\n/**\n * Generate the node required for the processing node\n *  @param {object} settings DataTables settings object\n */\nfunction _processingHtml ( settings )\n{\n\tvar table = settings.nTable;\n\tvar scrolling = settings.oScroll.sX !== '' || settings.oScroll.sY !== '';\n\n\tif ( settings.oFeatures.bProcessing ) {\n\t\tvar n = $('<div/>', {\n\t\t\t\t'id': settings.sTableId + '_processing',\n\t\t\t\t'class': settings.oClasses.processing.container,\n\t\t\t\t'role': 'status'\n\t\t\t} )\n\t\t\t.html( settings.oLanguage.sProcessing )\n\t\t\t.append('<div><div></div><div></div><div></div><div></div></div>');\n\n\t\t// Different positioning depending on if scrolling is enabled or not\n\t\tif (scrolling) {\n\t\t\tn.prependTo( $('div.dt-scroll', settings.nTableWrapper) );\n\t\t}\n\t\telse {\n\t\t\tn.insertBefore( table );\n\t\t}\n\n\t\t$(table).on( 'processing.dt.DT', function (e, s, show) {\n\t\t\tn.css( 'display', show ? 'block' : 'none' );\n\t\t} );\n\t}\n}\n\n\n/**\n * Display or hide the processing indicator\n *  @param {object} settings DataTables settings object\n *  @param {bool} show Show the processing indicator (true) or not (false)\n */\nfunction _fnProcessingDisplay ( settings, show )\n{\n\t// Ignore cases when we are still redrawing\n\tif (settings.bDrawing && show === false) {\n\t\treturn;\n\t}\n\n\t_fnCallbackFire( settings, null, 'processing', [settings, show] );\n}\n\n/**\n * Show the processing element if an action takes longer than a given time\n *\n * @param {*} settings DataTables settings object\n * @param {*} enable Do (true) or not (false) async processing (local feature enablement)\n * @param {*} run Function to run\n */\nfunction _fnProcessingRun( settings, enable, run ) {\n\tif (! enable) {\n\t\t// Immediate execution, synchronous\n\t\trun();\n\t}\n\telse {\n\t\t_fnProcessingDisplay(settings, true);\n\t\t\n\t\t// Allow the processing display to show if needed\n\t\tsetTimeout(function () {\n\t\t\trun();\n\n\t\t\t_fnProcessingDisplay(settings, false);\n\t\t}, 0);\n\t}\n}\n/**\n * Add any control elements for the table - specifically scrolling\n *  @param {object} settings dataTables settings object\n *  @returns {node} Node to add to the DOM\n *  @memberof DataTable#oApi\n */\nfunction _fnFeatureHtmlTable ( settings )\n{\n\tvar table = $(settings.nTable);\n\n\t// Scrolling from here on in\n\tvar scroll = settings.oScroll;\n\n\tif ( scroll.sX === '' && scroll.sY === '' ) {\n\t\treturn settings.nTable;\n\t}\n\n\tvar scrollX = scroll.sX;\n\tvar scrollY = scroll.sY;\n\tvar classes = settings.oClasses.scrolling;\n\tvar caption = settings.captionNode;\n\tvar captionSide = caption ? caption._captionSide : null;\n\tvar headerClone = $( table[0].cloneNode(false) );\n\tvar footerClone = $( table[0].cloneNode(false) );\n\tvar footer = table.children('tfoot');\n\tvar _div = '<div/>';\n\tvar size = function ( s ) {\n\t\treturn !s ? null : _fnStringToCss( s );\n\t};\n\n\tif ( ! footer.length ) {\n\t\tfooter = null;\n\t}\n\n\t/*\n\t * The HTML structure that we want to generate in this function is:\n\t *  div - scroller\n\t *    div - scroll head\n\t *      div - scroll head inner\n\t *        table - scroll head table\n\t *          thead - thead\n\t *    div - scroll body\n\t *      table - table (master table)\n\t *        thead - thead clone for sizing\n\t *        tbody - tbody\n\t *    div - scroll foot\n\t *      div - scroll foot inner\n\t *        table - scroll foot table\n\t *          tfoot - tfoot\n\t */\n\tvar scroller = $( _div, { 'class': classes.container } )\n\t\t.append(\n\t\t\t$(_div, { 'class': classes.header.self } )\n\t\t\t\t.css( {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\tborder: 0,\n\t\t\t\t\twidth: scrollX ? size(scrollX) : '100%'\n\t\t\t\t} )\n\t\t\t\t.append(\n\t\t\t\t\t$(_div, { 'class': classes.header.inner } )\n\t\t\t\t\t\t.css( {\n\t\t\t\t\t\t\t'box-sizing': 'content-box',\n\t\t\t\t\t\t\twidth: scroll.sXInner || '100%'\n\t\t\t\t\t\t} )\n\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\theaderClone\n\t\t\t\t\t\t\t\t.removeAttr('id')\n\t\t\t\t\t\t\t\t.css( 'margin-left', 0 )\n\t\t\t\t\t\t\t\t.append( captionSide === 'top' ? caption : null )\n\t\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t\ttable.children('thead')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t)\n\t\t.append(\n\t\t\t$(_div, { 'class': classes.body } )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\twidth: size( scrollX )\n\t\t\t\t} )\n\t\t\t\t.append( table )\n\t\t);\n\n\tif ( footer ) {\n\t\tscroller.append(\n\t\t\t$(_div, { 'class': classes.footer.self } )\n\t\t\t\t.css( {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tborder: 0,\n\t\t\t\t\twidth: scrollX ? size(scrollX) : '100%'\n\t\t\t\t} )\n\t\t\t\t.append(\n\t\t\t\t\t$(_div, { 'class': classes.footer.inner } )\n\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\tfooterClone\n\t\t\t\t\t\t\t\t.removeAttr('id')\n\t\t\t\t\t\t\t\t.css( 'margin-left', 0 )\n\t\t\t\t\t\t\t\t.append( captionSide === 'bottom' ? caption : null )\n\t\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t\ttable.children('tfoot')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t}\n\n\tvar children = scroller.children();\n\tvar scrollHead = children[0];\n\tvar scrollBody = children[1];\n\tvar scrollFoot = footer ? children[2] : null;\n\n\t// When the body is scrolled, then we also want to scroll the headers\n\t$(scrollBody).on( 'scroll.DT', function () {\n\t\tvar scrollLeft = this.scrollLeft;\n\n\t\tscrollHead.scrollLeft = scrollLeft;\n\n\t\tif ( footer ) {\n\t\t\tscrollFoot.scrollLeft = scrollLeft;\n\t\t}\n\t} );\n\n\t// When focus is put on the header cells, we might need to scroll the body\n\t$('th, td', scrollHead).on('focus', function () {\n\t\tvar scrollLeft = scrollHead.scrollLeft;\n\n\t\tscrollBody.scrollLeft = scrollLeft;\n\n\t\tif ( footer ) {\n\t\t\tscrollBody.scrollLeft = scrollLeft;\n\t\t}\n\t});\n\n\t$(scrollBody).css('max-height', scrollY);\n\tif (! scroll.bCollapse) {\n\t\t$(scrollBody).css('height', scrollY);\n\t}\n\n\tsettings.nScrollHead = scrollHead;\n\tsettings.nScrollBody = scrollBody;\n\tsettings.nScrollFoot = scrollFoot;\n\n\t// On redraw - align columns\n\tsettings.aoDrawCallback.push(_fnScrollDraw);\n\n\treturn scroller[0];\n}\n\n\n\n/**\n * Update the header, footer and body tables for resizing - i.e. column\n * alignment.\n *\n * Welcome to the most horrible function DataTables. The process that this\n * function follows is basically:\n *   1. Re-create the table inside the scrolling div\n *   2. Correct colgroup > col values if needed\n *   3. Copy colgroup > col over to header and footer\n *   4. Clean up\n *\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnScrollDraw ( settings )\n{\n\t// Given that this is such a monster function, a lot of variables are use\n\t// to try and keep the minimised size as small as possible\n\tvar\n\t\tscroll         = settings.oScroll,\n\t\tbarWidth       = scroll.iBarWidth,\n\t\tdivHeader      = $(settings.nScrollHead),\n\t\tdivHeaderInner = divHeader.children('div'),\n\t\tdivHeaderTable = divHeaderInner.children('table'),\n\t\tdivBodyEl      = settings.nScrollBody,\n\t\tdivBody        = $(divBodyEl),\n\t\tdivFooter      = $(settings.nScrollFoot),\n\t\tdivFooterInner = divFooter.children('div'),\n\t\tdivFooterTable = divFooterInner.children('table'),\n\t\theader         = $(settings.nTHead),\n\t\ttable          = $(settings.nTable),\n\t\tfooter         = settings.nTFoot && $('th, td', settings.nTFoot).length ? $(settings.nTFoot) : null,\n\t\tbrowser        = settings.oBrowser,\n\t\theaderCopy, footerCopy;\n\n\t// If the scrollbar visibility has changed from the last draw, we need to\n\t// adjust the column sizes as the table width will have changed to account\n\t// for the scrollbar\n\tvar scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight;\n\t\n\tif ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) {\n\t\tsettings.scrollBarVis = scrollBarVis;\n\t\t_fnAdjustColumnSizing( settings );\n\t\treturn; // adjust column sizing will call this function again\n\t}\n\telse {\n\t\tsettings.scrollBarVis = scrollBarVis;\n\t}\n\n\t// 1. Re-create the table inside the scrolling div\n\t// Remove the old minimised thead and tfoot elements in the inner table\n\ttable.children('thead, tfoot').remove();\n\n\t// Clone the current header and footer elements and then place it into the inner table\n\theaderCopy = header.clone().prependTo( table );\n\theaderCopy.find('th, td').removeAttr('tabindex');\n\theaderCopy.find('[id]').removeAttr('id');\n\n\tif ( footer ) {\n\t\tfooterCopy = footer.clone().prependTo( table );\n\t\tfooterCopy.find('[id]').removeAttr('id');\n\t}\n\n\t// 2. Correct colgroup > col values if needed\n\t// It is possible that the cell sizes are smaller than the content, so we need to\n\t// correct colgroup>col for such cases. This can happen if the auto width detection\n\t// uses a cell which has a longer string, but isn't the widest! For example \n\t// \"Chief Executive Officer (CEO)\" is the longest string in the demo, but\n\t// \"Systems Administrator\" is actually the widest string since it doesn't collapse.\n\t// Note the use of translating into a column index to get the `col` element. This\n\t// is because of Responsive which might remove `col` elements, knocking the alignment\n\t// of the indexes out.\n\tif (settings.aiDisplay.length) {\n\t\t// Get the column sizes from the first row in the table. This should really be a\n\t\t// [].find, but it wasn't supported in Chrome until Sept 2015, and DT has 10 year\n\t\t// browser support\n\t\tvar firstTr = null;\n\n\t\tfor (i=settings._iDisplayStart ; i<settings.aiDisplay.length ; i++) {\n\t\t\tvar idx = settings.aiDisplay[i];\n\t\t\tvar tr = settings.aoData[idx].nTr;\n\n\t\t\tif (tr) {\n\t\t\t\tfirstTr = tr;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (firstTr) {\n\t\t\tvar colSizes = $(firstTr).children('th, td').map(function (vis) {\n\t\t\t\treturn {\n\t\t\t\t\tidx: _fnVisibleToColumnIndex(settings, vis),\n\t\t\t\t\twidth: $(this).outerWidth()\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Check against what the colgroup > col is set to and correct if needed\n\t\t\tfor (var i=0 ; i<colSizes.length ; i++) {\n\t\t\t\tvar colEl = settings.aoColumns[ colSizes[i].idx ].colEl[0];\n\t\t\t\tvar colWidth = colEl.style.width.replace('px', '');\n\n\t\t\t\tif (colWidth !== colSizes[i].width) {\n\t\t\t\t\tcolEl.style.width = colSizes[i].width + 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 3. Copy the colgroup over to the header and footer\n\tdivHeaderTable\n\t\t.find('colgroup')\n\t\t.remove();\n\n\tdivHeaderTable.append(settings.colgroup.clone());\n\n\tif ( footer ) {\n\t\tdivFooterTable\n\t\t\t.find('colgroup')\n\t\t\t.remove();\n\n\t\tdivFooterTable.append(settings.colgroup.clone());\n\t}\n\n\t// \"Hide\" the header and footer that we used for the sizing. We need to keep\n\t// the content of the cell so that the width applied to the header and body\n\t// both match, but we want to hide it completely.\n\t$('th, td', headerCopy).each(function () {\n\t\t$(this.childNodes).wrapAll('<div class=\"dt-scroll-sizing\">');\n\t});\n\n\tif ( footer ) {\n\t\t$('th, td', footerCopy).each(function () {\n\t\t\t$(this.childNodes).wrapAll('<div class=\"dt-scroll-sizing\">');\n\t\t});\n\t}\n\n\t// 4. Clean up\n\t// Figure out if there are scrollbar present - if so then we need a the header and footer to\n\t// provide a bit more space to allow \"overflow\" scrolling (i.e. past the scrollbar)\n\tvar isScrolling = Math.floor(table.height()) > divBodyEl.clientHeight || divBody.css('overflow-y') == \"scroll\";\n\tvar paddingSide = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );\n\n\t// Set the width's of the header and footer tables\n\tvar outerWidth = table.outerWidth();\n\n\tdivHeaderTable.css('width', _fnStringToCss( outerWidth ));\n\tdivHeaderInner\n\t\t.css('width', _fnStringToCss( outerWidth ))\n\t\t.css(paddingSide, isScrolling ? barWidth+\"px\" : \"0px\");\n\n\tif ( footer ) {\n\t\tdivFooterTable.css('width', _fnStringToCss( outerWidth ));\n\t\tdivFooterInner\n\t\t\t.css('width', _fnStringToCss( outerWidth ))\n\t\t\t.css(paddingSide, isScrolling ? barWidth+\"px\" : \"0px\");\n\t}\n\n\t// Correct DOM ordering for colgroup - comes before the thead\n\ttable.children('colgroup').prependTo(table);\n\n\t// Adjust the position of the header in case we loose the y-scrollbar\n\tdivBody.trigger('scroll');\n\n\t// If sorting or filtering has occurred, jump the scrolling back to the top\n\t// only if we aren't holding the position\n\tif ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {\n\t\tdivBodyEl.scrollTop = 0;\n\t}\n}\n\n/**\n * Calculate the width of columns for the table\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnCalculateColumnWidths ( settings )\n{\n\t// Not interested in doing column width calculation if auto-width is disabled\n\tif (! settings.oFeatures.bAutoWidth) {\n\t\treturn;\n\t}\n\n\tvar\n\t\ttable = settings.nTable,\n\t\tcolumns = settings.aoColumns,\n\t\tscroll = settings.oScroll,\n\t\tscrollY = scroll.sY,\n\t\tscrollX = scroll.sX,\n\t\tscrollXInner = scroll.sXInner,\n\t\tvisibleColumns = _fnGetColumns( settings, 'bVisible' ),\n\t\ttableWidthAttr = table.getAttribute('width'), // from DOM element\n\t\ttableContainer = table.parentNode,\n\t\ti, column, columnIdx;\n\t\t\n\tvar styleWidth = table.style.width;\n\n\t// If there is no width applied as a CSS style or as an attribute, we assume that\n\t// the width is intended to be 100%, which is usually is in CSS, but it is very\n\t// difficult to correctly parse the rules to get the final result.\n\tif ( ! styleWidth && ! tableWidthAttr) {\n\t\ttable.style.width = '100%';\n\t\tstyleWidth = '100%';\n\t}\n\n\tif ( styleWidth && styleWidth.indexOf('%') !== -1 ) {\n\t\ttableWidthAttr = styleWidth;\n\t}\n\n\t// Let plug-ins know that we are doing a recalc, in case they have changed any of the\n\t// visible columns their own way (e.g. Responsive uses display:none).\n\t_fnCallbackFire(\n\t\tsettings,\n\t\tnull,\n\t\t'column-calc',\n\t\t{visible: visibleColumns},\n\t\tfalse\n\t);\n\n\t// Construct a single row, worst case, table with the widest\n\t// node in the data, assign any user defined widths, then insert it into\n\t// the DOM and allow the browser to do all the hard work of calculating\n\t// table widths\n\tvar tmpTable = $(table.cloneNode())\n\t\t.css( 'visibility', 'hidden' )\n\t\t.removeAttr( 'id' );\n\n\t// Clean up the table body\n\ttmpTable.append('<tbody>')\n\tvar tr = $('<tr/>').appendTo( tmpTable.find('tbody') );\n\n\t// Clone the table header and footer - we can't use the header / footer\n\t// from the cloned table, since if scrolling is active, the table's\n\t// real header and footer are contained in different table tags\n\ttmpTable\n\t\t.append( $(settings.nTHead).clone() )\n\t\t.append( $(settings.nTFoot).clone() );\n\n\t// Remove any assigned widths from the footer (from scrolling)\n\ttmpTable.find('tfoot th, tfoot td').css('width', '');\n\n\t// Apply custom sizing to the cloned header\n\ttmpTable.find('thead th, thead td').each( function () {\n\t\t// Get the `width` from the header layout\n\t\tvar width = _fnColumnsSumWidth( settings, this, true, false );\n\n\t\tif ( width ) {\n\t\t\tthis.style.width = width;\n\n\t\t\t// For scrollX we need to force the column width otherwise the\n\t\t\t// browser will collapse it. If this width is smaller than the\n\t\t\t// width the column requires, then it will have no effect\n\t\t\tif ( scrollX ) {\n\t\t\t\t$( this ).append( $('<div/>').css( {\n\t\t\t\t\twidth: width,\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tborder: 0,\n\t\t\t\t\theight: 1\n\t\t\t\t} ) );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.style.width = '';\n\t\t}\n\t} );\n\n\t// Find the widest piece of data for each column and put it into the table\n\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\tcolumnIdx = visibleColumns[i];\n\t\tcolumn = columns[ columnIdx ];\n\n\t\tvar longest = _fnGetMaxLenString(settings, columnIdx);\n\t\tvar autoClass = _ext.type.className[column.sType];\n\t\tvar text = longest + column.sContentPadding;\n\t\tvar insert = longest.indexOf('<') === -1\n\t\t\t? document.createTextNode(text)\n\t\t\t: text\n\t\t\n\t\t$('<td/>')\n\t\t\t.addClass(autoClass)\n\t\t\t.addClass(column.sClass)\n\t\t\t.append(insert)\n\t\t\t.appendTo(tr);\n\t}\n\n\t// Tidy the temporary table - remove name attributes so there aren't\n\t// duplicated in the dom (radio elements for example)\n\t$('[name]', tmpTable).removeAttr('name');\n\n\t// Table has been built, attach to the document so we can work with it.\n\t// A holding element is used, positioned at the top of the container\n\t// with minimal height, so it has no effect on if the container scrolls\n\t// or not. Otherwise it might trigger scrolling when it actually isn't\n\t// needed\n\tvar holder = $('<div/>').css( scrollX || scrollY ?\n\t\t\t{\n\t\t\t\tposition: 'absolute',\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\theight: 1,\n\t\t\t\tright: 0,\n\t\t\t\toverflow: 'hidden'\n\t\t\t} :\n\t\t\t{}\n\t\t)\n\t\t.append( tmpTable )\n\t\t.appendTo( tableContainer );\n\n\t// When scrolling (X or Y) we want to set the width of the table as \n\t// appropriate. However, when not scrolling leave the table width as it\n\t// is. This results in slightly different, but I think correct behaviour\n\tif ( scrollX && scrollXInner ) {\n\t\ttmpTable.width( scrollXInner );\n\t}\n\telse if ( scrollX ) {\n\t\ttmpTable.css( 'width', 'auto' );\n\t\ttmpTable.removeAttr('width');\n\n\t\t// If there is no width attribute or style, then allow the table to\n\t\t// collapse\n\t\tif ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) {\n\t\t\ttmpTable.width( tableContainer.clientWidth );\n\t\t}\n\t}\n\telse if ( scrollY ) {\n\t\ttmpTable.width( tableContainer.clientWidth );\n\t}\n\telse if ( tableWidthAttr ) {\n\t\ttmpTable.width( tableWidthAttr );\n\t}\n\n\t// Get the width of each column in the constructed table\n\tvar total = 0;\n\tvar bodyCells = tmpTable.find('tbody tr').eq(0).children();\n\n\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\t// Use getBounding for sub-pixel accuracy, which we then want to round up!\n\t\tvar bounding = bodyCells[i].getBoundingClientRect().width;\n\n\t\t// Total is tracked to remove any sub-pixel errors as the outerWidth\n\t\t// of the table might not equal the total given here\n\t\ttotal += bounding;\n\n\t\t// Width for each column to use\n\t\tcolumns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding );\n\t}\n\n\ttable.style.width = _fnStringToCss( total );\n\n\t// Finished with the table - ditch it\n\tholder.remove();\n\n\t// If there is a width attr, we want to attach an event listener which\n\t// allows the table sizing to automatically adjust when the window is\n\t// resized. Use the width attr rather than CSS, since we can't know if the\n\t// CSS is a relative value or absolute - DOM read is always px.\n\tif ( tableWidthAttr ) {\n\t\ttable.style.width = _fnStringToCss( tableWidthAttr );\n\t}\n\n\tif ( (tableWidthAttr || scrollX) && ! settings._reszEvt ) {\n\t\tvar bindResize = function () {\n\t\t\t$(window).on('resize.DT-'+settings.sInstance, DataTable.util.throttle( function () {\n\t\t\t\tif (! settings.bDestroying) {\n\t\t\t\t\t_fnAdjustColumnSizing( settings );\n\t\t\t\t}\n\t\t\t} ) );\n\t\t};\n\n\t\tbindResize();\n\n\t\tsettings._reszEvt = true;\n\t}\n}\n\n\n/**\n * Get the maximum strlen for each data column\n *  @param {object} settings dataTables settings object\n *  @param {int} colIdx column of interest\n *  @returns {string} string of the max length\n *  @memberof DataTable#oApi\n */\nfunction _fnGetMaxLenString( settings, colIdx )\n{\n\tvar column = settings.aoColumns[colIdx];\n\n\tif (! column.maxLenString) {\n\t\tvar s, max='', maxLen = -1;\n\t\n\t\tfor ( var i=0, ien=settings.aiDisplayMaster.length ; i<ien ; i++ ) {\n\t\t\tvar rowIdx = settings.aiDisplayMaster[i];\n\t\t\tvar data = _fnGetRowDisplay(settings, rowIdx)[colIdx];\n\n\t\t\tvar cellString = data && typeof data === 'object' && data.nodeType\n\t\t\t\t? data.innerHTML\n\t\t\t\t: data+'';\n\n\t\t\t// Remove id / name attributes from elements so they\n\t\t\t// don't interfere with existing elements\n\t\t\tcellString = cellString\n\t\t\t\t.replace(/id=\".*?\"/g, '')\n\t\t\t\t.replace(/name=\".*?\"/g, '');\n\n\t\t\ts = _stripHtml(cellString)\n\t\t\t\t.replace( /&nbsp;/g, ' ' );\n\t\n\t\t\tif ( s.length > maxLen ) {\n\t\t\t\t// We want the HTML in the string, but the length that\n\t\t\t\t// is important is the stripped string\n\t\t\t\tmax = cellString;\n\t\t\t\tmaxLen = s.length;\n\t\t\t}\n\t\t}\n\n\t\tcolumn.maxLenString = max;\n\t}\n\n\treturn column.maxLenString;\n}\n\n\n/**\n * Append a CSS unit (only if required) to a string\n *  @param {string} value to css-ify\n *  @returns {string} value with css unit\n *  @memberof DataTable#oApi\n */\nfunction _fnStringToCss( s )\n{\n\tif ( s === null ) {\n\t\treturn '0px';\n\t}\n\n\tif ( typeof s == 'number' ) {\n\t\treturn s < 0 ?\n\t\t\t'0px' :\n\t\t\ts+'px';\n\t}\n\n\t// Check it has a unit character already\n\treturn s.match(/\\d$/) ?\n\t\ts+'px' :\n\t\ts;\n}\n\n/**\n * Re-insert the `col` elements for current visibility\n *\n * @param {*} settings DT settings\n */\nfunction _colGroup( settings ) {\n\tvar cols = settings.aoColumns;\n\n\tsettings.colgroup.empty();\n\n\tfor (i=0 ; i<cols.length ; i++) {\n\t\tif (cols[i].bVisible) {\n\t\t\tsettings.colgroup.append(cols[i].colEl);\n\t\t}\n\t}\n}\n\n\nfunction _fnSortInit( settings ) {\n\tvar target = settings.nTHead;\n\tvar headerRows = target.querySelectorAll('tr');\n\tvar legacyTop = settings.bSortCellsTop;\n\tvar notSelector = ':not([data-dt-order=\"disable\"]):not([data-dt-order=\"icon-only\"])';\n\t\n\t// Legacy support for `orderCellsTop`\n\tif (legacyTop === true) {\n\t\ttarget = headerRows[0];\n\t}\n\telse if (legacyTop === false) {\n\t\ttarget = headerRows[ headerRows.length - 1 ];\n\t}\n\n\t_fnSortAttachListener(\n\t\tsettings,\n\t\ttarget,\n\t\ttarget === settings.nTHead\n\t\t\t? 'tr'+notSelector+' th'+notSelector+', tr'+notSelector+' td'+notSelector\n\t\t\t: 'th'+notSelector+', td'+notSelector\n\t);\n\n\t// Need to resolve the user input array into our internal structure\n\tvar order = [];\n\t_fnSortResolve( settings, order, settings.aaSorting );\n\n\tsettings.aaSorting = order;\n}\n\n\nfunction _fnSortAttachListener(settings, node, selector, column, callback) {\n\t_fnBindAction( node, selector, function (e) {\n\t\tvar run = false;\n\t\tvar columns = column === undefined\n\t\t\t? _fnColumnsFromHeader( e.target )\n\t\t\t: [column];\n\n\t\tif ( columns.length ) {\n\t\t\tfor ( var i=0, ien=columns.length ; i<ien ; i++ ) {\n\t\t\t\tvar ret = _fnSortAdd( settings, columns[i], i, e.shiftKey );\n\n\t\t\t\tif (ret !== false) {\n\t\t\t\t\trun = true;\n\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t// If the first entry is no sort, then subsequent\n\t\t\t\t// sort columns are ignored\n\t\t\t\tif (settings.aaSorting.length === 1 && settings.aaSorting[0][1] === '') {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (run) {\n\t\t\t\t_fnProcessingRun(settings, true, function () {\n\t\t\t\t\t_fnSort( settings );\n\t\t\t\t\t_fnSortDisplay( settings, settings.aiDisplay );\n\n\t\t\t\t\t_fnReDraw( settings, false, false );\n\n\t\t\t\t\tif (callback) {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t} );\n}\n\n/**\n * Sort the display array to match the master's order\n * @param {*} settings\n */\nfunction _fnSortDisplay(settings, display) {\n\tif (display.length < 2) {\n\t\treturn;\n\t}\n\n\tvar master = settings.aiDisplayMaster;\n\tvar masterMap = {};\n\tvar map = {};\n\tvar i;\n\n\t// Rather than needing an `indexOf` on master array, we can create a map\n\tfor (i=0 ; i<master.length ; i++) {\n\t\tmasterMap[master[i]] = i;\n\t}\n\n\t// And then cache what would be the indexOf fom the display\n\tfor (i=0 ; i<display.length ; i++) {\n\t\tmap[display[i]] = masterMap[display[i]];\n\t}\n\n\tdisplay.sort(function(a, b){\n\t\t// Short version of this function is simply `master.indexOf(a) - master.indexOf(b);`\n\t\treturn map[a] - map[b];\n\t});\n}\n\n\nfunction _fnSortResolve (settings, nestedSort, sort) {\n\tvar push = function ( a ) {\n\t\tif ($.isPlainObject(a)) {\n\t\t\tif (a.idx !== undefined) {\n\t\t\t\t// Index based ordering\n\t\t\t\tnestedSort.push([a.idx, a.dir]);\n\t\t\t}\n\t\t\telse if (a.name) {\n\t\t\t\t// Name based ordering\n\t\t\t\tvar cols = _pluck( settings.aoColumns, 'sName');\n\t\t\t\tvar idx = cols.indexOf(a.name);\n\n\t\t\t\tif (idx !== -1) {\n\t\t\t\t\tnestedSort.push([idx, a.dir]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Plain column index and direction pair\n\t\t\tnestedSort.push(a);\n\t\t}\n\t};\n\n\tif ( $.isPlainObject(sort) ) {\n\t\t// Object\n\t\tpush(sort);\n\t}\n\telse if ( sort.length && typeof sort[0] === 'number' ) {\n\t\t// 1D array\n\t\tpush(sort);\n\t}\n\telse if ( sort.length ) {\n\t\t// 2D array\n\t\tfor (var z=0; z<sort.length; z++) {\n\t\t\tpush(sort[z]); // Object or array\n\t\t}\n\t}\n}\n\n\nfunction _fnSortFlatten ( settings )\n{\n\tvar\n\t\ti, k, kLen,\n\t\taSort = [],\n\t\textSort = DataTable.ext.type.order,\n\t\taoColumns = settings.aoColumns,\n\t\taDataSort, iCol, sType, srcCol,\n\t\tfixed = settings.aaSortingFixed,\n\t\tfixedObj = $.isPlainObject( fixed ),\n\t\tnestedSort = [];\n\t\n\tif ( ! settings.oFeatures.bSort ) {\n\t\treturn aSort;\n\t}\n\n\t// Build the sort array, with pre-fix and post-fix options if they have been\n\t// specified\n\tif ( Array.isArray( fixed ) ) {\n\t\t_fnSortResolve( settings, nestedSort, fixed );\n\t}\n\n\tif ( fixedObj && fixed.pre ) {\n\t\t_fnSortResolve( settings, nestedSort, fixed.pre );\n\t}\n\n\t_fnSortResolve( settings, nestedSort, settings.aaSorting );\n\n\tif (fixedObj && fixed.post ) {\n\t\t_fnSortResolve( settings, nestedSort, fixed.post );\n\t}\n\n\tfor ( i=0 ; i<nestedSort.length ; i++ )\n\t{\n\t\tsrcCol = nestedSort[i][0];\n\n\t\tif ( aoColumns[ srcCol ] ) {\n\t\t\taDataSort = aoColumns[ srcCol ].aDataSort;\n\n\t\t\tfor ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )\n\t\t\t{\n\t\t\t\tiCol = aDataSort[k];\n\t\t\t\tsType = aoColumns[ iCol ].sType || 'string';\n\n\t\t\t\tif ( nestedSort[i]._idx === undefined ) {\n\t\t\t\t\tnestedSort[i]._idx = aoColumns[iCol].asSorting.indexOf(nestedSort[i][1]);\n\t\t\t\t}\n\n\t\t\t\tif ( nestedSort[i][1] ) {\n\t\t\t\t\taSort.push( {\n\t\t\t\t\t\tsrc:       srcCol,\n\t\t\t\t\t\tcol:       iCol,\n\t\t\t\t\t\tdir:       nestedSort[i][1],\n\t\t\t\t\t\tindex:     nestedSort[i]._idx,\n\t\t\t\t\t\ttype:      sType,\n\t\t\t\t\t\tformatter: extSort[ sType+\"-pre\" ],\n\t\t\t\t\t\tsorter:    extSort[ sType+\"-\"+nestedSort[i][1] ]\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn aSort;\n}\n\n/**\n * Change the order of the table\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnSort ( oSettings, col, dir )\n{\n\tvar\n\t\ti, ien, iLen,\n\t\taiOrig = [],\n\t\textSort = DataTable.ext.type.order,\n\t\taoData = oSettings.aoData,\n\t\tsortCol,\n\t\tdisplayMaster = oSettings.aiDisplayMaster,\n\t\taSort;\n\n\t// Allow a specific column to be sorted, which will _not_ alter the display\n\t// master\n\tif (col !== undefined) {\n\t\tvar srcCol = oSettings.aoColumns[col];\n\t\taSort = [{\n\t\t\tsrc:       col,\n\t\t\tcol:       col,\n\t\t\tdir:       dir,\n\t\t\tindex:     0,\n\t\t\ttype:      srcCol.sType,\n\t\t\tformatter: extSort[ srcCol.sType+\"-pre\" ],\n\t\t\tsorter:    extSort[ srcCol.sType+\"-\"+dir ]\n\t\t}];\n\t\tdisplayMaster = displayMaster.slice();\n\t}\n\telse {\n\t\taSort = _fnSortFlatten( oSettings );\n\t}\n\n\tfor ( i=0, ien=aSort.length ; i<ien ; i++ ) {\n\t\tsortCol = aSort[i];\n\n\t\t// Load the data needed for the sort, for each cell\n\t\t_fnSortData( oSettings, sortCol.col );\n\t}\n\n\t/* No sorting required if server-side or no sorting array */\n\tif ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )\n\t{\n\t\t// Reset the initial positions on each pass so we get a stable sort\n\t\tfor ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {\n\t\t\taiOrig[ i ] = i;\n\t\t}\n\n\t\t// If the first sort is desc, then reverse the array to preserve original\n\t\t// order, just in reverse\n\t\tif (aSort.length && aSort[0].dir === 'desc' && oSettings.orderDescReverse) {\n\t\t\taiOrig.reverse();\n\t\t}\n\n\t\t/* Do the sort - here we want multi-column sorting based on a given data source (column)\n\t\t * and sorting function (from oSort) in a certain direction. It's reasonably complex to\n\t\t * follow on it's own, but this is what we want (example two column sorting):\n\t\t *  fnLocalSorting = function(a,b){\n\t\t *    var test;\n\t\t *    test = oSort['string-asc']('data11', 'data12');\n\t\t *      if (test !== 0)\n\t\t *        return test;\n\t\t *    test = oSort['numeric-desc']('data21', 'data22');\n\t\t *    if (test !== 0)\n\t\t *      return test;\n\t\t *    return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );\n\t\t *  }\n\t\t * Basically we have a test for each sorting column, if the data in that column is equal,\n\t\t * test the next column. If all columns match, then we use a numeric sort on the row\n\t\t * positions in the original data array to provide a stable sort.\n\t\t */\n\t\tdisplayMaster.sort( function ( a, b ) {\n\t\t\tvar\n\t\t\t\tx, y, k, test, sort,\n\t\t\t\tlen=aSort.length,\n\t\t\t\tdataA = aoData[a]._aSortData,\n\t\t\t\tdataB = aoData[b]._aSortData;\n\n\t\t\tfor ( k=0 ; k<len ; k++ ) {\n\t\t\t\tsort = aSort[k];\n\n\t\t\t\t// Data, which may have already been through a `-pre` function\n\t\t\t\tx = dataA[ sort.col ];\n\t\t\t\ty = dataB[ sort.col ];\n\n\t\t\t\tif (sort.sorter) {\n\t\t\t\t\t// If there is a custom sorter (`-asc` or `-desc`) for this\n\t\t\t\t\t// data type, use it\n\t\t\t\t\ttest = sort.sorter(x, y);\n\n\t\t\t\t\tif ( test !== 0 ) {\n\t\t\t\t\t\treturn test;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Otherwise, use generic sorting\n\t\t\t\t\ttest = x<y ? -1 : x>y ? 1 : 0;\n\n\t\t\t\t\tif ( test !== 0 ) {\n\t\t\t\t\t\treturn sort.dir === 'asc' ? test : -test;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tx = aiOrig[a];\n\t\t\ty = aiOrig[b];\n\n\t\t\treturn x<y ? -1 : x>y ? 1 : 0;\n\t\t} );\n\t}\n\telse if ( aSort.length === 0 ) {\n\t\t// Apply index order\n\t\tdisplayMaster.sort(function (x, y) {\n\t\t\treturn x<y ? -1 : x>y ? 1 : 0;\n\t\t});\n\t}\n\n\tif (col === undefined) {\n\t\t// Tell the draw function that we have sorted the data\n\t\toSettings.bSorted = true;\n\t\toSettings.sortDetails = aSort;\n\n\t\t_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort] );\n\t}\n\n\treturn displayMaster;\n}\n\n\n/**\n * Function to run on user sort request\n *  @param {object} settings dataTables settings object\n *  @param {node} attachTo node to attach the handler to\n *  @param {int} colIdx column sorting index\n *  @param {int} addIndex Counter\n *  @param {boolean} [shift=false] Shift click add\n *  @param {function} [callback] callback function\n *  @memberof DataTable#oApi\n */\nfunction _fnSortAdd ( settings, colIdx, addIndex, shift )\n{\n\tvar col = settings.aoColumns[ colIdx ];\n\tvar sorting = settings.aaSorting;\n\tvar asSorting = col.asSorting;\n\tvar nextSortIdx;\n\tvar next = function ( a, overflow ) {\n\t\tvar idx = a._idx;\n\t\tif ( idx === undefined ) {\n\t\t\tidx = asSorting.indexOf(a[1]);\n\t\t}\n\n\t\treturn idx+1 < asSorting.length ?\n\t\t\tidx+1 :\n\t\t\toverflow ?\n\t\t\t\tnull :\n\t\t\t\t0;\n\t};\n\n\tif ( ! col.bSortable ) {\n\t\treturn false;\n\t}\n\n\t// Convert to 2D array if needed\n\tif ( typeof sorting[0] === 'number' ) {\n\t\tsorting = settings.aaSorting = [ sorting ];\n\t}\n\n\t// If appending the sort then we are multi-column sorting\n\tif ( (shift || addIndex) && settings.oFeatures.bSortMulti ) {\n\t\t// Are we already doing some kind of sort on this column?\n\t\tvar sortIdx = _pluck(sorting, '0').indexOf(colIdx);\n\n\t\tif ( sortIdx !== -1 ) {\n\t\t\t// Yes, modify the sort\n\t\t\tnextSortIdx = next( sorting[sortIdx], true );\n\n\t\t\tif ( nextSortIdx === null && sorting.length === 1 ) {\n\t\t\t\tnextSortIdx = 0; // can't remove sorting completely\n\t\t\t}\n\n\t\t\tif ( nextSortIdx === null ) {\n\t\t\t\tsorting.splice( sortIdx, 1 );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsorting[sortIdx][1] = asSorting[ nextSortIdx ];\n\t\t\t\tsorting[sortIdx]._idx = nextSortIdx;\n\t\t\t}\n\t\t}\n\t\telse if (shift) {\n\t\t\t// No sort on this column yet, being added by shift click\n\t\t\t// add it as itself\n\t\t\tsorting.push( [ colIdx, asSorting[0], 0 ] );\n\t\t\tsorting[sorting.length-1]._idx = 0;\n\t\t}\n\t\telse {\n\t\t\t// No sort on this column yet, being added from a colspan\n\t\t\t// so add with same direction as first column\n\t\t\tsorting.push( [ colIdx, sorting[0][1], 0 ] );\n\t\t\tsorting[sorting.length-1]._idx = 0;\n\t\t}\n\t}\n\telse if ( sorting.length && sorting[0][0] == colIdx ) {\n\t\t// Single column - already sorting on this column, modify the sort\n\t\tnextSortIdx = next( sorting[0] );\n\n\t\tsorting.length = 1;\n\t\tsorting[0][1] = asSorting[ nextSortIdx ];\n\t\tsorting[0]._idx = nextSortIdx;\n\t}\n\telse {\n\t\t// Single column - sort only on this column\n\t\tsorting.length = 0;\n\t\tsorting.push( [ colIdx, asSorting[0] ] );\n\t\tsorting[0]._idx = 0;\n\t}\n}\n\n\n/**\n * Set the sorting classes on table's body, Note: it is safe to call this function\n * when bSort and bSortClasses are false\n *  @param {object} oSettings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnSortingClasses( settings )\n{\n\tvar oldSort = settings.aLastSort;\n\tvar sortClass = settings.oClasses.order.position;\n\tvar sort = _fnSortFlatten( settings );\n\tvar features = settings.oFeatures;\n\tvar i, ien, colIdx;\n\n\tif ( features.bSort && features.bSortClasses ) {\n\t\t// Remove old sorting classes\n\t\tfor ( i=0, ien=oldSort.length ; i<ien ; i++ ) {\n\t\t\tcolIdx = oldSort[i].src;\n\n\t\t\t// Remove column sorting\n\t\t\t$( _pluck( settings.aoData, 'anCells', colIdx ) )\n\t\t\t\t.removeClass( sortClass + (i<2 ? i+1 : 3) );\n\t\t}\n\n\t\t// Add new column sorting\n\t\tfor ( i=0, ien=sort.length ; i<ien ; i++ ) {\n\t\t\tcolIdx = sort[i].src;\n\n\t\t\t$( _pluck( settings.aoData, 'anCells', colIdx ) )\n\t\t\t\t.addClass( sortClass + (i<2 ? i+1 : 3) );\n\t\t}\n\t}\n\n\tsettings.aLastSort = sort;\n}\n\n\n// Get the data to sort a column, be it from cache, fresh (populating the\n// cache), or from a sort formatter\nfunction _fnSortData( settings, colIdx )\n{\n\t// Custom sorting function - provided by the sort data type\n\tvar column = settings.aoColumns[ colIdx ];\n\tvar customSort = DataTable.ext.order[ column.sSortDataType ];\n\tvar customData;\n\n\tif ( customSort ) {\n\t\tcustomData = customSort.call( settings.oInstance, settings, colIdx,\n\t\t\t_fnColumnIndexToVisible( settings, colIdx )\n\t\t);\n\t}\n\n\t// Use / populate cache\n\tvar row, cellData;\n\tvar formatter = DataTable.ext.type.order[ column.sType+\"-pre\" ];\n\tvar data = settings.aoData;\n\n\tfor ( var rowIdx=0 ; rowIdx<data.length ; rowIdx++ ) {\n\t\t// Sparse array\n\t\tif (! data[rowIdx]) {\n\t\t\tcontinue;\n\t\t}\n\n\t\trow = data[rowIdx];\n\n\t\tif ( ! row._aSortData ) {\n\t\t\trow._aSortData = [];\n\t\t}\n\n\t\tif ( ! row._aSortData[colIdx] || customSort ) {\n\t\t\tcellData = customSort ?\n\t\t\t\tcustomData[rowIdx] : // If there was a custom sort function, use data from there\n\t\t\t\t_fnGetCellData( settings, rowIdx, colIdx, 'sort' );\n\n\t\t\trow._aSortData[ colIdx ] = formatter ?\n\t\t\t\tformatter( cellData, settings ) :\n\t\t\t\tcellData;\n\t\t}\n\t}\n}\n\n\n/**\n * State information for a table\n *\n * @param {*} settings\n * @returns State object\n */\nfunction _fnSaveState ( settings )\n{\n\tif (settings._bLoadingState) {\n\t\treturn;\n\t}\n\n\t/* Store the interesting variables */\n\tvar state = {\n\t\ttime:    +new Date(),\n\t\tstart:   settings._iDisplayStart,\n\t\tlength:  settings._iDisplayLength,\n\t\torder:   $.extend( true, [], settings.aaSorting ),\n\t\tsearch:  $.extend({}, settings.oPreviousSearch),\n\t\tcolumns: settings.aoColumns.map( function ( col, i ) {\n\t\t\treturn {\n\t\t\t\tvisible: col.bVisible,\n\t\t\t\tsearch: $.extend({}, settings.aoPreSearchCols[i])\n\t\t\t};\n\t\t} )\n\t};\n\n\tsettings.oSavedState = state;\n\t_fnCallbackFire( settings, \"aoStateSaveParams\", 'stateSaveParams', [settings, state] );\n\t\n\tif ( settings.oFeatures.bStateSave && !settings.bDestroying )\n\t{\n\t\tsettings.fnStateSaveCallback.call( settings.oInstance, settings, state );\n\t}\t\n}\n\n\n/**\n * Attempt to load a saved table state\n *  @param {object} oSettings dataTables settings object\n *  @param {object} oInit DataTables init object so we can override settings\n *  @param {function} callback Callback to execute when the state has been loaded\n *  @memberof DataTable#oApi\n */\nfunction _fnLoadState ( settings, init, callback )\n{\n\tif ( ! settings.oFeatures.bStateSave ) {\n\t\tcallback();\n\t\treturn;\n\t}\n\n\tvar loaded = function(state) {\n\t\t_fnImplementState(settings, state, callback);\n\t}\n\n\tvar state = settings.fnStateLoadCallback.call( settings.oInstance, settings, loaded );\n\n\tif ( state !== undefined ) {\n\t\t_fnImplementState( settings, state, callback );\n\t}\n\t// otherwise, wait for the loaded callback to be executed\n\n\treturn true;\n}\n\nfunction _fnImplementState ( settings, s, callback) {\n\tvar i, ien;\n\tvar columns = settings.aoColumns;\n\tsettings._bLoadingState = true;\n\n\t// When StateRestore was introduced the state could now be implemented at any time\n\t// Not just initialisation. To do this an api instance is required in some places\n\tvar api = settings._bInitComplete ? new DataTable.Api(settings) : null;\n\n\tif ( ! s || ! s.time ) {\n\t\tsettings._bLoadingState = false;\n\t\tcallback();\n\t\treturn;\n\t}\n\n\t// Reject old data\n\tvar duration = settings.iStateDuration;\n\tif ( duration > 0 && s.time < +new Date() - (duration*1000) ) {\n\t\tsettings._bLoadingState = false;\n\t\tcallback();\n\t\treturn;\n\t}\n\n\t// Allow custom and plug-in manipulation functions to alter the saved data set and\n\t// cancelling of loading by returning false\n\tvar abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, s] );\n\tif ( abStateLoad.indexOf(false) !== -1 ) {\n\t\tsettings._bLoadingState = false;\n\t\tcallback();\n\t\treturn;\n\t}\n\n\t// Number of columns have changed - all bets are off, no restore of settings\n\tif ( s.columns && columns.length !== s.columns.length ) {\n\t\tsettings._bLoadingState = false;\n\t\tcallback();\n\t\treturn;\n\t}\n\n\t// Store the saved state so it might be accessed at any time\n\tsettings.oLoadedState = $.extend( true, {}, s );\n\n\t// This is needed for ColReorder, which has to happen first to allow all\n\t// the stored indexes to be usable. It is not publicly documented.\n\t_fnCallbackFire( settings, null, 'stateLoadInit', [settings, s], true );\n\n\t// Page Length\n\tif ( s.length !== undefined ) {\n\t\t// If already initialised just set the value directly so that the select element is also updated\n\t\tif (api) {\n\t\t\tapi.page.len(s.length)\n\t\t}\n\t\telse {\n\t\t\tsettings._iDisplayLength   = s.length;\n\t\t}\n\t}\n\n\t// Restore key features\n\tif ( s.start !== undefined ) {\n\t\tif(api === null) {\n\t\t\tsettings._iDisplayStart    = s.start;\n\t\t\tsettings.iInitDisplayStart = s.start;\n\t\t}\n\t\telse {\n\t\t\t_fnPageChange(settings, s.start/settings._iDisplayLength);\n\t\t}\n\t}\n\n\t// Order\n\tif ( s.order !== undefined ) {\n\t\tsettings.aaSorting = [];\n\t\t$.each( s.order, function ( i, col ) {\n\t\t\tsettings.aaSorting.push( col[0] >= columns.length ?\n\t\t\t\t[ 0, col[1] ] :\n\t\t\t\tcol\n\t\t\t);\n\t\t} );\n\t}\n\n\t// Search\n\tif ( s.search !== undefined ) {\n\t\t$.extend( settings.oPreviousSearch, s.search );\n\t}\n\n\t// Columns\n\tif ( s.columns ) {\n\t\tfor ( i=0, ien=s.columns.length ; i<ien ; i++ ) {\n\t\t\tvar col = s.columns[i];\n\n\t\t\t// Visibility\n\t\t\tif ( col.visible !== undefined ) {\n\t\t\t\t// If the api is defined, the table has been initialised so we need to use it rather than internal settings\n\t\t\t\tif (api) {\n\t\t\t\t\t// Don't redraw the columns on every iteration of this loop, we will do this at the end instead\n\t\t\t\t\tapi.column(i).visible(col.visible, false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcolumns[i].bVisible = col.visible;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Search\n\t\t\tif ( col.search !== undefined ) {\n\t\t\t\t$.extend( settings.aoPreSearchCols[i], col.search );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If the api is defined then we need to adjust the columns once the visibility has been changed\n\t\tif (api) {\n\t\t\tapi.columns.adjust();\n\t\t}\n\t}\n\n\tsettings._bLoadingState = false;\n\t_fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, s] );\n\tcallback();\n}\n\n/**\n * Log an error message\n *  @param {object} settings dataTables settings object\n *  @param {int} level log error messages, or display them to the user\n *  @param {string} msg error message\n *  @param {int} tn Technical note id to get more information about the error.\n *  @memberof DataTable#oApi\n */\nfunction _fnLog( settings, level, msg, tn )\n{\n\tmsg = 'DataTables warning: '+\n\t\t(settings ? 'table id='+settings.sTableId+' - ' : '')+msg;\n\n\tif ( tn ) {\n\t\tmsg += '. For more information about this error, please see '+\n\t\t'https://datatables.net/tn/'+tn;\n\t}\n\n\tif ( ! level  ) {\n\t\t// Backwards compatibility pre 1.10\n\t\tvar ext = DataTable.ext;\n\t\tvar type = ext.sErrMode || ext.errMode;\n\n\t\tif ( settings ) {\n\t\t\t_fnCallbackFire( settings, null, 'dt-error', [ settings, tn, msg ], true );\n\t\t}\n\n\t\tif ( type == 'alert' ) {\n\t\t\talert( msg );\n\t\t}\n\t\telse if ( type == 'throw' ) {\n\t\t\tthrow new Error(msg);\n\t\t}\n\t\telse if ( typeof type == 'function' ) {\n\t\t\ttype( settings, tn, msg );\n\t\t}\n\t}\n\telse if ( window.console && console.log ) {\n\t\tconsole.log( msg );\n\t}\n}\n\n\n/**\n * See if a property is defined on one object, if so assign it to the other object\n *  @param {object} ret target object\n *  @param {object} src source object\n *  @param {string} name property\n *  @param {string} [mappedName] name to map too - optional, name used if not given\n *  @memberof DataTable#oApi\n */\nfunction _fnMap( ret, src, name, mappedName )\n{\n\tif ( Array.isArray( name ) ) {\n\t\t$.each( name, function (i, val) {\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\t_fnMap( ret, src, val[0], val[1] );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_fnMap( ret, src, val );\n\t\t\t}\n\t\t} );\n\n\t\treturn;\n\t}\n\n\tif ( mappedName === undefined ) {\n\t\tmappedName = name;\n\t}\n\n\tif ( src[name] !== undefined ) {\n\t\tret[mappedName] = src[name];\n\t}\n}\n\n\n/**\n * Extend objects - very similar to jQuery.extend, but deep copy objects, and\n * shallow copy arrays. The reason we need to do this, is that we don't want to\n * deep copy array init values (such as aaSorting) since the dev wouldn't be\n * able to override them, but we do want to deep copy arrays.\n *  @param {object} out Object to extend\n *  @param {object} extender Object from which the properties will be applied to\n *      out\n *  @param {boolean} breakRefs If true, then arrays will be sliced to take an\n *      independent copy with the exception of the `data` or `aaData` parameters\n *      if they are present. This is so you can pass in a collection to\n *      DataTables and have that used as your data source without breaking the\n *      references\n *  @returns {object} out Reference, just for convenience - out === the return.\n *  @memberof DataTable#oApi\n *  @todo This doesn't take account of arrays inside the deep copied objects.\n */\nfunction _fnExtend( out, extender, breakRefs )\n{\n\tvar val;\n\n\tfor ( var prop in extender ) {\n\t\tif ( Object.prototype.hasOwnProperty.call(extender, prop) ) {\n\t\t\tval = extender[prop];\n\n\t\t\tif ( $.isPlainObject( val ) ) {\n\t\t\t\tif ( ! $.isPlainObject( out[prop] ) ) {\n\t\t\t\t\tout[prop] = {};\n\t\t\t\t}\n\t\t\t\t$.extend( true, out[prop], val );\n\t\t\t}\n\t\t\telse if ( breakRefs && prop !== 'data' && prop !== 'aaData' && Array.isArray(val) ) {\n\t\t\t\tout[prop] = val.slice();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[prop] = val;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n\n\n/**\n * Bind an event handers to allow a click or return key to activate the callback.\n * This is good for accessibility since a return on the keyboard will have the\n * same effect as a click, if the element has focus.\n *  @param {element} n Element to bind the action to\n *  @param {object|string} selector Selector (for delegated events) or data object\n *   to pass to the triggered function\n *  @param {function} fn Callback function for when the event is triggered\n *  @memberof DataTable#oApi\n */\nfunction _fnBindAction( n, selector, fn )\n{\n\t$(n)\n\t\t.on( 'click.DT', selector, function (e) {\n\t\t\tfn(e);\n\t\t} )\n\t\t.on( 'keypress.DT', selector, function (e){\n\t\t\tif ( e.which === 13 ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tfn(e);\n\t\t\t}\n\t\t} )\n\t\t.on( 'selectstart.DT', selector, function () {\n\t\t\t// Don't want a double click resulting in text selection\n\t\t\treturn false;\n\t\t} );\n}\n\n\n/**\n * Register a callback function. Easily allows a callback function to be added to\n * an array store of callback functions that can then all be called together.\n *  @param {object} settings dataTables settings object\n *  @param {string} store Name of the array storage for the callbacks in oSettings\n *  @param {function} fn Function to be called back\n *  @memberof DataTable#oApi\n */\nfunction _fnCallbackReg( settings, store, fn )\n{\n\tif ( fn ) {\n\t\tsettings[store].push(fn);\n\t}\n}\n\n\n/**\n * Fire callback functions and trigger events. Note that the loop over the\n * callback array store is done backwards! Further note that you do not want to\n * fire off triggers in time sensitive applications (for example cell creation)\n * as its slow.\n *  @param {object} settings dataTables settings object\n *  @param {string} callbackArr Name of the array storage for the callbacks in\n *      oSettings\n *  @param {string} eventName Name of the jQuery custom event to trigger. If\n *      null no trigger is fired\n *  @param {array} args Array of arguments to pass to the callback function /\n *      trigger\n *  @param {boolean} [bubbles] True if the event should bubble\n *  @memberof DataTable#oApi\n */\nfunction _fnCallbackFire( settings, callbackArr, eventName, args, bubbles )\n{\n\tvar ret = [];\n\n\tif ( callbackArr ) {\n\t\tret = settings[callbackArr].slice().reverse().map( function (val) {\n\t\t\treturn val.apply( settings.oInstance, args );\n\t\t} );\n\t}\n\n\tif ( eventName !== null) {\n\t\tvar e = $.Event( eventName+'.dt' );\n\t\tvar table = $(settings.nTable);\n\t\t\n\t\t// Expose the DataTables API on the event object for easy access\n\t\te.dt = settings.api;\n\n\t\ttable[bubbles ?  'trigger' : 'triggerHandler']( e, args );\n\n\t\t// If not yet attached to the document, trigger the event\n\t\t// on the body directly to sort of simulate the bubble\n\t\tif (bubbles && table.parents('body').length === 0) {\n\t\t\t$('body').trigger( e, args );\n\t\t}\n\n\t\tret.push( e.result );\n\t}\n\n\treturn ret;\n}\n\n\nfunction _fnLengthOverflow ( settings )\n{\n\tvar\n\t\tstart = settings._iDisplayStart,\n\t\tend = settings.fnDisplayEnd(),\n\t\tlen = settings._iDisplayLength;\n\n\t/* If we have space to show extra rows (backing up from the end point - then do so */\n\tif ( start >= end )\n\t{\n\t\tstart = end - len;\n\t}\n\n\t// Keep the start record on the current page\n\tstart -= (start % len);\n\n\tif ( len === -1 || start < 0 )\n\t{\n\t\tstart = 0;\n\t}\n\n\tsettings._iDisplayStart = start;\n}\n\n\nfunction _fnRenderer( settings, type )\n{\n\tvar renderer = settings.renderer;\n\tvar host = DataTable.ext.renderer[type];\n\n\tif ( $.isPlainObject( renderer ) && renderer[type] ) {\n\t\t// Specific renderer for this type. If available use it, otherwise use\n\t\t// the default.\n\t\treturn host[renderer[type]] || host._;\n\t}\n\telse if ( typeof renderer === 'string' ) {\n\t\t// Common renderer - if there is one available for this type use it,\n\t\t// otherwise use the default\n\t\treturn host[renderer] || host._;\n\t}\n\n\t// Use the default\n\treturn host._;\n}\n\n\n/**\n * Detect the data source being used for the table. Used to simplify the code\n * a little (ajax) and to make it compress a little smaller.\n *\n *  @param {object} settings dataTables settings object\n *  @returns {string} Data source\n *  @memberof DataTable#oApi\n */\nfunction _fnDataSource ( settings )\n{\n\tif ( settings.oFeatures.bServerSide ) {\n\t\treturn 'ssp';\n\t}\n\telse if ( settings.ajax ) {\n\t\treturn 'ajax';\n\t}\n\treturn 'dom';\n}\n\n/**\n * Common replacement for language strings\n *\n * @param {*} settings DT settings object\n * @param {*} str String with values to replace\n * @param {*} entries Plural number for _ENTRIES_ - can be undefined\n * @returns String\n */\nfunction _fnMacros ( settings, str, entries )\n{\n\t// When infinite scrolling, we are always starting at 1. _iDisplayStart is\n\t// used only internally\n\tvar\n\t\tformatter  = settings.fnFormatNumber,\n\t\tstart      = settings._iDisplayStart+1,\n\t\tlen        = settings._iDisplayLength,\n\t\tvis        = settings.fnRecordsDisplay(),\n\t\tmax        = settings.fnRecordsTotal(),\n\t\tall        = len === -1;\n\n\treturn str.\n\t\treplace(/_START_/g, formatter.call( settings, start ) ).\n\t\treplace(/_END_/g,   formatter.call( settings, settings.fnDisplayEnd() ) ).\n\t\treplace(/_MAX_/g,   formatter.call( settings, max ) ).\n\t\treplace(/_TOTAL_/g, formatter.call( settings, vis ) ).\n\t\treplace(/_PAGE_/g,  formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).\n\t\treplace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) ).\n\t\treplace(/_ENTRIES_/g, settings.api.i18n('entries', '', entries) ).\n\t\treplace(/_ENTRIES-MAX_/g, settings.api.i18n('entries', '', max) ).\n\t\treplace(/_ENTRIES-TOTAL_/g, settings.api.i18n('entries', '', vis) );\n}\n\n\n\n/**\n * Computed structure of the DataTables API, defined by the options passed to\n * `DataTable.Api.register()` when building the API.\n *\n * The structure is built in order to speed creation and extension of the Api\n * objects since the extensions are effectively pre-parsed.\n *\n * The array is an array of objects with the following structure, where this\n * base array represents the Api prototype base:\n *\n *     [\n *       {\n *         name:      'data'                -- string   - Property name\n *         val:       function () {},       -- function - Api method (or undefined if just an object\n *         methodExt: [ ... ],              -- array    - Array of Api object definitions to extend the method result\n *         propExt:   [ ... ]               -- array    - Array of Api object definitions to extend the property\n *       },\n *       {\n *         name:     'row'\n *         val:       {},\n *         methodExt: [ ... ],\n *         propExt:   [\n *           {\n *             name:      'data'\n *             val:       function () {},\n *             methodExt: [ ... ],\n *             propExt:   [ ... ]\n *           },\n *           ...\n *         ]\n *       }\n *     ]\n *\n * @type {Array}\n * @ignore\n */\nvar __apiStruct = [];\n\n\n/**\n * `Array.prototype` reference.\n *\n * @type object\n * @ignore\n */\nvar __arrayProto = Array.prototype;\n\n\n/**\n * Abstraction for `context` parameter of the `Api` constructor to allow it to\n * take several different forms for ease of use.\n *\n * Each of the input parameter types will be converted to a DataTables settings\n * object where possible.\n *\n * @param  {string|node|jQuery|object} mixed DataTable identifier. Can be one\n *   of:\n *\n *   * `string` - jQuery selector. Any DataTables' matching the given selector\n *     with be found and used.\n *   * `node` - `TABLE` node which has already been formed into a DataTable.\n *   * `jQuery` - A jQuery object of `TABLE` nodes.\n *   * `object` - DataTables settings object\n *   * `DataTables.Api` - API instance\n * @return {array|null} Matching DataTables settings objects. `null` or\n *   `undefined` is returned if no matching DataTable is found.\n * @ignore\n */\nvar _toSettings = function ( mixed )\n{\n\tvar idx, jq;\n\tvar settings = DataTable.settings;\n\tvar tables = _pluck(settings, 'nTable');\n\n\tif ( ! mixed ) {\n\t\treturn [];\n\t}\n\telse if ( mixed.nTable && mixed.oFeatures ) {\n\t\t// DataTables settings object\n\t\treturn [ mixed ];\n\t}\n\telse if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {\n\t\t// Table node\n\t\tidx = tables.indexOf(mixed);\n\t\treturn idx !== -1 ? [ settings[idx] ] : null;\n\t}\n\telse if ( mixed && typeof mixed.settings === 'function' ) {\n\t\treturn mixed.settings().toArray();\n\t}\n\telse if ( typeof mixed === 'string' ) {\n\t\t// jQuery selector\n\t\tjq = $(mixed).get();\n\t}\n\telse if ( mixed instanceof $ ) {\n\t\t// jQuery object (also DataTables instance)\n\t\tjq = mixed.get();\n\t}\n\n\tif ( jq ) {\n\t\treturn settings.filter(function (v, idx) {\n\t\t\treturn jq.includes(tables[idx]);\n\t\t});\n\t}\n};\n\n\n/**\n * DataTables API class - used to control and interface with  one or more\n * DataTables enhanced tables.\n *\n * The API class is heavily based on jQuery, presenting a chainable interface\n * that you can use to interact with tables. Each instance of the API class has\n * a \"context\" - i.e. the tables that it will operate on. This could be a single\n * table, all tables on a page or a sub-set thereof.\n *\n * Additionally the API is designed to allow you to easily work with the data in\n * the tables, retrieving and manipulating it as required. This is done by\n * presenting the API class as an array like interface. The contents of the\n * array depend upon the actions requested by each method (for example\n * `rows().nodes()` will return an array of nodes, while `rows().data()` will\n * return an array of objects or arrays depending upon your table's\n * configuration). The API object has a number of array like methods (`push`,\n * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,\n * `unique` etc) to assist your working with the data held in a table.\n *\n * Most methods (those which return an Api instance) are chainable, which means\n * the return from a method call also has all of the methods available that the\n * top level object had. For example, these two calls are equivalent:\n *\n *     // Not chained\n *     api.row.add( {...} );\n *     api.draw();\n *\n *     // Chained\n *     api.row.add( {...} ).draw();\n *\n * @class DataTable.Api\n * @param {array|object|string|jQuery} context DataTable identifier. This is\n *   used to define which DataTables enhanced tables this API will operate on.\n *   Can be one of:\n *\n *   * `string` - jQuery selector. Any DataTables' matching the given selector\n *     with be found and used.\n *   * `node` - `TABLE` node which has already been formed into a DataTable.\n *   * `jQuery` - A jQuery object of `TABLE` nodes.\n *   * `object` - DataTables settings object\n * @param {array} [data] Data to initialise the Api instance with.\n *\n * @example\n *   // Direct initialisation during DataTables construction\n *   var api = $('#example').DataTable();\n *\n * @example\n *   // Initialisation using a DataTables jQuery object\n *   var api = $('#example').dataTable().api();\n *\n * @example\n *   // Initialisation as a constructor\n *   var api = new DataTable.Api( 'table.dataTable' );\n */\n_Api = function ( context, data )\n{\n\tif ( ! (this instanceof _Api) ) {\n\t\treturn new _Api( context, data );\n\t}\n\n\tvar i;\n\tvar settings = [];\n\tvar ctxSettings = function ( o ) {\n\t\tvar a = _toSettings( o );\n\t\tif ( a ) {\n\t\t\tsettings.push.apply( settings, a );\n\t\t}\n\t};\n\n\tif ( Array.isArray( context ) ) {\n\t\tfor ( i=0 ; i<context.length ; i++ ) {\n\t\t\tctxSettings( context[i] );\n\t\t}\n\t}\n\telse {\n\t\tctxSettings( context );\n\t}\n\n\t// Remove duplicates\n\tthis.context = settings.length > 1\n\t\t? _unique( settings )\n\t\t: settings;\n\n\t// Initial data\n\tif ( data ) {\n\t\t// Chrome can throw a max stack error if apply is called with\n\t\t// too large an array, but apply is faster.\n\t\tif (data.length < 10000) {\n\t\t\tthis.push.apply(this, data);\n\t\t}\n\t\telse {\n\t\t\tfor (i=0 ; i<data.length ; i++) {\n\t\t\t\tthis.push(data[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// selector\n\tthis.selector = {\n\t\trows: null,\n\t\tcols: null,\n\t\topts: null\n\t};\n\n\t_Api.extend( this, this, __apiStruct );\n};\n\nDataTable.Api = _Api;\n\n// Don't destroy the existing prototype, just extend it. Required for jQuery 2's\n// isPlainObject.\n$.extend( _Api.prototype, {\n\tany: function ()\n\t{\n\t\treturn this.count() !== 0;\n\t},\n\n\tcontext: [], // array of table settings objects\n\n\tcount: function ()\n\t{\n\t\treturn this.flatten().length;\n\t},\n\n\teach: function ( fn )\n\t{\n\t\tfor ( var i=0, ien=this.length ; i<ien; i++ ) {\n\t\t\tfn.call( this, this[i], i, this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\teq: function ( idx )\n\t{\n\t\tvar ctx = this.context;\n\n\t\treturn ctx.length > idx ?\n\t\t\tnew _Api( ctx[idx], this[idx] ) :\n\t\t\tnull;\n\t},\n\n\tfilter: function ( fn )\n\t{\n\t\tvar a = __arrayProto.filter.call( this, fn, this );\n\n\t\treturn new _Api( this.context, a );\n\t},\n\n\tflatten: function ()\n\t{\n\t\tvar a = [];\n\n\t\treturn new _Api( this.context, a.concat.apply( a, this.toArray() ) );\n\t},\n\n\tget: function ( idx )\n\t{\n\t\treturn this[ idx ];\n\t},\n\n\tjoin:    __arrayProto.join,\n\n\tincludes: function ( find ) {\n\t\treturn this.indexOf( find ) === -1 ? false : true;\n\t},\n\n\tindexOf: __arrayProto.indexOf,\n\n\titerator: function ( flatten, type, fn, alwaysNew ) {\n\t\tvar\n\t\t\ta = [], ret,\n\t\t\ti, ien, j, jen,\n\t\t\tcontext = this.context,\n\t\t\trows, items, item,\n\t\t\tselector = this.selector;\n\n\t\t// Argument shifting\n\t\tif ( typeof flatten === 'string' ) {\n\t\t\talwaysNew = fn;\n\t\t\tfn = type;\n\t\t\ttype = flatten;\n\t\t\tflatten = false;\n\t\t}\n\n\t\tfor ( i=0, ien=context.length ; i<ien ; i++ ) {\n\t\t\tvar apiInst = new _Api( context[i] );\n\n\t\t\tif ( type === 'table' ) {\n\t\t\t\tret = fn.call( apiInst, context[i], i );\n\n\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\ta.push( ret );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( type === 'columns' || type === 'rows' ) {\n\t\t\t\t// this has same length as context - one entry for each table\n\t\t\t\tret = fn.call( apiInst, context[i], this[i], i );\n\n\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\ta.push( ret );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( type === 'every' || type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {\n\t\t\t\t// columns and rows share the same structure.\n\t\t\t\t// 'this' is an array of column indexes for each context\n\t\t\t\titems = this[i];\n\n\t\t\t\tif ( type === 'column-rows' ) {\n\t\t\t\t\trows = _selector_row_indexes( context[i], selector.opts );\n\t\t\t\t}\n\n\t\t\t\tfor ( j=0, jen=items.length ; j<jen ; j++ ) {\n\t\t\t\t\titem = items[j];\n\n\t\t\t\t\tif ( type === 'cell' ) {\n\t\t\t\t\t\tret = fn.call( apiInst, context[i], item.row, item.column, i, j );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tret = fn.call( apiInst, context[i], item, i, j, rows );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\ta.push( ret );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( a.length || alwaysNew ) {\n\t\t\tvar api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );\n\t\t\tvar apiSelector = api.selector;\n\t\t\tapiSelector.rows = selector.rows;\n\t\t\tapiSelector.cols = selector.cols;\n\t\t\tapiSelector.opts = selector.opts;\n\t\t\treturn api;\n\t\t}\n\t\treturn this;\n\t},\n\n\tlastIndexOf: __arrayProto.lastIndexOf,\n\n\tlength:  0,\n\n\tmap: function ( fn )\n\t{\n\t\tvar a = __arrayProto.map.call( this, fn, this );\n\n\t\treturn new _Api( this.context, a );\n\t},\n\n\tpluck: function ( prop )\n\t{\n\t\tvar fn = DataTable.util.get(prop);\n\n\t\treturn this.map( function ( el ) {\n\t\t\treturn fn(el);\n\t\t} );\n\t},\n\n\tpop:     __arrayProto.pop,\n\n\tpush:    __arrayProto.push,\n\n\treduce: __arrayProto.reduce,\n\n\treduceRight: __arrayProto.reduceRight,\n\n\treverse: __arrayProto.reverse,\n\n\t// Object with rows, columns and opts\n\tselector: null,\n\n\tshift:   __arrayProto.shift,\n\n\tslice: function () {\n\t\treturn new _Api( this.context, this );\n\t},\n\n\tsort:    __arrayProto.sort,\n\n\tsplice:  __arrayProto.splice,\n\n\ttoArray: function ()\n\t{\n\t\treturn __arrayProto.slice.call( this );\n\t},\n\n\tto$: function ()\n\t{\n\t\treturn $( this );\n\t},\n\n\ttoJQuery: function ()\n\t{\n\t\treturn $( this );\n\t},\n\n\tunique: function ()\n\t{\n\t\treturn new _Api( this.context, _unique(this.toArray()) );\n\t},\n\n\tunshift: __arrayProto.unshift\n} );\n\n\nfunction _api_scope( scope, fn, struc ) {\n\treturn function () {\n\t\tvar ret = fn.apply( scope || this, arguments );\n\n\t\t// Method extension\n\t\t_Api.extend( ret, ret, struc.methodExt );\n\t\treturn ret;\n\t};\n}\n\nfunction _api_find( src, name ) {\n\tfor ( var i=0, ien=src.length ; i<ien ; i++ ) {\n\t\tif ( src[i].name === name ) {\n\t\t\treturn src[i];\n\t\t}\n\t}\n\treturn null;\n}\n\nwindow.__apiStruct = __apiStruct;\n\n_Api.extend = function ( scope, obj, ext )\n{\n\t// Only extend API instances and static properties of the API\n\tif ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {\n\t\treturn;\n\t}\n\n\tvar\n\t\ti, ien,\n\t\tstruct;\n\n\tfor ( i=0, ien=ext.length ; i<ien ; i++ ) {\n\t\tstruct = ext[i];\n\n\t\tif (struct.name === '__proto__') {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Value\n\t\tobj[ struct.name ] = struct.type === 'function' ?\n\t\t\t_api_scope( scope, struct.val, struct ) :\n\t\t\tstruct.type === 'object' ?\n\t\t\t\t{} :\n\t\t\t\tstruct.val;\n\n\t\tobj[ struct.name ].__dt_wrapper = true;\n\n\t\t// Property extension\n\t\t_Api.extend( scope, obj[ struct.name ], struct.propExt );\n\t}\n};\n\n//     [\n//       {\n//         name:      'data'                -- string   - Property name\n//         val:       function () {},       -- function - Api method (or undefined if just an object\n//         methodExt: [ ... ],              -- array    - Array of Api object definitions to extend the method result\n//         propExt:   [ ... ]               -- array    - Array of Api object definitions to extend the property\n//       },\n//       {\n//         name:     'row'\n//         val:       {},\n//         methodExt: [ ... ],\n//         propExt:   [\n//           {\n//             name:      'data'\n//             val:       function () {},\n//             methodExt: [ ... ],\n//             propExt:   [ ... ]\n//           },\n//           ...\n//         ]\n//       }\n//     ]\n\n\n_Api.register = _api_register = function ( name, val )\n{\n\tif ( Array.isArray( name ) ) {\n\t\tfor ( var j=0, jen=name.length ; j<jen ; j++ ) {\n\t\t\t_Api.register( name[j], val );\n\t\t}\n\t\treturn;\n\t}\n\n\tvar\n\t\ti, ien,\n\t\their = name.split('.'),\n\t\tstruct = __apiStruct,\n\t\tkey, method;\n\n\tfor ( i=0, ien=heir.length ; i<ien ; i++ ) {\n\t\tmethod = heir[i].indexOf('()') !== -1;\n\t\tkey = method ?\n\t\t\their[i].replace('()', '') :\n\t\t\their[i];\n\n\t\tvar src = _api_find( struct, key );\n\t\tif ( ! src ) {\n\t\t\tsrc = {\n\t\t\t\tname:      key,\n\t\t\t\tval:       {},\n\t\t\t\tmethodExt: [],\n\t\t\t\tpropExt:   [],\n\t\t\t\ttype:      'object'\n\t\t\t};\n\t\t\tstruct.push( src );\n\t\t}\n\n\t\tif ( i === ien-1 ) {\n\t\t\tsrc.val = val;\n\t\t\tsrc.type = typeof val === 'function' ?\n\t\t\t\t'function' :\n\t\t\t\t$.isPlainObject( val ) ?\n\t\t\t\t\t'object' :\n\t\t\t\t\t'other';\n\t\t}\n\t\telse {\n\t\t\tstruct = method ?\n\t\t\t\tsrc.methodExt :\n\t\t\t\tsrc.propExt;\n\t\t}\n\t}\n};\n\n_Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {\n\t_Api.register( pluralName, val );\n\n\t_Api.register( singularName, function () {\n\t\tvar ret = val.apply( this, arguments );\n\n\t\tif ( ret === this ) {\n\t\t\t// Returned item is the API instance that was passed in, return it\n\t\t\treturn this;\n\t\t}\n\t\telse if ( ret instanceof _Api ) {\n\t\t\t// New API instance returned, want the value from the first item\n\t\t\t// in the returned array for the singular result.\n\t\t\treturn ret.length ?\n\t\t\t\tArray.isArray( ret[0] ) ?\n\t\t\t\t\tnew _Api( ret.context, ret[0] ) : // Array results are 'enhanced'\n\t\t\t\t\tret[0] :\n\t\t\t\tundefined;\n\t\t}\n\n\t\t// Non-API return - just fire it back\n\t\treturn ret;\n\t} );\n};\n\n\n/**\n * Selector for HTML tables. Apply the given selector to the give array of\n * DataTables settings objects.\n *\n * @param {string|integer} [selector] jQuery selector string or integer\n * @param  {array} Array of DataTables settings objects to be filtered\n * @return {array}\n * @ignore\n */\nvar __table_selector = function ( selector, a )\n{\n\tif ( Array.isArray(selector) ) {\n\t\tvar result = [];\n\n\t\tselector.forEach(function (sel) {\n\t\t\tvar inner = __table_selector(sel, a);\n\n\t\t\tresult.push.apply(result, inner);\n\t\t});\n\n\t\treturn result.filter( function (item) {\n\t\t\treturn item;\n\t\t});\n\t}\n\n\t// Integer is used to pick out a table by index\n\tif ( typeof selector === 'number' ) {\n\t\treturn [ a[ selector ] ];\n\t}\n\n\t// Perform a jQuery selector on the table nodes\n\tvar nodes = a.map( function (el) {\n\t\treturn el.nTable;\n\t} );\n\n\treturn $(nodes)\n\t\t.filter( selector )\n\t\t.map( function () {\n\t\t\t// Need to translate back from the table node to the settings\n\t\t\tvar idx = nodes.indexOf(this);\n\t\t\treturn a[ idx ];\n\t\t} )\n\t\t.toArray();\n};\n\n\n\n/**\n * Context selector for the API's context (i.e. the tables the API instance\n * refers to.\n *\n * @name    DataTable.Api#tables\n * @param {string|integer} [selector] Selector to pick which tables the iterator\n *   should operate on. If not given, all tables in the current context are\n *   used. This can be given as a jQuery selector (for example `':gt(0)'`) to\n *   select multiple tables or as an integer to select a single table.\n * @returns {DataTable.Api} Returns a new API instance if a selector is given.\n */\n_api_register( 'tables()', function ( selector ) {\n\t// A new instance is created if there was a selector specified\n\treturn selector !== undefined && selector !== null ?\n\t\tnew _Api( __table_selector( selector, this.context ) ) :\n\t\tthis;\n} );\n\n\n_api_register( 'table()', function ( selector ) {\n\tvar tables = this.tables( selector );\n\tvar ctx = tables.context;\n\n\t// Truncate to the first matched table\n\treturn ctx.length ?\n\t\tnew _Api( ctx[0] ) :\n\t\ttables;\n} );\n\n// Common methods, combined to reduce size\n[\n\t['nodes', 'node', 'nTable'],\n\t['body', 'body', 'nTBody'],\n\t['header', 'header', 'nTHead'],\n\t['footer', 'footer', 'nTFoot'],\n].forEach(function (item) {\n\t_api_registerPlural(\n\t\t'tables().' + item[0] + '()',\n\t\t'table().' + item[1] + '()' ,\n\t\tfunction () {\n\t\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\t\treturn ctx[item[2]];\n\t\t\t}, 1 );\n\t\t}\n\t);\n});\n\n// Structure methods\n[\n\t['header', 'aoHeader'],\n\t['footer', 'aoFooter'],\n].forEach(function (item) {\n\t_api_register( 'table().' + item[0] + '.structure()' , function (selector) {\n\t\tvar indexes = this.columns(selector).indexes().flatten();\n\t\tvar ctx = this.context[0];\n\t\t\n\t\treturn _fnHeaderLayout(ctx, ctx[item[1]], indexes);\n\t} );\n})\n\n\n_api_registerPlural( 'tables().containers()', 'table().container()' , function () {\n\treturn this.iterator( 'table', function ( ctx ) {\n\t\treturn ctx.nTableWrapper;\n\t}, 1 );\n} );\n\n_api_register( 'tables().every()', function ( fn ) {\n\tvar that = this;\n\n\treturn this.iterator('table', function (s, i) {\n\t\tfn.call(that.table(i), i);\n\t});\n});\n\n_api_register( 'caption()', function ( value, side ) {\n\tvar context = this.context;\n\n\t// Getter - return existing node's content\n\tif ( value === undefined ) {\n\t\tvar caption = context[0].captionNode;\n\n\t\treturn caption && context.length ?\n\t\t\tcaption.innerHTML : \n\t\t\tnull;\n\t}\n\n\treturn this.iterator( 'table', function ( ctx ) {\n\t\tvar table = $(ctx.nTable);\n\t\tvar caption = $(ctx.captionNode);\n\t\tvar container = $(ctx.nTableWrapper);\n\n\t\t// Create the node if it doesn't exist yet\n\t\tif ( ! caption.length ) {\n\t\t\tcaption = $('<caption/>').html( value );\n\t\t\tctx.captionNode = caption[0];\n\n\t\t\t// If side isn't set, we need to insert into the document to let the\n\t\t\t// CSS decide so we can read it back, otherwise there is no way to\n\t\t\t// know if the CSS would put it top or bottom for scrolling\n\t\t\tif (! side) {\n\t\t\t\ttable.prepend(caption);\n\n\t\t\t\tside = caption.css('caption-side');\n\t\t\t}\n\t\t}\n\n\t\tcaption.html( value );\n\n\t\tif ( side ) {\n\t\t\tcaption.css( 'caption-side', side );\n\t\t\tcaption[0]._captionSide = side;\n\t\t}\n\n\t\tif (container.find('div.dataTables_scroll').length) {\n\t\t\tvar selector = (side === 'top' ? 'Head' : 'Foot');\n\n\t\t\tcontainer.find('div.dataTables_scroll'+ selector +' table').prepend(caption);\n\t\t}\n\t\telse {\n\t\t\ttable.prepend(caption);\n\t\t}\n\t}, 1 );\n} );\n\n_api_register( 'caption.node()', function () {\n\tvar ctx = this.context;\n\n\treturn ctx.length ? ctx[0].captionNode : null;\n} );\n\n\n/**\n * Redraw the tables in the current context.\n */\n_api_register( 'draw()', function ( paging ) {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tif ( paging === 'page' ) {\n\t\t\t_fnDraw( settings );\n\t\t}\n\t\telse {\n\t\t\tif ( typeof paging === 'string' ) {\n\t\t\t\tpaging = paging === 'full-hold' ?\n\t\t\t\t\tfalse :\n\t\t\t\t\ttrue;\n\t\t\t}\n\n\t\t\t_fnReDraw( settings, paging===false );\n\t\t}\n\t} );\n} );\n\n\n\n/**\n * Get the current page index.\n *\n * @return {integer} Current page index (zero based)\n *//**\n * Set the current page.\n *\n * Note that if you attempt to show a page which does not exist, DataTables will\n * not throw an error, but rather reset the paging.\n *\n * @param {integer|string} action The paging action to take. This can be one of:\n *  * `integer` - The page index to jump to\n *  * `string` - An action to take:\n *    * `first` - Jump to first page.\n *    * `next` - Jump to the next page\n *    * `previous` - Jump to previous page\n *    * `last` - Jump to the last page.\n * @returns {DataTables.Api} this\n */\n_api_register( 'page()', function ( action ) {\n\tif ( action === undefined ) {\n\t\treturn this.page.info().page; // not an expensive call\n\t}\n\n\t// else, have an action to take on all tables\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnPageChange( settings, action );\n\t} );\n} );\n\n\n/**\n * Paging information for the first table in the current context.\n *\n * If you require paging information for another table, use the `table()` method\n * with a suitable selector.\n *\n * @return {object} Object with the following properties set:\n *  * `page` - Current page index (zero based - i.e. the first page is `0`)\n *  * `pages` - Total number of pages\n *  * `start` - Display index for the first record shown on the current page\n *  * `end` - Display index for the last record shown on the current page\n *  * `length` - Display length (number of records). Note that generally `start\n *    + length = end`, but this is not always true, for example if there are\n *    only 2 records to show on the final page, with a length of 10.\n *  * `recordsTotal` - Full data set length\n *  * `recordsDisplay` - Data set length once the current filtering criterion\n *    are applied.\n */\n_api_register( 'page.info()', function () {\n\tif ( this.context.length === 0 ) {\n\t\treturn undefined;\n\t}\n\n\tvar\n\t\tsettings   = this.context[0],\n\t\tstart      = settings._iDisplayStart,\n\t\tlen        = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1,\n\t\tvisRecords = settings.fnRecordsDisplay(),\n\t\tall        = len === -1;\n\n\treturn {\n\t\t\"page\":           all ? 0 : Math.floor( start / len ),\n\t\t\"pages\":          all ? 1 : Math.ceil( visRecords / len ),\n\t\t\"start\":          start,\n\t\t\"end\":            settings.fnDisplayEnd(),\n\t\t\"length\":         len,\n\t\t\"recordsTotal\":   settings.fnRecordsTotal(),\n\t\t\"recordsDisplay\": visRecords,\n\t\t\"serverSide\":     _fnDataSource( settings ) === 'ssp'\n\t};\n} );\n\n\n/**\n * Get the current page length.\n *\n * @return {integer} Current page length. Note `-1` indicates that all records\n *   are to be shown.\n *//**\n * Set the current page length.\n *\n * @param {integer} Page length to set. Use `-1` to show all records.\n * @returns {DataTables.Api} this\n */\n_api_register( 'page.len()', function ( len ) {\n\t// Note that we can't call this function 'length()' because `length`\n\t// is a Javascript property of functions which defines how many arguments\n\t// the function expects.\n\tif ( len === undefined ) {\n\t\treturn this.context.length !== 0 ?\n\t\t\tthis.context[0]._iDisplayLength :\n\t\t\tundefined;\n\t}\n\n\t// else, set the page length\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnLengthChange( settings, len );\n\t} );\n} );\n\n\n\nvar __reload = function ( settings, holdPosition, callback ) {\n\t// Use the draw event to trigger a callback\n\tif ( callback ) {\n\t\tvar api = new _Api( settings );\n\n\t\tapi.one( 'draw', function () {\n\t\t\tcallback( api.ajax.json() );\n\t\t} );\n\t}\n\n\tif ( _fnDataSource( settings ) == 'ssp' ) {\n\t\t_fnReDraw( settings, holdPosition );\n\t}\n\telse {\n\t\t_fnProcessingDisplay( settings, true );\n\n\t\t// Cancel an existing request\n\t\tvar xhr = settings.jqXHR;\n\t\tif ( xhr && xhr.readyState !== 4 ) {\n\t\t\txhr.abort();\n\t\t}\n\n\t\t// Trigger xhr\n\t\t_fnBuildAjax( settings, {}, function( json ) {\n\t\t\t_fnClearTable( settings );\n\n\t\t\tvar data = _fnAjaxDataSrc( settings, json );\n\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\t_fnAddData( settings, data[i] );\n\t\t\t}\n\n\t\t\t_fnReDraw( settings, holdPosition );\n\t\t\t_fnInitComplete( settings );\n\t\t\t_fnProcessingDisplay( settings, false );\n\t\t} );\n\t}\n};\n\n\n/**\n * Get the JSON response from the last Ajax request that DataTables made to the\n * server. Note that this returns the JSON from the first table in the current\n * context.\n *\n * @return {object} JSON received from the server.\n */\n_api_register( 'ajax.json()', function () {\n\tvar ctx = this.context;\n\n\tif ( ctx.length > 0 ) {\n\t\treturn ctx[0].json;\n\t}\n\n\t// else return undefined;\n} );\n\n\n/**\n * Get the data submitted in the last Ajax request\n */\n_api_register( 'ajax.params()', function () {\n\tvar ctx = this.context;\n\n\tif ( ctx.length > 0 ) {\n\t\treturn ctx[0].oAjaxData;\n\t}\n\n\t// else return undefined;\n} );\n\n\n/**\n * Reload tables from the Ajax data source. Note that this function will\n * automatically re-draw the table when the remote data has been loaded.\n *\n * @param {boolean} [reset=true] Reset (default) or hold the current paging\n *   position. A full re-sort and re-filter is performed when this method is\n *   called, which is why the pagination reset is the default action.\n * @returns {DataTables.Api} this\n */\n_api_register( 'ajax.reload()', function ( callback, resetPaging ) {\n\treturn this.iterator( 'table', function (settings) {\n\t\t__reload( settings, resetPaging===false, callback );\n\t} );\n} );\n\n\n/**\n * Get the current Ajax URL. Note that this returns the URL from the first\n * table in the current context.\n *\n * @return {string} Current Ajax source URL\n *//**\n * Set the Ajax URL. Note that this will set the URL for all tables in the\n * current context.\n *\n * @param {string} url URL to set.\n * @returns {DataTables.Api} this\n */\n_api_register( 'ajax.url()', function ( url ) {\n\tvar ctx = this.context;\n\n\tif ( url === undefined ) {\n\t\t// get\n\t\tif ( ctx.length === 0 ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tctx = ctx[0];\n\n\t\treturn $.isPlainObject( ctx.ajax ) ?\n\t\t\tctx.ajax.url :\n\t\t\tctx.ajax;\n\t}\n\n\t// set\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tif ( $.isPlainObject( settings.ajax ) ) {\n\t\t\tsettings.ajax.url = url;\n\t\t}\n\t\telse {\n\t\t\tsettings.ajax = url;\n\t\t}\n\t} );\n} );\n\n\n/**\n * Load data from the newly set Ajax URL. Note that this method is only\n * available when `ajax.url()` is used to set a URL. Additionally, this method\n * has the same effect as calling `ajax.reload()` but is provided for\n * convenience when setting a new URL. Like `ajax.reload()` it will\n * automatically redraw the table once the remote data has been loaded.\n *\n * @returns {DataTables.Api} this\n */\n_api_register( 'ajax.url().load()', function ( callback, resetPaging ) {\n\t// Same as a reload, but makes sense to present it for easy access after a\n\t// url change\n\treturn this.iterator( 'table', function ( ctx ) {\n\t\t__reload( ctx, resetPaging===false, callback );\n\t} );\n} );\n\n\n\n\nvar _selector_run = function ( type, selector, selectFn, settings, opts )\n{\n\tvar\n\t\tout = [], res,\n\t\ta, i, ien, j, jen,\n\t\tselectorType = typeof selector;\n\n\t// Can't just check for isArray here, as an API or jQuery instance might be\n\t// given with their array like look\n\tif ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {\n\t\tselector = [ selector ];\n\t}\n\n\tfor ( i=0, ien=selector.length ; i<ien ; i++ ) {\n\t\t// Only split on simple strings - complex expressions will be jQuery selectors\n\t\ta = selector[i] && selector[i].split && ! selector[i].match(/[[(:]/) ?\n\t\t\tselector[i].split(',') :\n\t\t\t[ selector[i] ];\n\n\t\tfor ( j=0, jen=a.length ; j<jen ; j++ ) {\n\t\t\tres = selectFn( typeof a[j] === 'string' ? (a[j]).trim() : a[j] );\n\n\t\t\t// Remove empty items\n\t\t\tres = res.filter( function (item) {\n\t\t\t\treturn item !== null && item !== undefined;\n\t\t\t});\n\n\t\t\tif ( res && res.length ) {\n\t\t\t\tout = out.concat( res );\n\t\t\t}\n\t\t}\n\t}\n\n\t// selector extensions\n\tvar ext = _ext.selector[ type ];\n\tif ( ext.length ) {\n\t\tfor ( i=0, ien=ext.length ; i<ien ; i++ ) {\n\t\t\tout = ext[i]( settings, opts, out );\n\t\t}\n\t}\n\n\treturn _unique( out );\n};\n\n\nvar _selector_opts = function ( opts )\n{\n\tif ( ! opts ) {\n\t\topts = {};\n\t}\n\n\t// Backwards compatibility for 1.9- which used the terminology filter rather\n\t// than search\n\tif ( opts.filter && opts.search === undefined ) {\n\t\topts.search = opts.filter;\n\t}\n\n\treturn $.extend( {\n\t\tsearch: 'none',\n\t\torder: 'current',\n\t\tpage: 'all'\n\t}, opts );\n};\n\n\n// Reduce the API instance to the first item found\nvar _selector_first = function ( old )\n{\n\tvar inst = new _Api(old.context[0]);\n\n\t// Use a push rather than passing to the constructor, since it will\n\t// merge arrays down automatically, which isn't what is wanted here\n\tif (old.length) {\n\t\tinst.push( old[0] );\n\t}\n\n\tinst.selector = old.selector;\n\n\t// Limit to a single row / column / cell\n\tif (inst.length && inst[0].length > 1) {\n\t\tinst[0].splice(1);\n\t}\n\n\treturn inst;\n};\n\n\nvar _selector_row_indexes = function ( settings, opts )\n{\n\tvar\n\t\ti, ien, tmp, a=[],\n\t\tdisplayFiltered = settings.aiDisplay,\n\t\tdisplayMaster = settings.aiDisplayMaster;\n\n\tvar\n\t\tsearch = opts.search,  // none, applied, removed\n\t\torder  = opts.order,   // applied, current, index (original - compatibility with 1.9)\n\t\tpage   = opts.page;    // all, current\n\n\tif ( _fnDataSource( settings ) == 'ssp' ) {\n\t\t// In server-side processing mode, most options are irrelevant since\n\t\t// rows not shown don't exist and the index order is the applied order\n\t\t// Removed is a special case - for consistency just return an empty\n\t\t// array\n\t\treturn search === 'removed' ?\n\t\t\t[] :\n\t\t\t_range( 0, displayMaster.length );\n\t}\n\n\tif ( page == 'current' ) {\n\t\t// Current page implies that order=current and filter=applied, since it is\n\t\t// fairly senseless otherwise, regardless of what order and search actually\n\t\t// are\n\t\tfor ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {\n\t\t\ta.push( displayFiltered[i] );\n\t\t}\n\t}\n\telse if ( order == 'current' || order == 'applied' ) {\n\t\tif ( search == 'none') {\n\t\t\ta = displayMaster.slice();\n\t\t}\n\t\telse if ( search == 'applied' ) {\n\t\t\ta = displayFiltered.slice();\n\t\t}\n\t\telse if ( search == 'removed' ) {\n\t\t\t// O(n+m) solution by creating a hash map\n\t\t\tvar displayFilteredMap = {};\n\n\t\t\tfor ( i=0, ien=displayFiltered.length ; i<ien ; i++ ) {\n\t\t\t\tdisplayFilteredMap[displayFiltered[i]] = null;\n\t\t\t}\n\n\t\t\tdisplayMaster.forEach(function (item) {\n\t\t\t\tif (! Object.prototype.hasOwnProperty.call(displayFilteredMap, item)) {\n\t\t\t\t\ta.push(item);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\telse if ( order == 'index' || order == 'original' ) {\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\tif (! settings.aoData[i]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( search == 'none' ) {\n\t\t\t\ta.push( i );\n\t\t\t}\n\t\t\telse { // applied | removed\n\t\t\t\ttmp = displayFiltered.indexOf(i);\n\n\t\t\t\tif ((tmp === -1 && search == 'removed') ||\n\t\t\t\t\t(tmp >= 0   && search == 'applied') )\n\t\t\t\t{\n\t\t\t\t\ta.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse if ( typeof order === 'number' ) {\n\t\t// Order the rows by the given column\n\t\tvar ordered = _fnSort(settings, order, 'asc');\n\n\t\tif (search === 'none') {\n\t\t\ta = ordered;\n\t\t}\n\t\telse { // applied | removed\n\t\t\tfor (i=0; i<ordered.length; i++) {\n\t\t\t\ttmp = displayFiltered.indexOf(ordered[i]);\n\n\t\t\t\tif ((tmp === -1 && search == 'removed') ||\n\t\t\t\t\t(tmp >= 0   && search == 'applied') )\n\t\t\t\t{\n\t\t\t\t\ta.push( ordered[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a;\n};\n\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Rows\n *\n * {}          - no selector - use all available rows\n * {integer}   - row aoData index\n * {node}      - TR node\n * {string}    - jQuery selector to apply to the TR elements\n * {array}     - jQuery array of nodes, or simply an array of TR nodes\n *\n */\nvar __row_selector = function ( settings, selector, opts )\n{\n\tvar rows;\n\tvar run = function ( sel ) {\n\t\tvar selInt = _intVal( sel );\n\t\tvar aoData = settings.aoData;\n\n\t\t// Short cut - selector is a number and no options provided (default is\n\t\t// all records, so no need to check if the index is in there, since it\n\t\t// must be - dev error if the index doesn't exist).\n\t\tif ( selInt !== null && ! opts ) {\n\t\t\treturn [ selInt ];\n\t\t}\n\n\t\tif ( ! rows ) {\n\t\t\trows = _selector_row_indexes( settings, opts );\n\t\t}\n\n\t\tif ( selInt !== null && rows.indexOf(selInt) !== -1 ) {\n\t\t\t// Selector - integer\n\t\t\treturn [ selInt ];\n\t\t}\n\t\telse if ( sel === null || sel === undefined || sel === '' ) {\n\t\t\t// Selector - none\n\t\t\treturn rows;\n\t\t}\n\n\t\t// Selector - function\n\t\tif ( typeof sel === 'function' ) {\n\t\t\treturn rows.map( function (idx) {\n\t\t\t\tvar row = aoData[ idx ];\n\t\t\t\treturn sel( idx, row._aData, row.nTr ) ? idx : null;\n\t\t\t} );\n\t\t}\n\n\t\t// Selector - node\n\t\tif ( sel.nodeName ) {\n\t\t\tvar rowIdx = sel._DT_RowIndex;  // Property added by DT for fast lookup\n\t\t\tvar cellIdx = sel._DT_CellIndex;\n\n\t\t\tif ( rowIdx !== undefined ) {\n\t\t\t\t// Make sure that the row is actually still present in the table\n\t\t\t\treturn aoData[ rowIdx ] && aoData[ rowIdx ].nTr === sel ?\n\t\t\t\t\t[ rowIdx ] :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t\telse if ( cellIdx ) {\n\t\t\t\treturn aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel.parentNode ?\n\t\t\t\t\t[ cellIdx.row ] :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar host = $(sel).closest('*[data-dt-row]');\n\t\t\t\treturn host.length ?\n\t\t\t\t\t[ host.data('dt-row') ] :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t}\n\n\t\t// ID selector. Want to always be able to select rows by id, regardless\n\t\t// of if the tr element has been created or not, so can't rely upon\n\t\t// jQuery here - hence a custom implementation. This does not match\n\t\t// Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything,\n\t\t// but to select it using a CSS selector engine (like Sizzle or\n\t\t// querySelect) it would need to need to be escaped for some characters.\n\t\t// DataTables simplifies this for row selectors since you can select\n\t\t// only a row. A # indicates an id any anything that follows is the id -\n\t\t// unescaped.\n\t\tif ( typeof sel === 'string' && sel.charAt(0) === '#' ) {\n\t\t\t// get row index from id\n\t\t\tvar rowObj = settings.aIds[ sel.replace( /^#/, '' ) ];\n\t\t\tif ( rowObj !== undefined ) {\n\t\t\t\treturn [ rowObj.idx ];\n\t\t\t}\n\n\t\t\t// need to fall through to jQuery in case there is DOM id that\n\t\t\t// matches\n\t\t}\n\t\t\n\t\t// Get nodes in the order from the `rows` array with null values removed\n\t\tvar nodes = _removeEmpty(\n\t\t\t_pluck_order( settings.aoData, rows, 'nTr' )\n\t\t);\n\n\t\t// Selector - jQuery selector string, array of nodes or jQuery object/\n\t\t// As jQuery's .filter() allows jQuery objects to be passed in filter,\n\t\t// it also allows arrays, so this will cope with all three options\n\t\treturn $(nodes)\n\t\t\t.filter( sel )\n\t\t\t.map( function () {\n\t\t\t\treturn this._DT_RowIndex;\n\t\t\t} )\n\t\t\t.toArray();\n\t};\n\n\tvar matched = _selector_run( 'row', selector, run, settings, opts );\n\n\tif (opts.order === 'current' || opts.order === 'applied') {\n\t\t_fnSortDisplay(settings, matched);\n\t}\n\n\treturn matched;\n};\n\n\n_api_register( 'rows()', function ( selector, opts ) {\n\t// argument shifting\n\tif ( selector === undefined ) {\n\t\tselector = '';\n\t}\n\telse if ( $.isPlainObject( selector ) ) {\n\t\topts = selector;\n\t\tselector = '';\n\t}\n\n\topts = _selector_opts( opts );\n\n\tvar inst = this.iterator( 'table', function ( settings ) {\n\t\treturn __row_selector( settings, selector, opts );\n\t}, 1 );\n\n\t// Want argument shifting here and in __row_selector?\n\tinst.selector.rows = selector;\n\tinst.selector.opts = opts;\n\n\treturn inst;\n} );\n\n_api_register( 'rows().nodes()', function () {\n\treturn this.iterator( 'row', function ( settings, row ) {\n\t\treturn settings.aoData[ row ].nTr || undefined;\n\t}, 1 );\n} );\n\n_api_register( 'rows().data()', function () {\n\treturn this.iterator( true, 'rows', function ( settings, rows ) {\n\t\treturn _pluck_order( settings.aoData, rows, '_aData' );\n\t}, 1 );\n} );\n\n_api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {\n\treturn this.iterator( 'row', function ( settings, row ) {\n\t\tvar r = settings.aoData[ row ];\n\t\treturn type === 'search' ? r._aFilterData : r._aSortData;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {\n\treturn this.iterator( 'row', function ( settings, row ) {\n\t\t_fnInvalidate( settings, row, src );\n\t} );\n} );\n\n_api_registerPlural( 'rows().indexes()', 'row().index()', function () {\n\treturn this.iterator( 'row', function ( settings, row ) {\n\t\treturn row;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) {\n\tvar a = [];\n\tvar context = this.context;\n\n\t// `iterator` will drop undefined values, but in this case we want them\n\tfor ( var i=0, ien=context.length ; i<ien ; i++ ) {\n\t\tfor ( var j=0, jen=this[i].length ; j<jen ; j++ ) {\n\t\t\tvar id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData );\n\t\t\ta.push( (hash === true ? '#' : '' )+ id );\n\t\t}\n\t}\n\n\treturn new _Api( context, a );\n} );\n\n_api_registerPlural( 'rows().remove()', 'row().remove()', function () {\n\tthis.iterator( 'row', function ( settings, row ) {\n\t\tvar data = settings.aoData;\n\t\tvar rowData = data[ row ];\n\n\t\t// Delete from the display arrays\n\t\tvar idx = settings.aiDisplayMaster.indexOf(row);\n\t\tif (idx !== -1) {\n\t\t\tsettings.aiDisplayMaster.splice(idx, 1);\n\t\t}\n\n\t\t// For server-side processing tables - subtract the deleted row from the count\n\t\tif ( settings._iRecordsDisplay > 0 ) {\n\t\t\tsettings._iRecordsDisplay--;\n\t\t}\n\n\t\t// Check for an 'overflow' they case for displaying the table\n\t\t_fnLengthOverflow( settings );\n\n\t\t// Remove the row's ID reference if there is one\n\t\tvar id = settings.rowIdFn( rowData._aData );\n\t\tif ( id !== undefined ) {\n\t\t\tdelete settings.aIds[ id ];\n\t\t}\n\n\t\tdata[row] = null;\n\t} );\n\n\treturn this;\n} );\n\n\n_api_register( 'rows.add()', function ( rows ) {\n\tvar newRows = this.iterator( 'table', function ( settings ) {\n\t\t\tvar row, i, ien;\n\t\t\tvar out = [];\n\n\t\t\tfor ( i=0, ien=rows.length ; i<ien ; i++ ) {\n\t\t\t\trow = rows[i];\n\n\t\t\t\tif ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {\n\t\t\t\t\tout.push( _fnAddTr( settings, row )[0] );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tout.push( _fnAddData( settings, row ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn out;\n\t\t}, 1 );\n\n\t// Return an Api.rows() extended instance, so rows().nodes() etc can be used\n\tvar modRows = this.rows( -1 );\n\tmodRows.pop();\n\tmodRows.push.apply(modRows, newRows);\n\n\treturn modRows;\n} );\n\n\n\n\n\n/**\n *\n */\n_api_register( 'row()', function ( selector, opts ) {\n\treturn _selector_first( this.rows( selector, opts ) );\n} );\n\n\n_api_register( 'row().data()', function ( data ) {\n\tvar ctx = this.context;\n\n\tif ( data === undefined ) {\n\t\t// Get\n\t\treturn ctx.length && this.length && this[0].length ?\n\t\t\tctx[0].aoData[ this[0] ]._aData :\n\t\t\tundefined;\n\t}\n\n\t// Set\n\tvar row = ctx[0].aoData[ this[0] ];\n\trow._aData = data;\n\n\t// If the DOM has an id, and the data source is an array\n\tif ( Array.isArray( data ) && row.nTr && row.nTr.id ) {\n\t\t_fnSetObjectDataFn( ctx[0].rowId )( data, row.nTr.id );\n\t}\n\n\t// Automatically invalidate\n\t_fnInvalidate( ctx[0], this[0], 'data' );\n\n\treturn this;\n} );\n\n\n_api_register( 'row().node()', function () {\n\tvar ctx = this.context;\n\n\tif (ctx.length && this.length && this[0].length) {\n\t\tvar row = ctx[0].aoData[ this[0] ];\n\n\t\tif (row && row.nTr) {\n\t\t\treturn row.nTr;\n\t\t}\n\t}\n\n\treturn null;\n} );\n\n\n_api_register( 'row.add()', function ( row ) {\n\t// Allow a jQuery object to be passed in - only a single row is added from\n\t// it though - the first element in the set\n\tif ( row instanceof $ && row.length ) {\n\t\trow = row[0];\n\t}\n\n\tvar rows = this.iterator( 'table', function ( settings ) {\n\t\tif ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {\n\t\t\treturn _fnAddTr( settings, row )[0];\n\t\t}\n\t\treturn _fnAddData( settings, row );\n\t} );\n\n\t// Return an Api.rows() extended instance, with the newly added row selected\n\treturn this.row( rows[0] );\n} );\n\n\n$(document).on('plugin-init.dt', function (e, context) {\n\tvar api = new _Api( context );\n\n\tapi.on( 'stateSaveParams.DT', function ( e, settings, d ) {\n\t\t// This could be more compact with the API, but it is a lot faster as a simple\n\t\t// internal loop\n\t\tvar idFn = settings.rowIdFn;\n\t\tvar rows = settings.aiDisplayMaster;\n\t\tvar ids = [];\n\n\t\tfor (var i=0 ; i<rows.length ; i++) {\n\t\t\tvar rowIdx = rows[i];\n\t\t\tvar data = settings.aoData[rowIdx];\n\n\t\t\tif (data._detailsShow) {\n\t\t\t\tids.push( '#' + idFn(data._aData) );\n\t\t\t}\n\t\t}\n\n\t\td.childRows = ids;\n\t});\n\n\t// For future state loads (e.g. with StateRestore)\n\tapi.on( 'stateLoaded.DT', function (e, settings, state) {\n\t\t__details_state_load( api, state );\n\t});\n\n\t// And the initial load state\n\t__details_state_load( api, api.state.loaded() );\n});\n\nvar __details_state_load = function (api, state)\n{\n\tif ( state && state.childRows ) {\n\t\tapi\n\t\t\t.rows( state.childRows.map(function (id) {\n\t\t\t\t// Escape any `:` characters from the row id. Accounts for\n\t\t\t\t// already escaped characters.\n\t\t\t\treturn id.replace(/([^:\\\\]*(?:\\\\.[^:\\\\]*)*):/g, \"$1\\\\:\");\n\t\t\t}) )\n\t\t\t.every( function () {\n\t\t\t\t_fnCallbackFire( api.settings()[0], null, 'requestChild', [ this ] )\n\t\t\t});\n\t}\n}\n\nvar __details_add = function ( ctx, row, data, klass )\n{\n\t// Convert to array of TR elements\n\tvar rows = [];\n\tvar addRow = function ( r, k ) {\n\t\t// Recursion to allow for arrays of jQuery objects\n\t\tif ( Array.isArray( r ) || r instanceof $ ) {\n\t\t\tfor ( var i=0, ien=r.length ; i<ien ; i++ ) {\n\t\t\t\taddRow( r[i], k );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// If we get a TR element, then just add it directly - up to the dev\n\t\t// to add the correct number of columns etc\n\t\tif ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {\n\t\t\tr.setAttribute( 'data-dt-row', row.idx );\n\t\t\trows.push( r );\n\t\t}\n\t\telse {\n\t\t\t// Otherwise create a row with a wrapper\n\t\t\tvar created = $('<tr><td></td></tr>')\n\t\t\t\t.attr( 'data-dt-row', row.idx )\n\t\t\t\t.addClass( k );\n\t\t\t\n\t\t\t$('td', created)\n\t\t\t\t.addClass( k )\n\t\t\t\t.html( r )[0].colSpan = _fnVisbleColumns( ctx );\n\n\t\t\trows.push( created[0] );\n\t\t}\n\t};\n\n\taddRow( data, klass );\n\n\tif ( row._details ) {\n\t\trow._details.detach();\n\t}\n\n\trow._details = $(rows);\n\n\t// If the children were already shown, that state should be retained\n\tif ( row._detailsShow ) {\n\t\trow._details.insertAfter( row.nTr );\n\t}\n};\n\n\n// Make state saving of child row details async to allow them to be batch processed\nvar __details_state = DataTable.util.throttle(\n\tfunction (ctx) {\n\t\t_fnSaveState( ctx[0] )\n\t},\n\t500\n);\n\n\nvar __details_remove = function ( api, idx )\n{\n\tvar ctx = api.context;\n\n\tif ( ctx.length ) {\n\t\tvar row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];\n\n\t\tif ( row && row._details ) {\n\t\t\trow._details.remove();\n\n\t\t\trow._detailsShow = undefined;\n\t\t\trow._details = undefined;\n\t\t\t$( row.nTr ).removeClass( 'dt-hasChild' );\n\t\t\t__details_state( ctx );\n\t\t}\n\t}\n};\n\n\nvar __details_display = function ( api, show ) {\n\tvar ctx = api.context;\n\n\tif ( ctx.length && api.length ) {\n\t\tvar row = ctx[0].aoData[ api[0] ];\n\n\t\tif ( row._details ) {\n\t\t\trow._detailsShow = show;\n\n\t\t\tif ( show ) {\n\t\t\t\trow._details.insertAfter( row.nTr );\n\t\t\t\t$( row.nTr ).addClass( 'dt-hasChild' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\trow._details.detach();\n\t\t\t\t$( row.nTr ).removeClass( 'dt-hasChild' );\n\t\t\t}\n\n\t\t\t_fnCallbackFire( ctx[0], null, 'childRow', [ show, api.row( api[0] ) ] )\n\n\t\t\t__details_events( ctx[0] );\n\t\t\t__details_state( ctx );\n\t\t}\n\t}\n};\n\n\nvar __details_events = function ( settings )\n{\n\tvar api = new _Api( settings );\n\tvar namespace = '.dt.DT_details';\n\tvar drawEvent = 'draw'+namespace;\n\tvar colvisEvent = 'column-sizing'+namespace;\n\tvar destroyEvent = 'destroy'+namespace;\n\tvar data = settings.aoData;\n\n\tapi.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );\n\n\tif ( _pluck( data, '_details' ).length > 0 ) {\n\t\t// On each draw, insert the required elements into the document\n\t\tapi.on( drawEvent, function ( e, ctx ) {\n\t\t\tif ( settings !== ctx ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tapi.rows( {page:'current'} ).eq(0).each( function (idx) {\n\t\t\t\t// Internal data grab\n\t\t\t\tvar row = data[ idx ];\n\n\t\t\t\tif ( row._detailsShow ) {\n\t\t\t\t\trow._details.insertAfter( row.nTr );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Column visibility change - update the colspan\n\t\tapi.on( colvisEvent, function ( e, ctx ) {\n\t\t\tif ( settings !== ctx ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update the colspan for the details rows (note, only if it already has\n\t\t\t// a colspan)\n\t\t\tvar row, visible = _fnVisbleColumns( ctx );\n\n\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\trow = data[i];\n\n\t\t\t\tif ( row && row._details ) {\n\t\t\t\t\trow._details.each(function () {\n\t\t\t\t\t\tvar el = $(this).children('td');\n\n\t\t\t\t\t\tif (el.length == 1) {\n\t\t\t\t\t\t\tel.attr('colspan', visible);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Table destroyed - nuke any child rows\n\t\tapi.on( destroyEvent, function ( e, ctx ) {\n\t\t\tif ( settings !== ctx ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\tif ( data[i] && data[i]._details ) {\n\t\t\t\t\t__details_remove( api, i );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n};\n\n// Strings for the method names to help minification\nvar _emp = '';\nvar _child_obj = _emp+'row().child';\nvar _child_mth = _child_obj+'()';\n\n// data can be:\n//  tr\n//  string\n//  jQuery or array of any of the above\n_api_register( _child_mth, function ( data, klass ) {\n\tvar ctx = this.context;\n\n\tif ( data === undefined ) {\n\t\t// get\n\t\treturn ctx.length && this.length && ctx[0].aoData[ this[0] ]\n\t\t\t? ctx[0].aoData[ this[0] ]._details\n\t\t\t: undefined;\n\t}\n\telse if ( data === true ) {\n\t\t// show\n\t\tthis.child.show();\n\t}\n\telse if ( data === false ) {\n\t\t// remove\n\t\t__details_remove( this );\n\t}\n\telse if ( ctx.length && this.length ) {\n\t\t// set\n\t\t__details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );\n\t}\n\n\treturn this;\n} );\n\n\n_api_register( [\n\t_child_obj+'.show()',\n\t_child_mth+'.show()' // only when `child()` was called with parameters (without\n], function () {         // it returns an object and this method is not executed)\n\t__details_display( this, true );\n\treturn this;\n} );\n\n\n_api_register( [\n\t_child_obj+'.hide()',\n\t_child_mth+'.hide()' // only when `child()` was called with parameters (without\n], function () {         // it returns an object and this method is not executed)\n\t__details_display( this, false );\n\treturn this;\n} );\n\n\n_api_register( [\n\t_child_obj+'.remove()',\n\t_child_mth+'.remove()' // only when `child()` was called with parameters (without\n], function () {           // it returns an object and this method is not executed)\n\t__details_remove( this );\n\treturn this;\n} );\n\n\n_api_register( _child_obj+'.isShown()', function () {\n\tvar ctx = this.context;\n\n\tif ( ctx.length && this.length && ctx[0].aoData[ this[0] ] ) {\n\t\t// _detailsShown as false or undefined will fall through to return false\n\t\treturn ctx[0].aoData[ this[0] ]._detailsShow || false;\n\t}\n\treturn false;\n} );\n\n\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Columns\n *\n * {integer}           - column index (>=0 count from left, <0 count from right)\n * \"{integer}:visIdx\"  - visible column index (i.e. translate to column index)  (>=0 count from left, <0 count from right)\n * \"{integer}:visible\" - alias for {integer}:visIdx  (>=0 count from left, <0 count from right)\n * \"{string}:name\"     - column name\n * \"{string}\"          - jQuery selector on column header nodes\n *\n */\n\n// can be an array of these items, comma separated list, or an array of comma\n// separated lists\n\nvar __re_column_selector = /^([^:]+)?:(name|title|visIdx|visible)$/;\n\n\n// r1 and r2 are redundant - but it means that the parameters match for the\n// iterator callback in columns().data()\nvar __columnData = function ( settings, column, r1, r2, rows, type ) {\n\tvar a = [];\n\tfor ( var row=0, ien=rows.length ; row<ien ; row++ ) {\n\t\ta.push( _fnGetCellData( settings, rows[row], column, type ) );\n\t}\n\treturn a;\n};\n\n\nvar __column_header = function ( settings, column, row ) {\n\tvar header = settings.aoHeader;\n\tvar target = row !== undefined\n\t\t? row\n\t\t: settings.bSortCellsTop // legacy support\n\t\t\t? 0\n\t\t\t: header.length - 1;\n\n\treturn header[target][column].cell;\n};\n\nvar __column_selector = function ( settings, selector, opts )\n{\n\tvar\n\t\tcolumns = settings.aoColumns,\n\t\tnames = _pluck( columns, 'sName' ),\n\t\ttitles = _pluck( columns, 'sTitle' ),\n\t\tcells = DataTable.util.get('[].[].cell')(settings.aoHeader),\n\t\tnodes = _unique( _flatten([], cells) );\n\t\n\tvar run = function ( s ) {\n\t\tvar selInt = _intVal( s );\n\n\t\t// Selector - all\n\t\tif ( s === '' ) {\n\t\t\treturn _range( columns.length );\n\t\t}\n\n\t\t// Selector - index\n\t\tif ( selInt !== null ) {\n\t\t\treturn [ selInt >= 0 ?\n\t\t\t\tselInt : // Count from left\n\t\t\t\tcolumns.length + selInt // Count from right (+ because its a negative value)\n\t\t\t];\n\t\t}\n\n\t\t// Selector = function\n\t\tif ( typeof s === 'function' ) {\n\t\t\tvar rows = _selector_row_indexes( settings, opts );\n\n\t\t\treturn columns.map(function (col, idx) {\n\t\t\t\treturn s(\n\t\t\t\t\t\tidx,\n\t\t\t\t\t\t__columnData( settings, idx, 0, 0, rows ),\n\t\t\t\t\t\t__column_header( settings, idx )\n\t\t\t\t\t) ? idx : null;\n\t\t\t});\n\t\t}\n\n\t\t// jQuery or string selector\n\t\tvar match = typeof s === 'string' ?\n\t\t\ts.match( __re_column_selector ) :\n\t\t\t'';\n\n\t\tif ( match ) {\n\t\t\tswitch( match[2] ) {\n\t\t\t\tcase 'visIdx':\n\t\t\t\tcase 'visible':\n\t\t\t\t\t// Selector is a column index\n\t\t\t\t\tif (match[1] && match[1].match(/^\\d+$/)) {\n\t\t\t\t\t\tvar idx = parseInt( match[1], 10 );\n\n\t\t\t\t\t\t// Visible index given, convert to column index\n\t\t\t\t\t\tif ( idx < 0 ) {\n\t\t\t\t\t\t\t// Counting from the right\n\t\t\t\t\t\t\tvar visColumns = columns.map( function (col,i) {\n\t\t\t\t\t\t\t\treturn col.bVisible ? i : null;\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\treturn [ visColumns[ visColumns.length + idx ] ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Counting from the left\n\t\t\t\t\t\treturn [ _fnVisibleToColumnIndex( settings, idx ) ];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn columns.map( function (col, idx) {\n\t\t\t\t\t\t// Not visible, can't match\n\t\t\t\t\t\tif (! col.bVisible) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Selector\n\t\t\t\t\t\tif (match[1]) {\n\t\t\t\t\t\t\treturn $(nodes[idx]).filter(match[1]).length > 0 ? idx : null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// `:visible` on its own\n\t\t\t\t\t\treturn idx;\n\t\t\t\t\t} );\n\n\t\t\t\tcase 'name':\n\t\t\t\t\t// match by name. `names` is column index complete and in order\n\t\t\t\t\treturn names.map( function (name, i) {\n\t\t\t\t\t\treturn name === match[1] ? i : null;\n\t\t\t\t\t} );\n\n\t\t\t\tcase 'title':\n\t\t\t\t\t// match by column title\n\t\t\t\t\treturn titles.map( function (title, i) {\n\t\t\t\t\t\treturn title === match[1] ? i : null;\n\t\t\t\t\t} );\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn [];\n\t\t\t}\n\t\t}\n\n\t\t// Cell in the table body\n\t\tif ( s.nodeName && s._DT_CellIndex ) {\n\t\t\treturn [ s._DT_CellIndex.column ];\n\t\t}\n\n\t\t// jQuery selector on the TH elements for the columns\n\t\tvar jqResult = $( nodes )\n\t\t\t.filter( s )\n\t\t\t.map( function () {\n\t\t\t\treturn _fnColumnsFromHeader( this ); // `nodes` is column index complete and in order\n\t\t\t} )\n\t\t\t.toArray();\n\n\t\tif ( jqResult.length || ! s.nodeName ) {\n\t\t\treturn jqResult;\n\t\t}\n\n\t\t// Otherwise a node which might have a `dt-column` data attribute, or be\n\t\t// a child or such an element\n\t\tvar host = $(s).closest('*[data-dt-column]');\n\t\treturn host.length ?\n\t\t\t[ host.data('dt-column') ] :\n\t\t\t[];\n\t};\n\n\treturn _selector_run( 'column', selector, run, settings, opts );\n};\n\n\nvar __setColumnVis = function ( settings, column, vis ) {\n\tvar\n\t\tcols = settings.aoColumns,\n\t\tcol  = cols[ column ],\n\t\tdata = settings.aoData,\n\t\tcells, i, ien, tr;\n\n\t// Get\n\tif ( vis === undefined ) {\n\t\treturn col.bVisible;\n\t}\n\n\t// Set\n\t// No change\n\tif ( col.bVisible === vis ) {\n\t\treturn false;\n\t}\n\n\tif ( vis ) {\n\t\t// Insert column\n\t\t// Need to decide if we should use appendChild or insertBefore\n\t\tvar insertBefore = _pluck(cols, 'bVisible').indexOf(true, column+1);\n\n\t\tfor ( i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\tif (data[i]) {\n\t\t\t\ttr = data[i].nTr;\n\t\t\t\tcells = data[i].anCells;\n\n\t\t\t\tif ( tr ) {\n\t\t\t\t\t// insertBefore can act like appendChild if 2nd arg is null\n\t\t\t\t\ttr.insertBefore( cells[ column ], cells[ insertBefore ] || null );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t// Remove column\n\t\t$( _pluck( settings.aoData, 'anCells', column ) ).detach();\n\t}\n\n\t// Common actions\n\tcol.bVisible = vis;\n\n\t_colGroup(settings);\n\t\n\treturn true;\n};\n\n\n_api_register( 'columns()', function ( selector, opts ) {\n\t// argument shifting\n\tif ( selector === undefined ) {\n\t\tselector = '';\n\t}\n\telse if ( $.isPlainObject( selector ) ) {\n\t\topts = selector;\n\t\tselector = '';\n\t}\n\n\topts = _selector_opts( opts );\n\n\tvar inst = this.iterator( 'table', function ( settings ) {\n\t\treturn __column_selector( settings, selector, opts );\n\t}, 1 );\n\n\t// Want argument shifting here and in _row_selector?\n\tinst.selector.cols = selector;\n\tinst.selector.opts = opts;\n\n\treturn inst;\n} );\n\n_api_registerPlural( 'columns().header()', 'column().header()', function ( row ) {\n\treturn this.iterator( 'column', function (settings, column) {\n\t\treturn __column_header(settings, column, row);\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().footer()', 'column().footer()', function ( row ) {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\tvar footer = settings.aoFooter;\n\n\t\tif (! footer.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn settings.aoFooter[row !== undefined ? row : 0][column].cell;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().data()', 'column().data()', function () {\n\treturn this.iterator( 'column-rows', __columnData, 1 );\n} );\n\n_api_registerPlural( 'columns().render()', 'column().render()', function ( type ) {\n\treturn this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {\n\t\treturn __columnData( settings, column, i, j, rows, type );\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\treturn settings.aoColumns[column].mData;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {\n\treturn this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {\n\t\treturn _pluck_order( settings.aoData, rows,\n\t\t\ttype === 'search' ? '_aFilterData' : '_aSortData', column\n\t\t);\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().init()', 'column().init()', function () {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\treturn settings.aoColumns[column];\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {\n\treturn this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {\n\t\treturn _pluck_order( settings.aoData, rows, 'anCells', column ) ;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().titles()', 'column().title()', function (title, row) {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t// Argument shifting\n\t\tif (typeof title === 'number') {\n\t\t\trow = title;\n\t\t\ttitle = undefined;\n\t\t}\n\n\t\tvar span = $('span.dt-column-title', this.column(column).header(row));\n\n\t\tif (title !== undefined) {\n\t\t\tspan.html(title);\n\t\t\treturn this;\n\t\t}\n\n\t\treturn span.html();\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().types()', 'column().type()', function () {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\tvar type = settings.aoColumns[column].sType;\n\n\t\t// If the type was invalidated, then resolve it. This actually does\n\t\t// all columns at the moment. Would only happen once if getting all\n\t\t// column's data types.\n\t\tif (! type) {\n\t\t\t_fnColumnTypes(settings);\n\t\t}\n\n\t\treturn type;\n\t}, 1 );\n} );\n\n_api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {\n\tvar that = this;\n\tvar changed = [];\n\tvar ret = this.iterator( 'column', function ( settings, column ) {\n\t\tif ( vis === undefined ) {\n\t\t\treturn settings.aoColumns[ column ].bVisible;\n\t\t} // else\n\t\t\n\t\tif (__setColumnVis( settings, column, vis )) {\n\t\t\tchanged.push(column);\n\t\t}\n\t} );\n\n\t// Group the column visibility changes\n\tif ( vis !== undefined ) {\n\t\tthis.iterator( 'table', function ( settings ) {\n\t\t\t// Redraw the header after changes\n\t\t\t_fnDrawHead( settings, settings.aoHeader );\n\t\t\t_fnDrawHead( settings, settings.aoFooter );\n\t\n\t\t\t// Update colspan for no records display. Child rows and extensions will use their own\n\t\t\t// listeners to do this - only need to update the empty table item here\n\t\t\tif ( ! settings.aiDisplay.length ) {\n\t\t\t\t$(settings.nTBody).find('td[colspan]').attr('colspan', _fnVisbleColumns(settings));\n\t\t\t}\n\t\n\t\t\t_fnSaveState( settings );\n\n\t\t\t// Second loop once the first is done for events\n\t\t\tthat.iterator( 'column', function ( settings, column ) {\n\t\t\t\tif (changed.includes(column)) {\n\t\t\t\t\t_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, calc] );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( changed.length && (calc === undefined || calc) ) {\n\t\t\t\tthat.columns.adjust();\n\t\t\t}\n\t\t});\n\t}\n\n\treturn ret;\n} );\n\n_api_registerPlural( 'columns().widths()', 'column().width()', function () {\n\t// Injects a fake row into the table for just a moment so the widths can\n\t// be read, regardless of colspan in the header and rows being present in\n\t// the body\n\tvar columns = this.columns(':visible').count();\n\tvar row = $('<tr>').html('<td>' + Array(columns).join('</td><td>') + '</td>');\n\n\t$(this.table().body()).append(row);\n\n\tvar widths = row.children().map(function () {\n\t\treturn $(this).outerWidth();\n\t});\n\n\trow.remove();\n\t\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\tvar visIdx = _fnColumnIndexToVisible( settings, column );\n\n\t\treturn visIdx !== null ? widths[visIdx] : 0;\n\t}, 1);\n} );\n\n_api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {\n\treturn this.iterator( 'column', function ( settings, column ) {\n\t\treturn type === 'visible' ?\n\t\t\t_fnColumnIndexToVisible( settings, column ) :\n\t\t\tcolumn;\n\t}, 1 );\n} );\n\n_api_register( 'columns.adjust()', function () {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnAdjustColumnSizing( settings );\n\t}, 1 );\n} );\n\n_api_register( 'column.index()', function ( type, idx ) {\n\tif ( this.context.length !== 0 ) {\n\t\tvar ctx = this.context[0];\n\n\t\tif ( type === 'fromVisible' || type === 'toData' ) {\n\t\t\treturn _fnVisibleToColumnIndex( ctx, idx );\n\t\t}\n\t\telse if ( type === 'fromData' || type === 'toVisible' ) {\n\t\t\treturn _fnColumnIndexToVisible( ctx, idx );\n\t\t}\n\t}\n} );\n\n_api_register( 'column()', function ( selector, opts ) {\n\treturn _selector_first( this.columns( selector, opts ) );\n} );\n\nvar __cell_selector = function ( settings, selector, opts )\n{\n\tvar data = settings.aoData;\n\tvar rows = _selector_row_indexes( settings, opts );\n\tvar cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );\n\tvar allCells = $(_flatten( [], cells ));\n\tvar row;\n\tvar columns = settings.aoColumns.length;\n\tvar a, i, ien, j, o, host;\n\n\tvar run = function ( s ) {\n\t\tvar fnSelector = typeof s === 'function';\n\n\t\tif ( s === null || s === undefined || fnSelector ) {\n\t\t\t// All cells and function selectors\n\t\t\ta = [];\n\n\t\t\tfor ( i=0, ien=rows.length ; i<ien ; i++ ) {\n\t\t\t\trow = rows[i];\n\n\t\t\t\tfor ( j=0 ; j<columns ; j++ ) {\n\t\t\t\t\to = {\n\t\t\t\t\t\trow: row,\n\t\t\t\t\t\tcolumn: j\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( fnSelector ) {\n\t\t\t\t\t\t// Selector - function\n\t\t\t\t\t\thost = data[ row ];\n\n\t\t\t\t\t\tif ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {\n\t\t\t\t\t\t\ta.push( o );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Selector - all\n\t\t\t\t\t\ta.push( o );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\t// Selector - index\n\t\tif ( $.isPlainObject( s ) ) {\n\t\t\t// Valid cell index and its in the array of selectable rows\n\t\t\treturn s.column !== undefined && s.row !== undefined && rows.indexOf(s.row) !== -1 ?\n\t\t\t\t[s] :\n\t\t\t\t[];\n\t\t}\n\n\t\t// Selector - jQuery filtered cells\n\t\tvar jqResult = allCells\n\t\t\t.filter( s )\n\t\t\t.map( function (i, el) {\n\t\t\t\treturn { // use a new object, in case someone changes the values\n\t\t\t\t\trow:    el._DT_CellIndex.row,\n\t\t\t\t\tcolumn: el._DT_CellIndex.column\n\t\t\t\t};\n\t\t\t} )\n\t\t\t.toArray();\n\n\t\tif ( jqResult.length || ! s.nodeName ) {\n\t\t\treturn jqResult;\n\t\t}\n\n\t\t// Otherwise the selector is a node, and there is one last option - the\n\t\t// element might be a child of an element which has dt-row and dt-column\n\t\t// data attributes\n\t\thost = $(s).closest('*[data-dt-row]');\n\t\treturn host.length ?\n\t\t\t[ {\n\t\t\t\trow: host.data('dt-row'),\n\t\t\t\tcolumn: host.data('dt-column')\n\t\t\t} ] :\n\t\t\t[];\n\t};\n\n\treturn _selector_run( 'cell', selector, run, settings, opts );\n};\n\n\n\n\n_api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {\n\t// Argument shifting\n\tif ( $.isPlainObject( rowSelector ) ) {\n\t\t// Indexes\n\t\tif ( rowSelector.row === undefined ) {\n\t\t\t// Selector options in first parameter\n\t\t\topts = rowSelector;\n\t\t\trowSelector = null;\n\t\t}\n\t\telse {\n\t\t\t// Cell index objects in first parameter\n\t\t\topts = columnSelector;\n\t\t\tcolumnSelector = null;\n\t\t}\n\t}\n\tif ( $.isPlainObject( columnSelector ) ) {\n\t\topts = columnSelector;\n\t\tcolumnSelector = null;\n\t}\n\n\t// Cell selector\n\tif ( columnSelector === null || columnSelector === undefined ) {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\treturn __cell_selector( settings, rowSelector, _selector_opts( opts ) );\n\t\t} );\n\t}\n\n\t// The default built in options need to apply to row and columns\n\tvar internalOpts = opts ? {\n\t\tpage: opts.page,\n\t\torder: opts.order,\n\t\tsearch: opts.search\n\t} : {};\n\n\t// Row + column selector\n\tvar columns = this.columns( columnSelector, internalOpts );\n\tvar rows = this.rows( rowSelector, internalOpts );\n\tvar i, ien, j, jen;\n\n\tvar cellsNoOpts = this.iterator( 'table', function ( settings, idx ) {\n\t\tvar a = [];\n\n\t\tfor ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {\n\t\t\tfor ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {\n\t\t\t\ta.push( {\n\t\t\t\t\trow:    rows[idx][i],\n\t\t\t\t\tcolumn: columns[idx][j]\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn a;\n\t}, 1 );\n\n\t// There is currently only one extension which uses a cell selector extension\n\t// It is a _major_ performance drag to run this if it isn't needed, so this is\n\t// an extension specific check at the moment\n\tvar cells = opts && opts.selected ?\n\t\tthis.cells( cellsNoOpts, opts ) :\n\t\tcellsNoOpts;\n\n\t$.extend( cells.selector, {\n\t\tcols: columnSelector,\n\t\trows: rowSelector,\n\t\topts: opts\n\t} );\n\n\treturn cells;\n} );\n\n\n_api_registerPlural( 'cells().nodes()', 'cell().node()', function () {\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\tvar data = settings.aoData[ row ];\n\n\t\treturn data && data.anCells ?\n\t\t\tdata.anCells[ column ] :\n\t\t\tundefined;\n\t}, 1 );\n} );\n\n\n_api_register( 'cells().data()', function () {\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\treturn _fnGetCellData( settings, row, column );\n\t}, 1 );\n} );\n\n\n_api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {\n\ttype = type === 'search' ? '_aFilterData' : '_aSortData';\n\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\treturn settings.aoData[ row ][ type ][ column ];\n\t}, 1 );\n} );\n\n\n_api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\treturn _fnGetCellData( settings, row, column, type );\n\t}, 1 );\n} );\n\n\n_api_registerPlural( 'cells().indexes()', 'cell().index()', function () {\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcolumn: column,\n\t\t\tcolumnVisible: _fnColumnIndexToVisible( settings, column )\n\t\t};\n\t}, 1 );\n} );\n\n\n_api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {\n\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t_fnInvalidate( settings, row, src, column );\n\t} );\n} );\n\n\n\n_api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {\n\treturn _selector_first( this.cells( rowSelector, columnSelector, opts ) );\n} );\n\n\n_api_register( 'cell().data()', function ( data ) {\n\tvar ctx = this.context;\n\tvar cell = this[0];\n\n\tif ( data === undefined ) {\n\t\t// Get\n\t\treturn ctx.length && cell.length ?\n\t\t\t_fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :\n\t\t\tundefined;\n\t}\n\n\t// Set\n\t_fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );\n\t_fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );\n\n\treturn this;\n} );\n\n\n\n/**\n * Get current ordering (sorting) that has been applied to the table.\n *\n * @returns {array} 2D array containing the sorting information for the first\n *   table in the current context. Each element in the parent array represents\n *   a column being sorted upon (i.e. multi-sorting with two columns would have\n *   2 inner arrays). The inner arrays may have 2 or 3 elements. The first is\n *   the column index that the sorting condition applies to, the second is the\n *   direction of the sort (`desc` or `asc`) and, optionally, the third is the\n *   index of the sorting order from the `column.sorting` initialisation array.\n *//**\n * Set the ordering for the table.\n *\n * @param {integer} order Column index to sort upon.\n * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)\n * @returns {DataTables.Api} this\n *//**\n * Set the ordering for the table.\n *\n * @param {array} order 1D array of sorting information to be applied.\n * @param {array} [...] Optional additional sorting conditions\n * @returns {DataTables.Api} this\n *//**\n * Set the ordering for the table.\n *\n * @param {array} order 2D array of sorting information to be applied.\n * @returns {DataTables.Api} this\n */\n_api_register( 'order()', function ( order, dir ) {\n\tvar ctx = this.context;\n\tvar args = Array.prototype.slice.call( arguments );\n\n\tif ( order === undefined ) {\n\t\t// get\n\t\treturn ctx.length !== 0 ?\n\t\t\tctx[0].aaSorting :\n\t\t\tundefined;\n\t}\n\n\t// set\n\tif ( typeof order === 'number' ) {\n\t\t// Simple column / direction passed in\n\t\torder = [ [ order, dir ] ];\n\t}\n\telse if ( args.length > 1 ) {\n\t\t// Arguments passed in (list of 1D arrays)\n\t\torder = args;\n\t}\n\t// otherwise a 2D array was passed in\n\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tsettings.aaSorting = Array.isArray(order) ? order.slice() : order;\n\t} );\n} );\n\n\n/**\n * Attach a sort listener to an element for a given column\n *\n * @param {node|jQuery|string} node Identifier for the element(s) to attach the\n *   listener to. This can take the form of a single DOM node, a jQuery\n *   collection of nodes or a jQuery selector which will identify the node(s).\n * @param {integer} column the column that a click on this node will sort on\n * @param {function} [callback] callback function when sort is run\n * @returns {DataTables.Api} this\n */\n_api_register( 'order.listener()', function ( node, column, callback ) {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnSortAttachListener(settings, node, {}, column, callback);\n\t} );\n} );\n\n\n_api_register( 'order.fixed()', function ( set ) {\n\tif ( ! set ) {\n\t\tvar ctx = this.context;\n\t\tvar fixed = ctx.length ?\n\t\t\tctx[0].aaSortingFixed :\n\t\t\tundefined;\n\n\t\treturn Array.isArray( fixed ) ?\n\t\t\t{ pre: fixed } :\n\t\t\tfixed;\n\t}\n\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tsettings.aaSortingFixed = $.extend( true, {}, set );\n\t} );\n} );\n\n\n// Order by the selected column(s)\n_api_register( [\n\t'columns().order()',\n\t'column().order()'\n], function ( dir ) {\n\tvar that = this;\n\n\tif ( ! dir ) {\n\t\treturn this.iterator( 'column', function ( settings, idx ) {\n\t\t\tvar sort = _fnSortFlatten( settings );\n\n\t\t\tfor ( var i=0, ien=sort.length ; i<ien ; i++ ) {\n\t\t\t\tif ( sort[i].col === idx ) {\n\t\t\t\t\treturn sort[i].dir;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}, 1 );\n\t}\n\telse {\n\t\treturn this.iterator( 'table', function ( settings, i ) {\n\t\t\tsettings.aaSorting = that[i].map( function (col) {\n\t\t\t\treturn [ col, dir ];\n\t\t\t} );\n\t\t} );\n\t}\n} );\n\n_api_registerPlural('columns().orderable()', 'column().orderable()', function ( directions ) {\n\treturn this.iterator( 'column', function ( settings, idx ) {\n\t\tvar col = settings.aoColumns[idx];\n\n\t\treturn directions ?\n\t\t\tcol.asSorting :\n\t\t\tcol.bSortable;\n\t}, 1 );\n} );\n\n\n_api_register( 'processing()', function ( show ) {\n\treturn this.iterator( 'table', function ( ctx ) {\n\t\t_fnProcessingDisplay( ctx, show );\n\t} );\n} );\n\n\n_api_register( 'search()', function ( input, regex, smart, caseInsen ) {\n\tvar ctx = this.context;\n\n\tif ( input === undefined ) {\n\t\t// get\n\t\treturn ctx.length !== 0 ?\n\t\t\tctx[0].oPreviousSearch.search :\n\t\t\tundefined;\n\t}\n\n\t// set\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tif ( ! settings.oFeatures.bFilter ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof regex === 'object') {\n\t\t\t// New style options to pass to the search builder\n\t\t\t_fnFilterComplete( settings, $.extend( settings.oPreviousSearch, regex, {\n\t\t\t\tsearch: input\n\t\t\t} ) );\n\t\t}\n\t\telse {\n\t\t\t// Compat for the old options\n\t\t\t_fnFilterComplete( settings, $.extend( settings.oPreviousSearch, {\n\t\t\t\tsearch: input,\n\t\t\t\tregex:  regex === null ? false : regex,\n\t\t\t\tsmart:  smart === null ? true  : smart,\n\t\t\t\tcaseInsensitive: caseInsen === null ? true : caseInsen\n\t\t\t} ) );\n\t\t}\n\t} );\n} );\n\n_api_register( 'search.fixed()', function ( name, search ) {\n\tvar ret = this.iterator( true, 'table', function ( settings ) {\n\t\tvar fixed = settings.searchFixed;\n\n\t\tif (! name) {\n\t\t\treturn Object.keys(fixed)\n\t\t}\n\t\telse if (search === undefined) {\n\t\t\treturn fixed[name];\n\t\t}\n\t\telse if (search === null) {\n\t\t\tdelete fixed[name];\n\t\t}\n\t\telse {\n\t\t\tfixed[name] = search;\n\t\t}\n\n\t\treturn this;\n\t} );\n\n\treturn name !== undefined && search === undefined\n\t\t? ret[0]\n\t\t: ret;\n} );\n\n_api_registerPlural(\n\t'columns().search()',\n\t'column().search()',\n\tfunction ( input, regex, smart, caseInsen ) {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\tvar preSearch = settings.aoPreSearchCols;\n\n\t\t\tif ( input === undefined ) {\n\t\t\t\t// get\n\t\t\t\treturn preSearch[ column ].search;\n\t\t\t}\n\n\t\t\t// set\n\t\t\tif ( ! settings.oFeatures.bFilter ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof regex === 'object') {\n\t\t\t\t// New style options to pass to the search builder\n\t\t\t\t$.extend( preSearch[ column ], regex, {\n\t\t\t\t\tsearch: input\n\t\t\t\t} );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Old style (with not all options available)\n\t\t\t\t$.extend( preSearch[ column ], {\n\t\t\t\t\tsearch: input,\n\t\t\t\t\tregex:  regex === null ? false : regex,\n\t\t\t\t\tsmart:  smart === null ? true  : smart,\n\t\t\t\t\tcaseInsensitive: caseInsen === null ? true : caseInsen\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t_fnFilterComplete( settings, settings.oPreviousSearch );\n\t\t} );\n\t}\n);\n\n_api_register([\n\t\t'columns().search.fixed()',\n\t\t'column().search.fixed()'\n\t],\n\tfunction ( name, search ) {\n\t\tvar ret = this.iterator( true, 'column', function ( settings, colIdx ) {\n\t\t\tvar fixed = settings.aoColumns[colIdx].searchFixed;\n\n\t\t\tif (! name) {\n\t\t\t\treturn Object.keys(fixed)\n\t\t\t}\n\t\t\telse if (search === undefined) {\n\t\t\t\treturn fixed[name];\n\t\t\t}\n\t\t\telse if (search === null) {\n\t\t\t\tdelete fixed[name];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfixed[name] = search;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} );\n\n\t\treturn name !== undefined && search === undefined\n\t\t\t? ret[0]\n\t\t\t: ret;\n\t}\n);\n/*\n * State API methods\n */\n\n_api_register( 'state()', function ( set, ignoreTime ) {\n\t// getter\n\tif ( ! set ) {\n\t\treturn this.context.length ?\n\t\t\tthis.context[0].oSavedState :\n\t\t\tnull;\n\t}\n\n\tvar setMutate = $.extend( true, {}, set );\n\n\t// setter\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tif ( ignoreTime !== false ) {\n\t\t\tsetMutate.time = +new Date() + 100;\n\t\t}\n\n\t\t_fnImplementState( settings, setMutate, function(){} );\n\t} );\n} );\n\n\n_api_register( 'state.clear()', function () {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t// Save an empty object\n\t\tsettings.fnStateSaveCallback.call( settings.oInstance, settings, {} );\n\t} );\n} );\n\n\n_api_register( 'state.loaded()', function () {\n\treturn this.context.length ?\n\t\tthis.context[0].oLoadedState :\n\t\tnull;\n} );\n\n\n_api_register( 'state.save()', function () {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnSaveState( settings );\n\t} );\n} );\n\n/**\n * Set the libraries that DataTables uses, or the global objects.\n * Note that the arguments can be either way around (legacy support)\n * and the second is optional. See docs.\n */\nDataTable.use = function (arg1, arg2) {\n\t// Reverse arguments for legacy support\n\tvar module = typeof arg1 === 'string'\n\t\t? arg2\n\t\t: arg1;\n\tvar type = typeof arg2 === 'string'\n\t\t? arg2\n\t\t: arg1;\n\n\t// Getter\n\tif (module === undefined && typeof type === 'string') {\n\t\tswitch (type) {\n\t\t\tcase 'lib':\n\t\t\tcase 'jq':\n\t\t\t\treturn $;\n\n\t\t\tcase 'win':\n\t\t\t\treturn window;\n\n\t\t\tcase 'datetime':\n\t\t\t\treturn DataTable.DateTime;\n\n\t\t\tcase 'luxon':\n\t\t\t\treturn __luxon;\n\n\t\t\tcase 'moment':\n\t\t\t\treturn __moment;\n\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\t// Setter\n\tif (type === 'lib' || type === 'jq' || (module && module.fn && module.fn.jquery)) {\n\t\t$ = module;\n\t}\n\telse if (type == 'win' || (module && module.document)) {\n\t\twindow = module;\n\t\tdocument = module.document;\n\t}\n\telse if (type === 'datetime' || (module && module.type === 'DateTime')) {\n\t\tDataTable.DateTime = module;\n\t}\n\telse if (type === 'luxon' || (module && module.FixedOffsetZone)) {\n\t\t__luxon = module;\n\t}\n\telse if (type === 'moment' || (module && module.isMoment)) {\n\t\t__moment = module;\n\t}\n}\n\n/**\n * CommonJS factory function pass through. This will check if the arguments\n * given are a window object or a jQuery object. If so they are set\n * accordingly.\n * @param {*} root Window\n * @param {*} jq jQUery\n * @returns {boolean} Indicator\n */\nDataTable.factory = function (root, jq) {\n\tvar is = false;\n\n\t// Test if the first parameter is a window object\n\tif (root && root.document) {\n\t\twindow = root;\n\t\tdocument = root.document;\n\t}\n\n\t// Test if the second parameter is a jQuery object\n\tif (jq && jq.fn && jq.fn.jquery) {\n\t\t$ = jq;\n\t\tis = true;\n\t}\n\n\treturn is;\n}\n\n/**\n * Provide a common method for plug-ins to check the version of DataTables being\n * used, in order to ensure compatibility.\n *\n *  @param {string} version Version string to check for, in the format \"X.Y.Z\".\n *    Note that the formats \"X\" and \"X.Y\" are also acceptable.\n *  @param {string} [version2=current DataTables version] As above, but optional.\n *   If not given the current DataTables version will be used.\n *  @returns {boolean} true if this version of DataTables is greater or equal to\n *    the required version, or false if this version of DataTales is not\n *    suitable\n *  @static\n *  @dtopt API-Static\n *\n *  @example\n *    alert( $.fn.dataTable.versionCheck( '1.9.0' ) );\n */\nDataTable.versionCheck = function( version, version2 )\n{\n\tvar aThis = version2 ?\n\t\tversion2.split('.') :\n\t\tDataTable.version.split('.');\n\tvar aThat = version.split('.');\n\tvar iThis, iThat;\n\n\tfor ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {\n\t\tiThis = parseInt( aThis[i], 10 ) || 0;\n\t\tiThat = parseInt( aThat[i], 10 ) || 0;\n\n\t\t// Parts are the same, keep comparing\n\t\tif (iThis === iThat) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Parts are different, return immediately\n\t\treturn iThis > iThat;\n\t}\n\n\treturn true;\n};\n\n\n/**\n * Check if a `<table>` node is a DataTable table already or not.\n *\n *  @param {node|jquery|string} table Table node, jQuery object or jQuery\n *      selector for the table to test. Note that if more than more than one\n *      table is passed on, only the first will be checked\n *  @returns {boolean} true the table given is a DataTable, or false otherwise\n *  @static\n *  @dtopt API-Static\n *\n *  @example\n *    if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {\n *      $('#example').dataTable();\n *    }\n */\nDataTable.isDataTable = function ( table )\n{\n\tvar t = $(table).get(0);\n\tvar is = false;\n\n\tif ( table instanceof DataTable.Api ) {\n\t\treturn true;\n\t}\n\n\t$.each( DataTable.settings, function (i, o) {\n\t\tvar head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;\n\t\tvar foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;\n\n\t\tif ( o.nTable === t || head === t || foot === t ) {\n\t\t\tis = true;\n\t\t}\n\t} );\n\n\treturn is;\n};\n\n\n/**\n * Get all DataTable tables that have been initialised - optionally you can\n * select to get only currently visible tables.\n *\n *  @param {boolean} [visible=false] Flag to indicate if you want all (default)\n *    or visible tables only.\n *  @returns {array} Array of `table` nodes (not DataTable instances) which are\n *    DataTables\n *  @static\n *  @dtopt API-Static\n *\n *  @example\n *    $.each( $.fn.dataTable.tables(true), function () {\n *      $(table).DataTable().columns.adjust();\n *    } );\n */\nDataTable.tables = function ( visible )\n{\n\tvar api = false;\n\n\tif ( $.isPlainObject( visible ) ) {\n\t\tapi = visible.api;\n\t\tvisible = visible.visible;\n\t}\n\n\tvar a = DataTable.settings\n\t\t.filter( function (o) {\n\t\t\treturn !visible || (visible && $(o.nTable).is(':visible')) \n\t\t\t\t? true\n\t\t\t\t: false;\n\t\t} )\n\t\t.map( function (o) {\n\t\t\treturn o.nTable;\n\t\t});\n\n\treturn api ?\n\t\tnew _Api( a ) :\n\t\ta;\n};\n\n\n/**\n * Convert from camel case parameters to Hungarian notation. This is made public\n * for the extensions to provide the same ability as DataTables core to accept\n * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase\n * parameters.\n *\n *  @param {object} src The model object which holds all parameters that can be\n *    mapped.\n *  @param {object} user The object to convert from camel case to Hungarian.\n *  @param {boolean} force When set to `true`, properties which already have a\n *    Hungarian value in the `user` object will be overwritten. Otherwise they\n *    won't be.\n */\nDataTable.camelToHungarian = _fnCamelToHungarian;\n\n\n\n/**\n *\n */\n_api_register( '$()', function ( selector, opts ) {\n\tvar\n\t\trows   = this.rows( opts ).nodes(), // Get all rows\n\t\tjqRows = $(rows);\n\n\treturn $( [].concat(\n\t\tjqRows.filter( selector ).toArray(),\n\t\tjqRows.find( selector ).toArray()\n\t) );\n} );\n\n\n// jQuery functions to operate on the tables\n$.each( [ 'on', 'one', 'off' ], function (i, key) {\n\t_api_register( key+'()', function ( /* event, handler */ ) {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\n\t\t// Add the `dt` namespace automatically if it isn't already present\n\t\targs[0] = args[0].split( /\\s/ ).map( function ( e ) {\n\t\t\treturn ! e.match(/\\.dt\\b/) ?\n\t\t\t\te+'.dt' :\n\t\t\t\te;\n\t\t\t} ).join( ' ' );\n\n\t\tvar inst = $( this.tables().nodes() );\n\t\tinst[key].apply( inst, args );\n\t\treturn this;\n\t} );\n} );\n\n\n_api_register( 'clear()', function () {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnClearTable( settings );\n\t} );\n} );\n\n\n_api_register( 'error()', function (msg) {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\t_fnLog( settings, 0, msg );\n\t} );\n} );\n\n\n_api_register( 'settings()', function () {\n\treturn new _Api( this.context, this.context );\n} );\n\n\n_api_register( 'init()', function () {\n\tvar ctx = this.context;\n\treturn ctx.length ? ctx[0].oInit : null;\n} );\n\n\n_api_register( 'data()', function () {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\treturn _pluck( settings.aoData, '_aData' );\n\t} ).flatten();\n} );\n\n\n_api_register( 'trigger()', function ( name, args, bubbles ) {\n\treturn this.iterator( 'table', function ( settings ) {\n\t\treturn _fnCallbackFire( settings, null, name, args, bubbles );\n\t} ).flatten();\n} );\n\n\n_api_register( 'ready()', function ( fn ) {\n\tvar ctx = this.context;\n\n\t// Get status of first table\n\tif (! fn) {\n\t\treturn ctx.length\n\t\t\t? (ctx[0]._bInitComplete || false)\n\t\t\t: null;\n\t}\n\n\t// Function to run either once the table becomes ready or\n\t// immediately if it is already ready.\n\treturn this.tables().every(function () {\n\t\tif (this.context[0]._bInitComplete) {\n\t\t\tfn.call(this);\n\t\t}\n\t\telse {\n\t\t\tthis.on('init.dt.DT', function () {\n\t\t\t\tfn.call(this);\n\t\t\t});\n\t\t}\n\t} );\n} );\n\n\n_api_register( 'destroy()', function ( remove ) {\n\tremove = remove || false;\n\n\treturn this.iterator( 'table', function ( settings ) {\n\t\tvar classes   = settings.oClasses;\n\t\tvar table     = settings.nTable;\n\t\tvar tbody     = settings.nTBody;\n\t\tvar thead     = settings.nTHead;\n\t\tvar tfoot     = settings.nTFoot;\n\t\tvar jqTable   = $(table);\n\t\tvar jqTbody   = $(tbody);\n\t\tvar jqWrapper = $(settings.nTableWrapper);\n\t\tvar rows      = settings.aoData.map( function (r) { return r ? r.nTr : null; } );\n\t\tvar orderClasses = classes.order;\n\n\t\t// Flag to note that the table is currently being destroyed - no action\n\t\t// should be taken\n\t\tsettings.bDestroying = true;\n\n\t\t// Fire off the destroy callbacks for plug-ins etc\n\t\t_fnCallbackFire( settings, \"aoDestroyCallback\", \"destroy\", [settings], true );\n\n\t\t// If not being removed from the document, make all columns visible\n\t\tif ( ! remove ) {\n\t\t\tnew _Api( settings ).columns().visible( true );\n\t\t}\n\n\t\t// Blitz all `DT` namespaced events (these are internal events, the\n\t\t// lowercase, `dt` events are user subscribed and they are responsible\n\t\t// for removing them\n\t\tjqWrapper.off('.DT').find(':not(tbody *)').off('.DT');\n\t\t$(window).off('.DT-'+settings.sInstance);\n\n\t\t// When scrolling we had to break the table up - restore it\n\t\tif ( table != thead.parentNode ) {\n\t\t\tjqTable.children('thead').detach();\n\t\t\tjqTable.append( thead );\n\t\t}\n\n\t\tif ( tfoot && table != tfoot.parentNode ) {\n\t\t\tjqTable.children('tfoot').detach();\n\t\t\tjqTable.append( tfoot );\n\t\t}\n\n\t\tsettings.colgroup.remove();\n\n\t\tsettings.aaSorting = [];\n\t\tsettings.aaSortingFixed = [];\n\t\t_fnSortingClasses( settings );\n\n\t\t$('th, td', thead)\n\t\t\t.removeClass(\n\t\t\t\torderClasses.canAsc + ' ' +\n\t\t\t\torderClasses.canDesc + ' ' +\n\t\t\t\torderClasses.isAsc + ' ' +\n\t\t\t\torderClasses.isDesc\n\t\t\t)\n\t\t\t.css('width', '');\n\n\t\t// Add the TR elements back into the table in their original order\n\t\tjqTbody.children().detach();\n\t\tjqTbody.append( rows );\n\n\t\tvar orig = settings.nTableWrapper.parentNode;\n\t\tvar insertBefore = settings.nTableWrapper.nextSibling;\n\n\t\t// Remove the DataTables generated nodes, events and classes\n\t\tvar removedMethod = remove ? 'remove' : 'detach';\n\t\tjqTable[ removedMethod ]();\n\t\tjqWrapper[ removedMethod ]();\n\n\t\t// If we need to reattach the table to the document\n\t\tif ( ! remove && orig ) {\n\t\t\t// insertBefore acts like appendChild if !arg[1]\n\t\t\torig.insertBefore( table, insertBefore );\n\n\t\t\t// Restore the width of the original table - was read from the style property,\n\t\t\t// so we can restore directly to that\n\t\t\tjqTable\n\t\t\t\t.css( 'width', settings.sDestroyWidth )\n\t\t\t\t.removeClass( classes.table );\n\t\t}\n\n\t\t/* Remove the settings object from the settings array */\n\t\tvar idx = DataTable.settings.indexOf(settings);\n\t\tif ( idx !== -1 ) {\n\t\t\tDataTable.settings.splice( idx, 1 );\n\t\t}\n\t} );\n} );\n\n\n// Add the `every()` method for rows, columns and cells in a compact form\n$.each( [ 'column', 'row', 'cell' ], function ( i, type ) {\n\t_api_register( type+'s().every()', function ( fn ) {\n\t\tvar opts = this.selector.opts;\n\t\tvar api = this;\n\t\tvar inst;\n\t\tvar counter = 0;\n\n\t\treturn this.iterator( 'every', function ( settings, selectedIdx, tableIdx ) {\n\t\t\tinst = api[ type ](selectedIdx, opts);\n\n\t\t\tif (type === 'cell') {\n\t\t\t\tfn.call(inst, inst[0][0].row, inst[0][0].column, tableIdx, counter);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfn.call(inst, selectedIdx, tableIdx, counter);\n\t\t\t}\n\n\t\t\tcounter++;\n\t\t} );\n\t} );\n} );\n\n\n// i18n method for extensions to be able to use the language object from the\n// DataTable\n_api_register( 'i18n()', function ( token, def, plural ) {\n\tvar ctx = this.context[0];\n\tvar resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );\n\n\tif ( resolved === undefined ) {\n\t\tresolved = def;\n\t}\n\n\tif ( $.isPlainObject( resolved ) ) {\n\t\tresolved = plural !== undefined && resolved[ plural ] !== undefined ?\n\t\t\tresolved[ plural ] :\n\t\t\tresolved._;\n\t}\n\n\treturn typeof resolved === 'string'\n\t\t? resolved.replace( '%d', plural ) // nb: plural might be undefined,\n\t\t: resolved;\n} );\n\n/**\n * Version string for plug-ins to check compatibility. Allowed format is\n * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used\n * only for non-release builds. See https://semver.org/ for more information.\n *  @member\n *  @type string\n *  @default Version number\n */\nDataTable.version = \"2.1.8\";\n\n/**\n * Private data store, containing all of the settings objects that are\n * created for the tables on a given page.\n *\n * Note that the `DataTable.settings` object is aliased to\n * `jQuery.fn.dataTableExt` through which it may be accessed and\n * manipulated, or `jQuery.fn.dataTable.settings`.\n *  @member\n *  @type array\n *  @default []\n *  @private\n */\nDataTable.settings = [];\n\n/**\n * Object models container, for the various models that DataTables has\n * available to it. These models define the objects that are used to hold\n * the active state and configuration of the table.\n *  @namespace\n */\nDataTable.models = {};\n\n\n\n/**\n * Template object for the way in which DataTables holds information about\n * search information for the global filter and individual column filters.\n *  @namespace\n */\nDataTable.models.oSearch = {\n\t/**\n\t * Flag to indicate if the filtering should be case insensitive or not\n\t */\n\t\"caseInsensitive\": true,\n\n\t/**\n\t * Applied search term\n\t */\n\t\"search\": \"\",\n\n\t/**\n\t * Flag to indicate if the search term should be interpreted as a\n\t * regular expression (true) or not (false) and therefore and special\n\t * regex characters escaped.\n\t */\n\t\"regex\": false,\n\n\t/**\n\t * Flag to indicate if DataTables is to use its smart filtering or not.\n\t */\n\t\"smart\": true,\n\n\t/**\n\t * Flag to indicate if DataTables should only trigger a search when\n\t * the return key is pressed.\n\t */\n\t\"return\": false\n};\n\n\n\n\n/**\n * Template object for the way in which DataTables holds information about\n * each individual row. This is the object format used for the settings\n * aoData array.\n *  @namespace\n */\nDataTable.models.oRow = {\n\t/**\n\t * TR element for the row\n\t */\n\t\"nTr\": null,\n\n\t/**\n\t * Array of TD elements for each row. This is null until the row has been\n\t * created.\n\t */\n\t\"anCells\": null,\n\n\t/**\n\t * Data object from the original data source for the row. This is either\n\t * an array if using the traditional form of DataTables, or an object if\n\t * using mData options. The exact type will depend on the passed in\n\t * data from the data source, or will be an array if using DOM a data\n\t * source.\n\t */\n\t\"_aData\": [],\n\n\t/**\n\t * Sorting data cache - this array is ostensibly the same length as the\n\t * number of columns (although each index is generated only as it is\n\t * needed), and holds the data that is used for sorting each column in the\n\t * row. We do this cache generation at the start of the sort in order that\n\t * the formatting of the sort data need be done only once for each cell\n\t * per sort. This array should not be read from or written to by anything\n\t * other than the master sorting methods.\n\t */\n\t\"_aSortData\": null,\n\n\t/**\n\t * Per cell filtering data cache. As per the sort data cache, used to\n\t * increase the performance of the filtering in DataTables\n\t */\n\t\"_aFilterData\": null,\n\n\t/**\n\t * Filtering data cache. This is the same as the cell filtering cache, but\n\t * in this case a string rather than an array. This is easily computed with\n\t * a join on `_aFilterData`, but is provided as a cache so the join isn't\n\t * needed on every search (memory traded for performance)\n\t */\n\t\"_sFilterRow\": null,\n\n\t/**\n\t * Denote if the original data source was from the DOM, or the data source\n\t * object. This is used for invalidating data, so DataTables can\n\t * automatically read data from the original source, unless uninstructed\n\t * otherwise.\n\t */\n\t\"src\": null,\n\n\t/**\n\t * Index in the aoData array. This saves an indexOf lookup when we have the\n\t * object, but want to know the index\n\t */\n\t\"idx\": -1,\n\n\t/**\n\t * Cached display value\n\t */\n\tdisplayData: null\n};\n\n\n/**\n * Template object for the column information object in DataTables. This object\n * is held in the settings aoColumns array and contains all the information that\n * DataTables needs about each individual column.\n *\n * Note that this object is related to {@link DataTable.defaults.column}\n * but this one is the internal data store for DataTables's cache of columns.\n * It should NOT be manipulated outside of DataTables. Any configuration should\n * be done through the initialisation options.\n *  @namespace\n */\nDataTable.models.oColumn = {\n\t/**\n\t * Column index.\n\t */\n\t\"idx\": null,\n\n\t/**\n\t * A list of the columns that sorting should occur on when this column\n\t * is sorted. That this property is an array allows multi-column sorting\n\t * to be defined for a column (for example first name / last name columns\n\t * would benefit from this). The values are integers pointing to the\n\t * columns to be sorted on (typically it will be a single integer pointing\n\t * at itself, but that doesn't need to be the case).\n\t */\n\t\"aDataSort\": null,\n\n\t/**\n\t * Define the sorting directions that are applied to the column, in sequence\n\t * as the column is repeatedly sorted upon - i.e. the first value is used\n\t * as the sorting direction when the column if first sorted (clicked on).\n\t * Sort it again (click again) and it will move on to the next index.\n\t * Repeat until loop.\n\t */\n\t\"asSorting\": null,\n\n\t/**\n\t * Flag to indicate if the column is searchable, and thus should be included\n\t * in the filtering or not.\n\t */\n\t\"bSearchable\": null,\n\n\t/**\n\t * Flag to indicate if the column is sortable or not.\n\t */\n\t\"bSortable\": null,\n\n\t/**\n\t * Flag to indicate if the column is currently visible in the table or not\n\t */\n\t\"bVisible\": null,\n\n\t/**\n\t * Store for manual type assignment using the `column.type` option. This\n\t * is held in store so we can manipulate the column's `sType` property.\n\t */\n\t\"_sManualType\": null,\n\n\t/**\n\t * Flag to indicate if HTML5 data attributes should be used as the data\n\t * source for filtering or sorting. True is either are.\n\t */\n\t\"_bAttrSrc\": false,\n\n\t/**\n\t * Developer definable function that is called whenever a cell is created (Ajax source,\n\t * etc) or processed for input (DOM source). This can be used as a compliment to mRender\n\t * allowing you to modify the DOM element (add background colour for example) when the\n\t * element is available.\n\t */\n\t\"fnCreatedCell\": null,\n\n\t/**\n\t * Function to get data from a cell in a column. You should <b>never</b>\n\t * access data directly through _aData internally in DataTables - always use\n\t * the method attached to this property. It allows mData to function as\n\t * required. This function is automatically assigned by the column\n\t * initialisation method\n\t */\n\t\"fnGetData\": null,\n\n\t/**\n\t * Function to set data for a cell in the column. You should <b>never</b>\n\t * set the data directly to _aData internally in DataTables - always use\n\t * this method. It allows mData to function as required. This function\n\t * is automatically assigned by the column initialisation method\n\t */\n\t\"fnSetData\": null,\n\n\t/**\n\t * Property to read the value for the cells in the column from the data\n\t * source array / object. If null, then the default content is used, if a\n\t * function is given then the return from the function is used.\n\t */\n\t\"mData\": null,\n\n\t/**\n\t * Partner property to mData which is used (only when defined) to get\n\t * the data - i.e. it is basically the same as mData, but without the\n\t * 'set' option, and also the data fed to it is the result from mData.\n\t * This is the rendering method to match the data method of mData.\n\t */\n\t\"mRender\": null,\n\n\t/**\n\t * The class to apply to all TD elements in the table's TBODY for the column\n\t */\n\t\"sClass\": null,\n\n\t/**\n\t * When DataTables calculates the column widths to assign to each column,\n\t * it finds the longest string in each column and then constructs a\n\t * temporary table and reads the widths from that. The problem with this\n\t * is that \"mmm\" is much wider then \"iiii\", but the latter is a longer\n\t * string - thus the calculation can go wrong (doing it properly and putting\n\t * it into an DOM object and measuring that is horribly(!) slow). Thus as\n\t * a \"work around\" we provide this option. It will append its value to the\n\t * text that is found to be the longest string for the column - i.e. padding.\n\t */\n\t\"sContentPadding\": null,\n\n\t/**\n\t * Allows a default value to be given for a column's data, and will be used\n\t * whenever a null data source is encountered (this can be because mData\n\t * is set to null, or because the data source itself is null).\n\t */\n\t\"sDefaultContent\": null,\n\n\t/**\n\t * Name for the column, allowing reference to the column by name as well as\n\t * by index (needs a lookup to work by name).\n\t */\n\t\"sName\": null,\n\n\t/**\n\t * Custom sorting data type - defines which of the available plug-ins in\n\t * afnSortData the custom sorting will use - if any is defined.\n\t */\n\t\"sSortDataType\": 'std',\n\n\t/**\n\t * Class to be applied to the header element when sorting on this column\n\t */\n\t\"sSortingClass\": null,\n\n\t/**\n\t * Title of the column - what is seen in the TH element (nTh).\n\t */\n\t\"sTitle\": null,\n\n\t/**\n\t * Column sorting and filtering type\n\t */\n\t\"sType\": null,\n\n\t/**\n\t * Width of the column\n\t */\n\t\"sWidth\": null,\n\n\t/**\n\t * Width of the column when it was first \"encountered\"\n\t */\n\t\"sWidthOrig\": null,\n\n\t/** Cached string which is the longest in the column */\n\tmaxLenString: null,\n\n\t/**\n\t * Store for named searches\n\t */\n\tsearchFixed: null\n};\n\n\n/*\n * Developer note: The properties of the object below are given in Hungarian\n * notation, that was used as the interface for DataTables prior to v1.10, however\n * from v1.10 onwards the primary interface is camel case. In order to avoid\n * breaking backwards compatibility utterly with this change, the Hungarian\n * version is still, internally the primary interface, but is is not documented\n * - hence the @name tags in each doc comment. This allows a Javascript function\n * to create a map from Hungarian notation to camel case (going the other direction\n * would require each property to be listed, which would add around 3K to the size\n * of DataTables, while this method is about a 0.5K hit).\n *\n * Ultimately this does pave the way for Hungarian notation to be dropped\n * completely, but that is a massive amount of work and will break current\n * installs (therefore is on-hold until v2).\n */\n\n/**\n * Initialisation options that can be given to DataTables at initialisation\n * time.\n *  @namespace\n */\nDataTable.defaults = {\n\t/**\n\t * An array of data to use for the table, passed in at initialisation which\n\t * will be used in preference to any data which is already in the DOM. This is\n\t * particularly useful for constructing tables purely in Javascript, for\n\t * example with a custom Ajax call.\n\t */\n\t\"aaData\": null,\n\n\n\t/**\n\t * If ordering is enabled, then DataTables will perform a first pass sort on\n\t * initialisation. You can define which column(s) the sort is performed\n\t * upon, and the sorting direction, with this variable. The `sorting` array\n\t * should contain an array for each column to be sorted initially containing\n\t * the column's index and a direction string ('asc' or 'desc').\n\t */\n\t\"aaSorting\": [[0,'asc']],\n\n\n\t/**\n\t * This parameter is basically identical to the `sorting` parameter, but\n\t * cannot be overridden by user interaction with the table. What this means\n\t * is that you could have a column (visible or hidden) which the sorting\n\t * will always be forced on first - any sorting after that (from the user)\n\t * will then be performed as required. This can be useful for grouping rows\n\t * together.\n\t */\n\t\"aaSortingFixed\": [],\n\n\n\t/**\n\t * DataTables can be instructed to load data to display in the table from a\n\t * Ajax source. This option defines how that Ajax call is made and where to.\n\t *\n\t * The `ajax` property has three different modes of operation, depending on\n\t * how it is defined. These are:\n\t *\n\t * * `string` - Set the URL from where the data should be loaded from.\n\t * * `object` - Define properties for `jQuery.ajax`.\n\t * * `function` - Custom data get function\n\t *\n\t * `string`\n\t * --------\n\t *\n\t * As a string, the `ajax` property simply defines the URL from which\n\t * DataTables will load data.\n\t *\n\t * `object`\n\t * --------\n\t *\n\t * As an object, the parameters in the object are passed to\n\t * [jQuery.ajax](https://api.jquery.com/jQuery.ajax/) allowing fine control\n\t * of the Ajax request. DataTables has a number of default parameters which\n\t * you can override using this option. Please refer to the jQuery\n\t * documentation for a full description of the options available, although\n\t * the following parameters provide additional options in DataTables or\n\t * require special consideration:\n\t *\n\t * * `data` - As with jQuery, `data` can be provided as an object, but it\n\t *   can also be used as a function to manipulate the data DataTables sends\n\t *   to the server. The function takes a single parameter, an object of\n\t *   parameters with the values that DataTables has readied for sending. An\n\t *   object may be returned which will be merged into the DataTables\n\t *   defaults, or you can add the items to the object that was passed in and\n\t *   not return anything from the function. This supersedes `fnServerParams`\n\t *   from DataTables 1.9-.\n\t *\n\t * * `dataSrc` - By default DataTables will look for the property `data` (or\n\t *   `aaData` for compatibility with DataTables 1.9-) when obtaining data\n\t *   from an Ajax source or for server-side processing - this parameter\n\t *   allows that property to be changed. You can use Javascript dotted\n\t *   object notation to get a data source for multiple levels of nesting, or\n\t *   it my be used as a function. As a function it takes a single parameter,\n\t *   the JSON returned from the server, which can be manipulated as\n\t *   required, with the returned value being that used by DataTables as the\n\t *   data source for the table.\n\t *\n\t * * `success` - Should not be overridden it is used internally in\n\t *   DataTables. To manipulate / transform the data returned by the server\n\t *   use `ajax.dataSrc`, or use `ajax` as a function (see below).\n\t *\n\t * `function`\n\t * ----------\n\t *\n\t * As a function, making the Ajax call is left up to yourself allowing\n\t * complete control of the Ajax request. Indeed, if desired, a method other\n\t * than Ajax could be used to obtain the required data, such as Web storage\n\t * or an AIR database.\n\t *\n\t * The function is given four parameters and no return is required. The\n\t * parameters are:\n\t *\n\t * 1. _object_ - Data to send to the server\n\t * 2. _function_ - Callback function that must be executed when the required\n\t *    data has been obtained. That data should be passed into the callback\n\t *    as the only parameter\n\t * 3. _object_ - DataTables settings object for the table\n\t */\n\t\"ajax\": null,\n\n\n\t/**\n\t * This parameter allows you to readily specify the entries in the length drop\n\t * down menu that DataTables shows when pagination is enabled. It can be\n\t * either a 1D array of options which will be used for both the displayed\n\t * option and the value, or a 2D array which will use the array in the first\n\t * position as the value, and the array in the second position as the\n\t * displayed options (useful for language strings such as 'All').\n\t *\n\t * Note that the `pageLength` property will be automatically set to the\n\t * first value given in this array, unless `pageLength` is also provided.\n\t */\n\t\"aLengthMenu\": [ 10, 25, 50, 100 ],\n\n\n\t/**\n\t * The `columns` option in the initialisation parameter allows you to define\n\t * details about the way individual columns behave. For a full list of\n\t * column options that can be set, please see\n\t * {@link DataTable.defaults.column}. Note that if you use `columns` to\n\t * define your columns, you must have an entry in the array for every single\n\t * column that you have in your table (these can be null if you don't which\n\t * to specify any options).\n\t */\n\t\"aoColumns\": null,\n\n\t/**\n\t * Very similar to `columns`, `columnDefs` allows you to target a specific\n\t * column, multiple columns, or all columns, using the `targets` property of\n\t * each object in the array. This allows great flexibility when creating\n\t * tables, as the `columnDefs` arrays can be of any length, targeting the\n\t * columns you specifically want. `columnDefs` may use any of the column\n\t * options available: {@link DataTable.defaults.column}, but it _must_\n\t * have `targets` defined in each object in the array. Values in the `targets`\n\t * array may be:\n\t *   <ul>\n\t *     <li>a string - class name will be matched on the TH for the column</li>\n\t *     <li>0 or a positive integer - column index counting from the left</li>\n\t *     <li>a negative integer - column index counting from the right</li>\n\t *     <li>the string \"_all\" - all columns (i.e. assign a default)</li>\n\t *   </ul>\n\t */\n\t\"aoColumnDefs\": null,\n\n\n\t/**\n\t * Basically the same as `search`, this parameter defines the individual column\n\t * filtering state at initialisation time. The array must be of the same size\n\t * as the number of columns, and each element be an object with the parameters\n\t * `search` and `escapeRegex` (the latter is optional). 'null' is also\n\t * accepted and the default will be used.\n\t */\n\t\"aoSearchCols\": [],\n\n\n\t/**\n\t * Enable or disable automatic column width calculation. This can be disabled\n\t * as an optimisation (it takes some time to calculate the widths) if the\n\t * tables widths are passed in using `columns`.\n\t */\n\t\"bAutoWidth\": true,\n\n\n\t/**\n\t * Deferred rendering can provide DataTables with a huge speed boost when you\n\t * are using an Ajax or JS data source for the table. This option, when set to\n\t * true, will cause DataTables to defer the creation of the table elements for\n\t * each row until they are needed for a draw - saving a significant amount of\n\t * time.\n\t */\n\t\"bDeferRender\": true,\n\n\n\t/**\n\t * Replace a DataTable which matches the given selector and replace it with\n\t * one which has the properties of the new initialisation object passed. If no\n\t * table matches the selector, then the new DataTable will be constructed as\n\t * per normal.\n\t */\n\t\"bDestroy\": false,\n\n\n\t/**\n\t * Enable or disable filtering of data. Filtering in DataTables is \"smart\" in\n\t * that it allows the end user to input multiple words (space separated) and\n\t * will match a row containing those words, even if not in the order that was\n\t * specified (this allow matching across multiple columns). Note that if you\n\t * wish to use filtering in DataTables this must remain 'true' - to remove the\n\t * default filtering input box and retain filtering abilities, please use\n\t * {@link DataTable.defaults.dom}.\n\t */\n\t\"bFilter\": true,\n\n\t/**\n\t * Used only for compatiblity with DT1\n\t * @deprecated\n\t */\n\t\"bInfo\": true,\n\n\t/**\n\t * Used only for compatiblity with DT1\n\t * @deprecated\n\t */\n\t\"bLengthChange\": true,\n\n\t/**\n\t * Enable or disable pagination.\n\t */\n\t\"bPaginate\": true,\n\n\n\t/**\n\t * Enable or disable the display of a 'processing' indicator when the table is\n\t * being processed (e.g. a sort). This is particularly useful for tables with\n\t * large amounts of data where it can take a noticeable amount of time to sort\n\t * the entries.\n\t */\n\t\"bProcessing\": false,\n\n\n\t/**\n\t * Retrieve the DataTables object for the given selector. Note that if the\n\t * table has already been initialised, this parameter will cause DataTables\n\t * to simply return the object that has already been set up - it will not take\n\t * account of any changes you might have made to the initialisation object\n\t * passed to DataTables (setting this parameter to true is an acknowledgement\n\t * that you understand this). `destroy` can be used to reinitialise a table if\n\t * you need.\n\t */\n\t\"bRetrieve\": false,\n\n\n\t/**\n\t * When vertical (y) scrolling is enabled, DataTables will force the height of\n\t * the table's viewport to the given height at all times (useful for layout).\n\t * However, this can look odd when filtering data down to a small data set,\n\t * and the footer is left \"floating\" further down. This parameter (when\n\t * enabled) will cause DataTables to collapse the table's viewport down when\n\t * the result set will fit within the given Y height.\n\t */\n\t\"bScrollCollapse\": false,\n\n\n\t/**\n\t * Configure DataTables to use server-side processing. Note that the\n\t * `ajax` parameter must also be given in order to give DataTables a\n\t * source to obtain the required data for each draw.\n\t */\n\t\"bServerSide\": false,\n\n\n\t/**\n\t * Enable or disable sorting of columns. Sorting of individual columns can be\n\t * disabled by the `sortable` option for each column.\n\t */\n\t\"bSort\": true,\n\n\n\t/**\n\t * Enable or display DataTables' ability to sort multiple columns at the\n\t * same time (activated by shift-click by the user).\n\t */\n\t\"bSortMulti\": true,\n\n\n\t/**\n\t * Allows control over whether DataTables should use the top (true) unique\n\t * cell that is found for a single column, or the bottom (false - default).\n\t * This is useful when using complex headers.\n\t */\n\t\"bSortCellsTop\": null,\n\n\n\t/**\n\t * Enable or disable the addition of the classes `sorting\\_1`, `sorting\\_2` and\n\t * `sorting\\_3` to the columns which are currently being sorted on. This is\n\t * presented as a feature switch as it can increase processing time (while\n\t * classes are removed and added) so for large data sets you might want to\n\t * turn this off.\n\t */\n\t\"bSortClasses\": true,\n\n\n\t/**\n\t * Enable or disable state saving. When enabled HTML5 `localStorage` will be\n\t * used to save table display information such as pagination information,\n\t * display length, filtering and sorting. As such when the end user reloads\n\t * the page the display display will match what thy had previously set up.\n\t */\n\t\"bStateSave\": false,\n\n\n\t/**\n\t * This function is called when a TR element is created (and all TD child\n\t * elements have been inserted), or registered if using a DOM source, allowing\n\t * manipulation of the TR element (adding classes etc).\n\t */\n\t\"fnCreatedRow\": null,\n\n\n\t/**\n\t * This function is called on every 'draw' event, and allows you to\n\t * dynamically modify any aspect you want about the created DOM.\n\t */\n\t\"fnDrawCallback\": null,\n\n\n\t/**\n\t * Identical to fnHeaderCallback() but for the table footer this function\n\t * allows you to modify the table footer on every 'draw' event.\n\t */\n\t\"fnFooterCallback\": null,\n\n\n\t/**\n\t * When rendering large numbers in the information element for the table\n\t * (i.e. \"Showing 1 to 10 of 57 entries\") DataTables will render large numbers\n\t * to have a comma separator for the 'thousands' units (e.g. 1 million is\n\t * rendered as \"1,000,000\") to help readability for the end user. This\n\t * function will override the default method DataTables uses.\n\t */\n\t\"fnFormatNumber\": function ( toFormat ) {\n\t\treturn toFormat.toString().replace(\n\t\t\t/\\B(?=(\\d{3})+(?!\\d))/g,\n\t\t\tthis.oLanguage.sThousands\n\t\t);\n\t},\n\n\n\t/**\n\t * This function is called on every 'draw' event, and allows you to\n\t * dynamically modify the header row. This can be used to calculate and\n\t * display useful information about the table.\n\t */\n\t\"fnHeaderCallback\": null,\n\n\n\t/**\n\t * The information element can be used to convey information about the current\n\t * state of the table. Although the internationalisation options presented by\n\t * DataTables are quite capable of dealing with most customisations, there may\n\t * be times where you wish to customise the string further. This callback\n\t * allows you to do exactly that.\n\t */\n\t\"fnInfoCallback\": null,\n\n\n\t/**\n\t * Called when the table has been initialised. Normally DataTables will\n\t * initialise sequentially and there will be no need for this function,\n\t * however, this does not hold true when using external language information\n\t * since that is obtained using an async XHR call.\n\t */\n\t\"fnInitComplete\": null,\n\n\n\t/**\n\t * Called at the very start of each table draw and can be used to cancel the\n\t * draw by returning false, any other return (including undefined) results in\n\t * the full draw occurring).\n\t */\n\t\"fnPreDrawCallback\": null,\n\n\n\t/**\n\t * This function allows you to 'post process' each row after it have been\n\t * generated for each table draw, but before it is rendered on screen. This\n\t * function might be used for setting the row class name etc.\n\t */\n\t\"fnRowCallback\": null,\n\n\n\t/**\n\t * Load the table state. With this function you can define from where, and how, the\n\t * state of a table is loaded. By default DataTables will load from `localStorage`\n\t * but you might wish to use a server-side database or cookies.\n\t */\n\t\"fnStateLoadCallback\": function ( settings ) {\n\t\ttry {\n\t\t\treturn JSON.parse(\n\t\t\t\t(settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(\n\t\t\t\t\t'DataTables_'+settings.sInstance+'_'+location.pathname\n\t\t\t\t)\n\t\t\t);\n\t\t} catch (e) {\n\t\t\treturn {};\n\t\t}\n\t},\n\n\n\t/**\n\t * Callback which allows modification of the saved state prior to loading that state.\n\t * This callback is called when the table is loading state from the stored data, but\n\t * prior to the settings object being modified by the saved state. Note that for\n\t * plug-in authors, you should use the `stateLoadParams` event to load parameters for\n\t * a plug-in.\n\t */\n\t\"fnStateLoadParams\": null,\n\n\n\t/**\n\t * Callback that is called when the state has been loaded from the state saving method\n\t * and the DataTables settings object has been modified as a result of the loaded state.\n\t */\n\t\"fnStateLoaded\": null,\n\n\n\t/**\n\t * Save the table state. This function allows you to define where and how the state\n\t * information for the table is stored By default DataTables will use `localStorage`\n\t * but you might wish to use a server-side database or cookies.\n\t */\n\t\"fnStateSaveCallback\": function ( settings, data ) {\n\t\ttry {\n\t\t\t(settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(\n\t\t\t\t'DataTables_'+settings.sInstance+'_'+location.pathname,\n\t\t\t\tJSON.stringify( data )\n\t\t\t);\n\t\t} catch (e) {\n\t\t\t// noop\n\t\t}\n\t},\n\n\n\t/**\n\t * Callback which allows modification of the state to be saved. Called when the table\n\t * has changed state a new state save is required. This method allows modification of\n\t * the state saving object prior to actually doing the save, including addition or\n\t * other state properties or modification. Note that for plug-in authors, you should\n\t * use the `stateSaveParams` event to save parameters for a plug-in.\n\t */\n\t\"fnStateSaveParams\": null,\n\n\n\t/**\n\t * Duration for which the saved state information is considered valid. After this period\n\t * has elapsed the state will be returned to the default.\n\t * Value is given in seconds.\n\t */\n\t\"iStateDuration\": 7200,\n\n\n\t/**\n\t * Number of rows to display on a single page when using pagination. If\n\t * feature enabled (`lengthChange`) then the end user will be able to override\n\t * this to a custom setting using a pop-up menu.\n\t */\n\t\"iDisplayLength\": 10,\n\n\n\t/**\n\t * Define the starting point for data display when using DataTables with\n\t * pagination. Note that this parameter is the number of records, rather than\n\t * the page number, so if you have 10 records per page and want to start on\n\t * the third page, it should be \"20\".\n\t */\n\t\"iDisplayStart\": 0,\n\n\n\t/**\n\t * By default DataTables allows keyboard navigation of the table (sorting, paging,\n\t * and filtering) by adding a `tabindex` attribute to the required elements. This\n\t * allows you to tab through the controls and press the enter key to activate them.\n\t * The tabindex is default 0, meaning that the tab follows the flow of the document.\n\t * You can overrule this using this parameter if you wish. Use a value of -1 to\n\t * disable built-in keyboard navigation.\n\t */\n\t\"iTabIndex\": 0,\n\n\n\t/**\n\t * Classes that DataTables assigns to the various components and features\n\t * that it adds to the HTML table. This allows classes to be configured\n\t * during initialisation in addition to through the static\n\t * {@link DataTable.ext.oStdClasses} object).\n\t */\n\t\"oClasses\": {},\n\n\n\t/**\n\t * All strings that DataTables uses in the user interface that it creates\n\t * are defined in this object, allowing you to modified them individually or\n\t * completely replace them all as required.\n\t */\n\t\"oLanguage\": {\n\t\t/**\n\t\t * Strings that are used for WAI-ARIA labels and controls only (these are not\n\t\t * actually visible on the page, but will be read by screenreaders, and thus\n\t\t * must be internationalised as well).\n\t\t */\n\t\t\"oAria\": {\n\t\t\t/**\n\t\t\t * ARIA label that is added to the table headers when the column may be sorted\n\t\t\t */\n\t\t\t\"orderable\": \": Activate to sort\",\n\n\t\t\t/**\n\t\t\t * ARIA label that is added to the table headers when the column is currently being sorted\n\t\t\t */\n\t\t\t\"orderableReverse\": \": Activate to invert sorting\",\n\n\t\t\t/**\n\t\t\t * ARIA label that is added to the table headers when the column is currently being \n\t\t\t * sorted and next step is to remove sorting\n\t\t\t */\n\t\t\t\"orderableRemove\": \": Activate to remove sorting\",\n\n\t\t\tpaginate: {\n\t\t\t\tfirst: 'First',\n\t\t\t\tlast: 'Last',\n\t\t\t\tnext: 'Next',\n\t\t\t\tprevious: 'Previous',\n\t\t\t\tnumber: ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Pagination string used by DataTables for the built-in pagination\n\t\t * control types.\n\t\t */\n\t\t\"oPaginate\": {\n\t\t\t/**\n\t\t\t * Label and character for first page button («)\n\t\t\t */\n\t\t\t\"sFirst\": \"\\u00AB\",\n\n\t\t\t/**\n\t\t\t * Last page button (»)\n\t\t\t */\n\t\t\t\"sLast\": \"\\u00BB\",\n\n\t\t\t/**\n\t\t\t * Next page button (›)\n\t\t\t */\n\t\t\t\"sNext\": \"\\u203A\",\n\n\t\t\t/**\n\t\t\t * Previous page button (‹)\n\t\t\t */\n\t\t\t\"sPrevious\": \"\\u2039\",\n\t\t},\n\n\t\t/**\n\t\t * Plural object for the data type the table is showing\n\t\t */\n\t\tentries: {\n\t\t\t_: \"entries\",\n\t\t\t1: \"entry\"\n\t\t},\n\n\t\t/**\n\t\t * This string is shown in preference to `zeroRecords` when the table is\n\t\t * empty of data (regardless of filtering). Note that this is an optional\n\t\t * parameter - if it is not given, the value of `zeroRecords` will be used\n\t\t * instead (either the default or given value).\n\t\t */\n\t\t\"sEmptyTable\": \"No data available in table\",\n\n\n\t\t/**\n\t\t * This string gives information to the end user about the information\n\t\t * that is current on display on the page. The following tokens can be\n\t\t * used in the string and will be dynamically replaced as the table\n\t\t * display updates. This tokens can be placed anywhere in the string, or\n\t\t * removed as needed by the language requires:\n\t\t *\n\t\t * * `\\_START\\_` - Display index of the first record on the current page\n\t\t * * `\\_END\\_` - Display index of the last record on the current page\n\t\t * * `\\_TOTAL\\_` - Number of records in the table after filtering\n\t\t * * `\\_MAX\\_` - Number of records in the table without filtering\n\t\t * * `\\_PAGE\\_` - Current page number\n\t\t * * `\\_PAGES\\_` - Total number of pages of data in the table\n\t\t */\n\t\t\"sInfo\": \"Showing _START_ to _END_ of _TOTAL_ _ENTRIES-TOTAL_\",\n\n\n\t\t/**\n\t\t * Display information string for when the table is empty. Typically the\n\t\t * format of this string should match `info`.\n\t\t */\n\t\t\"sInfoEmpty\": \"Showing 0 to 0 of 0 _ENTRIES-TOTAL_\",\n\n\n\t\t/**\n\t\t * When a user filters the information in a table, this string is appended\n\t\t * to the information (`info`) to give an idea of how strong the filtering\n\t\t * is. The variable _MAX_ is dynamically updated.\n\t\t */\n\t\t\"sInfoFiltered\": \"(filtered from _MAX_ total _ENTRIES-MAX_)\",\n\n\n\t\t/**\n\t\t * If can be useful to append extra information to the info string at times,\n\t\t * and this variable does exactly that. This information will be appended to\n\t\t * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are\n\t\t * being used) at all times.\n\t\t */\n\t\t\"sInfoPostFix\": \"\",\n\n\n\t\t/**\n\t\t * This decimal place operator is a little different from the other\n\t\t * language options since DataTables doesn't output floating point\n\t\t * numbers, so it won't ever use this for display of a number. Rather,\n\t\t * what this parameter does is modify the sort methods of the table so\n\t\t * that numbers which are in a format which has a character other than\n\t\t * a period (`.`) as a decimal place will be sorted numerically.\n\t\t *\n\t\t * Note that numbers with different decimal places cannot be shown in\n\t\t * the same table and still be sortable, the table must be consistent.\n\t\t * However, multiple different tables on the page can use different\n\t\t * decimal place characters.\n\t\t */\n\t\t\"sDecimal\": \"\",\n\n\n\t\t/**\n\t\t * DataTables has a build in number formatter (`formatNumber`) which is\n\t\t * used to format large numbers that are used in the table information.\n\t\t * By default a comma is used, but this can be trivially changed to any\n\t\t * character you wish with this parameter.\n\t\t */\n\t\t\"sThousands\": \",\",\n\n\n\t\t/**\n\t\t * Detail the action that will be taken when the drop down menu for the\n\t\t * pagination length option is changed. The '_MENU_' variable is replaced\n\t\t * with a default select list of 10, 25, 50 and 100, and can be replaced\n\t\t * with a custom select box if required.\n\t\t */\n\t\t\"sLengthMenu\": \"_MENU_ _ENTRIES_ per page\",\n\n\n\t\t/**\n\t\t * When using Ajax sourced data and during the first draw when DataTables is\n\t\t * gathering the data, this message is shown in an empty row in the table to\n\t\t * indicate to the end user the the data is being loaded. Note that this\n\t\t * parameter is not used when loading data by server-side processing, just\n\t\t * Ajax sourced data with client-side processing.\n\t\t */\n\t\t\"sLoadingRecords\": \"Loading...\",\n\n\n\t\t/**\n\t\t * Text which is displayed when the table is processing a user action\n\t\t * (usually a sort command or similar).\n\t\t */\n\t\t\"sProcessing\": \"\",\n\n\n\t\t/**\n\t\t * Details the actions that will be taken when the user types into the\n\t\t * filtering input text box. The variable \"_INPUT_\", if used in the string,\n\t\t * is replaced with the HTML text box for the filtering input allowing\n\t\t * control over where it appears in the string. If \"_INPUT_\" is not given\n\t\t * then the input box is appended to the string automatically.\n\t\t */\n\t\t\"sSearch\": \"Search:\",\n\n\n\t\t/**\n\t\t * Assign a `placeholder` attribute to the search `input` element\n\t\t *  @type string\n\t\t *  @default \n\t\t *\n\t\t *  @dtopt Language\n\t\t *  @name DataTable.defaults.language.searchPlaceholder\n\t\t */\n\t\t\"sSearchPlaceholder\": \"\",\n\n\n\t\t/**\n\t\t * All of the language information can be stored in a file on the\n\t\t * server-side, which DataTables will look up if this parameter is passed.\n\t\t * It must store the URL of the language file, which is in a JSON format,\n\t\t * and the object has the same properties as the oLanguage object in the\n\t\t * initialiser object (i.e. the above parameters). Please refer to one of\n\t\t * the example language files to see how this works in action.\n\t\t */\n\t\t\"sUrl\": \"\",\n\n\n\t\t/**\n\t\t * Text shown inside the table records when the is no information to be\n\t\t * displayed after filtering. `emptyTable` is shown when there is simply no\n\t\t * information in the table at all (regardless of filtering).\n\t\t */\n\t\t\"sZeroRecords\": \"No matching records found\"\n\t},\n\n\n\t/** The initial data order is reversed when `desc` ordering */\n\torderDescReverse: true,\n\n\n\t/**\n\t * This parameter allows you to have define the global filtering state at\n\t * initialisation time. As an object the `search` parameter must be\n\t * defined, but all other parameters are optional. When `regex` is true,\n\t * the search string will be treated as a regular expression, when false\n\t * (default) it will be treated as a straight string. When `smart`\n\t * DataTables will use it's smart filtering methods (to word match at\n\t * any point in the data), when false this will not be done.\n\t */\n\t\"oSearch\": $.extend( {}, DataTable.models.oSearch ),\n\n\n\t/**\n\t * Table and control layout. This replaces the legacy `dom` option.\n\t */\n\tlayout: {\n\t\ttopStart: 'pageLength',\n\t\ttopEnd: 'search',\n\t\tbottomStart: 'info',\n\t\tbottomEnd: 'paging'\n\t},\n\n\n\t/**\n\t * Legacy DOM layout option\n\t */\n\t\"sDom\": null,\n\n\n\t/**\n\t * Search delay option. This will throttle full table searches that use the\n\t * DataTables provided search input element (it does not effect calls to\n\t * `dt-api search()`, providing a delay before the search is made.\n\t */\n\t\"searchDelay\": null,\n\n\n\t/**\n\t * DataTables features six different built-in options for the buttons to\n\t * display for pagination control:\n\t *\n\t * * `numbers` - Page number buttons only\n\t * * `simple` - 'Previous' and 'Next' buttons only\n\t * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers\n\t * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons\n\t * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers\n\t * * `first_last_numbers` - 'First' and 'Last' buttons, plus page numbers\n\t */\n\t\"sPaginationType\": \"\",\n\n\n\t/**\n\t * Enable horizontal scrolling. When a table is too wide to fit into a\n\t * certain layout, or you have a large number of columns in the table, you\n\t * can enable x-scrolling to show the table in a viewport, which can be\n\t * scrolled. This property can be `true` which will allow the table to\n\t * scroll horizontally when needed, or any CSS unit, or a number (in which\n\t * case it will be treated as a pixel measurement). Setting as simply `true`\n\t * is recommended.\n\t */\n\t\"sScrollX\": \"\",\n\n\n\t/**\n\t * This property can be used to force a DataTable to use more width than it\n\t * might otherwise do when x-scrolling is enabled. For example if you have a\n\t * table which requires to be well spaced, this parameter is useful for\n\t * \"over-sizing\" the table, and thus forcing scrolling. This property can by\n\t * any CSS unit, or a number (in which case it will be treated as a pixel\n\t * measurement).\n\t */\n\t\"sScrollXInner\": \"\",\n\n\n\t/**\n\t * Enable vertical scrolling. Vertical scrolling will constrain the DataTable\n\t * to the given height, and enable scrolling for any data which overflows the\n\t * current viewport. This can be used as an alternative to paging to display\n\t * a lot of data in a small area (although paging and scrolling can both be\n\t * enabled at the same time). This property can be any CSS unit, or a number\n\t * (in which case it will be treated as a pixel measurement).\n\t */\n\t\"sScrollY\": \"\",\n\n\n\t/**\n\t * __Deprecated__ The functionality provided by this parameter has now been\n\t * superseded by that provided through `ajax`, which should be used instead.\n\t *\n\t * Set the HTTP method that is used to make the Ajax call for server-side\n\t * processing or Ajax sourced data.\n\t */\n\t\"sServerMethod\": \"GET\",\n\n\n\t/**\n\t * DataTables makes use of renderers when displaying HTML elements for\n\t * a table. These renderers can be added or modified by plug-ins to\n\t * generate suitable mark-up for a site. For example the Bootstrap\n\t * integration plug-in for DataTables uses a paging button renderer to\n\t * display pagination buttons in the mark-up required by Bootstrap.\n\t *\n\t * For further information about the renderers available see\n\t * DataTable.ext.renderer\n\t */\n\t\"renderer\": null,\n\n\n\t/**\n\t * Set the data property name that DataTables should use to get a row's id\n\t * to set as the `id` property in the node.\n\t */\n\t\"rowId\": \"DT_RowId\",\n\n\n\t/**\n\t * Caption value\n\t */\n\t\"caption\": null,\n\n\n\t/**\n\t * For server-side processing - use the data from the DOM for the first draw\n\t */\n\tiDeferLoading: null\n};\n\n_fnHungarianMap( DataTable.defaults );\n\n\n\n/*\n * Developer note - See note in model.defaults.js about the use of Hungarian\n * notation and camel case.\n */\n\n/**\n * Column options that can be given to DataTables at initialisation time.\n *  @namespace\n */\nDataTable.defaults.column = {\n\t/**\n\t * Define which column(s) an order will occur on for this column. This\n\t * allows a column's ordering to take multiple columns into account when\n\t * doing a sort or use the data from a different column. For example first\n\t * name / last name columns make sense to do a multi-column sort over the\n\t * two columns.\n\t */\n\t\"aDataSort\": null,\n\t\"iDataSort\": -1,\n\n\tariaTitle: '',\n\n\n\t/**\n\t * You can control the default ordering direction, and even alter the\n\t * behaviour of the sort handler (i.e. only allow ascending ordering etc)\n\t * using this parameter.\n\t */\n\t\"asSorting\": [ 'asc', 'desc', '' ],\n\n\n\t/**\n\t * Enable or disable filtering on the data in this column.\n\t */\n\t\"bSearchable\": true,\n\n\n\t/**\n\t * Enable or disable ordering on this column.\n\t */\n\t\"bSortable\": true,\n\n\n\t/**\n\t * Enable or disable the display of this column.\n\t */\n\t\"bVisible\": true,\n\n\n\t/**\n\t * Developer definable function that is called whenever a cell is created (Ajax source,\n\t * etc) or processed for input (DOM source). This can be used as a compliment to mRender\n\t * allowing you to modify the DOM element (add background colour for example) when the\n\t * element is available.\n\t */\n\t\"fnCreatedCell\": null,\n\n\n\t/**\n\t * This property can be used to read data from any data source property,\n\t * including deeply nested objects / properties. `data` can be given in a\n\t * number of different ways which effect its behaviour:\n\t *\n\t * * `integer` - treated as an array index for the data source. This is the\n\t *   default that DataTables uses (incrementally increased for each column).\n\t * * `string` - read an object property from the data source. There are\n\t *   three 'special' options that can be used in the string to alter how\n\t *   DataTables reads the data from the source object:\n\t *    * `.` - Dotted Javascript notation. Just as you use a `.` in\n\t *      Javascript to read from nested objects, so to can the options\n\t *      specified in `data`. For example: `browser.version` or\n\t *      `browser.name`. If your object parameter name contains a period, use\n\t *      `\\\\` to escape it - i.e. `first\\\\.name`.\n\t *    * `[]` - Array notation. DataTables can automatically combine data\n\t *      from and array source, joining the data with the characters provided\n\t *      between the two brackets. For example: `name[, ]` would provide a\n\t *      comma-space separated list from the source array. If no characters\n\t *      are provided between the brackets, the original array source is\n\t *      returned.\n\t *    * `()` - Function notation. Adding `()` to the end of a parameter will\n\t *      execute a function of the name given. For example: `browser()` for a\n\t *      simple function on the data source, `browser.version()` for a\n\t *      function in a nested property or even `browser().version` to get an\n\t *      object property if the function called returns an object. Note that\n\t *      function notation is recommended for use in `render` rather than\n\t *      `data` as it is much simpler to use as a renderer.\n\t * * `null` - use the original data source for the row rather than plucking\n\t *   data directly from it. This action has effects on two other\n\t *   initialisation options:\n\t *    * `defaultContent` - When null is given as the `data` option and\n\t *      `defaultContent` is specified for the column, the value defined by\n\t *      `defaultContent` will be used for the cell.\n\t *    * `render` - When null is used for the `data` option and the `render`\n\t *      option is specified for the column, the whole data source for the\n\t *      row is used for the renderer.\n\t * * `function` - the function given will be executed whenever DataTables\n\t *   needs to set or get the data for a cell in the column. The function\n\t *   takes three parameters:\n\t *    * Parameters:\n\t *      * `{array|object}` The data source for the row\n\t *      * `{string}` The type call data requested - this will be 'set' when\n\t *        setting data or 'filter', 'display', 'type', 'sort' or undefined\n\t *        when gathering data. Note that when `undefined` is given for the\n\t *        type DataTables expects to get the raw data for the object back<\n\t *      * `{*}` Data to set when the second parameter is 'set'.\n\t *    * Return:\n\t *      * The return value from the function is not required when 'set' is\n\t *        the type of call, but otherwise the return is what will be used\n\t *        for the data requested.\n\t *\n\t * Note that `data` is a getter and setter option. If you just require\n\t * formatting of data for output, you will likely want to use `render` which\n\t * is simply a getter and thus simpler to use.\n\t *\n\t * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The\n\t * name change reflects the flexibility of this property and is consistent\n\t * with the naming of mRender. If 'mDataProp' is given, then it will still\n\t * be used by DataTables, as it automatically maps the old name to the new\n\t * if required.\n\t */\n\t\"mData\": null,\n\n\n\t/**\n\t * This property is the rendering partner to `data` and it is suggested that\n\t * when you want to manipulate data for display (including filtering,\n\t * sorting etc) without altering the underlying data for the table, use this\n\t * property. `render` can be considered to be the the read only companion to\n\t * `data` which is read / write (then as such more complex). Like `data`\n\t * this option can be given in a number of different ways to effect its\n\t * behaviour:\n\t *\n\t * * `integer` - treated as an array index for the data source. This is the\n\t *   default that DataTables uses (incrementally increased for each column).\n\t * * `string` - read an object property from the data source. There are\n\t *   three 'special' options that can be used in the string to alter how\n\t *   DataTables reads the data from the source object:\n\t *    * `.` - Dotted Javascript notation. Just as you use a `.` in\n\t *      Javascript to read from nested objects, so to can the options\n\t *      specified in `data`. For example: `browser.version` or\n\t *      `browser.name`. If your object parameter name contains a period, use\n\t *      `\\\\` to escape it - i.e. `first\\\\.name`.\n\t *    * `[]` - Array notation. DataTables can automatically combine data\n\t *      from and array source, joining the data with the characters provided\n\t *      between the two brackets. For example: `name[, ]` would provide a\n\t *      comma-space separated list from the source array. If no characters\n\t *      are provided between the brackets, the original array source is\n\t *      returned.\n\t *    * `()` - Function notation. Adding `()` to the end of a parameter will\n\t *      execute a function of the name given. For example: `browser()` for a\n\t *      simple function on the data source, `browser.version()` for a\n\t *      function in a nested property or even `browser().version` to get an\n\t *      object property if the function called returns an object.\n\t * * `object` - use different data for the different data types requested by\n\t *   DataTables ('filter', 'display', 'type' or 'sort'). The property names\n\t *   of the object is the data type the property refers to and the value can\n\t *   defined using an integer, string or function using the same rules as\n\t *   `render` normally does. Note that an `_` option _must_ be specified.\n\t *   This is the default value to use if you haven't specified a value for\n\t *   the data type requested by DataTables.\n\t * * `function` - the function given will be executed whenever DataTables\n\t *   needs to set or get the data for a cell in the column. The function\n\t *   takes three parameters:\n\t *    * Parameters:\n\t *      * {array|object} The data source for the row (based on `data`)\n\t *      * {string} The type call data requested - this will be 'filter',\n\t *        'display', 'type' or 'sort'.\n\t *      * {array|object} The full data source for the row (not based on\n\t *        `data`)\n\t *    * Return:\n\t *      * The return value from the function is what will be used for the\n\t *        data requested.\n\t */\n\t\"mRender\": null,\n\n\n\t/**\n\t * Change the cell type created for the column - either TD cells or TH cells. This\n\t * can be useful as TH cells have semantic meaning in the table body, allowing them\n\t * to act as a header for a row (you may wish to add scope='row' to the TH elements).\n\t */\n\t\"sCellType\": \"td\",\n\n\n\t/**\n\t * Class to give to each cell in this column.\n\t */\n\t\"sClass\": \"\",\n\n\t/**\n\t * When DataTables calculates the column widths to assign to each column,\n\t * it finds the longest string in each column and then constructs a\n\t * temporary table and reads the widths from that. The problem with this\n\t * is that \"mmm\" is much wider then \"iiii\", but the latter is a longer\n\t * string - thus the calculation can go wrong (doing it properly and putting\n\t * it into an DOM object and measuring that is horribly(!) slow). Thus as\n\t * a \"work around\" we provide this option. It will append its value to the\n\t * text that is found to be the longest string for the column - i.e. padding.\n\t * Generally you shouldn't need this!\n\t */\n\t\"sContentPadding\": \"\",\n\n\n\t/**\n\t * Allows a default value to be given for a column's data, and will be used\n\t * whenever a null data source is encountered (this can be because `data`\n\t * is set to null, or because the data source itself is null).\n\t */\n\t\"sDefaultContent\": null,\n\n\n\t/**\n\t * This parameter is only used in DataTables' server-side processing. It can\n\t * be exceptionally useful to know what columns are being displayed on the\n\t * client side, and to map these to database fields. When defined, the names\n\t * also allow DataTables to reorder information from the server if it comes\n\t * back in an unexpected order (i.e. if you switch your columns around on the\n\t * client-side, your server-side code does not also need updating).\n\t */\n\t\"sName\": \"\",\n\n\n\t/**\n\t * Defines a data source type for the ordering which can be used to read\n\t * real-time information from the table (updating the internally cached\n\t * version) prior to ordering. This allows ordering to occur on user\n\t * editable elements such as form inputs.\n\t */\n\t\"sSortDataType\": \"std\",\n\n\n\t/**\n\t * The title of this column.\n\t */\n\t\"sTitle\": null,\n\n\n\t/**\n\t * The type allows you to specify how the data for this column will be\n\t * ordered. Four types (string, numeric, date and html (which will strip\n\t * HTML tags before ordering)) are currently available. Note that only date\n\t * formats understood by Javascript's Date() object will be accepted as type\n\t * date. For example: \"Mar 26, 2008 5:03 PM\". May take the values: 'string',\n\t * 'numeric', 'date' or 'html' (by default). Further types can be adding\n\t * through plug-ins.\n\t */\n\t\"sType\": null,\n\n\n\t/**\n\t * Defining the width of the column, this parameter may take any CSS value\n\t * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not\n\t * been given a specific width through this interface ensuring that the table\n\t * remains readable.\n\t */\n\t\"sWidth\": null\n};\n\n_fnHungarianMap( DataTable.defaults.column );\n\n\n\n/**\n * DataTables settings object - this holds all the information needed for a\n * given table, including configuration, data and current application of the\n * table options. DataTables does not have a single instance for each DataTable\n * with the settings attached to that instance, but rather instances of the\n * DataTable \"class\" are created on-the-fly as needed (typically by a\n * $().dataTable() call) and the settings object is then applied to that\n * instance.\n *\n * Note that this object is related to {@link DataTable.defaults} but this\n * one is the internal data store for DataTables's cache of columns. It should\n * NOT be manipulated outside of DataTables. Any configuration should be done\n * through the initialisation options.\n */\nDataTable.models.oSettings = {\n\t/**\n\t * Primary features of DataTables and their enablement state.\n\t */\n\t\"oFeatures\": {\n\n\t\t/**\n\t\t * Flag to say if DataTables should automatically try to calculate the\n\t\t * optimum table and columns widths (true) or not (false).\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bAutoWidth\": null,\n\n\t\t/**\n\t\t * Delay the creation of TR and TD elements until they are actually\n\t\t * needed by a driven page draw. This can give a significant speed\n\t\t * increase for Ajax source and Javascript source data, but makes no\n\t\t * difference at all for DOM and server-side processing tables.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bDeferRender\": null,\n\n\t\t/**\n\t\t * Enable filtering on the table or not. Note that if this is disabled\n\t\t * then there is no filtering at all on the table, including fnFilter.\n\t\t * To just remove the filtering input use sDom and remove the 'f' option.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bFilter\": null,\n\n\t\t/**\n\t\t * Used only for compatiblity with DT1\n\t\t * @deprecated\n\t\t */\n\t\t\"bInfo\": true,\n\n\t\t/**\n\t\t * Used only for compatiblity with DT1\n\t\t * @deprecated\n\t\t */\n\t\t\"bLengthChange\": true,\n\n\t\t/**\n\t\t * Pagination enabled or not. Note that if this is disabled then length\n\t\t * changing must also be disabled.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bPaginate\": null,\n\n\t\t/**\n\t\t * Processing indicator enable flag whenever DataTables is enacting a\n\t\t * user request - typically an Ajax request for server-side processing.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bProcessing\": null,\n\n\t\t/**\n\t\t * Server-side processing enabled flag - when enabled DataTables will\n\t\t * get all data from the server for every draw - there is no filtering,\n\t\t * sorting or paging done on the client-side.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bServerSide\": null,\n\n\t\t/**\n\t\t * Sorting enablement flag.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bSort\": null,\n\n\t\t/**\n\t\t * Multi-column sorting\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bSortMulti\": null,\n\n\t\t/**\n\t\t * Apply a class to the columns which are being sorted to provide a\n\t\t * visual highlight or not. This can slow things down when enabled since\n\t\t * there is a lot of DOM interaction.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bSortClasses\": null,\n\n\t\t/**\n\t\t * State saving enablement flag.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bStateSave\": null\n\t},\n\n\n\t/**\n\t * Scrolling settings for a table.\n\t */\n\t\"oScroll\": {\n\t\t/**\n\t\t * When the table is shorter in height than sScrollY, collapse the\n\t\t * table container down to the height of the table (when true).\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"bCollapse\": null,\n\n\t\t/**\n\t\t * Width of the scrollbar for the web-browser's platform. Calculated\n\t\t * during table initialisation.\n\t\t */\n\t\t\"iBarWidth\": 0,\n\n\t\t/**\n\t\t * Viewport width for horizontal scrolling. Horizontal scrolling is\n\t\t * disabled if an empty string.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"sX\": null,\n\n\t\t/**\n\t\t * Width to expand the table to when using x-scrolling. Typically you\n\t\t * should not need to use this.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t *  @deprecated\n\t\t */\n\t\t\"sXInner\": null,\n\n\t\t/**\n\t\t * Viewport height for vertical scrolling. Vertical scrolling is disabled\n\t\t * if an empty string.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t */\n\t\t\"sY\": null\n\t},\n\n\t/**\n\t * Language information for the table.\n\t */\n\t\"oLanguage\": {\n\t\t/**\n\t\t * Information callback function. See\n\t\t * {@link DataTable.defaults.fnInfoCallback}\n\t\t */\n\t\t\"fnInfoCallback\": null\n\t},\n\n\t/**\n\t * Browser support parameters\n\t */\n\t\"oBrowser\": {\n\t\t/**\n\t\t * Determine if the vertical scrollbar is on the right or left of the\n\t\t * scrolling container - needed for rtl language layout, although not\n\t\t * all browsers move the scrollbar (Safari).\n\t\t */\n\t\t\"bScrollbarLeft\": false,\n\n\t\t/**\n\t\t * Browser scrollbar width\n\t\t */\n\t\t\"barWidth\": 0\n\t},\n\n\n\t\"ajax\": null,\n\n\n\t/**\n\t * Array referencing the nodes which are used for the features. The\n\t * parameters of this object match what is allowed by sDom - i.e.\n\t *   <ul>\n\t *     <li>'l' - Length changing</li>\n\t *     <li>'f' - Filtering input</li>\n\t *     <li>'t' - The table!</li>\n\t *     <li>'i' - Information</li>\n\t *     <li>'p' - Pagination</li>\n\t *     <li>'r' - pRocessing</li>\n\t *   </ul>\n\t */\n\t\"aanFeatures\": [],\n\n\t/**\n\t * Store data information - see {@link DataTable.models.oRow} for detailed\n\t * information.\n\t */\n\t\"aoData\": [],\n\n\t/**\n\t * Array of indexes which are in the current display (after filtering etc)\n\t */\n\t\"aiDisplay\": [],\n\n\t/**\n\t * Array of indexes for display - no filtering\n\t */\n\t\"aiDisplayMaster\": [],\n\n\t/**\n\t * Map of row ids to data indexes\n\t */\n\t\"aIds\": {},\n\n\t/**\n\t * Store information about each column that is in use\n\t */\n\t\"aoColumns\": [],\n\n\t/**\n\t * Store information about the table's header\n\t */\n\t\"aoHeader\": [],\n\n\t/**\n\t * Store information about the table's footer\n\t */\n\t\"aoFooter\": [],\n\n\t/**\n\t * Store the applied global search information in case we want to force a\n\t * research or compare the old search to a new one.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"oPreviousSearch\": {},\n\n\t/**\n\t * Store for named searches\n\t */\n\tsearchFixed: {},\n\n\t/**\n\t * Store the applied search for each column - see\n\t * {@link DataTable.models.oSearch} for the format that is used for the\n\t * filtering information for each column.\n\t */\n\t\"aoPreSearchCols\": [],\n\n\t/**\n\t * Sorting that is applied to the table. Note that the inner arrays are\n\t * used in the following manner:\n\t * <ul>\n\t *   <li>Index 0 - column number</li>\n\t *   <li>Index 1 - current sorting direction</li>\n\t * </ul>\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"aaSorting\": null,\n\n\t/**\n\t * Sorting that is always applied to the table (i.e. prefixed in front of\n\t * aaSorting).\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"aaSortingFixed\": [],\n\n\t/**\n\t * If restoring a table - we should restore its width\n\t */\n\t\"sDestroyWidth\": 0,\n\n\t/**\n\t * Callback functions array for every time a row is inserted (i.e. on a draw).\n\t */\n\t\"aoRowCallback\": [],\n\n\t/**\n\t * Callback functions for the header on each draw.\n\t */\n\t\"aoHeaderCallback\": [],\n\n\t/**\n\t * Callback function for the footer on each draw.\n\t */\n\t\"aoFooterCallback\": [],\n\n\t/**\n\t * Array of callback functions for draw callback functions\n\t */\n\t\"aoDrawCallback\": [],\n\n\t/**\n\t * Array of callback functions for row created function\n\t */\n\t\"aoRowCreatedCallback\": [],\n\n\t/**\n\t * Callback functions for just before the table is redrawn. A return of\n\t * false will be used to cancel the draw.\n\t */\n\t\"aoPreDrawCallback\": [],\n\n\t/**\n\t * Callback functions for when the table has been initialised.\n\t */\n\t\"aoInitComplete\": [],\n\n\n\t/**\n\t * Callbacks for modifying the settings to be stored for state saving, prior to\n\t * saving state.\n\t */\n\t\"aoStateSaveParams\": [],\n\n\t/**\n\t * Callbacks for modifying the settings that have been stored for state saving\n\t * prior to using the stored values to restore the state.\n\t */\n\t\"aoStateLoadParams\": [],\n\n\t/**\n\t * Callbacks for operating on the settings object once the saved state has been\n\t * loaded\n\t */\n\t\"aoStateLoaded\": [],\n\n\t/**\n\t * Cache the table ID for quick access\n\t */\n\t\"sTableId\": \"\",\n\n\t/**\n\t * The TABLE node for the main table\n\t */\n\t\"nTable\": null,\n\n\t/**\n\t * Permanent ref to the thead element\n\t */\n\t\"nTHead\": null,\n\n\t/**\n\t * Permanent ref to the tfoot element - if it exists\n\t */\n\t\"nTFoot\": null,\n\n\t/**\n\t * Permanent ref to the tbody element\n\t */\n\t\"nTBody\": null,\n\n\t/**\n\t * Cache the wrapper node (contains all DataTables controlled elements)\n\t */\n\t\"nTableWrapper\": null,\n\n\t/**\n\t * Indicate if all required information has been read in\n\t */\n\t\"bInitialised\": false,\n\n\t/**\n\t * Information about open rows. Each object in the array has the parameters\n\t * 'nTr' and 'nParent'\n\t */\n\t\"aoOpenRows\": [],\n\n\t/**\n\t * Dictate the positioning of DataTables' control elements - see\n\t * {@link DataTable.model.oInit.sDom}.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"sDom\": null,\n\n\t/**\n\t * Search delay (in mS)\n\t */\n\t\"searchDelay\": null,\n\n\t/**\n\t * Which type of pagination should be used.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"sPaginationType\": \"two_button\",\n\n\t/**\n\t * Number of paging controls on the page. Only used for backwards compatibility\n\t */\n\tpagingControls: 0,\n\n\t/**\n\t * The state duration (for `stateSave`) in seconds.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"iStateDuration\": 0,\n\n\t/**\n\t * Array of callback functions for state saving. Each array element is an\n\t * object with the following parameters:\n\t *   <ul>\n\t *     <li>function:fn - function to call. Takes two parameters, oSettings\n\t *       and the JSON string to save that has been thus far created. Returns\n\t *       a JSON string to be inserted into a json object\n\t *       (i.e. '\"param\": [ 0, 1, 2]')</li>\n\t *     <li>string:sName - name of callback</li>\n\t *   </ul>\n\t */\n\t\"aoStateSave\": [],\n\n\t/**\n\t * Array of callback functions for state loading. Each array element is an\n\t * object with the following parameters:\n\t *   <ul>\n\t *     <li>function:fn - function to call. Takes two parameters, oSettings\n\t *       and the object stored. May return false to cancel state loading</li>\n\t *     <li>string:sName - name of callback</li>\n\t *   </ul>\n\t */\n\t\"aoStateLoad\": [],\n\n\t/**\n\t * State that was saved. Useful for back reference\n\t */\n\t\"oSavedState\": null,\n\n\t/**\n\t * State that was loaded. Useful for back reference\n\t */\n\t\"oLoadedState\": null,\n\n\t/**\n\t * Note if draw should be blocked while getting data\n\t */\n\t\"bAjaxDataGet\": true,\n\n\t/**\n\t * The last jQuery XHR object that was used for server-side data gathering.\n\t * This can be used for working with the XHR information in one of the\n\t * callbacks\n\t */\n\t\"jqXHR\": null,\n\n\t/**\n\t * JSON returned from the server in the last Ajax request\n\t */\n\t\"json\": undefined,\n\n\t/**\n\t * Data submitted as part of the last Ajax request\n\t */\n\t\"oAjaxData\": undefined,\n\n\t/**\n\t * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if\n\t * required).\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"sServerMethod\": null,\n\n\t/**\n\t * Format numbers for display.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"fnFormatNumber\": null,\n\n\t/**\n\t * List of options that can be used for the user selectable length menu.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"aLengthMenu\": null,\n\n\t/**\n\t * Counter for the draws that the table does. Also used as a tracker for\n\t * server-side processing\n\t */\n\t\"iDraw\": 0,\n\n\t/**\n\t * Indicate if a redraw is being done - useful for Ajax\n\t */\n\t\"bDrawing\": false,\n\n\t/**\n\t * Draw index (iDraw) of the last error when parsing the returned data\n\t */\n\t\"iDrawError\": -1,\n\n\t/**\n\t * Paging display length\n\t */\n\t\"_iDisplayLength\": 10,\n\n\t/**\n\t * Paging start point - aiDisplay index\n\t */\n\t\"_iDisplayStart\": 0,\n\n\t/**\n\t * Server-side processing - number of records in the result set\n\t * (i.e. before filtering), Use fnRecordsTotal rather than\n\t * this property to get the value of the number of records, regardless of\n\t * the server-side processing setting.\n\t */\n\t\"_iRecordsTotal\": 0,\n\n\t/**\n\t * Server-side processing - number of records in the current display set\n\t * (i.e. after filtering). Use fnRecordsDisplay rather than\n\t * this property to get the value of the number of records, regardless of\n\t * the server-side processing setting.\n\t */\n\t\"_iRecordsDisplay\": 0,\n\n\t/**\n\t * The classes to use for the table\n\t */\n\t\"oClasses\": {},\n\n\t/**\n\t * Flag attached to the settings object so you can check in the draw\n\t * callback if filtering has been done in the draw. Deprecated in favour of\n\t * events.\n\t *  @deprecated\n\t */\n\t\"bFiltered\": false,\n\n\t/**\n\t * Flag attached to the settings object so you can check in the draw\n\t * callback if sorting has been done in the draw. Deprecated in favour of\n\t * events.\n\t *  @deprecated\n\t */\n\t\"bSorted\": false,\n\n\t/**\n\t * Indicate that if multiple rows are in the header and there is more than\n\t * one unique cell per column, if the top one (true) or bottom one (false)\n\t * should be used for sorting / title by DataTables.\n\t * Note that this parameter will be set by the initialisation routine. To\n\t * set a default use {@link DataTable.defaults}.\n\t */\n\t\"bSortCellsTop\": null,\n\n\t/**\n\t * Initialisation object that is used for the table\n\t */\n\t\"oInit\": null,\n\n\t/**\n\t * Destroy callback functions - for plug-ins to attach themselves to the\n\t * destroy so they can clean up markup and events.\n\t */\n\t\"aoDestroyCallback\": [],\n\n\n\t/**\n\t * Get the number of records in the current record set, before filtering\n\t */\n\t\"fnRecordsTotal\": function ()\n\t{\n\t\treturn _fnDataSource( this ) == 'ssp' ?\n\t\t\tthis._iRecordsTotal * 1 :\n\t\t\tthis.aiDisplayMaster.length;\n\t},\n\n\t/**\n\t * Get the number of records in the current record set, after filtering\n\t */\n\t\"fnRecordsDisplay\": function ()\n\t{\n\t\treturn _fnDataSource( this ) == 'ssp' ?\n\t\t\tthis._iRecordsDisplay * 1 :\n\t\t\tthis.aiDisplay.length;\n\t},\n\n\t/**\n\t * Get the display end point - aiDisplay index\n\t */\n\t\"fnDisplayEnd\": function ()\n\t{\n\t\tvar\n\t\t\tlen      = this._iDisplayLength,\n\t\t\tstart    = this._iDisplayStart,\n\t\t\tcalc     = start + len,\n\t\t\trecords  = this.aiDisplay.length,\n\t\t\tfeatures = this.oFeatures,\n\t\t\tpaginate = features.bPaginate;\n\n\t\tif ( features.bServerSide ) {\n\t\t\treturn paginate === false || len === -1 ?\n\t\t\t\tstart + records :\n\t\t\t\tMath.min( start+len, this._iRecordsDisplay );\n\t\t}\n\t\telse {\n\t\t\treturn ! paginate || calc>records || len===-1 ?\n\t\t\t\trecords :\n\t\t\t\tcalc;\n\t\t}\n\t},\n\n\t/**\n\t * The DataTables object for this table\n\t */\n\t\"oInstance\": null,\n\n\t/**\n\t * Unique identifier for each instance of the DataTables object. If there\n\t * is an ID on the table node, then it takes that value, otherwise an\n\t * incrementing internal counter is used.\n\t */\n\t\"sInstance\": null,\n\n\t/**\n\t * tabindex attribute value that is added to DataTables control elements, allowing\n\t * keyboard navigation of the table and its controls.\n\t */\n\t\"iTabIndex\": 0,\n\n\t/**\n\t * DIV container for the footer scrolling table if scrolling\n\t */\n\t\"nScrollHead\": null,\n\n\t/**\n\t * DIV container for the footer scrolling table if scrolling\n\t */\n\t\"nScrollFoot\": null,\n\n\t/**\n\t * Last applied sort\n\t */\n\t\"aLastSort\": [],\n\n\t/**\n\t * Stored plug-in instances\n\t */\n\t\"oPlugins\": {},\n\n\t/**\n\t * Function used to get a row's id from the row's data\n\t */\n\t\"rowIdFn\": null,\n\n\t/**\n\t * Data location where to store a row's id\n\t */\n\t\"rowId\": null,\n\n\tcaption: '',\n\n\tcaptionNode: null,\n\n\tcolgroup: null,\n\n\t/** Delay loading of data */\n\tdeferLoading: null,\n\n\t/** Allow auto type detection */\n\ttypeDetect: true\n};\n\n/**\n * Extension object for DataTables that is used to provide all extension\n * options.\n *\n * Note that the `DataTable.ext` object is available through\n * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is\n * also aliased to `jQuery.fn.dataTableExt` for historic reasons.\n *  @namespace\n *  @extends DataTable.models.ext\n */\n\n\nvar extPagination = DataTable.ext.pager;\n\n// Paging buttons configuration\n$.extend( extPagination, {\n\tsimple: function () {\n\t\treturn [ 'previous', 'next' ];\n\t},\n\n\tfull: function () {\n\t\treturn [ 'first', 'previous', 'next', 'last' ];\n\t},\n\n\tnumbers: function () {\n\t\treturn [ 'numbers' ];\n\t},\n\n\tsimple_numbers: function () {\n\t\treturn [ 'previous', 'numbers', 'next' ];\n\t},\n\n\tfull_numbers: function () {\n\t\treturn [ 'first', 'previous', 'numbers', 'next', 'last' ];\n\t},\n\n\tfirst_last: function () {\n\t\treturn ['first', 'last'];\n\t},\n\n\tfirst_last_numbers: function () {\n\t\treturn ['first', 'numbers', 'last'];\n\t},\n\n\t// For testing and plug-ins to use\n\t_numbers: _pagingNumbers,\n\n\t// Number of number buttons - legacy, use `numbers` option for paging feature\n\tnumbers_length: 7\n} );\n\n\n$.extend( true, DataTable.ext.renderer, {\n\tpagingButton: {\n\t\t_: function (settings, buttonType, content, active, disabled) {\n\t\t\tvar classes = settings.oClasses.paging;\n\t\t\tvar btnClasses = [classes.button];\n\t\t\tvar btn;\n\n\t\t\tif (active) {\n\t\t\t\tbtnClasses.push(classes.active);\n\t\t\t}\n\n\t\t\tif (disabled) {\n\t\t\t\tbtnClasses.push(classes.disabled)\n\t\t\t}\n\n\t\t\tif (buttonType === 'ellipsis') {\n\t\t\t\tbtn = $('<span class=\"ellipsis\"></span>').html(content)[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbtn = $('<button>', {\n\t\t\t\t\tclass: btnClasses.join(' '),\n\t\t\t\t\trole: 'link',\n\t\t\t\t\ttype: 'button'\n\t\t\t\t}).html(content);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdisplay: btn,\n\t\t\t\tclicker: btn\n\t\t\t}\n\t\t}\n\t},\n\n\tpagingContainer: {\n\t\t_: function (settings, buttons) {\n\t\t\t// No wrapping element - just append directly to the host\n\t\t\treturn buttons;\n\t\t}\n\t}\n} );\n\n// Common function to remove new lines, strip HTML and diacritic control\nvar _filterString = function (stripHtml, normalize) {\n\treturn function (str) {\n\t\tif (_empty(str) || typeof str !== 'string') {\n\t\t\treturn str;\n\t\t}\n\n\t\tstr = str.replace( _re_new_lines, \" \" );\n\n\t\tif (stripHtml) {\n\t\t\tstr = _stripHtml(str);\n\t\t}\n\n\t\tif (normalize) {\n\t\t\tstr = _normalize(str, false);\n\t\t}\n\n\t\treturn str;\n\t};\n}\n\n/*\n * Public helper functions. These aren't used internally by DataTables, or\n * called by any of the options passed into DataTables, but they can be used\n * externally by developers working with DataTables. They are helper functions\n * to make working with DataTables a little bit easier.\n */\n\n/**\n * Common logic for moment, luxon or a date action.\n *\n * Happens after __mldObj, so don't need to call `resolveWindowsLibs` again\n */\nfunction __mld( dtLib, momentFn, luxonFn, dateFn, arg1 ) {\n\tif (__moment) {\n\t\treturn dtLib[momentFn]( arg1 );\n\t}\n\telse if (__luxon) {\n\t\treturn dtLib[luxonFn]( arg1 );\n\t}\n\t\n\treturn dateFn ? dtLib[dateFn]( arg1 ) : dtLib;\n}\n\n\nvar __mlWarning = false;\nvar __luxon; // Can be assigned in DateTeble.use()\nvar __moment; // Can be assigned in DateTeble.use()\n\n/**\n * \n */\nfunction resolveWindowLibs() {\n\tif (window.luxon && ! __luxon) {\n\t\t__luxon = window.luxon;\n\t}\n\t\n\tif (window.moment && ! __moment) {\n\t\t__moment = window.moment;\n\t}\n}\n\nfunction __mldObj (d, format, locale) {\n\tvar dt;\n\n\tresolveWindowLibs();\n\n\tif (__moment) {\n\t\tdt = __moment.utc( d, format, locale, true );\n\n\t\tif (! dt.isValid()) {\n\t\t\treturn null;\n\t\t}\n\t}\n\telse if (__luxon) {\n\t\tdt = format && typeof d === 'string'\n\t\t\t? __luxon.DateTime.fromFormat( d, format )\n\t\t\t: __luxon.DateTime.fromISO( d );\n\n\t\tif (! dt.isValid) {\n\t\t\treturn null;\n\t\t}\n\n\t\tdt.setLocale(locale);\n\t}\n\telse if (! format) {\n\t\t// No format given, must be ISO\n\t\tdt = new Date(d);\n\t}\n\telse {\n\t\tif (! __mlWarning) {\n\t\t\talert('DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17');\n\t\t}\n\n\t\t__mlWarning = true;\n\t}\n\n\treturn dt;\n}\n\n// Wrapper for date, datetime and time which all operate the same way with the exception of\n// the output string for auto locale support\nfunction __mlHelper (localeString) {\n\treturn function ( from, to, locale, def ) {\n\t\t// Luxon and Moment support\n\t\t// Argument shifting\n\t\tif ( arguments.length === 0 ) {\n\t\t\tlocale = 'en';\n\t\t\tto = null; // means toLocaleString\n\t\t\tfrom = null; // means iso8601\n\t\t}\n\t\telse if ( arguments.length === 1 ) {\n\t\t\tlocale = 'en';\n\t\t\tto = from;\n\t\t\tfrom = null;\n\t\t}\n\t\telse if ( arguments.length === 2 ) {\n\t\t\tlocale = to;\n\t\t\tto = from;\n\t\t\tfrom = null;\n\t\t}\n\n\t\tvar typeName = 'datetime' + (to ? '-' + to : '');\n\n\t\t// Add type detection and sorting specific to this date format - we need to be able to identify\n\t\t// date type columns as such, rather than as numbers in extensions. Hence the need for this.\n\t\tif (! DataTable.ext.type.order[typeName + '-pre']) {\n\t\t\tDataTable.type(typeName, {\n\t\t\t\tdetect: function (d) {\n\t\t\t\t\t// The renderer will give the value to type detect as the type!\n\t\t\t\t\treturn d === typeName ? typeName : false;\n\t\t\t\t},\n\t\t\t\torder: {\n\t\t\t\t\tpre: function (d) {\n\t\t\t\t\t\t// The renderer gives us Moment, Luxon or Date obects for the sorting, all of which have a\n\t\t\t\t\t\t// `valueOf` which gives milliseconds epoch\n\t\t\t\t\t\treturn d.valueOf();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tclassName: 'dt-right'\n\t\t\t});\n\t\t}\n\t\n\t\treturn function ( d, type ) {\n\t\t\t// Allow for a default value\n\t\t\tif (d === null || d === undefined) {\n\t\t\t\tif (def === '--now') {\n\t\t\t\t\t// We treat everything as UTC further down, so no changes are\n\t\t\t\t\t// made, as such need to get the local date / time as if it were\n\t\t\t\t\t// UTC\n\t\t\t\t\tvar local = new Date();\n\t\t\t\t\td = new Date( Date.UTC(\n\t\t\t\t\t\tlocal.getFullYear(), local.getMonth(), local.getDate(),\n\t\t\t\t\t\tlocal.getHours(), local.getMinutes(), local.getSeconds()\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\td = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (type === 'type') {\n\t\t\t\t// Typing uses the type name for fast matching\n\t\t\t\treturn typeName;\n\t\t\t}\n\n\t\t\tif (d === '') {\n\t\t\t\treturn type !== 'sort'\n\t\t\t\t\t? ''\n\t\t\t\t\t: __mldObj('0000-01-01 00:00:00', null, locale);\n\t\t\t}\n\n\t\t\t// Shortcut. If `from` and `to` are the same, we are using the renderer to\n\t\t\t// format for ordering, not display - its already in the display format.\n\t\t\tif ( to !== null && from === to && type !== 'sort' && type !== 'type' && ! (d instanceof Date) ) {\n\t\t\t\treturn d;\n\t\t\t}\n\n\t\t\tvar dt = __mldObj(d, from, locale);\n\n\t\t\tif (dt === null) {\n\t\t\t\treturn d;\n\t\t\t}\n\n\t\t\tif (type === 'sort') {\n\t\t\t\treturn dt;\n\t\t\t}\n\t\t\t\n\t\t\tvar formatted = to === null\n\t\t\t\t? __mld(dt, 'toDate', 'toJSDate', '')[localeString]()\n\t\t\t\t: __mld(dt, 'format', 'toFormat', 'toISOString', to);\n\n\t\t\t// XSS protection\n\t\t\treturn type === 'display' ?\n\t\t\t\t_escapeHtml( formatted ) :\n\t\t\t\tformatted;\n\t\t};\n\t}\n}\n\n// Based on locale, determine standard number formatting\n// Fallback for legacy browsers is US English\nvar __thousands = ',';\nvar __decimal = '.';\n\nif (window.Intl !== undefined) {\n\ttry {\n\t\tvar num = new Intl.NumberFormat().formatToParts(100000.1);\n\t\n\t\tfor (var i=0 ; i<num.length ; i++) {\n\t\t\tif (num[i].type === 'group') {\n\t\t\t\t__thousands = num[i].value;\n\t\t\t}\n\t\t\telse if (num[i].type === 'decimal') {\n\t\t\t\t__decimal = num[i].value;\n\t\t\t}\n\t\t}\n\t}\n\tcatch (e) {\n\t\t// noop\n\t}\n}\n\n// Formatted date time detection - use by declaring the formats you are going to use\nDataTable.datetime = function ( format, locale ) {\n\tvar typeName = 'datetime-' + format;\n\n\tif (! locale) {\n\t\tlocale = 'en';\n\t}\n\n\tif (! DataTable.ext.type.order[typeName]) {\n\t\tDataTable.type(typeName, {\n\t\t\tdetect: function (d) {\n\t\t\t\tvar dt = __mldObj(d, format, locale);\n\t\t\t\treturn d === '' || dt ? typeName : false;\n\t\t\t},\n\t\t\torder: {\n\t\t\t\tpre: function (d) {\n\t\t\t\t\treturn __mldObj(d, format, locale) || 0;\n\t\t\t\t}\n\t\t\t},\n\t\t\tclassName: 'dt-right'\n\t\t});\n\t}\n}\n\n/**\n * Helpers for `columns.render`.\n *\n * The options defined here can be used with the `columns.render` initialisation\n * option to provide a display renderer. The following functions are defined:\n *\n * * `moment` - Uses the MomentJS library to convert from a given format into another.\n * This renderer has three overloads:\n *   * 1 parameter:\n *     * `string` - Format to convert to (assumes input is ISO8601 and locale is `en`)\n *   * 2 parameters:\n *     * `string` - Format to convert from\n *     * `string` - Format to convert to. Assumes `en` locale\n *   * 3 parameters:\n *     * `string` - Format to convert from\n *     * `string` - Format to convert to\n *     * `string` - Locale\n * * `number` - Will format numeric data (defined by `columns.data`) for\n *   display, retaining the original unformatted data for sorting and filtering.\n *   It takes 5 parameters:\n *   * `string` - Thousands grouping separator\n *   * `string` - Decimal point indicator\n *   * `integer` - Number of decimal points to show\n *   * `string` (optional) - Prefix.\n *   * `string` (optional) - Postfix (/suffix).\n * * `text` - Escape HTML to help prevent XSS attacks. It has no optional\n *   parameters.\n *\n * @example\n *   // Column definition using the number renderer\n *   {\n *     data: \"salary\",\n *     render: $.fn.dataTable.render.number( '\\'', '.', 0, '$' )\n *   }\n *\n * @namespace\n */\nDataTable.render = {\n\tdate: __mlHelper('toLocaleDateString'),\n\tdatetime: __mlHelper('toLocaleString'),\n\ttime: __mlHelper('toLocaleTimeString'),\n\tnumber: function ( thousands, decimal, precision, prefix, postfix ) {\n\t\t// Auto locale detection\n\t\tif (thousands === null || thousands === undefined) {\n\t\t\tthousands = __thousands;\n\t\t}\n\n\t\tif (decimal === null || decimal === undefined) {\n\t\t\tdecimal = __decimal;\n\t\t}\n\n\t\treturn {\n\t\t\tdisplay: function ( d ) {\n\t\t\t\tif ( typeof d !== 'number' && typeof d !== 'string' ) {\n\t\t\t\t\treturn d;\n\t\t\t\t}\n\n\t\t\t\tif (d === '' || d === null) {\n\t\t\t\t\treturn d;\n\t\t\t\t}\n\n\t\t\t\tvar negative = d < 0 ? '-' : '';\n\t\t\t\tvar flo = parseFloat( d );\n\t\t\t\tvar abs = Math.abs(flo);\n\n\t\t\t\t// Scientific notation for large and small numbers\n\t\t\t\tif (abs >= 100000000000 || (abs < 0.0001 && abs !== 0) ) {\n\t\t\t\t\tvar exp = flo.toExponential(precision).split(/e\\+?/);\n\t\t\t\t\treturn exp[0] + ' x 10<sup>' + exp[1] + '</sup>';\n\t\t\t\t}\n\n\t\t\t\t// If NaN then there isn't much formatting that we can do - just\n\t\t\t\t// return immediately, escaping any HTML (this was supposed to\n\t\t\t\t// be a number after all)\n\t\t\t\tif ( isNaN( flo ) ) {\n\t\t\t\t\treturn _escapeHtml( d );\n\t\t\t\t}\n\n\t\t\t\tflo = flo.toFixed( precision );\n\t\t\t\td = Math.abs( flo );\n\n\t\t\t\tvar intPart = parseInt( d, 10 );\n\t\t\t\tvar floatPart = precision ?\n\t\t\t\t\tdecimal+(d - intPart).toFixed( precision ).substring( 2 ):\n\t\t\t\t\t'';\n\n\t\t\t\t// If zero, then can't have a negative prefix\n\t\t\t\tif (intPart === 0 && parseFloat(floatPart) === 0) {\n\t\t\t\t\tnegative = '';\n\t\t\t\t}\n\n\t\t\t\treturn negative + (prefix||'') +\n\t\t\t\t\tintPart.toString().replace(\n\t\t\t\t\t\t/\\B(?=(\\d{3})+(?!\\d))/g, thousands\n\t\t\t\t\t) +\n\t\t\t\t\tfloatPart +\n\t\t\t\t\t(postfix||'');\n\t\t\t}\n\t\t};\n\t},\n\n\ttext: function () {\n\t\treturn {\n\t\t\tdisplay: _escapeHtml,\n\t\t\tfilter: _escapeHtml\n\t\t};\n\t}\n};\n\n\nvar _extTypes = DataTable.ext.type;\n\n// Get / set type\nDataTable.type = function (name, prop, val) {\n\tif (! prop) {\n\t\treturn {\n\t\t\tclassName: _extTypes.className[name],\n\t\t\tdetect: _extTypes.detect.find(function (fn) {\n\t\t\t\treturn fn._name === name;\n\t\t\t}),\n\t\t\torder: {\n\t\t\t\tpre: _extTypes.order[name + '-pre'],\n\t\t\t\tasc: _extTypes.order[name + '-asc'],\n\t\t\t\tdesc: _extTypes.order[name + '-desc']\n\t\t\t},\n\t\t\trender: _extTypes.render[name],\n\t\t\tsearch: _extTypes.search[name]\n\t\t};\n\t}\n\n\tvar setProp = function(prop, propVal) {\n\t\t_extTypes[prop][name] = propVal;\n\t};\n\tvar setDetect = function (detect) {\n\t\t// `detect` can be a function or an object - we set a name\n\t\t// property for either - that is used for the detection\n\t\tObject.defineProperty(detect, \"_name\", {value: name});\n\n\t\tvar idx = _extTypes.detect.findIndex(function (item) {\n\t\t\treturn item._name === name;\n\t\t});\n\n\t\tif (idx === -1) {\n\t\t\t_extTypes.detect.unshift(detect);\n\t\t}\n\t\telse {\n\t\t\t_extTypes.detect.splice(idx, 1, detect);\n\t\t}\n\t};\n\tvar setOrder = function (obj) {\n\t\t_extTypes.order[name + '-pre'] = obj.pre; // can be undefined\n\t\t_extTypes.order[name + '-asc'] = obj.asc; // can be undefined\n\t\t_extTypes.order[name + '-desc'] = obj.desc; // can be undefined\n\t};\n\n\t// prop is optional\n\tif (val === undefined) {\n\t\tval = prop;\n\t\tprop = null;\n\t}\n\n\tif (prop === 'className') {\n\t\tsetProp('className', val);\n\t}\n\telse if (prop === 'detect') {\n\t\tsetDetect(val);\n\t}\n\telse if (prop === 'order') {\n\t\tsetOrder(val);\n\t}\n\telse if (prop === 'render') {\n\t\tsetProp('render', val);\n\t}\n\telse if (prop === 'search') {\n\t\tsetProp('search', val);\n\t}\n\telse if (! prop) {\n\t\tif (val.className) {\n\t\t\tsetProp('className', val.className);\n\t\t}\n\n\t\tif (val.detect !== undefined) {\n\t\t\tsetDetect(val.detect);\n\t\t}\n\n\t\tif (val.order) {\n\t\t\tsetOrder(val.order);\n\t\t}\n\n\t\tif (val.render !== undefined) {\n\t\t\tsetProp('render', val.render);\n\t\t}\n\n\t\tif (val.search !== undefined) {\n\t\t\tsetProp('search', val.search);\n\t\t}\n\t}\n}\n\n// Get a list of types\nDataTable.types = function () {\n\treturn _extTypes.detect.map(function (fn) {\n\t\treturn fn._name;\n\t});\n};\n\nvar __diacriticSort = function (a, b) {\n\ta = a !== null && a !== undefined ? a.toString().toLowerCase() : '';\n\tb = b !== null && b !== undefined ? b.toString().toLowerCase() : '';\n\n\t// Checked for `navigator.languages` support in `oneOf` so this code can't execute in old\n\t// Safari and thus can disable this check\n\t// eslint-disable-next-line compat/compat\n\treturn a.localeCompare(b, navigator.languages[0] || navigator.language, {\n\t\tnumeric: true,\n\t\tignorePunctuation: true,\n\t});\n}\n\n//\n// Built in data types\n//\n\nDataTable.type('string', {\n\tdetect: function () {\n\t\treturn 'string';\n\t},\n\torder: {\n\t\tpre: function ( a ) {\n\t\t\t// This is a little complex, but faster than always calling toString,\n\t\t\t// http://jsperf.com/tostring-v-check\n\t\t\treturn _empty(a) && typeof a !== 'boolean' ?\n\t\t\t\t'' :\n\t\t\t\ttypeof a === 'string' ?\n\t\t\t\t\ta.toLowerCase() :\n\t\t\t\t\t! a.toString ?\n\t\t\t\t\t\t'' :\n\t\t\t\t\t\ta.toString();\n\t\t}\n\t},\n\tsearch: _filterString(false, true)\n});\n\nDataTable.type('string-utf8', {\n\tdetect: {\n\t\tallOf: function ( d ) {\n\t\t\treturn true;\n\t\t},\n\t\toneOf: function ( d ) {\n\t\t\t// At least one data point must contain a non-ASCII character\n\t\t\t// This line will also check if navigator.languages is supported or not. If not (Safari 10.0-)\n\t\t\t// this data type won't be supported.\n\t\t\t// eslint-disable-next-line compat/compat\n\t\t\treturn ! _empty( d ) && navigator.languages && typeof d === 'string' && d.match(/[^\\x00-\\x7F]/);\n\t\t}\n\t},\n\torder: {\n\t\tasc: __diacriticSort,\n\t\tdesc: function (a, b) {\n\t\t\treturn __diacriticSort(a, b) * -1;\n\t\t}\n\t},\n\tsearch: _filterString(false, true)\n});\n\n\nDataTable.type('html', {\n\tdetect: {\n\t\tallOf: function ( d ) {\n\t\t\treturn _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1);\n\t\t},\n\t\toneOf: function ( d ) {\n\t\t\t// At least one data point must contain a `<`\n\t\t\treturn ! _empty( d ) && typeof d === 'string' && d.indexOf('<') !== -1;\n\t\t}\n\t},\n\torder: {\n\t\tpre: function ( a ) {\n\t\t\treturn _empty(a) ?\n\t\t\t\t'' :\n\t\t\t\ta.replace ?\n\t\t\t\t\t_stripHtml(a).trim().toLowerCase() :\n\t\t\t\t\ta+'';\n\t\t}\n\t},\n\tsearch: _filterString(true, true)\n});\n\n\nDataTable.type('date', {\n\tclassName: 'dt-type-date',\n\tdetect: {\n\t\tallOf: function ( d ) {\n\t\t\t// V8 tries _very_ hard to make a string passed into `Date.parse()`\n\t\t\t// valid, so we need to use a regex to restrict date formats. Use a\n\t\t\t// plug-in for anything other than ISO8601 style strings\n\t\t\tif ( d && !(d instanceof Date) && ! _re_date.test(d) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tvar parsed = Date.parse(d);\n\t\t\treturn (parsed !== null && !isNaN(parsed)) || _empty(d);\n\t\t},\n\t\toneOf: function ( d ) {\n\t\t\t// At least one entry must be a date or a string with a date\n\t\t\treturn (d instanceof Date) || (typeof d === 'string' && _re_date.test(d));\n\t\t}\n\t},\n\torder: {\n\t\tpre: function ( d ) {\n\t\t\tvar ts = Date.parse( d );\n\t\t\treturn isNaN(ts) ? -Infinity : ts;\n\t\t}\n\t}\n});\n\n\nDataTable.type('html-num-fmt', {\n\tclassName: 'dt-type-numeric',\n\tdetect: {\n\t\tallOf: function ( d, settings ) {\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal, true, false );\n\t\t},\n\t\toneOf: function (d, settings) {\n\t\t\t// At least one data point must contain a numeric value\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal, true, false );\n\t\t}\n\t},\n\torder: {\n\t\tpre: function ( d, s ) {\n\t\t\tvar dp = s.oLanguage.sDecimal;\n\t\t\treturn __numericReplace( d, dp, _re_html, _re_formatted_numeric );\n\t\t}\n\t},\n\tsearch: _filterString(true, true)\n});\n\n\nDataTable.type('html-num', {\n\tclassName: 'dt-type-numeric',\n\tdetect: {\n\t\tallOf: function ( d, settings ) {\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal, false, true );\n\t\t},\n\t\toneOf: function (d, settings) {\n\t\t\t// At least one data point must contain a numeric value\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal, false, false );\n\t\t}\n\t},\n\torder: {\n\t\tpre: function ( d, s ) {\n\t\t\tvar dp = s.oLanguage.sDecimal;\n\t\t\treturn __numericReplace( d, dp, _re_html );\n\t\t}\n\t},\n\tsearch: _filterString(true, true)\n});\n\n\nDataTable.type('num-fmt', {\n\tclassName: 'dt-type-numeric',\n\tdetect: {\n\t\tallOf: function ( d, settings ) {\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal, true, true );\n\t\t},\n\t\toneOf: function (d, settings) {\n\t\t\t// At least one data point must contain a numeric value\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal, true, false );\n\t\t}\n\t},\n\torder: {\n\t\tpre: function ( d, s ) {\n\t\t\tvar dp = s.oLanguage.sDecimal;\n\t\t\treturn __numericReplace( d, dp, _re_formatted_numeric );\n\t\t}\n\t}\n});\n\n\nDataTable.type('num', {\n\tclassName: 'dt-type-numeric',\n\tdetect: {\n\t\tallOf: function ( d, settings ) {\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal, false, true );\n\t\t},\n\t\toneOf: function (d, settings) {\n\t\t\t// At least one data point must contain a numeric value\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal, false, false );\n\t\t}\n\t},\n\torder: {\n\t\tpre: function (d, s) {\n\t\t\tvar dp = s.oLanguage.sDecimal;\n\t\t\treturn __numericReplace( d, dp );\n\t\t}\n\t}\n});\n\n\n\n\nvar __numericReplace = function ( d, decimalPlace, re1, re2 ) {\n\tif ( d !== 0 && (!d || d === '-') ) {\n\t\treturn -Infinity;\n\t}\n\t\n\tvar type = typeof d;\n\n\tif (type === 'number' || type === 'bigint') {\n\t\treturn d;\n\t}\n\n\t// If a decimal place other than `.` is used, it needs to be given to the\n\t// function so we can detect it and replace with a `.` which is the only\n\t// decimal place Javascript recognises - it is not locale aware.\n\tif ( decimalPlace ) {\n\t\td = _numToDecimal( d, decimalPlace );\n\t}\n\n\tif ( d.replace ) {\n\t\tif ( re1 ) {\n\t\t\td = d.replace( re1, '' );\n\t\t}\n\n\t\tif ( re2 ) {\n\t\t\td = d.replace( re2, '' );\n\t\t}\n\t}\n\n\treturn d * 1;\n};\n\n\n$.extend( true, DataTable.ext.renderer, {\n\tfooter: {\n\t\t_: function ( settings, cell, classes ) {\n\t\t\tcell.addClass(classes.tfoot.cell);\n\t\t}\n\t},\n\n\theader: {\n\t\t_: function ( settings, cell, classes ) {\n\t\t\tcell.addClass(classes.thead.cell);\n\n\t\t\tif (! settings.oFeatures.bSort) {\n\t\t\t\tcell.addClass(classes.order.none);\n\t\t\t}\n\n\t\t\tvar legacyTop = settings.bSortCellsTop;\n\t\t\tvar headerRows = cell.closest('thead').find('tr');\n\t\t\tvar rowIdx = cell.parent().index();\n\n\t\t\t// Conditions to not apply the ordering icons\n\t\t\tif (\n\t\t\t\t// Cells and rows which have the attribute to disable the icons\n\t\t\t\tcell.attr('data-dt-order') === 'disable' ||\n\t\t\t\tcell.parent().attr('data-dt-order') === 'disable' ||\n\n\t\t\t\t// Legacy support for `orderCellsTop`. If it is set, then cells\n\t\t\t\t// which are not in the top or bottom row of the header (depending\n\t\t\t\t// on the value) do not get the sorting classes applied to them\n\t\t\t\t(legacyTop === true && rowIdx !== 0) ||\n\t\t\t\t(legacyTop === false && rowIdx !== headerRows.length - 1)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// No additional mark-up required\n\t\t\t// Attach a sort listener to update on sort - note that using the\n\t\t\t// `DT` namespace will allow the event to be removed automatically\n\t\t\t// on destroy, while the `dt` namespaced event is the one we are\n\t\t\t// listening for\n\t\t\t$(settings.nTable).on( 'order.dt.DT column-visibility.dt.DT', function ( e, ctx ) {\n\t\t\t\tif ( settings !== ctx ) { // need to check this this is the host\n\t\t\t\t\treturn;               // table, not a nested one\n\t\t\t\t}\n\n\t\t\t\tvar sorting = ctx.sortDetails;\n\n\t\t\t\tif (! sorting) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar i;\n\t\t\t\tvar orderClasses = classes.order;\n\t\t\t\tvar columns = ctx.api.columns( cell );\n\t\t\t\tvar col = settings.aoColumns[columns.flatten()[0]];\n\t\t\t\tvar orderable = columns.orderable().includes(true);\n\t\t\t\tvar ariaType = '';\n\t\t\t\tvar indexes = columns.indexes();\n\t\t\t\tvar sortDirs = columns.orderable(true).flatten();\n\t\t\t\tvar orderedColumns = _pluck(sorting, 'col');\n\n\t\t\t\tcell\n\t\t\t\t\t.removeClass(\n\t\t\t\t\t\torderClasses.isAsc +' '+\n\t\t\t\t\t\torderClasses.isDesc\n\t\t\t\t\t)\n\t\t\t\t\t.toggleClass( orderClasses.none, ! orderable )\n\t\t\t\t\t.toggleClass( orderClasses.canAsc, orderable && sortDirs.includes('asc') )\n\t\t\t\t\t.toggleClass( orderClasses.canDesc, orderable && sortDirs.includes('desc') );\n\n\t\t\t\t// Determine if all of the columns that this cell covers are included in the\n\t\t\t\t// current ordering\n\t\t\t\tvar isOrdering = true;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<indexes.length; i++) {\n\t\t\t\t\tif (! orderedColumns.includes(indexes[i])) {\n\t\t\t\t\t\tisOrdering = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isOrdering ) {\n\t\t\t\t\t// Get the ordering direction for the columns under this cell\n\t\t\t\t\t// Note that it is possible for a cell to be asc and desc sorting\n\t\t\t\t\t// (column spanning cells)\n\t\t\t\t\tvar orderDirs = columns.order();\n\n\t\t\t\t\tcell.addClass(\n\t\t\t\t\t\torderDirs.includes('asc') ? orderClasses.isAsc : '' +\n\t\t\t\t\t\torderDirs.includes('desc') ? orderClasses.isDesc : ''\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Find the first visible column that has ordering applied to it - it get's\n\t\t\t\t// the aria information, as the ARIA spec says that only one column should\n\t\t\t\t// be marked with aria-sort\n\t\t\t\tvar firstVis = -1; // column index\n\n\t\t\t\tfor (i=0; i<orderedColumns.length; i++) {\n\t\t\t\t\tif (settings.aoColumns[orderedColumns[i]].bVisible) {\n\t\t\t\t\t\tfirstVis = orderedColumns[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (indexes[0] == firstVis) {\n\t\t\t\t\tvar firstSort = sorting[0];\n\t\t\t\t\tvar sortOrder = col.asSorting;\n\n\t\t\t\t\tcell.attr('aria-sort', firstSort.dir === 'asc' ? 'ascending' : 'descending');\n\n\t\t\t\t\t// Determine if the next click will remove sorting or change the sort\n\t\t\t\t\tariaType = ! sortOrder[firstSort.index + 1] ? 'Remove' : 'Reverse';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcell.removeAttr('aria-sort');\n\t\t\t\t}\n\n\t\t\t\tcell.attr('aria-label', orderable\n\t\t\t\t\t? col.ariaTitle + ctx.api.i18n('oAria.orderable' + ariaType)\n\t\t\t\t\t: col.ariaTitle\n\t\t\t\t);\n\n\t\t\t\t// Make the headers tab-able for keyboard navigation\n\t\t\t\tif (orderable) {\n\t\t\t\t\tcell.find('.dt-column-title').attr('role', 'button');\n\t\t\t\t\tcell.attr('tabindex', 0)\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t},\n\n\tlayout: {\n\t\t_: function ( settings, container, items ) {\n\t\t\tvar classes = settings.oClasses.layout;\n\t\t\tvar row = $('<div/>')\n\t\t\t\t.attr('id', items.id || null)\n\t\t\t\t.addClass(items.className || classes.row)\n\t\t\t\t.appendTo( container );\n\n\t\t\t$.each( items, function (key, val) {\n\t\t\t\tif (key === 'id' || key === 'className') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar klass = '';\n\n\t\t\t\tif (val.table) {\n\t\t\t\t\trow.addClass(classes.tableRow);\n\t\t\t\t\tklass += classes.tableCell + ' ';\n\t\t\t\t}\n\n\t\t\t\tif (key === 'start') {\n\t\t\t\t\tklass += classes.start;\n\t\t\t\t}\n\t\t\t\telse if (key === 'end') {\n\t\t\t\t\tklass += classes.end;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tklass += classes.full;\n\t\t\t\t}\n\n\t\t\t\t$('<div/>')\n\t\t\t\t\t.attr({\n\t\t\t\t\t\tid: val.id || null,\n\t\t\t\t\t\t\"class\": val.className\n\t\t\t\t\t\t\t? val.className\n\t\t\t\t\t\t\t: classes.cell + ' ' + klass\n\t\t\t\t\t})\n\t\t\t\t\t.append( val.contents )\n\t\t\t\t\t.appendTo( row );\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n\nDataTable.feature = {};\n\n// Third parameter is internal only!\nDataTable.feature.register = function ( name, cb, legacy ) {\n\tDataTable.ext.features[ name ] = cb;\n\n\tif (legacy) {\n\t\t_ext.feature.push({\n\t\t\tcFeature: legacy,\n\t\t\tfnInit: cb\n\t\t});\n\t}\n};\n\nfunction _divProp(el, prop, val) {\n\tif (val) {\n\t\tel[prop] = val;\n\t}\n}\n\nDataTable.feature.register( 'div', function ( settings, opts ) {\n\tvar n = $('<div>')[0];\n\n\tif (opts) {\n\t\t_divProp(n, 'className', opts.className);\n\t\t_divProp(n, 'id', opts.id);\n\t\t_divProp(n, 'innerHTML', opts.html);\n\t\t_divProp(n, 'textContent', opts.text);\n\t}\n\n\treturn n;\n} );\n\nDataTable.feature.register( 'info', function ( settings, opts ) {\n\t// For compatibility with the legacy `info` top level option\n\tif (! settings.oFeatures.bInfo) {\n\t\treturn null;\n\t}\n\n\tvar\n\t\tlang  = settings.oLanguage,\n\t\ttid = settings.sTableId,\n\t\tn = $('<div/>', {\n\t\t\t'class': settings.oClasses.info.container,\n\t\t} );\n\n\topts = $.extend({\n\t\tcallback: lang.fnInfoCallback,\n\t\tempty: lang.sInfoEmpty,\n\t\tpostfix: lang.sInfoPostFix,\n\t\tsearch: lang.sInfoFiltered,\n\t\ttext: lang.sInfo,\n\t}, opts);\n\n\n\t// Update display on each draw\n\tsettings.aoDrawCallback.push(function (s) {\n\t\t_fnUpdateInfo(s, opts, n);\n\t});\n\n\t// For the first info display in the table, we add a callback and aria information.\n\tif (! settings._infoEl) {\n\t\tn.attr({\n\t\t\t'aria-live': 'polite',\n\t\t\tid: tid+'_info',\n\t\t\trole: 'status'\n\t\t});\n\n\t\t// Table is described by our info div\n\t\t$(settings.nTable).attr( 'aria-describedby', tid+'_info' );\n\n\t\tsettings._infoEl = n;\n\t}\n\n\treturn n;\n}, 'i' );\n\n/**\n * Update the information elements in the display\n *  @param {object} settings dataTables settings object\n *  @memberof DataTable#oApi\n */\nfunction _fnUpdateInfo ( settings, opts, node )\n{\n\tvar\n\t\tstart = settings._iDisplayStart+1,\n\t\tend   = settings.fnDisplayEnd(),\n\t\tmax   = settings.fnRecordsTotal(),\n\t\ttotal = settings.fnRecordsDisplay(),\n\t\tout   = total\n\t\t\t? opts.text\n\t\t\t: opts.empty;\n\n\tif ( total !== max ) {\n\t\t// Record set after filtering\n\t\tout += ' ' + opts.search;\n\t}\n\n\t// Convert the macros\n\tout += opts.postfix;\n\tout = _fnMacros( settings, out );\n\n\tif ( opts.callback ) {\n\t\tout = opts.callback.call( settings.oInstance,\n\t\t\tsettings, start, end, max, total, out\n\t\t);\n\t}\n\n\tnode.html( out );\n\n\t_fnCallbackFire(settings, null, 'info', [settings, node[0], out]);\n}\n\nvar __searchCounter = 0;\n\n// opts\n// - text\n// - placeholder\nDataTable.feature.register( 'search', function ( settings, opts ) {\n\t// Don't show the input if filtering isn't available on the table\n\tif (! settings.oFeatures.bFilter) {\n\t\treturn null;\n\t}\n\n\tvar classes = settings.oClasses.search;\n\tvar tableId = settings.sTableId;\n\tvar language = settings.oLanguage;\n\tvar previousSearch = settings.oPreviousSearch;\n\tvar input = '<input type=\"search\" class=\"'+classes.input+'\"/>';\n\n\topts = $.extend({\n\t\tplaceholder: language.sSearchPlaceholder,\n\t\tprocessing: false,\n\t\ttext: language.sSearch\n\t}, opts);\n\n\t// The _INPUT_ is optional - is appended if not present\n\tif (opts.text.indexOf('_INPUT_') === -1) {\n\t\topts.text += '_INPUT_';\n\t}\n\n\topts.text = _fnMacros(settings, opts.text);\n\n\t// We can put the <input> outside of the label if it is at the start or end\n\t// which helps improve accessability (not all screen readers like implicit\n\t// for elements).\n\tvar end = opts.text.match(/_INPUT_$/);\n\tvar start = opts.text.match(/^_INPUT_/);\n\tvar removed = opts.text.replace(/_INPUT_/, '');\n\tvar str = '<label>' + opts.text + '</label>';\n\n\tif (start) {\n\t\tstr = '_INPUT_<label>' + removed + '</label>';\n\t}\n\telse if (end) {\n\t\tstr = '<label>' + removed + '</label>_INPUT_';\n\t}\n\n\tvar filter = $('<div>')\n\t\t.addClass(classes.container)\n\t\t.append(str.replace(/_INPUT_/, input));\n\n\t// add for and id to label and input\n\tfilter.find('label').attr('for', 'dt-search-' + __searchCounter);\n\tfilter.find('input').attr('id', 'dt-search-' + __searchCounter);\n\t__searchCounter++;\n\n\tvar searchFn = function(event) {\n\t\tvar val = this.value;\n\n\t\tif(previousSearch.return && event.key !== \"Enter\") {\n\t\t\treturn;\n\t\t}\n\n\t\t/* Now do the filter */\n\t\tif ( val != previousSearch.search ) {\n\t\t\t_fnProcessingRun(settings, opts.processing, function () {\n\t\t\t\tpreviousSearch.search = val;\n\t\t\n\t\t\t\t_fnFilterComplete( settings, previousSearch );\n\t\t\n\t\t\t\t// Need to redraw, without resorting\n\t\t\t\tsettings._iDisplayStart = 0;\n\t\t\t\t_fnDraw( settings );\n\t\t\t});\n\t\t}\n\t};\n\n\tvar searchDelay = settings.searchDelay !== null ?\n\t\tsettings.searchDelay :\n\t\t0;\n\n\tvar jqFilter = $('input', filter)\n\t\t.val( previousSearch.search )\n\t\t.attr( 'placeholder', opts.placeholder )\n\t\t.on(\n\t\t\t'keyup.DT search.DT input.DT paste.DT cut.DT',\n\t\t\tsearchDelay ?\n\t\t\t\tDataTable.util.debounce( searchFn, searchDelay ) :\n\t\t\t\tsearchFn\n\t\t)\n\t\t.on( 'mouseup.DT', function(e) {\n\t\t\t// Edge fix! Edge 17 does not trigger anything other than mouse events when clicking\n\t\t\t// on the clear icon (Edge bug 17584515). This is safe in other browsers as `searchFn`\n\t\t\t// checks the value to see if it has changed. In other browsers it won't have.\n\t\t\tsetTimeout( function () {\n\t\t\t\tsearchFn.call(jqFilter[0], e);\n\t\t\t}, 10);\n\t\t} )\n\t\t.on( 'keypress.DT', function(e) {\n\t\t\t/* Prevent form submission */\n\t\t\tif ( e.keyCode == 13 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} )\n\t\t.attr('aria-controls', tableId);\n\n\t// Update the input elements whenever the table is filtered\n\t$(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {\n\t\tif ( settings === s && jqFilter[0] !== document.activeElement ) {\n\t\t\tjqFilter.val( typeof previousSearch.search !== 'function'\n\t\t\t\t? previousSearch.search\n\t\t\t\t: ''\n\t\t\t);\n\t\t}\n\t} );\n\n\treturn filter;\n}, 'f' );\n\n// opts\n// - type - button configuration\n// - buttons - number of buttons to show - must be odd\nDataTable.feature.register( 'paging', function ( settings, opts ) {\n\t// Don't show the paging input if the table doesn't have paging enabled\n\tif (! settings.oFeatures.bPaginate) {\n\t\treturn null;\n\t}\n\n\topts = $.extend({\n\t\tbuttons: DataTable.ext.pager.numbers_length,\n\t\ttype: settings.sPaginationType,\n\t\tboundaryNumbers: true,\n\t\tfirstLast: true,\n\t\tpreviousNext: true,\n\t\tnumbers: true\n\t}, opts);\n\n\tvar host = $('<div/>')\n\t\t.addClass(settings.oClasses.paging.container + (opts.type ? ' paging_' + opts.type : ''))\n\t\t.append(\n\t\t\t$('<nav>')\n\t\t\t\t.attr('aria-label', 'pagination')\n\t\t\t\t.addClass(settings.oClasses.paging.nav)\n\t\t);\n\tvar draw = function () {\n\t\t_pagingDraw(settings, host.children(), opts);\n\t};\n\n\tsettings.aoDrawCallback.push(draw);\n\n\t// Responsive redraw of paging control\n\t$(settings.nTable).on('column-sizing.dt.DT', draw);\n\n\treturn host;\n}, 'p' );\n\n/**\n * Dynamically create the button type array based on the configuration options.\n * This will only happen if the paging type is not defined.\n */\nfunction _pagingDynamic(opts) {\n\tvar out = [];\n\n\tif (opts.numbers) {\n\t\tout.push('numbers');\n\t}\n\n\tif (opts.previousNext) {\n\t\tout.unshift('previous');\n\t\tout.push('next');\n\t}\n\n\tif (opts.firstLast) {\n\t\tout.unshift('first');\n\t\tout.push('last');\n\t}\n\n\treturn out;\n}\n\nfunction _pagingDraw(settings, host, opts) {\n\tif (! settings._bInitComplete) {\n\t\treturn;\n\t}\n\n\tvar\n\t\tplugin = opts.type\n\t\t\t? DataTable.ext.pager[ opts.type ]\n\t\t\t: _pagingDynamic,\n\t\taria = settings.oLanguage.oAria.paginate || {},\n\t\tstart      = settings._iDisplayStart,\n\t\tlen        = settings._iDisplayLength,\n\t\tvisRecords = settings.fnRecordsDisplay(),\n\t\tall        = len === -1,\n\t\tpage = all ? 0 : Math.ceil( start / len ),\n\t\tpages = all ? 1 : Math.ceil( visRecords / len ),\n\t\tbuttons = [],\n\t\tbuttonEls = [],\n\t\tbuttonsNested = plugin(opts)\n\t\t\t.map(function (val) {\n\t\t\t\treturn val === 'numbers'\n\t\t\t\t\t? _pagingNumbers(page, pages, opts.buttons, opts.boundaryNumbers)\n\t\t\t\t\t: val;\n\t\t\t});\n\n\t// .flat() would be better, but not supported in old Safari\n\tbuttons = buttons.concat.apply(buttons, buttonsNested);\n\n\tfor (var i=0 ; i<buttons.length ; i++) {\n\t\tvar button = buttons[i];\n\n\t\tvar btnInfo = _pagingButtonInfo(settings, button, page, pages);\n\t\tvar btn = _fnRenderer( settings, 'pagingButton' )(\n\t\t\tsettings,\n\t\t\tbutton,\n\t\t\tbtnInfo.display,\n\t\t\tbtnInfo.active,\n\t\t\tbtnInfo.disabled\n\t\t);\n\n\t\tvar ariaLabel = typeof button === 'string'\n\t\t\t? aria[ button ]\n\t\t\t: aria.number\n\t\t\t\t? aria.number + (button+1)\n\t\t\t\t: null;\n\n\t\t// Common attributes\n\t\t$(btn.clicker).attr({\n\t\t\t'aria-controls': settings.sTableId,\n\t\t\t'aria-disabled': btnInfo.disabled ? 'true' : null,\n\t\t\t'aria-current': btnInfo.active ? 'page' : null,\n\t\t\t'aria-label': ariaLabel,\n\t\t\t'data-dt-idx': button,\n\t\t\t'tabIndex': btnInfo.disabled\n\t\t\t\t? -1\n\t\t\t\t: settings.iTabIndex\n\t\t\t\t\t? settings.iTabIndex\n\t\t\t\t\t: null, // `0` doesn't need a tabIndex since it is the default\n\t\t});\n\n\t\tif (typeof button !== 'number') {\n\t\t\t$(btn.clicker).addClass(button);\n\t\t}\n\n\t\t_fnBindAction(\n\t\t\tbtn.clicker, {action: button}, function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t_fnPageChange( settings, e.data.action, true );\n\t\t\t}\n\t\t);\n\n\t\tbuttonEls.push(btn.display);\n\t}\n\n\tvar wrapped = _fnRenderer(settings, 'pagingContainer')(\n\t\tsettings, buttonEls\n\t);\n\n\tvar activeEl = host.find(document.activeElement).data('dt-idx');\n\n\thost.empty().append(wrapped);\n\n\tif ( activeEl !== undefined ) {\n\t\thost.find( '[data-dt-idx='+activeEl+']' ).trigger('focus');\n\t}\n\n\t// Responsive - check if the buttons are over two lines based on the\n\t// height of the buttons and the container.\n\tif (\n\t\tbuttonEls.length && // any buttons\n\t\topts.buttons > 1 && // prevent infinite\n\t\t$(host).height() >= ($(buttonEls[0]).outerHeight() * 2) - 10\n\t) {\n\t\t_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));\n\t}\n}\n\n/**\n * Get properties for a button based on the current paging state of the table\n *\n * @param {*} settings DT settings object\n * @param {*} button The button type in question\n * @param {*} page Table's current page\n * @param {*} pages Number of pages\n * @returns Info object\n */\nfunction _pagingButtonInfo(settings, button, page, pages) {\n\tvar lang = settings.oLanguage.oPaginate;\n\tvar o = {\n\t\tdisplay: '',\n\t\tactive: false,\n\t\tdisabled: false\n\t};\n\n\tswitch ( button ) {\n\t\tcase 'ellipsis':\n\t\t\to.display = '&#x2026;';\n\t\t\to.disabled = true;\n\t\t\tbreak;\n\n\t\tcase 'first':\n\t\t\to.display = lang.sFirst;\n\n\t\t\tif (page === 0) {\n\t\t\t\to.disabled = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'previous':\n\t\t\to.display = lang.sPrevious;\n\n\t\t\tif ( page === 0 ) {\n\t\t\t\to.disabled = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'next':\n\t\t\to.display = lang.sNext;\n\n\t\t\tif ( pages === 0 || page === pages-1 ) {\n\t\t\t\to.disabled = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'last':\n\t\t\to.display = lang.sLast;\n\n\t\t\tif ( pages === 0 || page === pages-1 ) {\n\t\t\t\to.disabled = true;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tif ( typeof button === 'number' ) {\n\t\t\t\to.display = settings.fnFormatNumber( button + 1 );\n\t\t\t\t\n\t\t\t\tif (page === button) {\n\t\t\t\t\to.active = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn o;\n}\n\n/**\n * Compute what number buttons to show in the paging control\n *\n * @param {*} page Current page\n * @param {*} pages Total number of pages\n * @param {*} buttons Target number of number buttons\n * @param {boolean} addFirstLast Indicate if page 1 and end should be included\n * @returns Buttons to show\n */\nfunction _pagingNumbers ( page, pages, buttons, addFirstLast ) {\n\tvar\n\t\tnumbers = [],\n\t\thalf = Math.floor(buttons / 2),\n\t\tbefore = addFirstLast ? 2 : 1,\n\t\tafter = addFirstLast ? 1 : 0;\n\n\tif ( pages <= buttons ) {\n\t\tnumbers = _range(0, pages);\n\t}\n\telse if (buttons === 1) {\n\t\t// Single button - current page only\n\t\tnumbers = [page];\n\t}\n\telse if (buttons === 3) {\n\t\t// Special logic for just three buttons\n\t\tif (page <= 1) {\n\t\t\tnumbers = [0, 1, 'ellipsis'];\n\t\t}\n\t\telse if (page >= pages - 2) {\n\t\t\tnumbers = _range(pages-2, pages);\n\t\t\tnumbers.unshift('ellipsis');\n\t\t}\n\t\telse {\n\t\t\tnumbers = ['ellipsis', page, 'ellipsis'];\n\t\t}\n\t}\n\telse if ( page <= half ) {\n\t\tnumbers = _range(0, buttons-before);\n\t\tnumbers.push('ellipsis');\n\n\t\tif (addFirstLast) {\n\t\t\tnumbers.push(pages-1);\n\t\t}\n\t}\n\telse if ( page >= pages - 1 - half ) {\n\t\tnumbers = _range(pages-(buttons-before), pages);\n\t\tnumbers.unshift('ellipsis');\n\n\t\tif (addFirstLast) {\n\t\t\tnumbers.unshift(0);\n\t\t}\n\t}\n\telse {\n\t\tnumbers = _range(page-half+before, page+half-after);\n\t\tnumbers.push('ellipsis');\n\t\tnumbers.unshift('ellipsis');\n\n\t\tif (addFirstLast) {\n\t\t\tnumbers.push(pages-1);\n\t\t\tnumbers.unshift(0);\n\t\t}\n\t}\n\n\treturn numbers;\n}\n\nvar __lengthCounter = 0;\n\n// opts\n// - menu\n// - text\nDataTable.feature.register( 'pageLength', function ( settings, opts ) {\n\tvar features = settings.oFeatures;\n\n\t// For compatibility with the legacy `pageLength` top level option\n\tif (! features.bPaginate || ! features.bLengthChange) {\n\t\treturn null;\n\t}\n\n\topts = $.extend({\n\t\tmenu: settings.aLengthMenu,\n\t\ttext: settings.oLanguage.sLengthMenu\n\t}, opts);\n\n\tvar\n\t\tclasses  = settings.oClasses.length,\n\t\ttableId  = settings.sTableId,\n\t\tmenu     = opts.menu,\n\t\tlengths  = [],\n\t\tlanguage = [],\n\t\ti;\n\n\t// Options can be given in a number of ways\n\tif (Array.isArray( menu[0] )) {\n\t\t// Old 1.x style - 2D array\n\t\tlengths = menu[0];\n\t\tlanguage = menu[1];\n\t}\n\telse {\n\t\tfor ( i=0 ; i<menu.length ; i++ ) {\n\t\t\t// An object with different label and value\n\t\t\tif ($.isPlainObject(menu[i])) {\n\t\t\t\tlengths.push(menu[i].value);\n\t\t\t\tlanguage.push(menu[i].label);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Or just a number to display and use\n\t\t\t\tlengths.push(menu[i]);\n\t\t\t\tlanguage.push(menu[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// We can put the <select> outside of the label if it is at the start or\n\t// end which helps improve accessability (not all screen readers like\n\t// implicit for elements).\n\tvar end = opts.text.match(/_MENU_$/);\n\tvar start = opts.text.match(/^_MENU_/);\n\tvar removed = opts.text.replace(/_MENU_/, '');\n\tvar str = '<label>' + opts.text + '</label>';\n\n\tif (start) {\n\t\tstr = '_MENU_<label>' + removed + '</label>';\n\t}\n\telse if (end) {\n\t\tstr = '<label>' + removed + '</label>_MENU_';\n\t}\n\n\t// Wrapper element - use a span as a holder for where the select will go\n\tvar tmpId = 'tmp-' + (+new Date())\n\tvar div = $('<div/>')\n\t\t.addClass( classes.container )\n\t\t.append(\n\t\t\tstr.replace( '_MENU_', '<span id=\"'+tmpId+'\"></span>' )\n\t\t);\n\n\t// Save text node content for macro updating\n\tvar textNodes = [];\n\tArray.from(div.find('label')[0].childNodes).forEach(function (el) {\n\t\tif (el.nodeType === Node.TEXT_NODE) {\n\t\t\ttextNodes.push({\n\t\t\t\tel: el,\n\t\t\t\ttext: el.textContent\n\t\t\t});\n\t\t}\n\t});\n\n\t// Update the label text in case it has an entries value\n\tvar updateEntries = function (len) {\n\t\ttextNodes.forEach(function (node) {\n\t\t\tnode.el.textContent = _fnMacros(settings, node.text, len);\n\t\t});\n\t}\n\n\t// Next, the select itself, along with the options\n\tvar select = $('<select/>', {\n\t\t'name':          tableId+'_length',\n\t\t'aria-controls': tableId,\n\t\t'class':         classes.select\n\t} );\n\n\tfor ( i=0 ; i<lengths.length ; i++ ) {\n\t\tselect[0][ i ] = new Option(\n\t\t\ttypeof language[i] === 'number' ?\n\t\t\t\tsettings.fnFormatNumber( language[i] ) :\n\t\t\t\tlanguage[i],\n\t\t\tlengths[i]\n\t\t);\n\t}\n\n\t// add for and id to label and input\n\tdiv.find('label').attr('for', 'dt-length-' + __lengthCounter);\n\tselect.attr('id', 'dt-length-' + __lengthCounter);\n\t__lengthCounter++;\n\n\t// Swap in the select list\n\tdiv.find('#' + tmpId).replaceWith(select);\n\n\t// Can't use `select` variable as user might provide their own and the\n\t// reference is broken by the use of outerHTML\n\t$('select', div)\n\t\t.val( settings._iDisplayLength )\n\t\t.on( 'change.DT', function() {\n\t\t\t_fnLengthChange( settings, $(this).val() );\n\t\t\t_fnDraw( settings );\n\t\t} );\n\n\t// Update node value whenever anything changes the table's length\n\t$(settings.nTable).on( 'length.dt.DT', function (e, s, len) {\n\t\tif ( settings === s ) {\n\t\t\t$('select', div).val( len );\n\n\t\t\t// Resolve plurals in the text for the new length\n\t\t\tupdateEntries(len);\n\t\t}\n\t} );\n\n\tupdateEntries(settings._iDisplayLength);\n\n\treturn div;\n}, 'l' );\n\n// jQuery access\n$.fn.dataTable = DataTable;\n\n// Provide access to the host jQuery object (circular reference)\nDataTable.$ = $;\n\n// Legacy aliases\n$.fn.dataTableSettings = DataTable.settings;\n$.fn.dataTableExt = DataTable.ext;\n\n// With a capital `D` we return a DataTables API instance rather than a\n// jQuery object\n$.fn.DataTable = function ( opts ) {\n\treturn $(this).dataTable( opts ).api();\n};\n\n// All properties that are available to $.fn.dataTable should also be\n// available on $.fn.DataTable\n$.each( DataTable, function ( prop, val ) {\n\t$.fn.DataTable[ prop ] = val;\n} );\n\nexport default DataTable;\n"],"names":["$","jQuery","DataTable","selector","options","factory","this","_that","emptyInit","undefined","len","length","api","_Api","each","o","oInit","_fnExtend","iLen","i","sId","getAttribute","defaults","$this","nodeName","toLowerCase","trigger","_fnCompatOpts","_fnCompatCols","column","_fnCamelToHungarian","extend","data","allSettings","settings","s","nTable","nTHead","parentNode","nTFoot","bRetrieve","bDestroy","oInstance","Api","destroy","_fnLog","sTableId","id","splice","ext","_unique","oSettings","models","sDestroyWidth","style","width","sInstance","colgroup","prependTo","fastData","row","type","_fnGetCellData","push","dataTable","aLengthMenu","iDisplayLength","Array","isArray","isPlainObject","value","_fnMap","oFeatures","oScroll","oLanguage","_fnCallbackReg","fnDrawCallback","fnStateSaveParams","fnStateLoadParams","fnStateLoaded","fnRowCallback","fnCreatedRow","fnHeaderCallback","fnFooterCallback","fnInitComplete","fnPreDrawCallback","rowIdFn","_fnGetObjectDataFn","rowId","_fnBrowserDetect","oClasses","classes","addClass","table","bPaginate","iDisplayStart","iInitDisplayStart","_iDisplayStart","defer","iDeferLoading","deferLoading","tmp","_iRecordsDisplay","_iRecordsTotal","columnsInit","thead","getElementsByTagName","initHeaderLayout","_fnDetectHeader","aoColumns","_fnAddColumn","_fnApplyColumnDefs","aoColumnDefs","iCol","oDef","_fnColumnOptions","rowOne","children","find","eq","a","cell","name","col","mData","sort","filter","_","_isArrayHost","_fnSaveState","features","bStateSave","aaSorting","sorting","asSorting","_fnSortingClasses","bSorted","_fnDataSource","bDeferRender","caption","appendTo","html","_captionSide","css","captionNode","tbody","insertAfter","nTBody","tfoot","aiDisplay","aiDisplayMaster","slice","bInitialised","sUrl","ajax","dataType","url","success","json","_fnCallbackFire","_fnInitialise","error","_ext","buttons","builder","errMode","feature","search","legacy","pager","renderer","pageButton","header","order","className","detect","render","fnVersionCheck","iApiIndex","sVersion","version","afnFiltering","aTypes","ofnSearch","oSort","afnSortData","aoFeatures","oStdClasses","oPagination","container","empty","info","layout","tableRow","tableCell","start","end","full","select","canAsc","canDesc","isAsc","isDesc","none","position","processing","scrolling","body","footer","self","inner","input","paging","active","button","disabled","nav","_api_register","_api_registerPlural","_re_dic","_re_new_lines","_re_html","_max_str_len","Math","pow","_re_date","_re_escape_regex","RegExp","join","_re_formatted_numeric","_empty","d","_intVal","integer","parseInt","isNaN","isFinite","_numToDecimal","num","decimalPoint","_fnEscapeRegex","replace","_isNumber","formatted","allowEmpty","strType","parseFloat","_isHtml","_htmlNumeric","match","_stripHtml","_pluck","prop","prop2","out","ien","_pluck_order","_range","_removeEmpty","Error","previous","_escapeHtml","_normalize","str","both","res","normalize","_areAllUnique","src","sorted","last","from","Set","val","j","k","again","_flatten","_addClass","el","split","forEach","n","classList","add","util","diacritics","mixed","debounce","fn","timeout","timer","that","args","arguments","clearTimeout","setTimeout","apply","throttle","freq","frequency","now","Date","escapeRegex","set","source","meta","indexOf","setData","b","_fnSplitObjNotation","aLast","arrayNotation","funcNotation","innerSrc","__reArray","__reFn","jLen","get","key","t","fetchData","substring","stripHtml","escapeHtml","unique","_fnHungarianMap","newKey","hungarian","map","_hungarianMap","user","force","hungarianKey","charAt","_fnCompatMap","knew","old","init","sScrollX","scrollX","searchCols","aoSearchCols","oSearch","serverSide","searchDelay","dataSort","aDataSort","__browser","browser","top","left","window","pageXOffset","height","overflow","append","outer","barWidth","offsetWidth","clientWidth","bScrollbarLeft","round","offset","remove","oBrowser","iBarWidth","oDefaults","oCol","oColumn","idx","searchFixed","colEl","attr","aoPreSearchCols","oOptions","mDataProp","sType","_sManualType","sClass","origClass","iDataSort","mDataSrc","mRender","copy","shift","_render","attrTest","_bAttrSrc","_setter","fnGetData","rowData","innerData","fnSetData","_fnSetObjectDataFn","_rowReadObject","bSort","bSortable","_fnAdjustColumnSizing","_fnCalculateColumnWidths","_fnColumnSizes","scroll","sY","sX","_fnScrollDraw","cols","_fnColumnsSumWidth","_fnVisibleToColumnIndex","iMatch","aiVis","_fnGetColumns","_fnColumnIndexToVisible","iPos","_fnVisbleColumns","aoHeader","columns","vis","bVisible","sParam","_typeResult","typeDetect","_name","_fnColumnTypes","aoData","types","jen","ken","detectedType","cache","oneOf","allOf","one","autoClass","_columnAutoClass","aoFooter","_columnAutoRender","colIdx","nTr","display","displayData","_fnWriteCell","anCells","aoColDefs","aoCols","headerLayout","kLen","def","sName","aTargets","target","targets","is","original","incVisible","_fnColumnsFromHeader","sum","unit","definedWidth","sWidthOrig","sWidth","matched","closest","_fnAddData","dataIn","tr","tds","rowIdx","rowModel","oRow","_aData","aIds","_fnCreateTr","_fnAddTr","trs","_fnGetRowElements","cells","draw","iDraw","defaultContent","sDefaultContent","cellData","innerHTML","iDrawError","call","fomatters","_fnSetCellData","td","parts","_fnGetDataMaster","_fnClearTable","_fnInvalidate","_aSortData","_aFilterData","_fnGetRowDisplay","maxLenString","_fnRowAttributes","contents","firstChild","objectRead","setter","cellProcess","trim","toUpperCase","nextSibling","rowNode","rowModal","iRow","nTrIn","anTds","nTd","create","trClass","document","createElement","_DT_RowIndex","sCellType","_DT_CellIndex","appendChild","removeChild","fnCreatedCell","DT_RowClass","__rowc","concat","removeClass","DT_RowAttr","DT_RowData","_fnBuildHead","side","titleProp","detected","_fnRenderer","_fnHeaderLayout","incColumns","local","structure","columnCount","rowspan","colspan","includes","titleSpan","title","_fnDrawHead","point","_fnDraw","ajaxComplete","_fnStart","aPreDraw","anRows","iRowCount","bServerSide","iDisplayEnd","fnDisplayEnd","bDrawing","_fnProcessingDisplay","bDestroying","_emptyRow","_fnAjaxUpdate","iStart","iEnd","iDataIndex","nRow","replaceChildren","detach","nTableWrapper","toggleClass","bFiltered","_fnReDraw","holdPosition","recompute","bFilter","_fnSort","_fnFilterComplete","oPreviousSearch","_drawHold","oLang","zero","sZeroRecords","dataSrc","sLoadingRecords","sEmptyTable","fnRecordsTotal","colSpan","class","_layoutItems","align","items","rowCell","rowClass","Object","keys","opts","_layoutGetRow","rows","rowNum","_layoutArray","pos","order1","order2","ret","reverse","_layoutResolve","getFeature","resolve","item","line","node","inst","_fnAddOptionsHtml","insert","insertBefore","sDom","_fnLayoutDom","bottom","_fnFeatureHtmlTable","_processingHtml","dom","featureNode","option","newNode","next","parent","cFeature","fnInit","write","l","shifted","isHeader","columnDef","sTitle","autoTitle","ariaTitle","childNodes","setAttribute","fnRecordsDisplay","_fnBuildAjax","ajaxData","instance","callback","status","jqXHR","_fnAjaxDataSrc","sError","JSON","parse","e","newData","baseAjax","sServerMethod","xhr","readyState","oAjaxData","_fnAjaxParameters","_fnAjaxUpdateDraw","preSearch","preColSearch","colData","searchable","bSearchable","orderable","regex","fixed","term","toString","_fnSortFlatten","dir","_iDisplayLength","_fnAjaxDataSrcParam","recordsTotal","recordsFiltered","_fnInitComplete","dataProp","aaData","param","columnsSearch","_fnFilterData","_fnFilter","_fnFilterCustom","filters","displayRows","searchRows","searchFunc","rpSearch","_fnFilterCreateSearch","_sFilterRow","test","inOpts","not","boundary","caseInsensitive","exact","smart","word","negative","m","__filter_div","__filter_div_textContent","textContent","filterData","wasInvalidated","innerText","_fnLoadState","iAjaxStart","_fnSortInit","_colGroup","aData","_bInitComplete","_fnLengthChange","_fnLengthOverflow","_fnPageChange","action","redraw","records","floor","changed","bProcessing","role","sProcessing","on","show","_fnProcessingRun","enable","run","scrollY","captionSide","headerClone","cloneNode","footerClone","_div","size","_fnStringToCss","scroller","border","sXInner","removeAttr","scrollHead","scrollBody","scrollFoot","scrollLeft","bCollapse","nScrollHead","nScrollBody","nScrollFoot","aoDrawCallback","headerCopy","footerCopy","divHeader","divHeaderInner","divHeaderTable","divBodyEl","divBody","divFooter","divFooterInner","divFooterTable","scrollBarVis","scrollHeight","clientHeight","clone","firstTr","colSizes","outerWidth","colWidth","wrapAll","isScrolling","paddingSide","scrollTop","bAutoWidth","columnIdx","scrollXInner","visibleColumns","tableWidthAttr","tableContainer","styleWidth","visible","tmpTable","margin","padding","longest","_fnGetMaxLenString","text","sContentPadding","createTextNode","holder","right","total","bodyCells","bounding","getBoundingClientRect","_reszEvt","bindResize","max","maxLen","cellString","nodeType","headerRows","querySelectorAll","legacyTop","bSortCellsTop","notSelector","_fnSortAttachListener","_fnSortResolve","_fnBindAction","_fnSortAdd","shiftKey","_fnSortDisplay","master","masterMap","nestedSort","z","srcCol","aSort","extSort","aaSortingFixed","fixedObj","pre","post","_idx","index","formatter","sorter","sortCol","aiOrig","displayMaster","_fnSortData","orderDescReverse","x","y","dataA","dataB","sortDetails","addIndex","nextSortIdx","bSortMulti","sortIdx","oldSort","aLastSort","sortClass","bSortClasses","customSort","sSortDataType","customData","_bLoadingState","state","time","oSavedState","fnStateSaveCallback","loaded","_fnImplementState","fnStateLoadCallback","duration","iStateDuration","abStateLoad","oLoadedState","page","adjust","level","msg","tn","console","log","sErrMode","alert","mappedName","extender","breakRefs","prototype","hasOwnProperty","which","preventDefault","store","callbackArr","eventName","bubbles","Event","dt","parents","result","host","_fnMacros","entries","fnFormatNumber","all","ceil","i18n","__apiStruct","__arrayProto","_toSettings","jq","tables","toArray","v","context","ctxSettings","any","count","flatten","ctx","iterator","alwaysNew","apiInst","_selector_row_indexes","apiSelector","lastIndexOf","pluck","pop","reduce","reduceRight","to$","toJQuery","unshift","_api_scope","scope","struc","methodExt","_api_find","obj","__dt_wrapper","struct","propExt","register","method","heir","registerPlural","pluralName","singularName","__table_selector","sel","nodes","indexes","prepend","visRecords","pages","recordsDisplay","__reload","abort","resetPaging","_selector_run","selectFn","selectorType","_selector_opts","_selector_first","displayFiltered","displayFilteredMap","ordered","__row_selector","selInt","cellIdx","rowObj","r","hash","newRows","modRows","idFn","ids","_detailsShow","childRows","__details_state_load","every","__details_add","klass","addRow","created","_details","__details_state","__details_remove","__details_display","__details_events","namespace","drawEvent","colvisEvent","destroyEvent","off","_emp","_child_obj","_child_mth","child","__re_column_selector","__columnData","r1","r2","__column_header","__column_selector","names","titles","visColumns","jqResult","__setColumnVis","span","calc","widths","visIdx","__cell_selector","allCells","fnSelector","rowSelector","columnSelector","internalOpts","cellsNoOpts","selected","columnVisible","directions","caseInsen","ignoreTime","setMutate","use","arg1","arg2","module","DateTime","__luxon","__moment","jquery","FixedOffsetZone","isMoment","root","versionCheck","version2","aThis","aThat","iThis","iThat","isDataTable","head","foot","camelToHungarian","jqRows","jqTable","jqTbody","jqWrapper","orderClasses","orig","removedMethod","counter","selectedIdx","tableIdx","token","plural","resolved","return","sSortingClass","bInfo","bLengthChange","bScrollCollapse","toFormat","sThousands","fnInfoCallback","sessionStorage","localStorage","getItem","location","pathname","setItem","stringify","iTabIndex","oAria","orderableReverse","orderableRemove","paginate","first","number","oPaginate","sFirst","sLast","sNext","sPrevious","sInfo","sInfoEmpty","sInfoFiltered","sInfoPostFix","sDecimal","sLengthMenu","sSearch","sSearchPlaceholder","topStart","topEnd","bottomStart","bottomEnd","sPaginationType","sScrollXInner","sScrollY","aanFeatures","aoRowCallback","aoHeaderCallback","aoFooterCallback","aoRowCreatedCallback","aoPreDrawCallback","aoInitComplete","aoStateSaveParams","aoStateLoadParams","aoStateLoaded","aoOpenRows","pagingControls","aoStateSave","aoStateLoad","bAjaxDataGet","aoDestroyCallback","min","oPlugins","extPagination","simple","numbers","simple_numbers","full_numbers","first_last","first_last_numbers","_numbers","_pagingNumbers","numbers_length","pagingButton","buttonType","content","btnClasses","btn","clicker","pagingContainer","_filterString","__mld","dtLib","momentFn","luxonFn","dateFn","__mlWarning","resolveWindowLibs","luxon","moment","__mldObj","format","locale","utc","isValid","fromFormat","fromISO","setLocale","__mlHelper","localeString","to","typeName","valueOf","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","__thousands","__decimal","Intl","NumberFormat","formatToParts","datetime","date","thousands","decimal","precision","prefix","postfix","flo","abs","exp","toExponential","toFixed","intPart","floatPart","_extTypes","asc","desc","setProp","propVal","setDetect","defineProperty","findIndex","setOrder","__diacriticSort","localeCompare","navigator","languages","language","numeric","ignorePunctuation","parsed","ts","Infinity","dp","__numericReplace","decimalPlace","re1","re2","ariaType","sortDirs","orderedColumns","isOrdering","orderDirs","firstVis","firstSort","sortOrder","cb","_divProp","lang","tid","_fnUpdateInfo","_infoEl","__searchCounter","tableId","previousSearch","placeholder","removed","searchFn","event","jqFilter","keyCode","ev","activeElement","boundaryNumbers","firstLast","previousNext","_pagingDraw","_pagingDynamic","plugin","aria","buttonEls","buttonsNested","btnInfo","_pagingButtonInfo","ariaLabel","tabIndex","wrapped","activeEl","outerHeight","addFirstLast","half","before","after","__lengthCounter","menu","lengths","label","tmpId","div","textNodes","Node","TEXT_NODE","updateEntries","Option","replaceWith","dataTableSettings","dataTableExt"],"mappings":"sBAQA,IAAIA,EAAIC,EAGL,IAACC,UAAY,SAAWC,EAAUC,GAIpC,GAAIF,UAAUG,QAAQF,EAAUC,GAC/B,OAAOF,UAIR,GAAII,gBAAgBJ,UACnB,OAAOF,EAAEG,GAAUD,UAAUE,GAI7BA,E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