Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jspdf-autotable

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jspdf-autotable - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

4

dist/jspdf.plugin.autotable.min.js
/*!
*
* jsPDF AutoTable plugin v3.2.1
* jsPDF AutoTable plugin v3.2.2
*

@@ -17,2 +17,2 @@ * Copyright (c) 2014 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable

@license MIT
*/var s=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,r=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var i in n=Object(arguments[l]))d.call(n,i)&&(r[i]=n[i]);if(s){o=s(n);for(var a=0;a<o.length;a++)u.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(8),r=n(10),l=n(11),i=n(0);n(15);var a=n(1),s=n(6);s.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.setupState(this);var n=l.parseInput(t);return r.calculateWidths(n),o.drawTable(n),n.finalY=n.cursor.y,this.previousAutoTable=n,this.lastAutoTable=n,this.autoTable.previous=n,a.applyUserStyles(),i.resetState(),this},s.API.lastAutoTable=!1,s.API.previousAutoTable=!1,s.API.autoTable.previous=!1,s.API.autoTableSetDefaults=function(t){return i.setDefaults(t,this),this},s.autoTableSetDefaults=function(t,e){return i.setDefaults(t,e),this},s.API.autoTableHtmlToJson=function(r,l){if(l=l||!1,!(r&&r instanceof HTMLTableElement))return console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson"),null;for(var i={},a=[],t=r.rows[0],e=0;e<t.cells.length;e++){var n=t.cells[e],o=window.getComputedStyle(n);!l&&"none"===o.display||(i[e]=n)}var s=function(t){var n=r.rows[t],e=window.getComputedStyle(n);if(l||"none"!==e.display){var o=[];Object.keys(i).forEach(function(t){var e=n.cells[t];o.push(e)}),a.push(o)}};for(e=1;e<r.rows.length;e++)s(e);return{columns:Object.keys(i).map(function(t){return i[t]}),rows:a,data:a}},s.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.previousAutoTable.finalY instead.");var t=this.previousAutoTable;return t.cursor&&"number"==typeof t.cursor.y?t.cursor.y:0},s.API.autoTableAddPageContent=function(t){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),s.API.autoTable.globalDefaults||(s.API.autoTable.globalDefaults={}),s.API.autoTable.globalDefaults.addPageContent=t,this},s.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var p=n(2),a=n(1),y=n(4),m=n(0),o=n(5);function r(e,t,n){var o={},r=m.default().table,l=function(t){var e=m.default().table,n=e.margin("bottom"),o=e.settings.showFoot;(!0===o||"everyPage"===o||"lastPage"===o&&t)&&(n+=e.footHeight);return m.default().pageHeight()-e.cursor.y-n}(t);if(l<e.maxCellHeight)if(l<function(l){return m.default().table.columns.reduce(function(t,e){var n=l.cells[e.index];if(!n)return 0;var o=n.styles.fontSize/m.default().scaleFactor()*p.FONT_ROW_RATIO,r=n.padding("vertical")+o;return t<r?r:t},0)}(e)||"avoid"===r.settings.rowPageBreak&&!function(t){var e=m.default().table,n=m.default().pageHeight()-e.margin("top")-e.margin("bottom");return t.maxCellHeight>n}(e))b(n);else{e.spansMultiplePages=!0;for(var i=0;i<r.columns.length;i++){var a=r.columns[i],s=e.cells[a.index];if(s){var d=s.styles.fontSize/m.default().scaleFactor()*p.FONT_ROW_RATIO,u=s.padding("vertical"),c=Math.floor((l-u)/d);if(Array.isArray(s.text)&&s.text.length>c){o[a.index]=s.text.splice(c,s.text.length);var h=Math.floor(s.text.length*d);1===s.rowSpan&&(e.height=Math.min(e.height,h));var f=new y.Cell(s,s.styles,s.section);f.height=s.height,f.width=s.width,f.text=o[a.index],n.cells[a.index]=f}else if(s.height>l){var g=new y.Cell(s,s.styles,s.section);g.height=s.height,g.width=s.width,g.text=[],n.cells[a.index]=g}s.height=Math.min(l,s.height)}}}v(e),n&&0!==Object.keys(n.cells).length&&Object.keys(n.cells).forEach(function(t){n.cells[t].height-=e.height})}function v(t){var e=m.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x,e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var n=0,o=e.columns;n<o.length;n++){var r=o[n],l=t.cells[r.index];if(l)if(a.applyStyles(l.styles),l.x=e.cursor.x,l.y=t.y,"top"===l.styles.valign?l.textPos.y=e.cursor.y+l.padding("top"):"bottom"===l.styles.valign?l.textPos.y=e.cursor.y+l.height-l.padding("bottom"):l.textPos.y=e.cursor.y+l.height/2,"right"===l.styles.halign?l.textPos.x=l.x+l.width-l.padding("right"):"center"===l.styles.halign?l.textPos.x=l.x+l.width/2:l.textPos.x=l.x+l.padding("left"),!1!==e.callCellHooks(e.cellHooks.willDrawCell,l,t,r)){var i=a.getFillStyle(l.styles);i&&m.default().doc.rect(l.x,e.cursor.y,l.width,l.height,i),m.default().doc.autoTableText(l.text,l.textPos.x,l.textPos.y,{halign:l.styles.halign,valign:l.styles.valign,maxWidth:l.width-l.padding("left")-l.padding("right")}),e.callCellHooks(e.cellHooks.didDrawCell,l,t,r),e.cursor.x+=r.width}else e.cursor.x+=r.width;else e.cursor.x+=r.width}e.cursor.y+=t.height}function b(e){var t=m.default().table;if(a.applyUserStyles(),!0!==t.settings.showFoot&&"everyPage"!==t.settings.showFoot||t.foot.forEach(function(t){return v(t)}),t.finalY=t.cursor.y,t.callEndPageHooks(),a.addTableBorder(),l(m.default().doc),t.pageNumber++,t.cursor={x:t.margin("left"),y:t.margin("top")},t.pageStartX=t.cursor.x,t.pageStartY=t.cursor.y,!0!==t.settings.showHead&&"everyPage"!==t.settings.showHead||t.head.forEach(function(t){return v(t)}),e&&0!==Object.keys(e.cells).length){var n=o({},e);n.height=0,Object.keys(e.cells).forEach(function(t){n.maxCellHeight<e.cells[t].height&&(n.maxCellHeight=e.cells[t].height),1<e.cells[t].rowSpan||(n.height=e.cells[t].height)}),e.cells={},r(n,!1,e)}}function l(t){var e=m.default().pageNumber();t.setPage(e+1),m.default().pageNumber()===e&&t.addPage()}e.drawTable=function(n){var t=n.settings;n.cursor={x:n.margin("left"),y:null==t.startY?n.margin("top"):t.startY};var e=t.startY+n.margin("bottom")+n.headHeight+n.footHeight;"avoid"===t.pageBreak&&(e+=n.height),("always"===t.pageBreak||null!=t.startY&&!1!==t.startY&&e>m.default().pageHeight())&&(l(m.default().doc),n.cursor.y=n.margin("top")),n.pageStartX=n.cursor.x,n.pageStartY=n.cursor.y,n.startPageNumber=m.default().pageNumber();var o=new y.Row([],0,"body");o.index=-1,a.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||n.head.forEach(function(t){return v(t)}),a.applyUserStyles(),n.body.forEach(function(t,e){r(t,e===n.body.length-1,o)}),a.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||n.foot.forEach(function(t){return v(t)}),a.addTableBorder(),n.callEndPageHooks()},e.addPage=b},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),i=(Object.defineProperty(a.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),a);function a(){var t=l.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=l.default().doc}e.HookData=i;var s,d=(r(u,s=i),u);function u(t,e,n){var o=s.call(this)||this;return o.cell=t,o.row=e,o.column=n,o.section=e.section,o}e.CellHookData=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(2),g=n(1),p=n(0);e.calculateWidths=function(t){10/p.default().scaleFactor()*t.columns.length>t.width?console.error("Columns could not fit on page"):t.minWidth>t.width&&console.error("Column widths to wide and can't fit page"),function t(e,n,o){for(var r=0;r<e.length;r++){var l=e[r],i=l.wrappedWidth/o,a=n*i,s=l.wrappedWidth+a;if(!(s>=l.minWidth)){l.width=l.minWidth+1/p.default().scaleFactor(),o-=l.wrappedWidth,e.splice(r,1),t(e,n,o);break}l.width=s}}(t.columns.slice(0),t.width-t.wrappedWidth,t.wrappedWidth),function(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var o=e[n],r=null,l=0,i=0,a=0;a<t.columns.length;a++){var s=t.columns[a],d=null;if(1<(i-=1)&&t.columns[a+1])l+=s.width,delete o.cells[s.index];else{if(r)d=r,delete o.cells[s.index],r=null;else{if(!(d=o.cells[s.index]))continue;if(i=d.colSpan,l=0,1<d.colSpan){r=d,l+=s.width;continue}}d.width=s.width+l}}}(t),function(t){for(var e={count:0,height:0},n=0,o=t.allRows();n<o.length;n++){for(var r=o[n],l=0,i=t.columns;l<i.length;l++){var a=i[l],s=r.cells[a.index];if(s){g.applyStyles(s.styles);var d=s.width-s.padding("horizontal");"linebreak"===s.styles.overflow?s.text=p.default().doc.splitTextToSize(s.text,d+1/(p.default().scaleFactor()||1),{fontSize:s.styles.fontSize}):"ellipsize"===s.styles.overflow?s.text=g.ellipsize(s.text,d,s.styles):"hidden"===s.styles.overflow?s.text=g.ellipsize(s.text,d,s.styles,""):"function"==typeof s.styles.overflow&&(s.text=s.styles.overflow(s.text,d));var u=Array.isArray(s.text)?s.text.length:1,c=s.styles.fontSize/p.default().scaleFactor()*f.FONT_ROW_RATIO;s.contentHeight=u*c+s.padding("vertical"),s.styles.minCellHeight>s.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var h=s.contentHeight/s.rowSpan;1<s.rowSpan&&e.count*e.height<h*s.rowSpan?e={height:h,count:s.rowSpan}:e&&0<e.count&&e.height>h&&(h=e.height),h>r.height&&(r.height=h,r.maxCellHeight=h,r.maxCellLineCount=u)}}e.count--}}(t),function(t){for(var e={},n=1,o=t.allRows(),r=0;r<o.length;r++){for(var l=o[r],i=0,a=t.columns;i<a.length;i++){var s=a[i],d=e[s.index];if(1<n)n--,delete l.cells[s.index];else if(d)d.cell.height+=l.height,d.cell.height>l.maxCellHeight&&(d.row.maxCellHeight=d.cell.height,d.row.maxCellLineCount=Array.isArray(d.cell.text)?d.cell.text.length:1),n=d.cell.colSpan,delete l.cells[s.index],d.left--,d.left<=1&&delete e[s.index];else{var u=l.cells[s.index];if(!u)continue;if(u.height=l.height,1<u.rowSpan){var c=o.length-r,h=u.rowSpan>c?c:u.rowSpan;e[s.index]={cell:u,left:h,row:l}}}}"head"===l.section&&(t.headHeight+=l.maxCellHeight),"foot"===l.section&&(t.footHeight+=l.maxCellHeight),t.height+=l.height}}(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var P=n(4),W=n(2),m=n(12),H=n(3),v=n(1),O=n(0),b=n(14);e.parseInput=function(t){var e=function(t){{if(1===t.length)return t[0];var e=t[2]||{};return e.body=t[1],e.columns=t[0],e.columns.forEach(function(t){null==t.header&&(t.header=t.title)}),e}}(t),n=[O.getGlobalOptions(),O.getDocumentOptions(),e];b.default(n);var o=new P.Table;(O.default().table=o).id=e.tableId;var r=O.default().doc;o.userStyles={textColor:r.getTextColor?r.getTextColor():0,fontSize:r.internal.getFontSize(),fontStyle:r.internal.getFont().fontStyle,font:r.internal.getFont().fontName};for(var l=function(e){var t=n.map(function(t){return t[e]||{}});o.styles[e]=H.assign.apply(void 0,[{}].concat(t))},i=0,a=Object.keys(o.styles);i<a.length;i++){l(a[i])}for(var s=0,d=n;s<d.length;s++)for(var u=d[s],c=0,h=Object.keys(o.cellHooks);c<h.length;c++){var f=h[c];u&&"function"==typeof u[f]&&o.cellHooks[f].push(u[f])}o.settings=H.assign.apply(void 0,[{},W.defaultConfig()].concat(n)),o.settings.margin=v.marginOrPadding(o.settings.margin,W.defaultConfig().margin),"auto"===o.settings.theme&&(o.settings.theme=o.settings.useCss?"plain":"striped"),!1===o.settings.startY&&delete o.settings.startY;var g=O.default().doc.previousAutoTable,p=g&&g.startPageNumber+g.pageNumber-1===O.default().pageNumber();null==o.settings.startY&&p&&(o.settings.startY=g.finalY+20/O.default().scaleFactor());var y={};return o.settings.html&&(y=m.parseHtml(o.settings.html,o.settings.includeHiddenHtml,o.settings.useCss)||{}),o.settings.head=y.head||o.settings.head||[],o.settings.body=y.body||o.settings.body||[],o.settings.foot=y.foot||o.settings.foot||[],function(C){var n=C.settings;C.columns=function(t){{if(t.columns)return t.columns.map(function(t,e){var n=t.dataKey||t.key||e;return new P.Column(n,t,e)});var r=t.head[0]||t.body[0]||t.foot[0],l=[];return Object.keys(r).filter(function(t){return"_element"!==t}).forEach(function(t){for(var e=r[t].colSpan||1,n=0;n<e;n++){var o=void 0;o=Array.isArray(r)?l.length:t+(0<n?"_"+n:""),l.push(new P.Column(o,o,l.length))}}),l}}(n);for(var t=function(x){var S={},t=n[x];if(0===t.length&&n.columns&&"body"!==x){var e=function(t,o){var r={};return t.columns.forEach(function(t){var e=t.raw;if("head"===o){var n=e&&e.header?e.header:e;n&&(r[t.dataKey]=n)}else"foot"===o&&e.footer&&(r[t.dataKey]=e.footer)}),0<Object.keys(r).length?r:null}(C,x);e&&t.push(e)}t.forEach(function(t,e){var n=0,o=new P.Row(t,e,x);C[x].push(o);for(var r,l,i,a,s,d,u,c,h,f=0,g=0,p=0,y=C.columns;p<y.length;p++){var m=y[p];if(null==S[m.index]||0===S[m.index].left)if(0===g){var v=void 0;v=Array.isArray(t)?t[m.index-f-n]:t[m.dataKey];var b=(r=x,l=m,i=e,d=void 0,a=O.default().table,s=W.getTheme(a.settings.theme),d=[s.table,s[r],a.styles.styles,a.styles[r+"Styles"]],u=a.styles.columnStyles[l.dataKey]||a.styles.columnStyles[l.index]||{},c="body"===r?u:{},h="body"===r&&i%2==0?H.assign({},s.alternateRow,a.styles.alternateRowStyles):{},H.assign.apply(void 0,[W.defaultStyles()].concat(d.concat([h,c])))),w=new P.Cell(v,b,x);o.cells[m.dataKey]=w,o.cells[m.index]=w,C.callCellHooks(C.cellHooks.didParseCell,w,o,m),g=w.colSpan-1,S[m.index]={left:w.rowSpan-1,times:g}}else g--,f++;else S[m.index].left--,g=S[m.index].times,n++}})},e=0,o=["head","body","foot"];e<o.length;e++){t(o[e])}C.allRows().forEach(function(t){for(var e=0,n=C.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r&&1===r.colSpan)r.wrappedWidth>o.wrappedWidth&&(o.wrappedWidth=r.wrappedWidth),r.minWidth>o.minWidth&&(o.minWidth=r.minWidth);else{var l=(C.styles.columnStyles[o.dataKey]||C.styles.columnStyles[o.index]||{}).cellWidth;l&&(o.minWidth=l,o.wrappedWidth=l)}r&&1<r.colSpan&&!o.minWidth&&(o.minWidth=r.minWidth),r&&1<r.colSpan&&!o.wrappedWidth&&(o.wrappedWidth=r.minWidth)}})}(o),o.minWidth=o.columns.reduce(function(t,e){return t+e.minWidth},0),o.wrappedWidth=o.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof o.settings.tableWidth?o.width=o.settings.tableWidth:"wrap"===o.settings.tableWidth?o.width=o.wrappedWidth:o.width=O.default().pageWidth()-o.margin("left")-o.margin("right"),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(13),g=n(0);function a(t,e,n,o){var r=[];if(!e)return r;for(var l=0;l<e.rows.length;l++){for(var i=e.rows[l],a=[],s=o?f.parseCss(i,g.default().scaleFactor(),["cellPadding","lineWidth","lineColor"]):{},d=0;d<i.cells.length;d++){var u=i.cells[d],c=t.getComputedStyle(u);if(n||"none"!==c.display){var h=o?f.parseCss(u,g.default().scaleFactor()):{};a.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:o?h:null,_element:u,content:p(u)})}}0<a.length&&(n||"none"!==s.display)&&(a._element=i,r.push(a))}return r}function p(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split("<br>").map(function(t){return t.trim()}).join("\n"),e.innerText||e.textContent||""}e.parseHtml=function(t,e,n){var o;if(void 0===e&&(e=!1),void 0===n&&(n=!1),o="string"==typeof t?window.document.querySelector(t):t){for(var r=a(window,o.tHead,e,n),l=[],i=0;i<o.tBodies.length;i++)l=l.concat(a(window,o.tBodies[i],e,n));return{head:r,body:l,foot:a(window,o.tFoot,e,n)}}console.error("Html table could not be found with input: ",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),s=n(0);function d(t,e){var n=function t(e,n){if(!e)return null;var o=window.getComputedStyle(e)[n];return"rgba(0, 0, 0, 0)"===o||"transparent"===o||"initial"===o||"inherit"===o?t(e.parentElement,n):o}(t,e);if(!n)return null;var o=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!o||!Array.isArray(o))return null;var r=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])];return 0===parseInt(o[4])||isNaN(r[0])||isNaN(r[1])||isNaN(r[2])?null:r}e.parseCss=function(t,e,o){void 0===o&&(o=[]);var r={},n=window.getComputedStyle(t);function l(t,e,n){void 0===n&&(n=[]),0!==n.length&&-1===n.indexOf(e)||-1!==o.indexOf(t)||0!==e&&!e||(r[t]=e)}l("fillColor",d(t,"backgroundColor")),l("fontStyle",function(t){var e="";("bold"===t.fontWeight||"bolder"===t.fontWeight||700<=parseInt(t.fontWeight))&&(e+="bold");"italic"!==t.fontStyle&&"oblique"!==t.fontStyle||(e+="italic");return e}(n)),l("textColor",d(t,"color")),l("halign",n.textAlign,["left","right","center","justify"]),l("valign",n.verticalAlign,["middle","bottom","top"]),l("fontSize",parseInt(n.fontSize||"")/(96/72)),l("cellPadding",function(t,e,n,o){if(!t)return null;var r=96/(72/o),l=(parseInt(n)-parseInt(e))/o/2,i=t.split(" ").map(function(t){return parseInt(t)/r});i=a.marginOrPadding(i,0),l>i.top&&(i.top=l);l>i.bottom&&(i.bottom=l);return i}(n.padding,n.fontSize,n.lineHeight,e)),l("lineWidth",parseInt(n.borderTopWidth||"")/(96/72)/e),l("lineColor",d(t,"borderTopColor"));var i=(n.fontFamily||"").toLowerCase();return s.default().doc.getFontList()[i]&&l("font",i),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);function a(t){t.rowHeight?(console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."),t.minCellHeight||(t.minCellHeight=t.rowHeight)):t.columnWidth&&(console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."),t.cellWidth||(t.cellWidth=t.columnWidth))}e.default=function(t){for(var e=function(o){o&&"object"!=typeof o&&console.error("The options parameter should be of type object, is: "+typeof o),void 0!==o.extendWidth&&(o.tableWidth=o.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==o.margins&&(void 0===o.margin&&(o.margin=o.margins),console.error("Use of deprecated option: margins, use margin instead.")),o.startY&&"number"!=typeof o.startY&&(console.error("Invalid value for startY option",o.startY),delete o.startY),!o.didDrawPage&&(o.afterPageContent||o.beforePageContent||o.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),o.didDrawPage=function(t){i.applyUserStyles(),o.beforePageContent&&o.beforePageContent(t),i.applyUserStyles(),o.afterPageContent&&o.afterPageContent(t),i.applyUserStyles(),o.afterPageAdd&&1<t.pageNumber&&t.afterPageAdd(t),i.applyUserStyles()}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(t){o[t]&&console.error('The "'+t+'" hook has changed in version 3.0, check the changelog for how to migrate.')}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(t){var e=t[0],n=t[1];o[n]&&(console.error("Use of deprecated option "+n+". Use "+e+" instead"),o[e]=o[n])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(t){var e="string"==typeof t?t:t[0],n="string"==typeof t?t:t[1];void 0!==o[e]&&(void 0===o.styles[n]&&(o.styles[n]=o[e]),console.error("Use of deprecated option: "+e+", use the style "+n+" instead."))});for(var t=0,e=["styles","bodyStyles","headStyles","footStyles"];t<e.length;t++){a(o[e[t]]||{})}for(var n=o.columnStyles||{},r=0,l=Object.keys(n);r<l.length;r++){a(n[l[r]]||{})}},n=0,o=t;n<o.length;n++){e(o[n])}}},function(t,e,n){n(6).API.autoTableText=function(t,e,n,o){o=o||{};"number"==typeof e&&"number"==typeof n||console.error("The x and y parameters are required. Missing for text: ",t);var r=this.internal.scaleFactor,l=this.internal.getFontSize()/r,i=null,a=1;if("middle"!==o.valign&&"bottom"!==o.valign&&"center"!==o.halign&&"right"!==o.halign||(a=(i="string"==typeof t?t.split(/\r\n|\r|\n/g):t).length||1),n+=l*(2-1.15),"middle"===o.valign?n-=a/2*l*1.15:"bottom"===o.valign&&(n-=a*l*1.15),"center"===o.halign||"right"===o.halign){var s=l;if("center"===o.halign&&(s*=.5),1<=a){for(var d=0;d<i.length;d++)this.text(i[d],e-this.getStringUnitWidth(i[d])*s,n),n+=1.15*l;return this}e-=this.getStringUnitWidth(t)*s}return"justify"===o.halign?this.text(t,e,n,{maxWidth:o.maxWidth||100,align:"justify"}):this.text(t,e,n),this}}],r.c=l,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7);function r(t){if(l[t])return l[t].exports;var e=l[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,l});
*/var s=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,r=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var i in n=Object(arguments[l]))d.call(n,i)&&(r[i]=n[i]);if(s){o=s(n);for(var a=0;a<o.length;a++)u.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(8),r=n(10),l=n(11),i=n(0);n(15);var a=n(1),s=n(6);s.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.setupState(this);var n=l.parseInput(t);return r.calculateWidths(n),o.drawTable(n),n.finalY=n.cursor.y,this.previousAutoTable=n,this.lastAutoTable=n,this.autoTable.previous=n,a.applyUserStyles(),i.resetState(),this},s.API.lastAutoTable=!1,s.API.previousAutoTable=!1,s.API.autoTable.previous=!1,s.API.autoTableSetDefaults=function(t){return i.setDefaults(t,this),this},s.autoTableSetDefaults=function(t,e){return i.setDefaults(t,e),this},s.API.autoTableHtmlToJson=function(r,l){if(l=l||!1,!(r&&r instanceof HTMLTableElement))return console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson"),null;for(var i={},a=[],t=r.rows[0],e=0;e<t.cells.length;e++){var n=t.cells[e],o=window.getComputedStyle(n);!l&&"none"===o.display||(i[e]=n)}var s=function(t){var n=r.rows[t],e=window.getComputedStyle(n);if(l||"none"!==e.display){var o=[];Object.keys(i).forEach(function(t){var e=n.cells[t];o.push(e)}),a.push(o)}};for(e=1;e<r.rows.length;e++)s(e);return{columns:Object.keys(i).map(function(t){return i[t]}),rows:a,data:a}},s.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.previousAutoTable.finalY instead.");var t=this.previousAutoTable;return t.cursor&&"number"==typeof t.cursor.y?t.cursor.y:0},s.API.autoTableAddPageContent=function(t){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),s.API.autoTable.globalDefaults||(s.API.autoTable.globalDefaults={}),s.API.autoTable.globalDefaults.addPageContent=t,this},s.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var p=n(2),a=n(1),y=n(4),m=n(0),o=n(5);function r(e,t,n){var o={},r=m.default().table,l=function(t){var e=m.default().table,n=e.margin("bottom"),o=e.settings.showFoot;(!0===o||"everyPage"===o||"lastPage"===o&&t)&&(n+=e.footHeight);return m.default().pageHeight()-e.cursor.y-n}(t);if(l<e.maxCellHeight)if(l<function(l){return m.default().table.columns.reduce(function(t,e){var n=l.cells[e.index];if(!n)return 0;var o=n.styles.fontSize/m.default().scaleFactor()*p.FONT_ROW_RATIO,r=n.padding("vertical")+o;return t<r?r:t},0)}(e)||"avoid"===r.settings.rowPageBreak&&!function(t){var e=m.default().table,n=m.default().pageHeight()-e.margin("top")-e.margin("bottom");return t.maxCellHeight>n}(e))b(n);else{e.spansMultiplePages=!0;for(var i=0;i<r.columns.length;i++){var a=r.columns[i],s=e.cells[a.index];if(s){var d=s.styles.fontSize/m.default().scaleFactor()*p.FONT_ROW_RATIO,u=s.padding("vertical"),c=Math.floor((l-u)/d);if(Array.isArray(s.text)&&s.text.length>c){o[a.index]=s.text.splice(c,s.text.length);var h=Math.floor(s.text.length*d);1===s.rowSpan&&(e.height=Math.min(e.height,h));var f=new y.Cell(s,s.styles,s.section);f.height=s.height,f.width=s.width,f.text=o[a.index],n.cells[a.index]=f}else if(s.height>l){var g=new y.Cell(s,s.styles,s.section);g.height=s.height,g.width=s.width,g.text=[],n.cells[a.index]=g}s.height=Math.min(l,s.height)}}}v(e),n&&0!==Object.keys(n.cells).length&&Object.keys(n.cells).forEach(function(t){n.cells[t].height-=e.height})}function v(t){var e=m.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x,e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var n=0,o=e.columns;n<o.length;n++){var r=o[n],l=t.cells[r.index];if(l)if(a.applyStyles(l.styles),l.x=e.cursor.x,l.y=t.y,"top"===l.styles.valign?l.textPos.y=e.cursor.y+l.padding("top"):"bottom"===l.styles.valign?l.textPos.y=e.cursor.y+l.height-l.padding("bottom"):l.textPos.y=e.cursor.y+l.height/2,"right"===l.styles.halign?l.textPos.x=l.x+l.width-l.padding("right"):"center"===l.styles.halign?l.textPos.x=l.x+l.width/2:l.textPos.x=l.x+l.padding("left"),!1!==e.callCellHooks(e.cellHooks.willDrawCell,l,t,r)){var i=a.getFillStyle(l.styles);i&&m.default().doc.rect(l.x,e.cursor.y,l.width,l.height,i),m.default().doc.autoTableText(l.text,l.textPos.x,l.textPos.y,{halign:l.styles.halign,valign:l.styles.valign,maxWidth:l.width-l.padding("left")-l.padding("right")}),e.callCellHooks(e.cellHooks.didDrawCell,l,t,r),e.cursor.x+=r.width}else e.cursor.x+=r.width;else e.cursor.x+=r.width}e.cursor.y+=t.height}function b(e){var t=m.default().table;if(a.applyUserStyles(),!0!==t.settings.showFoot&&"everyPage"!==t.settings.showFoot||t.foot.forEach(function(t){return v(t)}),t.finalY=t.cursor.y,t.callEndPageHooks(),a.addTableBorder(),l(m.default().doc),t.pageNumber++,t.cursor={x:t.margin("left"),y:t.margin("top")},t.pageStartX=t.cursor.x,t.pageStartY=t.cursor.y,!0!==t.settings.showHead&&"everyPage"!==t.settings.showHead||t.head.forEach(function(t){return v(t)}),e&&0!==Object.keys(e.cells).length){var n=o({},e);n.height=0,Object.keys(e.cells).forEach(function(t){n.maxCellHeight<e.cells[t].height&&(n.maxCellHeight=e.cells[t].height),1<e.cells[t].rowSpan||(n.height=e.cells[t].height)}),e.cells={},r(n,!1,e)}}function l(t){var e=m.default().pageNumber();t.setPage(e+1),m.default().pageNumber()===e&&t.addPage()}e.drawTable=function(n){var t=n.settings;n.cursor={x:n.margin("left"),y:null==t.startY?n.margin("top"):t.startY};var e=t.startY+n.margin("bottom")+n.headHeight+n.footHeight;"avoid"===t.pageBreak&&(e+=n.height),("always"===t.pageBreak||null!=t.startY&&!1!==t.startY&&e>m.default().pageHeight())&&(l(m.default().doc),n.cursor.y=n.margin("top")),n.pageStartX=n.cursor.x,n.pageStartY=n.cursor.y,n.startPageNumber=m.default().pageNumber();var o=new y.Row([],0,"body");o.index=-1,a.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||n.head.forEach(function(t){return v(t)}),a.applyUserStyles(),n.body.forEach(function(t,e){r(t,e===n.body.length-1,o)}),a.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||n.foot.forEach(function(t){return v(t)}),a.addTableBorder(),n.callEndPageHooks()},e.addPage=b},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),i=(Object.defineProperty(a.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),a);function a(){var t=l.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=l.default().doc}e.HookData=i;var s,d=(r(u,s=i),u);function u(t,e,n){var o=s.call(this)||this;return o.cell=t,o.row=e,o.column=n,o.section=e.section,o}e.CellHookData=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(2),g=n(1),p=n(0);e.calculateWidths=function(t){10/p.default().scaleFactor()*t.columns.length>t.width?console.error("Columns could not fit on page"):t.minWidth>t.width&&console.error("Column widths to wide and can't fit page"),function t(e,n,o){for(var r=0;r<e.length;r++){var l=e[r],i=l.wrappedWidth/o,a=n*i,s=l.wrappedWidth+a;if(!(s>=l.minWidth)){l.width=l.minWidth+1/p.default().scaleFactor(),o-=l.wrappedWidth,e.splice(r,1),t(e,n,o);break}l.width=s}}(t.columns.slice(0),t.width-t.wrappedWidth,t.wrappedWidth),function(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var o=e[n],r=null,l=0,i=0,a=0;a<t.columns.length;a++){var s=t.columns[a],d=null;if(1<(i-=1)&&t.columns[a+1])l+=s.width,delete o.cells[s.index];else{if(r)d=r,delete o.cells[s.index],r=null;else{if(!(d=o.cells[s.index]))continue;if(i=d.colSpan,l=0,1<d.colSpan){r=d,l+=s.width;continue}}d.width=s.width+l}}}(t),function(t){for(var e={count:0,height:0},n=0,o=t.allRows();n<o.length;n++){for(var r=o[n],l=0,i=t.columns;l<i.length;l++){var a=i[l],s=r.cells[a.index];if(s){g.applyStyles(s.styles);var d=s.width-s.padding("horizontal");"linebreak"===s.styles.overflow?s.text=p.default().doc.splitTextToSize(s.text,d+1/(p.default().scaleFactor()||1),{fontSize:s.styles.fontSize}):"ellipsize"===s.styles.overflow?s.text=g.ellipsize(s.text,d,s.styles):"hidden"===s.styles.overflow?s.text=g.ellipsize(s.text,d,s.styles,""):"function"==typeof s.styles.overflow&&(s.text=s.styles.overflow(s.text,d));var u=Array.isArray(s.text)?s.text.length:1,c=s.styles.fontSize/p.default().scaleFactor()*f.FONT_ROW_RATIO;s.contentHeight=u*c+s.padding("vertical"),s.styles.minCellHeight>s.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var h=s.contentHeight/s.rowSpan;1<s.rowSpan&&e.count*e.height<h*s.rowSpan?e={height:h,count:s.rowSpan}:e&&0<e.count&&e.height>h&&(h=e.height),h>r.height&&(r.height=h,r.maxCellHeight=h,r.maxCellLineCount=u)}}e.count--}}(t),function(t){for(var e={},n=1,o=t.allRows(),r=0;r<o.length;r++){for(var l=o[r],i=0,a=t.columns;i<a.length;i++){var s=a[i],d=e[s.index];if(1<n)n--,delete l.cells[s.index];else if(d)d.cell.height+=l.height,d.cell.height>l.maxCellHeight&&(d.row.maxCellHeight=d.cell.height,d.row.maxCellLineCount=Array.isArray(d.cell.text)?d.cell.text.length:1),n=d.cell.colSpan,delete l.cells[s.index],d.left--,d.left<=1&&delete e[s.index];else{var u=l.cells[s.index];if(!u)continue;if(u.height=l.height,1<u.rowSpan){var c=o.length-r,h=u.rowSpan>c?c:u.rowSpan;e[s.index]={cell:u,left:h,row:l}}}}"head"===l.section&&(t.headHeight+=l.maxCellHeight),"foot"===l.section&&(t.footHeight+=l.maxCellHeight),t.height+=l.height}}(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var P=n(4),W=n(2),m=n(12),H=n(3),v=n(1),O=n(0),b=n(14);e.parseInput=function(t){var e=function(t){{if(1===t.length)return t[0];var e=t[2]||{};return e.body=t[1],e.columns=t[0],e.columns.forEach(function(t){null==t.header&&(t.header=t.title)}),e}}(t),n=[O.getGlobalOptions(),O.getDocumentOptions(),e];b.default(n);var o=new P.Table;(O.default().table=o).id=e.tableId;var r=O.default().doc;o.userStyles={textColor:r.getTextColor?r.getTextColor():0,fontSize:r.internal.getFontSize(),fontStyle:r.internal.getFont().fontStyle,font:r.internal.getFont().fontName};for(var l=function(e){var t=n.map(function(t){return t[e]||{}});o.styles[e]=H.assign.apply(void 0,[{}].concat(t))},i=0,a=Object.keys(o.styles);i<a.length;i++){l(a[i])}for(var s=0,d=n;s<d.length;s++)for(var u=d[s],c=0,h=Object.keys(o.cellHooks);c<h.length;c++){var f=h[c];u&&"function"==typeof u[f]&&o.cellHooks[f].push(u[f])}o.settings=H.assign.apply(void 0,[{},W.defaultConfig()].concat(n)),o.settings.margin=v.marginOrPadding(o.settings.margin,W.defaultConfig().margin),"auto"===o.settings.theme&&(o.settings.theme=o.settings.useCss?"plain":"striped"),!1===o.settings.startY&&delete o.settings.startY;var g=O.default().doc.previousAutoTable,p=g&&g.startPageNumber+g.pageNumber-1===O.default().pageNumber();null==o.settings.startY&&p&&(o.settings.startY=g.finalY+20/O.default().scaleFactor());var y={};return o.settings.html&&(y=m.parseHtml(o.settings.html,o.settings.includeHiddenHtml,o.settings.useCss)||{}),o.settings.head=y.head||o.settings.head||[],o.settings.body=y.body||o.settings.body||[],o.settings.foot=y.foot||o.settings.foot||[],function(C){var n=C.settings;C.columns=function(t){{if(t.columns)return t.columns.map(function(t,e){var n=t.dataKey||t.key||e;return new P.Column(n,t,e)});var r=t.head[0]||t.body[0]||t.foot[0]||[],l=[];return Object.keys(r).filter(function(t){return"_element"!==t}).forEach(function(t){for(var e=r[t].colSpan||1,n=0;n<e;n++){var o=void 0;o=Array.isArray(r)?l.length:t+(0<n?"_"+n:""),l.push(new P.Column(o,o,l.length))}}),l}}(n);for(var t=function(x){var S={},t=n[x];if(0===t.length&&n.columns&&"body"!==x){var e=function(t,o){var r={};return t.columns.forEach(function(t){var e=t.raw;if("head"===o){var n=e&&e.header?e.header:e;n&&(r[t.dataKey]=n)}else"foot"===o&&e.footer&&(r[t.dataKey]=e.footer)}),0<Object.keys(r).length?r:null}(C,x);e&&t.push(e)}t.forEach(function(t,e){var n=0,o=new P.Row(t,e,x);C[x].push(o);for(var r,l,i,a,s,d,u,c,h,f=0,g=0,p=0,y=C.columns;p<y.length;p++){var m=y[p];if(null==S[m.index]||0===S[m.index].left)if(0===g){var v=void 0;v=Array.isArray(t)?t[m.index-f-n]:t[m.dataKey];var b=(r=x,l=m,i=e,d=void 0,a=O.default().table,s=W.getTheme(a.settings.theme),d=[s.table,s[r],a.styles.styles,a.styles[r+"Styles"]],u=a.styles.columnStyles[l.dataKey]||a.styles.columnStyles[l.index]||{},c="body"===r?u:{},h="body"===r&&i%2==0?H.assign({},s.alternateRow,a.styles.alternateRowStyles):{},H.assign.apply(void 0,[W.defaultStyles()].concat(d.concat([h,c])))),w=new P.Cell(v,b,x);o.cells[m.dataKey]=w,o.cells[m.index]=w,C.callCellHooks(C.cellHooks.didParseCell,w,o,m),g=w.colSpan-1,S[m.index]={left:w.rowSpan-1,times:g}}else g--,f++;else S[m.index].left--,g=S[m.index].times,n++}})},e=0,o=["head","body","foot"];e<o.length;e++){t(o[e])}C.allRows().forEach(function(t){for(var e=0,n=C.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r&&1===r.colSpan)r.wrappedWidth>o.wrappedWidth&&(o.wrappedWidth=r.wrappedWidth),r.minWidth>o.minWidth&&(o.minWidth=r.minWidth);else{var l=(C.styles.columnStyles[o.dataKey]||C.styles.columnStyles[o.index]||{}).cellWidth;l&&(o.minWidth=l,o.wrappedWidth=l)}r&&1<r.colSpan&&!o.minWidth&&(o.minWidth=r.minWidth),r&&1<r.colSpan&&!o.wrappedWidth&&(o.wrappedWidth=r.minWidth)}})}(o),o.minWidth=o.columns.reduce(function(t,e){return t+e.minWidth},0),o.wrappedWidth=o.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof o.settings.tableWidth?o.width=o.settings.tableWidth:"wrap"===o.settings.tableWidth?o.width=o.wrappedWidth:o.width=O.default().pageWidth()-o.margin("left")-o.margin("right"),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(13),g=n(0);function a(t,e,n,o){var r=[];if(!e)return r;for(var l=0;l<e.rows.length;l++){for(var i=e.rows[l],a=[],s=o?f.parseCss(i,g.default().scaleFactor(),["cellPadding","lineWidth","lineColor"]):{},d=0;d<i.cells.length;d++){var u=i.cells[d],c=t.getComputedStyle(u);if(n||"none"!==c.display){var h=o?f.parseCss(u,g.default().scaleFactor()):{};a.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:o?h:null,_element:u,content:p(u)})}}0<a.length&&(n||"none"!==s.display)&&(a._element=i,r.push(a))}return r}function p(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split("<br>").map(function(t){return t.trim()}).join("\n"),e.innerText||e.textContent||""}e.parseHtml=function(t,e,n){var o;if(void 0===e&&(e=!1),void 0===n&&(n=!1),o="string"==typeof t?window.document.querySelector(t):t){for(var r=a(window,o.tHead,e,n),l=[],i=0;i<o.tBodies.length;i++)l=l.concat(a(window,o.tBodies[i],e,n));return{head:r,body:l,foot:a(window,o.tFoot,e,n)}}console.error("Html table could not be found with input: ",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),s=n(0);function d(t,e){var n=function t(e,n){if(!e)return null;var o=window.getComputedStyle(e)[n];return"rgba(0, 0, 0, 0)"===o||"transparent"===o||"initial"===o||"inherit"===o?t(e.parentElement,n):o}(t,e);if(!n)return null;var o=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!o||!Array.isArray(o))return null;var r=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])];return 0===parseInt(o[4])||isNaN(r[0])||isNaN(r[1])||isNaN(r[2])?null:r}e.parseCss=function(t,e,o){void 0===o&&(o=[]);var r={},n=window.getComputedStyle(t);function l(t,e,n){void 0===n&&(n=[]),0!==n.length&&-1===n.indexOf(e)||-1!==o.indexOf(t)||0!==e&&!e||(r[t]=e)}l("fillColor",d(t,"backgroundColor")),l("fontStyle",function(t){var e="";("bold"===t.fontWeight||"bolder"===t.fontWeight||700<=parseInt(t.fontWeight))&&(e+="bold");"italic"!==t.fontStyle&&"oblique"!==t.fontStyle||(e+="italic");return e}(n)),l("textColor",d(t,"color")),l("halign",n.textAlign,["left","right","center","justify"]),l("valign",n.verticalAlign,["middle","bottom","top"]),l("fontSize",parseInt(n.fontSize||"")/(96/72)),l("cellPadding",function(t,e,n,o){if(!t)return null;var r=96/(72/o),l=(parseInt(n)-parseInt(e))/o/2,i=t.split(" ").map(function(t){return parseInt(t)/r});i=a.marginOrPadding(i,0),l>i.top&&(i.top=l);l>i.bottom&&(i.bottom=l);return i}(n.padding,n.fontSize,n.lineHeight,e)),l("lineWidth",parseInt(n.borderTopWidth||"")/(96/72)/e),l("lineColor",d(t,"borderTopColor"));var i=(n.fontFamily||"").toLowerCase();return s.default().doc.getFontList()[i]&&l("font",i),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);function a(t){t.rowHeight?(console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."),t.minCellHeight||(t.minCellHeight=t.rowHeight)):t.columnWidth&&(console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."),t.cellWidth||(t.cellWidth=t.columnWidth))}e.default=function(t){for(var e=function(o){o&&"object"!=typeof o&&console.error("The options parameter should be of type object, is: "+typeof o),void 0!==o.extendWidth&&(o.tableWidth=o.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==o.margins&&(void 0===o.margin&&(o.margin=o.margins),console.error("Use of deprecated option: margins, use margin instead.")),o.startY&&"number"!=typeof o.startY&&(console.error("Invalid value for startY option",o.startY),delete o.startY),!o.didDrawPage&&(o.afterPageContent||o.beforePageContent||o.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),o.didDrawPage=function(t){i.applyUserStyles(),o.beforePageContent&&o.beforePageContent(t),i.applyUserStyles(),o.afterPageContent&&o.afterPageContent(t),i.applyUserStyles(),o.afterPageAdd&&1<t.pageNumber&&t.afterPageAdd(t),i.applyUserStyles()}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(t){o[t]&&console.error('The "'+t+'" hook has changed in version 3.0, check the changelog for how to migrate.')}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(t){var e=t[0],n=t[1];o[n]&&(console.error("Use of deprecated option "+n+". Use "+e+" instead"),o[e]=o[n])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(t){var e="string"==typeof t?t:t[0],n="string"==typeof t?t:t[1];void 0!==o[e]&&(void 0===o.styles[n]&&(o.styles[n]=o[e]),console.error("Use of deprecated option: "+e+", use the style "+n+" instead."))});for(var t=0,e=["styles","bodyStyles","headStyles","footStyles"];t<e.length;t++){a(o[e[t]]||{})}for(var n=o.columnStyles||{},r=0,l=Object.keys(n);r<l.length;r++){a(n[l[r]]||{})}},n=0,o=t;n<o.length;n++){e(o[n])}}},function(t,e,n){n(6).API.autoTableText=function(t,e,n,o){o=o||{};"number"==typeof e&&"number"==typeof n||console.error("The x and y parameters are required. Missing for text: ",t);var r=this.internal.scaleFactor,l=this.internal.getFontSize()/r,i=null,a=1;if("middle"!==o.valign&&"bottom"!==o.valign&&"center"!==o.halign&&"right"!==o.halign||(a=(i="string"==typeof t?t.split(/\r\n|\r|\n/g):t).length||1),n+=l*(2-1.15),"middle"===o.valign?n-=a/2*l*1.15:"bottom"===o.valign&&(n-=a*l*1.15),"center"===o.halign||"right"===o.halign){var s=l;if("center"===o.halign&&(s*=.5),1<=a){for(var d=0;d<i.length;d++)this.text(i[d],e-this.getStringUnitWidth(i[d])*s,n),n+=1.15*l;return this}e-=this.getStringUnitWidth(t)*s}return"justify"===o.halign?this.text(t,e,n,{maxWidth:o.maxWidth||100,align:"justify"}):this.text(t,e,n),this}}],r.c=l,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7);function r(t){if(l[t])return l[t].exports;var e=l[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,l});
{
"name": "jspdf-autotable",
"version": "3.2.1",
"version": "3.2.2",
"description": "Generate pdf tables with javascript (jsPDF plugin)",

@@ -5,0 +5,0 @@ "main": "dist/jspdf.plugin.autotable.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc