@oardi/ts-utils 0.0.7 → 0.0.11
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-extension.d.ts +4 -3
- package/extensions/array-extension.d.ts.map +1 -1
- package/extensions/string-extensions.d.ts +1 -0
- package/extensions/string-extensions.d.ts.map +1 -1
- package/helpers/download.helper.d.ts +16 -0
- package/helpers/download.helper.d.ts.map +1 -0
- package/helpers/index.d.ts +2 -0
- package/helpers/index.d.ts.map +1 -1
- package/index.cjs.js +9 -9
- package/index.es.js +735 -704
- package/index.umd.js +9 -9
- package/package.json +1 -1
- package/services/browser.service.d.ts +16 -6
- package/services/browser.service.d.ts.map +1 -1
- package/services/file.service.d.ts.map +1 -1
- package/services/local.service.d.ts +1 -1
- package/services/local.service.d.ts.map +1 -1
- package/services/token.service.d.ts +4 -3
- package/services/token.service.d.ts.map +1 -1
- package/README.md +0 -15
|
@@ -2,11 +2,12 @@ import { Dictionary } from '../types';
|
|
|
2
2
|
export {};
|
|
3
3
|
declare global {
|
|
4
4
|
interface Array<T> {
|
|
5
|
+
distinct<T>(comparator?: (obj1: unknown, obj2: unknown) => boolean): T[];
|
|
6
|
+
filterBy<G>(key?: string): G[];
|
|
7
|
+
first(): T;
|
|
5
8
|
groupBy(valueGetter: (a: T) => string): Dictionary<T[]>;
|
|
6
|
-
removeBy<T, G>(valueGetter: (a: T) => G, val: G): T[];
|
|
7
9
|
orderBy<T, G>(valueGetter: (a: T) => G, ascending?: boolean): T[];
|
|
8
|
-
|
|
9
|
-
distinct<T>(comparator?: (obj1: unknown, obj2: unknown) => boolean): T[];
|
|
10
|
+
removeBy<T, G>(valueGetter: (a: T) => G, val: G): T[];
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=array-extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-extension.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/array-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,KAAK,CAAC,CAAC;QAChB,
|
|
1
|
+
{"version":3,"file":"array-extension.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/array-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,KAAK,CAAC,CAAC;QAChB,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,GAAG,CAAC,EAAE,CAAC;QACzE,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,IAAI,CAAC,CAAC;QACX,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QACxD,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,CAAC;QAClE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;KACtD;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-extensions.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/string-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,IAAI,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"string-extensions.d.ts","sourceRoot":"","sources":["../../../src/lib/extensions/string-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,IAAI,MAAM,CAAC;QACrB,QAAQ,IAAI,OAAO,CAAC;KACpB;CACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SaveSource = Blob | ArrayBuffer | Uint8Array | string;
|
|
2
|
+
export interface SaveOptions {
|
|
3
|
+
/** MIME-Type, falls `source` kein Blob ist (z. B. "application/pdf") */
|
|
4
|
+
mimeType?: string;
|
|
5
|
+
showSaveFilePicker?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Speichert Client-seitig eine Datei – ohne Abhängigkeit von "file-saver".
|
|
9
|
+
*
|
|
10
|
+
* Strategien:
|
|
11
|
+
* 1) File System Access API (showSaveFilePicker) – wenn verfügbar
|
|
12
|
+
* 2) Fallback: <a download> + blob: URL
|
|
13
|
+
* 3) iOS-/Safari-Fallback: neue Tab-Öffnung, wenn download-Attribut ignoriert wird
|
|
14
|
+
*/
|
|
15
|
+
export declare function saveAs(source: SaveSource, fileName: string, options?: SaveOptions): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=download.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.helper.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/download.helper.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,WAAW;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DvG"}
|
package/helpers/index.d.ts
CHANGED
package/helpers/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
package/index.cjs.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=(h,r,f)=>h.localeCompare(r)*(f?1:-1),Te=(h,r)=>h<r?-1:h===r?0:1,Fe=(h,r,f)=>Te(h,r)*(f?1:-1),Ie=(h,r,f)=>{let d=0;return typeof h=="string"&&typeof r=="string"?d=Ae(h,r,f):d=Fe(h,r,f),d},$e=(h,r,f,d)=>{const C=f(h),$=f(r);return Ie(C,$,d)};Array.prototype.groupBy=function(h){return this.reduce((r,f)=>{const d=h(f);return(r[d]=r[d]||[]).push(f),r},{})};Array.prototype.removeBy=function(h,r){return this.filter(f=>h(f)!==r)};Array.prototype.orderBy=function(h,r=!0){return this?.sort((f,d)=>$e(f,d,h,r)),this};Array.prototype.filterBy=function(h){return this.filter(r=>{let f=!1;return h&&r[h]?f=r[h]===h:f=r===h,f})};Array.prototype.distinct=function(h){const r=this;return h?r.filter((d,C,$)=>$.findIndex(z=>h(z,d))===C):r.filter((d,C,$)=>$.indexOf(d)===C)};var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var me={exports:{}},je=me.exports,Oe;function ze(){return Oe||(Oe=1,function(h,r){(function(f,d){h.exports=d()})(je,function(){var f=1e3,d=6e4,C=36e5,$="millisecond",z="second",N="minute",q="hour",o="day",S="week",A="month",D="quarter",T="year",Q="date",G="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,se=/\[([^\]]+)]|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,ae={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(_){var l=["th","st","nd","rd"],c=_%100;return"["+_+(l[(c-20)%10]||l[c]||l[0])+"]"}},Z=function(_,l,c){var i=String(_);return!i||i.length>=l?_:""+Array(l+1-i.length).join(c)+_},pe={s:Z,z:function(_){var l=-_.utcOffset(),c=Math.abs(l),i=Math.floor(c/60),a=c%60;return(l<=0?"+":"-")+Z(i,2,"0")+":"+Z(a,2,"0")},m:function _(l,c){if(l.date()<c.date())return-_(c,l);var i=12*(c.year()-l.year())+(c.month()-l.month()),a=l.clone().add(i,A),u=c-a<0,y=l.clone().add(i+(u?-1:1),A);return+(-(i+(c-a)/(u?a-y:y-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:A,y:T,w:S,d:o,D:Q,h:q,m:N,s:z,ms:$,Q:D}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},oe="en",K={};K[oe]=ae;var F="$isDayjsObject",e=function(_){return _ instanceof m||!(!_||!_[F])},t=function _(l,c,i){var a;if(!l)return oe;if(typeof l=="string"){var u=l.toLowerCase();K[u]&&(a=u),c&&(K[u]=c,a=u);var y=l.split("-");if(!a&&y.length>1)return _(y[0])}else{var g=l.name;K[g]=l,a=g}return!i&&a&&(oe=a),a||!i&&oe},n=function(_,l){if(e(_))return _.clone();var c=typeof l=="object"?l:{};return c.date=_,c.args=arguments,new m(c)},s=pe;s.l=t,s.i=e,s.w=function(_,l){return n(_,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=function(){function _(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[F]=!0}var l=_.prototype;return l.parse=function(c){this.$d=function(i){var a=i.date,u=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var y=a.match(X);if(y){var g=y[2]-1||0,v=(y[7]||"0").substring(0,3);return u?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(a)}(c),this.init()},l.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},l.$utils=function(){return s},l.isValid=function(){return this.$d.toString()!==G},l.isSame=function(c,i){var a=n(c);return this.startOf(i)<=a&&a<=this.endOf(i)},l.isAfter=function(c,i){return n(c)<this.startOf(i)},l.isBefore=function(c,i){return this.endOf(i)<n(c)},l.$g=function(c,i,a){return s.u(c)?this[i]:this.set(a,c)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(c,i){var a=this,u=!!s.u(i)||i,y=s.p(c),g=function(O,x){var w=s.w(a.$u?Date.UTC(a.$y,x,O):new Date(a.$y,x,O),a);return u?w:w.endOf(o)},v=function(O,x){return s.w(a.toDate()[O].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(x)),a)},p=this.$W,M=this.$M,L=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case T:return u?g(1,0):g(31,11);case A:return u?g(1,M):g(0,M+1);case S:var Y=this.$locale().weekStart||0,k=(p<Y?p+7:p)-Y;return g(u?L-k:L+(6-k),M);case o:case Q:return v(B+"Hours",0);case q:return v(B+"Minutes",1);case N:return v(B+"Seconds",2);case z:return v(B+"Milliseconds",3);default:return this.clone()}},l.endOf=function(c){return this.startOf(c,!1)},l.$set=function(c,i){var a,u=s.p(c),y="set"+(this.$u?"UTC":""),g=(a={},a[o]=y+"Date",a[Q]=y+"Date",a[A]=y+"Month",a[T]=y+"FullYear",a[q]=y+"Hours",a[N]=y+"Minutes",a[z]=y+"Seconds",a[$]=y+"Milliseconds",a)[u],v=u===o?this.$D+(i-this.$W):i;if(u===A||u===T){var p=this.clone().set(Q,1);p.$d[g](v),p.init(),this.$d=p.set(Q,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](v);return this.init(),this},l.set=function(c,i){return this.clone().$set(c,i)},l.get=function(c){return this[s.p(c)]()},l.add=function(c,i){var a,u=this;c=Number(c);var y=s.p(i),g=function(M){var L=n(u);return s.w(L.date(L.date()+Math.round(M*c)),u)};if(y===A)return this.set(A,this.$M+c);if(y===T)return this.set(T,this.$y+c);if(y===o)return g(1);if(y===S)return g(7);var v=(a={},a[N]=d,a[q]=C,a[z]=f,a)[y]||1,p=this.$d.getTime()+c*v;return s.w(p,this)},l.subtract=function(c,i){return this.add(-1*c,i)},l.format=function(c){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||G;var u=c||"YYYY-MM-DDTHH:mm:ssZ",y=s.z(this),g=this.$H,v=this.$m,p=this.$M,M=a.weekdays,L=a.months,B=a.meridiem,Y=function(x,w,I,U){return x&&(x[w]||x(i,u))||I[w].slice(0,U)},k=function(x){return s.s(g%12||12,x,"0")},O=B||function(x,w,I){var U=x<12?"AM":"PM";return I?U.toLowerCase():U};return u.replace(se,function(x,w){return w||function(I){switch(I){case"YY":return String(i.$y).slice(-2);case"YYYY":return s.s(i.$y,4,"0");case"M":return p+1;case"MM":return s.s(p+1,2,"0");case"MMM":return Y(a.monthsShort,p,L,3);case"MMMM":return Y(L,p);case"D":return i.$D;case"DD":return s.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return Y(a.weekdaysMin,i.$W,M,2);case"ddd":return Y(a.weekdaysShort,i.$W,M,3);case"dddd":return M[i.$W];case"H":return String(g);case"HH":return s.s(g,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return O(g,v,!0);case"A":return O(g,v,!1);case"m":return String(v);case"mm":return s.s(v,2,"0");case"s":return String(i.$s);case"ss":return s.s(i.$s,2,"0");case"SSS":return s.s(i.$ms,3,"0");case"Z":return y}return null}(x)||y.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(c,i,a){var u,y=this,g=s.p(i),v=n(c),p=(v.utcOffset()-this.utcOffset())*d,M=this-v,L=function(){return s.m(y,v)};switch(g){case T:u=L()/12;break;case A:u=L();break;case D:u=L()/3;break;case S:u=(M-p)/6048e5;break;case o:u=(M-p)/864e5;break;case q:u=M/C;break;case N:u=M/d;break;case z:u=M/f;break;default:u=M}return a?u:s.a(u)},l.daysInMonth=function(){return this.endOf(A).$D},l.$locale=function(){return K[this.$L]},l.locale=function(c,i){if(!c)return this.$L;var a=this.clone(),u=t(c,i,!0);return u&&(a.$L=u),a},l.clone=function(){return s.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()},_}(),b=m.prototype;return n.prototype=b,[["$ms",$],["$s",z],["$m",N],["$H",q],["$W",o],["$M",A],["$y",T],["$D",Q]].forEach(function(_){b[_[1]]=function(l){return this.$g(l,_[0],_[1])}}),n.extend=function(_,l){return _.$i||(_(l,m,n),_.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(_){return n(1e3*_)},n.en=K[oe],n.Ls=K,n.p={},n})}(me)),me.exports}var We=ze();const te=Ce(We);var _e={exports:{}},Be=_e.exports,xe;function Ue(){return xe||(xe=1,function(h,r){(function(f,d){h.exports=d()})(Be,function(){var f={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(d,C,$){var z=C.prototype,N=z.format;$.en.formats=f,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,S=function(A,D){return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,Q,G){var X=G&&G.toUpperCase();return Q||D[G]||f[G]||D[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(se,ae,Z){return ae||Z.slice(1)})})}(q,o===void 0?{}:o);return N.call(this,S)}}})}(_e)),_e.exports}var He=Ue();const Ye=Ce(He);te.extend(Ye);Date.prototype.isAfter=function(h,r){return te(this).isAfter(h,r)};Date.prototype.isBefore=function(h,r){return te(this).isBefore(h,r)};Date.prototype.format=function(h){return te(this).format(h)};Date.prototype.isValid=function(){return te(this).isValid()};Date.prototype.add=function(h,r){return te(this).add(h,r).toDate()};Date.prototype.subtract=function(h,r){return te(this).subtract(h,r).toDate()};Date.prototype.firstDayOfMonth=function(){return te(this).startOf("month").toDate()};Date.prototype.lastDayOfMonth=function(){return te(this).endOf("month").toDate()};Date.prototype.set=function(h,r){return te(this).set(h,r).toDate()};Date.prototype.diff=function(h,r){return te(this).diff(h,r)};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var Le=(h=>(h.opera="opera",h.firefox="firefox",h.safari="safari",h.ie="ie",h.edge="edge",h.edg="edg",h.electron="electron",h.chrome="chrome",h.iOsSafari="iOsSafari",h.edgiOs="edgiOs",h.headlessChrome="headlessChrome",h))(Le||{});const ye=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:375},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class Pe{screenWidth=0;lastBreakpoint;resizeListener;resizeCallbacks=new Set;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.resizeCallbacks.clear()}onBreakpointChange(r){this.resizeCallbacks.add(r)}offBreakpointChange(r){this.resizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let f=ye[0];for(const d of ye)d.screenWidth<=r&&(f=d);return f}isScreenGreaterThan(r){const f=this.getBreakpoint(r);return this.screenWidth>(f?.screenWidth??0)}isScreenSmallerThan(r){const f=this.getBreakpoint(r);return this.screenWidth<(f?.screenWidth??0)}getBreakpoint(r){return ye.find(f=>f.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof InstallTrigger<"u"}isSafari(){return/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return!!document.documentMode}isEdge(){return!this.isIE()&&!!window.StyleMedia}isEdg(){return navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window<"u"&&!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize(r){const f=r.target.innerWidth;this.screenWidth=f;const d=this.getBreakpointBySize(f);this.lastBreakpoint?.breakpoint!==d?.breakpoint&&(this.lastBreakpoint=d,this.resizeCallbacks.forEach(C=>C(d)))}}class qe{copy(r){return navigator.clipboard.writeText(r)}}var ve={exports:{}},Ne=ve.exports,De;function Ke(){return De||(De=1,function(h,r){(function(f,d){d()})(Ne,function(){function f(o,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function d(o,S,A){var D=new XMLHttpRequest;D.open("GET",o),D.responseType="blob",D.onload=function(){q(D.response,S,A)},D.onerror=function(){console.error("could not download file")},D.send()}function C(o){var S=new XMLHttpRequest;S.open("HEAD",o,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function $(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(S)}}var z=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,N=z.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),q=z.saveAs||(typeof window!="object"||window!==z?function(){}:"download"in HTMLAnchorElement.prototype&&!N?function(o,S,A){var D=z.URL||z.webkitURL,T=document.createElement("a");S=S||o.name||"download",T.download=S,T.rel="noopener",typeof o=="string"?(T.href=o,T.origin===location.origin?$(T):C(T.href)?d(o,S,A):$(T,T.target="_blank")):(T.href=D.createObjectURL(o),setTimeout(function(){D.revokeObjectURL(T.href)},4e4),setTimeout(function(){$(T)},0))}:"msSaveOrOpenBlob"in navigator?function(o,S,A){if(S=S||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(f(o,A),S);else if(C(o))d(o,S,A);else{var D=document.createElement("a");D.href=o,D.target="_blank",setTimeout(function(){$(D)})}}:function(o,S,A,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof o=="string")return d(o,S,A);var T=o.type==="application/octet-stream",Q=/constructor/i.test(z.HTMLElement)||z.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||T&&Q||N)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var Z=X.result;Z=G?Z:Z.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=Z:location=Z,D=null},X.readAsDataURL(o)}else{var se=z.URL||z.webkitURL,ae=se.createObjectURL(o);D?D.location=ae:location.href=ae,D=null,setTimeout(function(){se.revokeObjectURL(ae)},4e4)}});z.saveAs=q.saveAs=q,h.exports=q})}(ve)),ve.exports}var Je=Ke(),we={exports:{}};/* @license
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function De(i,r,s){const f=s?.mimeType??Ae(r),$=Le(i,f);if("showSaveFilePicker"in window&&s?.showSaveFilePicker)try{const q=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[f]:[`.${Ce(r)}`]}}]})).createWritable();await q.write($),await q.close();return}catch{}const C=URL.createObjectURL($),z=document.createElement("a");z.href=C,z.download=r,z.rel="noopener",z.style.display="none",document.body.appendChild(z),Ie(z),window.setTimeout(()=>{document.body.removeChild(z),URL.revokeObjectURL(C)},0),Te()&&window.open(C,"_blank","noopener,noreferrer")}function Le(i,r){if(i instanceof Blob)return i.type?i:new Blob([i],{type:r});if(i instanceof ArrayBuffer||i instanceof Uint8Array){const s=i instanceof Uint8Array?i:new Uint8Array(i);return new Blob([s],{type:r})}return new Blob([i],{type:r||"text/plain;charset=utf-8"})}function Ae(i){switch(Ce(i).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 Ce(i){const r=i.lastIndexOf(".");return r>=0&&r<i.length-1?i.slice(r+1):""}function Ie(i){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}function Te(){const i=navigator.userAgent,r=/iPad|iPhone|iPod/.test(i),s=/^((?!chrome|android).)*safari/i.test(i);return r||s}class Fe{static getEnumValue(r,s){if(s in r)return r[s];throw Error(`${s} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(s=>!isNaN(Number(s))).map(s=>({key:Number(s),value:r[s]}))}}const ze=(i,r,s)=>i.localeCompare(r)*(s?1:-1),je=(i,r)=>i<r?-1:i===r?0:1,Be=(i,r,s)=>je(i,r)*(s?1:-1),We=(i,r,s)=>{let f=0;return typeof i=="string"&&typeof r=="string"?f=ze(i,r,s):f=Be(i,r,s),f},Me=(i,r,s,f)=>{const $=s(i),C=s(r);return We($,C,f)};Array.prototype.distinct=function(i){const r=this;return i?r.filter((f,$,C)=>C.findIndex(z=>i(z,f))===$):r.filter((f,$,C)=>C.indexOf(f)===$)};Array.prototype.filterBy=function(i){return this.filter(r=>{let s=!1;return i&&r[i]?s=r[i]===i:s=r===i,s})};Array.prototype.first=function(){return this?.length>0?this[0]:null};Array.prototype.groupBy=function(i){return this.reduce((r,s)=>{const f=i(s);return(r[f]=r[f]||[]).push(s),r},{})};Array.prototype.orderBy=function(i,r=!0){return this?.sort((s,f)=>Me(s,f,i,r)),this};Array.prototype.removeBy=function(i,r){return this.filter(s=>i(s)!==r)};function $e(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ge={exports:{}},Pe=ge.exports,Se;function Ue(){return Se||(Se=1,function(i,r){(function(s,f){i.exports=f()})(Pe,function(){var s=1e3,f=6e4,$=36e5,C="millisecond",z="second",N="minute",q="hour",v="day",U="week",W="month",G="quarter",K="year",Q="date",X="Invalid Date",ne=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ue=/\[([^\]]+)]|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,de={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"],c=m%100;return"["+m+(d[(c-20)%10]||d[c]||d[0])+"]"}},ae=function(m,d,c){var a=String(m);return!a||a.length>=d?m:""+Array(d+1-a.length).join(c)+m},pe={s:ae,z:function(m){var d=-m.utcOffset(),c=Math.abs(d),a=Math.floor(c/60),u=c%60;return(d<=0?"+":"-")+ae(a,2,"0")+":"+ae(u,2,"0")},m:function m(d,c){if(d.date()<c.date())return-m(c,d);var a=12*(c.year()-d.year())+(c.month()-d.month()),u=d.clone().add(a,W),h=c-u<0,y=d.clone().add(a+(h?-1:1),W);return+(-(a+(c-u)/(h?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:W,y:K,w:U,d:v,D:Q,h:q,m:N,s:z,ms:C,Q:G}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ie="en",Y={};Y[ie]=de;var R="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[R])},t=function m(d,c,a){var u;if(!d)return ie;if(typeof d=="string"){var h=d.toLowerCase();Y[h]&&(u=h),c&&(Y[h]=c,u=h);var y=d.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=d.name;Y[p]=d,u=p}return!a&&u&&(ie=u),u||!a&&ie},n=function(m,d){if(e(m))return m.clone();var c=typeof d=="object"?d:{};return c.date=m,c.args=arguments,new g(c)},o=pe;o.l=t,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(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[R]=!0}var d=m.prototype;return d.parse=function(c){this.$d=function(a){var u=a.date,h=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(ne);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return h?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)}(c),this.init()},d.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},d.$utils=function(){return o},d.isValid=function(){return this.$d.toString()!==X},d.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},d.isAfter=function(c,a){return n(c)<this.startOf(a)},d.isBefore=function(c,a){return this.endOf(a)<n(c)},d.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(c,a){var u=this,h=!!o.u(a)||a,y=o.p(c),p=function(E,O){var w=o.w(u.$u?Date.UTC(u.$y,O,E):new Date(u.$y,O,E),u);return h?w:w.endOf(v)},_=function(E,O){return o.w(u.toDate()[E].apply(u.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(O)),u)},l=this.$W,x=this.$M,M=this.$D,T="set"+(this.$u?"UTC":"");switch(y){case K:return h?p(1,0):p(31,11);case W:return h?p(1,x):p(0,x+1);case U:var B=this.$locale().weekStart||0,k=(l<B?l+7:l)-B;return p(h?M-k:M+(6-k),x);case v:case Q:return _(T+"Hours",0);case q:return _(T+"Minutes",1);case N:return _(T+"Seconds",2);case z:return _(T+"Milliseconds",3);default:return this.clone()}},d.endOf=function(c){return this.startOf(c,!1)},d.$set=function(c,a){var u,h=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[v]=y+"Date",u[Q]=y+"Date",u[W]=y+"Month",u[K]=y+"FullYear",u[q]=y+"Hours",u[N]=y+"Minutes",u[z]=y+"Seconds",u[C]=y+"Milliseconds",u)[h],_=h===v?this.$D+(a-this.$W):a;if(h===W||h===K){var l=this.clone().set(Q,1);l.$d[p](_),l.init(),this.$d=l.set(Q,Math.min(this.$D,l.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},d.set=function(c,a){return this.clone().$set(c,a)},d.get=function(c){return this[o.p(c)]()},d.add=function(c,a){var u,h=this;c=Number(c);var y=o.p(a),p=function(x){var M=n(h);return o.w(M.date(M.date()+Math.round(x*c)),h)};if(y===W)return this.set(W,this.$M+c);if(y===K)return this.set(K,this.$y+c);if(y===v)return p(1);if(y===U)return p(7);var _=(u={},u[N]=f,u[q]=$,u[z]=s,u)[y]||1,l=this.$d.getTime()+c*_;return o.w(l,this)},d.subtract=function(c,a){return this.add(-1*c,a)},d.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||X;var h=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,l=this.$M,x=u.weekdays,M=u.months,T=u.meridiem,B=function(O,w,L,F){return O&&(O[w]||O(a,h))||L[w].slice(0,F)},k=function(O){return o.s(p%12||12,O,"0")},E=T||function(O,w,L){var F=O<12?"AM":"PM";return L?F.toLowerCase():F};return h.replace(ue,function(O,w){return w||function(L){switch(L){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return l+1;case"MM":return o.s(l+1,2,"0");case"MMM":return B(u.monthsShort,l,M,3);case"MMMM":return B(M,l);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(u.weekdaysMin,a.$W,x,2);case"ddd":return B(u.weekdaysShort,a.$W,x,3);case"dddd":return x[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,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}(O)||y.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(c,a,u){var h,y=this,p=o.p(a),_=n(c),l=(_.utcOffset()-this.utcOffset())*f,x=this-_,M=function(){return o.m(y,_)};switch(p){case K:h=M()/12;break;case W:h=M();break;case G:h=M()/3;break;case U:h=(x-l)/6048e5;break;case v:h=(x-l)/864e5;break;case q:h=x/$;break;case N:h=x/f;break;case z:h=x/s;break;default:h=x}return u?h:o.a(h)},d.daysInMonth=function(){return this.endOf(W).$D},d.$locale=function(){return Y[this.$L]},d.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),h=t(c,a,!0);return h&&(u.$L=h),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}(),b=g.prototype;return n.prototype=b,[["$ms",C],["$s",z],["$m",N],["$H",q],["$W",v],["$M",W],["$y",K],["$D",Q]].forEach(function(m){b[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=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=Y[ie],n.Ls=Y,n.p={},n})}(ge)),ge.exports}var Ye=Ue();const Z=$e(Ye);var me={exports:{}},He=me.exports,Ee;function Ne(){return Ee||(Ee=1,function(i,r){(function(s,f){i.exports=f()})(He,function(){var s={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(f,$,C){var z=$.prototype,N=z.format;C.en.formats=s,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var v=this.$locale().formats,U=function(W,G){return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(K,Q,X){var ne=X&&X.toUpperCase();return Q||G[X]||s[X]||G[ne].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ue,de,ae){return de||ae.slice(1)})})}(q,v===void 0?{}:v);return N.call(this,U)}}})}(me)),me.exports}var qe=Ne();const Ke=$e(qe);Z.extend(Ke);Date.prototype.isAfter=function(i,r){return Z(this).isAfter(i,r)};Date.prototype.isBefore=function(i,r){return Z(this).isBefore(i,r)};Date.prototype.format=function(i){return Z(this).format(i)};Date.prototype.isValid=function(){return Z(this).isValid()};Date.prototype.add=function(i,r){return Z(this).add(i,r).toDate()};Date.prototype.subtract=function(i,r){return Z(this).subtract(i,r).toDate()};Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()};Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()};Date.prototype.set=function(i,r){return Z(this).set(i,r).toDate()};Date.prototype.diff=function(i,r){return Z(this).diff(i,r)};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""};var Re=(i=>(i.opera="opera",i.firefox="firefox",i.safari="safari",i.ie="ie",i.edge="edge",i.edg="edg",i.electron="electron",i.chrome="chrome",i.iOsSafari="iOsSafari",i.edgiOs="edgiOs",i.headlessChrome="headlessChrome",i))(Re||{});const ye=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:576},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class Je{screenWidth=0;lastBreakpoint;resizeListener;breakpointChangeCallbacks=new Set;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;pendingWidth;pendingBreakpoint;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.breakpointChangeCallbacks.clear(),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getCurrentBreakpoint(){return this.lastBreakpoint}getCurrentScreenWidth(){return this.screenWidth}onBreakpointChange(r){this.breakpointChangeCallbacks.add(r)}offBreakpointChange(r){this.breakpointChangeCallbacks.delete(r)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let s=ye[0];for(const f of ye)f.screenWidth<=r&&(s=f);return s}isScreenGreaterThan(r){const s=this.getBreakpoint(r);return this.screenWidth>(s?.screenWidth??0)}isScreenSmallerThan(r){const s=this.getBreakpoint(r);return this.screenWidth<(s?.screenWidth??0)}getBreakpoint(r){return ye.find(s=>s.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof globalThis.InstallTrigger<"u"}isSafari(){return typeof window>"u"?!1:/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return typeof document>"u"?!1:!!document.documentMode}isEdge(){return typeof window>"u"?!1:!this.isIE()&&!!window.StyleMedia}isEdg(){return typeof navigator>"u"?!1:navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window>"u"?!1:!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&typeof document<"u"&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize=()=>{if(typeof window>"u")return;const r=window.innerWidth,s=this.getBreakpointBySize(r);this.lastBreakpoint?.breakpoint!==s?.breakpoint&&(this.lastBreakpoint=s,s&&this.breakpointChangeCallbacks.forEach(f=>f(s))),this.pendingWidth=r,this.pendingBreakpoint=s,this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.pendingBreakpoint&&this.onResizeCallbacks.forEach(f=>f(this.pendingWidth,this.pendingBreakpoint)),this.pendingWidth=void 0,this.pendingBreakpoint=void 0,this.emitTimeoutId=null},this.duplicateThresholdMs)}}class Qe{copy(r){return navigator.clipboard.writeText(r)}}var _e={exports:{}};/* @license
|
|
2
2
|
Papa Parse
|
|
3
3
|
v5.5.3
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
5
5
|
License: MIT
|
|
6
|
-
*/var
|
|
7
|
-
`),
|
|
8
|
-
`;for(var
|
|
9
|
-
`&&
|
|
10
|
-
`:"\r"}}function
|
|
6
|
+
*/var Ve=_e.exports,Oe;function Ze(){return Oe||(Oe=1,function(i,r){((s,f)=>{i.exports=f()})(Ve,function s(){var f=typeof self<"u"?self:typeof window<"u"?window:f!==void 0?f:{},$,C=!f.document&&!!f.postMessage,z=f.IS_PAPA_WORKER||!1,N={},q=0,v={};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(t){var n=ie(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new X(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var o=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<o){let b=this._config.newline;b||(g=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,g)),t=[...t.split(b).slice(o)].join(b)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(t))!==void 0&&(t=g),this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t,g=(this._partialLine="",this._handle.parse(o,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=g.meta.cursor,o=(this._finished||(this._partialLine=o.substring(t-this._baseIndex),this._baseIndex=t),g&&g.data&&(this._rowCount+=g.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),z)f.postMessage({results:g,workerId:v.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(t){R(this._config.error)?this._config.error(t):z&&this._config.error&&f.postMessage({workerId:v.WORKER_ID,error:t,finished:!1})}}function W(e){var t;(e=e||{}).chunkSize||(e.chunkSize=v.RemoteChunkSize),U.call(this,e),this._nextChunk=C?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(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),C||(t.onload=Y(this._chunkLoaded,this),t.onerror=Y(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!C),this._config.downloadRequestHeaders){var n,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+g));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}C&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function G(e){(e=e||{}).chunkSize||(e.chunkSize=v.LocalChunkSize),U.call(this,e);var t,n,o=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,o?((t=new FileReader).onload=Y(this._chunkLoaded,this),t.onerror=Y(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var g=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),g=n.call(g,this._start,b)),t.readAsText(g,this._config.encoding));o||this._chunkLoaded({target:{result:b}})},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(t.error)}}function K(e){var t;U.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,o;if(!this._finished)return n=this._config.chunkSize,t=n?(o=t.substring(0,n),t.substring(n)):(o=t,""),this._finished=!t,this.parseChunk(o)}}function Q(e){U.call(this,e=e||{});var t=[],n=!0,o=!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(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&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=Y(function(g){try{t.push(typeof g=="string"?g:g.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=Y(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=Y(function(){this._streamCleanUp(),o=!0,this._streamData("")},this),this._streamCleanUp=Y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function X(e){var t,n,o,g,b=Math.pow(2,53),m=-b,d=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\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,h=0,y=!1,p=!1,_=[],l={data:[],errors:[],meta:{}};function x(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function M(){if(l&&o&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines&&(l.data=l.data.filter(function(w){return!x(w)})),T()){let w=function(L,F){R(e.transformHeader)&&(L=e.transformHeader(L,F)),_.push(L)};if(l)if(Array.isArray(l.data[0])){for(var k=0;T()&&k<l.data.length;k++)l.data[k].forEach(w);l.data.splice(0,1)}else l.data.forEach(w)}function E(w,L){for(var F=e.header?{}:[],A=0;A<w.length;A++){var I=A,D=w[A],D=((V,S)=>(j=>(e.dynamicTypingFunction&&e.dynamicTyping[j]===void 0&&(e.dynamicTyping[j]=e.dynamicTypingFunction(j)),(e.dynamicTyping[j]||e.dynamicTyping)===!0))(V)?S==="true"||S==="TRUE"||S!=="false"&&S!=="FALSE"&&((j=>{if(d.test(j)&&(j=parseFloat(j),m<j&&j<b))return 1})(S)?parseFloat(S):c.test(S)?new Date(S):S===""?null:S):S)(I=e.header?A>=_.length?"__parsed_extra":_[A]:I,D=e.transform?e.transform(D,I):D);I==="__parsed_extra"?(F[I]=F[I]||[],F[I].push(D)):F[I]=D}return e.header&&(A>_.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+A,h+L):A<_.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+A,h+L)),F}var O;l&&(e.header||e.dynamicTyping||e.transform)&&(O=1,!l.data.length||Array.isArray(l.data[0])?(l.data=l.data.map(E),O=l.data.length):l.data=E(l.data,0),e.header&&l.meta&&(l.meta.fields=_),h+=O)}function T(){return e.header&&_.length===0}function B(k,E,O,w){k={type:k,code:E,message:O},w!==void 0&&(k.row=w),l.errors.push(k)}R(e.step)&&(g=e.step,e.step=function(k){l=k,T()?M():(M(),l.data.length!==0&&(u+=k.data.length,e.preview&&u>e.preview?n.abort():(l.data=l.data[0],g(l,a))))}),this.parse=function(k,E,O){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),o=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(k),l.meta.delimiter=e.delimiter):((w=((L,F,A,I,D)=>{var V,S,j,oe;D=D||[","," ","|",";",v.RECORD_SEP,v.UNIT_SEP];for(var he=0;he<D.length;he++){for(var ee,le=D[he],H=0,te=0,P=0,J=(j=void 0,new ue({comments:I,delimiter:le,newline:F,preview:10}).parse(L)),se=0;se<J.data.length;se++)A&&x(J.data[se])?P++:(ee=J.data[se].length,te+=ee,j===void 0?j=ee:0<ee&&(H+=Math.abs(ee-j),j=ee));0<J.data.length&&(te/=J.data.length-P),(S===void 0||H<=S)&&(oe===void 0||oe<te)&&1.99<te&&(S=H,V=le,oe=te)}return{successful:!!(e.delimiter=V),bestDelimiter:V}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(o=!0,e.delimiter=v.DefaultDelimiter),l.meta.delimiter=e.delimiter),ie(e));return e.preview&&e.header&&w.preview++,t=k,n=new ue(w),l=n.parse(t,E,O),M(),y?{meta:{paused:!0}}:l||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=R(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(y=!1,a.streamer.parseChunk(t,!0)):setTimeout(a.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),l.meta.aborted=!0,R(e.complete)&&e.complete(l),t=""},this.guessLineEndings=function(L,w){L=L.substring(0,1048576);var w=new RegExp(ne(w)+"([^]*?)"+ne(w),"gm"),O=(L=L.replace(w,"")).split("\r"),w=L.split(`
|
|
7
|
+
`),L=1<w.length&&w[0].length<O[0].length;if(O.length===1||L)return`
|
|
8
|
+
`;for(var F=0,A=0;A<O.length;A++)O[A][0]===`
|
|
9
|
+
`&&F++;return F>=O.length/2?`\r
|
|
10
|
+
`:"\r"}}function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ue(e){var t=(e=e||{}).delimiter,n=e.newline,o=e.comments,g=e.step,b=e.preview,m=e.fastMode,d=null,c=!1,a=e.quoteChar==null?'"':e.quoteChar,u=a;if(e.escapeChar!==void 0&&(u=e.escapeChar),(typeof t!="string"||-1<v.BAD_DELIMITERS.indexOf(t))&&(t=","),o===t)throw new Error("Comment character same as delimiter");o===!0?o="#":(typeof o!="string"||-1<v.BAD_DELIMITERS.indexOf(o))&&(o=!1),n!==`
|
|
11
11
|
`&&n!=="\r"&&n!==`\r
|
|
12
12
|
`&&(n=`
|
|
13
|
-
`);var
|
|
14
|
-
`,
|
|
15
|
-
`,'"',
|
|
13
|
+
`);var h=0,y=!1;this.parse=function(p,_,l){if(typeof p!="string")throw new Error("Input must be a string");var x=p.length,M=t.length,T=n.length,B=o.length,k=R(g),E=[],O=[],w=[],L=h=0;if(!p)return H();if(m||m!==!1&&p.indexOf(a)===-1){for(var F=p.split(n),A=0;A<F.length;A++){if(w=F[A],h+=w.length,A!==F.length-1)h+=n.length;else if(l)return H();if(!o||w.substring(0,B)!==o){if(k){if(E=[],oe(w.split(t)),te(),y)return H()}else oe(w.split(t));if(b&&b<=A)return E=E.slice(0,b),H(!0)}}return H()}for(var I=p.indexOf(t,h),D=p.indexOf(n,h),V=new RegExp(ne(u)+ne(a),"g"),S=p.indexOf(a,h);;)if(p[h]===a)for(S=h,h++;;){if((S=p.indexOf(a,S+1))===-1)return l||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:h}),ee();if(S===x-1)return ee(p.substring(h,S).replace(V,a));if(a===u&&p[S+1]===u)S++;else if(a===u||S===0||p[S-1]!==u){I!==-1&&I<S+1&&(I=p.indexOf(t,S+1));var j=he((D=D!==-1&&D<S+1?p.indexOf(n,S+1):D)===-1?I:Math.min(I,D));if(p.substr(S+1+j,M)===t){w.push(p.substring(h,S).replace(V,a)),p[h=S+1+j+M]!==a&&(S=p.indexOf(a,h)),I=p.indexOf(t,h),D=p.indexOf(n,h);break}if(j=he(D),p.substring(S+1+j,S+1+j+T)===n){if(w.push(p.substring(h,S).replace(V,a)),le(S+1+j+T),I=p.indexOf(t,h),S=p.indexOf(a,h),k&&(te(),y))return H();if(b&&E.length>=b)return H(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:h}),S++}}else if(o&&w.length===0&&p.substring(h,h+B)===o){if(D===-1)return H();h=D+T,D=p.indexOf(n,h),I=p.indexOf(t,h)}else if(I!==-1&&(I<D||D===-1))w.push(p.substring(h,I)),h=I+M,I=p.indexOf(t,h);else{if(D===-1)break;if(w.push(p.substring(h,D)),le(D+T),k&&(te(),y))return H();if(b&&E.length>=b)return H(!0)}return ee();function oe(P){E.push(P),L=h}function he(P){var J=0;return J=P!==-1&&(P=p.substring(S+1,P))&&P.trim()===""?P.length:J}function ee(P){return l||(P===void 0&&(P=p.substring(h)),w.push(P),h=x,oe(w),k&&te()),H()}function le(P){h=P,oe(w),w=[],D=p.indexOf(n,h)}function H(P){if(e.header&&!_&&E.length&&!c){var J=E[0],se=Object.create(null),ve=new Set(J);let ke=!1;for(let ce=0;ce<J.length;ce++){let re=J[ce];if(se[re=R(e.transformHeader)?e.transformHeader(re,ce):re]){let fe,be=se[re];for(;fe=re+"_"+be,be++,ve.has(fe););ve.add(fe),J[ce]=fe,se[re]++,ke=!0,(d=d===null?{}:d)[fe]=re}else se[re]=1,J[ce]=re;ve.add(re)}ke&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:E,errors:O,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:L+(_||0),renamedHeaders:d}}}function te(){g(H()),E=[],O=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return h}}function de(e){var t=e.data,n=N[t.workerId],o=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var g={abort:function(){o=!0,ae(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:pe,resume:pe};if(R(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},g),!o);b++);delete t.results}else R(n.userChunk)&&(n.userChunk(t.results,g,t.file),delete t.results)}t.finished&&!o&&ae(t.workerId,t.results)}function ae(e,t){var n=N[e];R(n.userComplete)&&n.userComplete(t),n.terminate(),delete N[e]}function pe(){throw new Error("Not implemented.")}function ie(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=ie(e[t]);return n}function Y(e,t){return function(){e.apply(t,arguments)}}function R(e){return typeof e=="function"}return v.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(R(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!R(t.transform)&&t.transform,!t.worker||!v.WORKERS_SUPPORTED)return n=null,v.NODE_STREAM_INPUT,typeof e=="string"?(e=(o=>o.charCodeAt(0)!==65279?o:o.slice(1))(e),n=new(t.download?W:K)(t)):e.readable===!0&&R(e.read)&&R(e.on)?n=new Q(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new G(t)),n.stream(e);(n=(()=>{var o;return!!v.WORKERS_SUPPORTED&&(o=(()=>{var g=f.URL||f.webkitURL||null,b=s.toString();return v.BLOB_URL||(v.BLOB_URL=g.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; ","(",b,")();"],{type:"text/javascript"})))})(),(o=new f.Worker(o)).onmessage=de,o.id=q++,N[o.id]=o)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=R(t.step),t.chunk=R(t.chunk),t.complete=R(t.complete),t.error=R(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},v.unparse=function(e,t){var n=!1,o=!0,g=",",b=`\r
|
|
14
|
+
`,m='"',d=m+m,c=!1,a=null,u=!1,h=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||v.BAD_DELIMITERS.filter(function(_){return t.delimiter.indexOf(_)!==-1}).length||(g=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(c=t.skipEmptyLines),typeof t.newline=="string"&&(b=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(o=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");a=t.columns}t.escapeChar!==void 0&&(d=t.escapeChar+m),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),new RegExp(ne(m),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,c);if(typeof e[0]=="object")return y(a||Object.keys(e[0]),e,c)}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])),y(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function y(_,l,x){var M="",T=(typeof _=="string"&&(_=JSON.parse(_)),typeof l=="string"&&(l=JSON.parse(l)),Array.isArray(_)&&0<_.length),B=!Array.isArray(l[0]);if(T&&o){for(var k=0;k<_.length;k++)0<k&&(M+=g),M+=p(_[k],k);0<l.length&&(M+=b)}for(var E=0;E<l.length;E++){var O=(T?_:l[E]).length,w=!1,L=T?Object.keys(l[E]).length===0:l[E].length===0;if(x&&!T&&(w=x==="greedy"?l[E].join("").trim()==="":l[E].length===1&&l[E][0].length===0),x==="greedy"&&T){for(var F=[],A=0;A<O;A++){var I=B?_[A]:A;F.push(l[E][I])}w=F.join("").trim()===""}if(!w){for(var D=0;D<O;D++){0<D&&!L&&(M+=g);var V=T&&B?_[D]:D;M+=p(l[E][V],D)}E<l.length-1&&(!x||0<O&&!L)&&(M+=b)}}return M}function p(_,l){var x,M;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):(M=!1,u&&typeof _=="string"&&u.test(_)&&(_="'"+_,M=!0),x=_.toString().replace(h,d),(M=M||n===!0||typeof n=="function"&&n(_,l)||Array.isArray(n)&&n[l]||((T,B)=>{for(var k=0;k<B.length;k++)if(-1<T.indexOf(B[k]))return!0;return!1})(x,v.BAD_DELIMITERS)||-1<x.indexOf(g)||x.charAt(0)===" "||x.charAt(x.length-1)===" ")?m+x+m:x)}},v.RECORD_SEP="",v.UNIT_SEP="",v.BYTE_ORDER_MARK="\uFEFF",v.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!C&&!!f.Worker,v.NODE_STREAM_INPUT=1,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=ue,v.ParserHandle=X,v.NetworkStreamer=W,v.FileStreamer=G,v.StringStreamer=K,v.ReadableStreamStreamer=Q,f.jQuery&&(($=f.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!($(this).prop("tagName").toUpperCase()==="INPUT"&&$(this).attr("type").toLowerCase()==="file"&&f.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:$.extend({},t)})}),o(),this;function o(){if(n.length===0)R(e.complete)&&e.complete();else{var b,m,d,c,a=n[0];if(R(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return b="AbortError",m=a.file,d=a.inputElem,c=u.reason,void(R(e.error)&&e.error({name:b},m,d,c));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=$.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var h=a.instanceConfig.complete;a.instanceConfig.complete=function(y){R(h)&&h(y,a.file,a.inputElem),g()},v.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),z&&(f.onmessage=function(e){e=e.data,v.WORKER_ID===void 0&&e&&(v.WORKER_ID=e.workerId),typeof e.input=="string"?f.postMessage({workerId:v.WORKER_ID,results:v.parse(e.input,e.config),finished:!0}):(f.File&&e.input instanceof File||e.input instanceof Object)&&(e=v.parse(e.input,e.config))&&f.postMessage({workerId:v.WORKER_ID,results:e,finished:!0})}),(W.prototype=Object.create(U.prototype)).constructor=W,(G.prototype=Object.create(U.prototype)).constructor=G,(K.prototype=Object.create(K.prototype)).constructor=K,(Q.prototype=Object.create(U.prototype)).constructor=Q,v})}(_e)),_e.exports}var xe=Ze();class Ge{readAsText(r){const s=new FileReader;return new Promise((f,$)=>{s.onload=C=>{f(C)},s.onerror=C=>{$(C)},s.readAsText(r)})}readAsBinaryString(r){const s=new FileReader;return new Promise((f,$)=>{s.onload=C=>{f(C)},s.onerror=C=>{$(C)},s.readAsBinaryString(r)})}readAsDataUrl(r){const s=new FileReader;return new Promise((f,$)=>{s.onload=C=>{f(C)},s.onerror=C=>$(C),s.readAsDataURL(r)})}unparse(r,s){return xe.unparse(r,s)}parse(r){return new Promise((s,f)=>{xe.parse(r,{header:!0,complete:$=>s($),error:$=>f($)})})}getFileExtension(r){let s="-";return/[.]/.exec(r)&&(s=`.${/[^.]+$/.exec(r)?.[0]}`),s}save(r,s,f){const $=new Blob([r],{type:f});De($,s)}}class Xe{set(r,s){localStorage.setItem(r,JSON.stringify(s))}get(r){let s=null;const f=localStorage.getItem(r);return f&&(s=JSON.parse(f)),s}remove(r){let s=!!this.get(r);return s&&localStorage.removeItem(r),s}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(s=>s.startsWith(r))}}var we=(i=>(i.log="log",i.info="info",i.warn="warn",i.debug="debug",i.error="error",i))(we||{});class et{logType=we;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...s){console[r].apply(console,s)}}class tt{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,s){this.localService.set(r,s)}remove(r){this.localService.remove(r)}}exports.BrowserService=Je;exports.BrowserType=Re;exports.ClipboardService=Qe;exports.EnumHelper=Fe;exports.FileService=Ge;exports.LocalService=Xe;exports.LogType=we;exports.LoggerService=et;exports.ScreenBreakpoints=ye;exports.TokenService=tt;exports.saveAs=De;exports.sortHelper=Me;
|