@oardi/ts-utils 0.0.41 → 0.0.42
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/extensions/date-extensions.d.ts +1 -0
- package/extensions/date-extensions.d.ts.map +1 -1
- package/index.cjs.js +8 -8
- package/index.es.js +647 -613
- package/index.umd.js +8 -8
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ declare global {
|
|
|
9
9
|
lastDayOfMonth(): Date;
|
|
10
10
|
isAfter(date: ConfigType, unit?: OpUnitType): boolean;
|
|
11
11
|
isBefore(date: ConfigType, unit?: OpUnitType): boolean;
|
|
12
|
+
isoWeek(): number;
|
|
12
13
|
isValid(): boolean;
|
|
13
14
|
set(unit: UnitType, value: number): Date;
|
|
14
15
|
subtract(value: number, unit?: ManipulateType): Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-extensions.d.ts","sourceRoot":"","sources":["../../../lib/extensions/date-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"date-extensions.d.ts","sourceRoot":"","sources":["../../../lib/extensions/date-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQ9E,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,IAAI;QACb,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;QAChD,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;QAC1C,KAAK,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;QAC5B,eAAe,IAAI,IAAI,CAAC;QACxB,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAClC,cAAc,IAAI,IAAI,CAAC;QACvB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;QACtD,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;QACvD,OAAO,IAAI,MAAM,CAAC;QAClB,OAAO,IAAI,OAAO,CAAC;QACnB,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;QACrD,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;KAC9B;CACD;AAED,wBAAgB,kBAAkB,IAAI,IAAI,CAoDzC"}
|
package/index.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const It={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class bt{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}class ht{static breakPoints=It;static getCurrentBreakpoint(){return ht.getBreakpointByScreenWidth(bt.getScreenWidth())}static getBreakpointByScreenWidth(t=bt.getScreenWidth()){let i="xs";for(const c of Object.keys(ht.breakPoints))ht.breakPoints[c]<=t&&(i=c);return{breakpoint:i,screenWidth:t}}isScreenGreaterThan(t){return bt.getScreenWidth()>ht.breakPoints[t]}isScreenSmallerThan(t){return bt.getScreenWidth()<ht.breakPoints[t]}}var X=(s=>(s.opera="opera",s.firefox="firefox",s.safari="safari",s.ie="ie",s.edgeLegacy="edgeLegacy",s.edg="edg",s.chrome="chrome",s.iOS="iOS",s.headlessChrome="headlessChrome",s.nodeRuntime="nodeRuntime",s.electron="electron",s))(X||{});const jt=typeof navigator<"u"?navigator.userAgent:"",ft=jt.toLowerCase();class tt{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(t=ft){return this.isBrowserEnv()?t.includes("opr/")||t.includes("opera"):!1}static isFirefox(t=ft){return this.isBrowserEnv()?t.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(t=ft){if(!this.isBrowserEnv())return!1;const i=navigator.vendor&&navigator.vendor.includes("Apple"),c=t.includes("safari"),S=!(t.includes("crios")||t.includes("chrome")||t.includes("android")||t.includes("opr/")||t.includes("edg"));return i&&c&&S}static isIOS(t=ft){if(!this.isBrowserEnv())return!1;const i=/iphone|ipad|ipod/.test(t),c=t.includes("macintosh")&&navigator.maxTouchPoints>1;return i||c}static isEdgeLegacy(){return this.isBrowserEnv()?!!window.StyleMedia&&!ft.includes("edg/"):!1}static isEdg(t=ft){return this.isBrowserEnv()?t.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(t=ft){if(!this.isBrowserEnv())return!1;const i=navigator.vendor&&navigator.vendor.includes("Google"),c=t.includes("chrome")||t.includes("crios"),S=!this.isEdg(t)&&!this.isOpera(t);return i&&c&&S}static isElectron(t=ft){return typeof process<"u"&&process.versions?.electron?!0:t.includes("electron")}static isHeadlessChrome(t=ft){return t.includes("headlesschrome")}static isNodeRuntime(){return typeof process<"u"&&!!process.versions?.node&&!this.isBrowserEnv()}static getCurrentBrowser(){const t=navigator.userAgent.toLowerCase();if(typeof navigator>"u")throw new Error("navigator not set");if(tt.isOpera())return X.opera;if(tt.isFirefox())return X.firefox;if(tt.isSafari())return X.safari;if(tt.isIE())return X.ie;if(tt.isEdgeLegacy())return X.edgeLegacy;if(tt.isEdg())return X.edg;if(tt.isChrome())return X.chrome;if(tt.isIOS(t))return X.iOS;if(tt.isElectron(t))return X.electron;if(tt.isHeadlessChrome(t))return X.headlessChrome;if(tt.isNodeRuntime())return X.nodeRuntime;throw new Error("Browser could not be detected: "+t)}}function Pt(s){return navigator.clipboard.writeText(s)}function Mt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Et={exports:{}};var Ut=Et.exports,Rt;function Bt(){return Rt||(Rt=1,(function(s,t){((i,c)=>{s.exports=c()})(Ut,function i(){var c=typeof self<"u"?self:typeof window<"u"?window:c!==void 0?c:{},S,$=!c.document&&!!c.postMessage,L=c.IS_PAPA_WORKER||!1,N={},q=0,_={};function W(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(r){var n=ut(r);n.chunkSize=parseInt(n.chunkSize),r.step||r.chunk||(n.chunkSize=null),this._handle=new nt(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(r,n){var o=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<o){let k=this._config.newline;k||(g=this._config.quoteChar||'"',k=this._handle.guessLineEndings(r,g)),r=[...r.split(k).slice(o)].join(k)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(r))!==void 0&&(r=g),this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+r,g=(this._partialLine="",this._handle.parse(o,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(r=g.meta.cursor,o=(this._finished||(this._partialLine=o.substring(r-this._baseIndex),this._baseIndex=r),g&&g.data&&(this._rowCount+=g.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),L)c.postMessage({results:g,workerId:_.WORKER_ID,finished:o});else if(R(this._config.chunk)&&!n){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=g=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!o||!R(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(r){R(this._config.error)?this._config.error(r):L&&this._config.error&&c.postMessage({workerId:_.WORKER_ID,error:r,finished:!1})}}function B(e){var r;(e=e||{}).chunkSize||(e.chunkSize=_.RemoteChunkSize),W.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),$||(r.onload=K(this._chunkLoaded,this),r.onerror=K(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,o=this._config.downloadRequestHeaders;for(n in o)r.setRequestHeader(n,o[n])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,r.setRequestHeader("Range","bytes="+this._start+"-"+g));try{r.send(this._config.downloadRequestBody)}catch(k){this._chunkError(k.message)}$&&r.status===0&&this._chunkError()}},this._chunkLoaded=function(){r.readyState===4&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize||r.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)))},this._chunkError=function(n){n=r.statusText||n,this._sendError(new Error(n))}}function rt(e){(e=e||{}).chunkSize||(e.chunkSize=_.LocalChunkSize),W.call(this,e);var r,n,o=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,o?((r=new FileReader).onload=K(this._chunkLoaded,this),r.onerror=K(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var g=this._input,k=(this._config.chunkSize&&(k=Math.min(this._start+this._config.chunkSize,this._input.size),g=n.call(g,this._start,k)),r.readAsText(g,this._config.encoding));o||this._chunkLoaded({target:{result:k}})},this._chunkLoaded=function(g){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(g.target.result)},this._chunkError=function(){this._sendError(r.error)}}function V(e){var r;W.call(this,e=e||{}),this.stream=function(n){return r=n,this._nextChunk()},this._nextChunk=function(){var n,o;if(!this._finished)return n=this._config.chunkSize,r=n?(o=r.substring(0,n),r.substring(n)):(o=r,""),this._finished=!r,this.parseChunk(o)}}function G(e){W.call(this,e=e||{});var r=[],n=!0,o=!1;this.pause=function(){W.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){W.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(g){this._input=g,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&r.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),r.length?this.parseChunk(r.shift()):n=!0},this._streamData=K(function(g){try{r.push(typeof g=="string"?g:g.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(k){this._streamError(k)}},this),this._streamError=K(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=K(function(){this._streamCleanUp(),o=!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 nt(e){var r,n,o,g,k=Math.pow(2,53),m=-k,d=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\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)))$/,a=this,u=0,f=0,y=!1,p=!1,v=[],h={data:[],errors:[],meta:{}};function O(b){return e.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function C(){if(h&&o&&(U("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+_.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines&&(h.data=h.data.filter(function(w){return!O(w)})),F()){let w=function(T,z){R(e.transformHeader)&&(T=e.transformHeader(T,z)),v.push(T)};if(h)if(Array.isArray(h.data[0])){for(var b=0;F()&&b<h.data.length;b++)h.data[b].forEach(w);h.data.splice(0,1)}else h.data.forEach(w)}function x(w,T){for(var z=e.header?{}:[],A=0;A<w.length;A++){var I=A,M=w[A],M=((et,E)=>(j=>(e.dynamicTypingFunction&&e.dynamicTyping[j]===void 0&&(e.dynamicTyping[j]=e.dynamicTypingFunction(j)),(e.dynamicTyping[j]||e.dynamicTyping)===!0))(et)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((j=>{if(d.test(j)&&(j=parseFloat(j),m<j&&j<k))return 1})(E)?parseFloat(E):l.test(E)?new Date(E):E===""?null:E):E)(I=e.header?A>=v.length?"__parsed_extra":v[A]:I,M=e.transform?e.transform(M,I):M);I==="__parsed_extra"?(z[I]=z[I]||[],z[I].push(M)):z[I]=M}return e.header&&(A>v.length?U("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+A,f+T):A<v.length&&U("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+A,f+T)),z}var D;h&&(e.header||e.dynamicTyping||e.transform)&&(D=1,!h.data.length||Array.isArray(h.data[0])?(h.data=h.data.map(x),D=h.data.length):h.data=x(h.data,0),e.header&&h.meta&&(h.meta.fields=v),f+=D)}function F(){return e.header&&v.length===0}function U(b,x,D,w){b={type:b,code:x,message:D},w!==void 0&&(b.row=w),h.errors.push(b)}R(e.step)&&(g=e.step,e.step=function(b){h=b,F()?C():(C(),h.data.length!==0&&(u+=b.data.length,e.preview&&u>e.preview?n.abort():(h.data=h.data[0],g(h,a))))}),this.parse=function(b,x,D){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(b,w)),o=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(b),h.meta.delimiter=e.delimiter):((w=((T,z,A,I,M)=>{var et,E,j,dt;M=M||[","," ","|",";",_.RECORD_SEP,_.UNIT_SEP];for(var mt=0;mt<M.length;mt++){for(var it,wt=M[mt],J=0,st=0,Y=0,Z=(j=void 0,new gt({comments:I,delimiter:wt,newline:z,preview:10}).parse(T)),ct=0;ct<Z.data.length;ct++)A&&O(Z.data[ct])?Y++:(it=Z.data[ct].length,st+=it,j===void 0?j=it:0<it&&(J+=Math.abs(it-j),j=it));0<Z.data.length&&(st/=Z.data.length-Y),(E===void 0||J<=E)&&(dt===void 0||dt<st)&&1.99<st&&(E=J,et=wt,dt=st)}return{successful:!!(e.delimiter=et),bestDelimiter:et}})(b,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(o=!0,e.delimiter=_.DefaultDelimiter),h.meta.delimiter=e.delimiter),ut(e));return e.preview&&e.header&&w.preview++,r=b,n=new gt(w),h=n.parse(r,x,D),C(),y?{meta:{paused:!0}}:h||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),r=R(e.chunk)?"":r.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(y=!1,a.streamer.parseChunk(r,!0)):setTimeout(a.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),h.meta.aborted=!0,R(e.complete)&&e.complete(h),r=""},this.guessLineEndings=function(T,w){T=T.substring(0,1048576);var w=new RegExp(ot(w)+"([^]*?)"+ot(w),"gm"),D=(T=T.replace(w,"")).split("\r"),w=T.split(`
|
|
2
|
-
`),
|
|
3
|
-
`;for(var
|
|
4
|
-
`&&
|
|
5
|
-
`:"\r"}}function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gt(e){var r=(e=e||{}).delimiter,n=e.newline,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ft={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class bt{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}class ht{static breakPoints=Ft;static getCurrentBreakpoint(){return ht.getBreakpointByScreenWidth(bt.getScreenWidth())}static getBreakpointByScreenWidth(t=bt.getScreenWidth()){let i="xs";for(const o of Object.keys(ht.breakPoints))ht.breakPoints[o]<=t&&(i=o);return{breakpoint:i,screenWidth:t}}isScreenGreaterThan(t){return bt.getScreenWidth()>ht.breakPoints[t]}isScreenSmallerThan(t){return bt.getScreenWidth()<ht.breakPoints[t]}}var tt=(s=>(s.opera="opera",s.firefox="firefox",s.safari="safari",s.ie="ie",s.edgeLegacy="edgeLegacy",s.edg="edg",s.chrome="chrome",s.iOS="iOS",s.headlessChrome="headlessChrome",s.nodeRuntime="nodeRuntime",s.electron="electron",s))(tt||{});const Ut=typeof navigator<"u"?navigator.userAgent:"",ft=Ut.toLowerCase();class et{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(t=ft){return this.isBrowserEnv()?t.includes("opr/")||t.includes("opera"):!1}static isFirefox(t=ft){return this.isBrowserEnv()?t.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(t=ft){if(!this.isBrowserEnv())return!1;const i=navigator.vendor&&navigator.vendor.includes("Apple"),o=t.includes("safari"),k=!(t.includes("crios")||t.includes("chrome")||t.includes("android")||t.includes("opr/")||t.includes("edg"));return i&&o&&k}static isIOS(t=ft){if(!this.isBrowserEnv())return!1;const i=/iphone|ipad|ipod/.test(t),o=t.includes("macintosh")&&navigator.maxTouchPoints>1;return i||o}static isEdgeLegacy(){return this.isBrowserEnv()?!!window.StyleMedia&&!ft.includes("edg/"):!1}static isEdg(t=ft){return this.isBrowserEnv()?t.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(t=ft){if(!this.isBrowserEnv())return!1;const i=navigator.vendor&&navigator.vendor.includes("Google"),o=t.includes("chrome")||t.includes("crios"),k=!this.isEdg(t)&&!this.isOpera(t);return i&&o&&k}static isElectron(t=ft){return typeof process<"u"&&process.versions?.electron?!0:t.includes("electron")}static isHeadlessChrome(t=ft){return t.includes("headlesschrome")}static isNodeRuntime(){return typeof process<"u"&&!!process.versions?.node&&!this.isBrowserEnv()}static getCurrentBrowser(){const t=navigator.userAgent.toLowerCase();if(typeof navigator>"u")throw new Error("navigator not set");if(et.isOpera())return tt.opera;if(et.isFirefox())return tt.firefox;if(et.isSafari())return tt.safari;if(et.isIE())return tt.ie;if(et.isEdgeLegacy())return tt.edgeLegacy;if(et.isEdg())return tt.edg;if(et.isChrome())return tt.chrome;if(et.isIOS(t))return tt.iOS;if(et.isElectron(t))return tt.electron;if(et.isHeadlessChrome(t))return tt.headlessChrome;if(et.isNodeRuntime())return tt.nodeRuntime;throw new Error("Browser could not be detected: "+t)}}function Wt(s){return navigator.clipboard.writeText(s)}function Mt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Et={exports:{}};var Yt=Et.exports,Tt;function Bt(){return Tt||(Tt=1,(function(s,t){((i,o)=>{s.exports=o()})(Yt,function i(){var o=typeof self<"u"?self:typeof window<"u"?window:o!==void 0?o:{},k,D=!o.document&&!!o.postMessage,T=o.IS_PAPA_WORKER||!1,P={},q=0,p={};function U(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(r){var n=ut(r);n.chunkSize=parseInt(n.chunkSize),r.step||r.chunk||(n.chunkSize=null),this._handle=new rt(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(r,n){var u=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<u){let S=this._config.newline;S||(m=this._config.quoteChar||'"',S=this._handle.guessLineEndings(r,m)),r=[...r.split(S).slice(u)].join(S)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(r))!==void 0&&(r=m),this.isFirstChunk=!1,this._halted=!1;var u=this._partialLine+r,m=(this._partialLine="",this._handle.parse(u,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(r=m.meta.cursor,u=(this._finished||(this._partialLine=u.substring(r-this._baseIndex),this._baseIndex=r),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),T)o.postMessage({results:m,workerId:p.WORKER_ID,finished:u});else if(R(this._config.chunk)&&!n){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!u||!R(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(r){R(this._config.error)?this._config.error(r):T&&this._config.error&&o.postMessage({workerId:p.WORKER_ID,error:r,finished:!1})}}function F(e){var r;(e=e||{}).chunkSize||(e.chunkSize=p.RemoteChunkSize),U.call(this,e),this._nextChunk=D?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),D||(r.onload=Q(this._chunkLoaded,this),r.onerror=Q(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!D),this._config.downloadRequestHeaders){var n,u=this._config.downloadRequestHeaders;for(n in u)r.setRequestHeader(n,u[n])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,r.setRequestHeader("Range","bytes="+this._start+"-"+m));try{r.send(this._config.downloadRequestBody)}catch(S){this._chunkError(S.message)}D&&r.status===0&&this._chunkError()}},this._chunkLoaded=function(){r.readyState===4&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize||r.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)))},this._chunkError=function(n){n=r.statusText||n,this._sendError(new Error(n))}}function J(e){(e=e||{}).chunkSize||(e.chunkSize=p.LocalChunkSize),U.call(this,e);var r,n,u=typeof FileReader<"u";this.stream=function(m){this._input=m,n=m.slice||m.webkitSlice||m.mozSlice,u?((r=new FileReader).onload=Q(this._chunkLoaded,this),r.onerror=Q(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,S=(this._config.chunkSize&&(S=Math.min(this._start+this._config.chunkSize,this._input.size),m=n.call(m,this._start,S)),r.readAsText(m,this._config.encoding));u||this._chunkLoaded({target:{result:S}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(r.error)}}function N(e){var r;U.call(this,e=e||{}),this.stream=function(n){return r=n,this._nextChunk()},this._nextChunk=function(){var n,u;if(!this._finished)return n=this._config.chunkSize,r=n?(u=r.substring(0,n),r.substring(n)):(u=r,""),this._finished=!r,this.parseChunk(u)}}function G(e){U.call(this,e=e||{});var r=[],n=!0,u=!1;this.pause=function(){U.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){U.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){u&&r.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),r.length?this.parseChunk(r.shift()):n=!0},this._streamData=Q(function(m){try{r.push(typeof m=="string"?m:m.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(S){this._streamError(S)}},this),this._streamError=Q(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=Q(function(){this._streamCleanUp(),u=!0,this._streamData("")},this),this._streamCleanUp=Q(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function rt(e){var r,n,u,m,S=Math.pow(2,53),y=-S,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,d=/^((\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)))$/,a=this,c=0,f=0,v=!1,g=!1,w=[],h={data:[],errors:[],meta:{}};function M(b){return e.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function C(){if(h&&u&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+p.DefaultDelimiter+"'"),u=!1),e.skipEmptyLines&&(h.data=h.data.filter(function(_){return!M(_)})),z()){let _=function(A,j){R(e.transformHeader)&&(A=e.transformHeader(A,j)),w.push(A)};if(h)if(Array.isArray(h.data[0])){for(var b=0;z()&&b<h.data.length;b++)h.data[b].forEach(_);h.data.splice(0,1)}else h.data.forEach(_)}function x(_,A){for(var j=e.header?{}:[],I=0;I<_.length;I++){var L=I,$=_[I],$=((nt,E)=>(W=>(e.dynamicTypingFunction&&e.dynamicTyping[W]===void 0&&(e.dynamicTyping[W]=e.dynamicTypingFunction(W)),(e.dynamicTyping[W]||e.dynamicTyping)===!0))(nt)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((W=>{if(l.test(W)&&(W=parseFloat(W),y<W&&W<S))return 1})(E)?parseFloat(E):d.test(E)?new Date(E):E===""?null:E):E)(L=e.header?I>=w.length?"__parsed_extra":w[I]:L,$=e.transform?e.transform($,L):$);L==="__parsed_extra"?(j[L]=j[L]||[],j[L].push($)):j[L]=$}return e.header&&(I>w.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+I,f+A):I<w.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+w.length+" fields but parsed "+I,f+A)),j}var O;h&&(e.header||e.dynamicTyping||e.transform)&&(O=1,!h.data.length||Array.isArray(h.data[0])?(h.data=h.data.map(x),O=h.data.length):h.data=x(h.data,0),e.header&&h.meta&&(h.meta.fields=w),f+=O)}function z(){return e.header&&w.length===0}function B(b,x,O,_){b={type:b,code:x,message:O},_!==void 0&&(b.row=_),h.errors.push(b)}R(e.step)&&(m=e.step,e.step=function(b){h=b,z()?C():(C(),h.data.length!==0&&(c+=b.data.length,e.preview&&c>e.preview?n.abort():(h.data=h.data[0],m(h,a))))}),this.parse=function(b,x,O){var _=e.quoteChar||'"',_=(e.newline||(e.newline=this.guessLineEndings(b,_)),u=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(b),h.meta.delimiter=e.delimiter):((_=((A,j,I,L,$)=>{var nt,E,W,lt;$=$||[","," ","|",";",p.RECORD_SEP,p.UNIT_SEP];for(var mt=0;mt<$.length;mt++){for(var it,_t=$[mt],V=0,st=0,K=0,X=(W=void 0,new gt({comments:L,delimiter:_t,newline:j,preview:10}).parse(A)),ct=0;ct<X.data.length;ct++)I&&M(X.data[ct])?K++:(it=X.data[ct].length,st+=it,W===void 0?W=it:0<it&&(V+=Math.abs(it-W),W=it));0<X.data.length&&(st/=X.data.length-K),(E===void 0||V<=E)&&(lt===void 0||lt<st)&&1.99<st&&(E=V,nt=_t,lt=st)}return{successful:!!(e.delimiter=nt),bestDelimiter:nt}})(b,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=_.bestDelimiter:(u=!0,e.delimiter=p.DefaultDelimiter),h.meta.delimiter=e.delimiter),ut(e));return e.preview&&e.header&&_.preview++,r=b,n=new gt(_),h=n.parse(r,x,O),C(),v?{meta:{paused:!0}}:h||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,n.abort(),r=R(e.chunk)?"":r.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(v=!1,a.streamer.parseChunk(r,!0)):setTimeout(a.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),h.meta.aborted=!0,R(e.complete)&&e.complete(h),r=""},this.guessLineEndings=function(A,_){A=A.substring(0,1048576);var _=new RegExp(ot(_)+"([^]*?)"+ot(_),"gm"),O=(A=A.replace(_,"")).split("\r"),_=A.split(`
|
|
2
|
+
`),A=1<_.length&&_[0].length<O[0].length;if(O.length===1||A)return`
|
|
3
|
+
`;for(var j=0,I=0;I<O.length;I++)O[I][0]===`
|
|
4
|
+
`&&j++;return j>=O.length/2?`\r
|
|
5
|
+
`:"\r"}}function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gt(e){var r=(e=e||{}).delimiter,n=e.newline,u=e.comments,m=e.step,S=e.preview,y=e.fastMode,l=null,d=!1,a=e.quoteChar==null?'"':e.quoteChar,c=a;if(e.escapeChar!==void 0&&(c=e.escapeChar),(typeof r!="string"||-1<p.BAD_DELIMITERS.indexOf(r))&&(r=","),u===r)throw new Error("Comment character same as delimiter");u===!0?u="#":(typeof u!="string"||-1<p.BAD_DELIMITERS.indexOf(u))&&(u=!1),n!==`
|
|
6
6
|
`&&n!=="\r"&&n!==`\r
|
|
7
7
|
`&&(n=`
|
|
8
|
-
`);var f=0,
|
|
9
|
-
`,
|
|
10
|
-
`,'"',_.BYTE_ORDER_MARK],_.WORKERS_SUPPORTED=!$&&!!c.Worker,_.NODE_STREAM_INPUT=1,_.LocalChunkSize=10485760,_.RemoteChunkSize=5242880,_.DefaultDelimiter=",",_.Parser=gt,_.ParserHandle=nt,_.NetworkStreamer=B,_.FileStreamer=rt,_.StringStreamer=V,_.ReadableStreamStreamer=G,c.jQuery&&((S=c.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(k){if(!(S(this).prop("tagName").toUpperCase()==="INPUT"&&S(this).attr("type").toLowerCase()==="file"&&c.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:S.extend({},r)})}),o(),this;function o(){if(n.length===0)R(e.complete)&&e.complete();else{var k,m,d,l,a=n[0];if(R(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return k="AbortError",m=a.file,d=a.inputElem,l=u.reason,void(R(e.error)&&e.error({name:k},m,d,l));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=S.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var f=a.instanceConfig.complete;a.instanceConfig.complete=function(y){R(f)&&f(y,a.file,a.inputElem),g()},_.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),L&&(c.onmessage=function(e){e=e.data,_.WORKER_ID===void 0&&e&&(_.WORKER_ID=e.workerId),typeof e.input=="string"?c.postMessage({workerId:_.WORKER_ID,results:_.parse(e.input,e.config),finished:!0}):(c.File&&e.input instanceof File||e.input instanceof Object)&&(e=_.parse(e.input,e.config))&&c.postMessage({workerId:_.WORKER_ID,results:e,finished:!0})}),(B.prototype=Object.create(W.prototype)).constructor=B,(rt.prototype=Object.create(W.prototype)).constructor=rt,(V.prototype=Object.create(V.prototype)).constructor=V,(G.prototype=Object.create(W.prototype)).constructor=G,_})})(Et)),Et.exports}var Yt=Bt();const Nt=Mt(Yt),{parse:qt,unparse:Wt}=Nt;class Kt{static unparse(t,i){return Wt(t,i)}static parse(t){return new Promise((i,c)=>{qt(t,{header:!0,complete:S=>i(S),error:S=>c(S)})})}}async function Lt(s,t,i){const c=i?.mimeType??Qt(t),S=Jt(s,c);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const q=await(await window.showSaveFilePicker({suggestedName:t,types:[{description:"Datei",accept:{[c]:[`.${Ft(t)}`]}}]})).createWritable();await q.write(S),await q.close();return}catch{}const $=URL.createObjectURL(S),L=document.createElement("a");L.href=$,L.download=t,L.rel="noopener",L.style.display="none",document.body.appendChild(L),Vt(L),window.setTimeout(()=>{document.body.removeChild(L),URL.revokeObjectURL($)},0),Zt()&&window.open($,"_blank","noopener,noreferrer")}function Jt(s,t){if(s instanceof Blob)return s.type?s:new Blob([s],{type:t});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:t})}return new Blob([s],{type:t||"text/plain;charset=utf-8"})}function Qt(s){switch(Ft(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function Ft(s){const t=s.lastIndexOf(".");return t>=0&&t<s.length-1?s.slice(t+1):""}function Vt(s){const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(t)}function Zt(){const s=navigator.userAgent,t=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return t||i}class Gt{static getEnumValue(t,i){if(i in t)return t[i];throw Error(`${i} not found in ${t}`)}static getKeyValues(t){return Object.keys(t).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:t[i]}))}}class Ht{static getFileExtension(t){let i="";const c=t.lastIndexOf(".");return c>0&&c<t.length-1&&(i=`.${t.substring(c+1).toLowerCase()}`),i}static readAsText(t){const i=new FileReader;return new Promise((c,S)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?c(i.result):S(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,S($)},i.readAsText(t)})}static readAsArrayBuffer(t){const i=new FileReader;return new Promise((c,S)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?c(i.result):S(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,S($)},i.readAsArrayBuffer(t)})}static readAsDataUrl(t){const i=new FileReader;return new Promise((c,S)=>{i.onload=$=>{c($)},i.onerror=$=>S($),i.readAsDataURL(t)})}static formatFileSize(t,i=2,c){if(t===0)return"0 Bytes";const S=1024,$=["Bytes","KB","MB","GB","TB"];let L=Math.floor(Math.log(t)/Math.log(S));c&&$.includes(c)&&(L=$.indexOf(c));const N=t/Math.pow(S,L);return`${parseFloat(N.toFixed(i))} ${$[L]}`}static save(t,i,c){const S=new Blob([t],{type:c});Lt(S,i)}}class vt{static set(t,i){localStorage.setItem(t,JSON.stringify(i))}static get(t){let i=null;const c=localStorage.getItem(t);return c&&(i=JSON.parse(c)),i}static remove(t){let i=!!vt.get(t);return i&&localStorage.removeItem(t),i}static removeAll(){localStorage.clear()}static getKeysBy(t){return Object.keys(localStorage).filter(i=>i.startsWith(t))}}var pt=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(pt||{});class Q{static listeners=new Set;static enabled=!0;static log(...t){Q.doLog(pt.log,t)}static info(...t){Q.doLog(pt.info,t)}static warn(...t){Q.doLog(pt.warn,t)}static debug(...t){Q.doLog(pt.debug,t)}static error(...t){Q.doLog(pt.error,t)}static clearListeners(){Q.listeners.clear()}static setEnabled(t){Q.enabled=t}static doLog(t,i){if(!Q.enabled)return;const c={type:t,args:i,timestamp:new Date().toISOString()};for(const S of Q.listeners)try{if(S(c)===!1)return}catch{}console[t].apply(console,i)}static onLog(t,i=!1){if(i){const c=S=>{try{return t(S)}finally{Q.listeners.delete(c)}};return Q.listeners.add(c),()=>Q.listeners.delete(c)}return Q.listeners.add(t),()=>Q.listeners.delete(t)}}const Xt=(s,t,i)=>s.localeCompare(t)*(i?1:-1),te=(s,t)=>s<t?-1:s===t?0:1,ee=(s,t,i)=>te(s,t)*(i?1:-1),re=(s,t,i)=>{let c=0;return typeof s=="string"&&typeof t=="string"?c=Xt(s,t,i):c=ee(s,t,i),c},zt=(s,t,i,c)=>{const S=i(s),$=i(t);return re(S,$,c)};class ne{static get(t){return vt.get(t)}static set(t,i){vt.set(t,i)}static remove(t){vt.remove(t)}}class P{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=window.innerWidth;static onResize(t){return P.initialized||P.init(),P.listeners.add(t),()=>P.off(t)}static handleResize=()=>{P.resizeTimeout!==null&&(window.clearTimeout(P.resizeTimeout),P.resizeTimeout=null),P.resizeTimeout=window.setTimeout(()=>{const t=window.innerWidth;if(t!==P.lastWidth){P.lastWidth=t;for(const i of P.listeners)i(t)}},150)};static init(){P.initialized||(window.addEventListener("resize",P.handleResize,{passive:!0}),P.initialized=!0)}static off(t){P.initialized&&(P.listeners.delete(t),P.listeners.size===0&&(window.removeEventListener("resize",P.handleResize),P.initialized=!1))}}function ie(){Array.prototype.distinct=function(s){return s?this.filter((i,c,S)=>S.findIndex($=>s($,i))===c):this.filter((i,c,S)=>S.indexOf(i)===c)},Array.prototype.filterBy=function(s){return this.filter(t=>s(t))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((t,i)=>{const c=s(i);return t[c]||(t[c]=[]),t[c].push(i),t},{})},Array.prototype.orderBy=function(s,t=!0){return this?.sort((i,c)=>zt(i,c,s,t)),this},Array.prototype.removeBy=function(s,t){return this.filter(i=>s(i)!==t)}}var xt={exports:{}},se=xt.exports,Tt;function ae(){return Tt||(Tt=1,(function(s,t){(function(i,c){s.exports=c()})(se,(function(){var i=1e3,c=6e4,S=36e5,$="millisecond",L="second",N="minute",q="hour",_="day",W="week",B="month",rt="quarter",V="year",G="date",nt="Invalid Date",ot=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(m){var d=["th","st","nd","rd"],l=m%100;return"["+m+(d[(l-20)%10]||d[l]||d[0])+"]"}},lt=function(m,d,l){var a=String(m);return!a||a.length>=d?m:""+Array(d+1-a.length).join(l)+m},kt={s:lt,z:function(m){var d=-m.utcOffset(),l=Math.abs(d),a=Math.floor(l/60),u=l%60;return(d<=0?"+":"-")+lt(a,2,"0")+":"+lt(u,2,"0")},m:function m(d,l){if(d.date()<l.date())return-m(l,d);var a=12*(l.year()-d.year())+(l.month()-d.month()),u=d.clone().add(a,B),f=l-u<0,y=d.clone().add(a+(f?-1:1),B);return+(-(a+(l-u)/(f?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:B,y:V,w:W,d:_,D:G,h:q,m:N,s:L,ms:$,Q:rt}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ut="en",K={};K[ut]=_t;var R="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[R])},r=function m(d,l,a){var u;if(!d)return ut;if(typeof d=="string"){var f=d.toLowerCase();K[f]&&(u=f),l&&(K[f]=l,u=f);var y=d.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=d.name;K[p]=d,u=p}return!a&&u&&(ut=u),u||!a&&ut},n=function(m,d){if(e(m))return m.clone();var l=typeof d=="object"?d:{};return l.date=m,l.args=arguments,new g(l)},o=kt;o.l=r,o.i=e,o.w=function(m,d){return n(m,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var g=(function(){function m(l){this.$L=r(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[R]=!0}var d=m.prototype;return d.parse=function(l){this.$d=(function(a){var u=a.date,f=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(ot);if(y){var p=y[2]-1||0,v=(y[7]||"0").substring(0,3);return f?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(u)})(l),this.init()},d.init=function(){var l=this.$d;this.$y=l.getFullYear(),this.$M=l.getMonth(),this.$D=l.getDate(),this.$W=l.getDay(),this.$H=l.getHours(),this.$m=l.getMinutes(),this.$s=l.getSeconds(),this.$ms=l.getMilliseconds()},d.$utils=function(){return o},d.isValid=function(){return this.$d.toString()!==nt},d.isSame=function(l,a){var u=n(l);return this.startOf(a)<=u&&u<=this.endOf(a)},d.isAfter=function(l,a){return n(l)<this.startOf(a)},d.isBefore=function(l,a){return this.endOf(a)<n(l)},d.$g=function(l,a,u){return o.u(l)?this[a]:this.set(u,l)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(l,a){var u=this,f=!!o.u(a)||a,y=o.p(l),p=function(x,D){var w=o.w(u.$u?Date.UTC(u.$y,D,x):new Date(u.$y,D,x),u);return f?w:w.endOf(_)},v=function(x,D){return o.w(u.toDate()[x].apply(u.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(D)),u)},h=this.$W,O=this.$M,C=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case V:return f?p(1,0):p(31,11);case B:return f?p(1,O):p(0,O+1);case W:var U=this.$locale().weekStart||0,b=(h<U?h+7:h)-U;return p(f?C-b:C+(6-b),O);case _:case G:return v(F+"Hours",0);case q:return v(F+"Minutes",1);case N:return v(F+"Seconds",2);case L:return v(F+"Milliseconds",3);default:return this.clone()}},d.endOf=function(l){return this.startOf(l,!1)},d.$set=function(l,a){var u,f=o.p(l),y="set"+(this.$u?"UTC":""),p=(u={},u[_]=y+"Date",u[G]=y+"Date",u[B]=y+"Month",u[V]=y+"FullYear",u[q]=y+"Hours",u[N]=y+"Minutes",u[L]=y+"Seconds",u[$]=y+"Milliseconds",u)[f],v=f===_?this.$D+(a-this.$W):a;if(f===B||f===V){var h=this.clone().set(G,1);h.$d[p](v),h.init(),this.$d=h.set(G,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](v);return this.init(),this},d.set=function(l,a){return this.clone().$set(l,a)},d.get=function(l){return this[o.p(l)]()},d.add=function(l,a){var u,f=this;l=Number(l);var y=o.p(a),p=function(O){var C=n(f);return o.w(C.date(C.date()+Math.round(O*l)),f)};if(y===B)return this.set(B,this.$M+l);if(y===V)return this.set(V,this.$y+l);if(y===_)return p(1);if(y===W)return p(7);var v=(u={},u[N]=c,u[q]=S,u[L]=i,u)[y]||1,h=this.$d.getTime()+l*v;return o.w(h,this)},d.subtract=function(l,a){return this.add(-1*l,a)},d.format=function(l){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||nt;var f=l||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,v=this.$m,h=this.$M,O=u.weekdays,C=u.months,F=u.meridiem,U=function(D,w,T,z){return D&&(D[w]||D(a,f))||T[w].slice(0,z)},b=function(D){return o.s(p%12||12,D,"0")},x=F||function(D,w,T){var z=D<12?"AM":"PM";return T?z.toLowerCase():z};return f.replace(gt,(function(D,w){return w||(function(T){switch(T){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return h+1;case"MM":return o.s(h+1,2,"0");case"MMM":return U(u.monthsShort,h,C,3);case"MMMM":return U(C,h);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return U(u.weekdaysMin,a.$W,O,2);case"ddd":return U(u.weekdaysShort,a.$W,O,3);case"dddd":return O[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return x(p,v,!0);case"A":return x(p,v,!1);case"m":return String(v);case"mm":return o.s(v,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(D)||y.replace(":","")}))},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(l,a,u){var f,y=this,p=o.p(a),v=n(l),h=(v.utcOffset()-this.utcOffset())*c,O=this-v,C=function(){return o.m(y,v)};switch(p){case V:f=C()/12;break;case B:f=C();break;case rt:f=C()/3;break;case W:f=(O-h)/6048e5;break;case _:f=(O-h)/864e5;break;case q:f=O/S;break;case N:f=O/c;break;case L:f=O/i;break;default:f=O}return u?f:o.a(f)},d.daysInMonth=function(){return this.endOf(B).$D},d.$locale=function(){return K[this.$L]},d.locale=function(l,a){if(!l)return this.$L;var u=this.clone(),f=r(l,a,!0);return f&&(u.$L=f),u},d.clone=function(){return o.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},m})(),k=g.prototype;return n.prototype=k,[["$ms",$],["$s",L],["$m",N],["$H",q],["$W",_],["$M",B],["$y",V],["$D",G]].forEach((function(m){k[m[1]]=function(d){return this.$g(d,m[0],m[1])}})),n.extend=function(m,d){return m.$i||(m(d,g,n),m.$i=!0),n},n.locale=r,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=K[ut],n.Ls=K,n.p={},n}))})(xt)),xt.exports}var oe=ae();const H=Mt(oe);var Dt={exports:{}},ue=Dt.exports,At;function ce(){return At||(At=1,(function(s,t){(function(i,c){s.exports=c()})(ue,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(c,S,$){var L=S.prototype,N=L.format;$.en.formats=i,L.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,W=(function(B,rt){return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(V,G,nt){var ot=nt&&nt.toUpperCase();return G||rt[nt]||i[nt]||rt[ot].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(gt,_t,lt){return _t||lt.slice(1)}))}))})(q,_===void 0?{}:_);return N.call(this,W)}}}))})(Dt)),Dt.exports}var fe=ce();const le=Mt(fe);H.extend(le);function de(){Date.prototype.add=function(s,t){return H(this).add(s,t).toDate()},Date.prototype.diff=function(s,t){return H(this).diff(s,t)},Date.prototype.endOf=function(s){return H(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return H(this).startOf("month").toDate()},Date.prototype.isAfter=function(s,t){return H(this).isAfter(s,t)},Date.prototype.isBefore=function(s,t){return H(this).isBefore(s,t)},Date.prototype.format=function(s){return H(this).format(s)},Date.prototype.isValid=function(){return H(this).isValid()},Date.prototype.subtract=function(s,t){return H(this).subtract(s,t).toDate()},Date.prototype.lastDayOfMonth=function(){return H(this).endOf("month").toDate()},Date.prototype.set=function(s,t){return H(this).set(s,t).toDate()},Date.prototype.startOf=function(s){return H(this).startOf(s).toDate()}}function he(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0},String.prototype.stripTags=function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""}}class pe{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(t){this.onResizeCallbacks.add(t)}offResizeChange(t){this.onResizeCallbacks.delete(t)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}exports.BreakPointHelper=ht;exports.BreakPoints=It;exports.BrowserHelper=tt;exports.BrowserService=pe;exports.BrowserType=X;exports.CsvHelper=Kt;exports.EnumHelper=Gt;exports.FileHelper=Ht;exports.LocalStorageHelper=vt;exports.LoggerHelper=Q;exports.LoggerType=pt;exports.ScreenHelper=bt;exports.TokenHelper=ne;exports.WindowResizeHelper=P;exports.copyToClipboard=Pt;exports.initArrayExtensions=ie;exports.initDateExtensions=de;exports.initStringExtensions=he;exports.saveAs=Lt;exports.sortHelper=zt;
|
|
8
|
+
`);var f=0,v=!1;this.parse=function(g,w,h){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,C=r.length,z=n.length,B=u.length,b=R(m),x=[],O=[],_=[],A=f=0;if(!g)return V();if(y||y!==!1&&g.indexOf(a)===-1){for(var j=g.split(n),I=0;I<j.length;I++){if(_=j[I],f+=_.length,I!==j.length-1)f+=n.length;else if(h)return V();if(!u||_.substring(0,B)!==u){if(b){if(x=[],lt(_.split(r)),st(),v)return V()}else lt(_.split(r));if(S&&S<=I)return x=x.slice(0,S),V(!0)}}return V()}for(var L=g.indexOf(r,f),$=g.indexOf(n,f),nt=new RegExp(ot(c)+ot(a),"g"),E=g.indexOf(a,f);;)if(g[f]===a)for(E=f,f++;;){if((E=g.indexOf(a,E+1))===-1)return h||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:x.length,index:f}),it();if(E===M-1)return it(g.substring(f,E).replace(nt,a));if(a===c&&g[E+1]===c)E++;else if(a===c||E===0||g[E-1]!==c){L!==-1&&L<E+1&&(L=g.indexOf(r,E+1));var W=mt(($=$!==-1&&$<E+1?g.indexOf(n,E+1):$)===-1?L:Math.min(L,$));if(g.substr(E+1+W,C)===r){_.push(g.substring(f,E).replace(nt,a)),g[f=E+1+W+C]!==a&&(E=g.indexOf(a,f)),L=g.indexOf(r,f),$=g.indexOf(n,f);break}if(W=mt($),g.substring(E+1+W,E+1+W+z)===n){if(_.push(g.substring(f,E).replace(nt,a)),_t(E+1+W+z),L=g.indexOf(r,f),E=g.indexOf(a,f),b&&(st(),v))return V();if(S&&x.length>=S)return V(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:f}),E++}}else if(u&&_.length===0&&g.substring(f,f+B)===u){if($===-1)return V();f=$+z,$=g.indexOf(n,f),L=g.indexOf(r,f)}else if(L!==-1&&(L<$||$===-1))_.push(g.substring(f,L)),f=L+C,L=g.indexOf(r,f);else{if($===-1)break;if(_.push(g.substring(f,$)),_t($+z),b&&(st(),v))return V();if(S&&x.length>=S)return V(!0)}return it();function lt(K){x.push(K),A=f}function mt(K){var X=0;return X=K!==-1&&(K=g.substring(E+1,K))&&K.trim()===""?K.length:X}function it(K){return h||(K===void 0&&(K=g.substring(f)),_.push(K),f=M,lt(_),b&&st()),V()}function _t(K){f=K,lt(_),_=[],$=g.indexOf(n,f)}function V(K){if(e.header&&!w&&x.length&&!d){var X=x[0],ct=Object.create(null),$t=new Set(X);let Ct=!1;for(let yt=0;yt<X.length;yt++){let at=X[yt];if(ct[at=R(e.transformHeader)?e.transformHeader(at,yt):at]){let kt,Rt=ct[at];for(;kt=at+"_"+Rt,Rt++,$t.has(kt););$t.add(kt),X[yt]=kt,ct[at]++,Ct=!0,(l=l===null?{}:l)[kt]=at}else ct[at]=1,X[yt]=at;$t.add(at)}Ct&&console.warn("Duplicate headers found and renamed."),d=!0}return{data:x,errors:O,meta:{delimiter:r,linebreak:n,aborted:v,truncated:!!K,cursor:A+(w||0),renamedHeaders:l}}}function st(){m(V()),x=[],O=[]}},this.abort=function(){v=!0},this.getCharIndex=function(){return f}}function wt(e){var r=e.data,n=P[r.workerId],u=!1;if(r.error)n.userError(r.error,r.file);else if(r.results&&r.results.data){var m={abort:function(){u=!0,dt(r.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:St,resume:St};if(R(n.userStep)){for(var S=0;S<r.results.data.length&&(n.userStep({data:r.results.data[S],errors:r.results.errors,meta:r.results.meta},m),!u);S++);delete r.results}else R(n.userChunk)&&(n.userChunk(r.results,m,r.file),delete r.results)}r.finished&&!u&&dt(r.workerId,r.results)}function dt(e,r){var n=P[e];R(n.userComplete)&&n.userComplete(r),n.terminate(),delete P[e]}function St(){throw new Error("Not implemented.")}function ut(e){if(typeof e!="object"||e===null)return e;var r,n=Array.isArray(e)?[]:{};for(r in e)n[r]=ut(e[r]);return n}function Q(e,r){return function(){e.apply(r,arguments)}}function R(e){return typeof e=="function"}return p.parse=function(e,r){var n=(r=r||{}).dynamicTyping||!1;if(R(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!R(r.transform)&&r.transform,!r.worker||!p.WORKERS_SUPPORTED)return n=null,p.NODE_STREAM_INPUT,typeof e=="string"?(e=(u=>u.charCodeAt(0)!==65279?u:u.slice(1))(e),n=new(r.download?F:N)(r)):e.readable===!0&&R(e.read)&&R(e.on)?n=new G(r):(o.File&&e instanceof File||e instanceof Object)&&(n=new J(r)),n.stream(e);(n=(()=>{var u;return!!p.WORKERS_SUPPORTED&&(u=(()=>{var m=o.URL||o.webkitURL||null,S=i.toString();return p.BLOB_URL||(p.BLOB_URL=m.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; ","(",S,")();"],{type:"text/javascript"})))})(),(u=new o.Worker(u)).onmessage=wt,u.id=q++,P[u.id]=u)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=R(r.step),r.chunk=R(r.chunk),r.complete=R(r.complete),r.error=R(r.error),delete r.worker,n.postMessage({input:e,config:r,workerId:n.id})},p.unparse=function(e,r){var n=!1,u=!0,m=",",S=`\r
|
|
9
|
+
`,y='"',l=y+y,d=!1,a=null,c=!1,f=((()=>{if(typeof r=="object"){if(typeof r.delimiter!="string"||p.BAD_DELIMITERS.filter(function(w){return r.delimiter.indexOf(w)!==-1}).length||(m=r.delimiter),typeof r.quotes!="boolean"&&typeof r.quotes!="function"&&!Array.isArray(r.quotes)||(n=r.quotes),typeof r.skipEmptyLines!="boolean"&&typeof r.skipEmptyLines!="string"||(d=r.skipEmptyLines),typeof r.newline=="string"&&(S=r.newline),typeof r.quoteChar=="string"&&(y=r.quoteChar),typeof r.header=="boolean"&&(u=r.header),Array.isArray(r.columns)){if(r.columns.length===0)throw new Error("Option columns is empty");a=r.columns}r.escapeChar!==void 0&&(l=r.escapeChar+y),r.escapeFormulae instanceof RegExp?c=r.escapeFormulae:typeof r.escapeFormulae=="boolean"&&r.escapeFormulae&&(c=/^[=+\-@\t\r].*$/)}})(),new RegExp(ot(y),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return v(null,e,d);if(typeof e[0]=="object")return v(a||Object.keys(e[0]),e,d)}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||a),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])),v(e.fields||[],e.data||[],d);throw new Error("Unable to serialize unrecognized input");function v(w,h,M){var C="",z=(typeof w=="string"&&(w=JSON.parse(w)),typeof h=="string"&&(h=JSON.parse(h)),Array.isArray(w)&&0<w.length),B=!Array.isArray(h[0]);if(z&&u){for(var b=0;b<w.length;b++)0<b&&(C+=m),C+=g(w[b],b);0<h.length&&(C+=S)}for(var x=0;x<h.length;x++){var O=(z?w:h[x]).length,_=!1,A=z?Object.keys(h[x]).length===0:h[x].length===0;if(M&&!z&&(_=M==="greedy"?h[x].join("").trim()==="":h[x].length===1&&h[x][0].length===0),M==="greedy"&&z){for(var j=[],I=0;I<O;I++){var L=B?w[I]:I;j.push(h[x][L])}_=j.join("").trim()===""}if(!_){for(var $=0;$<O;$++){0<$&&!A&&(C+=m);var nt=z&&B?w[$]:$;C+=g(h[x][nt],$)}x<h.length-1&&(!M||0<O&&!A)&&(C+=S)}}return C}function g(w,h){var M,C;return w==null?"":w.constructor===Date?JSON.stringify(w).slice(1,25):(C=!1,c&&typeof w=="string"&&c.test(w)&&(w="'"+w,C=!0),M=w.toString().replace(f,l),(C=C||n===!0||typeof n=="function"&&n(w,h)||Array.isArray(n)&&n[h]||((z,B)=>{for(var b=0;b<B.length;b++)if(-1<z.indexOf(B[b]))return!0;return!1})(M,p.BAD_DELIMITERS)||-1<M.indexOf(m)||M.charAt(0)===" "||M.charAt(M.length-1)===" ")?y+M+y:M)}},p.RECORD_SEP="",p.UNIT_SEP="",p.BYTE_ORDER_MARK="\uFEFF",p.BAD_DELIMITERS=["\r",`
|
|
10
|
+
`,'"',p.BYTE_ORDER_MARK],p.WORKERS_SUPPORTED=!D&&!!o.Worker,p.NODE_STREAM_INPUT=1,p.LocalChunkSize=10485760,p.RemoteChunkSize=5242880,p.DefaultDelimiter=",",p.Parser=gt,p.ParserHandle=rt,p.NetworkStreamer=F,p.FileStreamer=J,p.StringStreamer=N,p.ReadableStreamStreamer=G,o.jQuery&&((k=o.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(S){if(!(k(this).prop("tagName").toUpperCase()==="INPUT"&&k(this).attr("type").toLowerCase()==="file"&&o.FileReader)||!this.files||this.files.length===0)return!0;for(var y=0;y<this.files.length;y++)n.push({file:this.files[y],inputElem:this,instanceConfig:k.extend({},r)})}),u(),this;function u(){if(n.length===0)R(e.complete)&&e.complete();else{var S,y,l,d,a=n[0];if(R(e.before)){var c=e.before(a.file,a.inputElem);if(typeof c=="object"){if(c.action==="abort")return S="AbortError",y=a.file,l=a.inputElem,d=c.reason,void(R(e.error)&&e.error({name:S},y,l,d));if(c.action==="skip")return void m();typeof c.config=="object"&&(a.instanceConfig=k.extend(a.instanceConfig,c.config))}else if(c==="skip")return void m()}var f=a.instanceConfig.complete;a.instanceConfig.complete=function(v){R(f)&&f(v,a.file,a.inputElem),m()},p.parse(a.file,a.instanceConfig)}}function m(){n.splice(0,1),u()}}),T&&(o.onmessage=function(e){e=e.data,p.WORKER_ID===void 0&&e&&(p.WORKER_ID=e.workerId),typeof e.input=="string"?o.postMessage({workerId:p.WORKER_ID,results:p.parse(e.input,e.config),finished:!0}):(o.File&&e.input instanceof File||e.input instanceof Object)&&(e=p.parse(e.input,e.config))&&o.postMessage({workerId:p.WORKER_ID,results:e,finished:!0})}),(F.prototype=Object.create(U.prototype)).constructor=F,(J.prototype=Object.create(U.prototype)).constructor=J,(N.prototype=Object.create(N.prototype)).constructor=N,(G.prototype=Object.create(U.prototype)).constructor=G,p})})(Et)),Et.exports}var Nt=Bt();const qt=Mt(Nt),{parse:Kt,unparse:Jt}=qt;class Qt{static unparse(t,i){return Jt(t,i)}static parse(t){return new Promise((i,o)=>{Kt(t,{header:!0,complete:k=>i(k),error:k=>o(k)})})}}async function zt(s,t,i){const o=i?.mimeType??Zt(t),k=Vt(s,o);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const q=await(await window.showSaveFilePicker({suggestedName:t,types:[{description:"Datei",accept:{[o]:[`.${jt(t)}`]}}]})).createWritable();await q.write(k),await q.close();return}catch{}const D=URL.createObjectURL(k),T=document.createElement("a");T.href=D,T.download=t,T.rel="noopener",T.style.display="none",document.body.appendChild(T),Gt(T),window.setTimeout(()=>{document.body.removeChild(T),URL.revokeObjectURL(D)},0),Ht()&&window.open(D,"_blank","noopener,noreferrer")}function Vt(s,t){if(s instanceof Blob)return s.type?s:new Blob([s],{type:t});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:t})}return new Blob([s],{type:t||"text/plain;charset=utf-8"})}function Zt(s){switch(jt(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function jt(s){const t=s.lastIndexOf(".");return t>=0&&t<s.length-1?s.slice(t+1):""}function Gt(s){const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(t)}function Ht(){const s=navigator.userAgent,t=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return t||i}class Xt{static getEnumValue(t,i){if(i in t)return t[i];throw Error(`${i} not found in ${t}`)}static getKeyValues(t){return Object.keys(t).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:t[i]}))}}class te{static getFileExtension(t){let i="";const o=t.lastIndexOf(".");return o>0&&o<t.length-1&&(i=`.${t.substring(o+1).toLowerCase()}`),i}static readAsText(t){const i=new FileReader;return new Promise((o,k)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?o(i.result):k(new Error("Unexpected result type"))},i.onerror=()=>{const D=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,k(D)},i.readAsText(t)})}static readAsArrayBuffer(t){const i=new FileReader;return new Promise((o,k)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?o(i.result):k(new Error("Unexpected result type"))},i.onerror=()=>{const D=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,k(D)},i.readAsArrayBuffer(t)})}static readAsDataUrl(t){const i=new FileReader;return new Promise((o,k)=>{i.onload=D=>{o(D)},i.onerror=D=>k(D),i.readAsDataURL(t)})}static formatFileSize(t,i=2,o){if(t===0)return"0 Bytes";const k=1024,D=["Bytes","KB","MB","GB","TB"];let T=Math.floor(Math.log(t)/Math.log(k));o&&D.includes(o)&&(T=D.indexOf(o));const P=t/Math.pow(k,T);return`${parseFloat(P.toFixed(i))} ${D[T]}`}static save(t,i,o){const k=new Blob([t],{type:o});zt(k,i)}}class vt{static set(t,i){localStorage.setItem(t,JSON.stringify(i))}static get(t){let i=null;const o=localStorage.getItem(t);return o&&(i=JSON.parse(o)),i}static remove(t){let i=!!vt.get(t);return i&&localStorage.removeItem(t),i}static removeAll(){localStorage.clear()}static getKeysBy(t){return Object.keys(localStorage).filter(i=>i.startsWith(t))}}var pt=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(pt||{});class Z{static listeners=new Set;static enabled=!0;static log(...t){Z.doLog(pt.log,t)}static info(...t){Z.doLog(pt.info,t)}static warn(...t){Z.doLog(pt.warn,t)}static debug(...t){Z.doLog(pt.debug,t)}static error(...t){Z.doLog(pt.error,t)}static clearListeners(){Z.listeners.clear()}static setEnabled(t){Z.enabled=t}static doLog(t,i){if(!Z.enabled)return;const o={type:t,args:i,timestamp:new Date().toISOString()};for(const k of Z.listeners)try{if(k(o)===!1)return}catch{}console[t].apply(console,i)}static onLog(t,i=!1){if(i){const o=k=>{try{return t(k)}finally{Z.listeners.delete(o)}};return Z.listeners.add(o),()=>Z.listeners.delete(o)}return Z.listeners.add(t),()=>Z.listeners.delete(t)}}const ee=(s,t,i)=>s.localeCompare(t)*(i?1:-1),re=(s,t)=>s<t?-1:s===t?0:1,ne=(s,t,i)=>re(s,t)*(i?1:-1),ie=(s,t,i)=>{let o=0;return typeof s=="string"&&typeof t=="string"?o=ee(s,t,i):o=ne(s,t,i),o},Pt=(s,t,i,o)=>{const k=i(s),D=i(t);return ie(k,D,o)};class se{static get(t){return vt.get(t)}static set(t,i){vt.set(t,i)}static remove(t){vt.remove(t)}}class Y{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=window.innerWidth;static onResize(t){return Y.initialized||Y.init(),Y.listeners.add(t),()=>Y.off(t)}static handleResize=()=>{Y.resizeTimeout!==null&&(window.clearTimeout(Y.resizeTimeout),Y.resizeTimeout=null),Y.resizeTimeout=window.setTimeout(()=>{const t=window.innerWidth;if(t!==Y.lastWidth){Y.lastWidth=t;for(const i of Y.listeners)i(t)}},150)};static init(){Y.initialized||(window.addEventListener("resize",Y.handleResize,{passive:!0}),Y.initialized=!0)}static off(t){Y.initialized&&(Y.listeners.delete(t),Y.listeners.size===0&&(window.removeEventListener("resize",Y.handleResize),Y.initialized=!1))}}function ae(){Array.prototype.distinct=function(s){return s?this.filter((i,o,k)=>k.findIndex(D=>s(D,i))===o):this.filter((i,o,k)=>k.indexOf(i)===o)},Array.prototype.filterBy=function(s){return this.filter(t=>s(t))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((t,i)=>{const o=s(i);return t[o]||(t[o]=[]),t[o].push(i),t},{})},Array.prototype.orderBy=function(s,t=!0){return this?.sort((i,o)=>Pt(i,o,s,t)),this},Array.prototype.removeBy=function(s,t){return this.filter(i=>s(i)!==t)}}var xt={exports:{}},oe=xt.exports,At;function ue(){return At||(At=1,(function(s,t){(function(i,o){s.exports=o()})(oe,(function(){var i=1e3,o=6e4,k=36e5,D="millisecond",T="second",P="minute",q="hour",p="day",U="week",F="month",J="quarter",N="year",G="date",rt="Invalid Date",ot=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,wt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var l=["th","st","nd","rd"],d=y%100;return"["+y+(l[(d-20)%10]||l[d]||l[0])+"]"}},dt=function(y,l,d){var a=String(y);return!a||a.length>=l?y:""+Array(l+1-a.length).join(d)+y},St={s:dt,z:function(y){var l=-y.utcOffset(),d=Math.abs(l),a=Math.floor(d/60),c=d%60;return(l<=0?"+":"-")+dt(a,2,"0")+":"+dt(c,2,"0")},m:function y(l,d){if(l.date()<d.date())return-y(d,l);var a=12*(d.year()-l.year())+(d.month()-l.month()),c=l.clone().add(a,F),f=d-c<0,v=l.clone().add(a+(f?-1:1),F);return+(-(a+(d-c)/(f?c-v:v-c))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:F,y:N,w:U,d:p,D:G,h:q,m:P,s:T,ms:D,Q:J}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},ut="en",Q={};Q[ut]=wt;var R="$isDayjsObject",e=function(y){return y instanceof m||!(!y||!y[R])},r=function y(l,d,a){var c;if(!l)return ut;if(typeof l=="string"){var f=l.toLowerCase();Q[f]&&(c=f),d&&(Q[f]=d,c=f);var v=l.split("-");if(!c&&v.length>1)return y(v[0])}else{var g=l.name;Q[g]=l,c=g}return!a&&c&&(ut=c),c||!a&&ut},n=function(y,l){if(e(y))return y.clone();var d=typeof l=="object"?l:{};return d.date=y,d.args=arguments,new m(d)},u=St;u.l=r,u.i=e,u.w=function(y,l){return n(y,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=(function(){function y(d){this.$L=r(d.locale,null,!0),this.parse(d),this.$x=this.$x||d.x||{},this[R]=!0}var l=y.prototype;return l.parse=function(d){this.$d=(function(a){var c=a.date,f=a.utc;if(c===null)return new Date(NaN);if(u.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var v=c.match(ot);if(v){var g=v[2]-1||0,w=(v[7]||"0").substring(0,3);return f?new Date(Date.UTC(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,w)):new Date(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,w)}}return new Date(c)})(d),this.init()},l.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},l.$utils=function(){return u},l.isValid=function(){return this.$d.toString()!==rt},l.isSame=function(d,a){var c=n(d);return this.startOf(a)<=c&&c<=this.endOf(a)},l.isAfter=function(d,a){return n(d)<this.startOf(a)},l.isBefore=function(d,a){return this.endOf(a)<n(d)},l.$g=function(d,a,c){return u.u(d)?this[a]:this.set(c,d)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(d,a){var c=this,f=!!u.u(a)||a,v=u.p(d),g=function(x,O){var _=u.w(c.$u?Date.UTC(c.$y,O,x):new Date(c.$y,O,x),c);return f?_:_.endOf(p)},w=function(x,O){return u.w(c.toDate()[x].apply(c.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(O)),c)},h=this.$W,M=this.$M,C=this.$D,z="set"+(this.$u?"UTC":"");switch(v){case N:return f?g(1,0):g(31,11);case F:return f?g(1,M):g(0,M+1);case U:var B=this.$locale().weekStart||0,b=(h<B?h+7:h)-B;return g(f?C-b:C+(6-b),M);case p:case G:return w(z+"Hours",0);case q:return w(z+"Minutes",1);case P:return w(z+"Seconds",2);case T:return w(z+"Milliseconds",3);default:return this.clone()}},l.endOf=function(d){return this.startOf(d,!1)},l.$set=function(d,a){var c,f=u.p(d),v="set"+(this.$u?"UTC":""),g=(c={},c[p]=v+"Date",c[G]=v+"Date",c[F]=v+"Month",c[N]=v+"FullYear",c[q]=v+"Hours",c[P]=v+"Minutes",c[T]=v+"Seconds",c[D]=v+"Milliseconds",c)[f],w=f===p?this.$D+(a-this.$W):a;if(f===F||f===N){var h=this.clone().set(G,1);h.$d[g](w),h.init(),this.$d=h.set(G,Math.min(this.$D,h.daysInMonth())).$d}else g&&this.$d[g](w);return this.init(),this},l.set=function(d,a){return this.clone().$set(d,a)},l.get=function(d){return this[u.p(d)]()},l.add=function(d,a){var c,f=this;d=Number(d);var v=u.p(a),g=function(M){var C=n(f);return u.w(C.date(C.date()+Math.round(M*d)),f)};if(v===F)return this.set(F,this.$M+d);if(v===N)return this.set(N,this.$y+d);if(v===p)return g(1);if(v===U)return g(7);var w=(c={},c[P]=o,c[q]=k,c[T]=i,c)[v]||1,h=this.$d.getTime()+d*w;return u.w(h,this)},l.subtract=function(d,a){return this.add(-1*d,a)},l.format=function(d){var a=this,c=this.$locale();if(!this.isValid())return c.invalidDate||rt;var f=d||"YYYY-MM-DDTHH:mm:ssZ",v=u.z(this),g=this.$H,w=this.$m,h=this.$M,M=c.weekdays,C=c.months,z=c.meridiem,B=function(O,_,A,j){return O&&(O[_]||O(a,f))||A[_].slice(0,j)},b=function(O){return u.s(g%12||12,O,"0")},x=z||function(O,_,A){var j=O<12?"AM":"PM";return A?j.toLowerCase():j};return f.replace(gt,(function(O,_){return _||(function(A){switch(A){case"YY":return String(a.$y).slice(-2);case"YYYY":return u.s(a.$y,4,"0");case"M":return h+1;case"MM":return u.s(h+1,2,"0");case"MMM":return B(c.monthsShort,h,C,3);case"MMMM":return B(C,h);case"D":return a.$D;case"DD":return u.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(c.weekdaysMin,a.$W,M,2);case"ddd":return B(c.weekdaysShort,a.$W,M,3);case"dddd":return M[a.$W];case"H":return String(g);case"HH":return u.s(g,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return x(g,w,!0);case"A":return x(g,w,!1);case"m":return String(w);case"mm":return u.s(w,2,"0");case"s":return String(a.$s);case"ss":return u.s(a.$s,2,"0");case"SSS":return u.s(a.$ms,3,"0");case"Z":return v}return null})(O)||v.replace(":","")}))},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(d,a,c){var f,v=this,g=u.p(a),w=n(d),h=(w.utcOffset()-this.utcOffset())*o,M=this-w,C=function(){return u.m(v,w)};switch(g){case N:f=C()/12;break;case F:f=C();break;case J:f=C()/3;break;case U:f=(M-h)/6048e5;break;case p:f=(M-h)/864e5;break;case q:f=M/k;break;case P:f=M/o;break;case T:f=M/i;break;default:f=M}return c?f:u.a(f)},l.daysInMonth=function(){return this.endOf(F).$D},l.$locale=function(){return Q[this.$L]},l.locale=function(d,a){if(!d)return this.$L;var c=this.clone(),f=r(d,a,!0);return f&&(c.$L=f),c},l.clone=function(){return u.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},y})(),S=m.prototype;return n.prototype=S,[["$ms",D],["$s",T],["$m",P],["$H",q],["$W",p],["$M",F],["$y",N],["$D",G]].forEach((function(y){S[y[1]]=function(l){return this.$g(l,y[0],y[1])}})),n.extend=function(y,l){return y.$i||(y(l,m,n),y.$i=!0),n},n.locale=r,n.isDayjs=e,n.unix=function(y){return n(1e3*y)},n.en=Q[ut],n.Ls=Q,n.p={},n}))})(xt)),xt.exports}var ce=ue();const H=Mt(ce);var Ot={exports:{}},fe=Ot.exports,It;function de(){return It||(It=1,(function(s,t){(function(i,o){s.exports=o()})(fe,(function(){var i="day";return function(o,k,D){var T=function(p){return p.add(4-p.isoWeekday(),i)},P=k.prototype;P.isoWeekYear=function(){return T(this).year()},P.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),i);var U,F,J,N,G=T(this),rt=(U=this.isoWeekYear(),F=this.$u,J=(F?D.utc:D)().year(U).startOf("year"),N=4-J.isoWeekday(),J.isoWeekday()>4&&(N+=7),J.add(N,i));return G.diff(rt,"week")+1},P.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var q=P.startOf;P.startOf=function(p,U){var F=this.$utils(),J=!!F.u(U)||U;return F.p(p)==="isoweek"?J?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):q.bind(this)(p,U)}}}))})(Ot)),Ot.exports}var le=de();const he=Mt(le);var Dt={exports:{}},pe=Dt.exports,Lt;function ge(){return Lt||(Lt=1,(function(s,t){(function(i,o){s.exports=o()})(pe,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,k,D){var T=k.prototype,P=T.format;D.en.formats=i,T.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,U=(function(F,J){return F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(N,G,rt){var ot=rt&&rt.toUpperCase();return G||J[rt]||i[rt]||J[ot].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(gt,wt,dt){return wt||dt.slice(1)}))}))})(q,p===void 0?{}:p);return P.call(this,U)}}}))})(Dt)),Dt.exports}var me=ge();const ye=Mt(me);H.extend(ye);H.extend(he);function ve(){Date.prototype.add=function(s,t){return H(this).add(s,t).toDate()},Date.prototype.diff=function(s,t){return H(this).diff(s,t)},Date.prototype.endOf=function(s){return H(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return H(this).startOf("month").toDate()},Date.prototype.format=function(s){return H(this).format(s)},Date.prototype.isAfter=function(s,t){return H(this).isAfter(s,t)},Date.prototype.isBefore=function(s,t){return H(this).isBefore(s,t)},Date.prototype.isValid=function(){return H(this).isValid()},Date.prototype.isoWeek=function(){return H(this).isoWeek()},Date.prototype.subtract=function(s,t){return H(this).subtract(s,t).toDate()},Date.prototype.lastDayOfMonth=function(){return H(this).endOf("month").toDate()},Date.prototype.set=function(s,t){return H(this).set(s,t).toDate()},Date.prototype.startOf=function(s){return H(this).startOf(s).toDate()}}function we(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0},String.prototype.stripTags=function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""}}class _e{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(t){this.onResizeCallbacks.add(t)}offResizeChange(t){this.onResizeCallbacks.delete(t)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}exports.BreakPointHelper=ht;exports.BreakPoints=Ft;exports.BrowserHelper=et;exports.BrowserService=_e;exports.BrowserType=tt;exports.CsvHelper=Qt;exports.EnumHelper=Xt;exports.FileHelper=te;exports.LocalStorageHelper=vt;exports.LoggerHelper=Z;exports.LoggerType=pt;exports.ScreenHelper=bt;exports.TokenHelper=se;exports.WindowResizeHelper=Y;exports.copyToClipboard=Wt;exports.initArrayExtensions=ae;exports.initDateExtensions=ve;exports.initStringExtensions=we;exports.saveAs=zt;exports.sortHelper=Pt;
|