@oardi/ts-utils 0.0.29 → 0.0.31

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/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- function Xe(s) {
1
+ function Ge(s) {
2
2
  return navigator.clipboard.writeText(s);
3
3
  }
4
- function be(s) {
4
+ function ke(s) {
5
5
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
6
6
  }
7
7
  var _e = { exports: {} };
@@ -11,14 +11,14 @@ v5.5.3
11
11
  https://github.com/mholt/PapaParse
12
12
  License: MIT
13
13
  */
14
- var $e = _e.exports, De;
15
- function Ce() {
16
- return De || (De = 1, (function(s, r) {
17
- ((i, c) => {
18
- s.exports = c();
14
+ var $e = _e.exports, Ee;
15
+ function Re() {
16
+ return Ee || (Ee = 1, (function(s, r) {
17
+ ((i, f) => {
18
+ s.exports = f();
19
19
  })($e, function i() {
20
- var c = typeof self < "u" ? self : typeof window < "u" ? window : c !== void 0 ? c : {}, v, $ = !c.document && !!c.postMessage, L = c.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
21
- function N(e) {
20
+ var f = typeof self < "u" ? self : typeof window < "u" ? window : f !== void 0 ? f : {}, b, $ = !f.document && !!f.postMessage, L = f.IS_PAPA_WORKER || !1, Y = {}, N = 0, w = {};
21
+ function q(e) {
22
22
  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) {
23
23
  var n = se(t);
24
24
  n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new ee(n), (this._handle.streamer = this)._config = n;
@@ -28,24 +28,24 @@ function Ce() {
28
28
  let S = this._config.newline;
29
29
  S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(t, g)), t = [...t.split(S).slice(o)].join(S);
30
30
  }
31
- this.isFirstChunk && R(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
31
+ this.isFirstChunk && C(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
32
32
  var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
33
33
  if (!this._handle.paused() && !this._handle.aborted()) {
34
- 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), L) c.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
35
- else if (R(this._config.chunk) && !n) {
34
+ 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), L) f.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
35
+ else if (C(this._config.chunk) && !n) {
36
36
  if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
37
37
  this._completeResults = g = void 0;
38
38
  }
39
- 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;
39
+ 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 || !C(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;
40
40
  }
41
41
  this._halted = !0;
42
42
  }, this._sendError = function(t) {
43
- R(this._config.error) ? this._config.error(t) : L && this._config.error && c.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
43
+ C(this._config.error) ? this._config.error(t) : L && this._config.error && f.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
44
44
  };
45
45
  }
46
- function W(e) {
46
+ function B(e) {
47
47
  var t;
48
- (e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = $ ? function() {
48
+ (e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), q.call(this, e), this._nextChunk = $ ? function() {
49
49
  this._readChunk(), this._chunkLoaded();
50
50
  } : function() {
51
51
  this._readChunk();
@@ -54,7 +54,7 @@ function Ce() {
54
54
  }, this._readChunk = function() {
55
55
  if (this._finished) this._chunkLoaded();
56
56
  else {
57
- if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), $ || (t.onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !$), this._config.downloadRequestHeaders) {
57
+ if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), $ || (t.onload = W(this._chunkLoaded, this), t.onerror = W(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !$), this._config.downloadRequestHeaders) {
58
58
  var n, o = this._config.downloadRequestHeaders;
59
59
  for (n in o) t.setRequestHeader(n, o[n]);
60
60
  }
@@ -74,10 +74,10 @@ function Ce() {
74
74
  };
75
75
  }
76
76
  function X(e) {
77
- (e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), N.call(this, e);
77
+ (e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), q.call(this, e);
78
78
  var t, n, o = typeof FileReader < "u";
79
79
  this.stream = function(g) {
80
- this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
80
+ this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload = W(this._chunkLoaded, this), t.onerror = W(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
81
81
  }, this._nextChunk = function() {
82
82
  this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
83
83
  }, this._readChunk = function() {
@@ -91,7 +91,7 @@ function Ce() {
91
91
  }
92
92
  function K(e) {
93
93
  var t;
94
- N.call(this, e = e || {}), this.stream = function(n) {
94
+ q.call(this, e = e || {}), this.stream = function(n) {
95
95
  return t = n, this._nextChunk();
96
96
  }, this._nextChunk = function() {
97
97
  var n, o;
@@ -99,216 +99,216 @@ function Ce() {
99
99
  };
100
100
  }
101
101
  function V(e) {
102
- N.call(this, e = e || {});
102
+ q.call(this, e = e || {});
103
103
  var t = [], n = !0, o = !1;
104
104
  this.pause = function() {
105
- N.prototype.pause.apply(this, arguments), this._input.pause();
105
+ q.prototype.pause.apply(this, arguments), this._input.pause();
106
106
  }, this.resume = function() {
107
- N.prototype.resume.apply(this, arguments), this._input.resume();
107
+ q.prototype.resume.apply(this, arguments), this._input.resume();
108
108
  }, this.stream = function(g) {
109
109
  this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
110
110
  }, this._checkIsFinished = function() {
111
111
  o && t.length === 1 && (this._finished = !0);
112
112
  }, this._nextChunk = function() {
113
113
  this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
114
- }, this._streamData = q(function(g) {
114
+ }, this._streamData = W(function(g) {
115
115
  try {
116
116
  t.push(typeof g == "string" ? g : g.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
117
117
  } catch (S) {
118
118
  this._streamError(S);
119
119
  }
120
- }, this), this._streamError = q(function(g) {
120
+ }, this), this._streamError = W(function(g) {
121
121
  this._streamCleanUp(), this._sendError(g);
122
- }, this), this._streamEnd = q(function() {
122
+ }, this), this._streamEnd = W(function() {
123
123
  this._streamCleanUp(), o = !0, this._streamData("");
124
- }, this), this._streamCleanUp = q(function() {
124
+ }, this), this._streamCleanUp = W(function() {
125
125
  this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
126
126
  }, this);
127
127
  }
128
128
  function ee(e) {
129
- var t, n, o, g, S = Math.pow(2, 53), m = -S, f = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, a = this, u = 0, h = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
130
- function O(b) {
131
- return e.skipEmptyLines === "greedy" ? b.join("").trim() === "" : b.length === 1 && b[0].length === 0;
129
+ var t, n, o, g, S = Math.pow(2, 53), m = -S, h = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, a = this, u = 0, c = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
130
+ function O(k) {
131
+ return e.skipEmptyLines === "greedy" ? k.join("").trim() === "" : k.length === 1 && k[0].length === 0;
132
132
  }
133
- function C() {
134
- if (d && o && (j("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (d.data = d.data.filter(function(k) {
135
- return !O(k);
136
- })), B()) {
137
- let k = function(A, F) {
138
- R(e.transformHeader) && (A = e.transformHeader(A, F)), _.push(A);
133
+ function R() {
134
+ if (d && o && (U("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (d.data = d.data.filter(function(v) {
135
+ return !O(v);
136
+ })), F()) {
137
+ let v = function(A, z) {
138
+ C(e.transformHeader) && (A = e.transformHeader(A, z)), _.push(A);
139
139
  };
140
140
  if (d) if (Array.isArray(d.data[0])) {
141
- for (var b = 0; B() && b < d.data.length; b++) d.data[b].forEach(k);
141
+ for (var k = 0; F() && k < d.data.length; k++) d.data[k].forEach(v);
142
142
  d.data.splice(0, 1);
143
- } else d.data.forEach(k);
143
+ } else d.data.forEach(v);
144
144
  }
145
- function D(k, A) {
146
- for (var F = e.header ? {} : [], T = 0; T < k.length; T++) {
147
- var I = T, M = k[T], M = ((G, x) => ((z) => (e.dynamicTypingFunction && e.dynamicTyping[z] === void 0 && (e.dynamicTyping[z] = e.dynamicTypingFunction(z)), (e.dynamicTyping[z] || e.dynamicTyping) === !0))(G) ? x === "true" || x === "TRUE" || x !== "false" && x !== "FALSE" && (((z) => {
148
- if (f.test(z) && (z = parseFloat(z), m < z && z < S))
145
+ function E(v, A) {
146
+ for (var z = e.header ? {} : [], T = 0; T < v.length; T++) {
147
+ var I = T, M = v[T], M = ((G, D) => ((j) => (e.dynamicTypingFunction && e.dynamicTyping[j] === void 0 && (e.dynamicTyping[j] = e.dynamicTypingFunction(j)), (e.dynamicTyping[j] || e.dynamicTyping) === !0))(G) ? D === "true" || D === "TRUE" || D !== "false" && D !== "FALSE" && (((j) => {
148
+ if (h.test(j) && (j = parseFloat(j), m < j && j < S))
149
149
  return 1;
150
- })(x) ? parseFloat(x) : l.test(x) ? new Date(x) : x === "" ? null : x) : x)(I = e.header ? T >= _.length ? "__parsed_extra" : _[T] : I, M = e.transform ? e.transform(M, I) : M);
151
- I === "__parsed_extra" ? (F[I] = F[I] || [], F[I].push(M)) : F[I] = M;
150
+ })(D) ? parseFloat(D) : l.test(D) ? new Date(D) : D === "" ? null : D) : D)(I = e.header ? T >= _.length ? "__parsed_extra" : _[T] : I, M = e.transform ? e.transform(M, I) : M);
151
+ I === "__parsed_extra" ? (z[I] = z[I] || [], z[I].push(M)) : z[I] = M;
152
152
  }
153
- return e.header && (T > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + T, h + A) : T < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + T, h + A)), F;
153
+ return e.header && (T > _.length ? U("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + T, c + A) : T < _.length && U("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + T, c + A)), z;
154
154
  }
155
- var E;
156
- d && (e.header || e.dynamicTyping || e.transform) && (E = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(D), E = d.data.length) : d.data = D(d.data, 0), e.header && d.meta && (d.meta.fields = _), h += E);
155
+ var x;
156
+ d && (e.header || e.dynamicTyping || e.transform) && (x = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(E), x = d.data.length) : d.data = E(d.data, 0), e.header && d.meta && (d.meta.fields = _), c += x);
157
157
  }
158
- function B() {
158
+ function F() {
159
159
  return e.header && _.length === 0;
160
160
  }
161
- function j(b, D, E, k) {
162
- b = { type: b, code: D, message: E }, k !== void 0 && (b.row = k), d.errors.push(b);
161
+ function U(k, E, x, v) {
162
+ k = { type: k, code: E, message: x }, v !== void 0 && (k.row = v), d.errors.push(k);
163
163
  }
164
- R(e.step) && (g = e.step, e.step = function(b) {
165
- d = b, B() ? C() : (C(), d.data.length !== 0 && (u += b.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
166
- }), this.parse = function(b, D, E) {
167
- var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(b, k)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(b), d.meta.delimiter = e.delimiter) : ((k = ((A, F, T, I, M) => {
168
- var G, x, z, ue;
164
+ C(e.step) && (g = e.step, e.step = function(k) {
165
+ d = k, F() ? R() : (R(), d.data.length !== 0 && (u += k.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
166
+ }), this.parse = function(k, E, x) {
167
+ var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(k, v)), o = !1, e.delimiter ? C(e.delimiter) && (e.delimiter = e.delimiter(k), d.meta.delimiter = e.delimiter) : ((v = ((A, z, T, I, M) => {
168
+ var G, D, j, ue;
169
169
  M = M || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
170
- for (var ce = 0; ce < M.length; ce++) {
171
- for (var te, pe = M[ce], H = 0, re = 0, U = 0, Q = (z = void 0, new he({ comments: I, delimiter: pe, newline: F, preview: 10 }).parse(A)), ae = 0; ae < Q.data.length; ae++) T && O(Q.data[ae]) ? U++ : (te = Q.data[ae].length, re += te, z === void 0 ? z = te : 0 < te && (H += Math.abs(te - z), z = te));
172
- 0 < Q.data.length && (re /= Q.data.length - U), (x === void 0 || H <= x) && (ue === void 0 || ue < re) && 1.99 < re && (x = H, G = pe, ue = re);
170
+ for (var le = 0; le < M.length; le++) {
171
+ for (var te, pe = M[le], H = 0, re = 0, P = 0, Q = (j = void 0, new ce({ comments: I, delimiter: pe, newline: z, preview: 10 }).parse(A)), ae = 0; ae < Q.data.length; ae++) T && O(Q.data[ae]) ? P++ : (te = Q.data[ae].length, re += te, j === void 0 ? j = te : 0 < te && (H += Math.abs(te - j), j = te));
172
+ 0 < Q.data.length && (re /= Q.data.length - P), (D === void 0 || H <= D) && (ue === void 0 || ue < re) && 1.99 < re && (D = H, G = pe, ue = re);
173
173
  }
174
174
  return { successful: !!(e.delimiter = G), bestDelimiter: G };
175
- })(b, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = k.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
176
- return e.preview && e.header && k.preview++, t = b, n = new he(k), d = n.parse(t, D, E), C(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
175
+ })(k, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = v.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
176
+ return e.preview && e.header && v.preview++, t = k, n = new ce(v), d = n.parse(t, E, x), R(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
177
177
  }, this.paused = function() {
178
178
  return y;
179
179
  }, this.pause = function() {
180
- y = !0, n.abort(), t = R(e.chunk) ? "" : t.substring(n.getCharIndex());
180
+ y = !0, n.abort(), t = C(e.chunk) ? "" : t.substring(n.getCharIndex());
181
181
  }, this.resume = function() {
182
182
  a.streamer._halted ? (y = !1, a.streamer.parseChunk(t, !0)) : setTimeout(a.resume, 3);
183
183
  }, this.aborted = function() {
184
184
  return p;
185
185
  }, this.abort = function() {
186
- p = !0, n.abort(), d.meta.aborted = !0, R(e.complete) && e.complete(d), t = "";
187
- }, this.guessLineEndings = function(A, k) {
186
+ p = !0, n.abort(), d.meta.aborted = !0, C(e.complete) && e.complete(d), t = "";
187
+ }, this.guessLineEndings = function(A, v) {
188
188
  A = A.substring(0, 1048576);
189
- var k = new RegExp(ie(k) + "([^]*?)" + ie(k), "gm"), E = (A = A.replace(k, "")).split("\r"), k = A.split(`
190
- `), A = 1 < k.length && k[0].length < E[0].length;
191
- if (E.length === 1 || A) return `
189
+ var v = new RegExp(ie(v) + "([^]*?)" + ie(v), "gm"), x = (A = A.replace(v, "")).split("\r"), v = A.split(`
190
+ `), A = 1 < v.length && v[0].length < x[0].length;
191
+ if (x.length === 1 || A) return `
192
192
  `;
193
- for (var F = 0, T = 0; T < E.length; T++) E[T][0] === `
194
- ` && F++;
195
- return F >= E.length / 2 ? `\r
193
+ for (var z = 0, T = 0; T < x.length; T++) x[T][0] === `
194
+ ` && z++;
195
+ return z >= x.length / 2 ? `\r
196
196
  ` : "\r";
197
197
  };
198
198
  }
199
199
  function ie(e) {
200
200
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
201
201
  }
202
- function he(e) {
203
- var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, f = null, l = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
202
+ function ce(e) {
203
+ var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, h = null, l = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
204
204
  if (e.escapeChar !== void 0 && (u = e.escapeChar), (typeof t != "string" || -1 < w.BAD_DELIMITERS.indexOf(t)) && (t = ","), o === t) throw new Error("Comment character same as delimiter");
205
205
  o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
206
206
  ` && n !== "\r" && n !== `\r
207
207
  ` && (n = `
208
208
  `);
209
- var h = 0, y = !1;
209
+ var c = 0, y = !1;
210
210
  this.parse = function(p, _, d) {
211
211
  if (typeof p != "string") throw new Error("Input must be a string");
212
- var O = p.length, C = t.length, B = n.length, j = o.length, b = R(g), D = [], E = [], k = [], A = h = 0;
212
+ var O = p.length, R = t.length, F = n.length, U = o.length, k = C(g), E = [], x = [], v = [], A = c = 0;
213
213
  if (!p) return H();
214
214
  if (m || m !== !1 && p.indexOf(a) === -1) {
215
- for (var F = p.split(n), T = 0; T < F.length; T++) {
216
- if (k = F[T], h += k.length, T !== F.length - 1) h += n.length;
215
+ for (var z = p.split(n), T = 0; T < z.length; T++) {
216
+ if (v = z[T], c += v.length, T !== z.length - 1) c += n.length;
217
217
  else if (d) return H();
218
- if (!o || k.substring(0, j) !== o) {
219
- if (b) {
220
- if (D = [], ue(k.split(t)), re(), y) return H();
221
- } else ue(k.split(t));
222
- if (S && S <= T) return D = D.slice(0, S), H(!0);
218
+ if (!o || v.substring(0, U) !== o) {
219
+ if (k) {
220
+ if (E = [], ue(v.split(t)), re(), y) return H();
221
+ } else ue(v.split(t));
222
+ if (S && S <= T) return E = E.slice(0, S), H(!0);
223
223
  }
224
224
  }
225
225
  return H();
226
226
  }
227
- for (var I = p.indexOf(t, h), M = p.indexOf(n, h), G = new RegExp(ie(u) + ie(a), "g"), x = p.indexOf(a, h); ; ) if (p[h] === a) for (x = h, h++; ; ) {
228
- if ((x = p.indexOf(a, x + 1)) === -1) return d || E.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: D.length, index: h }), te();
229
- if (x === O - 1) return te(p.substring(h, x).replace(G, a));
230
- if (a === u && p[x + 1] === u) x++;
231
- else if (a === u || x === 0 || p[x - 1] !== u) {
232
- I !== -1 && I < x + 1 && (I = p.indexOf(t, x + 1));
233
- var z = ce((M = M !== -1 && M < x + 1 ? p.indexOf(n, x + 1) : M) === -1 ? I : Math.min(I, M));
234
- if (p.substr(x + 1 + z, C) === t) {
235
- k.push(p.substring(h, x).replace(G, a)), p[h = x + 1 + z + C] !== a && (x = p.indexOf(a, h)), I = p.indexOf(t, h), M = p.indexOf(n, h);
227
+ for (var I = p.indexOf(t, c), M = p.indexOf(n, c), G = new RegExp(ie(u) + ie(a), "g"), D = p.indexOf(a, c); ; ) if (p[c] === a) for (D = c, c++; ; ) {
228
+ if ((D = p.indexOf(a, D + 1)) === -1) return d || x.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: c }), te();
229
+ if (D === O - 1) return te(p.substring(c, D).replace(G, a));
230
+ if (a === u && p[D + 1] === u) D++;
231
+ else if (a === u || D === 0 || p[D - 1] !== u) {
232
+ I !== -1 && I < D + 1 && (I = p.indexOf(t, D + 1));
233
+ var j = le((M = M !== -1 && M < D + 1 ? p.indexOf(n, D + 1) : M) === -1 ? I : Math.min(I, M));
234
+ if (p.substr(D + 1 + j, R) === t) {
235
+ v.push(p.substring(c, D).replace(G, a)), p[c = D + 1 + j + R] !== a && (D = p.indexOf(a, c)), I = p.indexOf(t, c), M = p.indexOf(n, c);
236
236
  break;
237
237
  }
238
- if (z = ce(M), p.substring(x + 1 + z, x + 1 + z + B) === n) {
239
- if (k.push(p.substring(h, x).replace(G, a)), pe(x + 1 + z + B), I = p.indexOf(t, h), x = p.indexOf(a, h), b && (re(), y)) return H();
240
- if (S && D.length >= S) return H(!0);
238
+ if (j = le(M), p.substring(D + 1 + j, D + 1 + j + F) === n) {
239
+ if (v.push(p.substring(c, D).replace(G, a)), pe(D + 1 + j + F), I = p.indexOf(t, c), D = p.indexOf(a, c), k && (re(), y)) return H();
240
+ if (S && E.length >= S) return H(!0);
241
241
  break;
242
242
  }
243
- E.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index: h }), x++;
243
+ x.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: E.length, index: c }), D++;
244
244
  }
245
245
  }
246
- else if (o && k.length === 0 && p.substring(h, h + j) === o) {
246
+ else if (o && v.length === 0 && p.substring(c, c + U) === o) {
247
247
  if (M === -1) return H();
248
- h = M + B, M = p.indexOf(n, h), I = p.indexOf(t, h);
249
- } else if (I !== -1 && (I < M || M === -1)) k.push(p.substring(h, I)), h = I + C, I = p.indexOf(t, h);
248
+ c = M + F, M = p.indexOf(n, c), I = p.indexOf(t, c);
249
+ } else if (I !== -1 && (I < M || M === -1)) v.push(p.substring(c, I)), c = I + R, I = p.indexOf(t, c);
250
250
  else {
251
251
  if (M === -1) break;
252
- if (k.push(p.substring(h, M)), pe(M + B), b && (re(), y)) return H();
253
- if (S && D.length >= S) return H(!0);
252
+ if (v.push(p.substring(c, M)), pe(M + F), k && (re(), y)) return H();
253
+ if (S && E.length >= S) return H(!0);
254
254
  }
255
255
  return te();
256
- function ue(U) {
257
- D.push(U), A = h;
256
+ function ue(P) {
257
+ E.push(P), A = c;
258
258
  }
259
- function ce(U) {
259
+ function le(P) {
260
260
  var Q = 0;
261
- return Q = U !== -1 && (U = p.substring(x + 1, U)) && U.trim() === "" ? U.length : Q;
261
+ return Q = P !== -1 && (P = p.substring(D + 1, P)) && P.trim() === "" ? P.length : Q;
262
262
  }
263
- function te(U) {
264
- return d || (U === void 0 && (U = p.substring(h)), k.push(U), h = O, ue(k), b && re()), H();
263
+ function te(P) {
264
+ return d || (P === void 0 && (P = p.substring(c)), v.push(P), c = O, ue(v), k && re()), H();
265
265
  }
266
- function pe(U) {
267
- h = U, ue(k), k = [], M = p.indexOf(n, h);
266
+ function pe(P) {
267
+ c = P, ue(v), v = [], M = p.indexOf(n, c);
268
268
  }
269
- function H(U) {
270
- if (e.header && !_ && D.length && !l) {
271
- var Q = D[0], ae = /* @__PURE__ */ Object.create(null), ve = new Set(Q);
269
+ function H(P) {
270
+ if (e.header && !_ && E.length && !l) {
271
+ var Q = E[0], ae = /* @__PURE__ */ Object.create(null), be = new Set(Q);
272
272
  let Se = !1;
273
- for (let le = 0; le < Q.length; le++) {
274
- let ne = Q[le];
275
- if (ae[ne = R(e.transformHeader) ? e.transformHeader(ne, le) : ne]) {
276
- let ge, xe = ae[ne];
277
- for (; ge = ne + "_" + xe, xe++, ve.has(ge); ) ;
278
- ve.add(ge), Q[le] = ge, ae[ne]++, Se = !0, (f = f === null ? {} : f)[ge] = ne;
279
- } else ae[ne] = 1, Q[le] = ne;
280
- ve.add(ne);
273
+ for (let fe = 0; fe < Q.length; fe++) {
274
+ let ne = Q[fe];
275
+ if (ae[ne = C(e.transformHeader) ? e.transformHeader(ne, fe) : ne]) {
276
+ let ge, De = ae[ne];
277
+ for (; ge = ne + "_" + De, De++, be.has(ge); ) ;
278
+ be.add(ge), Q[fe] = ge, ae[ne]++, Se = !0, (h = h === null ? {} : h)[ge] = ne;
279
+ } else ae[ne] = 1, Q[fe] = ne;
280
+ be.add(ne);
281
281
  }
282
282
  Se && console.warn("Duplicate headers found and renamed."), l = !0;
283
283
  }
284
- return { data: D, errors: E, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: A + (_ || 0), renamedHeaders: f } };
284
+ return { data: E, errors: x, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!P, cursor: A + (_ || 0), renamedHeaders: h } };
285
285
  }
286
286
  function re() {
287
- g(H()), D = [], E = [];
287
+ g(H()), E = [], x = [];
288
288
  }
289
289
  }, this.abort = function() {
290
290
  y = !0;
291
291
  }, this.getCharIndex = function() {
292
- return h;
292
+ return c;
293
293
  };
294
294
  }
295
295
  function de(e) {
296
- var t = e.data, n = P[t.workerId], o = !1;
296
+ var t = e.data, n = Y[t.workerId], o = !1;
297
297
  if (t.error) n.userError(t.error, t.file);
298
298
  else if (t.results && t.results.data) {
299
299
  var g = { abort: function() {
300
300
  o = !0, oe(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
301
301
  }, pause: ye, resume: ye };
302
- if (R(n.userStep)) {
302
+ if (C(n.userStep)) {
303
303
  for (var S = 0; S < t.results.data.length && (n.userStep({ data: t.results.data[S], errors: t.results.errors, meta: t.results.meta }, g), !o); S++) ;
304
304
  delete t.results;
305
- } else R(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
305
+ } else C(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
306
306
  }
307
307
  t.finished && !o && oe(t.workerId, t.results);
308
308
  }
309
309
  function oe(e, t) {
310
- var n = P[e];
311
- R(n.userComplete) && n.userComplete(t), n.terminate(), delete P[e];
310
+ var n = Y[e];
311
+ C(n.userComplete) && n.userComplete(t), n.terminate(), delete Y[e];
312
312
  }
313
313
  function ye() {
314
314
  throw new Error("Not implemented.");
@@ -319,27 +319,27 @@ function Ce() {
319
319
  for (t in e) n[t] = se(e[t]);
320
320
  return n;
321
321
  }
322
- function q(e, t) {
322
+ function W(e, t) {
323
323
  return function() {
324
324
  e.apply(t, arguments);
325
325
  };
326
326
  }
327
- function R(e) {
327
+ function C(e) {
328
328
  return typeof e == "function";
329
329
  }
330
330
  return w.parse = function(e, t) {
331
331
  var n = (t = t || {}).dynamicTyping || !1;
332
- if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.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 V(t) : (c.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
332
+ if (C(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!C(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? B : K)(t)) : e.readable === !0 && C(e.read) && C(e.on) ? n = new V(t) : (f.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
333
333
  (n = (() => {
334
334
  var o;
335
335
  return !!w.WORKERS_SUPPORTED && (o = (() => {
336
- var g = c.URL || c.webkitURL || null, S = i.toString();
336
+ var g = f.URL || f.webkitURL || null, S = i.toString();
337
337
  return w.BLOB_URL || (w.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; ", "(", S, ")();"], { type: "text/javascript" })));
338
- })(), (o = new c.Worker(o)).onmessage = de, o.id = Y++, P[o.id] = o);
339
- })()).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 });
338
+ })(), (o = new f.Worker(o)).onmessage = de, o.id = N++, Y[o.id] = o);
339
+ })()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = C(t.step), t.chunk = C(t.chunk), t.complete = C(t.complete), t.error = C(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
340
340
  }, w.unparse = function(e, t) {
341
341
  var n = !1, o = !0, g = ",", S = `\r
342
- `, m = '"', f = m + m, l = !1, a = null, u = !1, h = ((() => {
342
+ `, m = '"', h = m + m, l = !1, a = null, u = !1, c = ((() => {
343
343
  if (typeof t == "object") {
344
344
  if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
345
345
  return t.delimiter.indexOf(_) !== -1;
@@ -347,7 +347,7 @@ function Ce() {
347
347
  if (t.columns.length === 0) throw new Error("Option columns is empty");
348
348
  a = t.columns;
349
349
  }
350
- t.escapeChar !== void 0 && (f = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
350
+ t.escapeChar !== void 0 && (h = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
351
351
  }
352
352
  })(), new RegExp(ie(m), "g"));
353
353
  if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
@@ -356,106 +356,106 @@ function Ce() {
356
356
  } 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 || [], l);
357
357
  throw new Error("Unable to serialize unrecognized input");
358
358
  function y(_, d, O) {
359
- var C = "", B = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), j = !Array.isArray(d[0]);
360
- if (B && o) {
361
- for (var b = 0; b < _.length; b++) 0 < b && (C += g), C += p(_[b], b);
362
- 0 < d.length && (C += S);
359
+ var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), U = !Array.isArray(d[0]);
360
+ if (F && o) {
361
+ for (var k = 0; k < _.length; k++) 0 < k && (R += g), R += p(_[k], k);
362
+ 0 < d.length && (R += S);
363
363
  }
364
- for (var D = 0; D < d.length; D++) {
365
- var E = (B ? _ : d[D]).length, k = !1, A = B ? Object.keys(d[D]).length === 0 : d[D].length === 0;
366
- if (O && !B && (k = O === "greedy" ? d[D].join("").trim() === "" : d[D].length === 1 && d[D][0].length === 0), O === "greedy" && B) {
367
- for (var F = [], T = 0; T < E; T++) {
368
- var I = j ? _[T] : T;
369
- F.push(d[D][I]);
364
+ for (var E = 0; E < d.length; E++) {
365
+ var x = (F ? _ : d[E]).length, v = !1, A = F ? Object.keys(d[E]).length === 0 : d[E].length === 0;
366
+ if (O && !F && (v = O === "greedy" ? d[E].join("").trim() === "" : d[E].length === 1 && d[E][0].length === 0), O === "greedy" && F) {
367
+ for (var z = [], T = 0; T < x; T++) {
368
+ var I = U ? _[T] : T;
369
+ z.push(d[E][I]);
370
370
  }
371
- k = F.join("").trim() === "";
371
+ v = z.join("").trim() === "";
372
372
  }
373
- if (!k) {
374
- for (var M = 0; M < E; M++) {
375
- 0 < M && !A && (C += g);
376
- var G = B && j ? _[M] : M;
377
- C += p(d[D][G], M);
373
+ if (!v) {
374
+ for (var M = 0; M < x; M++) {
375
+ 0 < M && !A && (R += g);
376
+ var G = F && U ? _[M] : M;
377
+ R += p(d[E][G], M);
378
378
  }
379
- D < d.length - 1 && (!O || 0 < E && !A) && (C += S);
379
+ E < d.length - 1 && (!O || 0 < x && !A) && (R += S);
380
380
  }
381
381
  }
382
- return C;
382
+ return R;
383
383
  }
384
384
  function p(_, d) {
385
- var O, C;
386
- return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (C = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, C = !0), O = _.toString().replace(h, f), (C = C || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((B, j) => {
387
- for (var b = 0; b < j.length; b++) if (-1 < B.indexOf(j[b])) return !0;
385
+ var O, R;
386
+ return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0), O = _.toString().replace(c, h), (R = R || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((F, U) => {
387
+ for (var k = 0; k < U.length; k++) if (-1 < F.indexOf(U[k])) return !0;
388
388
  return !1;
389
389
  })(O, w.BAD_DELIMITERS) || -1 < O.indexOf(g) || O.charAt(0) === " " || O.charAt(O.length - 1) === " ") ? m + O + m : O);
390
390
  }
391
391
  }, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
392
- `, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!c.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = he, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, c.jQuery && ((v = c.jQuery).fn.parse = function(e) {
392
+ `, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!f.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ce, w.ParserHandle = ee, w.NetworkStreamer = B, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, f.jQuery && ((b = f.jQuery).fn.parse = function(e) {
393
393
  var t = e.config || {}, n = [];
394
394
  return this.each(function(S) {
395
- if (!(v(this).prop("tagName").toUpperCase() === "INPUT" && v(this).attr("type").toLowerCase() === "file" && c.FileReader) || !this.files || this.files.length === 0) return !0;
396
- for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: v.extend({}, t) });
395
+ if (!(b(this).prop("tagName").toUpperCase() === "INPUT" && b(this).attr("type").toLowerCase() === "file" && f.FileReader) || !this.files || this.files.length === 0) return !0;
396
+ for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: b.extend({}, t) });
397
397
  }), o(), this;
398
398
  function o() {
399
- if (n.length === 0) R(e.complete) && e.complete();
399
+ if (n.length === 0) C(e.complete) && e.complete();
400
400
  else {
401
- var S, m, f, l, a = n[0];
402
- if (R(e.before)) {
401
+ var S, m, h, l, a = n[0];
402
+ if (C(e.before)) {
403
403
  var u = e.before(a.file, a.inputElem);
404
404
  if (typeof u == "object") {
405
- if (u.action === "abort") return S = "AbortError", m = a.file, f = a.inputElem, l = u.reason, void (R(e.error) && e.error({ name: S }, m, f, l));
405
+ if (u.action === "abort") return S = "AbortError", m = a.file, h = a.inputElem, l = u.reason, void (C(e.error) && e.error({ name: S }, m, h, l));
406
406
  if (u.action === "skip") return void g();
407
- typeof u.config == "object" && (a.instanceConfig = v.extend(a.instanceConfig, u.config));
407
+ typeof u.config == "object" && (a.instanceConfig = b.extend(a.instanceConfig, u.config));
408
408
  } else if (u === "skip") return void g();
409
409
  }
410
- var h = a.instanceConfig.complete;
410
+ var c = a.instanceConfig.complete;
411
411
  a.instanceConfig.complete = function(y) {
412
- R(h) && h(y, a.file, a.inputElem), g();
412
+ C(c) && c(y, a.file, a.inputElem), g();
413
413
  }, w.parse(a.file, a.instanceConfig);
414
414
  }
415
415
  }
416
416
  function g() {
417
417
  n.splice(0, 1), o();
418
418
  }
419
- }), L && (c.onmessage = function(e) {
420
- e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? c.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (c.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && c.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
421
- }), (W.prototype = Object.create(N.prototype)).constructor = W, (X.prototype = Object.create(N.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(N.prototype)).constructor = V, w;
419
+ }), L && (f.onmessage = function(e) {
420
+ e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? f.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (f.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && f.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
421
+ }), (B.prototype = Object.create(q.prototype)).constructor = B, (X.prototype = Object.create(q.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(q.prototype)).constructor = V, w;
422
422
  });
423
423
  })(_e)), _e.exports;
424
424
  }
425
- var Re = Ce();
426
- const Ae = /* @__PURE__ */ be(Re), { parse: Te, unparse: Ie } = Ae;
427
- class et {
425
+ var Ce = Re();
426
+ const Ae = /* @__PURE__ */ ke(Ce), { parse: Te, unparse: Ie } = Ae;
427
+ class Xe {
428
428
  static unparse(r, i) {
429
429
  return Ie(r, i);
430
430
  }
431
431
  static parse(r) {
432
- return new Promise((i, c) => {
432
+ return new Promise((i, f) => {
433
433
  Te(r, {
434
434
  header: !0,
435
- complete: (v) => i(v),
436
- error: (v) => c(v)
435
+ complete: (b) => i(b),
436
+ error: (b) => f(b)
437
437
  });
438
438
  });
439
439
  }
440
440
  }
441
441
  async function Le(s, r, i) {
442
- const c = i?.mimeType ?? Fe(r), v = Be(s, c);
442
+ const f = i?.mimeType ?? ze(r), b = Fe(s, f);
443
443
  if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
444
444
  try {
445
- const Y = await (await window.showSaveFilePicker({
445
+ const N = await (await window.showSaveFilePicker({
446
446
  suggestedName: r,
447
- types: [{ description: "Datei", accept: { [c]: [`.${Me(r)}`] } }]
447
+ types: [{ description: "Datei", accept: { [f]: [`.${Me(r)}`] } }]
448
448
  })).createWritable();
449
- await Y.write(v), await Y.close();
449
+ await N.write(b), await N.close();
450
450
  return;
451
451
  } catch {
452
452
  }
453
- const $ = URL.createObjectURL(v), L = document.createElement("a");
454
- L.href = $, L.download = r, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L), ze(L), window.setTimeout(() => {
453
+ const $ = URL.createObjectURL(b), L = document.createElement("a");
454
+ L.href = $, L.download = r, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L), je(L), window.setTimeout(() => {
455
455
  document.body.removeChild(L), URL.revokeObjectURL($);
456
- }, 0), je() && window.open($, "_blank", "noopener,noreferrer");
456
+ }, 0), Ue() && window.open($, "_blank", "noopener,noreferrer");
457
457
  }
458
- function Be(s, r) {
458
+ function Fe(s, r) {
459
459
  if (s instanceof Blob)
460
460
  return s.type ? s : new Blob([s], { type: r });
461
461
  if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
@@ -464,7 +464,7 @@ function Be(s, r) {
464
464
  }
465
465
  return new Blob([s], { type: r || "text/plain;charset=utf-8" });
466
466
  }
467
- function Fe(s) {
467
+ function ze(s) {
468
468
  switch (Me(s).toLowerCase()) {
469
469
  case "txt":
470
470
  return "text/plain;charset=utf-8";
@@ -491,15 +491,15 @@ function Me(s) {
491
491
  const r = s.lastIndexOf(".");
492
492
  return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
493
493
  }
494
- function ze(s) {
494
+ function je(s) {
495
495
  const r = document.createEvent("MouseEvents");
496
496
  r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(r);
497
497
  }
498
- function je() {
498
+ function Ue() {
499
499
  const s = navigator.userAgent, r = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
500
500
  return r || i;
501
501
  }
502
- class tt {
502
+ class et {
503
503
  static getEnumValue(r, i) {
504
504
  if (i in r)
505
505
  return r[i];
@@ -512,61 +512,61 @@ class tt {
512
512
  }));
513
513
  }
514
514
  }
515
- class rt {
515
+ class tt {
516
516
  static getFileExtension(r) {
517
517
  let i = "";
518
- const c = r.lastIndexOf(".");
519
- return c > 0 && c < r.length - 1 && (i = `.${r.substring(c + 1).toLowerCase()}`), i;
518
+ const f = r.lastIndexOf(".");
519
+ return f > 0 && f < r.length - 1 && (i = `.${r.substring(f + 1).toLowerCase()}`), i;
520
520
  }
521
521
  /**
522
522
  * read content from a file or blob
523
523
  */
524
524
  static readAsText(r) {
525
525
  const i = new FileReader();
526
- return new Promise((c, v) => {
526
+ return new Promise((f, b) => {
527
527
  i.onload = () => {
528
- i.onload = null, i.onerror = null, typeof i.result == "string" ? c(i.result) : v(new Error("Unexpected result type"));
528
+ i.onload = null, i.onerror = null, typeof i.result == "string" ? f(i.result) : b(new Error("Unexpected result type"));
529
529
  }, i.onerror = () => {
530
530
  const $ = i.error ?? new Error("FileReader error");
531
- i.onload = null, i.onerror = null, v($);
531
+ i.onload = null, i.onerror = null, b($);
532
532
  }, i.readAsText(r);
533
533
  });
534
534
  }
535
535
  static readAsArrayBuffer(r) {
536
536
  const i = new FileReader();
537
- return new Promise((c, v) => {
537
+ return new Promise((f, b) => {
538
538
  i.onload = () => {
539
- i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? c(i.result) : v(new Error("Unexpected result type"));
539
+ i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? f(i.result) : b(new Error("Unexpected result type"));
540
540
  }, i.onerror = () => {
541
541
  const $ = i.error ?? new Error("FileReader error");
542
- i.onload = null, i.onerror = null, v($);
542
+ i.onload = null, i.onerror = null, b($);
543
543
  }, i.readAsArrayBuffer(r);
544
544
  });
545
545
  }
546
546
  static readAsDataUrl(r) {
547
547
  const i = new FileReader();
548
- return new Promise((c, v) => {
548
+ return new Promise((f, b) => {
549
549
  i.onload = ($) => {
550
- c($);
551
- }, i.onerror = ($) => v($), i.readAsDataURL(r);
550
+ f($);
551
+ }, i.onerror = ($) => b($), i.readAsDataURL(r);
552
552
  });
553
553
  }
554
554
  /** usage:
555
555
  * const file = new File(['Hello'], 'test.txt');
556
556
  * FileHelper.formatFileSize(file.size);
557
557
  * */
558
- static formatFileSize(r, i = 2, c) {
558
+ static formatFileSize(r, i = 2, f) {
559
559
  if (r === 0)
560
560
  return "0 Bytes";
561
- const v = 1024, $ = ["Bytes", "KB", "MB", "GB", "TB"];
562
- let L = Math.floor(Math.log(r) / Math.log(v));
563
- c && $.includes(c) && (L = $.indexOf(c));
564
- const P = r / Math.pow(v, L);
565
- return `${parseFloat(P.toFixed(i))} ${$[L]}`;
561
+ const b = 1024, $ = ["Bytes", "KB", "MB", "GB", "TB"];
562
+ let L = Math.floor(Math.log(r) / Math.log(b));
563
+ f && $.includes(f) && (L = $.indexOf(f));
564
+ const Y = r / Math.pow(b, L);
565
+ return `${parseFloat(Y.toFixed(i))} ${$[L]}`;
566
566
  }
567
- static save(r, i, c) {
568
- const v = new Blob([r], { type: c });
569
- Le(v, i);
567
+ static save(r, i, f) {
568
+ const b = new Blob([r], { type: f });
569
+ Le(b, i);
570
570
  }
571
571
  }
572
572
  class me {
@@ -575,8 +575,8 @@ class me {
575
575
  }
576
576
  static get(r) {
577
577
  let i = null;
578
- const c = localStorage.getItem(r);
579
- return c && (i = JSON.parse(c)), i;
578
+ const f = localStorage.getItem(r);
579
+ return f && (i = JSON.parse(f)), i;
580
580
  }
581
581
  static remove(r) {
582
582
  let i = !!me.get(r);
@@ -589,24 +589,24 @@ class me {
589
589
  return Object.keys(localStorage).filter((i) => i.startsWith(r));
590
590
  }
591
591
  }
592
- var fe = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(fe || {});
592
+ var he = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(he || {});
593
593
  class J {
594
594
  static listeners = /* @__PURE__ */ new Set();
595
595
  static enabled = !0;
596
596
  static log(...r) {
597
- J.doLog(fe.log, r);
597
+ J.doLog(he.log, r);
598
598
  }
599
599
  static info(...r) {
600
- J.doLog(fe.info, r);
600
+ J.doLog(he.info, r);
601
601
  }
602
602
  static warn(...r) {
603
- J.doLog(fe.warn, r);
603
+ J.doLog(he.warn, r);
604
604
  }
605
605
  static debug(...r) {
606
- J.doLog(fe.debug, r);
606
+ J.doLog(he.debug, r);
607
607
  }
608
608
  static error(...r) {
609
- J.doLog(fe.error, r);
609
+ J.doLog(he.error, r);
610
610
  }
611
611
  static clearListeners() {
612
612
  J.listeners.clear();
@@ -616,14 +616,14 @@ class J {
616
616
  }
617
617
  static doLog(r, i) {
618
618
  if (!J.enabled) return;
619
- const c = {
619
+ const f = {
620
620
  type: r,
621
621
  args: i,
622
622
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
623
623
  };
624
- for (const v of J.listeners)
624
+ for (const b of J.listeners)
625
625
  try {
626
- if (v(c) === !1)
626
+ if (b(f) === !1)
627
627
  return;
628
628
  } catch {
629
629
  }
@@ -631,24 +631,33 @@ class J {
631
631
  }
632
632
  static onLog(r, i = !1) {
633
633
  if (i) {
634
- const c = (v) => {
634
+ const f = (b) => {
635
635
  try {
636
- return r(v);
636
+ return r(b);
637
637
  } finally {
638
- J.listeners.delete(c);
638
+ J.listeners.delete(f);
639
639
  }
640
640
  };
641
- return J.listeners.add(c), () => J.listeners.delete(c);
641
+ return J.listeners.add(f), () => J.listeners.delete(f);
642
642
  }
643
643
  return J.listeners.add(r), () => J.listeners.delete(r);
644
644
  }
645
645
  }
646
- const We = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Ue = (s, r) => s < r ? -1 : s === r ? 0 : 1, Pe = (s, r, i) => Ue(s, r) * (i ? 1 : -1), Ye = (s, r, i) => {
647
- let c = 0;
648
- return typeof s == "string" && typeof r == "string" ? c = We(s, r, i) : c = Pe(s, r, i), c;
649
- }, Ne = (s, r, i, c) => {
650
- const v = i(s), $ = i(r);
651
- return Ye(v, $, c);
646
+ class rt {
647
+ static getScreenWidth() {
648
+ return window.innerWidth;
649
+ }
650
+ static getScreenHeight() {
651
+ return window.innerHeight;
652
+ }
653
+ // isScreenSmallerThan
654
+ }
655
+ const Be = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Pe = (s, r) => s < r ? -1 : s === r ? 0 : 1, Ye = (s, r, i) => Pe(s, r) * (i ? 1 : -1), Ne = (s, r, i) => {
656
+ let f = 0;
657
+ return typeof s == "string" && typeof r == "string" ? f = Be(s, r, i) : f = Ye(s, r, i), f;
658
+ }, qe = (s, r, i, f) => {
659
+ const b = i(s), $ = i(r);
660
+ return Ne(b, $, f);
652
661
  };
653
662
  class nt {
654
663
  static get(r) {
@@ -662,7 +671,7 @@ class nt {
662
671
  }
663
672
  }
664
673
  Array.prototype.distinct = function(s) {
665
- return s ? this.filter((i, c, v) => v.findIndex(($) => s($, i)) === c) : this.filter((i, c, v) => v.indexOf(i) === c);
674
+ return s ? this.filter((i, f, b) => b.findIndex(($) => s($, i)) === f) : this.filter((i, f, b) => b.indexOf(i) === f);
666
675
  };
667
676
  Array.prototype.filterBy = function(s) {
668
677
  return this.filter((r) => s(r));
@@ -672,74 +681,74 @@ Array.prototype.first = function() {
672
681
  };
673
682
  Array.prototype.groupBy = function(s) {
674
683
  return this.reduce((r, i) => {
675
- const c = s(i);
676
- return r[c] || (r[c] = []), r[c].push(i), r;
684
+ const f = s(i);
685
+ return r[f] || (r[f] = []), r[f].push(i), r;
677
686
  }, {});
678
687
  };
679
688
  Array.prototype.orderBy = function(s, r = !0) {
680
- return this?.sort((i, c) => Ne(i, c, s, r)), this;
689
+ return this?.sort((i, f) => qe(i, f, s, r)), this;
681
690
  };
682
691
  Array.prototype.removeBy = function(s, r) {
683
692
  return this.filter((i) => s(i) !== r);
684
693
  };
685
- var we = { exports: {} }, qe = we.exports, Ee;
694
+ var we = { exports: {} }, We = we.exports, xe;
686
695
  function He() {
687
- return Ee || (Ee = 1, (function(s, r) {
688
- (function(i, c) {
689
- s.exports = c();
690
- })(qe, (function() {
691
- var i = 1e3, c = 6e4, v = 36e5, $ = "millisecond", L = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", X = "quarter", K = "year", V = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, he = /\[([^\]]+)]|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) {
692
- var f = ["th", "st", "nd", "rd"], l = m % 100;
693
- return "[" + m + (f[(l - 20) % 10] || f[l] || f[0]) + "]";
694
- } }, oe = function(m, f, l) {
696
+ return xe || (xe = 1, (function(s, r) {
697
+ (function(i, f) {
698
+ s.exports = f();
699
+ })(We, (function() {
700
+ var i = 1e3, f = 6e4, b = 36e5, $ = "millisecond", L = "second", Y = "minute", N = "hour", w = "day", q = "week", B = "month", X = "quarter", K = "year", V = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ce = /\[([^\]]+)]|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) {
701
+ var h = ["th", "st", "nd", "rd"], l = m % 100;
702
+ return "[" + m + (h[(l - 20) % 10] || h[l] || h[0]) + "]";
703
+ } }, oe = function(m, h, l) {
695
704
  var a = String(m);
696
- return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(l) + m;
705
+ return !a || a.length >= h ? m : "" + Array(h + 1 - a.length).join(l) + m;
697
706
  }, ye = { s: oe, z: function(m) {
698
- var f = -m.utcOffset(), l = Math.abs(f), a = Math.floor(l / 60), u = l % 60;
699
- return (f <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
700
- }, m: function m(f, l) {
701
- if (f.date() < l.date()) return -m(l, f);
702
- var a = 12 * (l.year() - f.year()) + (l.month() - f.month()), u = f.clone().add(a, W), h = l - u < 0, y = f.clone().add(a + (h ? -1 : 1), W);
703
- return +(-(a + (l - u) / (h ? u - y : y - u)) || 0);
707
+ var h = -m.utcOffset(), l = Math.abs(h), a = Math.floor(l / 60), u = l % 60;
708
+ return (h <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
709
+ }, m: function m(h, l) {
710
+ if (h.date() < l.date()) return -m(l, h);
711
+ var a = 12 * (l.year() - h.year()) + (l.month() - h.month()), u = h.clone().add(a, B), c = l - u < 0, y = h.clone().add(a + (c ? -1 : 1), B);
712
+ return +(-(a + (l - u) / (c ? u - y : y - u)) || 0);
704
713
  }, a: function(m) {
705
714
  return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
706
715
  }, p: function(m) {
707
- return { M: W, y: K, w: N, d: w, D: V, h: Y, m: P, s: L, ms: $, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
716
+ return { M: B, y: K, w: q, d: w, D: V, h: N, m: Y, s: L, ms: $, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
708
717
  }, u: function(m) {
709
718
  return m === void 0;
710
- } }, se = "en", q = {};
711
- q[se] = de;
712
- var R = "$isDayjsObject", e = function(m) {
713
- return m instanceof g || !(!m || !m[R]);
714
- }, t = function m(f, l, a) {
719
+ } }, se = "en", W = {};
720
+ W[se] = de;
721
+ var C = "$isDayjsObject", e = function(m) {
722
+ return m instanceof g || !(!m || !m[C]);
723
+ }, t = function m(h, l, a) {
715
724
  var u;
716
- if (!f) return se;
717
- if (typeof f == "string") {
718
- var h = f.toLowerCase();
719
- q[h] && (u = h), l && (q[h] = l, u = h);
720
- var y = f.split("-");
725
+ if (!h) return se;
726
+ if (typeof h == "string") {
727
+ var c = h.toLowerCase();
728
+ W[c] && (u = c), l && (W[c] = l, u = c);
729
+ var y = h.split("-");
721
730
  if (!u && y.length > 1) return m(y[0]);
722
731
  } else {
723
- var p = f.name;
724
- q[p] = f, u = p;
732
+ var p = h.name;
733
+ W[p] = h, u = p;
725
734
  }
726
735
  return !a && u && (se = u), u || !a && se;
727
- }, n = function(m, f) {
736
+ }, n = function(m, h) {
728
737
  if (e(m)) return m.clone();
729
- var l = typeof f == "object" ? f : {};
738
+ var l = typeof h == "object" ? h : {};
730
739
  return l.date = m, l.args = arguments, new g(l);
731
740
  }, o = ye;
732
- o.l = t, o.i = e, o.w = function(m, f) {
733
- return n(m, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
741
+ o.l = t, o.i = e, o.w = function(m, h) {
742
+ return n(m, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset });
734
743
  };
735
744
  var g = (function() {
736
745
  function m(l) {
737
- this.$L = t(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[R] = !0;
746
+ this.$L = t(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[C] = !0;
738
747
  }
739
- var f = m.prototype;
740
- return f.parse = function(l) {
748
+ var h = m.prototype;
749
+ return h.parse = function(l) {
741
750
  this.$d = (function(a) {
742
- var u = a.date, h = a.utc;
751
+ var u = a.date, c = a.utc;
743
752
  if (u === null) return /* @__PURE__ */ new Date(NaN);
744
753
  if (o.u(u)) return /* @__PURE__ */ new Date();
745
754
  if (u instanceof Date) return new Date(u);
@@ -747,99 +756,99 @@ function He() {
747
756
  var y = u.match(ie);
748
757
  if (y) {
749
758
  var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
750
- 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, _);
759
+ return c ? 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, _);
751
760
  }
752
761
  }
753
762
  return new Date(u);
754
763
  })(l), this.init();
755
- }, f.init = function() {
764
+ }, h.init = function() {
756
765
  var l = this.$d;
757
766
  this.$y = l.getFullYear(), this.$M = l.getMonth(), this.$D = l.getDate(), this.$W = l.getDay(), this.$H = l.getHours(), this.$m = l.getMinutes(), this.$s = l.getSeconds(), this.$ms = l.getMilliseconds();
758
- }, f.$utils = function() {
767
+ }, h.$utils = function() {
759
768
  return o;
760
- }, f.isValid = function() {
769
+ }, h.isValid = function() {
761
770
  return this.$d.toString() !== ee;
762
- }, f.isSame = function(l, a) {
771
+ }, h.isSame = function(l, a) {
763
772
  var u = n(l);
764
773
  return this.startOf(a) <= u && u <= this.endOf(a);
765
- }, f.isAfter = function(l, a) {
774
+ }, h.isAfter = function(l, a) {
766
775
  return n(l) < this.startOf(a);
767
- }, f.isBefore = function(l, a) {
776
+ }, h.isBefore = function(l, a) {
768
777
  return this.endOf(a) < n(l);
769
- }, f.$g = function(l, a, u) {
778
+ }, h.$g = function(l, a, u) {
770
779
  return o.u(l) ? this[a] : this.set(u, l);
771
- }, f.unix = function() {
780
+ }, h.unix = function() {
772
781
  return Math.floor(this.valueOf() / 1e3);
773
- }, f.valueOf = function() {
782
+ }, h.valueOf = function() {
774
783
  return this.$d.getTime();
775
- }, f.startOf = function(l, a) {
776
- var u = this, h = !!o.u(a) || a, y = o.p(l), p = function(D, E) {
777
- var k = o.w(u.$u ? Date.UTC(u.$y, E, D) : new Date(u.$y, E, D), u);
778
- return h ? k : k.endOf(w);
779
- }, _ = function(D, E) {
780
- return o.w(u.toDate()[D].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(E)), u);
781
- }, d = this.$W, O = this.$M, C = this.$D, B = "set" + (this.$u ? "UTC" : "");
784
+ }, h.startOf = function(l, a) {
785
+ var u = this, c = !!o.u(a) || a, y = o.p(l), p = function(E, x) {
786
+ var v = o.w(u.$u ? Date.UTC(u.$y, x, E) : new Date(u.$y, x, E), u);
787
+ return c ? v : v.endOf(w);
788
+ }, _ = function(E, x) {
789
+ return o.w(u.toDate()[E].apply(u.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), u);
790
+ }, d = this.$W, O = this.$M, R = this.$D, F = "set" + (this.$u ? "UTC" : "");
782
791
  switch (y) {
783
792
  case K:
784
- return h ? p(1, 0) : p(31, 11);
785
- case W:
786
- return h ? p(1, O) : p(0, O + 1);
787
- case N:
788
- var j = this.$locale().weekStart || 0, b = (d < j ? d + 7 : d) - j;
789
- return p(h ? C - b : C + (6 - b), O);
793
+ return c ? p(1, 0) : p(31, 11);
794
+ case B:
795
+ return c ? p(1, O) : p(0, O + 1);
796
+ case q:
797
+ var U = this.$locale().weekStart || 0, k = (d < U ? d + 7 : d) - U;
798
+ return p(c ? R - k : R + (6 - k), O);
790
799
  case w:
791
800
  case V:
792
- return _(B + "Hours", 0);
801
+ return _(F + "Hours", 0);
802
+ case N:
803
+ return _(F + "Minutes", 1);
793
804
  case Y:
794
- return _(B + "Minutes", 1);
795
- case P:
796
- return _(B + "Seconds", 2);
805
+ return _(F + "Seconds", 2);
797
806
  case L:
798
- return _(B + "Milliseconds", 3);
807
+ return _(F + "Milliseconds", 3);
799
808
  default:
800
809
  return this.clone();
801
810
  }
802
- }, f.endOf = function(l) {
811
+ }, h.endOf = function(l) {
803
812
  return this.startOf(l, !1);
804
- }, f.$set = function(l, a) {
805
- var u, h = o.p(l), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[L] = y + "Seconds", u[$] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
806
- if (h === W || h === K) {
813
+ }, h.$set = function(l, a) {
814
+ var u, c = o.p(l), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[B] = y + "Month", u[K] = y + "FullYear", u[N] = y + "Hours", u[Y] = y + "Minutes", u[L] = y + "Seconds", u[$] = y + "Milliseconds", u)[c], _ = c === w ? this.$D + (a - this.$W) : a;
815
+ if (c === B || c === K) {
807
816
  var d = this.clone().set(V, 1);
808
817
  d.$d[p](_), d.init(), this.$d = d.set(V, Math.min(this.$D, d.daysInMonth())).$d;
809
818
  } else p && this.$d[p](_);
810
819
  return this.init(), this;
811
- }, f.set = function(l, a) {
820
+ }, h.set = function(l, a) {
812
821
  return this.clone().$set(l, a);
813
- }, f.get = function(l) {
822
+ }, h.get = function(l) {
814
823
  return this[o.p(l)]();
815
- }, f.add = function(l, a) {
816
- var u, h = this;
824
+ }, h.add = function(l, a) {
825
+ var u, c = this;
817
826
  l = Number(l);
818
827
  var y = o.p(a), p = function(O) {
819
- var C = n(h);
820
- return o.w(C.date(C.date() + Math.round(O * l)), h);
828
+ var R = n(c);
829
+ return o.w(R.date(R.date() + Math.round(O * l)), c);
821
830
  };
822
- if (y === W) return this.set(W, this.$M + l);
831
+ if (y === B) return this.set(B, this.$M + l);
823
832
  if (y === K) return this.set(K, this.$y + l);
824
833
  if (y === w) return p(1);
825
- if (y === N) return p(7);
826
- var _ = (u = {}, u[P] = c, u[Y] = v, u[L] = i, u)[y] || 1, d = this.$d.getTime() + l * _;
834
+ if (y === q) return p(7);
835
+ var _ = (u = {}, u[Y] = f, u[N] = b, u[L] = i, u)[y] || 1, d = this.$d.getTime() + l * _;
827
836
  return o.w(d, this);
828
- }, f.subtract = function(l, a) {
837
+ }, h.subtract = function(l, a) {
829
838
  return this.add(-1 * l, a);
830
- }, f.format = function(l) {
839
+ }, h.format = function(l) {
831
840
  var a = this, u = this.$locale();
832
841
  if (!this.isValid()) return u.invalidDate || ee;
833
- var h = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, C = u.months, B = u.meridiem, j = function(E, k, A, F) {
834
- return E && (E[k] || E(a, h)) || A[k].slice(0, F);
835
- }, b = function(E) {
836
- return o.s(p % 12 || 12, E, "0");
837
- }, D = B || function(E, k, A) {
838
- var F = E < 12 ? "AM" : "PM";
839
- return A ? F.toLowerCase() : F;
842
+ var c = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, R = u.months, F = u.meridiem, U = function(x, v, A, z) {
843
+ return x && (x[v] || x(a, c)) || A[v].slice(0, z);
844
+ }, k = function(x) {
845
+ return o.s(p % 12 || 12, x, "0");
846
+ }, E = F || function(x, v, A) {
847
+ var z = x < 12 ? "AM" : "PM";
848
+ return A ? z.toLowerCase() : z;
840
849
  };
841
- return h.replace(he, (function(E, k) {
842
- return k || (function(A) {
850
+ return c.replace(ce, (function(x, v) {
851
+ return v || (function(A) {
843
852
  switch (A) {
844
853
  case "YY":
845
854
  return String(a.$y).slice(-2);
@@ -850,9 +859,9 @@ function He() {
850
859
  case "MM":
851
860
  return o.s(d + 1, 2, "0");
852
861
  case "MMM":
853
- return j(u.monthsShort, d, C, 3);
862
+ return U(u.monthsShort, d, R, 3);
854
863
  case "MMMM":
855
- return j(C, d);
864
+ return U(R, d);
856
865
  case "D":
857
866
  return a.$D;
858
867
  case "DD":
@@ -860,9 +869,9 @@ function He() {
860
869
  case "d":
861
870
  return String(a.$W);
862
871
  case "dd":
863
- return j(u.weekdaysMin, a.$W, O, 2);
872
+ return U(u.weekdaysMin, a.$W, O, 2);
864
873
  case "ddd":
865
- return j(u.weekdaysShort, a.$W, O, 3);
874
+ return U(u.weekdaysShort, a.$W, O, 3);
866
875
  case "dddd":
867
876
  return O[a.$W];
868
877
  case "H":
@@ -870,13 +879,13 @@ function He() {
870
879
  case "HH":
871
880
  return o.s(p, 2, "0");
872
881
  case "h":
873
- return b(1);
882
+ return k(1);
874
883
  case "hh":
875
- return b(2);
884
+ return k(2);
876
885
  case "a":
877
- return D(p, _, !0);
886
+ return E(p, _, !0);
878
887
  case "A":
879
- return D(p, _, !1);
888
+ return E(p, _, !1);
880
889
  case "m":
881
890
  return String(_);
882
891
  case "mm":
@@ -891,104 +900,104 @@ function He() {
891
900
  return y;
892
901
  }
893
902
  return null;
894
- })(E) || y.replace(":", "");
903
+ })(x) || y.replace(":", "");
895
904
  }));
896
- }, f.utcOffset = function() {
905
+ }, h.utcOffset = function() {
897
906
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
898
- }, f.diff = function(l, a, u) {
899
- var h, y = this, p = o.p(a), _ = n(l), d = (_.utcOffset() - this.utcOffset()) * c, O = this - _, C = function() {
907
+ }, h.diff = function(l, a, u) {
908
+ var c, y = this, p = o.p(a), _ = n(l), d = (_.utcOffset() - this.utcOffset()) * f, O = this - _, R = function() {
900
909
  return o.m(y, _);
901
910
  };
902
911
  switch (p) {
903
912
  case K:
904
- h = C() / 12;
913
+ c = R() / 12;
905
914
  break;
906
- case W:
907
- h = C();
915
+ case B:
916
+ c = R();
908
917
  break;
909
918
  case X:
910
- h = C() / 3;
919
+ c = R() / 3;
911
920
  break;
912
- case N:
913
- h = (O - d) / 6048e5;
921
+ case q:
922
+ c = (O - d) / 6048e5;
914
923
  break;
915
924
  case w:
916
- h = (O - d) / 864e5;
925
+ c = (O - d) / 864e5;
917
926
  break;
918
- case Y:
919
- h = O / v;
927
+ case N:
928
+ c = O / b;
920
929
  break;
921
- case P:
922
- h = O / c;
930
+ case Y:
931
+ c = O / f;
923
932
  break;
924
933
  case L:
925
- h = O / i;
934
+ c = O / i;
926
935
  break;
927
936
  default:
928
- h = O;
937
+ c = O;
929
938
  }
930
- return u ? h : o.a(h);
931
- }, f.daysInMonth = function() {
932
- return this.endOf(W).$D;
933
- }, f.$locale = function() {
934
- return q[this.$L];
935
- }, f.locale = function(l, a) {
939
+ return u ? c : o.a(c);
940
+ }, h.daysInMonth = function() {
941
+ return this.endOf(B).$D;
942
+ }, h.$locale = function() {
943
+ return W[this.$L];
944
+ }, h.locale = function(l, a) {
936
945
  if (!l) return this.$L;
937
- var u = this.clone(), h = t(l, a, !0);
938
- return h && (u.$L = h), u;
939
- }, f.clone = function() {
946
+ var u = this.clone(), c = t(l, a, !0);
947
+ return c && (u.$L = c), u;
948
+ }, h.clone = function() {
940
949
  return o.w(this.$d, this);
941
- }, f.toDate = function() {
950
+ }, h.toDate = function() {
942
951
  return new Date(this.valueOf());
943
- }, f.toJSON = function() {
952
+ }, h.toJSON = function() {
944
953
  return this.isValid() ? this.toISOString() : null;
945
- }, f.toISOString = function() {
954
+ }, h.toISOString = function() {
946
955
  return this.$d.toISOString();
947
- }, f.toString = function() {
956
+ }, h.toString = function() {
948
957
  return this.$d.toUTCString();
949
958
  }, m;
950
959
  })(), S = g.prototype;
951
- return n.prototype = S, [["$ms", $], ["$s", L], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", V]].forEach((function(m) {
952
- S[m[1]] = function(f) {
953
- return this.$g(f, m[0], m[1]);
960
+ return n.prototype = S, [["$ms", $], ["$s", L], ["$m", Y], ["$H", N], ["$W", w], ["$M", B], ["$y", K], ["$D", V]].forEach((function(m) {
961
+ S[m[1]] = function(h) {
962
+ return this.$g(h, m[0], m[1]);
954
963
  };
955
- })), n.extend = function(m, f) {
956
- return m.$i || (m(f, g, n), m.$i = !0), n;
964
+ })), n.extend = function(m, h) {
965
+ return m.$i || (m(h, g, n), m.$i = !0), n;
957
966
  }, n.locale = t, n.isDayjs = e, n.unix = function(m) {
958
967
  return n(1e3 * m);
959
- }, n.en = q[se], n.Ls = q, n.p = {}, n;
968
+ }, n.en = W[se], n.Ls = W, n.p = {}, n;
960
969
  }));
961
970
  })(we)), we.exports;
962
971
  }
963
972
  var Ke = He();
964
- const Z = /* @__PURE__ */ be(Ke);
965
- var ke = { exports: {} }, Je = ke.exports, Oe;
973
+ const Z = /* @__PURE__ */ ke(Ke);
974
+ var ve = { exports: {} }, Je = ve.exports, Oe;
966
975
  function Qe() {
967
976
  return Oe || (Oe = 1, (function(s, r) {
968
- (function(i, c) {
969
- s.exports = c();
977
+ (function(i, f) {
978
+ s.exports = f();
970
979
  })(Je, (function() {
971
980
  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" };
972
- return function(c, v, $) {
973
- var L = v.prototype, P = L.format;
974
- $.en.formats = i, L.format = function(Y) {
975
- Y === void 0 && (Y = "YYYY-MM-DDTHH:mm:ssZ");
976
- var w = this.$locale().formats, N = (function(W, X) {
977
- return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, ee) {
981
+ return function(f, b, $) {
982
+ var L = b.prototype, Y = L.format;
983
+ $.en.formats = i, L.format = function(N) {
984
+ N === void 0 && (N = "YYYY-MM-DDTHH:mm:ssZ");
985
+ var w = this.$locale().formats, q = (function(B, X) {
986
+ return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, ee) {
978
987
  var ie = ee && ee.toUpperCase();
979
- return V || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(he, de, oe) {
988
+ return V || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ce, de, oe) {
980
989
  return de || oe.slice(1);
981
990
  }));
982
991
  }));
983
- })(Y, w === void 0 ? {} : w);
984
- return P.call(this, N);
992
+ })(N, w === void 0 ? {} : w);
993
+ return Y.call(this, q);
985
994
  };
986
995
  };
987
996
  }));
988
- })(ke)), ke.exports;
997
+ })(ve)), ve.exports;
989
998
  }
990
999
  var Ve = Qe();
991
- const Ze = /* @__PURE__ */ be(Ve);
1000
+ const Ze = /* @__PURE__ */ ke(Ve);
992
1001
  Z.extend(Ze);
993
1002
  Date.prototype.isAfter = function(s, r) {
994
1003
  return Z(this).isAfter(s, r);
@@ -1035,47 +1044,19 @@ String.prototype.isNumber = function() {
1035
1044
  String.prototype.isEmpty = function() {
1036
1045
  return this === void 0 || !this || this.length === 0;
1037
1046
  };
1038
- const Ge = {
1039
- xs: 0,
1040
- sm: 576,
1041
- md: 768,
1042
- lg: 992,
1043
- xl: 1200,
1044
- xxl: 1400,
1045
- xxxl: 1600
1046
- };
1047
1047
  class it {
1048
- screenBreakpoints;
1049
- screenWidth = 0;
1050
- lastBreakpoint;
1051
1048
  resizeListener;
1052
- breakpointChangeCallbacks = /* @__PURE__ */ new Set();
1053
- // feuert nur bei Breakpoint-Änderung
1054
1049
  onResizeCallbacks = /* @__PURE__ */ new Set();
1055
1050
  // feuert bei jedem throttled Resize
1056
1051
  rafId = null;
1057
1052
  emitTimeoutId = null;
1058
1053
  // für debounce der onResizeCallbacks
1059
- pendingWidth;
1060
- pendingBreakpoint;
1061
1054
  duplicateThresholdMs = 60;
1062
- constructor(r) {
1063
- typeof window < "u" && (this.screenBreakpoints = r || Ge, this.screenWidth = window.innerWidth, this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }), this.lastBreakpoint = this.getBreakpointByScreenWidth(this.screenWidth));
1055
+ constructor() {
1056
+ typeof window < "u" && (this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }));
1064
1057
  }
1065
1058
  destroy() {
1066
- typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.breakpointChangeCallbacks.clear(), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
1067
- }
1068
- getCurrentScreenWidth() {
1069
- return this.screenWidth;
1070
- }
1071
- getCurrentBreakpoint() {
1072
- return this.lastBreakpoint;
1073
- }
1074
- onBreakpointChange(r) {
1075
- this.breakpointChangeCallbacks.add(r);
1076
- }
1077
- offBreakpointChange(r) {
1078
- this.breakpointChangeCallbacks.delete(r);
1059
+ typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
1079
1060
  }
1080
1061
  onResizeChange(r) {
1081
1062
  this.onResizeCallbacks.add(r);
@@ -1083,43 +1064,23 @@ class it {
1083
1064
  offResizeChange(r) {
1084
1065
  this.onResizeCallbacks.delete(r);
1085
1066
  }
1086
- getBreakpointByScreenWidth(r = this.screenWidth) {
1087
- let i = "xs";
1088
- for (const c of Object.keys(this.screenBreakpoints))
1089
- this.screenBreakpoints[c] <= r && (i = c);
1090
- return { breakpoint: i, screenWidth: this.screenBreakpoints[i] };
1091
- }
1092
- isScreenGreaterThan(r) {
1093
- return this.screenWidth > this.screenBreakpoints[r];
1094
- }
1095
- isScreenSmallerThan(r) {
1096
- return this.screenWidth < this.screenBreakpoints[r];
1097
- }
1098
- getBreakpoint(r) {
1099
- return {
1100
- breakpoint: r,
1101
- screenWidth: this.screenBreakpoints[r]
1102
- };
1103
- }
1104
1067
  onResize = () => {
1105
- if (typeof window > "u") return;
1106
- const r = window.innerWidth, i = this.getBreakpointByScreenWidth(r);
1107
- this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((c) => c(i))), this.pendingWidth = r, this.pendingBreakpoint = i, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
1108
- this.pendingBreakpoint && this.onResizeCallbacks.forEach((c) => c(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
1109
- }, this.duplicateThresholdMs);
1068
+ typeof window > "u" || (this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
1069
+ this.emitTimeoutId = null;
1070
+ }, this.duplicateThresholdMs));
1110
1071
  };
1111
1072
  }
1112
1073
  export {
1113
1074
  it as BrowserService,
1114
- et as CsvHelper,
1115
- tt as EnumHelper,
1116
- rt as FileHelper,
1075
+ Xe as CsvHelper,
1076
+ et as EnumHelper,
1077
+ tt as FileHelper,
1117
1078
  me as LocalStorageHelper,
1118
1079
  J as LoggerHelper,
1119
- fe as LoggerType,
1120
- Ge as ScreenBreakpoints,
1080
+ he as LoggerType,
1081
+ rt as ScreenHelper,
1121
1082
  nt as TokenHelper,
1122
- Xe as copyToClipboard,
1083
+ Ge as copyToClipboard,
1123
1084
  Le as saveAs,
1124
- Ne as sortHelper
1085
+ qe as sortHelper
1125
1086
  };