{"version":3,"sources":["jsdelivr-header.js","/npm/data4node@0.1.1/lib/data4node.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACeA,IAYI,OAZA,GAAK,QAAQ,cACb,GAAK,QAAQ,MACb,KAAO,QAAQ,QAGf,OAAS,QAAQ,gBACjB,aAAe,QAAQ,kCACvB,UAAY,QAAQ,yBAExB,OAAO,IAAI,gCAIX,IAAI,OAAQ,EAER,QAAU,CACZ,mBAAoB,mBACpB,qBAAsB,qBACtB,gBAAiB,gBACjB,iBAAkB,iBAClB,UAAW,WAWb,SAAS,mBAAmB,EAAS,EAAQ,GAC3C,IAAI,EAAO,aAAa,UAAU,EAAS,EAAQ,GACnD,OAAO,aAAa,kBAAkB,EAAS,EAAQ,EACzD,CASA,SAAS,qBAAqB,EAAO,EAAQ,GAC3C,IAAI,EAAO,aAAa,UAAU,EAAO,EAAQ,GACjD,OAAO,aAAa,mBAAmB,EAAO,EAAQ,EACxD,CAOA,SAAS,gBAAgB,GACvB,OAAO,UAAU,WAAW,EAC9B,CAOA,SAAS,iBAAiB,GACxB,OAAO,UAAU,YAAY,EAC/B,CA1CA,OAAO,QAAU","file":"/npm/data4node@0.1.1/lib/data4node.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/data4node@0.1.1/lib/data4node.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n*  By Jason Chalom 2014, Entelect Software\n*  Under the MIT License\n*\n*  This is the main entry point for data4node.\n*\n*  This will take some test json data and convert to xlsx using desired styling and formatting\n*  https://github.com/natergj/excel4node\n*\n*  to use a stream and not write to file, just use buildExcelDataFromJson and push where-ever its the base-64 string\n*  always save as xlsx the other formats may not work correctly.\n*\n*  Styles must have headings\n*  Styles all have arrays for each main object. This corresponds to specific worksheets\n*  Sub-object arrays sometimes correspond to headings, or image number or cell locations.\n*  cells have a ws prop which is the worksheet number, computer readable\n*\n*  custStyles are linked directly at the cell level\ns*/\n\n//requirements\nvar xl = require('excel4node');\nvar fs = require('fs');\nvar http = require('http');\n//var debugg = require('debug')('xcl');\n\nvar helper = require('./helpers.js');\nvar excel_export = require('./excel_export/excel_export.js');\nvar babelFish = require('./parser/babelFish.js'); //an opening for some evil\n\nhelper.log(\"Excel converter has started.\");\n\n/*config*/\nvar config;\nvar debug = false;\n\nvar exposed = {\n  createExcelReports: createExcelReports,\n  createExcelTimeTable: createExcelTimeTable,\n  createCsvReport: createCsvReport,\n  createScsvReport: createScsvReport,\n  babelFish: babelFish\n};\nmodule.exports = exposed;\n\n/**\n * Generate an Excel report using specified settings and json file\n * @param      {Object}   reports or json object with data\n * @param      {Object}   styles configuration\n * @param      {Object}   configuration file\n * @jsFiddle   A jsFiddle embed URL\n */\nfunction createExcelReports(reports, styles, configuration) {\n  var file = excel_export.setConfig(reports, styles, configuration);\n  return excel_export.makeExcelDocument(reports, styles, file);\n}\n\n/**\n * Generate an Excel timetable using specified settings and json file\n * @param      {Object}   times or json object with data\n * @param      {Object}   styles configuration\n * @param      {Object}   configuration file\n * @jsFiddle   A jsFiddle embed URL\n */\nfunction createExcelTimeTable(times, styles, configuration) {\n  var file = excel_export.setConfig(times, styles, configuration);\n  return excel_export.makeExcelTimeTable(times, styles, file);\n}\n\n/**\n * Generate an csv output stream from json data\n * @param      {Object}   json object with data\n * @jsFiddle   A jsFiddle embed URL\n */\nfunction createCsvReport(data){\n  return babelFish.parseToCsv(data);\n}\n\n/**\n * Generate an scsv output stream from json data\n * @param      {Object}   json object with data\n * @jsFiddle   A jsFiddle embed URL\n */\nfunction createScsvReport(data){\n  return babelFish.parseToScsv(data);\n}\n"]}