@deep-eye/core 1.3.60 → 1.3.62
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.
- package/CHANGELOG.md +27 -0
- package/README.md +1 -1
- package/dist/ChartRenderer-BPPk1HRO.cjs +47 -0
- package/dist/ChartRenderer-D5JL8mjQ.js +29070 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/_detached-asset_md4x-BNCCDSd7.js +4 -0
- package/dist/_detached-asset_md4x-ZnnIwwVu.cjs +1 -0
- package/dist/chart-C16JRbn_.js +7028 -0
- package/dist/chart-D3isPV5Q.cjs +18 -0
- package/dist/components/chat/ChatApp.vue.d.ts +8 -5
- package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
- package/dist/components/chat/chatSessionSidebarTypes.d.ts.map +1 -1
- package/dist/components/chat/components/ChatComposerContextBar.vue.d.ts +24 -0
- package/dist/components/chat/components/ChatComposerContextBar.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatPastedTextCard.vue.d.ts +16 -0
- package/dist/components/chat/components/ChatPastedTextCard.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts +1 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSessionGroupRow.vue.d.ts.map +1 -1
- package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
- package/dist/components/chat/components/OpenGenerativeUiChartRenderer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/office/DocxPreviewEngine.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/pdf/PdfPage.vue.d.ts +1 -1
- package/dist/components/chat/components/document-viewer/pdf/PdfPage.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/pdf/pdfWorker.d.ts +5 -2
- package/dist/components/chat/components/document-viewer/pdf/pdfWorker.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/pdf/usePdfDocument.d.ts +1 -1
- package/dist/components/chat/components/document-viewer/pdf/usePdfDocument.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/xlsx/parseSpreadsheet.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatSessionGroups.d.ts +1 -1
- package/dist/components/chat/composables/useChatSessionGroups.d.ts.map +1 -1
- package/dist/components/chat/fileIcons.d.ts.map +1 -1
- package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
- package/dist/components/chat/mdoc/textContent.d.ts.map +1 -1
- package/dist/components/chat/pastedText.d.ts +4 -0
- package/dist/components/chat/pastedText.d.ts.map +1 -0
- package/dist/components/chat/types.d.ts +11 -3
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/components/chat/useChatReport.d.ts +10 -0
- package/dist/components/chat/useChatReport.d.ts.map +1 -0
- package/dist/components/ui/components/UiMenuColumn.vue.d.ts.map +1 -1
- package/dist/docx-preview-CAU_uzYl.cjs +38 -0
- package/dist/docx-preview-HSNGvrBH.js +5581 -0
- package/dist/index-BoHWHC9p.cjs +1065 -0
- package/dist/{index-CiU37iHC.js → index-CZhtteLP.js} +1 -1
- package/dist/{index-0ZP8pbwh.cjs → index-DUJ_JEet.cjs} +1 -1
- package/dist/index-DpvLwjBq.js +52094 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +17 -17
- package/dist/katex-BuPdKLic.cjs +257 -0
- package/dist/katex-yuB6V-q6.js +11615 -0
- package/dist/md4x.wasm +0 -0
- package/dist/papaparse.min-BOX0WPZu.cjs +15 -0
- package/dist/papaparse.min-Vgu5If04.js +416 -0
- package/dist/pdf-CCxzGVA8.cjs +12 -0
- package/dist/pdf-Cl8ZP0Rp.js +14601 -0
- package/dist/pdf.worker.min.mjs +21 -0
- package/dist/style.css +2 -2
- package/dist/xlsx-BopDBbWb.js +24176 -0
- package/dist/xlsx-qn1xoUuv.cjs +105 -0
- package/package.json +3 -4
- package/dist/index-3LA-TuxT.js +0 -140345
- package/dist/index-BU2MKGdZ.cjs +0 -1474
- package/dist/md4x-C41yoHW7.js +0 -4
- package/dist/md4x-DWOZHZ3f.cjs +0 -1
package/dist/md4x.wasm
ADDED
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";const ge=require("./_commonjsHelpers-DKOUU3wS.cjs");function be(Z,se){for(var Q=0;Q<se.length;Q++){const y=se[Q];if(typeof y!="string"&&!Array.isArray(y)){for(const F in y)if(F!=="default"&&!(F in Z)){const W=Object.getOwnPropertyDescriptor(y,F);W&&Object.defineProperty(Z,F,W.get?W:{enumerable:!0,get:()=>y[F]})}}}return Object.freeze(Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"}))}var _e={exports:{}};/* @license
|
|
2
|
+
Papa Parse
|
|
3
|
+
v5.6.0
|
|
4
|
+
https://github.com/mholt/PapaParse
|
|
5
|
+
License: MIT
|
|
6
|
+
*/(function(Z,se){((Q,y)=>{Z.exports=y()})(ge.commonjsGlobal,function Q(){var y=typeof self<"u"?self:typeof window<"u"?window:y!==void 0?y:{},F=!y.document&&!!y.postMessage,W=y.IS_PAPA_WORKER||!1,te={},ye=0,o={};function ae(e){return e.charCodeAt(0)===65279?e.slice(1):e}function N(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!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(t){var r=ue(t);r.chunkSize=parseInt(r.chunkSize),t.step||t.chunk||(r.chunkSize=null),this._handle=new le(r),(this._handle.streamer=this)._config=r}).call(this,e),this.parseChunk=function(t,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let g=this._config.newline;g||(n=this._config.quoteChar||'"',g=this._handle.guessLineEndings(t,n)),t=[...t.split(g).slice(s)].join(g)}this.isFirstChunk&&v(this._config.beforeFirstChunk)&&(n=this._config.beforeFirstChunk(t))!==void 0&&(t=n),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t,n=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=n.meta.cursor,s=(this._finished||(this._partialLine=s.substring(t-this._baseIndex),this._baseIndex=t),n&&n.data&&(this._rowCount+=n.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),W)y.postMessage({results:n,workerId:o.WORKER_ID,finished:s});else if(v(this._config.chunk)&&!r){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=n=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!s||!v(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0},this._sendError=function(t){v(this._config.error)?this._config.error(t):W&&this._config.error&&y.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function re(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),N.call(this,e),this._nextChunk=F?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),F||(t.onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!F),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)t.setRequestHeader(r,s[r])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}F&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(r){r=t.statusText||r,this._sendError(new Error(r))}}function ne(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),N.call(this,e);var t,r,s=typeof FileReader<"u";this.stream=function(n){this._input=n,r=n.slice||n.webkitSlice||n.mozSlice,s?((t=new FileReader).onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var n=this._input,g=(this._config.chunkSize&&(g=Math.min(this._start+this._config.chunkSize,this._input.size),n=r.call(n,this._start,g)),t.readAsText(n,this._config.encoding));s||this._chunkLoaded({target:{result:g}})},this._chunkLoaded=function(n){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(n.target.result)},this._chunkError=function(){this._sendError(t.error)}}function Y(e){var t;N.call(this,e=e||{}),this.stream=function(r){return t=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,t=r?(s=t.substring(0,r),t.substring(r)):(s=t,""),this._finished=!t,this.parseChunk(s)}}function ie(e){N.call(this,e=e||{});var t=[],r=!0,s=!1;this.pause=function(){N.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){N.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(n){this._input=n,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=K(function(n){try{t.push(typeof n=="string"?n:n.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(g){this._streamError(g)}},this),this._streamError=K(function(n){this._streamCleanUp(),this._sendError(n)},this),this._streamEnd=K(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function le(e){var t,r,s,n,g=Math.pow(2,53),I=-g,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,B=/^((\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)))$/,w=this,A=0,u=0,T=!1,l=!1,d=[],i={data:[],errors:[],meta:{}};function L(p){return e.skipEmptyLines==="greedy"?p.join("").trim()==="":p.length===1&&p[0].length===0}function k(){if(i&&s&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(i.data=i.data.filter(function(a){return!L(a)})),O()){let a=function(b,S){b=ae(b),v(e.transformHeader)&&(b=e.transformHeader(b,S)),d.push(b)};if(i)if(Array.isArray(i.data[0])){for(var p=0;O()&&p<i.data.length;p++)i.data[p].forEach(a);i.data.splice(0,1)}else i.data.forEach(a)}function f(a,b){for(var S=e.header?{}:[],_=0;_<a.length;_++){var m=_,c=a[_],c=((z,h)=>(E=>(e.dynamicTypingFunction&&e.dynamicTyping[E]===void 0&&(e.dynamicTyping[E]=e.dynamicTypingFunction(E)),(e.dynamicTyping[E]||e.dynamicTyping)===!0))(z)?h==="true"||h==="TRUE"||h!=="false"&&h!=="FALSE"&&((E=>{if(M.test(E)&&(E=parseFloat(E),I<E&&E<g))return 1})(h)?parseFloat(h):B.test(h)?new Date(h):h===""?null:h):h)(m=e.header?_>=d.length?"__parsed_extra":d[_]:m,c=e.transform?e.transform(c,m):c);m==="__parsed_extra"?(S[m]=S[m]||[],S[m].push(c)):S[m]=c}return e.header&&(_>d.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+d.length+" fields but parsed "+_,u+b):_<d.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+d.length+" fields but parsed "+_,u+b)),S}var R;i&&(e.header||e.dynamicTyping||e.transform)&&(R=1,!i.data.length||Array.isArray(i.data[0])?(i.data=i.data.map(f),R=i.data.length):i.data=f(i.data,0),e.header&&i.meta&&(i.meta.fields=d),u+=R)}function O(){return e.header&&d.length===0}function j(p,f,R,a){p={type:p,code:f,message:R},a!==void 0&&(p.row=a),i.errors.push(p)}v(e.step)&&(n=e.step,e.step=function(p){i=p,O()?k():(k(),i.data.length!==0&&(A+=p.data.length,e.preview&&A>e.preview?r.abort():(i.data=i.data[0],n(i,w))))}),this.parse=function(p,f,R){var a=e.quoteChar||'"',a=(e.newline||(e.newline=this.guessLineEndings(p,a)),s=!1,e.delimiter?v(e.delimiter)&&(e.delimiter=e.delimiter(p),i.meta.delimiter=e.delimiter):((a=((b,S,_,m,c)=>{var z,h,E,$;c=c||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var J=0;J<c.length;J++){for(var P,V=c[J],C=0,q=0,x=0,D=(E=void 0,new oe({comments:m,delimiter:V,newline:S,preview:10}).parse(b)),H=0;H<D.data.length;H++)_&&L(D.data[H])?x++:(P=D.data[H].length,q+=P,E===void 0?E=P:0<P&&(C+=Math.abs(P-E),E=P));0<D.data.length&&(q/=D.data.length-x),1.99<q&&(h===void 0||C<h||C===h&&$<q)&&(h=C,z=V,$=q)}return{successful:!!(e.delimiter=z),bestDelimiter:z}})(p,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=a.bestDelimiter:(s=!0,e.delimiter=o.DefaultDelimiter),i.meta.delimiter=e.delimiter),ue(e));return e.preview&&e.header&&a.preview++,t=p,r=new oe(a),i=r.parse(t,f,R),k(),T?{meta:{paused:!0}}:i||{meta:{paused:!1}}},this.paused=function(){return T},this.pause=function(){T=!0,r.abort(),t=v(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){w.streamer._halted?(T=!1,w.streamer.parseChunk(t,!0)):setTimeout(w.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,r.abort(),i.meta.aborted=!0,v(e.complete)&&e.complete(i),t=""},this.guessLineEndings=function(b,a){b=b.substring(0,1048576);var a=new RegExp(X(a)+"([^]*?)"+X(a),"gm"),R=(b=b.replace(a,"")).split("\r"),a=b.split(`
|
|
7
|
+
`),b=1<a.length&&a[0].length<R[0].length;if(R.length===1||b)return`
|
|
8
|
+
`;for(var S=0,_=0;_<R.length;_++)R[_][0]===`
|
|
9
|
+
`&&S++;return S>=R.length/2?`\r
|
|
10
|
+
`:"\r"}}function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function oe(e){var t=(e=e||{}).delimiter,r=e.newline,s=e.comments,n=e.step,g=e.preview,I=e.fastMode,M=null,B=!1,w=e.quoteChar==null?'"':e.quoteChar,A=w;if(e.escapeChar!==void 0&&(A=e.escapeChar),(typeof t!="string"||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),s===t)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<o.BAD_DELIMITERS.indexOf(s))&&(s=!1),r!==`
|
|
11
|
+
`&&r!=="\r"&&r!==`\r
|
|
12
|
+
`&&(r=`
|
|
13
|
+
`);var u=0,T=!1;this.parse=function(l,d,i){if(typeof l!="string")throw new Error("Input must be a string");var L=l.length,k=t.length,O=r.length,j=s.length,p=v(n),f=[],R=[],a=[],b=u=0;if(!l)return C();if(I||I!==!1&&l.indexOf(w)===-1){for(var S=l.split(r),_=0;_<S.length;_++){if(a=S[_],u+=a.length,_!==S.length-1)u+=r.length;else if(i)return C();if(!s||a.substring(0,j)!==s){if(p){if(f=[],$(a.split(t)),q(),T)return C()}else $(a.split(t));if(g&&g<=_)return f=f.slice(0,g),C(!0)}}return C()}for(var m=l.indexOf(t,u),c=l.indexOf(r,u),z=new RegExp(X(A)+X(w),"g"),h=l.indexOf(w,u);;)if(l[u]===w)for(h=u,u++;;){if((h=l.indexOf(w,h+1))===-1)return i||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:f.length,index:u}),P();if(h===L-1)return P(l.substring(u,h).replace(z,w));if(w===A&&l[h+1]===A)h++;else if(w===A||h===0||l[h-1]!==A){m!==-1&&m<h+1&&(m=l.indexOf(t,h+1));var E=J((c=c!==-1&&c<h+1?l.indexOf(r,h+1):c)===-1?m:Math.min(m,c));if(l.substr(h+1+E,k)===t){a.push(l.substring(u,h).replace(z,w)),l[u=h+1+E+k]!==w&&(h=l.indexOf(w,u)),m=l.indexOf(t,u),c=l.indexOf(r,u);break}if(E=J(c),l.substring(h+1+E,h+1+E+O)===r){if(a.push(l.substring(u,h).replace(z,w)),V(h+1+E+O),m=l.indexOf(t,u),h=l.indexOf(w,u),p&&(q(),T))return C();if(g&&f.length>=g)return C(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:f.length,index:u}),h++}}else if(s&&a.length===0&&l.substring(u,u+j)===s){if(c===-1)return C();u=c+O,c=l.indexOf(r,u),m=l.indexOf(t,u)}else if(m!==-1&&(m<c||c===-1))a.push(l.substring(u,m)),u=m+k,m=l.indexOf(t,u);else{if(c===-1)break;if(a.push(l.substring(u,c)),V(c+O),p&&(q(),T))return C();if(g&&f.length>=g)return C(!0)}return P();function $(x){f.push(x),b=u}function J(x){var D=0;return D=x!==-1&&(x=l.substring(h+1,x))&&x.trim()===""?x.length:D}function P(x){return i||(x===void 0&&(x=l.substring(u)),a.push(x),u=L,$(a),p&&q()),C()}function V(x){u=x,$(a),a=[],c=l.indexOf(r,u)}function C(x){if(e.header&&!d&&f.length&&!B){var D=f[0],H=Object.create(null),he=new Set(D);let ce=!1;for(let G=0;G<D.length;G++){let U=ae(D[G]);if(H[U=v(e.transformHeader)?e.transformHeader(U,G):U]){let ee,pe=H[U];for(;ee=U+"_"+pe,pe++,he.has(ee););he.add(ee),D[G]=ee,H[U]++,ce=!0,(M=M===null?{}:M)[ee]=U}else H[U]=1,D[G]=U;he.add(U)}ce&&console.warn("Duplicate headers found and renamed."),B=!0}return{data:f,errors:R,meta:{delimiter:t,linebreak:r,aborted:T,truncated:!!x,cursor:b+(d||0),renamedHeaders:M}}}function q(){n(C()),f=[],R=[]}},this.abort=function(){T=!0},this.getCharIndex=function(){return u}}function ke(e){var t=e.data,r=te[t.workerId],s=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){s=!0,de(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:fe,resume:fe};if(v(r.userStep)){for(var g=0;g<t.results.data.length&&(r.userStep({data:t.results.data[g],errors:t.results.errors,meta:t.results.meta},n),!s);g++);delete t.results}else v(r.userChunk)&&(r.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!s&&de(t.workerId,t.results)}function de(e,t){var r=te[e];v(r.userComplete)&&r.userComplete(t),r.terminate(),delete te[e]}function fe(){throw new Error("Not implemented.")}function ue(e){if(typeof e!="object"||e===null)return e;var t,r=Array.isArray(e)?[]:{};for(t in e)r[t]=ue(e[t]);return r}function K(e,t){return function(){e.apply(t,arguments)}}function v(e){return typeof e=="function"}return o.parse=function(e,t){var r=(t=t||{}).dynamicTyping||!1;if(v(r)&&(t.dynamicTypingFunction=r,r={}),t.dynamicTyping=r,t.transform=!!v(t.transform)&&t.transform,!t.worker||!o.WORKERS_SUPPORTED)return r=null,o.NODE_STREAM_INPUT,typeof e=="string"?(e=ae(e),r=new(t.download?re:Y)(t)):e.readable===!0&&v(e.read)&&v(e.on)?r=new ie(t):(y.File&&e instanceof File||e instanceof Object)&&(r=new ne(t)),r.stream(e);(r=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var n=y.URL||y.webkitURL||null,g=Q.toString();return o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",g,")();"],{type:"text/javascript"})))})(),(s=new y.Worker(s)).onmessage=ke,s.id=ye++,te[s.id]=s)})()).userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=v(t.step),t.chunk=v(t.chunk),t.complete=v(t.complete),t.error=v(t.error),delete t.worker,r.postMessage({input:e,config:t,workerId:r.id})},o.unparse=function(e,t){var r=!1,s=!0,n=",",g=`\r
|
|
14
|
+
`,I='"',M=I+I,B=!1,w=null,A=!1,u=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||o.BAD_DELIMITERS.filter(function(d){return t.delimiter.indexOf(d)!==-1}).length||(n=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(r=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(B=t.skipEmptyLines),typeof t.newline=="string"&&(g=t.newline),typeof t.quoteChar=="string"&&(I=t.quoteChar,M=I+I),typeof t.header=="boolean"&&(s=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");w=t.columns}t.escapeChar!==void 0&&(M=t.escapeChar+I),t.escapeFormulae instanceof RegExp?A=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(A=/^[=+\-@\t\r].*$/)}})(),new RegExp(X(I),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return T(null,e,B);if(typeof e[0]=="object")return T(w||Object.keys(e[0]),e,B)}else if(typeof e=="object")return typeof e.data=="string"&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||w),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:typeof e.data[0]=="object"?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||typeof e.data[0]=="object"||(e.data=[e.data])),T(e.fields||[],e.data||[],B);throw new Error("Unable to serialize unrecognized input");function T(d,i,L){var k="",O=(typeof d=="string"&&(d=JSON.parse(d)),typeof i=="string"&&(i=JSON.parse(i)),Array.isArray(d)&&0<d.length),j=!Array.isArray(i[0]);if(O&&s){for(var p=0;p<d.length;p++)0<p&&(k+=n),k+=l(d[p],p);0<i.length&&(k+=g)}for(var f=0;f<i.length;f++){var R=(O?d:i[f]).length,a=!1,b=O?Object.keys(i[f]).length===0:i[f].length===0;if(L&&!O&&(a=L==="greedy"?i[f].join("").trim()==="":i[f].length===1&&i[f][0].length===0),L==="greedy"&&O){for(var S=[],_=0;_<R;_++){var m=j?d[_]:_;S.push(i[f][m])}a=S.join("").trim()===""}if(!a){for(var c=0;c<R;c++){0<c&&!b&&(k+=n);var z=O&&j?d[c]:c;k+=l(i[f][z],c)}f<i.length-1&&(!L||0<R&&!b)&&(k+=g)}}return k}function l(d,i){var L,k,O;return d==null?"":d.constructor===Date?isNaN(d.getTime())?"":d.toISOString():(O=!1,A&&typeof d=="string"&&A.test(d)&&(d="'"+d,O=!0),k=(L=d.toString()).replace(u,M),(O=O||r===!0||typeof r=="function"&&r(d,i)||Array.isArray(r)&&r[i]||((j,p)=>{for(var f=0;f<p.length;f++)if(-1<j.indexOf(p[f]))return!0;return!1})(k,o.BAD_DELIMITERS)||-1<k.indexOf(n)||-1<L.indexOf(I)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?I+k+I:k)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!F&&!!y.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=oe,o.ParserHandle=le,o.NetworkStreamer=re,o.FileStreamer=ne,o.StringStreamer=Y,o.ReadableStreamStreamer=ie,W&&(y.onmessage=function(e){e=e.data,o.WORKER_ID===void 0&&e&&(o.WORKER_ID=e.workerId),typeof e.input=="string"?y.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(y.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&y.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(re.prototype=Object.create(N.prototype)).constructor=re,(ne.prototype=Object.create(N.prototype)).constructor=ne,(Y.prototype=Object.create(Y.prototype)).constructor=Y,(ie.prototype=Object.create(N.prototype)).constructor=ie,o})})(_e);var me=_e.exports;const we=ge.getDefaultExportFromCjs(me),Ee=be({__proto__:null,default:we},[me]);exports.papaparse_min=Ee;
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { g as ke, c as be } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
+
function we(Z, se) {
|
|
3
|
+
for (var Q = 0; Q < se.length; Q++) {
|
|
4
|
+
const y = se[Q];
|
|
5
|
+
if (typeof y != "string" && !Array.isArray(y)) {
|
|
6
|
+
for (const F in y)
|
|
7
|
+
if (F !== "default" && !(F in Z)) {
|
|
8
|
+
const H = Object.getOwnPropertyDescriptor(y, F);
|
|
9
|
+
H && Object.defineProperty(Z, F, H.get ? H : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => y[F]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(Z, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var ge = { exports: {} };
|
|
19
|
+
/* @license
|
|
20
|
+
Papa Parse
|
|
21
|
+
v5.6.0
|
|
22
|
+
https://github.com/mholt/PapaParse
|
|
23
|
+
License: MIT
|
|
24
|
+
*/
|
|
25
|
+
(function(Z, se) {
|
|
26
|
+
((Q, y) => {
|
|
27
|
+
Z.exports = y();
|
|
28
|
+
})(be, function Q() {
|
|
29
|
+
var y = typeof self < "u" ? self : typeof window < "u" ? window : y !== void 0 ? y : {}, F = !y.document && !!y.postMessage, H = y.IS_PAPA_WORKER || !1, te = {}, me = 0, o = {};
|
|
30
|
+
function ae(e) {
|
|
31
|
+
return e.charCodeAt(0) === 65279 ? e.slice(1) : e;
|
|
32
|
+
}
|
|
33
|
+
function N(e) {
|
|
34
|
+
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !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(t) {
|
|
35
|
+
var r = ue(t);
|
|
36
|
+
r.chunkSize = parseInt(r.chunkSize), t.step || t.chunk || (r.chunkSize = null), this._handle = new le(r), (this._handle.streamer = this)._config = r;
|
|
37
|
+
}).call(this, e), this.parseChunk = function(t, r) {
|
|
38
|
+
var s = parseInt(this._config.skipFirstNLines) || 0;
|
|
39
|
+
if (this.isFirstChunk && 0 < s) {
|
|
40
|
+
let g = this._config.newline;
|
|
41
|
+
g || (n = this._config.quoteChar || '"', g = this._handle.guessLineEndings(t, n)), t = [...t.split(g).slice(s)].join(g);
|
|
42
|
+
}
|
|
43
|
+
this.isFirstChunk && v(this._config.beforeFirstChunk) && (n = this._config.beforeFirstChunk(t)) !== void 0 && (t = n), this.isFirstChunk = !1, this._halted = !1;
|
|
44
|
+
var s = this._partialLine + t, n = (this._partialLine = "", this._handle.parse(s, this._baseIndex, !this._finished));
|
|
45
|
+
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
46
|
+
if (t = n.meta.cursor, s = (this._finished || (this._partialLine = s.substring(t - this._baseIndex), this._baseIndex = t), n && n.data && (this._rowCount += n.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), H) y.postMessage({ results: n, workerId: o.WORKER_ID, finished: s });
|
|
47
|
+
else if (v(this._config.chunk) && !r) {
|
|
48
|
+
if (this._config.chunk(n, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
49
|
+
this._completeResults = n = void 0;
|
|
50
|
+
}
|
|
51
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(n.data), this._completeResults.errors = this._completeResults.errors.concat(n.errors), this._completeResults.meta = n.meta), this._completed || !s || !v(this._config.complete) || n && n.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), s || n && n.meta.paused || this._nextChunk(), n;
|
|
52
|
+
}
|
|
53
|
+
this._halted = !0;
|
|
54
|
+
}, this._sendError = function(t) {
|
|
55
|
+
v(this._config.error) ? this._config.error(t) : H && this._config.error && y.postMessage({ workerId: o.WORKER_ID, error: t, finished: !1 });
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function re(e) {
|
|
59
|
+
var t;
|
|
60
|
+
(e = e || {}).chunkSize || (e.chunkSize = o.RemoteChunkSize), N.call(this, e), this._nextChunk = F ? function() {
|
|
61
|
+
this._readChunk(), this._chunkLoaded();
|
|
62
|
+
} : function() {
|
|
63
|
+
this._readChunk();
|
|
64
|
+
}, this.stream = function(r) {
|
|
65
|
+
this._input = r, this._nextChunk();
|
|
66
|
+
}, this._readChunk = function() {
|
|
67
|
+
if (this._finished) this._chunkLoaded();
|
|
68
|
+
else {
|
|
69
|
+
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), F || (t.onload = W(this._chunkLoaded, this), t.onerror = W(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !F), this._config.downloadRequestHeaders) {
|
|
70
|
+
var r, s = this._config.downloadRequestHeaders;
|
|
71
|
+
for (r in s) t.setRequestHeader(r, s[r]);
|
|
72
|
+
}
|
|
73
|
+
var n;
|
|
74
|
+
this._config.chunkSize && (n = this._start + this._config.chunkSize - 1, t.setRequestHeader("Range", "bytes=" + this._start + "-" + n));
|
|
75
|
+
try {
|
|
76
|
+
t.send(this._config.downloadRequestBody);
|
|
77
|
+
} catch (g) {
|
|
78
|
+
this._chunkError(g.message);
|
|
79
|
+
}
|
|
80
|
+
F && t.status === 0 && this._chunkError();
|
|
81
|
+
}
|
|
82
|
+
}, this._chunkLoaded = function() {
|
|
83
|
+
t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((r) => (r = r.getResponseHeader("Content-Range")) !== null ? parseInt(r.substring(r.lastIndexOf("/") + 1)) : -1)(t), this.parseChunk(t.responseText)));
|
|
84
|
+
}, this._chunkError = function(r) {
|
|
85
|
+
r = t.statusText || r, this._sendError(new Error(r));
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function ne(e) {
|
|
89
|
+
(e = e || {}).chunkSize || (e.chunkSize = o.LocalChunkSize), N.call(this, e);
|
|
90
|
+
var t, r, s = typeof FileReader < "u";
|
|
91
|
+
this.stream = function(n) {
|
|
92
|
+
this._input = n, r = n.slice || n.webkitSlice || n.mozSlice, s ? ((t = new FileReader()).onload = W(this._chunkLoaded, this), t.onerror = W(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
|
|
93
|
+
}, this._nextChunk = function() {
|
|
94
|
+
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
95
|
+
}, this._readChunk = function() {
|
|
96
|
+
var n = this._input, g = (this._config.chunkSize && (g = Math.min(this._start + this._config.chunkSize, this._input.size), n = r.call(n, this._start, g)), t.readAsText(n, this._config.encoding));
|
|
97
|
+
s || this._chunkLoaded({ target: { result: g } });
|
|
98
|
+
}, this._chunkLoaded = function(n) {
|
|
99
|
+
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(n.target.result);
|
|
100
|
+
}, this._chunkError = function() {
|
|
101
|
+
this._sendError(t.error);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function Y(e) {
|
|
105
|
+
var t;
|
|
106
|
+
N.call(this, e = e || {}), this.stream = function(r) {
|
|
107
|
+
return t = r, this._nextChunk();
|
|
108
|
+
}, this._nextChunk = function() {
|
|
109
|
+
var r, s;
|
|
110
|
+
if (!this._finished) return r = this._config.chunkSize, t = r ? (s = t.substring(0, r), t.substring(r)) : (s = t, ""), this._finished = !t, this.parseChunk(s);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function ie(e) {
|
|
114
|
+
N.call(this, e = e || {});
|
|
115
|
+
var t = [], r = !0, s = !1;
|
|
116
|
+
this.pause = function() {
|
|
117
|
+
N.prototype.pause.apply(this, arguments), this._input.pause();
|
|
118
|
+
}, this.resume = function() {
|
|
119
|
+
N.prototype.resume.apply(this, arguments), this._input.resume();
|
|
120
|
+
}, this.stream = function(n) {
|
|
121
|
+
this._input = n, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
122
|
+
}, this._checkIsFinished = function() {
|
|
123
|
+
s && t.length === 1 && (this._finished = !0);
|
|
124
|
+
}, this._nextChunk = function() {
|
|
125
|
+
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : r = !0;
|
|
126
|
+
}, this._streamData = W(function(n) {
|
|
127
|
+
try {
|
|
128
|
+
t.push(typeof n == "string" ? n : n.toString(this._config.encoding)), r && (r = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
|
|
129
|
+
} catch (g) {
|
|
130
|
+
this._streamError(g);
|
|
131
|
+
}
|
|
132
|
+
}, this), this._streamError = W(function(n) {
|
|
133
|
+
this._streamCleanUp(), this._sendError(n);
|
|
134
|
+
}, this), this._streamEnd = W(function() {
|
|
135
|
+
this._streamCleanUp(), s = !0, this._streamData("");
|
|
136
|
+
}, this), this._streamCleanUp = W(function() {
|
|
137
|
+
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
138
|
+
}, this);
|
|
139
|
+
}
|
|
140
|
+
function le(e) {
|
|
141
|
+
var t, r, s, n, g = Math.pow(2, 53), I = -g, M = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, B = /^((\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)))$/, w = this, A = 0, u = 0, T = !1, l = !1, d = [], i = { data: [], errors: [], meta: {} };
|
|
142
|
+
function L(p) {
|
|
143
|
+
return e.skipEmptyLines === "greedy" ? p.join("").trim() === "" : p.length === 1 && p[0].length === 0;
|
|
144
|
+
}
|
|
145
|
+
function k() {
|
|
146
|
+
if (i && s && (j("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + o.DefaultDelimiter + "'"), s = !1), e.skipEmptyLines && (i.data = i.data.filter(function(a) {
|
|
147
|
+
return !L(a);
|
|
148
|
+
})), O()) {
|
|
149
|
+
let a = function(b, S) {
|
|
150
|
+
b = ae(b), v(e.transformHeader) && (b = e.transformHeader(b, S)), d.push(b);
|
|
151
|
+
};
|
|
152
|
+
if (i) if (Array.isArray(i.data[0])) {
|
|
153
|
+
for (var p = 0; O() && p < i.data.length; p++) i.data[p].forEach(a);
|
|
154
|
+
i.data.splice(0, 1);
|
|
155
|
+
} else i.data.forEach(a);
|
|
156
|
+
}
|
|
157
|
+
function f(a, b) {
|
|
158
|
+
for (var S = e.header ? {} : [], _ = 0; _ < a.length; _++) {
|
|
159
|
+
var m = _, c = a[_], c = ((z, h) => ((E) => (e.dynamicTypingFunction && e.dynamicTyping[E] === void 0 && (e.dynamicTyping[E] = e.dynamicTypingFunction(E)), (e.dynamicTyping[E] || e.dynamicTyping) === !0))(z) ? h === "true" || h === "TRUE" || h !== "false" && h !== "FALSE" && (((E) => {
|
|
160
|
+
if (M.test(E) && (E = parseFloat(E), I < E && E < g))
|
|
161
|
+
return 1;
|
|
162
|
+
})(h) ? parseFloat(h) : B.test(h) ? new Date(h) : h === "" ? null : h) : h)(m = e.header ? _ >= d.length ? "__parsed_extra" : d[_] : m, c = e.transform ? e.transform(c, m) : c);
|
|
163
|
+
m === "__parsed_extra" ? (S[m] = S[m] || [], S[m].push(c)) : S[m] = c;
|
|
164
|
+
}
|
|
165
|
+
return e.header && (_ > d.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + d.length + " fields but parsed " + _, u + b) : _ < d.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + d.length + " fields but parsed " + _, u + b)), S;
|
|
166
|
+
}
|
|
167
|
+
var R;
|
|
168
|
+
i && (e.header || e.dynamicTyping || e.transform) && (R = 1, !i.data.length || Array.isArray(i.data[0]) ? (i.data = i.data.map(f), R = i.data.length) : i.data = f(i.data, 0), e.header && i.meta && (i.meta.fields = d), u += R);
|
|
169
|
+
}
|
|
170
|
+
function O() {
|
|
171
|
+
return e.header && d.length === 0;
|
|
172
|
+
}
|
|
173
|
+
function j(p, f, R, a) {
|
|
174
|
+
p = { type: p, code: f, message: R }, a !== void 0 && (p.row = a), i.errors.push(p);
|
|
175
|
+
}
|
|
176
|
+
v(e.step) && (n = e.step, e.step = function(p) {
|
|
177
|
+
i = p, O() ? k() : (k(), i.data.length !== 0 && (A += p.data.length, e.preview && A > e.preview ? r.abort() : (i.data = i.data[0], n(i, w))));
|
|
178
|
+
}), this.parse = function(p, f, R) {
|
|
179
|
+
var a = e.quoteChar || '"', a = (e.newline || (e.newline = this.guessLineEndings(p, a)), s = !1, e.delimiter ? v(e.delimiter) && (e.delimiter = e.delimiter(p), i.meta.delimiter = e.delimiter) : ((a = ((b, S, _, m, c) => {
|
|
180
|
+
var z, h, E, $;
|
|
181
|
+
c = c || [",", " ", "|", ";", o.RECORD_SEP, o.UNIT_SEP];
|
|
182
|
+
for (var J = 0; J < c.length; J++) {
|
|
183
|
+
for (var P, V = c[J], C = 0, q = 0, x = 0, D = (E = void 0, new oe({ comments: m, delimiter: V, newline: S, preview: 10 }).parse(b)), K = 0; K < D.data.length; K++) _ && L(D.data[K]) ? x++ : (P = D.data[K].length, q += P, E === void 0 ? E = P : 0 < P && (C += Math.abs(P - E), E = P));
|
|
184
|
+
0 < D.data.length && (q /= D.data.length - x), 1.99 < q && (h === void 0 || C < h || C === h && $ < q) && (h = C, z = V, $ = q);
|
|
185
|
+
}
|
|
186
|
+
return { successful: !!(e.delimiter = z), bestDelimiter: z };
|
|
187
|
+
})(p, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = a.bestDelimiter : (s = !0, e.delimiter = o.DefaultDelimiter), i.meta.delimiter = e.delimiter), ue(e));
|
|
188
|
+
return e.preview && e.header && a.preview++, t = p, r = new oe(a), i = r.parse(t, f, R), k(), T ? { meta: { paused: !0 } } : i || { meta: { paused: !1 } };
|
|
189
|
+
}, this.paused = function() {
|
|
190
|
+
return T;
|
|
191
|
+
}, this.pause = function() {
|
|
192
|
+
T = !0, r.abort(), t = v(e.chunk) ? "" : t.substring(r.getCharIndex());
|
|
193
|
+
}, this.resume = function() {
|
|
194
|
+
w.streamer._halted ? (T = !1, w.streamer.parseChunk(t, !0)) : setTimeout(w.resume, 3);
|
|
195
|
+
}, this.aborted = function() {
|
|
196
|
+
return l;
|
|
197
|
+
}, this.abort = function() {
|
|
198
|
+
l = !0, r.abort(), i.meta.aborted = !0, v(e.complete) && e.complete(i), t = "";
|
|
199
|
+
}, this.guessLineEndings = function(b, a) {
|
|
200
|
+
b = b.substring(0, 1048576);
|
|
201
|
+
var a = new RegExp(X(a) + "([^]*?)" + X(a), "gm"), R = (b = b.replace(a, "")).split("\r"), a = b.split(`
|
|
202
|
+
`), b = 1 < a.length && a[0].length < R[0].length;
|
|
203
|
+
if (R.length === 1 || b) return `
|
|
204
|
+
`;
|
|
205
|
+
for (var S = 0, _ = 0; _ < R.length; _++) R[_][0] === `
|
|
206
|
+
` && S++;
|
|
207
|
+
return S >= R.length / 2 ? `\r
|
|
208
|
+
` : "\r";
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function X(e) {
|
|
212
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
213
|
+
}
|
|
214
|
+
function oe(e) {
|
|
215
|
+
var t = (e = e || {}).delimiter, r = e.newline, s = e.comments, n = e.step, g = e.preview, I = e.fastMode, M = null, B = !1, w = e.quoteChar == null ? '"' : e.quoteChar, A = w;
|
|
216
|
+
if (e.escapeChar !== void 0 && (A = e.escapeChar), (typeof t != "string" || -1 < o.BAD_DELIMITERS.indexOf(t)) && (t = ","), s === t) throw new Error("Comment character same as delimiter");
|
|
217
|
+
s === !0 ? s = "#" : (typeof s != "string" || -1 < o.BAD_DELIMITERS.indexOf(s)) && (s = !1), r !== `
|
|
218
|
+
` && r !== "\r" && r !== `\r
|
|
219
|
+
` && (r = `
|
|
220
|
+
`);
|
|
221
|
+
var u = 0, T = !1;
|
|
222
|
+
this.parse = function(l, d, i) {
|
|
223
|
+
if (typeof l != "string") throw new Error("Input must be a string");
|
|
224
|
+
var L = l.length, k = t.length, O = r.length, j = s.length, p = v(n), f = [], R = [], a = [], b = u = 0;
|
|
225
|
+
if (!l) return C();
|
|
226
|
+
if (I || I !== !1 && l.indexOf(w) === -1) {
|
|
227
|
+
for (var S = l.split(r), _ = 0; _ < S.length; _++) {
|
|
228
|
+
if (a = S[_], u += a.length, _ !== S.length - 1) u += r.length;
|
|
229
|
+
else if (i) return C();
|
|
230
|
+
if (!s || a.substring(0, j) !== s) {
|
|
231
|
+
if (p) {
|
|
232
|
+
if (f = [], $(a.split(t)), q(), T) return C();
|
|
233
|
+
} else $(a.split(t));
|
|
234
|
+
if (g && g <= _) return f = f.slice(0, g), C(!0);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return C();
|
|
238
|
+
}
|
|
239
|
+
for (var m = l.indexOf(t, u), c = l.indexOf(r, u), z = new RegExp(X(A) + X(w), "g"), h = l.indexOf(w, u); ; ) if (l[u] === w) for (h = u, u++; ; ) {
|
|
240
|
+
if ((h = l.indexOf(w, h + 1)) === -1) return i || R.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: f.length, index: u }), P();
|
|
241
|
+
if (h === L - 1) return P(l.substring(u, h).replace(z, w));
|
|
242
|
+
if (w === A && l[h + 1] === A) h++;
|
|
243
|
+
else if (w === A || h === 0 || l[h - 1] !== A) {
|
|
244
|
+
m !== -1 && m < h + 1 && (m = l.indexOf(t, h + 1));
|
|
245
|
+
var E = J((c = c !== -1 && c < h + 1 ? l.indexOf(r, h + 1) : c) === -1 ? m : Math.min(m, c));
|
|
246
|
+
if (l.substr(h + 1 + E, k) === t) {
|
|
247
|
+
a.push(l.substring(u, h).replace(z, w)), l[u = h + 1 + E + k] !== w && (h = l.indexOf(w, u)), m = l.indexOf(t, u), c = l.indexOf(r, u);
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
if (E = J(c), l.substring(h + 1 + E, h + 1 + E + O) === r) {
|
|
251
|
+
if (a.push(l.substring(u, h).replace(z, w)), V(h + 1 + E + O), m = l.indexOf(t, u), h = l.indexOf(w, u), p && (q(), T)) return C();
|
|
252
|
+
if (g && f.length >= g) return C(!0);
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
R.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: f.length, index: u }), h++;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
else if (s && a.length === 0 && l.substring(u, u + j) === s) {
|
|
259
|
+
if (c === -1) return C();
|
|
260
|
+
u = c + O, c = l.indexOf(r, u), m = l.indexOf(t, u);
|
|
261
|
+
} else if (m !== -1 && (m < c || c === -1)) a.push(l.substring(u, m)), u = m + k, m = l.indexOf(t, u);
|
|
262
|
+
else {
|
|
263
|
+
if (c === -1) break;
|
|
264
|
+
if (a.push(l.substring(u, c)), V(c + O), p && (q(), T)) return C();
|
|
265
|
+
if (g && f.length >= g) return C(!0);
|
|
266
|
+
}
|
|
267
|
+
return P();
|
|
268
|
+
function $(x) {
|
|
269
|
+
f.push(x), b = u;
|
|
270
|
+
}
|
|
271
|
+
function J(x) {
|
|
272
|
+
var D = 0;
|
|
273
|
+
return D = x !== -1 && (x = l.substring(h + 1, x)) && x.trim() === "" ? x.length : D;
|
|
274
|
+
}
|
|
275
|
+
function P(x) {
|
|
276
|
+
return i || (x === void 0 && (x = l.substring(u)), a.push(x), u = L, $(a), p && q()), C();
|
|
277
|
+
}
|
|
278
|
+
function V(x) {
|
|
279
|
+
u = x, $(a), a = [], c = l.indexOf(r, u);
|
|
280
|
+
}
|
|
281
|
+
function C(x) {
|
|
282
|
+
if (e.header && !d && f.length && !B) {
|
|
283
|
+
var D = f[0], K = /* @__PURE__ */ Object.create(null), he = new Set(D);
|
|
284
|
+
let ce = !1;
|
|
285
|
+
for (let G = 0; G < D.length; G++) {
|
|
286
|
+
let U = ae(D[G]);
|
|
287
|
+
if (K[U = v(e.transformHeader) ? e.transformHeader(U, G) : U]) {
|
|
288
|
+
let ee, pe = K[U];
|
|
289
|
+
for (; ee = U + "_" + pe, pe++, he.has(ee); ) ;
|
|
290
|
+
he.add(ee), D[G] = ee, K[U]++, ce = !0, (M = M === null ? {} : M)[ee] = U;
|
|
291
|
+
} else K[U] = 1, D[G] = U;
|
|
292
|
+
he.add(U);
|
|
293
|
+
}
|
|
294
|
+
ce && console.warn("Duplicate headers found and renamed."), B = !0;
|
|
295
|
+
}
|
|
296
|
+
return { data: f, errors: R, meta: { delimiter: t, linebreak: r, aborted: T, truncated: !!x, cursor: b + (d || 0), renamedHeaders: M } };
|
|
297
|
+
}
|
|
298
|
+
function q() {
|
|
299
|
+
n(C()), f = [], R = [];
|
|
300
|
+
}
|
|
301
|
+
}, this.abort = function() {
|
|
302
|
+
T = !0;
|
|
303
|
+
}, this.getCharIndex = function() {
|
|
304
|
+
return u;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
function ye(e) {
|
|
308
|
+
var t = e.data, r = te[t.workerId], s = !1;
|
|
309
|
+
if (t.error) r.userError(t.error, t.file);
|
|
310
|
+
else if (t.results && t.results.data) {
|
|
311
|
+
var n = { abort: function() {
|
|
312
|
+
s = !0, de(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
313
|
+
}, pause: fe, resume: fe };
|
|
314
|
+
if (v(r.userStep)) {
|
|
315
|
+
for (var g = 0; g < t.results.data.length && (r.userStep({ data: t.results.data[g], errors: t.results.errors, meta: t.results.meta }, n), !s); g++) ;
|
|
316
|
+
delete t.results;
|
|
317
|
+
} else v(r.userChunk) && (r.userChunk(t.results, n, t.file), delete t.results);
|
|
318
|
+
}
|
|
319
|
+
t.finished && !s && de(t.workerId, t.results);
|
|
320
|
+
}
|
|
321
|
+
function de(e, t) {
|
|
322
|
+
var r = te[e];
|
|
323
|
+
v(r.userComplete) && r.userComplete(t), r.terminate(), delete te[e];
|
|
324
|
+
}
|
|
325
|
+
function fe() {
|
|
326
|
+
throw new Error("Not implemented.");
|
|
327
|
+
}
|
|
328
|
+
function ue(e) {
|
|
329
|
+
if (typeof e != "object" || e === null) return e;
|
|
330
|
+
var t, r = Array.isArray(e) ? [] : {};
|
|
331
|
+
for (t in e) r[t] = ue(e[t]);
|
|
332
|
+
return r;
|
|
333
|
+
}
|
|
334
|
+
function W(e, t) {
|
|
335
|
+
return function() {
|
|
336
|
+
e.apply(t, arguments);
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
function v(e) {
|
|
340
|
+
return typeof e == "function";
|
|
341
|
+
}
|
|
342
|
+
return o.parse = function(e, t) {
|
|
343
|
+
var r = (t = t || {}).dynamicTyping || !1;
|
|
344
|
+
if (v(r) && (t.dynamicTypingFunction = r, r = {}), t.dynamicTyping = r, t.transform = !!v(t.transform) && t.transform, !t.worker || !o.WORKERS_SUPPORTED) return r = null, o.NODE_STREAM_INPUT, typeof e == "string" ? (e = ae(e), r = new (t.download ? re : Y)(t)) : e.readable === !0 && v(e.read) && v(e.on) ? r = new ie(t) : (y.File && e instanceof File || e instanceof Object) && (r = new ne(t)), r.stream(e);
|
|
345
|
+
(r = (() => {
|
|
346
|
+
var s;
|
|
347
|
+
return !!o.WORKERS_SUPPORTED && (s = (() => {
|
|
348
|
+
var n = y.URL || y.webkitURL || null, g = Q.toString();
|
|
349
|
+
return o.BLOB_URL || (o.BLOB_URL = n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", g, ")();"], { type: "text/javascript" })));
|
|
350
|
+
})(), (s = new y.Worker(s)).onmessage = ye, s.id = me++, te[s.id] = s);
|
|
351
|
+
})()).userStep = t.step, r.userChunk = t.chunk, r.userComplete = t.complete, r.userError = t.error, t.step = v(t.step), t.chunk = v(t.chunk), t.complete = v(t.complete), t.error = v(t.error), delete t.worker, r.postMessage({ input: e, config: t, workerId: r.id });
|
|
352
|
+
}, o.unparse = function(e, t) {
|
|
353
|
+
var r = !1, s = !0, n = ",", g = `\r
|
|
354
|
+
`, I = '"', M = I + I, B = !1, w = null, A = !1, u = ((() => {
|
|
355
|
+
if (typeof t == "object") {
|
|
356
|
+
if (typeof t.delimiter != "string" || o.BAD_DELIMITERS.filter(function(d) {
|
|
357
|
+
return t.delimiter.indexOf(d) !== -1;
|
|
358
|
+
}).length || (n = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (r = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (B = t.skipEmptyLines), typeof t.newline == "string" && (g = t.newline), typeof t.quoteChar == "string" && (I = t.quoteChar, M = I + I), typeof t.header == "boolean" && (s = t.header), Array.isArray(t.columns)) {
|
|
359
|
+
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
360
|
+
w = t.columns;
|
|
361
|
+
}
|
|
362
|
+
t.escapeChar !== void 0 && (M = t.escapeChar + I), t.escapeFormulae instanceof RegExp ? A = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (A = /^[=+\-@\t\r].*$/);
|
|
363
|
+
}
|
|
364
|
+
})(), new RegExp(X(I), "g"));
|
|
365
|
+
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
366
|
+
if (!e.length || Array.isArray(e[0])) return T(null, e, B);
|
|
367
|
+
if (typeof e[0] == "object") return T(w || Object.keys(e[0]), e, B);
|
|
368
|
+
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || w), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), T(e.fields || [], e.data || [], B);
|
|
369
|
+
throw new Error("Unable to serialize unrecognized input");
|
|
370
|
+
function T(d, i, L) {
|
|
371
|
+
var k = "", O = (typeof d == "string" && (d = JSON.parse(d)), typeof i == "string" && (i = JSON.parse(i)), Array.isArray(d) && 0 < d.length), j = !Array.isArray(i[0]);
|
|
372
|
+
if (O && s) {
|
|
373
|
+
for (var p = 0; p < d.length; p++) 0 < p && (k += n), k += l(d[p], p);
|
|
374
|
+
0 < i.length && (k += g);
|
|
375
|
+
}
|
|
376
|
+
for (var f = 0; f < i.length; f++) {
|
|
377
|
+
var R = (O ? d : i[f]).length, a = !1, b = O ? Object.keys(i[f]).length === 0 : i[f].length === 0;
|
|
378
|
+
if (L && !O && (a = L === "greedy" ? i[f].join("").trim() === "" : i[f].length === 1 && i[f][0].length === 0), L === "greedy" && O) {
|
|
379
|
+
for (var S = [], _ = 0; _ < R; _++) {
|
|
380
|
+
var m = j ? d[_] : _;
|
|
381
|
+
S.push(i[f][m]);
|
|
382
|
+
}
|
|
383
|
+
a = S.join("").trim() === "";
|
|
384
|
+
}
|
|
385
|
+
if (!a) {
|
|
386
|
+
for (var c = 0; c < R; c++) {
|
|
387
|
+
0 < c && !b && (k += n);
|
|
388
|
+
var z = O && j ? d[c] : c;
|
|
389
|
+
k += l(i[f][z], c);
|
|
390
|
+
}
|
|
391
|
+
f < i.length - 1 && (!L || 0 < R && !b) && (k += g);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return k;
|
|
395
|
+
}
|
|
396
|
+
function l(d, i) {
|
|
397
|
+
var L, k, O;
|
|
398
|
+
return d == null ? "" : d.constructor === Date ? isNaN(d.getTime()) ? "" : d.toISOString() : (O = !1, A && typeof d == "string" && A.test(d) && (d = "'" + d, O = !0), k = (L = d.toString()).replace(u, M), (O = O || r === !0 || typeof r == "function" && r(d, i) || Array.isArray(r) && r[i] || ((j, p) => {
|
|
399
|
+
for (var f = 0; f < p.length; f++) if (-1 < j.indexOf(p[f])) return !0;
|
|
400
|
+
return !1;
|
|
401
|
+
})(k, o.BAD_DELIMITERS) || -1 < k.indexOf(n) || -1 < L.indexOf(I) || k.charAt(0) === " " || k.charAt(k.length - 1) === " ") ? I + k + I : k);
|
|
402
|
+
}
|
|
403
|
+
}, o.RECORD_SEP = "", o.UNIT_SEP = "", o.BYTE_ORDER_MARK = "\uFEFF", o.BAD_DELIMITERS = ["\r", `
|
|
404
|
+
`, '"', o.BYTE_ORDER_MARK], o.WORKERS_SUPPORTED = !F && !!y.Worker, o.NODE_STREAM_INPUT = 1, o.LocalChunkSize = 10485760, o.RemoteChunkSize = 5242880, o.DefaultDelimiter = ",", o.Parser = oe, o.ParserHandle = le, o.NetworkStreamer = re, o.FileStreamer = ne, o.StringStreamer = Y, o.ReadableStreamStreamer = ie, H && (y.onmessage = function(e) {
|
|
405
|
+
e = e.data, o.WORKER_ID === void 0 && e && (o.WORKER_ID = e.workerId), typeof e.input == "string" ? y.postMessage({ workerId: o.WORKER_ID, results: o.parse(e.input, e.config), finished: !0 }) : (y.File && e.input instanceof File || e.input instanceof Object) && (e = o.parse(e.input, e.config)) && y.postMessage({ workerId: o.WORKER_ID, results: e, finished: !0 });
|
|
406
|
+
}), (re.prototype = Object.create(N.prototype)).constructor = re, (ne.prototype = Object.create(N.prototype)).constructor = ne, (Y.prototype = Object.create(Y.prototype)).constructor = Y, (ie.prototype = Object.create(N.prototype)).constructor = ie, o;
|
|
407
|
+
});
|
|
408
|
+
})(ge);
|
|
409
|
+
var _e = ge.exports;
|
|
410
|
+
const Ee = /* @__PURE__ */ ke(_e), Re = /* @__PURE__ */ we({
|
|
411
|
+
__proto__: null,
|
|
412
|
+
default: Ee
|
|
413
|
+
}, [_e]);
|
|
414
|
+
export {
|
|
415
|
+
Re as p
|
|
416
|
+
};
|