@loaders.gl/csv 3.0.9 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,5 +4,5 @@ Papa Parse
4
4
  v5.0.0-beta.0
5
5
  https://github.com/mholt/PapaParse
6
6
  License: MIT
7
- */var i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},o={};function a(e){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=f(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new s(t),this._handle.streamer=this,this._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&h(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1;var r=this._partialLine+e;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var o=i.meta.cursor;this._finished||(this._partialLine=r.substring(o-this._baseIndex),this._baseIndex=o),i&&i.data&&(this._rowCount+=i.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(h(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return;i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!a||!h(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||i&&i.meta.paused||this._nextChunk(),i}},this._sendError=function(e){h(this._config.error)&&this._config.error(e)}}function u(e){var t;e=e||{},a.call(this,e),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,n=e?t.substr(0,e):t;return t=e?t.substr(e):"",this._finished=!t,this.parseChunk(n)}}}function s(e){var t,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,a=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,u=this,s=0,d=0,y=!1,p=!1,m=[],v={data:[],errors:[],meta:{}};if(h(e.step)){var b=e.step;e.step=function(t){if(v=t,O())w();else{if(w(),!v.data||0===v.data.length)return;s+=t.data.length,e.preview&&s>e.preview?n.abort():b(v,u)}}}function g(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){if(v&&r&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<v.data.length;t++)g(v.data[t])&&v.data.splice(t--,1);return O()&&function(){if(!v)return;function t(t){h(e.transformHeader)&&(t=e.transformHeader(t)),m.push(t)}if(Array.isArray(v.data[0])){for(var n=0;O()&&n<v.data.length;n++)v.data[n].forEach(t);v.data.splice(0,1)}else v.data.forEach(t)}(),function(){if(!v||!v.data||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var r,i=e.header?{}:[];for(r=0;r<t.length;r++){var o=r,a=t[r];e.header&&(o=r>=m.length?"__parsed_extra":m[r]),e.transform&&(a=e.transform(a,o)),a=T(o,a),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(a)):i[o]=a}return e.header&&(r>m.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,d+n):r<m.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,d+n)),i}var n=1;!v.data[0]||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0);e.header&&v.meta&&(v.meta.fields=m);return d+=n,v}()}function O(){return e.header&&0===m.length}function T(t,n){return function(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}(t)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(i.test(n)?parseFloat(n):a.test(n)?new Date(n):""===n?null:n):n}function j(e,t,n,r){v.errors.push({type:e,code:t,message:n,row:r})}this.parse=function(i,a,u){var s=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substr(0,1048576);var n=new RegExp(c(t)+"([^]*?)"+c(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.split("\n"),o=i.length>1&&i[0].length<r[0].length;if(1===r.length||o)return"\n";for(var a=0,u=0;u<r.length;u++)"\n"===r[u][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(i,s)),r=!1,e.delimiter)h(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var d=function(t,n,r,i,a){var u,s,c;a=a||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<a.length;f++){var h=a[f],d=0,y=0,p=0;c=void 0;for(var m=new l({comments:i,delimiter:h,newline:n,preview:10}).parse(t),v=0;v<m.data.length;v++)if(r&&g(m.data[v]))p++;else{var b=m.data[v].length;y+=b,void 0!==c?b>1&&(d+=Math.abs(b-c),c=b):c=0}m.data.length>0&&(y/=m.data.length-p),(void 0===s||d>s)&&y>1.99&&(s=d,u=h)}return e.delimiter=u,{successful:!!u,bestDelimiter:u}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);d.successful?e.delimiter=d.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),v.meta.delimiter=e.delimiter}var p=f(e);return e.preview&&e.header&&p.preview++,t=i,n=new l(p),v=n.parse(t,a,u),w(),y?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=t.substr(n.getCharIndex())},this.resume=function(){y=!1,u.streamer.parseChunk(t,!0)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),v.meta.aborted=!0,h(e.complete)&&e.complete(v),t=""}}function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,a=e.step,u=e.preview,s=e.fastMode,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=e.escapeChar),("string"!=typeof n||o.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||o.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,d=!1;this.parse=function(e,o,y){if("string"!=typeof e)throw new Error("Input must be a string");var p=e.length,m=n.length,v=r.length,b=i.length,g=h(a);f=0;var w=[],O=[],T=[],j=0;if(!e)return B();if(s||!1!==s&&-1===e.indexOf(t)){for(var S=e.split(r),_=0;_<S.length;_++){if(T=S[_],f+=T.length,_!==S.length-1)f+=r.length;else if(y)return B();if(!i||T.substr(0,b)!==i){if(g){if(w=[],x(T.split(n)),F(),d)return B()}else x(T.split(n));if(u&&_>=u)return w=w.slice(0,u),B(!0)}}return B()}for(var k,P=e.indexOf(n,f),I=e.indexOf(r,f),A=new RegExp(c(l)+c(t),"g");;)if(e[f]!==t)if(i&&0===T.length&&e.substr(f,b)===i){if(-1===I)return B();f=I+v,I=e.indexOf(r,f),P=e.indexOf(n,f)}else if(-1!==P&&(P<I||-1===I))T.push(e.substring(f,P)),f=P+m,P=e.indexOf(n,f);else{if(-1===I)break;if(T.push(e.substring(f,I)),C(I+v),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0)}else{for(k=f,f++;;){if(-1===(k=e.indexOf(t,k+1)))return y||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:f}),R();if(k===p-1)return R(e.substring(f,k).replace(A,t));if(t!==l||e[k+1]!==l){if(t===l||0===k||e[k-1]!==l){var M=E(-1===I?P:Math.min(P,I));if(e[k+1+M]===n){if(T.push(e.substring(f,k).replace(A,t)),f=k+1+M+m,P=e.indexOf(n,f),I=e.indexOf(r,f),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0);break}var D=E(I);if(e.substr(k+1+D,v)===r){if(T.push(e.substring(f,k).replace(A,t)),C(k+1+D+v),P=e.indexOf(n,f),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:f}),k++}}else k++}if(g&&(F(),d))return B();if(u&&w.length>=u)return B(!0)}return R();function x(e){w.push(e),j=f}function E(t){var n=0;if(-1!==t){var r=e.substring(k+1,t);r&&""===r.trim()&&(n=r.length)}return n}function R(t){return y||(void 0===t&&(t=e.substr(f)),T.push(t),f=p,x(T),g&&F()),B()}function C(t){f=t,x(T),T=[],I=e.indexOf(r,f)}function B(e,t){return{data:t||!1?w[0]:w,errors:O,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:j+(o||0)}}}function F(){a(B(void 0,!0)),w=[],O=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return f}}function f(e){if("object"!==r(e)||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=f(e[n]);return t}function h(e){return"function"==typeof e}e.exports=o,o.parse=function(e,t,n){var r=(t=t||{}).dynamicTyping||!1;h(r)&&(t.dynamicTypingFunction=r,r={});if(t.dynamicTyping=r,t.transform=!!h(t.transform)&&t.transform,t.worker&&o.WORKERS_SUPPORTED){var i=newWorker();return i.userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=h(t.step),t.chunk=h(t.chunk),t.complete=h(t.complete),t.error=h(t.error),delete t.worker,void i.postMessage({input:e,config:t,workerId:i.id})}var a=null;"string"==typeof e&&(a=new u(t));a||(a=new n(t));return a.stream(e)},o.unparse=function(e,t){var n=!1,i=!0,a=",",u="\r\n",s='"',l=s+s,f=!1,h=null;!function(){if("object"!==r(t))return;"string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(a=t.delimiter);("boolean"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(f=t.skipEmptyLines);"string"==typeof t.newline&&(u=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(i=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");h=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s)}();var d=new RegExp(c(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,f);if("object"===r(e[0]))return p(h||y(e[0]),e,f)}else if("object"===r(e))return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:y(e.data[0])),Array.isArray(e.data[0])||"object"===r(e.data[0])||(e.data=[e.data])),p(e.fields||[],e.data||[],f);throw new Error("Unable to serialize unrecognized input");function y(e){if("object"!==r(e))return[];var t=[];for(var n in e)t.push(n);return t}function p(e,t,n){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&e.length>0,s=!Array.isArray(t[0]);if(o&&i){for(var c=0;c<e.length;c++)c>0&&(r+=a),r+=m(e[c],c);t.length>0&&(r+=u)}for(var l=0;l<t.length;l++){var f=o?e.length:t[l].length,h=!1,d=o?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!o&&(h="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&o){for(var y=[],p=0;p<f;p++){var v=s?e[p]:p;y.push(t[l][v])}h=""===y.join("").trim()}if(!h){for(var b=0;b<f;b++){b>0&&!d&&(r+=a);var g=o&&s?e[b]:b;r+=m(t[l][g],b)}l<t.length-1&&(!n||f>0&&!d)&&(r+=u)}}return r}function m(e,t){return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(e=e.toString().replace(d,l),"boolean"==typeof n&&n||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}(e,o.BAD_DELIMITERS)||e.indexOf(a)>-1||" "===e.charAt(0)||" "===e.charAt(e.length-1)?s+e+s:e)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!1,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=l,o.ParserHandle=s,o.ChunkStreamer=a,o.StringStreamer=u,u.prototype=Object.create(u.prototype),u.prototype.constructor=u},function(e,t,n){"use strict";(function(t){var r=n(7),i="undefined"==typeof window?t:window;i.loaders=i.loaders||{},e.exports=Object.assign(i.loaders,r)}).call(this,n(6))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CSVLoader",{enumerable:!0,get:function(){return r.CSVLoader}});var r=n(8)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typecheckCSVLoader=t.CSVLoader=void 0;var r=n(9),i=a(n(4)),o=a(n(22));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,u,"next",e)}function u(e){f(o,r,i,a,u,"throw",e)}a(void 0)}))}}var d,y={csv:{shape:"object-row-table",optimizeMemoryUsage:!1,header:"auto",columnPrefix:"column",quoteChar:'"',escapeChar:'"',dynamicTyping:!0,comments:!1,skipEmptyLines:!0,delimitersToGuess:[",","\t","|",";"]}},p={id:"csv",module:"csv",name:"CSV",version:"3.0.9",extensions:["csv"],mimeTypes:["text/csv"],category:"table",parse:(d=h(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m((new TextDecoder).decode(t),n));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return d.apply(this,arguments)}),parseText:function(e,t){return m(e,t)},parseInBatches:function(e,t){var n;"auto"===(t=c({},t)).batchSize&&(t.batchSize=4e3);var a=c(c({},y.csv),null===(n=t)||void 0===n?void 0:n.csv),s=new r.AsyncQueue,l=!0,f=null,h=null,d=null,p=c(c({},a),{},{header:!1,download:!1,chunkSize:5242880,skipEmptyLines:!1,step:function(e){var n=e.data;if(a.skipEmptyLines&&""===n.flat().join("").trim())return;var i=e.meta.cursor;if(l&&!f&&("auto"===a.header?b(n):Boolean(a.header)))return void(f=n.map(w()));l&&(l=!1,f||(f=O(a.columnPrefix,n.length)),d=function(e,t){for(var n=t?{}:[],r=0;r<e.length;r++){var i=t&&t[r]||r;switch(u(e[r])){case"number":case"boolean":n[i]={name:String(i),index:r,type:Float32Array};break;case"string":default:n[i]={name:String(i),index:r,type:Array}}}return n}(n,f)),a.optimizeMemoryUsage&&(n=JSON.parse(JSON.stringify(n))),h=h||new r.TableBatchBuilder(d,c({shape:a.shape||"array-row-table"},t));try{h.addRow(n);var o=h&&h.getFullBatch({bytesUsed:i});o&&s.enqueue(o)}catch(e){s.enqueue(e)}},complete:function(e){try{var t=e.meta.cursor,n=h&&h.getFinalBatch({bytesUsed:t});n&&s.enqueue(n)}catch(e){s.enqueue(e)}s.close()}});return i.default.parse(e,p,o.default),s},options:y};function m(e,t){return v.apply(this,arguments)}function v(){return(v=h(regeneratorRuntime.mark((function e(t,n){var o,a,u,s,l,f,h,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=c(c({},y.csv),null==n?void 0:n.csv),a=g(t),u="auto"===o.header?b(a):Boolean(o.header),s=u,l=c(c({},o),{},{header:s,download:!1,transformHeader:s?w():void 0,error:function(e){throw new Error(e)}}),f=i.default.parse(t,l),h=f.data,d=f.meta.fields||O(o.columnPrefix,a.length),e.t0=o.shape,e.next="object-row-table"===e.t0?11:"array-row-table"===e.t0?13:15;break;case 11:return h=h.map((function(e){return Array.isArray(e)?(0,r.convertToObjectRow)(e,d):e})),e.abrupt("break",15);case 13:return h=h.map((function(e){return Array.isArray(e)?e:(0,r.convertToArrayRow)(e,d)})),e.abrupt("break",15);case 15:return e.abrupt("return",h);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return e&&e.every((function(e){return"string"==typeof e}))}function g(e){return i.default.parse(e,{download:!1,dynamicTyping:!0,preview:1}).data[0]}function w(){var e=new Set;return function(t){for(var n=t,r=1;e.has(n);)n="".concat(t,".").concat(r),r++;return e.add(n),n}}function O(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=0;r<t;r++)n.push("".concat(e).concat(r+1));return n}t.CSVLoader=p;var T=p;t._typecheckCSVLoader=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TableBatchBuilder",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"RowTableBatchAggregator",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ColumnarTableBatchAggregator",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"convertToObjectRow",{enumerable:!0,get:function(){return a.convertToObjectRow}}),Object.defineProperty(t,"convertToArrayRow",{enumerable:!0,get:function(){return a.convertToArrayRow}}),Object.defineProperty(t,"getMeshSize",{enumerable:!0,get:function(){return u.getMeshSize}}),Object.defineProperty(t,"getMeshBoundingBox",{enumerable:!0,get:function(){return u.getMeshBoundingBox}}),Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return s.Schema}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return s.Field}}),Object.defineProperty(t,"DataType",{enumerable:!0,get:function(){return s.DataType}}),Object.defineProperty(t,"Null",{enumerable:!0,get:function(){return s.Null}}),Object.defineProperty(t,"Binary",{enumerable:!0,get:function(){return s.Binary}}),Object.defineProperty(t,"Bool",{enumerable:!0,get:function(){return s.Bool}}),Object.defineProperty(t,"Int",{enumerable:!0,get:function(){return s.Int}}),Object.defineProperty(t,"Int8",{enumerable:!0,get:function(){return s.Int8}}),Object.defineProperty(t,"Int16",{enumerable:!0,get:function(){return s.Int16}}),Object.defineProperty(t,"Int32",{enumerable:!0,get:function(){return s.Int32}}),Object.defineProperty(t,"Int64",{enumerable:!0,get:function(){return s.Int64}}),Object.defineProperty(t,"Uint8",{enumerable:!0,get:function(){return s.Uint8}}),Object.defineProperty(t,"Uint16",{enumerable:!0,get:function(){return s.Uint16}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return s.Uint32}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return s.Uint64}}),Object.defineProperty(t,"Float",{enumerable:!0,get:function(){return s.Float}}),Object.defineProperty(t,"Float16",{enumerable:!0,get:function(){return s.Float16}}),Object.defineProperty(t,"Float32",{enumerable:!0,get:function(){return s.Float32}}),Object.defineProperty(t,"Float64",{enumerable:!0,get:function(){return s.Float64}}),Object.defineProperty(t,"Utf8",{enumerable:!0,get:function(){return s.Utf8}}),Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return s.Date}}),Object.defineProperty(t,"DateDay",{enumerable:!0,get:function(){return s.DateDay}}),Object.defineProperty(t,"DateMillisecond",{enumerable:!0,get:function(){return s.DateMillisecond}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return s.Time}}),Object.defineProperty(t,"TimeMillisecond",{enumerable:!0,get:function(){return s.TimeMillisecond}}),Object.defineProperty(t,"TimeSecond",{enumerable:!0,get:function(){return s.TimeSecond}}),Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return s.Timestamp}}),Object.defineProperty(t,"TimestampSecond",{enumerable:!0,get:function(){return s.TimestampSecond}}),Object.defineProperty(t,"TimestampMillisecond",{enumerable:!0,get:function(){return s.TimestampMillisecond}}),Object.defineProperty(t,"TimestampMicrosecond",{enumerable:!0,get:function(){return s.TimestampMicrosecond}}),Object.defineProperty(t,"TimestampNanosecond",{enumerable:!0,get:function(){return s.TimestampNanosecond}}),Object.defineProperty(t,"Interval",{enumerable:!0,get:function(){return s.Interval}}),Object.defineProperty(t,"IntervalDayTime",{enumerable:!0,get:function(){return s.IntervalDayTime}}),Object.defineProperty(t,"IntervalYearMonth",{enumerable:!0,get:function(){return s.IntervalYearMonth}}),Object.defineProperty(t,"FixedSizeList",{enumerable:!0,get:function(){return s.FixedSizeList}}),Object.defineProperty(t,"deduceTableSchema",{enumerable:!0,get:function(){return c.deduceTableSchema}}),Object.defineProperty(t,"getTypeInfo",{enumerable:!0,get:function(){return l.getTypeInfo}}),Object.defineProperty(t,"getArrowTypeFromTypedArray",{enumerable:!0,get:function(){return f.getArrowTypeFromTypedArray}}),Object.defineProperty(t,"AsyncQueue",{enumerable:!0,get:function(){return h.default}});var r=d(n(10)),i=d(n(1)),o=d(n(3)),a=n(2),u=n(12),s=n(0),c=n(18),l=n(19),f=n(20),h=d(n(21));function d(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(11)),i=a(n(1)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"schema",void 0),l(this,"options",void 0),l(this,"aggregator",null),l(this,"batchCount",0),l(this,"bytesUsed",0),l(this,"isChunkComplete",!1),l(this,"lastBatchEmittedMs",Date.now()),l(this,"totalLength",0),l(this,"totalBytes",0),l(this,"rowBytes",0),this.schema=t,this.options=s(s({},f),n)}var t,n,a;return t=e,(n=[{key:"limitReached",value:function(){var e,t;return!!(Boolean(null===(e=this.options)||void 0===e?void 0:e.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(t=this.options)||void 0===t?void 0:t._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(e){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(e),this.totalBytes+=this.rowBytes,Array.isArray(e)?this.addArrayRow(e):this.addObjectRow(e))}},{key:"addArrayRow",value:function(e){if(!this.aggregator){var t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addArrayRow(e)}},{key:"addObjectRow",value:function(e){if(!this.aggregator){var t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addObjectRow(e)}},{key:"chunkComplete",value:function(e){e instanceof ArrayBuffer&&(this.bytesUsed+=e.byteLength),"string"==typeof e&&(this.bytesUsed+=e.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(e){return this._isFull()?this._getBatch(e):null}},{key:"getFinalBatch",value:function(e){return this._getBatch(e)}},{key:"_estimateRowMB",value:function(e){return Array.isArray(e)?8*e.length:8*Object.keys(e).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs||(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),0))}},{key:"_getBatch",value:function(e){if(!this.aggregator)return null;null!=e&&e.bytesUsed&&(this.bytesUsed=e.bytesUsed);var t=this.aggregator.getBatch();return t.count=this.batchCount,t.bytesUsed=this.bytesUsed,Object.assign(t,e),this.batchCount++,this.aggregator=null,t}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return r.default;case"array-row-table":case"object-row-table":return i.default;case"columnar-table":return o.default;case"arrow-table":if(!e.ArrowBatch)throw new Error("TableBatchBuilder");return e.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}])&&c(t.prototype,n),a&&c(t,a),e}();t.default=h,l(h,"ArrowBatch",void 0)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"schema",void 0),i(this,"options",void 0),i(this,"length",0),i(this,"rows",null),i(this,"cursor",0),i(this,"_headers",[]),this.options=n,this.schema=t,!Array.isArray(t))for(var r in this._headers=[],t)this._headers[t[r].index]=t[r].name}var t,n,o;return t=e,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}},{key:"addObjectRow",value:function(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}},{key:"getBatch",value:function(){var e=this.rows;return e?(e=e.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:e,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMeshSize=function(e){var t=0;for(var n in e){var r=e[n];ArrayBuffer.isView(r)&&(t+=r.byteLength*r.BYTES_PER_ELEMENT)}return t},t.getMeshBoundingBox=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,u=e.POSITION?e.POSITION.value:[],s=u&&u.length,c=0;c<s;c+=3){var l=u[c],f=u[c+1],h=u[c+2];t=l<t?l:t,n=f<n?f:n,r=h<r?h:r,i=l>i?l:i,o=f>o?f:o,a=h>a?h:a}return[[t,n,r],[i,o,a]]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(14);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"fields",void 0),c(this,"metadata",void 0),(0,r.assert)(Array.isArray(t)),function(e){var t,n={},r=o(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(e){r.e(e)}finally{r.f()}}(t),this.fields=t,this.metadata=n||new Map}var t,n,i;return t=e,(n=[{key:"compareTo",value:function(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(var t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}},{key:"select",value:function(){for(var t=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var u=a[o];t[u]=!0}var s=this.fields.filter((function(e){return t[e.name]}));return new e(s,this.metadata)}},{key:"selectAt",value:function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.map((function(e){return t.fields[e]})).filter(Boolean);return new e(o,this.metadata)}},{key:"assign",value:function(t){var n,r=this.metadata;if(t instanceof e){var i=t;n=i.fields,r=f(f(new Map,this.metadata),i.metadata)}else n=t;var a,u=Object.create(null),s=o(this.fields);try{for(s.s();!(a=s.n()).done;){var c=a.value;u[c.name]=c}}catch(e){s.e(e)}finally{s.f()}var l,h=o(n);try{for(h.s();!(l=h.n()).done;){var d=l.value;u[d.name]=d}}catch(e){h.e(e)}finally{h.f()}return new e(Object.values(u),r)}}])&&s(t.prototype,n),i&&s(t,i),e}();function f(e,t){return new Map([].concat(i(e||new Map),i(t||new Map)))}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;r(this,e),o(this,"name",void 0),o(this,"type",void 0),o(this,"nullable",void 0),o(this,"metadata",void 0),this.name=t,this.type=n,this.nullable=i,this.metadata=a}var t,n,a;return t=e,(n=[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new e(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return f.Type}}),t.FixedSizeList=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.TimeMillisecond=t.TimeSecond=t.Time=t.DateMillisecond=t.DateDay=t.Date=t.Utf8=t.Binary=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Bool=t.Null=t.DataType=void 0;var i,o,a,u,s,c,l,f=n(17);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}var T=function(){function e(){g(this,e)}return O(e,[{key:"typeId",get:function(){return f.Type.NONE}},{key:"compareTo",value:function(e){return this===e}}],[{key:"isNull",value:function(e){return e&&e.typeId===f.Type.Null}},{key:"isInt",value:function(e){return e&&e.typeId===f.Type.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===f.Type.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===f.Type.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===f.Type.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===f.Type.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===f.Type.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===f.Type.Date}},{key:"isTime",value:function(e){return e&&e.typeId===f.Type.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===f.Type.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===f.Type.Interval}},{key:"isList",value:function(e){return e&&e.typeId===f.Type.List}},{key:"isStruct",value:function(e){return e&&e.typeId===f.Type.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===f.Type.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===f.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===f.Type.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===f.Type.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===f.Type.Dictionary}}]),e}();t.DataType=T;var j=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(T);t.Null=j;var S=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Bool}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(T);t.Bool=S,i=Symbol.toStringTag;var _=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"isSigned",void 0),h(v(i),"bitWidth",void 0),i.isSigned=e,i.bitWidth=r,i}return O(n,[{key:"typeId",get:function(){return f.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(T);t.Int=_;var k=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,8)}return n}(_);t.Int8=k;var P=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,16)}return n}(_);t.Int16=P;var I=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,32)}return n}(_);t.Int32=I;var A=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,64)}return n}(_);t.Int64=A;var M=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,8)}return n}(_);t.Uint8=M;var D=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,16)}return n}(_);t.Uint16=D;var x=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,32)}return n}(_);t.Uint32=x;var E=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,64)}return n}(_);t.Uint64=E;var R=16,C=32,B=64;o=Symbol.toStringTag;var F=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"precision",void 0),r.precision=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Float}},{key:o,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(T);t.Float=F;var U=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,R)}return n}(F);t.Float16=U;var N=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,C)}return n}(F);t.Float32=N;var L=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,B)}return n}(F);t.Float64=L;var z=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this)}return O(n,[{key:"typeId",get:function(){return f.Type.Binary}},{key:"toString",value:function(){return"Binary"}},{key:Symbol.toStringTag,get:function(){return"Binary"}}]),n}(T);t.Binary=z;var q=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Utf8}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(T);t.Utf8=q;var Y={DAY:0,MILLISECOND:1};a=Symbol.toStringTag;var V=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"unit",void 0),r.unit=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Date}},{key:a,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(Y[this.unit],">")}}]),n}(T);t.Date=V;var W=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Y.DAY)}return n}(V);t.DateDay=W;var J=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Y.MILLISECOND)}return n}(V);t.DateMillisecond=J;var Q={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};u=Symbol.toStringTag;var H=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"unit",void 0),h(v(i),"bitWidth",void 0),i.unit=e,i.bitWidth=r,i}return O(n,[{key:"typeId",get:function(){return f.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Q[this.unit],">")}},{key:u,get:function(){return"Time"}}]),n}(T);t.Time=H;var $=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Q.SECOND,32)}return n}(H);t.TimeSecond=$;var K=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Q.MILLISECOND,32)}return n}(H);t.TimeMillisecond=K,s=Symbol.toStringTag;var Z=function(e){d(n,e);var t=p(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return g(this,n),h(v(r=t.call(this)),"unit",void 0),h(v(r),"timezone",void 0),r.unit=e,r.timezone=i,r}return O(n,[{key:"typeId",get:function(){return f.Type.Timestamp}},{key:s,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(Q[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(T);t.Timestamp=Z;var G=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.SECOND,e)}return n}(Z);t.TimestampSecond=G;var X=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.MILLISECOND,e)}return n}(Z);t.TimestampMillisecond=X;var ee=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.MICROSECOND,e)}return n}(Z);t.TimestampMicrosecond=ee;var te=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.NANOSECOND,e)}return n}(Z);t.TimestampNanosecond=te;var ne={DAY_TIME:0,YEAR_MONTH:1};c=Symbol.toStringTag;var re=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"unit",void 0),r.unit=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Interval}},{key:c,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(ne[this.unit],">")}}]),n}(T);t.Interval=re;var ie=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,ne.DAY_TIME)}return n}(re);t.IntervalDayTime=ie;var oe=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,ne.YEAR_MONTH)}return n}(re);t.IntervalYearMonth=oe,l=Symbol.toStringTag;var ae=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"listSize",void 0),h(v(i),"children",void 0),i.listSize=e,i.children=[r],i}return O(n,[{key:"typeId",get:function(){return f.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:l,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(T);t.FixedSizeList=ae},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Type=void 0,t.Type=r,function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(r||(t.Type=r={}))},function(e,t,n){"use strict";function r(e){return e instanceof Date?Date:e instanceof Number?Float32Array:"string"==typeof e?String:null}Object.defineProperty(t,"__esModule",{value:!0}),t.deduceTableSchema=function(e,t){var n=Array.isArray(e)?function(e){var t={};if(e.length){var n=e[0];for(var i in n){var o=n[i];t[i]=r(o)}}return t}(e):function(e){var t={};for(var n in e){var i=e[n];if(ArrayBuffer.isView(i))t[n]=i.constructor;else if(i.length){var o=i[0];t[n]=r(o)}t[n]=t[n]||null}return t}(e);return Object.assign(n,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTypeInfo=function(e){return{typeId:e.typeId,ArrayType:e.ArrayType,typeName:e.toString(),typeEnumName:o(e.typeId),precision:e.precision}};var r=n(0);var i=null;function o(e){if(!i)for(var t in i={},r.Type)i[r.Type[t]]=t;return i[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrowTypeFromTypedArray=function(e){switch(e.constructor){case Int8Array:return new r.Int8;case Uint8Array:return new r.Uint8;case Int16Array:return new r.Int16;case Uint16Array:return new r.Uint16;case Int32Array:return new r.Int32;case Uint32Array:return new r.Uint32;case Float32Array:return new r.Float32;case Float64Array:return new r.Float64;default:throw new Error("array type not supported")}};var r=n(0)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function o(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)})(e)}function d(e,t,n){return(d=y()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&p(i,n.prototype),i}).apply(null,arguments)}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.takeAsync=function(e){return g.apply(this,arguments)},t.default=void 0;var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(i,e);var t,n,r=(t=i,n=y(),function(){var e,r=m(t);if(n){var i=m(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return f(this,e)});function i(){return s(this,i),r.apply(this,arguments)}return l(i,[{key:"enqueue",value:function(e){return this.push(e)}},{key:"dequeue",value:function(){return this.shift()}}]),i}(h(Array));i=Symbol.asyncIterator;var b=function(){function e(){s(this,e),u(this,"_values",void 0),u(this,"_settlers",void 0),u(this,"_closed",void 0),this._values=new v,this._settlers=new v,this._closed=!1}return l(e,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:i,value:function(){return this}},{key:"enqueue",value:function(e){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var t=this._settlers.dequeue();e instanceof Error?t.reject(e):t.resolve({value:e})}else this._values.enqueue(e)}},{key:"next",value:function(){var e=this;if(this._values.length>0){var t=this._values.dequeue();return t instanceof Error?Promise.reject(t):Promise.resolve({value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(t,n){e._settlers.enqueue({resolve:t,reject:n})}))}}]),e}();function g(){return(g=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1/0,r=[],i=t[Symbol.asyncIterator]();case 3:if(!(r.length<n)){e.next=14;break}return e.next=6,i.next();case 6:if(o=e.sent,a=o.value,!o.done){e.next=11;break}return e.abrupt("break",14);case 11:r.push(a),e.next=3;break;case 14:return e.abrupt("return",r);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.default=b},function(e,t,n){"use strict";var r;function i(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function o(e){var t;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(t=e[Symbol.asyncIterator]),null==t&&Symbol.iterator&&(t=e[Symbol.iterator])),null==t&&(t=e["@@asyncIterator"]),null==t&&(t=e["@@iterator"]),null==t)throw new TypeError("Object is not async iterable");return t.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var a=((r=n(4))&&r.__esModule?r:{default:r}).default.ChunkStreamer;function u(e){e=e||{},a.call(this,e),this.textDecoder=new TextDecoder(this._config.encoding),this.stream=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,i,a,u,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._input=t,e.prev=1,n=!0,r=!1,e.prev=4,a=o(t);case 6:return e.next=8,a.next();case 8:return u=e.sent,n=u.done,e.next=12,u.value;case 12:if(s=e.sent,n){e.next=19;break}c=s,this.parseChunk(this.getStringChunk(c));case 16:n=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),r=!0,i=e.t0;case 25:if(e.prev=25,e.prev=26,n||null==a.return){e.next=30;break}return e.next=30,a.return();case 30:if(e.prev=30,!r){e.next=33;break}throw i;case 33:return e.finish(30);case 34:return e.finish(25);case 35:this._finished=!0,this.parseChunk(""),e.next=42;break;case 39:e.prev=39,e.t1=e.catch(1),this._sendError(e.t1);case 42:case"end":return e.stop()}}),e,this,[[1,39],[4,21,25,35],[26,,30,34]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,s,"next",e)}function s(e){i(a,r,o,u,s,"throw",e)}u(void 0)}))});return function(e){return t.apply(this,arguments)}}(),this._nextChunk=function(){},this.getStringChunk=function(e){return"string"==typeof e?e:this.textDecoder.decode(e,{stream:!0})}}u.prototype=Object.create(a.prototype),u.prototype.constructor=u}]);
7
+ */var i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},o={};function a(e){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=f(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new s(t),this._handle.streamer=this,this._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&h(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1;var r=this._partialLine+e;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var o=i.meta.cursor;this._finished||(this._partialLine=r.substring(o-this._baseIndex),this._baseIndex=o),i&&i.data&&(this._rowCount+=i.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(h(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return;i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!a||!h(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||i&&i.meta.paused||this._nextChunk(),i}},this._sendError=function(e){h(this._config.error)&&this._config.error(e)}}function u(e){var t;e=e||{},a.call(this,e),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,n=e?t.substr(0,e):t;return t=e?t.substr(e):"",this._finished=!t,this.parseChunk(n)}}}function s(e){var t,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,a=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,u=this,s=0,d=0,y=!1,p=!1,m=[],v={data:[],errors:[],meta:{}};if(h(e.step)){var b=e.step;e.step=function(t){if(v=t,O())w();else{if(w(),!v.data||0===v.data.length)return;s+=t.data.length,e.preview&&s>e.preview?n.abort():b(v,u)}}}function g(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){if(v&&r&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<v.data.length;t++)g(v.data[t])&&v.data.splice(t--,1);return O()&&function(){if(!v)return;function t(t){h(e.transformHeader)&&(t=e.transformHeader(t)),m.push(t)}if(Array.isArray(v.data[0])){for(var n=0;O()&&n<v.data.length;n++)v.data[n].forEach(t);v.data.splice(0,1)}else v.data.forEach(t)}(),function(){if(!v||!v.data||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var r,i=e.header?{}:[];for(r=0;r<t.length;r++){var o=r,a=t[r];e.header&&(o=r>=m.length?"__parsed_extra":m[r]),e.transform&&(a=e.transform(a,o)),a=T(o,a),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(a)):i[o]=a}return e.header&&(r>m.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,d+n):r<m.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,d+n)),i}var n=1;!v.data[0]||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0);e.header&&v.meta&&(v.meta.fields=m);return d+=n,v}()}function O(){return e.header&&0===m.length}function T(t,n){return function(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}(t)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(i.test(n)?parseFloat(n):a.test(n)?new Date(n):""===n?null:n):n}function j(e,t,n,r){v.errors.push({type:e,code:t,message:n,row:r})}this.parse=function(i,a,u){var s=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substr(0,1048576);var n=new RegExp(c(t)+"([^]*?)"+c(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.split("\n"),o=i.length>1&&i[0].length<r[0].length;if(1===r.length||o)return"\n";for(var a=0,u=0;u<r.length;u++)"\n"===r[u][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(i,s)),r=!1,e.delimiter)h(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var d=function(t,n,r,i,a){var u,s,c;a=a||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<a.length;f++){var h=a[f],d=0,y=0,p=0;c=void 0;for(var m=new l({comments:i,delimiter:h,newline:n,preview:10}).parse(t),v=0;v<m.data.length;v++)if(r&&g(m.data[v]))p++;else{var b=m.data[v].length;y+=b,void 0!==c?b>1&&(d+=Math.abs(b-c),c=b):c=0}m.data.length>0&&(y/=m.data.length-p),(void 0===s||d>s)&&y>1.99&&(s=d,u=h)}return e.delimiter=u,{successful:!!u,bestDelimiter:u}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);d.successful?e.delimiter=d.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),v.meta.delimiter=e.delimiter}var p=f(e);return e.preview&&e.header&&p.preview++,t=i,n=new l(p),v=n.parse(t,a,u),w(),y?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=t.substr(n.getCharIndex())},this.resume=function(){y=!1,u.streamer.parseChunk(t,!0)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),v.meta.aborted=!0,h(e.complete)&&e.complete(v),t=""}}function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,a=e.step,u=e.preview,s=e.fastMode,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=e.escapeChar),("string"!=typeof n||o.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||o.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,d=!1;this.parse=function(e,o,y){if("string"!=typeof e)throw new Error("Input must be a string");var p=e.length,m=n.length,v=r.length,b=i.length,g=h(a);f=0;var w=[],O=[],T=[],j=0;if(!e)return B();if(s||!1!==s&&-1===e.indexOf(t)){for(var S=e.split(r),_=0;_<S.length;_++){if(T=S[_],f+=T.length,_!==S.length-1)f+=r.length;else if(y)return B();if(!i||T.substr(0,b)!==i){if(g){if(w=[],x(T.split(n)),F(),d)return B()}else x(T.split(n));if(u&&_>=u)return w=w.slice(0,u),B(!0)}}return B()}for(var k,P=e.indexOf(n,f),I=e.indexOf(r,f),A=new RegExp(c(l)+c(t),"g");;)if(e[f]!==t)if(i&&0===T.length&&e.substr(f,b)===i){if(-1===I)return B();f=I+v,I=e.indexOf(r,f),P=e.indexOf(n,f)}else if(-1!==P&&(P<I||-1===I))T.push(e.substring(f,P)),f=P+m,P=e.indexOf(n,f);else{if(-1===I)break;if(T.push(e.substring(f,I)),C(I+v),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0)}else{for(k=f,f++;;){if(-1===(k=e.indexOf(t,k+1)))return y||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:f}),R();if(k===p-1)return R(e.substring(f,k).replace(A,t));if(t!==l||e[k+1]!==l){if(t===l||0===k||e[k-1]!==l){var M=E(-1===I?P:Math.min(P,I));if(e[k+1+M]===n){if(T.push(e.substring(f,k).replace(A,t)),f=k+1+M+m,P=e.indexOf(n,f),I=e.indexOf(r,f),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0);break}var D=E(I);if(e.substr(k+1+D,v)===r){if(T.push(e.substring(f,k).replace(A,t)),C(k+1+D+v),P=e.indexOf(n,f),g&&(F(),d))return B();if(u&&w.length>=u)return B(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:f}),k++}}else k++}if(g&&(F(),d))return B();if(u&&w.length>=u)return B(!0)}return R();function x(e){w.push(e),j=f}function E(t){var n=0;if(-1!==t){var r=e.substring(k+1,t);r&&""===r.trim()&&(n=r.length)}return n}function R(t){return y||(void 0===t&&(t=e.substr(f)),T.push(t),f=p,x(T),g&&F()),B()}function C(t){f=t,x(T),T=[],I=e.indexOf(r,f)}function B(e,t){return{data:t||!1?w[0]:w,errors:O,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:j+(o||0)}}}function F(){a(B(void 0,!0)),w=[],O=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return f}}function f(e){if("object"!==r(e)||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=f(e[n]);return t}function h(e){return"function"==typeof e}e.exports=o,o.parse=function(e,t,n){var r=(t=t||{}).dynamicTyping||!1;h(r)&&(t.dynamicTypingFunction=r,r={});if(t.dynamicTyping=r,t.transform=!!h(t.transform)&&t.transform,t.worker&&o.WORKERS_SUPPORTED){var i=newWorker();return i.userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=h(t.step),t.chunk=h(t.chunk),t.complete=h(t.complete),t.error=h(t.error),delete t.worker,void i.postMessage({input:e,config:t,workerId:i.id})}var a=null;"string"==typeof e&&(a=new u(t));a||(a=new n(t));return a.stream(e)},o.unparse=function(e,t){var n=!1,i=!0,a=",",u="\r\n",s='"',l=s+s,f=!1,h=null;!function(){if("object"!==r(t))return;"string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(a=t.delimiter);("boolean"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(f=t.skipEmptyLines);"string"==typeof t.newline&&(u=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(i=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");h=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s)}();var d=new RegExp(c(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,f);if("object"===r(e[0]))return p(h||y(e[0]),e,f)}else if("object"===r(e))return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:y(e.data[0])),Array.isArray(e.data[0])||"object"===r(e.data[0])||(e.data=[e.data])),p(e.fields||[],e.data||[],f);throw new Error("Unable to serialize unrecognized input");function y(e){if("object"!==r(e))return[];var t=[];for(var n in e)t.push(n);return t}function p(e,t,n){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&e.length>0,s=!Array.isArray(t[0]);if(o&&i){for(var c=0;c<e.length;c++)c>0&&(r+=a),r+=m(e[c],c);t.length>0&&(r+=u)}for(var l=0;l<t.length;l++){var f=o?e.length:t[l].length,h=!1,d=o?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!o&&(h="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&o){for(var y=[],p=0;p<f;p++){var v=s?e[p]:p;y.push(t[l][v])}h=""===y.join("").trim()}if(!h){for(var b=0;b<f;b++){b>0&&!d&&(r+=a);var g=o&&s?e[b]:b;r+=m(t[l][g],b)}l<t.length-1&&(!n||f>0&&!d)&&(r+=u)}}return r}function m(e,t){return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(e=e.toString().replace(d,l),"boolean"==typeof n&&n||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}(e,o.BAD_DELIMITERS)||e.indexOf(a)>-1||" "===e.charAt(0)||" "===e.charAt(e.length-1)?s+e+s:e)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!1,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=l,o.ParserHandle=s,o.ChunkStreamer=a,o.StringStreamer=u,u.prototype=Object.create(u.prototype),u.prototype.constructor=u},function(e,t,n){"use strict";(function(t){var r=n(7),i="undefined"==typeof window?t:window;i.loaders=i.loaders||{},e.exports=Object.assign(i.loaders,r)}).call(this,n(6))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CSVLoader",{enumerable:!0,get:function(){return r.CSVLoader}});var r=n(8)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typecheckCSVLoader=t.CSVLoader=void 0;var r=n(9),i=a(n(4)),o=a(n(22));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,u,"next",e)}function u(e){f(o,r,i,a,u,"throw",e)}a(void 0)}))}}var d,y={csv:{shape:"object-row-table",optimizeMemoryUsage:!1,header:"auto",columnPrefix:"column",quoteChar:'"',escapeChar:'"',dynamicTyping:!0,comments:!1,skipEmptyLines:!0,delimitersToGuess:[",","\t","|",";"]}},p={id:"csv",module:"csv",name:"CSV",version:"3.0.13",extensions:["csv"],mimeTypes:["text/csv"],category:"table",parse:(d=h(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m((new TextDecoder).decode(t),n));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return d.apply(this,arguments)}),parseText:function(e,t){return m(e,t)},parseInBatches:function(e,t){var n;"auto"===(t=c({},t)).batchSize&&(t.batchSize=4e3);var a=c(c({},y.csv),null===(n=t)||void 0===n?void 0:n.csv),s=new r.AsyncQueue,l=!0,f=null,h=null,d=null,p=c(c({},a),{},{header:!1,download:!1,chunkSize:5242880,skipEmptyLines:!1,step:function(e){var n=e.data;if(a.skipEmptyLines&&""===n.flat().join("").trim())return;var i=e.meta.cursor;if(l&&!f&&("auto"===a.header?b(n):Boolean(a.header)))return void(f=n.map(w()));l&&(l=!1,f||(f=O(a.columnPrefix,n.length)),d=function(e,t){for(var n=t?{}:[],r=0;r<e.length;r++){var i=t&&t[r]||r;switch(u(e[r])){case"number":case"boolean":n[i]={name:String(i),index:r,type:Float32Array};break;case"string":default:n[i]={name:String(i),index:r,type:Array}}}return n}(n,f)),a.optimizeMemoryUsage&&(n=JSON.parse(JSON.stringify(n))),h=h||new r.TableBatchBuilder(d,c({shape:a.shape||"array-row-table"},t));try{h.addRow(n);var o=h&&h.getFullBatch({bytesUsed:i});o&&s.enqueue(o)}catch(e){s.enqueue(e)}},complete:function(e){try{var t=e.meta.cursor,n=h&&h.getFinalBatch({bytesUsed:t});n&&s.enqueue(n)}catch(e){s.enqueue(e)}s.close()}});return i.default.parse(e,p,o.default),s},options:y};function m(e,t){return v.apply(this,arguments)}function v(){return(v=h(regeneratorRuntime.mark((function e(t,n){var o,a,u,s,l,f,h,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=c(c({},y.csv),null==n?void 0:n.csv),a=g(t),u="auto"===o.header?b(a):Boolean(o.header),s=u,l=c(c({},o),{},{header:s,download:!1,transformHeader:s?w():void 0,error:function(e){throw new Error(e)}}),f=i.default.parse(t,l),h=f.data,d=f.meta.fields||O(o.columnPrefix,a.length),e.t0=o.shape,e.next="object-row-table"===e.t0?11:"array-row-table"===e.t0?13:15;break;case 11:return h=h.map((function(e){return Array.isArray(e)?(0,r.convertToObjectRow)(e,d):e})),e.abrupt("break",15);case 13:return h=h.map((function(e){return Array.isArray(e)?e:(0,r.convertToArrayRow)(e,d)})),e.abrupt("break",15);case 15:return e.abrupt("return",h);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return e&&e.every((function(e){return"string"==typeof e}))}function g(e){return i.default.parse(e,{download:!1,dynamicTyping:!0,preview:1}).data[0]}function w(){var e=new Set;return function(t){for(var n=t,r=1;e.has(n);)n="".concat(t,".").concat(r),r++;return e.add(n),n}}function O(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=0;r<t;r++)n.push("".concat(e).concat(r+1));return n}t.CSVLoader=p;var T=p;t._typecheckCSVLoader=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TableBatchBuilder",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"RowTableBatchAggregator",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ColumnarTableBatchAggregator",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"convertToObjectRow",{enumerable:!0,get:function(){return a.convertToObjectRow}}),Object.defineProperty(t,"convertToArrayRow",{enumerable:!0,get:function(){return a.convertToArrayRow}}),Object.defineProperty(t,"getMeshSize",{enumerable:!0,get:function(){return u.getMeshSize}}),Object.defineProperty(t,"getMeshBoundingBox",{enumerable:!0,get:function(){return u.getMeshBoundingBox}}),Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return s.Schema}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return s.Field}}),Object.defineProperty(t,"DataType",{enumerable:!0,get:function(){return s.DataType}}),Object.defineProperty(t,"Null",{enumerable:!0,get:function(){return s.Null}}),Object.defineProperty(t,"Binary",{enumerable:!0,get:function(){return s.Binary}}),Object.defineProperty(t,"Bool",{enumerable:!0,get:function(){return s.Bool}}),Object.defineProperty(t,"Int",{enumerable:!0,get:function(){return s.Int}}),Object.defineProperty(t,"Int8",{enumerable:!0,get:function(){return s.Int8}}),Object.defineProperty(t,"Int16",{enumerable:!0,get:function(){return s.Int16}}),Object.defineProperty(t,"Int32",{enumerable:!0,get:function(){return s.Int32}}),Object.defineProperty(t,"Int64",{enumerable:!0,get:function(){return s.Int64}}),Object.defineProperty(t,"Uint8",{enumerable:!0,get:function(){return s.Uint8}}),Object.defineProperty(t,"Uint16",{enumerable:!0,get:function(){return s.Uint16}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return s.Uint32}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return s.Uint64}}),Object.defineProperty(t,"Float",{enumerable:!0,get:function(){return s.Float}}),Object.defineProperty(t,"Float16",{enumerable:!0,get:function(){return s.Float16}}),Object.defineProperty(t,"Float32",{enumerable:!0,get:function(){return s.Float32}}),Object.defineProperty(t,"Float64",{enumerable:!0,get:function(){return s.Float64}}),Object.defineProperty(t,"Utf8",{enumerable:!0,get:function(){return s.Utf8}}),Object.defineProperty(t,"Date",{enumerable:!0,get:function(){return s.Date}}),Object.defineProperty(t,"DateDay",{enumerable:!0,get:function(){return s.DateDay}}),Object.defineProperty(t,"DateMillisecond",{enumerable:!0,get:function(){return s.DateMillisecond}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return s.Time}}),Object.defineProperty(t,"TimeMillisecond",{enumerable:!0,get:function(){return s.TimeMillisecond}}),Object.defineProperty(t,"TimeSecond",{enumerable:!0,get:function(){return s.TimeSecond}}),Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return s.Timestamp}}),Object.defineProperty(t,"TimestampSecond",{enumerable:!0,get:function(){return s.TimestampSecond}}),Object.defineProperty(t,"TimestampMillisecond",{enumerable:!0,get:function(){return s.TimestampMillisecond}}),Object.defineProperty(t,"TimestampMicrosecond",{enumerable:!0,get:function(){return s.TimestampMicrosecond}}),Object.defineProperty(t,"TimestampNanosecond",{enumerable:!0,get:function(){return s.TimestampNanosecond}}),Object.defineProperty(t,"Interval",{enumerable:!0,get:function(){return s.Interval}}),Object.defineProperty(t,"IntervalDayTime",{enumerable:!0,get:function(){return s.IntervalDayTime}}),Object.defineProperty(t,"IntervalYearMonth",{enumerable:!0,get:function(){return s.IntervalYearMonth}}),Object.defineProperty(t,"FixedSizeList",{enumerable:!0,get:function(){return s.FixedSizeList}}),Object.defineProperty(t,"deduceTableSchema",{enumerable:!0,get:function(){return c.deduceTableSchema}}),Object.defineProperty(t,"getTypeInfo",{enumerable:!0,get:function(){return l.getTypeInfo}}),Object.defineProperty(t,"getArrowTypeFromTypedArray",{enumerable:!0,get:function(){return f.getArrowTypeFromTypedArray}}),Object.defineProperty(t,"AsyncQueue",{enumerable:!0,get:function(){return h.default}});var r=d(n(10)),i=d(n(1)),o=d(n(3)),a=n(2),u=n(12),s=n(0),c=n(18),l=n(19),f=n(20),h=d(n(21));function d(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(11)),i=a(n(1)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"schema",void 0),l(this,"options",void 0),l(this,"aggregator",null),l(this,"batchCount",0),l(this,"bytesUsed",0),l(this,"isChunkComplete",!1),l(this,"lastBatchEmittedMs",Date.now()),l(this,"totalLength",0),l(this,"totalBytes",0),l(this,"rowBytes",0),this.schema=t,this.options=s(s({},f),n)}var t,n,a;return t=e,(n=[{key:"limitReached",value:function(){var e,t;return!!(Boolean(null===(e=this.options)||void 0===e?void 0:e.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(t=this.options)||void 0===t?void 0:t._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(e){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(e),this.totalBytes+=this.rowBytes,Array.isArray(e)?this.addArrayRow(e):this.addObjectRow(e))}},{key:"addArrayRow",value:function(e){if(!this.aggregator){var t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addArrayRow(e)}},{key:"addObjectRow",value:function(e){if(!this.aggregator){var t=this._getTableBatchType();this.aggregator=new t(this.schema,this.options)}this.aggregator.addObjectRow(e)}},{key:"chunkComplete",value:function(e){e instanceof ArrayBuffer&&(this.bytesUsed+=e.byteLength),"string"==typeof e&&(this.bytesUsed+=e.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(e){return this._isFull()?this._getBatch(e):null}},{key:"getFinalBatch",value:function(e){return this._getBatch(e)}},{key:"_estimateRowMB",value:function(e){return Array.isArray(e)?8*e.length:8*Object.keys(e).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs||(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),0))}},{key:"_getBatch",value:function(e){if(!this.aggregator)return null;null!=e&&e.bytesUsed&&(this.bytesUsed=e.bytesUsed);var t=this.aggregator.getBatch();return t.count=this.batchCount,t.bytesUsed=this.bytesUsed,Object.assign(t,e),this.batchCount++,this.aggregator=null,t}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return r.default;case"array-row-table":case"object-row-table":return i.default;case"columnar-table":return o.default;case"arrow-table":if(!e.ArrowBatch)throw new Error("TableBatchBuilder");return e.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}])&&c(t.prototype,n),a&&c(t,a),e}();t.default=h,l(h,"ArrowBatch",void 0)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"schema",void 0),i(this,"options",void 0),i(this,"length",0),i(this,"rows",null),i(this,"cursor",0),i(this,"_headers",[]),this.options=n,this.schema=t,!Array.isArray(t))for(var r in this._headers=[],t)this._headers[t[r].index]=t[r].name}var t,n,o;return t=e,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}},{key:"addObjectRow",value:function(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}},{key:"getBatch",value:function(){var e=this.rows;return e?(e=e.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:e,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMeshSize=function(e){var t=0;for(var n in e){var r=e[n];ArrayBuffer.isView(r)&&(t+=r.byteLength*r.BYTES_PER_ELEMENT)}return t},t.getMeshBoundingBox=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,u=e.POSITION?e.POSITION.value:[],s=u&&u.length,c=0;c<s;c+=3){var l=u[c],f=u[c+1],h=u[c+2];t=l<t?l:t,n=f<n?f:n,r=h<r?h:r,i=l>i?l:i,o=f>o?f:o,a=h>a?h:a}return[[t,n,r],[i,o,a]]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(14);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"fields",void 0),c(this,"metadata",void 0),(0,r.assert)(Array.isArray(t)),function(e){var t,n={},r=o(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(e){r.e(e)}finally{r.f()}}(t),this.fields=t,this.metadata=n||new Map}var t,n,i;return t=e,(n=[{key:"compareTo",value:function(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(var t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}},{key:"select",value:function(){for(var t=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var u=a[o];t[u]=!0}var s=this.fields.filter((function(e){return t[e.name]}));return new e(s,this.metadata)}},{key:"selectAt",value:function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.map((function(e){return t.fields[e]})).filter(Boolean);return new e(o,this.metadata)}},{key:"assign",value:function(t){var n,r=this.metadata;if(t instanceof e){var i=t;n=i.fields,r=f(f(new Map,this.metadata),i.metadata)}else n=t;var a,u=Object.create(null),s=o(this.fields);try{for(s.s();!(a=s.n()).done;){var c=a.value;u[c.name]=c}}catch(e){s.e(e)}finally{s.f()}var l,h=o(n);try{for(h.s();!(l=h.n()).done;){var d=l.value;u[d.name]=d}}catch(e){h.e(e)}finally{h.f()}return new e(Object.values(u),r)}}])&&s(t.prototype,n),i&&s(t,i),e}();function f(e,t){return new Map([].concat(i(e||new Map),i(t||new Map)))}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;r(this,e),o(this,"name",void 0),o(this,"type",void 0),o(this,"nullable",void 0),o(this,"metadata",void 0),this.name=t,this.type=n,this.nullable=i,this.metadata=a}var t,n,a;return t=e,(n=[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new e(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return f.Type}}),t.FixedSizeList=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.TimeMillisecond=t.TimeSecond=t.Time=t.DateMillisecond=t.DateDay=t.Date=t.Utf8=t.Binary=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Bool=t.Null=t.DataType=void 0;var i,o,a,u,s,c,l,f=n(17);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}var T=function(){function e(){g(this,e)}return O(e,[{key:"typeId",get:function(){return f.Type.NONE}},{key:"compareTo",value:function(e){return this===e}}],[{key:"isNull",value:function(e){return e&&e.typeId===f.Type.Null}},{key:"isInt",value:function(e){return e&&e.typeId===f.Type.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===f.Type.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===f.Type.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===f.Type.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===f.Type.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===f.Type.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===f.Type.Date}},{key:"isTime",value:function(e){return e&&e.typeId===f.Type.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===f.Type.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===f.Type.Interval}},{key:"isList",value:function(e){return e&&e.typeId===f.Type.List}},{key:"isStruct",value:function(e){return e&&e.typeId===f.Type.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===f.Type.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===f.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===f.Type.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===f.Type.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===f.Type.Dictionary}}]),e}();t.DataType=T;var j=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(T);t.Null=j;var S=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Bool}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(T);t.Bool=S,i=Symbol.toStringTag;var _=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"isSigned",void 0),h(v(i),"bitWidth",void 0),i.isSigned=e,i.bitWidth=r,i}return O(n,[{key:"typeId",get:function(){return f.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(T);t.Int=_;var k=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,8)}return n}(_);t.Int8=k;var P=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,16)}return n}(_);t.Int16=P;var I=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,32)}return n}(_);t.Int32=I;var A=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!0,64)}return n}(_);t.Int64=A;var M=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,8)}return n}(_);t.Uint8=M;var D=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,16)}return n}(_);t.Uint16=D;var x=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,32)}return n}(_);t.Uint32=x;var E=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,!1,64)}return n}(_);t.Uint64=E;var R=16,C=32,B=64;o=Symbol.toStringTag;var F=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"precision",void 0),r.precision=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Float}},{key:o,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(T);t.Float=F;var U=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,R)}return n}(F);t.Float16=U;var N=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,C)}return n}(F);t.Float32=N;var L=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,B)}return n}(F);t.Float64=L;var z=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this)}return O(n,[{key:"typeId",get:function(){return f.Type.Binary}},{key:"toString",value:function(){return"Binary"}},{key:Symbol.toStringTag,get:function(){return"Binary"}}]),n}(T);t.Binary=z;var q=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.apply(this,arguments)}return O(n,[{key:"typeId",get:function(){return f.Type.Utf8}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(T);t.Utf8=q;var Y={DAY:0,MILLISECOND:1};a=Symbol.toStringTag;var V=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"unit",void 0),r.unit=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Date}},{key:a,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(Y[this.unit],">")}}]),n}(T);t.Date=V;var W=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Y.DAY)}return n}(V);t.DateDay=W;var J=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Y.MILLISECOND)}return n}(V);t.DateMillisecond=J;var Q={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};u=Symbol.toStringTag;var H=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"unit",void 0),h(v(i),"bitWidth",void 0),i.unit=e,i.bitWidth=r,i}return O(n,[{key:"typeId",get:function(){return f.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Q[this.unit],">")}},{key:u,get:function(){return"Time"}}]),n}(T);t.Time=H;var $=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Q.SECOND,32)}return n}(H);t.TimeSecond=$;var K=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,Q.MILLISECOND,32)}return n}(H);t.TimeMillisecond=K,s=Symbol.toStringTag;var Z=function(e){d(n,e);var t=p(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return g(this,n),h(v(r=t.call(this)),"unit",void 0),h(v(r),"timezone",void 0),r.unit=e,r.timezone=i,r}return O(n,[{key:"typeId",get:function(){return f.Type.Timestamp}},{key:s,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(Q[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(T);t.Timestamp=Z;var G=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.SECOND,e)}return n}(Z);t.TimestampSecond=G;var X=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.MILLISECOND,e)}return n}(Z);t.TimestampMillisecond=X;var ee=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.MICROSECOND,e)}return n}(Z);t.TimestampMicrosecond=ee;var te=function(e){d(n,e);var t=p(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),t.call(this,Q.NANOSECOND,e)}return n}(Z);t.TimestampNanosecond=te;var ne={DAY_TIME:0,YEAR_MONTH:1};c=Symbol.toStringTag;var re=function(e){d(n,e);var t=p(n);function n(e){var r;return g(this,n),h(v(r=t.call(this)),"unit",void 0),r.unit=e,r}return O(n,[{key:"typeId",get:function(){return f.Type.Interval}},{key:c,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(ne[this.unit],">")}}]),n}(T);t.Interval=re;var ie=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,ne.DAY_TIME)}return n}(re);t.IntervalDayTime=ie;var oe=function(e){d(n,e);var t=p(n);function n(){return g(this,n),t.call(this,ne.YEAR_MONTH)}return n}(re);t.IntervalYearMonth=oe,l=Symbol.toStringTag;var ae=function(e){d(n,e);var t=p(n);function n(e,r){var i;return g(this,n),h(v(i=t.call(this)),"listSize",void 0),h(v(i),"children",void 0),i.listSize=e,i.children=[r],i}return O(n,[{key:"typeId",get:function(){return f.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:l,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(T);t.FixedSizeList=ae},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Type=void 0,t.Type=r,function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(r||(t.Type=r={}))},function(e,t,n){"use strict";function r(e){return e instanceof Date?Date:e instanceof Number?Float32Array:"string"==typeof e?String:null}Object.defineProperty(t,"__esModule",{value:!0}),t.deduceTableSchema=function(e,t){var n=Array.isArray(e)?function(e){var t={};if(e.length){var n=e[0];for(var i in n){var o=n[i];t[i]=r(o)}}return t}(e):function(e){var t={};for(var n in e){var i=e[n];if(ArrayBuffer.isView(i))t[n]=i.constructor;else if(i.length){var o=i[0];t[n]=r(o)}t[n]=t[n]||null}return t}(e);return Object.assign(n,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTypeInfo=function(e){return{typeId:e.typeId,ArrayType:e.ArrayType,typeName:e.toString(),typeEnumName:o(e.typeId),precision:e.precision}};var r=n(0);var i=null;function o(e){if(!i)for(var t in i={},r.Type)i[r.Type[t]]=t;return i[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrowTypeFromTypedArray=function(e){switch(e.constructor){case Int8Array:return new r.Int8;case Uint8Array:return new r.Uint8;case Int16Array:return new r.Int16;case Uint16Array:return new r.Uint16;case Int32Array:return new r.Int32;case Uint32Array:return new r.Uint32;case Float32Array:return new r.Float32;case Float64Array:return new r.Float64;default:throw new Error("array type not supported")}};var r=n(0)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function o(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)})(e)}function d(e,t,n){return(d=y()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&p(i,n.prototype),i}).apply(null,arguments)}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.takeAsync=function(e){return g.apply(this,arguments)},t.default=void 0;var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(i,e);var t,n,r=(t=i,n=y(),function(){var e,r=m(t);if(n){var i=m(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return f(this,e)});function i(){return s(this,i),r.apply(this,arguments)}return l(i,[{key:"enqueue",value:function(e){return this.push(e)}},{key:"dequeue",value:function(){return this.shift()}}]),i}(h(Array));i=Symbol.asyncIterator;var b=function(){function e(){s(this,e),u(this,"_values",void 0),u(this,"_settlers",void 0),u(this,"_closed",void 0),this._values=new v,this._settlers=new v,this._closed=!1}return l(e,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:i,value:function(){return this}},{key:"enqueue",value:function(e){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var t=this._settlers.dequeue();e instanceof Error?t.reject(e):t.resolve({value:e})}else this._values.enqueue(e)}},{key:"next",value:function(){var e=this;if(this._values.length>0){var t=this._values.dequeue();return t instanceof Error?Promise.reject(t):Promise.resolve({value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(t,n){e._settlers.enqueue({resolve:t,reject:n})}))}}]),e}();function g(){return(g=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1/0,r=[],i=t[Symbol.asyncIterator]();case 3:if(!(r.length<n)){e.next=14;break}return e.next=6,i.next();case 6:if(o=e.sent,a=o.value,!o.done){e.next=11;break}return e.abrupt("break",14);case 11:r.push(a),e.next=3;break;case 14:return e.abrupt("return",r);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.default=b},function(e,t,n){"use strict";var r;function i(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function o(e){var t;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(t=e[Symbol.asyncIterator]),null==t&&Symbol.iterator&&(t=e[Symbol.iterator])),null==t&&(t=e["@@asyncIterator"]),null==t&&(t=e["@@iterator"]),null==t)throw new TypeError("Object is not async iterable");return t.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var a=((r=n(4))&&r.__esModule?r:{default:r}).default.ChunkStreamer;function u(e){e=e||{},a.call(this,e),this.textDecoder=new TextDecoder(this._config.encoding),this.stream=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,i,a,u,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._input=t,e.prev=1,n=!0,r=!1,e.prev=4,a=o(t);case 6:return e.next=8,a.next();case 8:return u=e.sent,n=u.done,e.next=12,u.value;case 12:if(s=e.sent,n){e.next=19;break}c=s,this.parseChunk(this.getStringChunk(c));case 16:n=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),r=!0,i=e.t0;case 25:if(e.prev=25,e.prev=26,n||null==a.return){e.next=30;break}return e.next=30,a.return();case 30:if(e.prev=30,!r){e.next=33;break}throw i;case 33:return e.finish(30);case 34:return e.finish(25);case 35:this._finished=!0,this.parseChunk(""),e.next=42;break;case 39:e.prev=39,e.t1=e.catch(1),this._sendError(e.t1);case 42:case"end":return e.stop()}}),e,this,[[1,39],[4,21,25,35],[26,,30,34]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,s,"next",e)}function s(e){i(a,r,o,u,s,"throw",e)}u(void 0)}))});return function(e){return t.apply(this,arguments)}}(),this._nextChunk=function(){},this.getStringChunk=function(e){return"string"==typeof e?e:this.textDecoder.decode(e,{stream:!0})}}u.prototype=Object.create(a.prototype),u.prototype.constructor=u}]);
8
8
  //# sourceMappingURL=dist.es5.min.js.map