text: /*
  YUI 3.16.0 (build 76f0e08)
  Copyright 2014 Yahoo! Inc. All rights reserved.
  Licensed under the BSD License.
  http://yuilibrary.com/license/
  */
  
  if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
  if (!__coverage__['build/datatable-head/datatable-head.js']) {
     __coverage__['build/datatable-head/datatable-head.js'] = {"path":"build/datatable-head/datatable-head.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"(anonymous_2)","line":161,"loc":{"start":{"line":161,"column":18},"end":{"line":161,"column":30}}},"3":{"name":"(anonymous_3)","line":186,"loc":{"start":{"line":186,"column":12},"end":{"line":186,"column":24}}},"4":{"name":"(anonymous_4)","line":273,"loc":{"start":{"line":273,"column":25},"end":{"line":273,"column":38}}},"5":{"name":"(anonymous_5)","line":286,"loc":{"start":{"line":286,"column":12},"end":{"line":286,"column":24}}},"6":{"name":"(anonymous_6)","line":303,"loc":{"start":{"line":303,"column":22},"end":{"line":303,"column":34}}},"7":{"name":"(anonymous_7)","line":316,"loc":{"start":{"line":316,"column":16},"end":{"line":316,"column":28}}},"8":{"name":"(anonymous_8)","line":343,"loc":{"start":{"line":343,"column":17},"end":{"line":343,"column":35}}},"9":{"name":"(anonymous_9)","line":413,"loc":{"start":{"line":413,"column":19},"end":{"line":413,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":532,"column":75}},"2":{"start":{"line":11,"column":0},"end":{"line":14,"column":22}},"3":{"start":{"line":82,"column":0},"end":{"line":529,"column":3}},"4":{"start":{"line":164,"column":8},"end":{"line":166,"column":42}},"5":{"start":{"line":168,"column":8},"end":{"line":174,"column":9}},"6":{"start":{"line":169,"column":12},"end":{"line":169,"column":60}},"7":{"start":{"line":171,"column":12},"end":{"line":173,"column":67}},"8":{"start":{"line":187,"column":8},"end":{"line":197,"column":56}},"9":{"start":{"line":199,"column":8},"end":{"line":256,"column":9}},"10":{"start":{"line":200,"column":12},"end":{"line":200,"column":22}},"11":{"start":{"line":202,"column":12},"end":{"line":249,"column":13}},"12":{"start":{"line":203,"column":16},"end":{"line":248,"column":17}},"13":{"start":{"line":204,"column":20},"end":{"line":204,"column":33}},"14":{"start":{"line":206,"column":20},"end":{"line":243,"column":21}},"15":{"start":{"line":207,"column":24},"end":{"line":207,"column":44}},"16":{"start":{"line":208,"column":24},"end":{"line":215,"column":26}},"17":{"start":{"line":217,"column":24},"end":{"line":218,"column":71}},"18":{"start":{"line":220,"column":24},"end":{"line":222,"column":25}},"19":{"start":{"line":221,"column":28},"end":{"line":221,"column":69}},"20":{"start":{"line":224,"column":24},"end":{"line":226,"column":25}},"21":{"start":{"line":225,"column":28},"end":{"line":225,"column":72}},"22":{"start":{"line":228,"column":24},"end":{"line":230,"column":25}},"23":{"start":{"line":229,"column":28},"end":{"line":229,"column":68}},"24":{"start":{"line":232,"column":24},"end":{"line":234,"column":25}},"25":{"start":{"line":233,"column":28},"end":{"line":233,"column":91}},"26":{"start":{"line":236,"column":24},"end":{"line":239,"column":25}},"27":{"start":{"line":237,"column":28},"end":{"line":238,"column":72}},"28":{"start":{"line":241,"column":24},"end":{"line":242,"column":78}},"29":{"start":{"line":245,"column":20},"end":{"line":247,"column":23}},"30":{"start":{"line":251,"column":12},"end":{"line":251,"column":32}},"31":{"start":{"line":253,"column":12},"end":{"line":255,"column":13}},"32":{"start":{"line":254,"column":16},"end":{"line":254,"column":69}},"33":{"start":{"line":258,"column":8},"end":{"line":258,"column":22}},"34":{"start":{"line":260,"column":8},"end":{"line":260,"column":20}},"35":{"start":{"line":274,"column":8},"end":{"line":274,"column":52}},"36":{"start":{"line":276,"column":8},"end":{"line":276,"column":22}},"37":{"start":{"line":287,"column":8},"end":{"line":292,"column":9}},"38":{"start":{"line":289,"column":12},"end":{"line":291,"column":57}},"39":{"start":{"line":304,"column":8},"end":{"line":306,"column":12}},"40":{"start":{"line":317,"column":8},"end":{"line":317,"column":74}},"41":{"start":{"line":344,"column":8},"end":{"line":344,"column":33}},"42":{"start":{"line":345,"column":8},"end":{"line":345,"column":58}},"43":{"start":{"line":347,"column":8},"end":{"line":347,"column":32}},"44":{"start":{"line":414,"column":8},"end":{"line":417,"column":57}},"45":{"start":{"line":419,"column":8},"end":{"line":519,"column":9}},"46":{"start":{"line":421,"column":12},"end":{"line":421,"column":32}},"47":{"start":{"line":425,"column":12},"end":{"line":425,"column":35}},"48":{"start":{"line":427,"column":12},"end":{"line":472,"column":13}},"49":{"start":{"line":428,"column":16},"end":{"line":428,"column":48}},"50":{"start":{"line":429,"column":16},"end":{"line":429,"column":33}},"51":{"start":{"line":430,"column":16},"end":{"line":430,"column":37}},"52":{"start":{"line":432,"column":16},"end":{"line":453,"column":17}},"53":{"start":{"line":433,"column":20},"end":{"line":433,"column":51}},"54":{"start":{"line":434,"column":20},"end":{"line":434,"column":44}},"55":{"start":{"line":436,"column":20},"end":{"line":436,"column":33}},"56":{"start":{"line":438,"column":20},"end":{"line":440,"column":21}},"57":{"start":{"line":439,"column":24},"end":{"line":439,"column":42}},"58":{"start":{"line":442,"column":20},"end":{"line":452,"column":21}},"59":{"start":{"line":443,"column":24},"end":{"line":443,"column":51}},"60":{"start":{"line":444,"column":24},"end":{"line":444,"column":37}},"61":{"start":{"line":446,"column":24},"end":{"line":446,"column":66}},"62":{"start":{"line":449,"column":24},"end":{"line":449,"column":30}},"63":{"start":{"line":451,"column":24},"end":{"line":451,"column":41}},"64":{"start":{"line":455,"column":16},"end":{"line":471,"column":17}},"65":{"start":{"line":457,"column":20},"end":{"line":469,"column":21}},"66":{"start":{"line":458,"column":24},"end":{"line":458,"column":57}},"67":{"start":{"line":459,"column":24},"end":{"line":459,"column":52}},"68":{"start":{"line":461,"column":24},"end":{"line":461,"column":44}},"69":{"start":{"line":463,"column":24},"end":{"line":468,"column":25}},"70":{"start":{"line":466,"column":28},"end":{"line":466,"column":54}},"71":{"start":{"line":467,"column":28},"end":{"line":467,"column":63}},"72":{"start":{"line":470,"column":20},"end":{"line":470,"column":32}},"73":{"start":{"line":475,"column":12},"end":{"line":477,"column":13}},"74":{"start":{"line":476,"column":16},"end":{"line":476,"column":33}},"75":{"start":{"line":479,"column":12},"end":{"line":479,"column":35}},"76":{"start":{"line":481,"column":12},"end":{"line":518,"column":13}},"77":{"start":{"line":482,"column":16},"end":{"line":482,"column":48}},"78":{"start":{"line":483,"column":16},"end":{"line":483,"column":33}},"79":{"start":{"line":484,"column":16},"end":{"line":484,"column":37}},"80":{"start":{"line":486,"column":16},"end":{"line":512,"column":17}},"81":{"start":{"line":487,"column":20},"end":{"line":487,"column":33}},"82":{"start":{"line":488,"column":20},"end":{"line":488,"column":44}},"83":{"start":{"line":490,"column":20},"end":{"line":490,"column":56}},"84":{"start":{"line":492,"column":20},"end":{"line":492,"column":33}},"85":{"start":{"line":495,"column":20},"end":{"line":495,"column":44}},"86":{"start":{"line":497,"column":20},"end":{"line":501,"column":21}},"87":{"start":{"line":498,"column":24},"end":{"line":498,"column":58}},"88":{"start":{"line":500,"column":24},"end":{"line":500,"column":56}},"89":{"start":{"line":503,"column":20},"end":{"line":511,"column":21}},"90":{"start":{"line":507,"column":24},"end":{"line":507,"column":51}},"91":{"start":{"line":508,"column":24},"end":{"line":508,"column":30}},"92":{"start":{"line":510,"column":24},"end":{"line":510,"column":66}},"93":{"start":{"line":514,"column":16},"end":{"line":517,"column":17}},"94":{"start":{"line":516,"column":20},"end":{"line":516,"column":32}},"95":{"start":{"line":521,"column":8},"end":{"line":525,"column":9}},"96":{"start":{"line":522,"column":12},"end":{"line":522,"column":32}},"97":{"start":{"line":524,"column":12},"end":{"line":524,"column":30}},"98":{"start":{"line":527,"column":8},"end":{"line":527,"column":23}}},"branchMap":{"1":{"line":165,"type":"binary-expr","locations":[{"start":{"line":165,"column":20},"end":{"line":165,"column":24}},{"start":{"line":165,"column":28},"end":{"line":165,"column":49}},{"start":{"line":166,"column":20},"end":{"line":166,"column":41}}]},"2":{"line":168,"type":"if","locations":[{"start":{"line":168,"column":8},"end":{"line":168,"column":8}},{"start":{"line":168,"column":8},"end":{"line":168,"column":8}}]},"3":{"line":168,"type":"binary-expr","locations":[{"start":{"line":168,"column":12},"end":{"line":168,"column":16}},{"start":{"line":168,"column":20},"end":{"line":168,"column":37}}]},"4":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":23},"end":{"line":188,"column":37}},{"start":{"line":189,"column":25},"end":{"line":189,"column":65}}]},"5":{"line":199,"type":"if","locations":[{"start":{"line":199,"column":8},"end":{"line":199,"column":8}},{"start":{"line":199,"column":8},"end":{"line":199,"column":8}}]},"6":{"line":199,"type":"binary-expr","locations":[{"start":{"line":199,"column":12},"end":{"line":199,"column":17}},{"start":{"line":199,"column":21},"end":{"line":199,"column":28}}]},"7":{"line":202,"type":"if","locations":[{"start":{"line":202,"column":12},"end":{"line":202,"column":12}},{"start":{"line":202,"column":12},"end":{"line":202,"column":12}}]},"8":{"line":212,"type":"binary-expr","locations":[{"start":{"line":212,"column":43},"end":{"line":212,"column":52}},{"start":{"line":212,"column":56},"end":{"line":212,"column":63}},{"start":{"line":213,"column":44},"end":{"line":213,"column":63}}]},"9":{"line":217,"type":"cond-expr","locations":[{"start":{"line":218,"column":28},"end":{"line":218,"column":65}},{"start":{"line":218,"column":68},"end":{"line":218,"column":70}}]},"10":{"line":220,"type":"if","locations":[{"start":{"line":220,"column":24},"end":{"line":220,"column":24}},{"start":{"line":220,"column":24},"end":{"line":220,"column":24}}]},"11":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":24},"end":{"line":224,"column":24}},{"start":{"line":224,"column":24},"end":{"line":224,"column":24}}]},"12":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":24},"end":{"line":228,"column":24}},{"start":{"line":228,"column":24},"end":{"line":228,"column":24}}]},"13":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":24},"end":{"line":232,"column":24}},{"start":{"line":232,"column":24},"end":{"line":232,"column":24}}]},"14":{"line":236,"type":"if","locations":[{"start":{"line":236,"column":24},"end":{"line":236,"column":24}},{"start":{"line":236,"column":24},"end":{"line":236,"column":24}}]},"15":{"line":242,"type":"binary-expr","locations":[{"start":{"line":242,"column":28},"end":{"line":242,"column":46}},{"start":{"line":242,"column":50},"end":{"line":242,"column":68}}]},"16":{"line":253,"type":"if","locations":[{"start":{"line":253,"column":12},"end":{"line":253,"column":12}},{"start":{"line":253,"column":12},"end":{"line":253,"column":12}}]},"17":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":8},"end":{"line":287,"column":8}},{"start":{"line":287,"column":8},"end":{"line":287,"column":8}}]},"18":{"line":419,"type":"if","locations":[{"start":{"line":419,"column":8},"end":{"line":419,"column":8}},{"start":{"line":419,"column":8},"end":{"line":419,"column":8}}]},"19":{"line":419,"type":"binary-expr","locations":[{"start":{"line":419,"column":12},"end":{"line":419,"column":25}},{"start":{"line":419,"column":29},"end":{"line":419,"column":40}}]},"20":{"line":438,"type":"if","locations":[{"start":{"line":438,"column":20},"end":{"line":438,"column":20}},{"start":{"line":438,"column":20},"end":{"line":438,"column":20}}]},"21":{"line":442,"type":"if","locations":[{"start":{"line":442,"column":20},"end":{"line":442,"column":20}},{"start":{"line":442,"column":20},"end":{"line":442,"column":20}}]},"22":{"line":442,"type":"binary-expr","locations":[{"start":{"line":442,"column":24},"end":{"line":442,"column":41}},{"start":{"line":442,"column":45},"end":{"line":442,"column":60}}]},"23":{"line":455,"type":"if","locations":[{"start":{"line":455,"column":16},"end":{"line":455,"column":16}},{"start":{"line":455,"column":16},"end":{"line":455,"column":16}}]},"24":{"line":457,"type":"if","locations":[{"start":{"line":457,"column":20},"end":{"line":457,"column":20}},{"start":{"line":457,"column":20},"end":{"line":457,"column":20}}]},"25":{"line":503,"type":"if","locations":[{"start":{"line":503,"column":20},"end":{"line":503,"column":20}},{"start":{"line":503,"column":20},"end":{"line":503,"column":20}}]},"26":{"line":503,"type":"binary-expr","locations":[{"start":{"line":503,"column":24},"end":{"line":503,"column":32}},{"start":{"line":503,"column":36},"end":{"line":503,"column":51}}]},"27":{"line":514,"type":"if","locations":[{"start":{"line":514,"column":16},"end":{"line":514,"column":16}},{"start":{"line":514,"column":16},"end":{"line":514,"column":16}}]}},"code":["(function () { YUI.add('datatable-head', function (Y, NAME) {","","/**","View class responsible for rendering the `<thead>` section of a table. Used as","the default `headerView` for `Y.DataTable.Base` and `Y.DataTable` classes.","","@module datatable","@submodule datatable-head","@since 3.5.0","**/","var Lang = Y.Lang,","    fromTemplate = Lang.sub,","    isArray = Lang.isArray,","    toArray = Y.Array;","","/**","View class responsible for rendering the `<thead>` section of a table. Used as","the default `headerView` for `Y.DataTable.Base` and `Y.DataTable` classes.","","Translates the provided array of column configuration objects into a rendered","`<thead>` based on the data in those objects.","","","The structure of the column data is expected to be a single array of objects,","where each object corresponds to a `<th>`.  Those objects may contain a","`children` property containing a similarly structured array to indicate the","nested cells should be grouped under the parent column's colspan in a separate","row of header cells. E.g.","","<pre><code>","new Y.DataTable.HeaderView({","  container: tableNode,","  columns: [","    { key: 'id' }, // no nesting","    { key: 'name', children: [","      { key: 'firstName', label: 'First' },","      { key: 'lastName',  label: 'Last' } ] }","  ]","}).render();","</code></pre>","","This would translate to the following visualization:","","<pre>","---------------------","|    |     name     |","|    |---------------","| id | First | Last |","---------------------","</pre>","","Supported properties of the column objects include:","","  * `label`     - The HTML content of the header cell.","  * `key`       - If `label` is not specified, the `key` is used for content.","  * `children`  - Array of columns to appear below this column in the next","                  row.","  * `headerTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in this","    column only.","  * `abbr`      - The content of the 'abbr' attribute of the `<th>`","  * `title`     - The content of the 'title' attribute of the `<th>`","  * `className` - Adds this string of CSS classes to the column header","","Through the life of instantiation and rendering, the column objects will have","the following properties added to them:","","  * `id`       - (Defaulted by DataTable) The id to assign the rendered column","  * `_colspan` - To supply the `<th>` attribute","  * `_rowspan` - To supply the `<th>` attribute","  * `_parent`  - (Added by DataTable) If the column is a child of another","    column, this points to its parent column","","The column object is also used to provide values for {placeholder} tokens in the","instance's `CELL_TEMPLATE`, so you can modify the template and include other","column object properties to populate them.","","@class HeaderView","@namespace DataTable","@extends View","@since 3.5.0","**/","Y.namespace('DataTable').HeaderView = Y.Base.create('tableHeader', Y.View, [], {","    // -- Instance properties -------------------------------------------------","","    /**","    Template used to create the table's header cell markup.  Override this to","    customize how header cell markup is created.","","    @property CELL_TEMPLATE","    @type {String}","    @default '<th id=\"{id}\" colspan=\"{_colspan}\" rowspan=\"{_rowspan}\" class=\"{className}\" scope=\"col\" {_id}{abbr}{title}>{content}</th>'","    @since 3.5.0","    **/","    CELL_TEMPLATE:","        '<th id=\"{id}\" colspan=\"{_colspan}\" rowspan=\"{_rowspan}\" class=\"{className}\" scope=\"col\" {_id}{abbr}{title}>{content}</th>',","","    /**","    The data representation of the header rows to render.  This is assigned by","    parsing the `columns` configuration array, and is used by the render()","    method.","","    @property columns","    @type {Array[]}","    @default (initially unset)","    @since 3.5.0","    **/","    //TODO: should this be protected?","    //columns: null,","","    /**","    Template used to create the table's header row markup.  Override this to","    customize the row markup.","","    @property ROW_TEMPLATE","    @type {String}","    @default '<tr>{content}</tr>'","    @since 3.5.0","    **/","    ROW_TEMPLATE:","        '<tr>{content}</tr>',","","    /**","    The object that serves as the source of truth for column and row data.","    This property is assigned at instantiation from the `source` property of","    the configuration object passed to the constructor.","","    @property source","    @type {Object}","    @default (initially unset)","    @since 3.5.0","    **/","    //TODO: should this be protected?","    //source: null,","","    /**","    HTML templates used to create the `<thead>` containing the table headers.","","    @property THEAD_TEMPLATE","    @type {String}","    @default '<thead class=\"{className}\">{content}</thead>'","    @since 3.6.0","    **/","    THEAD_TEMPLATE: '<thead class=\"{className}\"></thead>',","","    // -- Public methods ------------------------------------------------------","","    /**","    Returns the generated CSS classname based on the input.  If the `host`","    attribute is configured, it will attempt to relay to its `getClassName`","    or use its static `NAME` property as a string base.","","    If `host` is absent or has neither method nor `NAME`, a CSS classname","    will be generated using this class's `NAME`.","","    @method getClassName","    @param {String} token* Any number of token strings to assemble the","        classname from.","    @return {String}","    @protected","    **/","    getClassName: function () {","        // TODO: add attribute with setter? to host to use property this.host","        // for performance","        var host = this.host,","            NAME = (host && host.constructor.NAME) ||","                    this.constructor.NAME;","","        if (host && host.getClassName) {","            return host.getClassName.apply(host, arguments);","        } else {","            return Y.ClassNameManager.getClassName","                .apply(Y.ClassNameManager,","                       [NAME].concat(toArray(arguments, 0, true)));","        }","    },","","    /**","    Creates the `<thead>` Node content by assembling markup generated by","    populating the `ROW_TEMPLATE` and `CELL_TEMPLATE` templates with content","    from the `columns` property.","","    @method render","    @chainable","    @since 3.5.0","    **/","    render: function () {","        var table    = this.get('container'),","            thead    = this.theadNode ||","                        (this.theadNode = this._createTHeadNode()),","            columns  = this.columns,","            defaults = {","                _colspan: 1,","                _rowspan: 1,","                abbr: '',","                title: ''","            },","            i, len, j, jlen, col, html, content, values;","","        if (thead && columns) {","            html = '';","","            if (columns.length) {","                for (i = 0, len = columns.length; i < len; ++i) {","                    content = '';","","                    for (j = 0, jlen = columns[i].length; j < jlen; ++j) {","                        col = columns[i][j];","                        values = Y.merge(","                            defaults,","                            col, {","                                className: this.getClassName('header'),","                                content  : col.label || col.key ||","                                           (\"Column \" + (j + 1))","                            }","                        );","","                        values._id = col._id ?","                            ' data-yui3-col-id=\"' + col._id + '\"' : '';","","                        if (col.abbr) {","                            values.abbr = ' abbr=\"' + col.abbr + '\"';","                        }","","                        if (col.title) {","                            values.title = ' title=\"' + col.title + '\"';","                        }","","                        if (col.className) {","                            values.className += ' ' + col.className;","                        }","","                        if (col._first) {","                            values.className += ' ' + this.getClassName('first', 'header');","                        }","","                        if (col._id) {","                            values.className +=","                                ' ' + this.getClassName('col', col._id);","                        }","","                        content += fromTemplate(","                            col.headerTemplate || this.CELL_TEMPLATE, values);","                    }","","                    html += fromTemplate(this.ROW_TEMPLATE, {","                        content: content","                    });","                }","            }","","            thead.setHTML(html);","","            if (thead.get('parentNode') !== table) {","                table.insertBefore(thead, table.one('tfoot, tbody'));","            }","        }","","        this.bindUI();","","        return this;","    },","","    // -- Protected and private properties and methods ------------------------","","    /**","    Handles changes in the source's columns attribute.  Redraws the headers.","","    @method _afterColumnsChange","    @param {EventFacade} e The `columnsChange` event object","    @protected","    @since 3.5.0","    **/","    _afterColumnsChange: function (e) {","        this.columns = this._parseColumns(e.newVal);","","        this.render();","    },","","    /**","    Binds event subscriptions from the UI and the source (if assigned).","","    @method bindUI","    @protected","    @since 3.5.0","    **/","    bindUI: function () {","        if (!this._eventHandles.columnsChange) {","            // TODO: How best to decouple this?","            this._eventHandles.columnsChange =","                this.after('columnsChange',","                    Y.bind('_afterColumnsChange', this));","        }","    },","","    /**","    Creates the `<thead>` node that will store the header rows and cells.","","    @method _createTHeadNode","    @return {Node}","    @protected","    @since 3.6.0","    **/","    _createTHeadNode: function () {","        return Y.Node.create(fromTemplate(this.THEAD_TEMPLATE, {","            className: this.getClassName('columns')","        }));","    },","","    /**","    Destroys the instance.","","    @method destructor","    @protected","    @since 3.5.0","    **/","    destructor: function () {","        (new Y.EventHandle(Y.Object.values(this._eventHandles))).detach();","    },","","    /**","    Holds the event subscriptions needing to be detached when the instance is","    `destroy()`ed.","","    @property _eventHandles","    @type {Object}","    @default undefined (initially unset)","    @protected","    @since 3.5.0","    **/","    //_eventHandles: null,","","    /**","    Initializes the instance. Reads the following configuration properties:","","      * `columns` - (REQUIRED) The initial column information","      * `host`    - The object to serve as source of truth for column info","","    @method initializer","    @param {Object} config Configuration data","    @protected","    @since 3.5.0","    **/","    initializer: function (config) {","        this.host  = config.host;","        this.columns = this._parseColumns(config.columns);","","        this._eventHandles = [];","    },","","    /**","    Translate the input column format into a structure useful for rendering a","    `<thead>`, rows, and cells.  The structure of the input is expected to be a","    single array of objects, where each object corresponds to a `<th>`.  Those","    objects may contain a `children` property containing a similarly structured","    array to indicate the nested cells should be grouped under the parent","    column's colspan in a separate row of header cells. E.g.","","    <pre><code>","    [","      { key: 'id' }, // no nesting","      { key: 'name', children: [","        { key: 'firstName', label: 'First' },","        { key: 'lastName',  label: 'Last' } ] }","    ]","    </code></pre>","","    would indicate two header rows with the first column 'id' being assigned a","    `rowspan` of `2`, the 'name' column appearing in the first row with a","    `colspan` of `2`, and the 'firstName' and 'lastName' columns appearing in","    the second row, below the 'name' column.","","    <pre>","    ---------------------","    |    |     name     |","    |    |---------------","    | id | First | Last |","    ---------------------","    </pre>","","    Supported properties of the column objects include:","","      * `label`    - The HTML content of the header cell.","      * `key`      - If `label` is not specified, the `key` is used for content.","      * `children` - Array of columns to appear below this column in the next","                     row.","      * `abbr`     - The content of the 'abbr' attribute of the `<th>`","      * `title`    - The content of the 'title' attribute of the `<th>`","      * `headerTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells","        in this column only.","","    The output structure is basically a simulation of the `<thead>` structure","    with arrays for rows and objects for cells.  Column objects have the","    following properties added to them:","","      * `id`       - (Defaulted by DataTable) The id to assign the rendered","                     column","      * `_colspan` - Per the `<th>` attribute","      * `_rowspan` - Per the `<th>` attribute","      * `_parent`  - (Added by DataTable) If the column is a child of another","        column, this points to its parent column","","    The column object is also used to provide values for {placeholder}","    replacement in the `CELL_TEMPLATE`, so you can modify the template and","    include other column object properties to populate them.","","    @method _parseColumns","    @param {Object[]} data Array of column object data","    @return {Array[]} An array of arrays corresponding to the header row","            structure to render","    @protected","    @since 3.5.0","    **/","    _parseColumns: function (data) {","        var columns = [],","            stack = [],","            rowSpan = 1,","            entry, row, col, children, parent, i, len, j;","","        if (isArray(data) && data.length) {","            // don't modify the input array","            data = data.slice();","","            // First pass, assign colspans and calculate row count for","            // non-nested headers' rowspan","            stack.push([data, -1]);","","            while (stack.length) {","                entry = stack[stack.length - 1];","                row   = entry[0];","                i     = entry[1] + 1;","","                for (len = row.length; i < len; ++i) {","                    row[i] = col = Y.merge(row[i]);","                    children = col.children;","","                    Y.stamp(col);","","                    if (!col.id) {","                        col.id = Y.guid();","                    }","","                    if (isArray(children) && children.length) {","                        stack.push([children, -1]);","                        entry[1] = i;","","                        rowSpan = Math.max(rowSpan, stack.length);","","                        // break to let the while loop process the children","                        break;","                    } else {","                        col._colspan = 1;","                    }","                }","","                if (i >= len) {","                    // All columns in this row are processed","                    if (stack.length > 1) {","                        entry  = stack[stack.length - 2];","                        parent = entry[0][entry[1]];","","                        parent._colspan = 0;","","                        for (i = 0, len = row.length; i < len; ++i) {","                            // Can't use .length because in 3+ rows, colspan","                            // needs to aggregate the colspans of children","                            row[i]._parent   = parent;","                            parent._colspan += row[i]._colspan;","                        }","                    }","                    stack.pop();","                }","            }","","            // Second pass, build row arrays and assign rowspan","            for (i = 0; i < rowSpan; ++i) {","                columns.push([]);","            }","","            stack.push([data, -1]);","","            while (stack.length) {","                entry = stack[stack.length - 1];","                row   = entry[0];","                i     = entry[1] + 1;","","                for (len = row.length; i < len; ++i) {","                    col = row[i];","                    children = col.children;","","                    columns[stack.length - 1].push(col);","","                    entry[1] = i;","","                    // collect the IDs of parent cols","                    col._headers = [col.id];","","                    for (j = stack.length - 2; j >= 0; --j) {","                        parent = stack[j][0][stack[j][1]];","","                        col._headers.unshift(parent.id);","                    }","","                    if (children && children.length) {","                        // parent cells must assume rowspan 1 (long story)","","                        // break to let the while loop process the children","                        stack.push([children, -1]);","                        break;","                    } else {","                        col._rowspan = rowSpan - stack.length + 1;","                    }","                }","","                if (i >= len) {","                    // All columns in this row are processed","                    stack.pop();","                }","            }","        }","","        for (i = 0, len = columns.length; i < len; i += col._rowspan) {","            col = columns[i][0];","","            col._first = true;","        }","","        return columns;","    }","});","","","}, '3.16.0', {\"requires\": [\"datatable-core\", \"view\", \"classnamemanager\"]});","","}());"]};
  }
  var __cov_oz_EZwVpuABhbsLfLpaJeQ = __coverage__['build/datatable-head/datatable-head.js'];
  __cov_oz_EZwVpuABhbsLfLpaJeQ.s['1']++;YUI.add('datatable-head',function(Y,NAME){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['1']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['2']++;var Lang=Y.Lang,fromTemplate=Lang.sub,isArray=Lang.isArray,toArray=Y.Array;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['3']++;Y.namespace('DataTable').HeaderView=Y.Base.create('tableHeader',Y.View,[],{CELL_TEMPLATE:'<th id="{id}" colspan="{_colspan}" rowspan="{_rowspan}" class="{className}" scope="col" {_id}{abbr}{title}>{content}</th>',ROW_TEMPLATE:'<tr>{content}</tr>',THEAD_TEMPLATE:'<thead class="{className}"></thead>',getClassName:function(){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['2']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['4']++;var host=this.host,NAME=(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['1'][0]++,host)&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['1'][1]++,host.constructor.NAME)||(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['1'][2]++,this.constructor.NAME);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['5']++;if((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['3'][0]++,host)&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['3'][1]++,host.getClassName)){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['2'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['6']++;return host.getClassName.apply(host,arguments);}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['2'][1]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['7']++;return Y.ClassNameManager.getClassName.apply(Y.ClassNameManager,[NAME].concat(toArray(arguments,0,true)));}},render:function(){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['3']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['8']++;var table=this.get('container'),thead=(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['4'][0]++,this.theadNode)||(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['4'][1]++,this.theadNode=this._createTHeadNode()),columns=this.columns,defaults={_colspan:1,_rowspan:1,abbr:'',title:''},i,len,j,jlen,col,html,content,values;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['9']++;if((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['6'][0]++,thead)&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['6'][1]++,columns)){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['5'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['10']++;html='';__cov_oz_EZwVpuABhbsLfLpaJeQ.s['11']++;if(columns.length){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['7'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['12']++;for(i=0,len=columns.length;i<len;++i){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['13']++;content='';__cov_oz_EZwVpuABhbsLfLpaJeQ.s['14']++;for(j=0,jlen=columns[i].length;j<jlen;++j){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['15']++;col=columns[i][j];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['16']++;values=Y.merge(defaults,col,{className:this.getClassName('header'),content:(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['8'][0]++,col.label)||(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['8'][1]++,col.key)||(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['8'][2]++,'Column '+(j+1))});__cov_oz_EZwVpuABhbsLfLpaJeQ.s['17']++;values._id=col._id?(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['9'][0]++,' data-yui3-col-id="'+col._id+'"'):(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['9'][1]++,'');__cov_oz_EZwVpuABhbsLfLpaJeQ.s['18']++;if(col.abbr){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['10'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['19']++;values.abbr=' abbr="'+col.abbr+'"';}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['10'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['20']++;if(col.title){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['11'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['21']++;values.title=' title="'+col.title+'"';}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['11'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['22']++;if(col.className){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['12'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['23']++;values.className+=' '+col.className;}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['12'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['24']++;if(col._first){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['13'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['25']++;values.className+=' '+this.getClassName('first','header');}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['13'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['26']++;if(col._id){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['14'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['27']++;values.className+=' '+this.getClassName('col',col._id);}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['14'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['28']++;content+=fromTemplate((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['15'][0]++,col.headerTemplate)||(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['15'][1]++,this.CELL_TEMPLATE),values);}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['29']++;html+=fromTemplate(this.ROW_TEMPLATE,{content:content});}}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['7'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['30']++;thead.setHTML(html);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['31']++;if(thead.get('parentNode')!==table){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['16'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['32']++;table.insertBefore(thead,table.one('tfoot, tbody'));}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['16'][1]++;}}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['5'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['33']++;this.bindUI();__cov_oz_EZwVpuABhbsLfLpaJeQ.s['34']++;return this;},_afterColumnsChange:function(e){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['4']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['35']++;this.columns=this._parseColumns(e.newVal);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['36']++;this.render();},bindUI:function(){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['5']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['37']++;if(!this._eventHandles.columnsChange){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['17'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['38']++;this._eventHandles.columnsChange=this.after('columnsChange',Y.bind('_afterColumnsChange',this));}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['17'][1]++;}},_createTHeadNode:function(){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['6']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['39']++;return Y.Node.create(fromTemplate(this.THEAD_TEMPLATE,{className:this.getClassName('columns')}));},destructor:function(){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['7']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['40']++;new Y.EventHandle(Y.Object.values(this._eventHandles)).detach();},initializer:function(config){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['8']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['41']++;this.host=config.host;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['42']++;this.columns=this._parseColumns(config.columns);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['43']++;this._eventHandles=[];},_parseColumns:function(data){__cov_oz_EZwVpuABhbsLfLpaJeQ.f['9']++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['44']++;var columns=[],stack=[],rowSpan=1,entry,row,col,children,parent,i,len,j;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['45']++;if((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['19'][0]++,isArray(data))&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['19'][1]++,data.length)){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['18'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['46']++;data=data.slice();__cov_oz_EZwVpuABhbsLfLpaJeQ.s['47']++;stack.push([data,-1]);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['48']++;while(stack.length){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['49']++;entry=stack[stack.length-1];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['50']++;row=entry[0];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['51']++;i=entry[1]+1;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['52']++;for(len=row.length;i<len;++i){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['53']++;row[i]=col=Y.merge(row[i]);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['54']++;children=col.children;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['55']++;Y.stamp(col);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['56']++;if(!col.id){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['20'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['57']++;col.id=Y.guid();}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['20'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['58']++;if((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['22'][0]++,isArray(children))&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['22'][1]++,children.length)){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['21'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['59']++;stack.push([children,-1]);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['60']++;entry[1]=i;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['61']++;rowSpan=Math.max(rowSpan,stack.length);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['62']++;break;}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['21'][1]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['63']++;col._colspan=1;}}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['64']++;if(i>=len){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['23'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['65']++;if(stack.length>1){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['24'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['66']++;entry=stack[stack.length-2];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['67']++;parent=entry[0][entry[1]];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['68']++;parent._colspan=0;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['69']++;for(i=0,len=row.length;i<len;++i){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['70']++;row[i]._parent=parent;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['71']++;parent._colspan+=row[i]._colspan;}}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['24'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['72']++;stack.pop();}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['23'][1]++;}}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['73']++;for(i=0;i<rowSpan;++i){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['74']++;columns.push([]);}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['75']++;stack.push([data,-1]);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['76']++;while(stack.length){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['77']++;entry=stack[stack.length-1];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['78']++;row=entry[0];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['79']++;i=entry[1]+1;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['80']++;for(len=row.length;i<len;++i){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['81']++;col=row[i];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['82']++;children=col.children;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['83']++;columns[stack.length-1].push(col);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['84']++;entry[1]=i;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['85']++;col._headers=[col.id];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['86']++;for(j=stack.length-2;j>=0;--j){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['87']++;parent=stack[j][0][stack[j][1]];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['88']++;col._headers.unshift(parent.id);}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['89']++;if((__cov_oz_EZwVpuABhbsLfLpaJeQ.b['26'][0]++,children)&&(__cov_oz_EZwVpuABhbsLfLpaJeQ.b['26'][1]++,children.length)){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['25'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['90']++;stack.push([children,-1]);__cov_oz_EZwVpuABhbsLfLpaJeQ.s['91']++;break;}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['25'][1]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['92']++;col._rowspan=rowSpan-stack.length+1;}}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['93']++;if(i>=len){__cov_oz_EZwVpuABhbsLfLpaJeQ.b['27'][0]++;__cov_oz_EZwVpuABhbsLfLpaJeQ.s['94']++;stack.pop();}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['27'][1]++;}}}else{__cov_oz_EZwVpuABhbsLfLpaJeQ.b['18'][1]++;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['95']++;for(i=0,len=columns.length;i<len;i+=col._rowspan){__cov_oz_EZwVpuABhbsLfLpaJeQ.s['96']++;col=columns[i][0];__cov_oz_EZwVpuABhbsLfLpaJeQ.s['97']++;col._first=true;}__cov_oz_EZwVpuABhbsLfLpaJeQ.s['98']++;return columns;}});},'3.16.0',{'requires':['datatable-core','view','classnamemanager']});
  