@oardi/ts-utils 0.0.50 → 0.0.52
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/array-extensions.d.ts.map +1 -1
- package/helpers/break-point/break-point.helper.d.ts.map +1 -1
- package/helpers/browser/browser.helper.d.ts.map +1 -1
- package/helpers/canvas.helper.d.ts.map +1 -1
- package/helpers/download.helper.d.ts.map +1 -1
- package/helpers/file.helper.d.ts.map +1 -1
- package/helpers/image.helper.d.ts.map +1 -1
- package/helpers/sort.helper.d.ts.map +1 -1
- package/index.cjs.js +7 -7
- package/index.es.js +347 -325
- package/index.umd.js +7 -7
- package/package.json +1 -1
- package/services/browser/browser.service.d.ts +1 -2
- package/services/browser/browser.service.d.ts.map +1 -1
package/index.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(F,mt){typeof exports=="object"&&typeof module<"u"?mt(exports):typeof define=="function"&&define.amd?define(["exports"],mt):(F=typeof globalThis<"u"?globalThis:F||self,mt(F["ts-utils"]={}))})(this,(function(F){"use strict";const mt={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class kt{static getScreenWidth(){return document.documentElement.clientWidth}static getScreenHeight(){return document.documentElement.clientHeight}}class pt{static breakPoints=mt;static getCurrentBreakpoint(){return pt.getBreakpointByScreenWidth(kt.getScreenWidth())}static getBreakpointByScreenWidth(t=kt.getScreenWidth()){let i="xs";for(const o of Object.keys(pt.breakPoints))pt.breakPoints[o]<=t&&(i=o);return{breakpoint:i,screenWidth:t}}static isScreenGreaterThan(t){return kt.getScreenWidth()>pt.breakPoints[t]}static isScreenSmallerThan(t){return kt.getScreenWidth()<pt.breakPoints[t]}}var et=(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))(et||{});const ut=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase();class rt{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(t=ut){return this.isBrowserEnv()?t.includes("opr/")||t.includes("opera"):!1}static isFirefox(t=ut){return this.isBrowserEnv()?t.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(t=ut){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=ut){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&&!ut.includes("edg/"):!1}static isEdg(t=ut){return this.isBrowserEnv()?t.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(t=ut){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=ut){return typeof process<"u"&&process.versions?.electron?!0:t.includes("electron")}static isHeadlessChrome(t=ut){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(rt.isOpera())return et.opera;if(rt.isFirefox())return et.firefox;if(rt.isSafari())return et.safari;if(rt.isIE())return et.ie;if(rt.isEdgeLegacy())return et.edgeLegacy;if(rt.isEdg())return et.edg;if(rt.isChrome())return et.chrome;if(rt.isIOS(t))return et.iOS;if(rt.isElectron(t))return et.electron;if(rt.isHeadlessChrome(t))return et.headlessChrome;if(rt.isNodeRuntime())return et.nodeRuntime;throw new Error("Browser could not be detected: "+t)}}function Ut(s){return navigator.clipboard.writeText(s)}function Ot(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var xt={exports:{}};var Wt=xt.exports,Tt;function Bt(){return Tt||(Tt=1,(function(s,t){((i,o)=>{s.exports=o()})(Wt,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,Y={},K=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=ft(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 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 z(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=Z(this._chunkLoaded,this),r.onerror=Z(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 Q(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=Z(this._chunkLoaded,this),r.onerror=Z(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 q(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 X(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=Z(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=Z(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=Z(function(){this._streamCleanUp(),u=!0,this._streamData("")},this),this._streamCleanUp=Z(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,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,_=[],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&&(N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+p.DefaultDelimiter+"'"),u=!1),e.skipEmptyLines&&(h.data=h.data.filter(function(w){return!M(w)})),j()){let w=function(A,P){R(e.transformHeader)&&(A=e.transformHeader(A,P)),_.push(A)};if(h)if(Array.isArray(h.data[0])){for(var b=0;j()&&b<h.data.length;b++)h.data[b].forEach(w);h.data.splice(0,1)}else h.data.forEach(w)}function O(w,A){for(var P=e.header?{}:[],I=0;I<w.length;I++){var L=I,$=w[I],$=((it,E)=>(W=>(e.dynamicTypingFunction&&e.dynamicTyping[W]===void 0&&(e.dynamicTyping[W]=e.dynamicTypingFunction(W)),(e.dynamicTyping[W]||e.dynamicTyping)===!0))(it)?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>=_.length?"__parsed_extra":_[I]:L,$=e.transform?e.transform($,L):$);L==="__parsed_extra"?(P[L]=P[L]||[],P[L].push($)):P[L]=$}return e.header&&(I>_.length?N("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+I,f+A):I<_.length&&N("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+I,f+A)),P}var x;h&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!h.data.length||Array.isArray(h.data[0])?(h.data=h.data.map(O),x=h.data.length):h.data=O(h.data,0),e.header&&h.meta&&(h.meta.fields=_),f+=x)}function j(){return e.header&&_.length===0}function N(b,O,x,w){b={type:b,code:O,message:x},w!==void 0&&(b.row=w),h.errors.push(b)}R(e.step)&&(m=e.step,e.step=function(b){h=b,j()?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,O,x){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(b,w)),u=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(b),h.meta.delimiter=e.delimiter):((w=((A,P,I,L,$)=>{var it,E,W,ht;$=$||[","," ","|",";",p.RECORD_SEP,p.UNIT_SEP];for(var _t=0;_t<$.length;_t++){for(var st,St=$[_t],G=0,at=0,J=0,tt=(W=void 0,new vt({comments:L,delimiter:St,newline:P,preview:10}).parse(A)),dt=0;dt<tt.data.length;dt++)I&&M(tt.data[dt])?J++:(st=tt.data[dt].length,at+=st,W===void 0?W=st:0<st&&(G+=Math.abs(st-W),W=st));0<tt.data.length&&(at/=tt.data.length-J),(E===void 0||G<=E)&&(ht===void 0||ht<at)&&1.99<at&&(E=G,it=St,ht=at)}return{successful:!!(e.delimiter=it),bestDelimiter:it}})(b,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(u=!0,e.delimiter=p.DefaultDelimiter),h.meta.delimiter=e.delimiter),ft(e));return e.preview&&e.header&&w.preview++,r=b,n=new vt(w),h=n.parse(r,O,x),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,w){A=A.substring(0,1048576);var w=new RegExp(ct(w)+"([^]*?)"+ct(w),"gm"),x=(A=A.replace(w,"")).split("\r"),w=A.split(`
|
|
1
|
+
(function(F,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(F=typeof globalThis<"u"?globalThis:F||self,me(F["ts-utils"]={}))})(this,(function(F){"use strict";const me={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class ke{static getScreenWidth(){return document.documentElement.clientWidth}static getScreenHeight(){return document.documentElement.clientHeight}}class le{static breakPoints=me;static getCurrentBreakpoint(){return le.getBreakpointByScreenWidth(ke.getScreenWidth())}static getBreakpointByScreenWidth(e=ke.getScreenWidth()){let n="xs";for(const a of Object.keys(le.breakPoints))le.breakPoints[a]<=e&&(n=a);return{breakpoint:n,screenWidth:e}}static isScreenGreaterThan(e){return ke.getScreenWidth()>le.breakPoints[e]}static isScreenSmallerThan(e){return ke.getScreenWidth()<le.breakPoints[e]}}var te=(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))(te||{});const ue=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase();class re{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(e=ue){return this.isBrowserEnv()?e.includes("opr/")||e.includes("opera"):!1}static isFirefox(e=ue){return this.isBrowserEnv()?e.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(e=ue){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Apple"),a=e.includes("safari"),k=!(e.includes("crios")||e.includes("chrome")||e.includes("android")||e.includes("opr/")||e.includes("edg"));return n&&a&&k}static isIOS(e=ue){if(!this.isBrowserEnv())return!1;const n=/iphone|ipad|ipod/.test(e),a=e.includes("macintosh")&&navigator.maxTouchPoints>1;return n||a}static isEdgeLegacy(){return this.isBrowserEnv()?!!window.StyleMedia&&!ue.includes("edg/"):!1}static isEdg(e=ue){return this.isBrowserEnv()?e.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(e=ue){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Google"),a=e.includes("chrome")||e.includes("crios"),k=!this.isEdg(e)&&!this.isOpera(e);return n&&a&&k}static isElectron(e=ue){return typeof process<"u"&&process.versions?.electron?!0:e.includes("electron")}static isHeadlessChrome(e=ue){return e.includes("headlesschrome")}static isNodeRuntime(){return typeof process<"u"&&!!process.versions?.node&&!this.isBrowserEnv()}static getCurrentBrowser(){const e=navigator.userAgent.toLowerCase();if(typeof navigator>"u")throw new Error("navigator not set");if(re.isOpera())return te.opera;if(re.isFirefox())return te.firefox;if(re.isSafari())return te.safari;if(re.isIE())return te.ie;if(re.isEdgeLegacy())return te.edgeLegacy;if(re.isEdg())return te.edg;if(re.isChrome())return te.chrome;if(re.isIOS(e))return te.iOS;if(re.isElectron(e))return te.electron;if(re.isHeadlessChrome(e))return te.headlessChrome;if(re.isNodeRuntime())return te.nodeRuntime;throw new Error("Browser could not be detected: "+e)}}function We(s){return navigator.clipboard.writeText(s)}function Oe(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var xe={exports:{}};var Ue=xe.exports,Te;function Be(){return Te||(Te=1,(function(s,e){((n,a)=>{s.exports=a()})(Ue,function n(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},k,D=!a.document&&!!a.postMessage,T=a.IS_PAPA_WORKER||!1,Y={},K=0,p={};function W(t){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 i=fe(r);i.chunkSize=parseInt(i.chunkSize),r.step||r.chunk||(i.chunkSize=null),this._handle=new ne(i),(this._handle.streamer=this)._config=i}).call(this,t),this.parseChunk=function(r,i){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)a.postMessage({results:m,workerId:p.WORKER_ID,finished:u});else if(R(this._config.chunk)&&!i){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&&a.postMessage({workerId:p.WORKER_ID,error:r,finished:!1})}}function z(t){var r;(t=t||{}).chunkSize||(t.chunkSize=p.RemoteChunkSize),W.call(this,t),this._nextChunk=D?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,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=Z(this._chunkLoaded,this),r.onerror=Z(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!D),this._config.downloadRequestHeaders){var i,u=this._config.downloadRequestHeaders;for(i in u)r.setRequestHeader(i,u[i])}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>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)))},this._chunkError=function(i){i=r.statusText||i,this._sendError(new Error(i))}}function Q(t){(t=t||{}).chunkSize||(t.chunkSize=p.LocalChunkSize),W.call(this,t);var r,i,u=typeof FileReader<"u";this.stream=function(m){this._input=m,i=m.slice||m.webkitSlice||m.mozSlice,u?((r=new FileReader).onload=Z(this._chunkLoaded,this),r.onerror=Z(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=i.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 q(t){var r;W.call(this,t=t||{}),this.stream=function(i){return r=i,this._nextChunk()},this._nextChunk=function(){var i,u;if(!this._finished)return i=this._config.chunkSize,r=i?(u=r.substring(0,i),r.substring(i)):(u=r,""),this._finished=!r,this.parseChunk(u)}}function X(t){W.call(this,t=t||{});var r=[],i=!0,u=!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(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()):i=!0},this._streamData=Z(function(m){try{r.push(typeof m=="string"?m:m.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(S){this._streamError(S)}},this),this._streamError=Z(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=Z(function(){this._streamCleanUp(),u=!0,this._streamData("")},this),this._streamCleanUp=Z(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ne(t){var r,i,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)))$/,o=this,c=0,f=0,v=!1,g=!1,_=[],h={data:[],errors:[],meta:{}};function M(b){return t.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function C(){if(h&&u&&(N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+p.DefaultDelimiter+"'"),u=!1),t.skipEmptyLines&&(h.data=h.data.filter(function(w){return!M(w)})),j()){let w=function(A,P){R(t.transformHeader)&&(A=t.transformHeader(A,P)),_.push(A)};if(h)if(Array.isArray(h.data[0])){for(var b=0;j()&&b<h.data.length;b++)h.data[b].forEach(w);h.data.splice(0,1)}else h.data.forEach(w)}function O(w,A){for(var P=t.header?{}:[],I=0;I<w.length;I++){var L=I,$=w[I],$=((ie,E)=>(U=>(t.dynamicTypingFunction&&t.dynamicTyping[U]===void 0&&(t.dynamicTyping[U]=t.dynamicTypingFunction(U)),(t.dynamicTyping[U]||t.dynamicTyping)===!0))(ie)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((U=>{if(l.test(U)&&(U=parseFloat(U),y<U&&U<S))return 1})(E)?parseFloat(E):d.test(E)?new Date(E):E===""?null:E):E)(L=t.header?I>=_.length?"__parsed_extra":_[I]:L,$=t.transform?t.transform($,L):$);L==="__parsed_extra"?(P[L]=P[L]||[],P[L].push($)):P[L]=$}return t.header&&(I>_.length?N("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+I,f+A):I<_.length&&N("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+I,f+A)),P}var x;h&&(t.header||t.dynamicTyping||t.transform)&&(x=1,!h.data.length||Array.isArray(h.data[0])?(h.data=h.data.map(O),x=h.data.length):h.data=O(h.data,0),t.header&&h.meta&&(h.meta.fields=_),f+=x)}function j(){return t.header&&_.length===0}function N(b,O,x,w){b={type:b,code:O,message:x},w!==void 0&&(b.row=w),h.errors.push(b)}R(t.step)&&(m=t.step,t.step=function(b){h=b,j()?C():(C(),h.data.length!==0&&(c+=b.data.length,t.preview&&c>t.preview?i.abort():(h.data=h.data[0],m(h,o))))}),this.parse=function(b,O,x){var w=t.quoteChar||'"',w=(t.newline||(t.newline=this.guessLineEndings(b,w)),u=!1,t.delimiter?R(t.delimiter)&&(t.delimiter=t.delimiter(b),h.meta.delimiter=t.delimiter):((w=((A,P,I,L,$)=>{var ie,E,U,pe;$=$||[","," ","|",";",p.RECORD_SEP,p.UNIT_SEP];for(var _e=0;_e<$.length;_e++){for(var se,Se=$[_e],G=0,ae=0,J=0,ee=(U=void 0,new ve({comments:L,delimiter:Se,newline:P,preview:10}).parse(A)),de=0;de<ee.data.length;de++)I&&M(ee.data[de])?J++:(se=ee.data[de].length,ae+=se,U===void 0?U=se:0<se&&(G+=Math.abs(se-U),U=se));0<ee.data.length&&(ae/=ee.data.length-J),(E===void 0||G<=E)&&(pe===void 0||pe<ae)&&1.99<ae&&(E=G,ie=Se,pe=ae)}return{successful:!!(t.delimiter=ie),bestDelimiter:ie}})(b,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=w.bestDelimiter:(u=!0,t.delimiter=p.DefaultDelimiter),h.meta.delimiter=t.delimiter),fe(t));return t.preview&&t.header&&w.preview++,r=b,i=new ve(w),h=i.parse(r,O,x),C(),v?{meta:{paused:!0}}:h||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,i.abort(),r=R(t.chunk)?"":r.substring(i.getCharIndex())},this.resume=function(){o.streamer._halted?(v=!1,o.streamer.parseChunk(r,!0)):setTimeout(o.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,i.abort(),h.meta.aborted=!0,R(t.complete)&&t.complete(h),r=""},this.guessLineEndings=function(A,w){A=A.substring(0,1048576);var w=new RegExp(ce(w)+"([^]*?)"+ce(w),"gm"),x=(A=A.replace(w,"")).split("\r"),w=A.split(`
|
|
2
2
|
`),A=1<w.length&&w[0].length<x[0].length;if(x.length===1||A)return`
|
|
3
3
|
`;for(var P=0,I=0;I<x.length;I++)x[I][0]===`
|
|
4
4
|
`&&P++;return P>=x.length/2?`\r
|
|
5
|
-
`:"\r"}}function
|
|
6
|
-
`&&
|
|
7
|
-
`&&(
|
|
8
|
-
`);var f=0,v=!1;this.parse=function(g,_,h){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,C=r.length,j=
|
|
9
|
-
`,y='"',l=y+y,d=!1,
|
|
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=vt,p.ParserHandle=nt,p.NetworkStreamer=z,p.FileStreamer=Q,p.StringStreamer=q,p.ReadableStreamStreamer=X,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})}),(z.prototype=Object.create(U.prototype)).constructor=z,(Q.prototype=Object.create(U.prototype)).constructor=Q,(q.prototype=Object.create(q.prototype)).constructor=q,(X.prototype=Object.create(U.prototype)).constructor=X,p})})(xt)),xt.exports}var Nt=Bt();const qt=Ot(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 At(s,t,i){const o=i?.mimeType??Zt(t),k=Vt(s,o);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const K=await(await window.showSaveFilePicker({suggestedName:t,types:[{description:"Datei",accept:{[o]:[`.${It(t)}`]}}]})).createWritable();await K.write(k),await K.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(It(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 It(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 Y=t/Math.pow(k,T);return`${parseFloat(Y.toFixed(i))} ${D[T]}`}static save(t,i,o){const k=new Blob([t],{type:o});At(k,i)}}class yt{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=!!yt.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 gt=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(gt||{});class V{static listeners=new Set;static enabled=!0;static log(...t){V.doLog(gt.log,t)}static info(...t){V.doLog(gt.info,t)}static warn(...t){V.doLog(gt.warn,t)}static debug(...t){V.doLog(gt.debug,t)}static error(...t){V.doLog(gt.error,t)}static clearListeners(){V.listeners.clear()}static setEnabled(t){V.enabled=t}static doLog(t,i){if(!V.enabled)return;const o={type:t,args:i,timestamp:new Date().toISOString()};for(const k of V.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{V.listeners.delete(o)}};return V.listeners.add(o),()=>V.listeners.delete(o)}return V.listeners.add(t),()=>V.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},Lt=(s,t,i,o)=>{const k=i(s),D=i(t);return ie(k,D,o)};class se{static get(t){return yt.get(t)}static set(t,i){yt.set(t,i)}static remove(t){yt.remove(t)}}class B{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=window.innerWidth;static onResize(t){return B.initialized||B.init(),B.listeners.add(t),()=>B.off(t)}static handleResize=()=>{B.resizeTimeout!==null&&(window.clearTimeout(B.resizeTimeout),B.resizeTimeout=null),B.resizeTimeout=window.setTimeout(()=>{const t=window.innerWidth;if(t!==B.lastWidth){B.lastWidth=t;for(const i of B.listeners)i(t)}},150)};static init(){B.initialized||(window.addEventListener("resize",B.handleResize,{passive:!0}),B.initialized=!0)}static off(t){B.initialized&&(B.listeners.delete(t),B.listeners.size===0&&(window.removeEventListener("resize",B.handleResize),B.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)=>Lt(i,o,s,t)),this},Array.prototype.removeBy=function(s,t){return this.filter(i=>s(i)!==t)}}var Dt={exports:{}},oe=Dt.exports,Ft;function ue(){return Ft||(Ft=1,(function(s,t){(function(i,o){s.exports=o()})(oe,(function(){var i=1e3,o=6e4,k=36e5,D="millisecond",T="second",Y="minute",K="hour",p="day",U="week",z="month",Q="quarter",q="year",X="date",nt="Invalid Date",ct=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,vt=/\[([^\]]+)]|YYYY|YY|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,bt={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])+"]"}},lt=function(y,l,d){var a=String(y);return!a||a.length>=l?y:""+Array(l+1-a.length).join(d)+y},Ct={s:lt,z:function(y){var l=-y.utcOffset(),d=Math.abs(l),a=Math.floor(d/60),c=d%60;return(l<=0?"+":"-")+lt(a,2,"0")+":"+lt(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,z),f=d-c<0,v=l.clone().add(a+(f?-1:1),z);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:z,y:q,w:U,d:p,D:X,h:K,m:Y,s:T,ms:D,Q}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},ft="en",Z={};Z[ft]=bt;var R="$isDayjsObject",e=function(y){return y instanceof m||!(!y||!y[R])},r=function y(l,d,a){var c;if(!l)return ft;if(typeof l=="string"){var f=l.toLowerCase();Z[f]&&(c=f),d&&(Z[f]=d,c=f);var v=l.split("-");if(!c&&v.length>1)return y(v[0])}else{var g=l.name;Z[g]=l,c=g}return!a&&c&&(ft=c),c||!a&&ft},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=Ct;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(ct);if(v){var g=v[2]-1||0,_=(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,_)):new Date(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,_)}}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()!==nt},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(O,x){var w=u.w(c.$u?Date.UTC(c.$y,x,O):new Date(c.$y,x,O),c);return f?w:w.endOf(p)},_=function(O,x){return u.w(c.toDate()[O].apply(c.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(x)),c)},h=this.$W,M=this.$M,C=this.$D,j="set"+(this.$u?"UTC":"");switch(v){case q:return f?g(1,0):g(31,11);case z:return f?g(1,M):g(0,M+1);case U:var N=this.$locale().weekStart||0,b=(h<N?h+7:h)-N;return g(f?C-b:C+(6-b),M);case p:case X:return _(j+"Hours",0);case K:return _(j+"Minutes",1);case Y:return _(j+"Seconds",2);case T:return _(j+"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[X]=v+"Date",c[z]=v+"Month",c[q]=v+"FullYear",c[K]=v+"Hours",c[Y]=v+"Minutes",c[T]=v+"Seconds",c[D]=v+"Milliseconds",c)[f],_=f===p?this.$D+(a-this.$W):a;if(f===z||f===q){var h=this.clone().set(X,1);h.$d[g](_),h.init(),this.$d=h.set(X,Math.min(this.$D,h.daysInMonth())).$d}else g&&this.$d[g](_);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===z)return this.set(z,this.$M+d);if(v===q)return this.set(q,this.$y+d);if(v===p)return g(1);if(v===U)return g(7);var _=(c={},c[Y]=o,c[K]=k,c[T]=i,c)[v]||1,h=this.$d.getTime()+d*_;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||nt;var f=d||"YYYY-MM-DDTHH:mm:ssZ",v=u.z(this),g=this.$H,_=this.$m,h=this.$M,M=c.weekdays,C=c.months,j=c.meridiem,N=function(x,w,A,P){return x&&(x[w]||x(a,f))||A[w].slice(0,P)},b=function(x){return u.s(g%12||12,x,"0")},O=j||function(x,w,A){var P=x<12?"AM":"PM";return A?P.toLowerCase():P};return f.replace(vt,(function(x,w){return w||(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 N(c.monthsShort,h,C,3);case"MMMM":return N(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 N(c.weekdaysMin,a.$W,M,2);case"ddd":return N(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 O(g,_,!0);case"A":return O(g,_,!1);case"m":return String(_);case"mm":return u.s(_,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})(x)||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),_=n(d),h=(_.utcOffset()-this.utcOffset())*o,M=this-_,C=function(){return u.m(v,_)};switch(g){case q:f=C()/12;break;case z:f=C();break;case Q:f=C()/3;break;case U:f=(M-h)/6048e5;break;case p:f=(M-h)/864e5;break;case K:f=M/k;break;case Y: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(z).$D},l.$locale=function(){return Z[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",Y],["$H",K],["$W",p],["$M",z],["$y",q],["$D",X]].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=Z[ft],n.Ls=Z,n.p={},n}))})(Dt)),Dt.exports}var ce=ue();const H=Ot(ce);var Mt={exports:{}},fe=Mt.exports,zt;function de(){return zt||(zt=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)},Y=k.prototype;Y.isoWeekYear=function(){return T(this).year()},Y.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),i);var U,z,Q,q,X=T(this),nt=(U=this.isoWeekYear(),z=this.$u,Q=(z?D.utc:D)().year(U).startOf("year"),q=4-Q.isoWeekday(),Q.isoWeekday()>4&&(q+=7),Q.add(q,i));return X.diff(nt,"week")+1},Y.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var K=Y.startOf;Y.startOf=function(p,U){var z=this.$utils(),Q=!!z.u(U)||U;return z.p(p)==="isoweek"?Q?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):K.bind(this)(p,U)}}}))})(Mt)),Mt.exports}var le=de();const he=Ot(le);var $t={exports:{}},pe=$t.exports,jt;function ge(){return jt||(jt=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,Y=T.format;D.en.formats=i,T.format=function(K){K===void 0&&(K="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,U=(function(z,Q){return z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(q,X,nt){var ct=nt&&nt.toUpperCase();return X||Q[nt]||i[nt]||Q[ct].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(vt,bt,lt){return bt||lt.slice(1)}))}))})(K,p===void 0?{}:p);return Y.call(this,U)}}}))})($t)),$t.exports}var me=ge();const ye=Ot(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 _e(){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 we{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))}}F.BreakPointHelper=pt,F.BreakPoints=mt,F.BrowserHelper=rt,F.BrowserService=we,F.BrowserType=et,F.CsvHelper=Qt,F.EnumHelper=Xt,F.FileHelper=te,F.LocalStorageHelper=yt,F.LoggerHelper=V,F.LoggerType=gt,F.ScreenHelper=kt,F.TokenHelper=se,F.WindowResizeHelper=B,F.copyToClipboard=Ut,F.initArrayExtensions=ae,F.initDateExtensions=ve,F.initStringExtensions=_e,F.saveAs=At,F.sortHelper=Lt,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
|
|
5
|
+
`:"\r"}}function ce(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ve(t){var r=(t=t||{}).delimiter,i=t.newline,u=t.comments,m=t.step,S=t.preview,y=t.fastMode,l=null,d=!1,o=t.quoteChar==null?'"':t.quoteChar,c=o;if(t.escapeChar!==void 0&&(c=t.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),i!==`
|
|
6
|
+
`&&i!=="\r"&&i!==`\r
|
|
7
|
+
`&&(i=`
|
|
8
|
+
`);var f=0,v=!1;this.parse=function(g,_,h){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,C=r.length,j=i.length,N=u.length,b=R(m),O=[],x=[],w=[],A=f=0;if(!g)return G();if(y||y!==!1&&g.indexOf(o)===-1){for(var P=g.split(i),I=0;I<P.length;I++){if(w=P[I],f+=w.length,I!==P.length-1)f+=i.length;else if(h)return G();if(!u||w.substring(0,N)!==u){if(b){if(O=[],pe(w.split(r)),ae(),v)return G()}else pe(w.split(r));if(S&&S<=I)return O=O.slice(0,S),G(!0)}}return G()}for(var L=g.indexOf(r,f),$=g.indexOf(i,f),ie=new RegExp(ce(c)+ce(o),"g"),E=g.indexOf(o,f);;)if(g[f]===o)for(E=f,f++;;){if((E=g.indexOf(o,E+1))===-1)return h||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:f}),se();if(E===M-1)return se(g.substring(f,E).replace(ie,o));if(o===c&&g[E+1]===c)E++;else if(o===c||E===0||g[E-1]!==c){L!==-1&&L<E+1&&(L=g.indexOf(r,E+1));var U=_e(($=$!==-1&&$<E+1?g.indexOf(i,E+1):$)===-1?L:Math.min(L,$));if(g.substr(E+1+U,C)===r){w.push(g.substring(f,E).replace(ie,o)),g[f=E+1+U+C]!==o&&(E=g.indexOf(o,f)),L=g.indexOf(r,f),$=g.indexOf(i,f);break}if(U=_e($),g.substring(E+1+U,E+1+U+j)===i){if(w.push(g.substring(f,E).replace(ie,o)),Se(E+1+U+j),L=g.indexOf(r,f),E=g.indexOf(o,f),b&&(ae(),v))return G();if(S&&O.length>=S)return G(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:f}),E++}}else if(u&&w.length===0&&g.substring(f,f+N)===u){if($===-1)return G();f=$+j,$=g.indexOf(i,f),L=g.indexOf(r,f)}else if(L!==-1&&(L<$||$===-1))w.push(g.substring(f,L)),f=L+C,L=g.indexOf(r,f);else{if($===-1)break;if(w.push(g.substring(f,$)),Se($+j),b&&(ae(),v))return G();if(S&&O.length>=S)return G(!0)}return se();function pe(J){O.push(J),A=f}function _e(J){var ee=0;return ee=J!==-1&&(J=g.substring(E+1,J))&&J.trim()===""?J.length:ee}function se(J){return h||(J===void 0&&(J=g.substring(f)),w.push(J),f=M,pe(w),b&&ae()),G()}function Se(J){f=J,pe(w),w=[],$=g.indexOf(i,f)}function G(J){if(t.header&&!_&&O.length&&!d){var ee=O[0],de=Object.create(null),Re=new Set(ee);let Pe=!1;for(let we=0;we<ee.length;we++){let oe=ee[we];if(de[oe=R(t.transformHeader)?t.transformHeader(oe,we):oe]){let Ee,Ye=de[oe];for(;Ee=oe+"_"+Ye,Ye++,Re.has(Ee););Re.add(Ee),ee[we]=Ee,de[oe]++,Pe=!0,(l=l===null?{}:l)[Ee]=oe}else de[oe]=1,ee[we]=oe;Re.add(oe)}Pe&&console.warn("Duplicate headers found and renamed."),d=!0}return{data:O,errors:x,meta:{delimiter:r,linebreak:i,aborted:v,truncated:!!J,cursor:A+(_||0),renamedHeaders:l}}}function ae(){m(G()),O=[],x=[]}},this.abort=function(){v=!0},this.getCharIndex=function(){return f}}function be(t){var r=t.data,i=Y[r.workerId],u=!1;if(r.error)i.userError(r.error,r.file);else if(r.results&&r.results.data){var m={abort:function(){u=!0,he(r.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Ce,resume:Ce};if(R(i.userStep)){for(var S=0;S<r.results.data.length&&(i.userStep({data:r.results.data[S],errors:r.results.errors,meta:r.results.meta},m),!u);S++);delete r.results}else R(i.userChunk)&&(i.userChunk(r.results,m,r.file),delete r.results)}r.finished&&!u&&he(r.workerId,r.results)}function he(t,r){var i=Y[t];R(i.userComplete)&&i.userComplete(r),i.terminate(),delete Y[t]}function Ce(){throw new Error("Not implemented.")}function fe(t){if(typeof t!="object"||t===null)return t;var r,i=Array.isArray(t)?[]:{};for(r in t)i[r]=fe(t[r]);return i}function Z(t,r){return function(){t.apply(r,arguments)}}function R(t){return typeof t=="function"}return p.parse=function(t,r){var i=(r=r||{}).dynamicTyping||!1;if(R(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!R(r.transform)&&r.transform,!r.worker||!p.WORKERS_SUPPORTED)return i=null,p.NODE_STREAM_INPUT,typeof t=="string"?(t=(u=>u.charCodeAt(0)!==65279?u:u.slice(1))(t),i=new(r.download?z:q)(r)):t.readable===!0&&R(t.read)&&R(t.on)?i=new X(r):(a.File&&t instanceof File||t instanceof Object)&&(i=new Q(r)),i.stream(t);(i=(()=>{var u;return!!p.WORKERS_SUPPORTED&&(u=(()=>{var m=a.URL||a.webkitURL||null,S=n.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 a.Worker(u)).onmessage=be,u.id=K++,Y[u.id]=u)})()).userStep=r.step,i.userChunk=r.chunk,i.userComplete=r.complete,i.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,i.postMessage({input:t,config:r,workerId:i.id})},p.unparse=function(t,r){var i=!1,u=!0,m=",",S=`\r
|
|
9
|
+
`,y='"',l=y+y,d=!1,o=null,c=!1,f=((()=>{if(typeof r=="object"){if(typeof r.delimiter!="string"||p.BAD_DELIMITERS.filter(function(_){return r.delimiter.indexOf(_)!==-1}).length||(m=r.delimiter),typeof r.quotes!="boolean"&&typeof r.quotes!="function"&&!Array.isArray(r.quotes)||(i=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");o=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(ce(y),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return v(null,t,d);if(typeof t[0]=="object")return v(o||Object.keys(t[0]),t,d)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||o),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),v(t.fields||[],t.data||[],d);throw new Error("Unable to serialize unrecognized input");function v(_,h,M){var C="",j=(typeof _=="string"&&(_=JSON.parse(_)),typeof h=="string"&&(h=JSON.parse(h)),Array.isArray(_)&&0<_.length),N=!Array.isArray(h[0]);if(j&&u){for(var b=0;b<_.length;b++)0<b&&(C+=m),C+=g(_[b],b);0<h.length&&(C+=S)}for(var O=0;O<h.length;O++){var x=(j?_:h[O]).length,w=!1,A=j?Object.keys(h[O]).length===0:h[O].length===0;if(M&&!j&&(w=M==="greedy"?h[O].join("").trim()==="":h[O].length===1&&h[O][0].length===0),M==="greedy"&&j){for(var P=[],I=0;I<x;I++){var L=N?_[I]:I;P.push(h[O][L])}w=P.join("").trim()===""}if(!w){for(var $=0;$<x;$++){0<$&&!A&&(C+=m);var ie=j&&N?_[$]:$;C+=g(h[O][ie],$)}O<h.length-1&&(!M||0<x&&!A)&&(C+=S)}}return C}function g(_,h){var M,C;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):(C=!1,c&&typeof _=="string"&&c.test(_)&&(_="'"+_,C=!0),M=_.toString().replace(f,l),(C=C||i===!0||typeof i=="function"&&i(_,h)||Array.isArray(i)&&i[h]||((j,N)=>{for(var b=0;b<N.length;b++)if(-1<j.indexOf(N[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&&!!a.Worker,p.NODE_STREAM_INPUT=1,p.LocalChunkSize=10485760,p.RemoteChunkSize=5242880,p.DefaultDelimiter=",",p.Parser=ve,p.ParserHandle=ne,p.NetworkStreamer=z,p.FileStreamer=Q,p.StringStreamer=q,p.ReadableStreamStreamer=X,a.jQuery&&((k=a.jQuery).fn.parse=function(t){var r=t.config||{},i=[];return this.each(function(S){if(!(k(this).prop("tagName").toUpperCase()==="INPUT"&&k(this).attr("type").toLowerCase()==="file"&&a.FileReader)||!this.files||this.files.length===0)return!0;for(var y=0;y<this.files.length;y++)i.push({file:this.files[y],inputElem:this,instanceConfig:k.extend({},r)})}),u(),this;function u(){if(i.length===0)R(t.complete)&&t.complete();else{var S,y,l,d,o=i[0];if(R(t.before)){var c=t.before(o.file,o.inputElem);if(typeof c=="object"){if(c.action==="abort")return S="AbortError",y=o.file,l=o.inputElem,d=c.reason,void(R(t.error)&&t.error({name:S},y,l,d));if(c.action==="skip")return void m();typeof c.config=="object"&&(o.instanceConfig=k.extend(o.instanceConfig,c.config))}else if(c==="skip")return void m()}var f=o.instanceConfig.complete;o.instanceConfig.complete=function(v){R(f)&&f(v,o.file,o.inputElem),m()},p.parse(o.file,o.instanceConfig)}}function m(){i.splice(0,1),u()}}),T&&(a.onmessage=function(t){t=t.data,p.WORKER_ID===void 0&&t&&(p.WORKER_ID=t.workerId),typeof t.input=="string"?a.postMessage({workerId:p.WORKER_ID,results:p.parse(t.input,t.config),finished:!0}):(a.File&&t.input instanceof File||t.input instanceof Object)&&(t=p.parse(t.input,t.config))&&a.postMessage({workerId:p.WORKER_ID,results:t,finished:!0})}),(z.prototype=Object.create(W.prototype)).constructor=z,(Q.prototype=Object.create(W.prototype)).constructor=Q,(q.prototype=Object.create(q.prototype)).constructor=q,(X.prototype=Object.create(W.prototype)).constructor=X,p})})(xe)),xe.exports}var Ne=Be();const qe=Oe(Ne),{parse:Ke,unparse:Je}=qe;class Qe{static unparse(e,n){return Je(e,n)}static parse(e){return new Promise((n,a)=>{Ke(e,{header:!0,complete:k=>n(k),error:k=>a(k)})})}}async function Ae(s,e,n){const a=n?.mimeType??Ze(e),k=Ve(s,a);if("showSaveFilePicker"in window&&n?.showSaveFilePicker)try{const K=await(await window.showSaveFilePicker({suggestedName:e,types:[{description:"Datei",accept:{[a]:[`.${Ie(e)}`]}}]})).createWritable();await K.write(k),await K.close();return}catch{}const D=URL.createObjectURL(k),T=document.createElement("a");T.href=D,T.download=e,T.rel="noopener",T.style.display="none",document.body.appendChild(T),Ge(T),window.setTimeout(()=>{document.body.removeChild(T),URL.revokeObjectURL(D)},0),He()&&window.open(D,"_blank","noopener,noreferrer")}function Ve(s,e){if(s instanceof Blob)return s.type?s:new Blob([s],{type:e});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const n=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([n],{type:e})}return new Blob([s],{type:e||"text/plain;charset=utf-8"})}function Ze(s){switch(Ie(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 Ie(s){const e=s.lastIndexOf(".");return e>=0&&e<s.length-1?s.slice(e+1):""}function Ge(s){const e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(e)}function He(){const s=navigator.userAgent,e=/iPad|iPhone|iPod/.test(s),n=/^((?!chrome|android).)*safari/i.test(s);return e||n}class Xe{static getEnumValue(e,n){if(n in e)return e[n];throw Error(`${n} not found in ${e}`)}static getKeyValues(e){return Object.keys(e).filter(n=>!isNaN(Number(n))).map(n=>({key:Number(n),value:e[n]}))}}class et{static getFileExtension(e){let n="";const a=e.lastIndexOf(".");return a>0&&a<e.length-1&&(n=`.${e.substring(a+1).toLowerCase()}`),n}static readAsText(e){const n=new FileReader;return new Promise((a,k)=>{n.onload=()=>{n.onload=null,n.onerror=null,typeof n.result=="string"?a(n.result):k(new Error("Unexpected result type"))},n.onerror=()=>{const D=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,k(D)},n.readAsText(e)})}static readAsArrayBuffer(e){const n=new FileReader;return new Promise((a,k)=>{n.onload=()=>{n.onload=null,n.onerror=null,n.result instanceof ArrayBuffer?a(n.result):k(new Error("Unexpected result type"))},n.onerror=()=>{const D=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,k(D)},n.readAsArrayBuffer(e)})}static readAsDataUrl(e){const n=new FileReader;return new Promise((a,k)=>{n.onload=D=>{a(D)},n.onerror=D=>k(D),n.readAsDataURL(e)})}static formatFileSize(e,n=2,a){if(e===0)return"0 Bytes";const k=1024,D=["Bytes","KB","MB","GB","TB"];let T=Math.floor(Math.log(e)/Math.log(k));a&&D.includes(a)&&(T=D.indexOf(a));const Y=e/Math.pow(k,T);return`${parseFloat(Y.toFixed(n))} ${D[T]}`}static save(e,n,a){const k=new Blob([e],{type:a});Ae(k,n)}}class ye{static set(e,n){localStorage.setItem(e,JSON.stringify(n))}static get(e){let n=null;const a=localStorage.getItem(e);return a&&(n=JSON.parse(a)),n}static remove(e){let n=!!ye.get(e);return n&&localStorage.removeItem(e),n}static removeAll(){localStorage.clear()}static getKeysBy(e){return Object.keys(localStorage).filter(n=>n.startsWith(e))}}var ge=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(ge||{});class V{static listeners=new Set;static enabled=!0;static log(...e){V.doLog(ge.log,e)}static info(...e){V.doLog(ge.info,e)}static warn(...e){V.doLog(ge.warn,e)}static debug(...e){V.doLog(ge.debug,e)}static error(...e){V.doLog(ge.error,e)}static clearListeners(){V.listeners.clear()}static setEnabled(e){V.enabled=e}static doLog(e,n){if(!V.enabled)return;const a={type:e,args:n,timestamp:new Date().toISOString()};for(const k of V.listeners)try{if(k(a)===!1)return}catch{}console[e].apply(console,n)}static onLog(e,n=!1){if(n){const a=k=>{try{return e(k)}finally{V.listeners.delete(a)}};return V.listeners.add(a),()=>V.listeners.delete(a)}return V.listeners.add(e),()=>V.listeners.delete(e)}}const tt=(s,e,n)=>s.localeCompare(e)*(n?1:-1),rt=(s,e)=>s<e?-1:s===e?0:1,nt=(s,e,n)=>rt(s,e)*(n?1:-1),it=(s,e,n)=>{let a=0;return typeof s=="string"&&typeof e=="string"?a=tt(s,e,n):a=nt(s,e,n),a},Le=(s,e,n,a)=>{const k=n(s),D=n(e);return it(k,D,a)};class st{static get(e){return ye.get(e)}static set(e,n){ye.set(e,n)}static remove(e){ye.remove(e)}}class B{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=window.innerWidth;static onResize(e){return B.initialized||B.init(),B.listeners.add(e),()=>B.off(e)}static handleResize=()=>{B.resizeTimeout!==null&&(window.clearTimeout(B.resizeTimeout),B.resizeTimeout=null),B.resizeTimeout=window.setTimeout(()=>{const e=window.innerWidth;if(e!==B.lastWidth){B.lastWidth=e;for(const n of B.listeners)n(e)}},150)};static init(){B.initialized||(window.addEventListener("resize",B.handleResize,{passive:!0}),B.initialized=!0)}static off(e){B.initialized&&(B.listeners.delete(e),B.listeners.size===0&&(window.removeEventListener("resize",B.handleResize),B.initialized=!1))}}function at(){Array.prototype.distinct=function(s){return s?this.filter((n,a,k)=>k.findIndex(D=>s(D,n))===a):this.filter((n,a,k)=>k.indexOf(n)===a)},Array.prototype.filterBy=function(s){return this.filter(e=>s(e))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((e,n)=>{const a=s(n);return e[a]||(e[a]=[]),e[a].push(n),e},{})},Array.prototype.orderBy=function(s,e=!0){return this?.sort((n,a)=>Le(n,a,s,e)),this},Array.prototype.removeBy=function(s,e){return this.filter(n=>s(n)!==e)}}var De={exports:{}},ot=De.exports,Fe;function ut(){return Fe||(Fe=1,(function(s,e){(function(n,a){s.exports=a()})(ot,(function(){var n=1e3,a=6e4,k=36e5,D="millisecond",T="second",Y="minute",K="hour",p="day",W="week",z="month",Q="quarter",q="year",X="date",ne="Invalid Date",ce=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ve=/\[([^\]]+)]|YYYY|YY|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,be={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])+"]"}},he=function(y,l,d){var o=String(y);return!o||o.length>=l?y:""+Array(l+1-o.length).join(d)+y},Ce={s:he,z:function(y){var l=-y.utcOffset(),d=Math.abs(l),o=Math.floor(d/60),c=d%60;return(l<=0?"+":"-")+he(o,2,"0")+":"+he(c,2,"0")},m:function y(l,d){if(l.date()<d.date())return-y(d,l);var o=12*(d.year()-l.year())+(d.month()-l.month()),c=l.clone().add(o,z),f=d-c<0,v=l.clone().add(o+(f?-1:1),z);return+(-(o+(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:z,y:q,w:W,d:p,D:X,h:K,m:Y,s:T,ms:D,Q}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},fe="en",Z={};Z[fe]=be;var R="$isDayjsObject",t=function(y){return y instanceof m||!(!y||!y[R])},r=function y(l,d,o){var c;if(!l)return fe;if(typeof l=="string"){var f=l.toLowerCase();Z[f]&&(c=f),d&&(Z[f]=d,c=f);var v=l.split("-");if(!c&&v.length>1)return y(v[0])}else{var g=l.name;Z[g]=l,c=g}return!o&&c&&(fe=c),c||!o&&fe},i=function(y,l){if(t(y))return y.clone();var d=typeof l=="object"?l:{};return d.date=y,d.args=arguments,new m(d)},u=Ce;u.l=r,u.i=t,u.w=function(y,l){return i(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(o){var c=o.date,f=o.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(ce);if(v){var g=v[2]-1||0,_=(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,_)):new Date(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,_)}}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()!==ne},l.isSame=function(d,o){var c=i(d);return this.startOf(o)<=c&&c<=this.endOf(o)},l.isAfter=function(d,o){return i(d)<this.startOf(o)},l.isBefore=function(d,o){return this.endOf(o)<i(d)},l.$g=function(d,o,c){return u.u(d)?this[o]:this.set(c,d)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(d,o){var c=this,f=!!u.u(o)||o,v=u.p(d),g=function(O,x){var w=u.w(c.$u?Date.UTC(c.$y,x,O):new Date(c.$y,x,O),c);return f?w:w.endOf(p)},_=function(O,x){return u.w(c.toDate()[O].apply(c.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(x)),c)},h=this.$W,M=this.$M,C=this.$D,j="set"+(this.$u?"UTC":"");switch(v){case q:return f?g(1,0):g(31,11);case z:return f?g(1,M):g(0,M+1);case W:var N=this.$locale().weekStart||0,b=(h<N?h+7:h)-N;return g(f?C-b:C+(6-b),M);case p:case X:return _(j+"Hours",0);case K:return _(j+"Minutes",1);case Y:return _(j+"Seconds",2);case T:return _(j+"Milliseconds",3);default:return this.clone()}},l.endOf=function(d){return this.startOf(d,!1)},l.$set=function(d,o){var c,f=u.p(d),v="set"+(this.$u?"UTC":""),g=(c={},c[p]=v+"Date",c[X]=v+"Date",c[z]=v+"Month",c[q]=v+"FullYear",c[K]=v+"Hours",c[Y]=v+"Minutes",c[T]=v+"Seconds",c[D]=v+"Milliseconds",c)[f],_=f===p?this.$D+(o-this.$W):o;if(f===z||f===q){var h=this.clone().set(X,1);h.$d[g](_),h.init(),this.$d=h.set(X,Math.min(this.$D,h.daysInMonth())).$d}else g&&this.$d[g](_);return this.init(),this},l.set=function(d,o){return this.clone().$set(d,o)},l.get=function(d){return this[u.p(d)]()},l.add=function(d,o){var c,f=this;d=Number(d);var v=u.p(o),g=function(M){var C=i(f);return u.w(C.date(C.date()+Math.round(M*d)),f)};if(v===z)return this.set(z,this.$M+d);if(v===q)return this.set(q,this.$y+d);if(v===p)return g(1);if(v===W)return g(7);var _=(c={},c[Y]=a,c[K]=k,c[T]=n,c)[v]||1,h=this.$d.getTime()+d*_;return u.w(h,this)},l.subtract=function(d,o){return this.add(-1*d,o)},l.format=function(d){var o=this,c=this.$locale();if(!this.isValid())return c.invalidDate||ne;var f=d||"YYYY-MM-DDTHH:mm:ssZ",v=u.z(this),g=this.$H,_=this.$m,h=this.$M,M=c.weekdays,C=c.months,j=c.meridiem,N=function(x,w,A,P){return x&&(x[w]||x(o,f))||A[w].slice(0,P)},b=function(x){return u.s(g%12||12,x,"0")},O=j||function(x,w,A){var P=x<12?"AM":"PM";return A?P.toLowerCase():P};return f.replace(ve,(function(x,w){return w||(function(A){switch(A){case"YY":return String(o.$y).slice(-2);case"YYYY":return u.s(o.$y,4,"0");case"M":return h+1;case"MM":return u.s(h+1,2,"0");case"MMM":return N(c.monthsShort,h,C,3);case"MMMM":return N(C,h);case"D":return o.$D;case"DD":return u.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return N(c.weekdaysMin,o.$W,M,2);case"ddd":return N(c.weekdaysShort,o.$W,M,3);case"dddd":return M[o.$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 O(g,_,!0);case"A":return O(g,_,!1);case"m":return String(_);case"mm":return u.s(_,2,"0");case"s":return String(o.$s);case"ss":return u.s(o.$s,2,"0");case"SSS":return u.s(o.$ms,3,"0");case"Z":return v}return null})(x)||v.replace(":","")}))},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(d,o,c){var f,v=this,g=u.p(o),_=i(d),h=(_.utcOffset()-this.utcOffset())*a,M=this-_,C=function(){return u.m(v,_)};switch(g){case q:f=C()/12;break;case z:f=C();break;case Q:f=C()/3;break;case W:f=(M-h)/6048e5;break;case p:f=(M-h)/864e5;break;case K:f=M/k;break;case Y:f=M/a;break;case T:f=M/n;break;default:f=M}return c?f:u.a(f)},l.daysInMonth=function(){return this.endOf(z).$D},l.$locale=function(){return Z[this.$L]},l.locale=function(d,o){if(!d)return this.$L;var c=this.clone(),f=r(d,o,!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 i.prototype=S,[["$ms",D],["$s",T],["$m",Y],["$H",K],["$W",p],["$M",z],["$y",q],["$D",X]].forEach((function(y){S[y[1]]=function(l){return this.$g(l,y[0],y[1])}})),i.extend=function(y,l){return y.$i||(y(l,m,i),y.$i=!0),i},i.locale=r,i.isDayjs=t,i.unix=function(y){return i(1e3*y)},i.en=Z[fe],i.Ls=Z,i.p={},i}))})(De)),De.exports}var ct=ut();const H=Oe(ct);var Me={exports:{}},ft=Me.exports,ze;function dt(){return ze||(ze=1,(function(s,e){(function(n,a){s.exports=a()})(ft,(function(){var n="day";return function(a,k,D){var T=function(p){return p.add(4-p.isoWeekday(),n)},Y=k.prototype;Y.isoWeekYear=function(){return T(this).year()},Y.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),n);var W,z,Q,q,X=T(this),ne=(W=this.isoWeekYear(),z=this.$u,Q=(z?D.utc:D)().year(W).startOf("year"),q=4-Q.isoWeekday(),Q.isoWeekday()>4&&(q+=7),Q.add(q,n));return X.diff(ne,"week")+1},Y.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var K=Y.startOf;Y.startOf=function(p,W){var z=this.$utils(),Q=!!z.u(W)||W;return z.p(p)==="isoweek"?Q?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):K.bind(this)(p,W)}}}))})(Me)),Me.exports}var lt=dt();const ht=Oe(lt);var $e={exports:{}},pt=$e.exports,je;function gt(){return je||(je=1,(function(s,e){(function(n,a){s.exports=a()})(pt,(function(){var n={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(a,k,D){var T=k.prototype,Y=T.format;D.en.formats=n,T.format=function(K){K===void 0&&(K="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,W=(function(z,Q){return z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(q,X,ne){var ce=ne&&ne.toUpperCase();return X||Q[ne]||n[ne]||Q[ce].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(ve,be,he){return be||he.slice(1)}))}))})(K,p===void 0?{}:p);return Y.call(this,W)}}}))})($e)),$e.exports}var mt=gt();const yt=Oe(mt);H.extend(yt),H.extend(ht);function vt(){Date.prototype.add=function(s,e){return H(this).add(s,e).toDate()},Date.prototype.diff=function(s,e){return H(this).diff(s,e)},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,e){return H(this).isAfter(s,e)},Date.prototype.isBefore=function(s,e){return H(this).isBefore(s,e)},Date.prototype.isValid=function(){return H(this).isValid()},Date.prototype.isoWeek=function(){return H(this).isoWeek()},Date.prototype.subtract=function(s,e){return H(this).subtract(s,e).toDate()},Date.prototype.lastDayOfMonth=function(){return H(this).endOf("month").toDate()},Date.prototype.set=function(s,e){return H(this).set(s,e).toDate()},Date.prototype.startOf=function(s){return H(this).startOf(s).toDate()}}function _t(){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 wt{resizeListener=null;onResizeCallbacks=new Set;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize,window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&this.resizeListener!==null&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.emitTimeoutId!==null&&(clearTimeout(this.emitTimeoutId),this.emitTimeoutId=null),this.onResizeCallbacks.clear()}onResizeChange(e){this.onResizeCallbacks.add(e)}offResizeChange(e){this.onResizeCallbacks.delete(e)}onResize=()=>{if(typeof window>"u")return;const e=window.innerWidth;this.emitTimeoutId!==null&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null;const n=le.getBreakpointByScreenWidth(e);for(const a of this.onResizeCallbacks)a(e,n)},this.duplicateThresholdMs)}}F.BreakPointHelper=le,F.BreakPoints=me,F.BrowserHelper=re,F.BrowserService=wt,F.BrowserType=te,F.CsvHelper=Qe,F.EnumHelper=Xe,F.FileHelper=et,F.LocalStorageHelper=ye,F.LoggerHelper=V,F.LoggerType=ge,F.ScreenHelper=ke,F.TokenHelper=st,F.WindowResizeHelper=B,F.copyToClipboard=We,F.initArrayExtensions=at,F.initDateExtensions=vt,F.initStringExtensions=_t,F.saveAs=Ae,F.sortHelper=Le,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -2,9 +2,8 @@ import { OnResizeCallback } from './browser.types';
|
|
|
2
2
|
export declare class BrowserService {
|
|
3
3
|
private resizeListener;
|
|
4
4
|
private onResizeCallbacks;
|
|
5
|
-
private rafId;
|
|
6
5
|
private emitTimeoutId;
|
|
7
|
-
private duplicateThresholdMs;
|
|
6
|
+
private readonly duplicateThresholdMs;
|
|
8
7
|
constructor();
|
|
9
8
|
destroy(): void;
|
|
10
9
|
onResizeChange(callback: OnResizeCallback): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,qBAAa,cAAc;IAC1B,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAM;;IAUpC,OAAO,IAAI,IAAI;IAcf,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIhD,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIxD,OAAO,CAAC,QAAQ,CAed;CACF"}
|