text: export const displayBehaviors=function(SuperClass){return class extends SuperClass{static get properties(){let props={bordered:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},caption:{type:String,value:null,notify:!0},columnHeader:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},csvData:{type:String,value:""},condensed:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},data:{type:Array,value:[],notify:!0,observer:"_dataChanged"},dataCsv:{type:String},filter:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},footer:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},rowHeader:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},responsive:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},sort:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},striped:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0},thead:{type:Array,computed:"_getThead(data,columnHeader)"},tbody:{type:Array,computed:"_getTbody(data,columnHeader,footer)"},tfoot:{type:Array,computed:"_getTfoot(data,footer)"}};return super.properties&&(props=Object.assign(props,super.properties)),props}constructor(){super(),import("../../../@polymer/iron-ajax/iron-ajax.js")}CSVtoArray(text){let l,p="",row=[""],ret=[row],i=0,r=0,s=!0;for(l in text)'"'===(l=text[l])?(s&&l===p&&(row[i]+=l),s=!s):","===l&&s?l=row[++i]="":"\n"===l&&s?("\r"===p&&(row[i]=row[i].slice(0,-1)),row=ret[++r]=[l=""],i=0):row[i]+=l,p=l;return ret}getTableCSV(){return this.data.map(row=>row.map(cell=>(cell=this._replaceBlankCell(cell),this._isNumeric(cell)?cell.replace(/,/g,""):`"${cell}"`)).join(",")).join("\n")}getTableHTML(){let getTR=(tr,open="td",close="td")=>{let th=this.rowHeader?tr.slice(0,1):[],td=this.rowHeader?tr.slice(1):tr;return`\n\t\t<tr>${th.map(cell=>`\n\t\t\t<th scope="row">${this._replaceBlankCell(cell)}</th>`).join("")}${td.map(cell=>`\n\t\t\t<${open}>${this._replaceBlankCell(cell)}</${close}>`).join("")}\n\t\t</tr>`},headers=this.thead.map(tr=>getTR(tr,'th scope="col"',"th")),body=this.tbody.map(tr=>getTR(tr)),footer=this.tfoot.map(tr=>getTR(tr));return["<table>",""!==this.caption?`\n\t<caption>\n\t\t${this.caption}\n\t</caption>`:"",headers.length>0?`\n\t<thead>${headers.join("")}\n\t</thead>`:"",body.length>0?`\n\t<tbody>${body.join("")}\n\t</tbody>`:"",footer.length>0?`\n\t<tfoot>${footer.join("")}\n\t</tfoot>`:"","\n</table>"].join("")}getTableProperties(){return{bordered:this.hideBordered?null:this.bordered,caption:this.caption,columnHeader:this.columnHeader,condensed:this.hideCondensed?null:this.condensed,data:this.data,filter:this.hideFilter?null:this.filter,footer:this.footer,rowHeader:this.rowHeader,responsive:this.hideResponsive?null:this.responsive,sort:this.hideSort?null:this.sort,striped:this.hideStriped?null:this.striped,summary:this.summary}}importHTML(table){let data=[].slice.call(table.querySelectorAll("tr")).map(row=>[].slice.call(row.querySelectorAll("th,td")).map(cell=>"string"==typeof cell.innerHTML?cell.innerHTML.trim():cell.innerHTML));data.length>0&&data[0].length>0&&this.set("data",data),this.columnHeader=this.columnHeader||table.querySelectorAll("thead").length>0,this.rowHeader=this.rowHeader||table.querySelectorAll("tbody th").length>0,this.footer=this.footer||table.querySelectorAll("tfoot").length>0,this.caption=null!==this.caption?this.caption:table.querySelectorAll("caption").length>0?table.querySelector("caption").innerHTML.trim():null}_loadExternalData(e){let data=this.CSVtoArray(this.csvData);data.length>0&&data[0].length>0&&this.set("data",data)}_getTbody(data,columnHeader,footer){if(null!=data&&data.length>0&&data[0].length>0){let ch=columnHeader?1:0,ft=footer?data.length-1:data.length;return data.slice(ch,ft)}}_getTfoot(data,footer){return data.length>0&&data[0].length>0&&footer?data.slice(data.length-1):[]}_getThead(data,columnHeader){return data.length>0&&data[0].length>0&&columnHeader?data.slice(0,1):[]}_replaceBlankCell(cell){return""===String(cell).trim()?"-":cell}_isNumeric(cell){return null!==cell&&!isNaN(cell.trim().replace(/\$/g,""))}}};export const cellBehaviors=function(SuperClass){return class extends SuperClass{_getLabel(index,row){if(row)return index+1;{let numerals="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),results=this._getLetter(index).split("-").reverse(),label="";for(let i=0;i<results.length;i++)""!==results[i]&&(label+=numerals[results[i]]);return label}}_getLetter(index){let place=Math.floor(index/26),letters="";return letters+=index-26*place+"-",place>0&&place<26?letters+=place-1+"-":place>=26&&(letters+=this._getLetter(place-1)),letters}}};