@neutron.co.id/operasional-interfaces 1.5.0 → 1.6.0
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/build/index.cjs +170 -3413
- package/build/index.mjs +165 -3408
- package/build/style.css +5 -5
- package/package.json +50 -41
package/build/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentUtil as ComponentUtil$1 } from "@neon.id/utils/client";
|
|
2
|
-
import { defineComponent, openBlock, createElementBlock, createVNode, unref,
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, unref, ref, computed, h, watch, createBlock, withCtx, mergeProps, createCommentVNode, provide, resolveComponent, createElementVNode, createTextVNode, pushScopeId, popScopeId, onMounted, isRef, reactive, watchEffect, onBeforeUnmount, normalizeClass, withModifiers, toDisplayString, Fragment, normalizeProps, guardReactiveProps } from "vue";
|
|
3
3
|
import { NeonButton, NeonAvatar, NeonDivider, NeonModal, NeonSheet, useToastStore, NeonSlider, NeonSlide, NeonStat, NeonInfo } from "@neon.id/interfaces";
|
|
4
|
-
import { GraphUtil, NeonCollectionContext, useSingle, NeonSingle, usePermit, useCollection, NeonCollection } from "@neon.id/context";
|
|
4
|
+
import { GraphUtil, NeonCollectionContext, useSingle, NeonSingle, usePermit, useCollection, NeonCollection, useAppStore } from "@neon.id/context";
|
|
5
5
|
import { RowUtil } from "@neon.id/display";
|
|
6
6
|
import { NeonField, NeonForm, NeonFormWrapper, NeonFields } from "@neon.id/form";
|
|
7
7
|
import { IdentitasConnect, IdentitasAssistRegistration, IdentitasDelegate, useAuthStore } from "@neon.id/identitas-interfaces";
|
|
@@ -10,13 +10,17 @@ import { Field } from "@neon.id/model";
|
|
|
10
10
|
import { Query } from "@neon.id/query";
|
|
11
11
|
import { withRelation, NeonRelationSheet } from "@neon.id/relation";
|
|
12
12
|
import { CodeUtil } from "@neon.id/utils/code";
|
|
13
|
+
import { useClientHandle } from "@urql/vue";
|
|
14
|
+
import { format, startOfToday, endOfToday } from "date-fns";
|
|
13
15
|
import { models as models$1 } from "@neutron.co.id/tempat-models";
|
|
14
16
|
import { useEventBus, useIntervalFn, useThrottleFn } from "@vueuse/core";
|
|
15
17
|
import { OfficeContent, OfficeCollectionQuery, OfficeCollectionOperation, OfficeTabs, OfficeTab, OfficeRelation, OfficeCollectionTable, OfficeCollectionRelated } from "@neon.id/office";
|
|
16
18
|
import { defineStore, storeToRefs } from "pinia";
|
|
17
19
|
import { useRouter, useRoute } from "vue-router";
|
|
18
20
|
import { ComponentUtil } from "@neon.id/utils/component";
|
|
21
|
+
import Scanner from "qr-scanner";
|
|
19
22
|
import { models as models$2 } from "@neutron.co.id/personalia-models";
|
|
23
|
+
import { CatatSketchPad } from "@neon.id/catat-interfaces";
|
|
20
24
|
const _hoisted_1$b = { class: "xxx-button" };
|
|
21
25
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
22
26
|
...{ name: "XxxButton" },
|
|
@@ -35,2718 +39,6 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
});
|
|
38
|
-
var e$2 = {
|
|
39
|
-
NAME: "Name",
|
|
40
|
-
DOCUMENT: "Document",
|
|
41
|
-
OPERATION_DEFINITION: "OperationDefinition",
|
|
42
|
-
VARIABLE_DEFINITION: "VariableDefinition",
|
|
43
|
-
SELECTION_SET: "SelectionSet",
|
|
44
|
-
FIELD: "Field",
|
|
45
|
-
ARGUMENT: "Argument",
|
|
46
|
-
FRAGMENT_SPREAD: "FragmentSpread",
|
|
47
|
-
INLINE_FRAGMENT: "InlineFragment",
|
|
48
|
-
FRAGMENT_DEFINITION: "FragmentDefinition",
|
|
49
|
-
VARIABLE: "Variable",
|
|
50
|
-
INT: "IntValue",
|
|
51
|
-
FLOAT: "FloatValue",
|
|
52
|
-
STRING: "StringValue",
|
|
53
|
-
BOOLEAN: "BooleanValue",
|
|
54
|
-
NULL: "NullValue",
|
|
55
|
-
ENUM: "EnumValue",
|
|
56
|
-
LIST: "ListValue",
|
|
57
|
-
OBJECT: "ObjectValue",
|
|
58
|
-
OBJECT_FIELD: "ObjectField",
|
|
59
|
-
DIRECTIVE: "Directive",
|
|
60
|
-
NAMED_TYPE: "NamedType",
|
|
61
|
-
LIST_TYPE: "ListType",
|
|
62
|
-
NON_NULL_TYPE: "NonNullType"
|
|
63
|
-
};
|
|
64
|
-
class GraphQLError extends Error {
|
|
65
|
-
constructor(e3, r, i3, n2, a4, t3, o2) {
|
|
66
|
-
super(e3);
|
|
67
|
-
this.name = "GraphQLError";
|
|
68
|
-
this.message = e3;
|
|
69
|
-
if (a4) {
|
|
70
|
-
this.path = a4;
|
|
71
|
-
}
|
|
72
|
-
if (r) {
|
|
73
|
-
this.nodes = Array.isArray(r) ? r : [r];
|
|
74
|
-
}
|
|
75
|
-
if (i3) {
|
|
76
|
-
this.source = i3;
|
|
77
|
-
}
|
|
78
|
-
if (n2) {
|
|
79
|
-
this.positions = n2;
|
|
80
|
-
}
|
|
81
|
-
if (t3) {
|
|
82
|
-
this.originalError = t3;
|
|
83
|
-
}
|
|
84
|
-
var l2 = o2;
|
|
85
|
-
if (!l2 && t3) {
|
|
86
|
-
var u3 = t3.extensions;
|
|
87
|
-
if (u3 && "object" == typeof u3) {
|
|
88
|
-
l2 = u3;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
this.extensions = l2 || {};
|
|
92
|
-
}
|
|
93
|
-
toJSON() {
|
|
94
|
-
return {
|
|
95
|
-
...this,
|
|
96
|
-
message: this.message
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
toString() {
|
|
100
|
-
return this.message;
|
|
101
|
-
}
|
|
102
|
-
get [Symbol.toStringTag]() {
|
|
103
|
-
return "GraphQLError";
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
var i$1;
|
|
107
|
-
var n;
|
|
108
|
-
function error(e3) {
|
|
109
|
-
return new GraphQLError(`Syntax Error: Unexpected token at ${n} in ${e3}`);
|
|
110
|
-
}
|
|
111
|
-
function advance(e3) {
|
|
112
|
-
e3.lastIndex = n;
|
|
113
|
-
if (e3.test(i$1)) {
|
|
114
|
-
return i$1.slice(n, n = e3.lastIndex);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
var a = / +(?=[^\s])/y;
|
|
118
|
-
function blockString(e3) {
|
|
119
|
-
var r = e3.split("\n");
|
|
120
|
-
var i3 = "";
|
|
121
|
-
var n2 = 0;
|
|
122
|
-
var t3 = 0;
|
|
123
|
-
var o2 = r.length - 1;
|
|
124
|
-
for (var l2 = 0; l2 < r.length; l2++) {
|
|
125
|
-
a.lastIndex = 0;
|
|
126
|
-
if (a.test(r[l2])) {
|
|
127
|
-
if (l2 && (!n2 || a.lastIndex < n2)) {
|
|
128
|
-
n2 = a.lastIndex;
|
|
129
|
-
}
|
|
130
|
-
t3 = t3 || l2;
|
|
131
|
-
o2 = l2;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
for (var u3 = t3; u3 <= o2; u3++) {
|
|
135
|
-
if (u3 !== t3) {
|
|
136
|
-
i3 += "\n";
|
|
137
|
-
}
|
|
138
|
-
i3 += r[u3].slice(n2).replace(/\\"""/g, '"""');
|
|
139
|
-
}
|
|
140
|
-
return i3;
|
|
141
|
-
}
|
|
142
|
-
function ignored() {
|
|
143
|
-
for (var e3 = 0 | i$1.charCodeAt(n++); 9 === e3 || 10 === e3 || 13 === e3 || 32 === e3 || 35 === e3 || 44 === e3 || 65279 === e3; e3 = 0 | i$1.charCodeAt(n++)) {
|
|
144
|
-
if (35 === e3) {
|
|
145
|
-
while (10 !== (e3 = i$1.charCodeAt(n++)) && 13 !== e3) {
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
n--;
|
|
150
|
-
}
|
|
151
|
-
var t = /[_\w][_\d\w]*/y;
|
|
152
|
-
function name() {
|
|
153
|
-
var e3;
|
|
154
|
-
if (e3 = advance(t)) {
|
|
155
|
-
return {
|
|
156
|
-
kind: "Name",
|
|
157
|
-
value: e3
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
var o = /null|true|false/y;
|
|
162
|
-
var l$1 = /\$[_\w][_\d\w]*/y;
|
|
163
|
-
var u = /-?\d+/y;
|
|
164
|
-
var v$1 = /(?:\.\d+)?(?:[eE][+-]?\d+)?/y;
|
|
165
|
-
var d$2 = /\\/g;
|
|
166
|
-
var s$1 = /"""(?:[\s\S]+(?="""))?"""/y;
|
|
167
|
-
var c$1 = /"(?:[^"\r\n]+)?"/y;
|
|
168
|
-
function value(e3) {
|
|
169
|
-
var r;
|
|
170
|
-
var a4;
|
|
171
|
-
if (a4 = advance(o)) {
|
|
172
|
-
r = "null" === a4 ? {
|
|
173
|
-
kind: "NullValue"
|
|
174
|
-
} : {
|
|
175
|
-
kind: "BooleanValue",
|
|
176
|
-
value: "true" === a4
|
|
177
|
-
};
|
|
178
|
-
} else if (!e3 && (a4 = advance(l$1))) {
|
|
179
|
-
r = {
|
|
180
|
-
kind: "Variable",
|
|
181
|
-
name: {
|
|
182
|
-
kind: "Name",
|
|
183
|
-
value: a4.slice(1)
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
} else if (a4 = advance(u)) {
|
|
187
|
-
var f2 = a4;
|
|
188
|
-
if (a4 = advance(v$1)) {
|
|
189
|
-
r = {
|
|
190
|
-
kind: "FloatValue",
|
|
191
|
-
value: f2 + a4
|
|
192
|
-
};
|
|
193
|
-
} else {
|
|
194
|
-
r = {
|
|
195
|
-
kind: "IntValue",
|
|
196
|
-
value: f2
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
} else if (a4 = advance(t)) {
|
|
200
|
-
r = {
|
|
201
|
-
kind: "EnumValue",
|
|
202
|
-
value: a4
|
|
203
|
-
};
|
|
204
|
-
} else if (a4 = advance(s$1)) {
|
|
205
|
-
r = {
|
|
206
|
-
kind: "StringValue",
|
|
207
|
-
value: blockString(a4.slice(3, -3)),
|
|
208
|
-
block: true
|
|
209
|
-
};
|
|
210
|
-
} else if (a4 = advance(c$1)) {
|
|
211
|
-
r = {
|
|
212
|
-
kind: "StringValue",
|
|
213
|
-
value: d$2.test(a4) ? JSON.parse(a4) : a4.slice(1, -1),
|
|
214
|
-
block: false
|
|
215
|
-
};
|
|
216
|
-
} else if (r = function list(e4) {
|
|
217
|
-
var r2;
|
|
218
|
-
if (91 === i$1.charCodeAt(n)) {
|
|
219
|
-
n++;
|
|
220
|
-
ignored();
|
|
221
|
-
var a5 = [];
|
|
222
|
-
while (r2 = value(e4)) {
|
|
223
|
-
a5.push(r2);
|
|
224
|
-
}
|
|
225
|
-
if (93 !== i$1.charCodeAt(n++)) {
|
|
226
|
-
throw error("ListValue");
|
|
227
|
-
}
|
|
228
|
-
ignored();
|
|
229
|
-
return {
|
|
230
|
-
kind: "ListValue",
|
|
231
|
-
values: a5
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
}(e3) || function object(e4) {
|
|
235
|
-
if (123 === i$1.charCodeAt(n)) {
|
|
236
|
-
n++;
|
|
237
|
-
ignored();
|
|
238
|
-
var r2 = [];
|
|
239
|
-
var a5;
|
|
240
|
-
while (a5 = name()) {
|
|
241
|
-
ignored();
|
|
242
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
243
|
-
throw error("ObjectField");
|
|
244
|
-
}
|
|
245
|
-
ignored();
|
|
246
|
-
var t3 = value(e4);
|
|
247
|
-
if (!t3) {
|
|
248
|
-
throw error("ObjectField");
|
|
249
|
-
}
|
|
250
|
-
r2.push({
|
|
251
|
-
kind: "ObjectField",
|
|
252
|
-
name: a5,
|
|
253
|
-
value: t3
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
if (125 !== i$1.charCodeAt(n++)) {
|
|
257
|
-
throw error("ObjectValue");
|
|
258
|
-
}
|
|
259
|
-
ignored();
|
|
260
|
-
return {
|
|
261
|
-
kind: "ObjectValue",
|
|
262
|
-
fields: r2
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
}(e3)) {
|
|
266
|
-
return r;
|
|
267
|
-
}
|
|
268
|
-
ignored();
|
|
269
|
-
return r;
|
|
270
|
-
}
|
|
271
|
-
function arguments_(e3) {
|
|
272
|
-
var r = [];
|
|
273
|
-
ignored();
|
|
274
|
-
if (40 === i$1.charCodeAt(n)) {
|
|
275
|
-
n++;
|
|
276
|
-
ignored();
|
|
277
|
-
var a4;
|
|
278
|
-
while (a4 = name()) {
|
|
279
|
-
ignored();
|
|
280
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
281
|
-
throw error("Argument");
|
|
282
|
-
}
|
|
283
|
-
ignored();
|
|
284
|
-
var t3 = value(e3);
|
|
285
|
-
if (!t3) {
|
|
286
|
-
throw error("Argument");
|
|
287
|
-
}
|
|
288
|
-
r.push({
|
|
289
|
-
kind: "Argument",
|
|
290
|
-
name: a4,
|
|
291
|
-
value: t3
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
if (!r.length || 41 !== i$1.charCodeAt(n++)) {
|
|
295
|
-
throw error("Argument");
|
|
296
|
-
}
|
|
297
|
-
ignored();
|
|
298
|
-
}
|
|
299
|
-
return r;
|
|
300
|
-
}
|
|
301
|
-
function directives(e3) {
|
|
302
|
-
var r = [];
|
|
303
|
-
ignored();
|
|
304
|
-
while (64 === i$1.charCodeAt(n)) {
|
|
305
|
-
n++;
|
|
306
|
-
var a4 = name();
|
|
307
|
-
if (!a4) {
|
|
308
|
-
throw error("Directive");
|
|
309
|
-
}
|
|
310
|
-
ignored();
|
|
311
|
-
r.push({
|
|
312
|
-
kind: "Directive",
|
|
313
|
-
name: a4,
|
|
314
|
-
arguments: arguments_(e3)
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
return r;
|
|
318
|
-
}
|
|
319
|
-
function field() {
|
|
320
|
-
var e3 = name();
|
|
321
|
-
if (e3) {
|
|
322
|
-
ignored();
|
|
323
|
-
var r;
|
|
324
|
-
if (58 === i$1.charCodeAt(n)) {
|
|
325
|
-
n++;
|
|
326
|
-
ignored();
|
|
327
|
-
r = e3;
|
|
328
|
-
if (!(e3 = name())) {
|
|
329
|
-
throw error("Field");
|
|
330
|
-
}
|
|
331
|
-
ignored();
|
|
332
|
-
}
|
|
333
|
-
return {
|
|
334
|
-
kind: "Field",
|
|
335
|
-
alias: r,
|
|
336
|
-
name: e3,
|
|
337
|
-
arguments: arguments_(false),
|
|
338
|
-
directives: directives(false),
|
|
339
|
-
selectionSet: selectionSet()
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
function type() {
|
|
344
|
-
var e3;
|
|
345
|
-
ignored();
|
|
346
|
-
if (91 === i$1.charCodeAt(n)) {
|
|
347
|
-
n++;
|
|
348
|
-
ignored();
|
|
349
|
-
var r = type();
|
|
350
|
-
if (!r || 93 !== i$1.charCodeAt(n++)) {
|
|
351
|
-
throw error("ListType");
|
|
352
|
-
}
|
|
353
|
-
e3 = {
|
|
354
|
-
kind: "ListType",
|
|
355
|
-
type: r
|
|
356
|
-
};
|
|
357
|
-
} else if (e3 = name()) {
|
|
358
|
-
e3 = {
|
|
359
|
-
kind: "NamedType",
|
|
360
|
-
name: e3
|
|
361
|
-
};
|
|
362
|
-
} else {
|
|
363
|
-
throw error("NamedType");
|
|
364
|
-
}
|
|
365
|
-
ignored();
|
|
366
|
-
if (33 === i$1.charCodeAt(n)) {
|
|
367
|
-
n++;
|
|
368
|
-
ignored();
|
|
369
|
-
return {
|
|
370
|
-
kind: "NonNullType",
|
|
371
|
-
type: e3
|
|
372
|
-
};
|
|
373
|
-
} else {
|
|
374
|
-
return e3;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
var f$1 = /on/y;
|
|
378
|
-
function typeCondition() {
|
|
379
|
-
if (advance(f$1)) {
|
|
380
|
-
ignored();
|
|
381
|
-
var e3 = name();
|
|
382
|
-
if (!e3) {
|
|
383
|
-
throw error("NamedType");
|
|
384
|
-
}
|
|
385
|
-
ignored();
|
|
386
|
-
return {
|
|
387
|
-
kind: "NamedType",
|
|
388
|
-
name: e3
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
var p$1 = /\.\.\./y;
|
|
393
|
-
function fragmentSpread() {
|
|
394
|
-
if (advance(p$1)) {
|
|
395
|
-
ignored();
|
|
396
|
-
var e3 = n;
|
|
397
|
-
var r;
|
|
398
|
-
if ((r = name()) && "on" !== r.value) {
|
|
399
|
-
return {
|
|
400
|
-
kind: "FragmentSpread",
|
|
401
|
-
name: r,
|
|
402
|
-
directives: directives(false)
|
|
403
|
-
};
|
|
404
|
-
} else {
|
|
405
|
-
n = e3;
|
|
406
|
-
var i3 = typeCondition();
|
|
407
|
-
var a4 = directives(false);
|
|
408
|
-
var t3 = selectionSet();
|
|
409
|
-
if (!t3) {
|
|
410
|
-
throw error("InlineFragment");
|
|
411
|
-
}
|
|
412
|
-
return {
|
|
413
|
-
kind: "InlineFragment",
|
|
414
|
-
typeCondition: i3,
|
|
415
|
-
directives: a4,
|
|
416
|
-
selectionSet: t3
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
function selectionSet() {
|
|
422
|
-
var e3;
|
|
423
|
-
ignored();
|
|
424
|
-
if (123 === i$1.charCodeAt(n)) {
|
|
425
|
-
n++;
|
|
426
|
-
ignored();
|
|
427
|
-
var r = [];
|
|
428
|
-
while (e3 = fragmentSpread() || field()) {
|
|
429
|
-
r.push(e3);
|
|
430
|
-
}
|
|
431
|
-
if (!r.length || 125 !== i$1.charCodeAt(n++)) {
|
|
432
|
-
throw error("SelectionSet");
|
|
433
|
-
}
|
|
434
|
-
ignored();
|
|
435
|
-
return {
|
|
436
|
-
kind: "SelectionSet",
|
|
437
|
-
selections: r
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
var m = /fragment/y;
|
|
442
|
-
function fragmentDefinition() {
|
|
443
|
-
if (advance(m)) {
|
|
444
|
-
ignored();
|
|
445
|
-
var e3 = name();
|
|
446
|
-
if (!e3) {
|
|
447
|
-
throw error("FragmentDefinition");
|
|
448
|
-
}
|
|
449
|
-
ignored();
|
|
450
|
-
var r = typeCondition();
|
|
451
|
-
if (!r) {
|
|
452
|
-
throw error("FragmentDefinition");
|
|
453
|
-
}
|
|
454
|
-
var i3 = directives(false);
|
|
455
|
-
var n2 = selectionSet();
|
|
456
|
-
if (!n2) {
|
|
457
|
-
throw error("FragmentDefinition");
|
|
458
|
-
}
|
|
459
|
-
return {
|
|
460
|
-
kind: "FragmentDefinition",
|
|
461
|
-
name: e3,
|
|
462
|
-
typeCondition: r,
|
|
463
|
-
directives: i3,
|
|
464
|
-
selectionSet: n2
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
var g = /query|mutation|subscription/y;
|
|
469
|
-
function operationDefinition() {
|
|
470
|
-
var e3;
|
|
471
|
-
var r;
|
|
472
|
-
var a4 = [];
|
|
473
|
-
var t3 = [];
|
|
474
|
-
if (e3 = advance(g)) {
|
|
475
|
-
ignored();
|
|
476
|
-
r = name();
|
|
477
|
-
a4 = function variableDefinitions() {
|
|
478
|
-
var e4;
|
|
479
|
-
var r2 = [];
|
|
480
|
-
ignored();
|
|
481
|
-
if (40 === i$1.charCodeAt(n)) {
|
|
482
|
-
n++;
|
|
483
|
-
ignored();
|
|
484
|
-
while (e4 = advance(l$1)) {
|
|
485
|
-
ignored();
|
|
486
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
487
|
-
throw error("VariableDefinition");
|
|
488
|
-
}
|
|
489
|
-
var a5 = type();
|
|
490
|
-
var t4 = void 0;
|
|
491
|
-
if (61 === i$1.charCodeAt(n)) {
|
|
492
|
-
n++;
|
|
493
|
-
ignored();
|
|
494
|
-
if (!(t4 = value(true))) {
|
|
495
|
-
throw error("VariableDefinition");
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
ignored();
|
|
499
|
-
r2.push({
|
|
500
|
-
kind: "VariableDefinition",
|
|
501
|
-
variable: {
|
|
502
|
-
kind: "Variable",
|
|
503
|
-
name: {
|
|
504
|
-
kind: "Name",
|
|
505
|
-
value: e4.slice(1)
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
type: a5,
|
|
509
|
-
defaultValue: t4,
|
|
510
|
-
directives: directives(true)
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
if (41 !== i$1.charCodeAt(n++)) {
|
|
514
|
-
throw error("VariableDefinition");
|
|
515
|
-
}
|
|
516
|
-
ignored();
|
|
517
|
-
}
|
|
518
|
-
return r2;
|
|
519
|
-
}();
|
|
520
|
-
t3 = directives(false);
|
|
521
|
-
}
|
|
522
|
-
var o2 = selectionSet();
|
|
523
|
-
if (o2) {
|
|
524
|
-
return {
|
|
525
|
-
kind: "OperationDefinition",
|
|
526
|
-
operation: e3 || "query",
|
|
527
|
-
name: r,
|
|
528
|
-
variableDefinitions: a4,
|
|
529
|
-
directives: t3,
|
|
530
|
-
selectionSet: o2
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
function parse(e3, r) {
|
|
535
|
-
i$1 = "string" == typeof e3.body ? e3.body : e3;
|
|
536
|
-
n = 0;
|
|
537
|
-
return function document2() {
|
|
538
|
-
var e4;
|
|
539
|
-
ignored();
|
|
540
|
-
var r2 = [];
|
|
541
|
-
while (e4 = fragmentDefinition() || operationDefinition()) {
|
|
542
|
-
r2.push(e4);
|
|
543
|
-
}
|
|
544
|
-
return {
|
|
545
|
-
kind: "Document",
|
|
546
|
-
definitions: r2
|
|
547
|
-
};
|
|
548
|
-
}();
|
|
549
|
-
}
|
|
550
|
-
function printString(e3) {
|
|
551
|
-
return JSON.stringify(e3);
|
|
552
|
-
}
|
|
553
|
-
function printBlockString(e3) {
|
|
554
|
-
return '"""\n' + e3.replace(/"""/g, '\\"""') + '\n"""';
|
|
555
|
-
}
|
|
556
|
-
var hasItems = (e3) => !(!e3 || !e3.length);
|
|
557
|
-
var y = {
|
|
558
|
-
OperationDefinition(e3) {
|
|
559
|
-
if ("query" === e3.operation && !e3.name && !hasItems(e3.variableDefinitions) && !hasItems(e3.directives)) {
|
|
560
|
-
return y.SelectionSet(e3.selectionSet);
|
|
561
|
-
}
|
|
562
|
-
var r = e3.operation;
|
|
563
|
-
if (e3.name) {
|
|
564
|
-
r += " " + e3.name.value;
|
|
565
|
-
}
|
|
566
|
-
if (hasItems(e3.variableDefinitions)) {
|
|
567
|
-
if (!e3.name) {
|
|
568
|
-
r += " ";
|
|
569
|
-
}
|
|
570
|
-
r += "(" + e3.variableDefinitions.map(y.VariableDefinition).join(", ") + ")";
|
|
571
|
-
}
|
|
572
|
-
if (hasItems(e3.directives)) {
|
|
573
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
574
|
-
}
|
|
575
|
-
return r + " " + y.SelectionSet(e3.selectionSet);
|
|
576
|
-
},
|
|
577
|
-
VariableDefinition(e3) {
|
|
578
|
-
var r = y.Variable(e3.variable) + ": " + print(e3.type);
|
|
579
|
-
if (e3.defaultValue) {
|
|
580
|
-
r += " = " + print(e3.defaultValue);
|
|
581
|
-
}
|
|
582
|
-
if (hasItems(e3.directives)) {
|
|
583
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
584
|
-
}
|
|
585
|
-
return r;
|
|
586
|
-
},
|
|
587
|
-
Field(e3) {
|
|
588
|
-
var r = (e3.alias ? e3.alias.value + ": " : "") + e3.name.value;
|
|
589
|
-
if (hasItems(e3.arguments)) {
|
|
590
|
-
var i3 = e3.arguments.map(y.Argument);
|
|
591
|
-
var n2 = r + "(" + i3.join(", ") + ")";
|
|
592
|
-
r = n2.length > 80 ? r + "(\n " + i3.join("\n").replace(/\n/g, "\n ") + "\n)" : n2;
|
|
593
|
-
}
|
|
594
|
-
if (hasItems(e3.directives)) {
|
|
595
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
596
|
-
}
|
|
597
|
-
return e3.selectionSet ? r + " " + y.SelectionSet(e3.selectionSet) : r;
|
|
598
|
-
},
|
|
599
|
-
StringValue: (e3) => e3.block ? printBlockString(e3.value) : printString(e3.value),
|
|
600
|
-
BooleanValue: (e3) => "" + e3.value,
|
|
601
|
-
NullValue: (e3) => "null",
|
|
602
|
-
IntValue: (e3) => e3.value,
|
|
603
|
-
FloatValue: (e3) => e3.value,
|
|
604
|
-
EnumValue: (e3) => e3.value,
|
|
605
|
-
Name: (e3) => e3.value,
|
|
606
|
-
Variable: (e3) => "$" + e3.name.value,
|
|
607
|
-
ListValue: (e3) => "[" + e3.values.map(print).join(", ") + "]",
|
|
608
|
-
ObjectValue: (e3) => "{" + e3.fields.map(y.ObjectField).join(", ") + "}",
|
|
609
|
-
ObjectField: (e3) => e3.name.value + ": " + print(e3.value),
|
|
610
|
-
Document: (e3) => hasItems(e3.definitions) ? e3.definitions.map(print).join("\n\n") : "",
|
|
611
|
-
SelectionSet: (e3) => "{\n " + e3.selections.map(print).join("\n").replace(/\n/g, "\n ") + "\n}",
|
|
612
|
-
Argument: (e3) => e3.name.value + ": " + print(e3.value),
|
|
613
|
-
FragmentSpread(e3) {
|
|
614
|
-
var r = "..." + e3.name.value;
|
|
615
|
-
if (hasItems(e3.directives)) {
|
|
616
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
617
|
-
}
|
|
618
|
-
return r;
|
|
619
|
-
},
|
|
620
|
-
InlineFragment(e3) {
|
|
621
|
-
var r = "...";
|
|
622
|
-
if (e3.typeCondition) {
|
|
623
|
-
r += " on " + e3.typeCondition.name.value;
|
|
624
|
-
}
|
|
625
|
-
if (hasItems(e3.directives)) {
|
|
626
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
627
|
-
}
|
|
628
|
-
return r + " " + print(e3.selectionSet);
|
|
629
|
-
},
|
|
630
|
-
FragmentDefinition(e3) {
|
|
631
|
-
var r = "fragment " + e3.name.value;
|
|
632
|
-
r += " on " + e3.typeCondition.name.value;
|
|
633
|
-
if (hasItems(e3.directives)) {
|
|
634
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
635
|
-
}
|
|
636
|
-
return r + " " + print(e3.selectionSet);
|
|
637
|
-
},
|
|
638
|
-
Directive(e3) {
|
|
639
|
-
var r = "@" + e3.name.value;
|
|
640
|
-
if (hasItems(e3.arguments)) {
|
|
641
|
-
r += "(" + e3.arguments.map(y.Argument).join(", ") + ")";
|
|
642
|
-
}
|
|
643
|
-
return r;
|
|
644
|
-
},
|
|
645
|
-
NamedType: (e3) => e3.name.value,
|
|
646
|
-
ListType: (e3) => "[" + print(e3.type) + "]",
|
|
647
|
-
NonNullType: (e3) => print(e3.type) + "!"
|
|
648
|
-
};
|
|
649
|
-
function print(e3) {
|
|
650
|
-
return y[e3.kind] ? y[e3.kind](e3) : "";
|
|
651
|
-
}
|
|
652
|
-
var teardownPlaceholder = () => {
|
|
653
|
-
};
|
|
654
|
-
var e$1 = teardownPlaceholder;
|
|
655
|
-
function start(e3) {
|
|
656
|
-
return {
|
|
657
|
-
tag: 0,
|
|
658
|
-
0: e3
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
function filter(r) {
|
|
662
|
-
return (t3) => (i3) => {
|
|
663
|
-
var a4 = e$1;
|
|
664
|
-
t3((e3) => {
|
|
665
|
-
if (0 === e3) {
|
|
666
|
-
i3(0);
|
|
667
|
-
} else if (0 === e3.tag) {
|
|
668
|
-
a4 = e3[0];
|
|
669
|
-
i3(e3);
|
|
670
|
-
} else if (!r(e3[0])) {
|
|
671
|
-
a4(0);
|
|
672
|
-
} else {
|
|
673
|
-
i3(e3);
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
function onEnd(e3) {
|
|
679
|
-
return (r) => (t3) => {
|
|
680
|
-
var i3 = false;
|
|
681
|
-
r((r2) => {
|
|
682
|
-
if (i3)
|
|
683
|
-
;
|
|
684
|
-
else if (0 === r2) {
|
|
685
|
-
i3 = true;
|
|
686
|
-
t3(0);
|
|
687
|
-
e3();
|
|
688
|
-
} else if (0 === r2.tag) {
|
|
689
|
-
var a4 = r2[0];
|
|
690
|
-
t3(start((r3) => {
|
|
691
|
-
if (1 === r3) {
|
|
692
|
-
i3 = true;
|
|
693
|
-
a4(1);
|
|
694
|
-
e3();
|
|
695
|
-
} else {
|
|
696
|
-
a4(r3);
|
|
697
|
-
}
|
|
698
|
-
}));
|
|
699
|
-
} else {
|
|
700
|
-
t3(r2);
|
|
701
|
-
}
|
|
702
|
-
});
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
function onPush(e3) {
|
|
706
|
-
return (r) => (t3) => {
|
|
707
|
-
var i3 = false;
|
|
708
|
-
r((r2) => {
|
|
709
|
-
if (i3)
|
|
710
|
-
;
|
|
711
|
-
else if (0 === r2) {
|
|
712
|
-
i3 = true;
|
|
713
|
-
t3(0);
|
|
714
|
-
} else if (0 === r2.tag) {
|
|
715
|
-
var a4 = r2[0];
|
|
716
|
-
t3(start((e4) => {
|
|
717
|
-
if (1 === e4) {
|
|
718
|
-
i3 = true;
|
|
719
|
-
}
|
|
720
|
-
a4(e4);
|
|
721
|
-
}));
|
|
722
|
-
} else {
|
|
723
|
-
e3(r2[0]);
|
|
724
|
-
t3(r2);
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
function take(r) {
|
|
730
|
-
return (t3) => (i3) => {
|
|
731
|
-
var a4 = e$1;
|
|
732
|
-
var f2 = false;
|
|
733
|
-
var n2 = 0;
|
|
734
|
-
t3((e3) => {
|
|
735
|
-
if (f2)
|
|
736
|
-
;
|
|
737
|
-
else if (0 === e3) {
|
|
738
|
-
f2 = true;
|
|
739
|
-
i3(0);
|
|
740
|
-
} else if (0 === e3.tag) {
|
|
741
|
-
if (r <= 0) {
|
|
742
|
-
f2 = true;
|
|
743
|
-
i3(0);
|
|
744
|
-
e3[0](1);
|
|
745
|
-
} else {
|
|
746
|
-
a4 = e3[0];
|
|
747
|
-
}
|
|
748
|
-
} else if (n2++ < r) {
|
|
749
|
-
i3(e3);
|
|
750
|
-
if (!f2 && n2 >= r) {
|
|
751
|
-
f2 = true;
|
|
752
|
-
i3(0);
|
|
753
|
-
a4(1);
|
|
754
|
-
}
|
|
755
|
-
} else {
|
|
756
|
-
i3(e3);
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
i3(start((e3) => {
|
|
760
|
-
if (1 === e3 && !f2) {
|
|
761
|
-
f2 = true;
|
|
762
|
-
a4(1);
|
|
763
|
-
} else if (0 === e3 && !f2 && n2 < r) {
|
|
764
|
-
a4(0);
|
|
765
|
-
}
|
|
766
|
-
}));
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
function subscribe(r) {
|
|
770
|
-
return (t3) => {
|
|
771
|
-
var i3 = e$1;
|
|
772
|
-
var a4 = false;
|
|
773
|
-
t3((e3) => {
|
|
774
|
-
if (0 === e3) {
|
|
775
|
-
a4 = true;
|
|
776
|
-
} else if (0 === e3.tag) {
|
|
777
|
-
(i3 = e3[0])(0);
|
|
778
|
-
} else if (!a4) {
|
|
779
|
-
r(e3[0]);
|
|
780
|
-
i3(0);
|
|
781
|
-
}
|
|
782
|
-
});
|
|
783
|
-
return {
|
|
784
|
-
unsubscribe() {
|
|
785
|
-
if (!a4) {
|
|
786
|
-
a4 = true;
|
|
787
|
-
i3(1);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
function toPromise(r) {
|
|
794
|
-
return new Promise((t3) => {
|
|
795
|
-
var i3 = e$1;
|
|
796
|
-
var a4;
|
|
797
|
-
r((e3) => {
|
|
798
|
-
if (0 === e3) {
|
|
799
|
-
Promise.resolve(a4).then(t3);
|
|
800
|
-
} else if (0 === e3.tag) {
|
|
801
|
-
(i3 = e3[0])(0);
|
|
802
|
-
} else {
|
|
803
|
-
a4 = e3[0];
|
|
804
|
-
i3(0);
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
});
|
|
808
|
-
}
|
|
809
|
-
var phash = (r, e3) => {
|
|
810
|
-
var t3 = 0 | (e3 || 5381);
|
|
811
|
-
for (var a4 = 0, o2 = 0 | r.length; a4 < o2; a4++) {
|
|
812
|
-
t3 = (t3 << 5) + t3 + r.charCodeAt(a4);
|
|
813
|
-
}
|
|
814
|
-
return t3;
|
|
815
|
-
};
|
|
816
|
-
var s = /* @__PURE__ */ new Set();
|
|
817
|
-
var i = /* @__PURE__ */ new WeakMap();
|
|
818
|
-
var stringify = (r) => {
|
|
819
|
-
if (null === r || s.has(r)) {
|
|
820
|
-
return "null";
|
|
821
|
-
} else if ("object" != typeof r) {
|
|
822
|
-
return JSON.stringify(r) || "";
|
|
823
|
-
} else if (r.toJSON) {
|
|
824
|
-
return stringify(r.toJSON());
|
|
825
|
-
} else if (Array.isArray(r)) {
|
|
826
|
-
var e3 = "[";
|
|
827
|
-
for (var t3 of r) {
|
|
828
|
-
if (e3.length > 1) {
|
|
829
|
-
e3 += ",";
|
|
830
|
-
}
|
|
831
|
-
e3 += stringify(t3) || "null";
|
|
832
|
-
}
|
|
833
|
-
return e3 += "]";
|
|
834
|
-
} else if (f !== NoopConstructor && r instanceof f || l !== NoopConstructor && r instanceof l) {
|
|
835
|
-
return "null";
|
|
836
|
-
}
|
|
837
|
-
var a4 = Object.keys(r).sort();
|
|
838
|
-
if (!a4.length && r.constructor && r.constructor !== Object) {
|
|
839
|
-
var o2 = i.get(r) || Math.random().toString(36).slice(2);
|
|
840
|
-
i.set(r, o2);
|
|
841
|
-
return stringify({
|
|
842
|
-
__key: o2
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
s.add(r);
|
|
846
|
-
var n2 = "{";
|
|
847
|
-
for (var v2 of a4) {
|
|
848
|
-
var c3 = stringify(r[v2]);
|
|
849
|
-
if (c3) {
|
|
850
|
-
if (n2.length > 1) {
|
|
851
|
-
n2 += ",";
|
|
852
|
-
}
|
|
853
|
-
n2 += stringify(v2) + ":" + c3;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
s.delete(r);
|
|
857
|
-
return n2 += "}";
|
|
858
|
-
};
|
|
859
|
-
var stringifyVariables = (r) => {
|
|
860
|
-
s.clear();
|
|
861
|
-
return stringify(r);
|
|
862
|
-
};
|
|
863
|
-
class NoopConstructor {
|
|
864
|
-
}
|
|
865
|
-
var f = "undefined" != typeof File ? File : NoopConstructor;
|
|
866
|
-
var l = "undefined" != typeof Blob ? Blob : NoopConstructor;
|
|
867
|
-
var v = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g;
|
|
868
|
-
var c = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g;
|
|
869
|
-
var replaceOutsideStrings = (r, e3) => e3 % 2 == 0 ? r.replace(c, "\n") : r;
|
|
870
|
-
var sanitizeDocument = (r) => r.split(v).map(replaceOutsideStrings).join("").trim();
|
|
871
|
-
var d$1 = /* @__PURE__ */ new Map();
|
|
872
|
-
var p = /* @__PURE__ */ new Map();
|
|
873
|
-
var stringifyDocument = (r) => {
|
|
874
|
-
var t3;
|
|
875
|
-
if ("string" == typeof r) {
|
|
876
|
-
t3 = sanitizeDocument(r);
|
|
877
|
-
} else if (r.loc && p.get(r.__key) === r) {
|
|
878
|
-
t3 = r.loc.source.body;
|
|
879
|
-
} else {
|
|
880
|
-
t3 = d$1.get(r) || sanitizeDocument(print(r));
|
|
881
|
-
d$1.set(r, t3);
|
|
882
|
-
}
|
|
883
|
-
if ("string" != typeof r && !r.loc) {
|
|
884
|
-
r.loc = {
|
|
885
|
-
start: 0,
|
|
886
|
-
end: t3.length,
|
|
887
|
-
source: {
|
|
888
|
-
body: t3,
|
|
889
|
-
name: "gql",
|
|
890
|
-
locationOffset: {
|
|
891
|
-
line: 1,
|
|
892
|
-
column: 1
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
return t3;
|
|
898
|
-
};
|
|
899
|
-
var hashDocument = (r) => {
|
|
900
|
-
var e3 = phash(stringifyDocument(r));
|
|
901
|
-
if (r.definitions) {
|
|
902
|
-
var t3 = getOperationName(r);
|
|
903
|
-
if (t3) {
|
|
904
|
-
e3 = phash(`
|
|
905
|
-
# ${t3}`, e3);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return e3;
|
|
909
|
-
};
|
|
910
|
-
var keyDocument = (r) => {
|
|
911
|
-
var e3;
|
|
912
|
-
var a4;
|
|
913
|
-
if ("string" == typeof r) {
|
|
914
|
-
e3 = hashDocument(r);
|
|
915
|
-
a4 = p.get(e3) || parse(r);
|
|
916
|
-
} else {
|
|
917
|
-
e3 = r.__key || hashDocument(r);
|
|
918
|
-
a4 = p.get(e3) || r;
|
|
919
|
-
}
|
|
920
|
-
if (!a4.loc) {
|
|
921
|
-
stringifyDocument(a4);
|
|
922
|
-
}
|
|
923
|
-
a4.__key = e3;
|
|
924
|
-
p.set(e3, a4);
|
|
925
|
-
return a4;
|
|
926
|
-
};
|
|
927
|
-
var createRequest = (r, e3, t3) => {
|
|
928
|
-
var a4 = e3 || {};
|
|
929
|
-
var o2 = keyDocument(r);
|
|
930
|
-
var n2 = stringifyVariables(a4);
|
|
931
|
-
var s4 = o2.__key;
|
|
932
|
-
if ("{}" !== n2) {
|
|
933
|
-
s4 = phash(n2, s4);
|
|
934
|
-
}
|
|
935
|
-
return {
|
|
936
|
-
key: s4,
|
|
937
|
-
query: o2,
|
|
938
|
-
variables: a4,
|
|
939
|
-
extensions: t3
|
|
940
|
-
};
|
|
941
|
-
};
|
|
942
|
-
var getOperationName = (r) => {
|
|
943
|
-
for (var e3 of r.definitions) {
|
|
944
|
-
if (e3.kind === e$2.OPERATION_DEFINITION) {
|
|
945
|
-
return e3.name ? e3.name.value : void 0;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
"undefined" != typeof TextDecoder ? new TextDecoder() : null;
|
|
950
|
-
/* @__PURE__ */ new Map();
|
|
951
|
-
/* @__PURE__ */ new Set();
|
|
952
|
-
var d = /* @__PURE__ */ new WeakMap();
|
|
953
|
-
function useClient() {
|
|
954
|
-
var e3 = getCurrentInstance();
|
|
955
|
-
if ("production" !== process.env.NODE_ENV && !e3) {
|
|
956
|
-
throw new Error("use* functions may only be called during the `setup()` or other lifecycle hooks.");
|
|
957
|
-
}
|
|
958
|
-
var r = inject("$urql");
|
|
959
|
-
if (!r && e3) {
|
|
960
|
-
r = d.get(e3);
|
|
961
|
-
}
|
|
962
|
-
if ("production" !== process.env.NODE_ENV && !r) {
|
|
963
|
-
throw new Error("No urql Client was provided. Did you forget to install the plugin or call `provideClient` in a parent?");
|
|
964
|
-
}
|
|
965
|
-
return r;
|
|
966
|
-
}
|
|
967
|
-
function unwrapPossibleProxy(e3) {
|
|
968
|
-
return e3 && isRef(e3) ? e3.value : e3;
|
|
969
|
-
}
|
|
970
|
-
var h = {
|
|
971
|
-
flush: "pre"
|
|
972
|
-
};
|
|
973
|
-
function callUseQuery(e3, l2 = useClient(), s4 = []) {
|
|
974
|
-
var n2 = reactive(e3);
|
|
975
|
-
var i3 = ref();
|
|
976
|
-
var v2 = ref(false);
|
|
977
|
-
var f2 = ref(false);
|
|
978
|
-
var y4 = ref();
|
|
979
|
-
var b2 = ref();
|
|
980
|
-
var P = ref();
|
|
981
|
-
var d4 = isRef(e3.pause) ? e3.pause : ref(!!e3.pause);
|
|
982
|
-
var x3 = ref(createRequest(unwrapPossibleProxy(n2.query), unwrapPossibleProxy(n2.variables)));
|
|
983
|
-
var w2 = ref();
|
|
984
|
-
s4.push(watchEffect(() => {
|
|
985
|
-
var e4 = createRequest(unwrapPossibleProxy(n2.query), unwrapPossibleProxy(n2.variables));
|
|
986
|
-
if (x3.value.key !== e4.key) {
|
|
987
|
-
x3.value = e4;
|
|
988
|
-
}
|
|
989
|
-
}, h));
|
|
990
|
-
s4.push(watchEffect(() => {
|
|
991
|
-
w2.value = !d4.value ? l2.value.executeQuery(x3.value, {
|
|
992
|
-
requestPolicy: unwrapPossibleProxy(n2.requestPolicy),
|
|
993
|
-
...unwrapPossibleProxy(n2.context)
|
|
994
|
-
}) : void 0;
|
|
995
|
-
}, h));
|
|
996
|
-
var q2 = {
|
|
997
|
-
data: i3,
|
|
998
|
-
stale: v2,
|
|
999
|
-
error: y4,
|
|
1000
|
-
operation: b2,
|
|
1001
|
-
extensions: P,
|
|
1002
|
-
fetching: f2,
|
|
1003
|
-
isPaused: d4,
|
|
1004
|
-
executeQuery(e4) {
|
|
1005
|
-
var r = w2.value = l2.value.executeQuery(x3.value, {
|
|
1006
|
-
requestPolicy: unwrapPossibleProxy(n2.requestPolicy),
|
|
1007
|
-
...n2.context,
|
|
1008
|
-
...e4
|
|
1009
|
-
});
|
|
1010
|
-
return {
|
|
1011
|
-
...E2,
|
|
1012
|
-
then(e5, u3) {
|
|
1013
|
-
var a4;
|
|
1014
|
-
return new Promise((e6) => {
|
|
1015
|
-
var u4 = false;
|
|
1016
|
-
a4 = subscribe(() => {
|
|
1017
|
-
if (!q2.fetching.value && !q2.stale.value) {
|
|
1018
|
-
if (a4) {
|
|
1019
|
-
a4.unsubscribe();
|
|
1020
|
-
}
|
|
1021
|
-
u4 = true;
|
|
1022
|
-
e6(q2);
|
|
1023
|
-
}
|
|
1024
|
-
})(r);
|
|
1025
|
-
if (u4) {
|
|
1026
|
-
a4.unsubscribe();
|
|
1027
|
-
}
|
|
1028
|
-
}).then(e5, u3);
|
|
1029
|
-
}
|
|
1030
|
-
};
|
|
1031
|
-
},
|
|
1032
|
-
pause() {
|
|
1033
|
-
d4.value = true;
|
|
1034
|
-
},
|
|
1035
|
-
resume() {
|
|
1036
|
-
d4.value = false;
|
|
1037
|
-
}
|
|
1038
|
-
};
|
|
1039
|
-
s4.push(watchEffect((e4) => {
|
|
1040
|
-
if (w2.value) {
|
|
1041
|
-
f2.value = true;
|
|
1042
|
-
v2.value = false;
|
|
1043
|
-
e4(subscribe((e5) => {
|
|
1044
|
-
i3.value = e5.data;
|
|
1045
|
-
v2.value = !!e5.stale;
|
|
1046
|
-
f2.value = false;
|
|
1047
|
-
y4.value = e5.error;
|
|
1048
|
-
b2.value = e5.operation;
|
|
1049
|
-
P.value = e5.extensions;
|
|
1050
|
-
})(onEnd(() => {
|
|
1051
|
-
f2.value = false;
|
|
1052
|
-
v2.value = false;
|
|
1053
|
-
})(w2.value)).unsubscribe);
|
|
1054
|
-
} else {
|
|
1055
|
-
f2.value = false;
|
|
1056
|
-
v2.value = false;
|
|
1057
|
-
}
|
|
1058
|
-
}, {
|
|
1059
|
-
flush: "sync"
|
|
1060
|
-
}));
|
|
1061
|
-
var E2 = {
|
|
1062
|
-
...q2,
|
|
1063
|
-
then(e4, r) {
|
|
1064
|
-
var u3;
|
|
1065
|
-
return new Promise((e5) => {
|
|
1066
|
-
if (!w2.value) {
|
|
1067
|
-
return e5(q2);
|
|
1068
|
-
}
|
|
1069
|
-
var r2 = false;
|
|
1070
|
-
u3 = subscribe(() => {
|
|
1071
|
-
if (!q2.fetching.value && !q2.stale.value) {
|
|
1072
|
-
if (u3) {
|
|
1073
|
-
u3.unsubscribe();
|
|
1074
|
-
}
|
|
1075
|
-
r2 = true;
|
|
1076
|
-
e5(q2);
|
|
1077
|
-
}
|
|
1078
|
-
})(w2.value);
|
|
1079
|
-
if (r2) {
|
|
1080
|
-
u3.unsubscribe();
|
|
1081
|
-
}
|
|
1082
|
-
}).then(e4, r);
|
|
1083
|
-
}
|
|
1084
|
-
};
|
|
1085
|
-
return E2;
|
|
1086
|
-
}
|
|
1087
|
-
function callUseMutation(e3, u3 = useClient()) {
|
|
1088
|
-
var l2 = ref();
|
|
1089
|
-
var s4 = ref(false);
|
|
1090
|
-
var n2 = ref(false);
|
|
1091
|
-
var t3 = ref();
|
|
1092
|
-
var o2 = ref();
|
|
1093
|
-
var i3 = ref();
|
|
1094
|
-
return {
|
|
1095
|
-
data: l2,
|
|
1096
|
-
stale: s4,
|
|
1097
|
-
fetching: n2,
|
|
1098
|
-
error: t3,
|
|
1099
|
-
operation: o2,
|
|
1100
|
-
extensions: i3,
|
|
1101
|
-
executeMutation(a4, v2) {
|
|
1102
|
-
n2.value = true;
|
|
1103
|
-
return toPromise(take(1)(filter((e4) => !e4.hasNext)(onPush((e4) => {
|
|
1104
|
-
l2.value = e4.data;
|
|
1105
|
-
s4.value = e4.stale;
|
|
1106
|
-
n2.value = false;
|
|
1107
|
-
t3.value = e4.error;
|
|
1108
|
-
o2.value = e4.operation;
|
|
1109
|
-
i3.value = e4.extensions;
|
|
1110
|
-
})(u3.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a4)), v2 || {})))));
|
|
1111
|
-
}
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
var x = {
|
|
1115
|
-
flush: "pre"
|
|
1116
|
-
};
|
|
1117
|
-
function callUseSubscription(e3, l2, s4 = useClient(), n2 = []) {
|
|
1118
|
-
var i3 = reactive(e3);
|
|
1119
|
-
var v2 = ref();
|
|
1120
|
-
var f2 = ref(false);
|
|
1121
|
-
var y4 = ref(false);
|
|
1122
|
-
var b2 = ref();
|
|
1123
|
-
var P = ref();
|
|
1124
|
-
var d4 = ref();
|
|
1125
|
-
var h4 = ref(l2);
|
|
1126
|
-
var w2 = isRef(e3.pause) ? e3.pause : ref(!!e3.pause);
|
|
1127
|
-
var q2 = ref(createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables)));
|
|
1128
|
-
var E2 = ref();
|
|
1129
|
-
n2.push(watchEffect(() => {
|
|
1130
|
-
var e4 = createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables));
|
|
1131
|
-
if (q2.value.key !== e4.key) {
|
|
1132
|
-
q2.value = e4;
|
|
1133
|
-
}
|
|
1134
|
-
}, x));
|
|
1135
|
-
n2.push(watchEffect(() => {
|
|
1136
|
-
E2.value = !w2.value ? s4.value.executeSubscription(q2.value, {
|
|
1137
|
-
...unwrapPossibleProxy(i3.context)
|
|
1138
|
-
}) : void 0;
|
|
1139
|
-
}, x));
|
|
1140
|
-
n2.push(watchEffect((e4) => {
|
|
1141
|
-
if (E2.value) {
|
|
1142
|
-
y4.value = true;
|
|
1143
|
-
e4(subscribe((e5) => {
|
|
1144
|
-
y4.value = true;
|
|
1145
|
-
v2.value = void 0 !== e5.data ? "function" == typeof h4.value ? h4.value(v2.value, e5.data) : e5.data : e5.data, b2.value = e5.error;
|
|
1146
|
-
d4.value = e5.extensions;
|
|
1147
|
-
f2.value = !!e5.stale;
|
|
1148
|
-
P.value = e5.operation;
|
|
1149
|
-
})(onEnd(() => {
|
|
1150
|
-
y4.value = false;
|
|
1151
|
-
})(E2.value)).unsubscribe);
|
|
1152
|
-
} else {
|
|
1153
|
-
y4.value = false;
|
|
1154
|
-
}
|
|
1155
|
-
}, x));
|
|
1156
|
-
var m4 = {
|
|
1157
|
-
data: v2,
|
|
1158
|
-
stale: f2,
|
|
1159
|
-
error: b2,
|
|
1160
|
-
operation: P,
|
|
1161
|
-
extensions: d4,
|
|
1162
|
-
fetching: y4,
|
|
1163
|
-
isPaused: w2,
|
|
1164
|
-
executeSubscription(e4) {
|
|
1165
|
-
E2.value = s4.value.executeSubscription(q2.value, {
|
|
1166
|
-
...unwrapPossibleProxy(i3.context),
|
|
1167
|
-
...e4
|
|
1168
|
-
});
|
|
1169
|
-
return m4;
|
|
1170
|
-
},
|
|
1171
|
-
pause() {
|
|
1172
|
-
w2.value = true;
|
|
1173
|
-
},
|
|
1174
|
-
resume() {
|
|
1175
|
-
w2.value = false;
|
|
1176
|
-
}
|
|
1177
|
-
};
|
|
1178
|
-
return m4;
|
|
1179
|
-
}
|
|
1180
|
-
function useClientHandle() {
|
|
1181
|
-
var e3 = useClient();
|
|
1182
|
-
var r = [];
|
|
1183
|
-
onBeforeUnmount(() => {
|
|
1184
|
-
var e4;
|
|
1185
|
-
while (e4 = r.shift()) {
|
|
1186
|
-
e4();
|
|
1187
|
-
}
|
|
1188
|
-
});
|
|
1189
|
-
var u3 = {
|
|
1190
|
-
client: e3.value,
|
|
1191
|
-
useQuery: (u4) => callUseQuery(u4, e3, r),
|
|
1192
|
-
useSubscription: (u4, a4) => callUseSubscription(u4, a4, e3, r),
|
|
1193
|
-
useMutation: (r2) => callUseMutation(r2, e3)
|
|
1194
|
-
};
|
|
1195
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
1196
|
-
onMounted(() => {
|
|
1197
|
-
Object.assign(u3, {
|
|
1198
|
-
useQuery(u4) {
|
|
1199
|
-
if ("production" !== process.env.NODE_ENV && !getCurrentInstance()) {
|
|
1200
|
-
throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
|
|
1201
|
-
}
|
|
1202
|
-
return callUseQuery(u4, e3, r);
|
|
1203
|
-
},
|
|
1204
|
-
useSubscription(u4, a4) {
|
|
1205
|
-
if ("production" !== process.env.NODE_ENV && !getCurrentInstance()) {
|
|
1206
|
-
throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
|
|
1207
|
-
}
|
|
1208
|
-
return callUseSubscription(u4, a4, e3, r);
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
return u3;
|
|
1214
|
-
}
|
|
1215
|
-
function _typeof(obj) {
|
|
1216
|
-
"@babel/helpers - typeof";
|
|
1217
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
1218
|
-
return typeof obj2;
|
|
1219
|
-
} : function(obj2) {
|
|
1220
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
1221
|
-
}, _typeof(obj);
|
|
1222
|
-
}
|
|
1223
|
-
function toInteger(dirtyNumber) {
|
|
1224
|
-
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
1225
|
-
return NaN;
|
|
1226
|
-
}
|
|
1227
|
-
var number = Number(dirtyNumber);
|
|
1228
|
-
if (isNaN(number)) {
|
|
1229
|
-
return number;
|
|
1230
|
-
}
|
|
1231
|
-
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
1232
|
-
}
|
|
1233
|
-
function requiredArgs(required, args) {
|
|
1234
|
-
if (args.length < required) {
|
|
1235
|
-
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
function toDate(argument) {
|
|
1239
|
-
requiredArgs(1, arguments);
|
|
1240
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
1241
|
-
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
1242
|
-
return new Date(argument.getTime());
|
|
1243
|
-
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
1244
|
-
return new Date(argument);
|
|
1245
|
-
} else {
|
|
1246
|
-
if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
|
|
1247
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
1248
|
-
console.warn(new Error().stack);
|
|
1249
|
-
}
|
|
1250
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
1254
|
-
requiredArgs(2, arguments);
|
|
1255
|
-
var timestamp = toDate(dirtyDate).getTime();
|
|
1256
|
-
var amount = toInteger(dirtyAmount);
|
|
1257
|
-
return new Date(timestamp + amount);
|
|
1258
|
-
}
|
|
1259
|
-
var defaultOptions = {};
|
|
1260
|
-
function getDefaultOptions() {
|
|
1261
|
-
return defaultOptions;
|
|
1262
|
-
}
|
|
1263
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
1264
|
-
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
1265
|
-
utcDate.setUTCFullYear(date.getFullYear());
|
|
1266
|
-
return date.getTime() - utcDate.getTime();
|
|
1267
|
-
}
|
|
1268
|
-
function startOfDay(dirtyDate) {
|
|
1269
|
-
requiredArgs(1, arguments);
|
|
1270
|
-
var date = toDate(dirtyDate);
|
|
1271
|
-
date.setHours(0, 0, 0, 0);
|
|
1272
|
-
return date;
|
|
1273
|
-
}
|
|
1274
|
-
function isDate(value2) {
|
|
1275
|
-
requiredArgs(1, arguments);
|
|
1276
|
-
return value2 instanceof Date || _typeof(value2) === "object" && Object.prototype.toString.call(value2) === "[object Date]";
|
|
1277
|
-
}
|
|
1278
|
-
function isValid(dirtyDate) {
|
|
1279
|
-
requiredArgs(1, arguments);
|
|
1280
|
-
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
1281
|
-
return false;
|
|
1282
|
-
}
|
|
1283
|
-
var date = toDate(dirtyDate);
|
|
1284
|
-
return !isNaN(Number(date));
|
|
1285
|
-
}
|
|
1286
|
-
function endOfDay(dirtyDate) {
|
|
1287
|
-
requiredArgs(1, arguments);
|
|
1288
|
-
var date = toDate(dirtyDate);
|
|
1289
|
-
date.setHours(23, 59, 59, 999);
|
|
1290
|
-
return date;
|
|
1291
|
-
}
|
|
1292
|
-
function endOfToday() {
|
|
1293
|
-
return endOfDay(Date.now());
|
|
1294
|
-
}
|
|
1295
|
-
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
1296
|
-
requiredArgs(2, arguments);
|
|
1297
|
-
var amount = toInteger(dirtyAmount);
|
|
1298
|
-
return addMilliseconds(dirtyDate, -amount);
|
|
1299
|
-
}
|
|
1300
|
-
var MILLISECONDS_IN_DAY = 864e5;
|
|
1301
|
-
function getUTCDayOfYear(dirtyDate) {
|
|
1302
|
-
requiredArgs(1, arguments);
|
|
1303
|
-
var date = toDate(dirtyDate);
|
|
1304
|
-
var timestamp = date.getTime();
|
|
1305
|
-
date.setUTCMonth(0, 1);
|
|
1306
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1307
|
-
var startOfYearTimestamp = date.getTime();
|
|
1308
|
-
var difference = timestamp - startOfYearTimestamp;
|
|
1309
|
-
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
1310
|
-
}
|
|
1311
|
-
function startOfUTCISOWeek(dirtyDate) {
|
|
1312
|
-
requiredArgs(1, arguments);
|
|
1313
|
-
var weekStartsOn = 1;
|
|
1314
|
-
var date = toDate(dirtyDate);
|
|
1315
|
-
var day = date.getUTCDay();
|
|
1316
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
1317
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
1318
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1319
|
-
return date;
|
|
1320
|
-
}
|
|
1321
|
-
function getUTCISOWeekYear(dirtyDate) {
|
|
1322
|
-
requiredArgs(1, arguments);
|
|
1323
|
-
var date = toDate(dirtyDate);
|
|
1324
|
-
var year = date.getUTCFullYear();
|
|
1325
|
-
var fourthOfJanuaryOfNextYear = /* @__PURE__ */ new Date(0);
|
|
1326
|
-
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
1327
|
-
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
1328
|
-
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
1329
|
-
var fourthOfJanuaryOfThisYear = /* @__PURE__ */ new Date(0);
|
|
1330
|
-
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
1331
|
-
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
1332
|
-
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
1333
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
1334
|
-
return year + 1;
|
|
1335
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
1336
|
-
return year;
|
|
1337
|
-
} else {
|
|
1338
|
-
return year - 1;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
function startOfUTCISOWeekYear(dirtyDate) {
|
|
1342
|
-
requiredArgs(1, arguments);
|
|
1343
|
-
var year = getUTCISOWeekYear(dirtyDate);
|
|
1344
|
-
var fourthOfJanuary = /* @__PURE__ */ new Date(0);
|
|
1345
|
-
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
1346
|
-
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
1347
|
-
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
1348
|
-
return date;
|
|
1349
|
-
}
|
|
1350
|
-
var MILLISECONDS_IN_WEEK$1 = 6048e5;
|
|
1351
|
-
function getUTCISOWeek(dirtyDate) {
|
|
1352
|
-
requiredArgs(1, arguments);
|
|
1353
|
-
var date = toDate(dirtyDate);
|
|
1354
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
1355
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
1356
|
-
}
|
|
1357
|
-
function startOfUTCWeek(dirtyDate, options) {
|
|
1358
|
-
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1359
|
-
requiredArgs(1, arguments);
|
|
1360
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1361
|
-
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
1362
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
1363
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1364
|
-
}
|
|
1365
|
-
var date = toDate(dirtyDate);
|
|
1366
|
-
var day = date.getUTCDay();
|
|
1367
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
1368
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
1369
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1370
|
-
return date;
|
|
1371
|
-
}
|
|
1372
|
-
function getUTCWeekYear(dirtyDate, options) {
|
|
1373
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1374
|
-
requiredArgs(1, arguments);
|
|
1375
|
-
var date = toDate(dirtyDate);
|
|
1376
|
-
var year = date.getUTCFullYear();
|
|
1377
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1378
|
-
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
1379
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
1380
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1381
|
-
}
|
|
1382
|
-
var firstWeekOfNextYear = /* @__PURE__ */ new Date(0);
|
|
1383
|
-
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
1384
|
-
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
1385
|
-
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
1386
|
-
var firstWeekOfThisYear = /* @__PURE__ */ new Date(0);
|
|
1387
|
-
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
1388
|
-
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
1389
|
-
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
1390
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
1391
|
-
return year + 1;
|
|
1392
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
1393
|
-
return year;
|
|
1394
|
-
} else {
|
|
1395
|
-
return year - 1;
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
function startOfUTCWeekYear(dirtyDate, options) {
|
|
1399
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1400
|
-
requiredArgs(1, arguments);
|
|
1401
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1402
|
-
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
1403
|
-
var year = getUTCWeekYear(dirtyDate, options);
|
|
1404
|
-
var firstWeek = /* @__PURE__ */ new Date(0);
|
|
1405
|
-
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
1406
|
-
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
1407
|
-
var date = startOfUTCWeek(firstWeek, options);
|
|
1408
|
-
return date;
|
|
1409
|
-
}
|
|
1410
|
-
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
1411
|
-
function getUTCWeek(dirtyDate, options) {
|
|
1412
|
-
requiredArgs(1, arguments);
|
|
1413
|
-
var date = toDate(dirtyDate);
|
|
1414
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
1415
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
1416
|
-
}
|
|
1417
|
-
function addLeadingZeros(number, targetLength) {
|
|
1418
|
-
var sign = number < 0 ? "-" : "";
|
|
1419
|
-
var output = Math.abs(number).toString();
|
|
1420
|
-
while (output.length < targetLength) {
|
|
1421
|
-
output = "0" + output;
|
|
1422
|
-
}
|
|
1423
|
-
return sign + output;
|
|
1424
|
-
}
|
|
1425
|
-
var formatters$2 = {
|
|
1426
|
-
// Year
|
|
1427
|
-
y: function y2(date, token) {
|
|
1428
|
-
var signedYear = date.getUTCFullYear();
|
|
1429
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1430
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
1431
|
-
},
|
|
1432
|
-
// Month
|
|
1433
|
-
M: function M(date, token) {
|
|
1434
|
-
var month = date.getUTCMonth();
|
|
1435
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
1436
|
-
},
|
|
1437
|
-
// Day of the month
|
|
1438
|
-
d: function d2(date, token) {
|
|
1439
|
-
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
1440
|
-
},
|
|
1441
|
-
// AM or PM
|
|
1442
|
-
a: function a2(date, token) {
|
|
1443
|
-
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
1444
|
-
switch (token) {
|
|
1445
|
-
case "a":
|
|
1446
|
-
case "aa":
|
|
1447
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
1448
|
-
case "aaa":
|
|
1449
|
-
return dayPeriodEnumValue;
|
|
1450
|
-
case "aaaaa":
|
|
1451
|
-
return dayPeriodEnumValue[0];
|
|
1452
|
-
case "aaaa":
|
|
1453
|
-
default:
|
|
1454
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
1455
|
-
}
|
|
1456
|
-
},
|
|
1457
|
-
// Hour [1-12]
|
|
1458
|
-
h: function h2(date, token) {
|
|
1459
|
-
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
1460
|
-
},
|
|
1461
|
-
// Hour [0-23]
|
|
1462
|
-
H: function H(date, token) {
|
|
1463
|
-
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
1464
|
-
},
|
|
1465
|
-
// Minute
|
|
1466
|
-
m: function m2(date, token) {
|
|
1467
|
-
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
1468
|
-
},
|
|
1469
|
-
// Second
|
|
1470
|
-
s: function s2(date, token) {
|
|
1471
|
-
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
1472
|
-
},
|
|
1473
|
-
// Fraction of second
|
|
1474
|
-
S: function S(date, token) {
|
|
1475
|
-
var numberOfDigits = token.length;
|
|
1476
|
-
var milliseconds = date.getUTCMilliseconds();
|
|
1477
|
-
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
1478
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
|
-
const formatters$3 = formatters$2;
|
|
1482
|
-
var dayPeriodEnum = {
|
|
1483
|
-
am: "am",
|
|
1484
|
-
pm: "pm",
|
|
1485
|
-
midnight: "midnight",
|
|
1486
|
-
noon: "noon",
|
|
1487
|
-
morning: "morning",
|
|
1488
|
-
afternoon: "afternoon",
|
|
1489
|
-
evening: "evening",
|
|
1490
|
-
night: "night"
|
|
1491
|
-
};
|
|
1492
|
-
var formatters = {
|
|
1493
|
-
// Era
|
|
1494
|
-
G: function G(date, token, localize2) {
|
|
1495
|
-
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
1496
|
-
switch (token) {
|
|
1497
|
-
case "G":
|
|
1498
|
-
case "GG":
|
|
1499
|
-
case "GGG":
|
|
1500
|
-
return localize2.era(era, {
|
|
1501
|
-
width: "abbreviated"
|
|
1502
|
-
});
|
|
1503
|
-
case "GGGGG":
|
|
1504
|
-
return localize2.era(era, {
|
|
1505
|
-
width: "narrow"
|
|
1506
|
-
});
|
|
1507
|
-
case "GGGG":
|
|
1508
|
-
default:
|
|
1509
|
-
return localize2.era(era, {
|
|
1510
|
-
width: "wide"
|
|
1511
|
-
});
|
|
1512
|
-
}
|
|
1513
|
-
},
|
|
1514
|
-
// Year
|
|
1515
|
-
y: function y3(date, token, localize2) {
|
|
1516
|
-
if (token === "yo") {
|
|
1517
|
-
var signedYear = date.getUTCFullYear();
|
|
1518
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1519
|
-
return localize2.ordinalNumber(year, {
|
|
1520
|
-
unit: "year"
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
|
-
return formatters$3.y(date, token);
|
|
1524
|
-
},
|
|
1525
|
-
// Local week-numbering year
|
|
1526
|
-
Y: function Y(date, token, localize2, options) {
|
|
1527
|
-
var signedWeekYear = getUTCWeekYear(date, options);
|
|
1528
|
-
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
1529
|
-
if (token === "YY") {
|
|
1530
|
-
var twoDigitYear = weekYear % 100;
|
|
1531
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
1532
|
-
}
|
|
1533
|
-
if (token === "Yo") {
|
|
1534
|
-
return localize2.ordinalNumber(weekYear, {
|
|
1535
|
-
unit: "year"
|
|
1536
|
-
});
|
|
1537
|
-
}
|
|
1538
|
-
return addLeadingZeros(weekYear, token.length);
|
|
1539
|
-
},
|
|
1540
|
-
// ISO week-numbering year
|
|
1541
|
-
R: function R(date, token) {
|
|
1542
|
-
var isoWeekYear = getUTCISOWeekYear(date);
|
|
1543
|
-
return addLeadingZeros(isoWeekYear, token.length);
|
|
1544
|
-
},
|
|
1545
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
1546
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
1547
|
-
// | Year | `y` | `u` |
|
|
1548
|
-
// |------|-----|-----|
|
|
1549
|
-
// | AC 1 | 1 | 1 |
|
|
1550
|
-
// | BC 1 | 1 | 0 |
|
|
1551
|
-
// | BC 2 | 2 | -1 |
|
|
1552
|
-
// Also `yy` always returns the last two digits of a year,
|
|
1553
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1554
|
-
u: function u2(date, token) {
|
|
1555
|
-
var year = date.getUTCFullYear();
|
|
1556
|
-
return addLeadingZeros(year, token.length);
|
|
1557
|
-
},
|
|
1558
|
-
// Quarter
|
|
1559
|
-
Q: function Q(date, token, localize2) {
|
|
1560
|
-
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
1561
|
-
switch (token) {
|
|
1562
|
-
case "Q":
|
|
1563
|
-
return String(quarter);
|
|
1564
|
-
case "QQ":
|
|
1565
|
-
return addLeadingZeros(quarter, 2);
|
|
1566
|
-
case "Qo":
|
|
1567
|
-
return localize2.ordinalNumber(quarter, {
|
|
1568
|
-
unit: "quarter"
|
|
1569
|
-
});
|
|
1570
|
-
case "QQQ":
|
|
1571
|
-
return localize2.quarter(quarter, {
|
|
1572
|
-
width: "abbreviated",
|
|
1573
|
-
context: "formatting"
|
|
1574
|
-
});
|
|
1575
|
-
case "QQQQQ":
|
|
1576
|
-
return localize2.quarter(quarter, {
|
|
1577
|
-
width: "narrow",
|
|
1578
|
-
context: "formatting"
|
|
1579
|
-
});
|
|
1580
|
-
case "QQQQ":
|
|
1581
|
-
default:
|
|
1582
|
-
return localize2.quarter(quarter, {
|
|
1583
|
-
width: "wide",
|
|
1584
|
-
context: "formatting"
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
// Stand-alone quarter
|
|
1589
|
-
q: function q(date, token, localize2) {
|
|
1590
|
-
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
1591
|
-
switch (token) {
|
|
1592
|
-
case "q":
|
|
1593
|
-
return String(quarter);
|
|
1594
|
-
case "qq":
|
|
1595
|
-
return addLeadingZeros(quarter, 2);
|
|
1596
|
-
case "qo":
|
|
1597
|
-
return localize2.ordinalNumber(quarter, {
|
|
1598
|
-
unit: "quarter"
|
|
1599
|
-
});
|
|
1600
|
-
case "qqq":
|
|
1601
|
-
return localize2.quarter(quarter, {
|
|
1602
|
-
width: "abbreviated",
|
|
1603
|
-
context: "standalone"
|
|
1604
|
-
});
|
|
1605
|
-
case "qqqqq":
|
|
1606
|
-
return localize2.quarter(quarter, {
|
|
1607
|
-
width: "narrow",
|
|
1608
|
-
context: "standalone"
|
|
1609
|
-
});
|
|
1610
|
-
case "qqqq":
|
|
1611
|
-
default:
|
|
1612
|
-
return localize2.quarter(quarter, {
|
|
1613
|
-
width: "wide",
|
|
1614
|
-
context: "standalone"
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1617
|
-
},
|
|
1618
|
-
// Month
|
|
1619
|
-
M: function M2(date, token, localize2) {
|
|
1620
|
-
var month = date.getUTCMonth();
|
|
1621
|
-
switch (token) {
|
|
1622
|
-
case "M":
|
|
1623
|
-
case "MM":
|
|
1624
|
-
return formatters$3.M(date, token);
|
|
1625
|
-
case "Mo":
|
|
1626
|
-
return localize2.ordinalNumber(month + 1, {
|
|
1627
|
-
unit: "month"
|
|
1628
|
-
});
|
|
1629
|
-
case "MMM":
|
|
1630
|
-
return localize2.month(month, {
|
|
1631
|
-
width: "abbreviated",
|
|
1632
|
-
context: "formatting"
|
|
1633
|
-
});
|
|
1634
|
-
case "MMMMM":
|
|
1635
|
-
return localize2.month(month, {
|
|
1636
|
-
width: "narrow",
|
|
1637
|
-
context: "formatting"
|
|
1638
|
-
});
|
|
1639
|
-
case "MMMM":
|
|
1640
|
-
default:
|
|
1641
|
-
return localize2.month(month, {
|
|
1642
|
-
width: "wide",
|
|
1643
|
-
context: "formatting"
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
},
|
|
1647
|
-
// Stand-alone month
|
|
1648
|
-
L: function L(date, token, localize2) {
|
|
1649
|
-
var month = date.getUTCMonth();
|
|
1650
|
-
switch (token) {
|
|
1651
|
-
case "L":
|
|
1652
|
-
return String(month + 1);
|
|
1653
|
-
case "LL":
|
|
1654
|
-
return addLeadingZeros(month + 1, 2);
|
|
1655
|
-
case "Lo":
|
|
1656
|
-
return localize2.ordinalNumber(month + 1, {
|
|
1657
|
-
unit: "month"
|
|
1658
|
-
});
|
|
1659
|
-
case "LLL":
|
|
1660
|
-
return localize2.month(month, {
|
|
1661
|
-
width: "abbreviated",
|
|
1662
|
-
context: "standalone"
|
|
1663
|
-
});
|
|
1664
|
-
case "LLLLL":
|
|
1665
|
-
return localize2.month(month, {
|
|
1666
|
-
width: "narrow",
|
|
1667
|
-
context: "standalone"
|
|
1668
|
-
});
|
|
1669
|
-
case "LLLL":
|
|
1670
|
-
default:
|
|
1671
|
-
return localize2.month(month, {
|
|
1672
|
-
width: "wide",
|
|
1673
|
-
context: "standalone"
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
},
|
|
1677
|
-
// Local week of year
|
|
1678
|
-
w: function w(date, token, localize2, options) {
|
|
1679
|
-
var week = getUTCWeek(date, options);
|
|
1680
|
-
if (token === "wo") {
|
|
1681
|
-
return localize2.ordinalNumber(week, {
|
|
1682
|
-
unit: "week"
|
|
1683
|
-
});
|
|
1684
|
-
}
|
|
1685
|
-
return addLeadingZeros(week, token.length);
|
|
1686
|
-
},
|
|
1687
|
-
// ISO week of year
|
|
1688
|
-
I: function I(date, token, localize2) {
|
|
1689
|
-
var isoWeek = getUTCISOWeek(date);
|
|
1690
|
-
if (token === "Io") {
|
|
1691
|
-
return localize2.ordinalNumber(isoWeek, {
|
|
1692
|
-
unit: "week"
|
|
1693
|
-
});
|
|
1694
|
-
}
|
|
1695
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
1696
|
-
},
|
|
1697
|
-
// Day of the month
|
|
1698
|
-
d: function d3(date, token, localize2) {
|
|
1699
|
-
if (token === "do") {
|
|
1700
|
-
return localize2.ordinalNumber(date.getUTCDate(), {
|
|
1701
|
-
unit: "date"
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
return formatters$3.d(date, token);
|
|
1705
|
-
},
|
|
1706
|
-
// Day of year
|
|
1707
|
-
D: function D(date, token, localize2) {
|
|
1708
|
-
var dayOfYear = getUTCDayOfYear(date);
|
|
1709
|
-
if (token === "Do") {
|
|
1710
|
-
return localize2.ordinalNumber(dayOfYear, {
|
|
1711
|
-
unit: "dayOfYear"
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
1715
|
-
},
|
|
1716
|
-
// Day of week
|
|
1717
|
-
E: function E(date, token, localize2) {
|
|
1718
|
-
var dayOfWeek = date.getUTCDay();
|
|
1719
|
-
switch (token) {
|
|
1720
|
-
case "E":
|
|
1721
|
-
case "EE":
|
|
1722
|
-
case "EEE":
|
|
1723
|
-
return localize2.day(dayOfWeek, {
|
|
1724
|
-
width: "abbreviated",
|
|
1725
|
-
context: "formatting"
|
|
1726
|
-
});
|
|
1727
|
-
case "EEEEE":
|
|
1728
|
-
return localize2.day(dayOfWeek, {
|
|
1729
|
-
width: "narrow",
|
|
1730
|
-
context: "formatting"
|
|
1731
|
-
});
|
|
1732
|
-
case "EEEEEE":
|
|
1733
|
-
return localize2.day(dayOfWeek, {
|
|
1734
|
-
width: "short",
|
|
1735
|
-
context: "formatting"
|
|
1736
|
-
});
|
|
1737
|
-
case "EEEE":
|
|
1738
|
-
default:
|
|
1739
|
-
return localize2.day(dayOfWeek, {
|
|
1740
|
-
width: "wide",
|
|
1741
|
-
context: "formatting"
|
|
1742
|
-
});
|
|
1743
|
-
}
|
|
1744
|
-
},
|
|
1745
|
-
// Local day of week
|
|
1746
|
-
e: function e(date, token, localize2, options) {
|
|
1747
|
-
var dayOfWeek = date.getUTCDay();
|
|
1748
|
-
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1749
|
-
switch (token) {
|
|
1750
|
-
case "e":
|
|
1751
|
-
return String(localDayOfWeek);
|
|
1752
|
-
case "ee":
|
|
1753
|
-
return addLeadingZeros(localDayOfWeek, 2);
|
|
1754
|
-
case "eo":
|
|
1755
|
-
return localize2.ordinalNumber(localDayOfWeek, {
|
|
1756
|
-
unit: "day"
|
|
1757
|
-
});
|
|
1758
|
-
case "eee":
|
|
1759
|
-
return localize2.day(dayOfWeek, {
|
|
1760
|
-
width: "abbreviated",
|
|
1761
|
-
context: "formatting"
|
|
1762
|
-
});
|
|
1763
|
-
case "eeeee":
|
|
1764
|
-
return localize2.day(dayOfWeek, {
|
|
1765
|
-
width: "narrow",
|
|
1766
|
-
context: "formatting"
|
|
1767
|
-
});
|
|
1768
|
-
case "eeeeee":
|
|
1769
|
-
return localize2.day(dayOfWeek, {
|
|
1770
|
-
width: "short",
|
|
1771
|
-
context: "formatting"
|
|
1772
|
-
});
|
|
1773
|
-
case "eeee":
|
|
1774
|
-
default:
|
|
1775
|
-
return localize2.day(dayOfWeek, {
|
|
1776
|
-
width: "wide",
|
|
1777
|
-
context: "formatting"
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
},
|
|
1781
|
-
// Stand-alone local day of week
|
|
1782
|
-
c: function c2(date, token, localize2, options) {
|
|
1783
|
-
var dayOfWeek = date.getUTCDay();
|
|
1784
|
-
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1785
|
-
switch (token) {
|
|
1786
|
-
case "c":
|
|
1787
|
-
return String(localDayOfWeek);
|
|
1788
|
-
case "cc":
|
|
1789
|
-
return addLeadingZeros(localDayOfWeek, token.length);
|
|
1790
|
-
case "co":
|
|
1791
|
-
return localize2.ordinalNumber(localDayOfWeek, {
|
|
1792
|
-
unit: "day"
|
|
1793
|
-
});
|
|
1794
|
-
case "ccc":
|
|
1795
|
-
return localize2.day(dayOfWeek, {
|
|
1796
|
-
width: "abbreviated",
|
|
1797
|
-
context: "standalone"
|
|
1798
|
-
});
|
|
1799
|
-
case "ccccc":
|
|
1800
|
-
return localize2.day(dayOfWeek, {
|
|
1801
|
-
width: "narrow",
|
|
1802
|
-
context: "standalone"
|
|
1803
|
-
});
|
|
1804
|
-
case "cccccc":
|
|
1805
|
-
return localize2.day(dayOfWeek, {
|
|
1806
|
-
width: "short",
|
|
1807
|
-
context: "standalone"
|
|
1808
|
-
});
|
|
1809
|
-
case "cccc":
|
|
1810
|
-
default:
|
|
1811
|
-
return localize2.day(dayOfWeek, {
|
|
1812
|
-
width: "wide",
|
|
1813
|
-
context: "standalone"
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1816
|
-
},
|
|
1817
|
-
// ISO day of week
|
|
1818
|
-
i: function i2(date, token, localize2) {
|
|
1819
|
-
var dayOfWeek = date.getUTCDay();
|
|
1820
|
-
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
1821
|
-
switch (token) {
|
|
1822
|
-
case "i":
|
|
1823
|
-
return String(isoDayOfWeek);
|
|
1824
|
-
case "ii":
|
|
1825
|
-
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
1826
|
-
case "io":
|
|
1827
|
-
return localize2.ordinalNumber(isoDayOfWeek, {
|
|
1828
|
-
unit: "day"
|
|
1829
|
-
});
|
|
1830
|
-
case "iii":
|
|
1831
|
-
return localize2.day(dayOfWeek, {
|
|
1832
|
-
width: "abbreviated",
|
|
1833
|
-
context: "formatting"
|
|
1834
|
-
});
|
|
1835
|
-
case "iiiii":
|
|
1836
|
-
return localize2.day(dayOfWeek, {
|
|
1837
|
-
width: "narrow",
|
|
1838
|
-
context: "formatting"
|
|
1839
|
-
});
|
|
1840
|
-
case "iiiiii":
|
|
1841
|
-
return localize2.day(dayOfWeek, {
|
|
1842
|
-
width: "short",
|
|
1843
|
-
context: "formatting"
|
|
1844
|
-
});
|
|
1845
|
-
case "iiii":
|
|
1846
|
-
default:
|
|
1847
|
-
return localize2.day(dayOfWeek, {
|
|
1848
|
-
width: "wide",
|
|
1849
|
-
context: "formatting"
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
},
|
|
1853
|
-
// AM or PM
|
|
1854
|
-
a: function a3(date, token, localize2) {
|
|
1855
|
-
var hours = date.getUTCHours();
|
|
1856
|
-
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1857
|
-
switch (token) {
|
|
1858
|
-
case "a":
|
|
1859
|
-
case "aa":
|
|
1860
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1861
|
-
width: "abbreviated",
|
|
1862
|
-
context: "formatting"
|
|
1863
|
-
});
|
|
1864
|
-
case "aaa":
|
|
1865
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1866
|
-
width: "abbreviated",
|
|
1867
|
-
context: "formatting"
|
|
1868
|
-
}).toLowerCase();
|
|
1869
|
-
case "aaaaa":
|
|
1870
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1871
|
-
width: "narrow",
|
|
1872
|
-
context: "formatting"
|
|
1873
|
-
});
|
|
1874
|
-
case "aaaa":
|
|
1875
|
-
default:
|
|
1876
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1877
|
-
width: "wide",
|
|
1878
|
-
context: "formatting"
|
|
1879
|
-
});
|
|
1880
|
-
}
|
|
1881
|
-
},
|
|
1882
|
-
// AM, PM, midnight, noon
|
|
1883
|
-
b: function b(date, token, localize2) {
|
|
1884
|
-
var hours = date.getUTCHours();
|
|
1885
|
-
var dayPeriodEnumValue;
|
|
1886
|
-
if (hours === 12) {
|
|
1887
|
-
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
1888
|
-
} else if (hours === 0) {
|
|
1889
|
-
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
1890
|
-
} else {
|
|
1891
|
-
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1892
|
-
}
|
|
1893
|
-
switch (token) {
|
|
1894
|
-
case "b":
|
|
1895
|
-
case "bb":
|
|
1896
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1897
|
-
width: "abbreviated",
|
|
1898
|
-
context: "formatting"
|
|
1899
|
-
});
|
|
1900
|
-
case "bbb":
|
|
1901
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1902
|
-
width: "abbreviated",
|
|
1903
|
-
context: "formatting"
|
|
1904
|
-
}).toLowerCase();
|
|
1905
|
-
case "bbbbb":
|
|
1906
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1907
|
-
width: "narrow",
|
|
1908
|
-
context: "formatting"
|
|
1909
|
-
});
|
|
1910
|
-
case "bbbb":
|
|
1911
|
-
default:
|
|
1912
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1913
|
-
width: "wide",
|
|
1914
|
-
context: "formatting"
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
},
|
|
1918
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
1919
|
-
B: function B(date, token, localize2) {
|
|
1920
|
-
var hours = date.getUTCHours();
|
|
1921
|
-
var dayPeriodEnumValue;
|
|
1922
|
-
if (hours >= 17) {
|
|
1923
|
-
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
1924
|
-
} else if (hours >= 12) {
|
|
1925
|
-
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
1926
|
-
} else if (hours >= 4) {
|
|
1927
|
-
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
1928
|
-
} else {
|
|
1929
|
-
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
1930
|
-
}
|
|
1931
|
-
switch (token) {
|
|
1932
|
-
case "B":
|
|
1933
|
-
case "BB":
|
|
1934
|
-
case "BBB":
|
|
1935
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1936
|
-
width: "abbreviated",
|
|
1937
|
-
context: "formatting"
|
|
1938
|
-
});
|
|
1939
|
-
case "BBBBB":
|
|
1940
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1941
|
-
width: "narrow",
|
|
1942
|
-
context: "formatting"
|
|
1943
|
-
});
|
|
1944
|
-
case "BBBB":
|
|
1945
|
-
default:
|
|
1946
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1947
|
-
width: "wide",
|
|
1948
|
-
context: "formatting"
|
|
1949
|
-
});
|
|
1950
|
-
}
|
|
1951
|
-
},
|
|
1952
|
-
// Hour [1-12]
|
|
1953
|
-
h: function h3(date, token, localize2) {
|
|
1954
|
-
if (token === "ho") {
|
|
1955
|
-
var hours = date.getUTCHours() % 12;
|
|
1956
|
-
if (hours === 0)
|
|
1957
|
-
hours = 12;
|
|
1958
|
-
return localize2.ordinalNumber(hours, {
|
|
1959
|
-
unit: "hour"
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
return formatters$3.h(date, token);
|
|
1963
|
-
},
|
|
1964
|
-
// Hour [0-23]
|
|
1965
|
-
H: function H2(date, token, localize2) {
|
|
1966
|
-
if (token === "Ho") {
|
|
1967
|
-
return localize2.ordinalNumber(date.getUTCHours(), {
|
|
1968
|
-
unit: "hour"
|
|
1969
|
-
});
|
|
1970
|
-
}
|
|
1971
|
-
return formatters$3.H(date, token);
|
|
1972
|
-
},
|
|
1973
|
-
// Hour [0-11]
|
|
1974
|
-
K: function K(date, token, localize2) {
|
|
1975
|
-
var hours = date.getUTCHours() % 12;
|
|
1976
|
-
if (token === "Ko") {
|
|
1977
|
-
return localize2.ordinalNumber(hours, {
|
|
1978
|
-
unit: "hour"
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
return addLeadingZeros(hours, token.length);
|
|
1982
|
-
},
|
|
1983
|
-
// Hour [1-24]
|
|
1984
|
-
k: function k(date, token, localize2) {
|
|
1985
|
-
var hours = date.getUTCHours();
|
|
1986
|
-
if (hours === 0)
|
|
1987
|
-
hours = 24;
|
|
1988
|
-
if (token === "ko") {
|
|
1989
|
-
return localize2.ordinalNumber(hours, {
|
|
1990
|
-
unit: "hour"
|
|
1991
|
-
});
|
|
1992
|
-
}
|
|
1993
|
-
return addLeadingZeros(hours, token.length);
|
|
1994
|
-
},
|
|
1995
|
-
// Minute
|
|
1996
|
-
m: function m3(date, token, localize2) {
|
|
1997
|
-
if (token === "mo") {
|
|
1998
|
-
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
|
1999
|
-
unit: "minute"
|
|
2000
|
-
});
|
|
2001
|
-
}
|
|
2002
|
-
return formatters$3.m(date, token);
|
|
2003
|
-
},
|
|
2004
|
-
// Second
|
|
2005
|
-
s: function s3(date, token, localize2) {
|
|
2006
|
-
if (token === "so") {
|
|
2007
|
-
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
|
2008
|
-
unit: "second"
|
|
2009
|
-
});
|
|
2010
|
-
}
|
|
2011
|
-
return formatters$3.s(date, token);
|
|
2012
|
-
},
|
|
2013
|
-
// Fraction of second
|
|
2014
|
-
S: function S2(date, token) {
|
|
2015
|
-
return formatters$3.S(date, token);
|
|
2016
|
-
},
|
|
2017
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2018
|
-
X: function X(date, token, _localize, options) {
|
|
2019
|
-
var originalDate = options._originalDate || date;
|
|
2020
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2021
|
-
if (timezoneOffset === 0) {
|
|
2022
|
-
return "Z";
|
|
2023
|
-
}
|
|
2024
|
-
switch (token) {
|
|
2025
|
-
case "X":
|
|
2026
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2027
|
-
case "XXXX":
|
|
2028
|
-
case "XX":
|
|
2029
|
-
return formatTimezone(timezoneOffset);
|
|
2030
|
-
case "XXXXX":
|
|
2031
|
-
case "XXX":
|
|
2032
|
-
default:
|
|
2033
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2034
|
-
}
|
|
2035
|
-
},
|
|
2036
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2037
|
-
x: function x2(date, token, _localize, options) {
|
|
2038
|
-
var originalDate = options._originalDate || date;
|
|
2039
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2040
|
-
switch (token) {
|
|
2041
|
-
case "x":
|
|
2042
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2043
|
-
case "xxxx":
|
|
2044
|
-
case "xx":
|
|
2045
|
-
return formatTimezone(timezoneOffset);
|
|
2046
|
-
case "xxxxx":
|
|
2047
|
-
case "xxx":
|
|
2048
|
-
default:
|
|
2049
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2050
|
-
}
|
|
2051
|
-
},
|
|
2052
|
-
// Timezone (GMT)
|
|
2053
|
-
O: function O(date, token, _localize, options) {
|
|
2054
|
-
var originalDate = options._originalDate || date;
|
|
2055
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2056
|
-
switch (token) {
|
|
2057
|
-
case "O":
|
|
2058
|
-
case "OO":
|
|
2059
|
-
case "OOO":
|
|
2060
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2061
|
-
case "OOOO":
|
|
2062
|
-
default:
|
|
2063
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2064
|
-
}
|
|
2065
|
-
},
|
|
2066
|
-
// Timezone (specific non-location)
|
|
2067
|
-
z: function z(date, token, _localize, options) {
|
|
2068
|
-
var originalDate = options._originalDate || date;
|
|
2069
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2070
|
-
switch (token) {
|
|
2071
|
-
case "z":
|
|
2072
|
-
case "zz":
|
|
2073
|
-
case "zzz":
|
|
2074
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2075
|
-
case "zzzz":
|
|
2076
|
-
default:
|
|
2077
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2078
|
-
}
|
|
2079
|
-
},
|
|
2080
|
-
// Seconds timestamp
|
|
2081
|
-
t: function t2(date, token, _localize, options) {
|
|
2082
|
-
var originalDate = options._originalDate || date;
|
|
2083
|
-
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
|
2084
|
-
return addLeadingZeros(timestamp, token.length);
|
|
2085
|
-
},
|
|
2086
|
-
// Milliseconds timestamp
|
|
2087
|
-
T: function T(date, token, _localize, options) {
|
|
2088
|
-
var originalDate = options._originalDate || date;
|
|
2089
|
-
var timestamp = originalDate.getTime();
|
|
2090
|
-
return addLeadingZeros(timestamp, token.length);
|
|
2091
|
-
}
|
|
2092
|
-
};
|
|
2093
|
-
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
2094
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2095
|
-
var absOffset = Math.abs(offset);
|
|
2096
|
-
var hours = Math.floor(absOffset / 60);
|
|
2097
|
-
var minutes = absOffset % 60;
|
|
2098
|
-
if (minutes === 0) {
|
|
2099
|
-
return sign + String(hours);
|
|
2100
|
-
}
|
|
2101
|
-
var delimiter = dirtyDelimiter || "";
|
|
2102
|
-
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
2103
|
-
}
|
|
2104
|
-
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
2105
|
-
if (offset % 60 === 0) {
|
|
2106
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2107
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
2108
|
-
}
|
|
2109
|
-
return formatTimezone(offset, dirtyDelimiter);
|
|
2110
|
-
}
|
|
2111
|
-
function formatTimezone(offset, dirtyDelimiter) {
|
|
2112
|
-
var delimiter = dirtyDelimiter || "";
|
|
2113
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2114
|
-
var absOffset = Math.abs(offset);
|
|
2115
|
-
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
2116
|
-
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
2117
|
-
return sign + hours + delimiter + minutes;
|
|
2118
|
-
}
|
|
2119
|
-
const formatters$1 = formatters;
|
|
2120
|
-
var dateLongFormatter = function dateLongFormatter2(pattern, formatLong2) {
|
|
2121
|
-
switch (pattern) {
|
|
2122
|
-
case "P":
|
|
2123
|
-
return formatLong2.date({
|
|
2124
|
-
width: "short"
|
|
2125
|
-
});
|
|
2126
|
-
case "PP":
|
|
2127
|
-
return formatLong2.date({
|
|
2128
|
-
width: "medium"
|
|
2129
|
-
});
|
|
2130
|
-
case "PPP":
|
|
2131
|
-
return formatLong2.date({
|
|
2132
|
-
width: "long"
|
|
2133
|
-
});
|
|
2134
|
-
case "PPPP":
|
|
2135
|
-
default:
|
|
2136
|
-
return formatLong2.date({
|
|
2137
|
-
width: "full"
|
|
2138
|
-
});
|
|
2139
|
-
}
|
|
2140
|
-
};
|
|
2141
|
-
var timeLongFormatter = function timeLongFormatter2(pattern, formatLong2) {
|
|
2142
|
-
switch (pattern) {
|
|
2143
|
-
case "p":
|
|
2144
|
-
return formatLong2.time({
|
|
2145
|
-
width: "short"
|
|
2146
|
-
});
|
|
2147
|
-
case "pp":
|
|
2148
|
-
return formatLong2.time({
|
|
2149
|
-
width: "medium"
|
|
2150
|
-
});
|
|
2151
|
-
case "ppp":
|
|
2152
|
-
return formatLong2.time({
|
|
2153
|
-
width: "long"
|
|
2154
|
-
});
|
|
2155
|
-
case "pppp":
|
|
2156
|
-
default:
|
|
2157
|
-
return formatLong2.time({
|
|
2158
|
-
width: "full"
|
|
2159
|
-
});
|
|
2160
|
-
}
|
|
2161
|
-
};
|
|
2162
|
-
var dateTimeLongFormatter = function dateTimeLongFormatter2(pattern, formatLong2) {
|
|
2163
|
-
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
2164
|
-
var datePattern = matchResult[1];
|
|
2165
|
-
var timePattern = matchResult[2];
|
|
2166
|
-
if (!timePattern) {
|
|
2167
|
-
return dateLongFormatter(pattern, formatLong2);
|
|
2168
|
-
}
|
|
2169
|
-
var dateTimeFormat;
|
|
2170
|
-
switch (datePattern) {
|
|
2171
|
-
case "P":
|
|
2172
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2173
|
-
width: "short"
|
|
2174
|
-
});
|
|
2175
|
-
break;
|
|
2176
|
-
case "PP":
|
|
2177
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2178
|
-
width: "medium"
|
|
2179
|
-
});
|
|
2180
|
-
break;
|
|
2181
|
-
case "PPP":
|
|
2182
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2183
|
-
width: "long"
|
|
2184
|
-
});
|
|
2185
|
-
break;
|
|
2186
|
-
case "PPPP":
|
|
2187
|
-
default:
|
|
2188
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2189
|
-
width: "full"
|
|
2190
|
-
});
|
|
2191
|
-
break;
|
|
2192
|
-
}
|
|
2193
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
2194
|
-
};
|
|
2195
|
-
var longFormatters = {
|
|
2196
|
-
p: timeLongFormatter,
|
|
2197
|
-
P: dateTimeLongFormatter
|
|
2198
|
-
};
|
|
2199
|
-
const longFormatters$1 = longFormatters;
|
|
2200
|
-
var protectedDayOfYearTokens = ["D", "DD"];
|
|
2201
|
-
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
2202
|
-
function isProtectedDayOfYearToken(token) {
|
|
2203
|
-
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
2204
|
-
}
|
|
2205
|
-
function isProtectedWeekYearToken(token) {
|
|
2206
|
-
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
2207
|
-
}
|
|
2208
|
-
function throwProtectedError(token, format2, input) {
|
|
2209
|
-
if (token === "YYYY") {
|
|
2210
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2211
|
-
} else if (token === "YY") {
|
|
2212
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2213
|
-
} else if (token === "D") {
|
|
2214
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2215
|
-
} else if (token === "DD") {
|
|
2216
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
var formatDistanceLocale = {
|
|
2220
|
-
lessThanXSeconds: {
|
|
2221
|
-
one: "less than a second",
|
|
2222
|
-
other: "less than {{count}} seconds"
|
|
2223
|
-
},
|
|
2224
|
-
xSeconds: {
|
|
2225
|
-
one: "1 second",
|
|
2226
|
-
other: "{{count}} seconds"
|
|
2227
|
-
},
|
|
2228
|
-
halfAMinute: "half a minute",
|
|
2229
|
-
lessThanXMinutes: {
|
|
2230
|
-
one: "less than a minute",
|
|
2231
|
-
other: "less than {{count}} minutes"
|
|
2232
|
-
},
|
|
2233
|
-
xMinutes: {
|
|
2234
|
-
one: "1 minute",
|
|
2235
|
-
other: "{{count}} minutes"
|
|
2236
|
-
},
|
|
2237
|
-
aboutXHours: {
|
|
2238
|
-
one: "about 1 hour",
|
|
2239
|
-
other: "about {{count}} hours"
|
|
2240
|
-
},
|
|
2241
|
-
xHours: {
|
|
2242
|
-
one: "1 hour",
|
|
2243
|
-
other: "{{count}} hours"
|
|
2244
|
-
},
|
|
2245
|
-
xDays: {
|
|
2246
|
-
one: "1 day",
|
|
2247
|
-
other: "{{count}} days"
|
|
2248
|
-
},
|
|
2249
|
-
aboutXWeeks: {
|
|
2250
|
-
one: "about 1 week",
|
|
2251
|
-
other: "about {{count}} weeks"
|
|
2252
|
-
},
|
|
2253
|
-
xWeeks: {
|
|
2254
|
-
one: "1 week",
|
|
2255
|
-
other: "{{count}} weeks"
|
|
2256
|
-
},
|
|
2257
|
-
aboutXMonths: {
|
|
2258
|
-
one: "about 1 month",
|
|
2259
|
-
other: "about {{count}} months"
|
|
2260
|
-
},
|
|
2261
|
-
xMonths: {
|
|
2262
|
-
one: "1 month",
|
|
2263
|
-
other: "{{count}} months"
|
|
2264
|
-
},
|
|
2265
|
-
aboutXYears: {
|
|
2266
|
-
one: "about 1 year",
|
|
2267
|
-
other: "about {{count}} years"
|
|
2268
|
-
},
|
|
2269
|
-
xYears: {
|
|
2270
|
-
one: "1 year",
|
|
2271
|
-
other: "{{count}} years"
|
|
2272
|
-
},
|
|
2273
|
-
overXYears: {
|
|
2274
|
-
one: "over 1 year",
|
|
2275
|
-
other: "over {{count}} years"
|
|
2276
|
-
},
|
|
2277
|
-
almostXYears: {
|
|
2278
|
-
one: "almost 1 year",
|
|
2279
|
-
other: "almost {{count}} years"
|
|
2280
|
-
}
|
|
2281
|
-
};
|
|
2282
|
-
var formatDistance = function formatDistance2(token, count, options) {
|
|
2283
|
-
var result;
|
|
2284
|
-
var tokenValue = formatDistanceLocale[token];
|
|
2285
|
-
if (typeof tokenValue === "string") {
|
|
2286
|
-
result = tokenValue;
|
|
2287
|
-
} else if (count === 1) {
|
|
2288
|
-
result = tokenValue.one;
|
|
2289
|
-
} else {
|
|
2290
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
2291
|
-
}
|
|
2292
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
2293
|
-
if (options.comparison && options.comparison > 0) {
|
|
2294
|
-
return "in " + result;
|
|
2295
|
-
} else {
|
|
2296
|
-
return result + " ago";
|
|
2297
|
-
}
|
|
2298
|
-
}
|
|
2299
|
-
return result;
|
|
2300
|
-
};
|
|
2301
|
-
const formatDistance$1 = formatDistance;
|
|
2302
|
-
function buildFormatLongFn(args) {
|
|
2303
|
-
return function() {
|
|
2304
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2305
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
2306
|
-
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
2307
|
-
return format2;
|
|
2308
|
-
};
|
|
2309
|
-
}
|
|
2310
|
-
var dateFormats = {
|
|
2311
|
-
full: "EEEE, MMMM do, y",
|
|
2312
|
-
long: "MMMM do, y",
|
|
2313
|
-
medium: "MMM d, y",
|
|
2314
|
-
short: "MM/dd/yyyy"
|
|
2315
|
-
};
|
|
2316
|
-
var timeFormats = {
|
|
2317
|
-
full: "h:mm:ss a zzzz",
|
|
2318
|
-
long: "h:mm:ss a z",
|
|
2319
|
-
medium: "h:mm:ss a",
|
|
2320
|
-
short: "h:mm a"
|
|
2321
|
-
};
|
|
2322
|
-
var dateTimeFormats = {
|
|
2323
|
-
full: "{{date}} 'at' {{time}}",
|
|
2324
|
-
long: "{{date}} 'at' {{time}}",
|
|
2325
|
-
medium: "{{date}}, {{time}}",
|
|
2326
|
-
short: "{{date}}, {{time}}"
|
|
2327
|
-
};
|
|
2328
|
-
var formatLong = {
|
|
2329
|
-
date: buildFormatLongFn({
|
|
2330
|
-
formats: dateFormats,
|
|
2331
|
-
defaultWidth: "full"
|
|
2332
|
-
}),
|
|
2333
|
-
time: buildFormatLongFn({
|
|
2334
|
-
formats: timeFormats,
|
|
2335
|
-
defaultWidth: "full"
|
|
2336
|
-
}),
|
|
2337
|
-
dateTime: buildFormatLongFn({
|
|
2338
|
-
formats: dateTimeFormats,
|
|
2339
|
-
defaultWidth: "full"
|
|
2340
|
-
})
|
|
2341
|
-
};
|
|
2342
|
-
const formatLong$1 = formatLong;
|
|
2343
|
-
var formatRelativeLocale = {
|
|
2344
|
-
lastWeek: "'last' eeee 'at' p",
|
|
2345
|
-
yesterday: "'yesterday at' p",
|
|
2346
|
-
today: "'today at' p",
|
|
2347
|
-
tomorrow: "'tomorrow at' p",
|
|
2348
|
-
nextWeek: "eeee 'at' p",
|
|
2349
|
-
other: "P"
|
|
2350
|
-
};
|
|
2351
|
-
var formatRelative = function formatRelative2(token, _date, _baseDate, _options) {
|
|
2352
|
-
return formatRelativeLocale[token];
|
|
2353
|
-
};
|
|
2354
|
-
const formatRelative$1 = formatRelative;
|
|
2355
|
-
function buildLocalizeFn(args) {
|
|
2356
|
-
return function(dirtyIndex, options) {
|
|
2357
|
-
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
2358
|
-
var valuesArray;
|
|
2359
|
-
if (context === "formatting" && args.formattingValues) {
|
|
2360
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
2361
|
-
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
2362
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
2363
|
-
} else {
|
|
2364
|
-
var _defaultWidth = args.defaultWidth;
|
|
2365
|
-
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
2366
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
2367
|
-
}
|
|
2368
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
2369
|
-
return valuesArray[index];
|
|
2370
|
-
};
|
|
2371
|
-
}
|
|
2372
|
-
var eraValues = {
|
|
2373
|
-
narrow: ["B", "A"],
|
|
2374
|
-
abbreviated: ["BC", "AD"],
|
|
2375
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
2376
|
-
};
|
|
2377
|
-
var quarterValues = {
|
|
2378
|
-
narrow: ["1", "2", "3", "4"],
|
|
2379
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2380
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2381
|
-
};
|
|
2382
|
-
var monthValues = {
|
|
2383
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2384
|
-
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
2385
|
-
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
2386
|
-
};
|
|
2387
|
-
var dayValues = {
|
|
2388
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
2389
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
2390
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2391
|
-
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
2392
|
-
};
|
|
2393
|
-
var dayPeriodValues = {
|
|
2394
|
-
narrow: {
|
|
2395
|
-
am: "a",
|
|
2396
|
-
pm: "p",
|
|
2397
|
-
midnight: "mi",
|
|
2398
|
-
noon: "n",
|
|
2399
|
-
morning: "morning",
|
|
2400
|
-
afternoon: "afternoon",
|
|
2401
|
-
evening: "evening",
|
|
2402
|
-
night: "night"
|
|
2403
|
-
},
|
|
2404
|
-
abbreviated: {
|
|
2405
|
-
am: "AM",
|
|
2406
|
-
pm: "PM",
|
|
2407
|
-
midnight: "midnight",
|
|
2408
|
-
noon: "noon",
|
|
2409
|
-
morning: "morning",
|
|
2410
|
-
afternoon: "afternoon",
|
|
2411
|
-
evening: "evening",
|
|
2412
|
-
night: "night"
|
|
2413
|
-
},
|
|
2414
|
-
wide: {
|
|
2415
|
-
am: "a.m.",
|
|
2416
|
-
pm: "p.m.",
|
|
2417
|
-
midnight: "midnight",
|
|
2418
|
-
noon: "noon",
|
|
2419
|
-
morning: "morning",
|
|
2420
|
-
afternoon: "afternoon",
|
|
2421
|
-
evening: "evening",
|
|
2422
|
-
night: "night"
|
|
2423
|
-
}
|
|
2424
|
-
};
|
|
2425
|
-
var formattingDayPeriodValues = {
|
|
2426
|
-
narrow: {
|
|
2427
|
-
am: "a",
|
|
2428
|
-
pm: "p",
|
|
2429
|
-
midnight: "mi",
|
|
2430
|
-
noon: "n",
|
|
2431
|
-
morning: "in the morning",
|
|
2432
|
-
afternoon: "in the afternoon",
|
|
2433
|
-
evening: "in the evening",
|
|
2434
|
-
night: "at night"
|
|
2435
|
-
},
|
|
2436
|
-
abbreviated: {
|
|
2437
|
-
am: "AM",
|
|
2438
|
-
pm: "PM",
|
|
2439
|
-
midnight: "midnight",
|
|
2440
|
-
noon: "noon",
|
|
2441
|
-
morning: "in the morning",
|
|
2442
|
-
afternoon: "in the afternoon",
|
|
2443
|
-
evening: "in the evening",
|
|
2444
|
-
night: "at night"
|
|
2445
|
-
},
|
|
2446
|
-
wide: {
|
|
2447
|
-
am: "a.m.",
|
|
2448
|
-
pm: "p.m.",
|
|
2449
|
-
midnight: "midnight",
|
|
2450
|
-
noon: "noon",
|
|
2451
|
-
morning: "in the morning",
|
|
2452
|
-
afternoon: "in the afternoon",
|
|
2453
|
-
evening: "in the evening",
|
|
2454
|
-
night: "at night"
|
|
2455
|
-
}
|
|
2456
|
-
};
|
|
2457
|
-
var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
|
|
2458
|
-
var number = Number(dirtyNumber);
|
|
2459
|
-
var rem100 = number % 100;
|
|
2460
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
2461
|
-
switch (rem100 % 10) {
|
|
2462
|
-
case 1:
|
|
2463
|
-
return number + "st";
|
|
2464
|
-
case 2:
|
|
2465
|
-
return number + "nd";
|
|
2466
|
-
case 3:
|
|
2467
|
-
return number + "rd";
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
return number + "th";
|
|
2471
|
-
};
|
|
2472
|
-
var localize = {
|
|
2473
|
-
ordinalNumber,
|
|
2474
|
-
era: buildLocalizeFn({
|
|
2475
|
-
values: eraValues,
|
|
2476
|
-
defaultWidth: "wide"
|
|
2477
|
-
}),
|
|
2478
|
-
quarter: buildLocalizeFn({
|
|
2479
|
-
values: quarterValues,
|
|
2480
|
-
defaultWidth: "wide",
|
|
2481
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
2482
|
-
return quarter - 1;
|
|
2483
|
-
}
|
|
2484
|
-
}),
|
|
2485
|
-
month: buildLocalizeFn({
|
|
2486
|
-
values: monthValues,
|
|
2487
|
-
defaultWidth: "wide"
|
|
2488
|
-
}),
|
|
2489
|
-
day: buildLocalizeFn({
|
|
2490
|
-
values: dayValues,
|
|
2491
|
-
defaultWidth: "wide"
|
|
2492
|
-
}),
|
|
2493
|
-
dayPeriod: buildLocalizeFn({
|
|
2494
|
-
values: dayPeriodValues,
|
|
2495
|
-
defaultWidth: "wide",
|
|
2496
|
-
formattingValues: formattingDayPeriodValues,
|
|
2497
|
-
defaultFormattingWidth: "wide"
|
|
2498
|
-
})
|
|
2499
|
-
};
|
|
2500
|
-
const localize$1 = localize;
|
|
2501
|
-
function buildMatchFn(args) {
|
|
2502
|
-
return function(string) {
|
|
2503
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2504
|
-
var width = options.width;
|
|
2505
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
2506
|
-
var matchResult = string.match(matchPattern);
|
|
2507
|
-
if (!matchResult) {
|
|
2508
|
-
return null;
|
|
2509
|
-
}
|
|
2510
|
-
var matchedString = matchResult[0];
|
|
2511
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
2512
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
2513
|
-
return pattern.test(matchedString);
|
|
2514
|
-
}) : findKey(parsePatterns, function(pattern) {
|
|
2515
|
-
return pattern.test(matchedString);
|
|
2516
|
-
});
|
|
2517
|
-
var value2;
|
|
2518
|
-
value2 = args.valueCallback ? args.valueCallback(key) : key;
|
|
2519
|
-
value2 = options.valueCallback ? options.valueCallback(value2) : value2;
|
|
2520
|
-
var rest = string.slice(matchedString.length);
|
|
2521
|
-
return {
|
|
2522
|
-
value: value2,
|
|
2523
|
-
rest
|
|
2524
|
-
};
|
|
2525
|
-
};
|
|
2526
|
-
}
|
|
2527
|
-
function findKey(object, predicate) {
|
|
2528
|
-
for (var key in object) {
|
|
2529
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
2530
|
-
return key;
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
return void 0;
|
|
2534
|
-
}
|
|
2535
|
-
function findIndex(array, predicate) {
|
|
2536
|
-
for (var key = 0; key < array.length; key++) {
|
|
2537
|
-
if (predicate(array[key])) {
|
|
2538
|
-
return key;
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
return void 0;
|
|
2542
|
-
}
|
|
2543
|
-
function buildMatchPatternFn(args) {
|
|
2544
|
-
return function(string) {
|
|
2545
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2546
|
-
var matchResult = string.match(args.matchPattern);
|
|
2547
|
-
if (!matchResult)
|
|
2548
|
-
return null;
|
|
2549
|
-
var matchedString = matchResult[0];
|
|
2550
|
-
var parseResult = string.match(args.parsePattern);
|
|
2551
|
-
if (!parseResult)
|
|
2552
|
-
return null;
|
|
2553
|
-
var value2 = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
2554
|
-
value2 = options.valueCallback ? options.valueCallback(value2) : value2;
|
|
2555
|
-
var rest = string.slice(matchedString.length);
|
|
2556
|
-
return {
|
|
2557
|
-
value: value2,
|
|
2558
|
-
rest
|
|
2559
|
-
};
|
|
2560
|
-
};
|
|
2561
|
-
}
|
|
2562
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
2563
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
2564
|
-
var matchEraPatterns = {
|
|
2565
|
-
narrow: /^(b|a)/i,
|
|
2566
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2567
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2568
|
-
};
|
|
2569
|
-
var parseEraPatterns = {
|
|
2570
|
-
any: [/^b/i, /^(a|c)/i]
|
|
2571
|
-
};
|
|
2572
|
-
var matchQuarterPatterns = {
|
|
2573
|
-
narrow: /^[1234]/i,
|
|
2574
|
-
abbreviated: /^q[1234]/i,
|
|
2575
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2576
|
-
};
|
|
2577
|
-
var parseQuarterPatterns = {
|
|
2578
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2579
|
-
};
|
|
2580
|
-
var matchMonthPatterns = {
|
|
2581
|
-
narrow: /^[jfmasond]/i,
|
|
2582
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2583
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2584
|
-
};
|
|
2585
|
-
var parseMonthPatterns = {
|
|
2586
|
-
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
2587
|
-
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
2588
|
-
};
|
|
2589
|
-
var matchDayPatterns = {
|
|
2590
|
-
narrow: /^[smtwf]/i,
|
|
2591
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2592
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2593
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2594
|
-
};
|
|
2595
|
-
var parseDayPatterns = {
|
|
2596
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2597
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2598
|
-
};
|
|
2599
|
-
var matchDayPeriodPatterns = {
|
|
2600
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2601
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2602
|
-
};
|
|
2603
|
-
var parseDayPeriodPatterns = {
|
|
2604
|
-
any: {
|
|
2605
|
-
am: /^a/i,
|
|
2606
|
-
pm: /^p/i,
|
|
2607
|
-
midnight: /^mi/i,
|
|
2608
|
-
noon: /^no/i,
|
|
2609
|
-
morning: /morning/i,
|
|
2610
|
-
afternoon: /afternoon/i,
|
|
2611
|
-
evening: /evening/i,
|
|
2612
|
-
night: /night/i
|
|
2613
|
-
}
|
|
2614
|
-
};
|
|
2615
|
-
var match = {
|
|
2616
|
-
ordinalNumber: buildMatchPatternFn({
|
|
2617
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
2618
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
2619
|
-
valueCallback: function valueCallback(value2) {
|
|
2620
|
-
return parseInt(value2, 10);
|
|
2621
|
-
}
|
|
2622
|
-
}),
|
|
2623
|
-
era: buildMatchFn({
|
|
2624
|
-
matchPatterns: matchEraPatterns,
|
|
2625
|
-
defaultMatchWidth: "wide",
|
|
2626
|
-
parsePatterns: parseEraPatterns,
|
|
2627
|
-
defaultParseWidth: "any"
|
|
2628
|
-
}),
|
|
2629
|
-
quarter: buildMatchFn({
|
|
2630
|
-
matchPatterns: matchQuarterPatterns,
|
|
2631
|
-
defaultMatchWidth: "wide",
|
|
2632
|
-
parsePatterns: parseQuarterPatterns,
|
|
2633
|
-
defaultParseWidth: "any",
|
|
2634
|
-
valueCallback: function valueCallback2(index) {
|
|
2635
|
-
return index + 1;
|
|
2636
|
-
}
|
|
2637
|
-
}),
|
|
2638
|
-
month: buildMatchFn({
|
|
2639
|
-
matchPatterns: matchMonthPatterns,
|
|
2640
|
-
defaultMatchWidth: "wide",
|
|
2641
|
-
parsePatterns: parseMonthPatterns,
|
|
2642
|
-
defaultParseWidth: "any"
|
|
2643
|
-
}),
|
|
2644
|
-
day: buildMatchFn({
|
|
2645
|
-
matchPatterns: matchDayPatterns,
|
|
2646
|
-
defaultMatchWidth: "wide",
|
|
2647
|
-
parsePatterns: parseDayPatterns,
|
|
2648
|
-
defaultParseWidth: "any"
|
|
2649
|
-
}),
|
|
2650
|
-
dayPeriod: buildMatchFn({
|
|
2651
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
2652
|
-
defaultMatchWidth: "any",
|
|
2653
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
2654
|
-
defaultParseWidth: "any"
|
|
2655
|
-
})
|
|
2656
|
-
};
|
|
2657
|
-
const match$1 = match;
|
|
2658
|
-
var locale = {
|
|
2659
|
-
code: "en-US",
|
|
2660
|
-
formatDistance: formatDistance$1,
|
|
2661
|
-
formatLong: formatLong$1,
|
|
2662
|
-
formatRelative: formatRelative$1,
|
|
2663
|
-
localize: localize$1,
|
|
2664
|
-
match: match$1,
|
|
2665
|
-
options: {
|
|
2666
|
-
weekStartsOn: 0,
|
|
2667
|
-
firstWeekContainsDate: 1
|
|
2668
|
-
}
|
|
2669
|
-
};
|
|
2670
|
-
const defaultLocale = locale;
|
|
2671
|
-
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
2672
|
-
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
2673
|
-
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
2674
|
-
var doubleQuoteRegExp = /''/g;
|
|
2675
|
-
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
2676
|
-
function format(dirtyDate, dirtyFormatStr, options) {
|
|
2677
|
-
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
2678
|
-
requiredArgs(2, arguments);
|
|
2679
|
-
var formatStr = String(dirtyFormatStr);
|
|
2680
|
-
var defaultOptions2 = getDefaultOptions();
|
|
2681
|
-
var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
2682
|
-
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
2683
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
2684
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
2685
|
-
}
|
|
2686
|
-
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
2687
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
2688
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
2689
|
-
}
|
|
2690
|
-
if (!locale2.localize) {
|
|
2691
|
-
throw new RangeError("locale must contain localize property");
|
|
2692
|
-
}
|
|
2693
|
-
if (!locale2.formatLong) {
|
|
2694
|
-
throw new RangeError("locale must contain formatLong property");
|
|
2695
|
-
}
|
|
2696
|
-
var originalDate = toDate(dirtyDate);
|
|
2697
|
-
if (!isValid(originalDate)) {
|
|
2698
|
-
throw new RangeError("Invalid time value");
|
|
2699
|
-
}
|
|
2700
|
-
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
2701
|
-
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
2702
|
-
var formatterOptions = {
|
|
2703
|
-
firstWeekContainsDate,
|
|
2704
|
-
weekStartsOn,
|
|
2705
|
-
locale: locale2,
|
|
2706
|
-
_originalDate: originalDate
|
|
2707
|
-
};
|
|
2708
|
-
var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
|
|
2709
|
-
var firstCharacter = substring[0];
|
|
2710
|
-
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
2711
|
-
var longFormatter = longFormatters$1[firstCharacter];
|
|
2712
|
-
return longFormatter(substring, locale2.formatLong);
|
|
2713
|
-
}
|
|
2714
|
-
return substring;
|
|
2715
|
-
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
|
2716
|
-
if (substring === "''") {
|
|
2717
|
-
return "'";
|
|
2718
|
-
}
|
|
2719
|
-
var firstCharacter = substring[0];
|
|
2720
|
-
if (firstCharacter === "'") {
|
|
2721
|
-
return cleanEscapedString(substring);
|
|
2722
|
-
}
|
|
2723
|
-
var formatter = formatters$1[firstCharacter];
|
|
2724
|
-
if (formatter) {
|
|
2725
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
2726
|
-
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2727
|
-
}
|
|
2728
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
2729
|
-
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2730
|
-
}
|
|
2731
|
-
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
|
2732
|
-
}
|
|
2733
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2734
|
-
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
|
2735
|
-
}
|
|
2736
|
-
return substring;
|
|
2737
|
-
}).join("");
|
|
2738
|
-
return result;
|
|
2739
|
-
}
|
|
2740
|
-
function cleanEscapedString(input) {
|
|
2741
|
-
var matched = input.match(escapedStringRegExp);
|
|
2742
|
-
if (!matched) {
|
|
2743
|
-
return input;
|
|
2744
|
-
}
|
|
2745
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2746
|
-
}
|
|
2747
|
-
function startOfToday() {
|
|
2748
|
-
return startOfDay(Date.now());
|
|
2749
|
-
}
|
|
2750
42
|
const _hoisted_1$a = { class: "operasional-identitas" };
|
|
2751
43
|
const _hoisted_2$6 = {
|
|
2752
44
|
key: 2,
|
|
@@ -2862,13 +154,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2862
154
|
columns: ["flag", "username", "email", "phone", "status", "lastLoggedInAt"],
|
|
2863
155
|
renders: {
|
|
2864
156
|
flag: (item) => {
|
|
2865
|
-
const Avatar = h
|
|
157
|
+
const Avatar = h(NeonAvatar, {
|
|
2866
158
|
image: item.image,
|
|
2867
159
|
name: item.id,
|
|
2868
160
|
style: { "--neon-avatar-size": "32px" }
|
|
2869
161
|
});
|
|
2870
162
|
const Display = RowUtil.renderDisplay(item, UserModel.fields.flag);
|
|
2871
|
-
return h
|
|
163
|
+
return h("div", { class: "flex items-center space-x-2" }, [
|
|
2872
164
|
Avatar,
|
|
2873
165
|
Display
|
|
2874
166
|
]);
|
|
@@ -2930,8 +222,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2930
222
|
candidateId.value = userId;
|
|
2931
223
|
state.value = "connect";
|
|
2932
224
|
}
|
|
2933
|
-
} catch (
|
|
2934
|
-
console.log(
|
|
225
|
+
} catch (error) {
|
|
226
|
+
console.log(error);
|
|
2935
227
|
} finally {
|
|
2936
228
|
isLoading.value = false;
|
|
2937
229
|
}
|
|
@@ -3146,11 +438,11 @@ const useAttendanceStore = defineStore("neu:personalia:attendance", {
|
|
|
3146
438
|
state.checkInId = "";
|
|
3147
439
|
});
|
|
3148
440
|
},
|
|
3149
|
-
async checkInStaff(qrKey,
|
|
441
|
+
async checkInStaff(qrKey, type, staffId) {
|
|
3150
442
|
const { client } = useClientHandle();
|
|
3151
443
|
try {
|
|
3152
444
|
this.qrKey = qrKey;
|
|
3153
|
-
this.type =
|
|
445
|
+
this.type = type;
|
|
3154
446
|
const resp = await client.mutation(GraphUtil.executeOne(models$1.CheckInModel, {}), {
|
|
3155
447
|
action: "presence",
|
|
3156
448
|
input: {
|
|
@@ -3166,8 +458,8 @@ const useAttendanceStore = defineStore("neu:personalia:attendance", {
|
|
|
3166
458
|
this.isScanned = true;
|
|
3167
459
|
} else
|
|
3168
460
|
throw new Error("Terjadi kesalahan.");
|
|
3169
|
-
} catch (
|
|
3170
|
-
console.log(
|
|
461
|
+
} catch (error) {
|
|
462
|
+
console.log(error);
|
|
3171
463
|
this.isScanError = true;
|
|
3172
464
|
}
|
|
3173
465
|
}
|
|
@@ -3232,24 +524,24 @@ function withOperasional() {
|
|
|
3232
524
|
store.setStaff(items[0]);
|
|
3233
525
|
}
|
|
3234
526
|
}
|
|
3235
|
-
function mitt(
|
|
3236
|
-
return { all:
|
|
3237
|
-
var
|
|
3238
|
-
|
|
3239
|
-
}, off: function(
|
|
3240
|
-
var
|
|
3241
|
-
|
|
3242
|
-
}, emit: function(
|
|
3243
|
-
var
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
}), (
|
|
3247
|
-
|
|
527
|
+
function mitt(n) {
|
|
528
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
529
|
+
var i = n.get(t);
|
|
530
|
+
i ? i.push(e) : n.set(t, [e]);
|
|
531
|
+
}, off: function(t, e) {
|
|
532
|
+
var i = n.get(t);
|
|
533
|
+
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
|
|
534
|
+
}, emit: function(t, e) {
|
|
535
|
+
var i = n.get(t);
|
|
536
|
+
i && i.slice().map(function(n2) {
|
|
537
|
+
n2(e);
|
|
538
|
+
}), (i = n.get("*")) && i.slice().map(function(n2) {
|
|
539
|
+
n2(t, e);
|
|
3248
540
|
});
|
|
3249
541
|
} };
|
|
3250
542
|
}
|
|
3251
543
|
const bus = mitt();
|
|
3252
|
-
const _withScopeId$2 = (
|
|
544
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-533df021"), n = n(), popScopeId(), n);
|
|
3253
545
|
const _hoisted_1$9 = { id: "view-checkIns" };
|
|
3254
546
|
const _hoisted_2$5 = { class: "summary" };
|
|
3255
547
|
const _hoisted_3$1 = { class: "wrapper" };
|
|
@@ -3278,7 +570,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3278
570
|
const { userId } = storeToRefs(authStore);
|
|
3279
571
|
const { staff } = useOperasional();
|
|
3280
572
|
const attendanceStore = useAttendanceStore();
|
|
3281
|
-
const { isAsking, isScanning, isEntering, isScanError, isScanned, type
|
|
573
|
+
const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = storeToRefs(attendanceStore);
|
|
3282
574
|
const toast = useToastStore();
|
|
3283
575
|
const id = ref("new");
|
|
3284
576
|
const isCheckpoint = ref(false);
|
|
@@ -3331,7 +623,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3331
623
|
});
|
|
3332
624
|
function onPresenceIn(data) {
|
|
3333
625
|
isAsking.value = true;
|
|
3334
|
-
|
|
626
|
+
type.value = "in";
|
|
3335
627
|
}
|
|
3336
628
|
function onPresenceCheckpoint() {
|
|
3337
629
|
isCheckpoint.value = true;
|
|
@@ -3339,7 +631,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3339
631
|
}
|
|
3340
632
|
function onPresenceOut(data) {
|
|
3341
633
|
isAsking.value = true;
|
|
3342
|
-
|
|
634
|
+
type.value = "out";
|
|
3343
635
|
}
|
|
3344
636
|
async function onPresenceHome() {
|
|
3345
637
|
var _a;
|
|
@@ -3354,9 +646,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3354
646
|
}
|
|
3355
647
|
async function onScanned(data) {
|
|
3356
648
|
var _a;
|
|
3357
|
-
id.value = await checkInStaff(data,
|
|
649
|
+
id.value = await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
3358
650
|
}
|
|
3359
|
-
async function checkInStaff(qrKey,
|
|
651
|
+
async function checkInStaff(qrKey, type2, staffId) {
|
|
3360
652
|
const toastId = "neu:personalia:staff:checkIn";
|
|
3361
653
|
let checkInId;
|
|
3362
654
|
console.log("bangunan...", qrKey);
|
|
@@ -3367,7 +659,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3367
659
|
userId: userId.value,
|
|
3368
660
|
staffId,
|
|
3369
661
|
key: qrKey,
|
|
3370
|
-
type:
|
|
662
|
+
type: type2
|
|
3371
663
|
}
|
|
3372
664
|
}).toPromise();
|
|
3373
665
|
const data = resp.data.executeCheckIn.output;
|
|
@@ -3375,7 +667,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3375
667
|
if (data) {
|
|
3376
668
|
isScanning.value = false;
|
|
3377
669
|
isScanned.value = true;
|
|
3378
|
-
if (
|
|
670
|
+
if (type2 === "out") {
|
|
3379
671
|
isOut.value = true;
|
|
3380
672
|
}
|
|
3381
673
|
toast.push({
|
|
@@ -3384,15 +676,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
3384
676
|
content: "Presensi berhasil.",
|
|
3385
677
|
color: "success"
|
|
3386
678
|
});
|
|
3387
|
-
if (
|
|
679
|
+
if (type2 === "in") {
|
|
3388
680
|
setTimeout(() => {
|
|
3389
681
|
router.go(0);
|
|
3390
682
|
}, 500);
|
|
3391
683
|
}
|
|
3392
684
|
} else
|
|
3393
685
|
throw new Error("Terjadi kesalahan.");
|
|
3394
|
-
} catch (
|
|
3395
|
-
console.log(
|
|
686
|
+
} catch (error) {
|
|
687
|
+
console.log(error);
|
|
3396
688
|
isScanError.value = true;
|
|
3397
689
|
toast.push({
|
|
3398
690
|
id: toastId,
|
|
@@ -3781,7 +1073,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3781
1073
|
});
|
|
3782
1074
|
const CheckInExternal_vue_vue_type_style_index_0_scoped_9c4a435e_lang = "";
|
|
3783
1075
|
const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-9c4a435e"]]);
|
|
3784
|
-
const _withScopeId$1 = (
|
|
1076
|
+
const _withScopeId$1 = (n) => (pushScopeId("data-v-d23b6de5"), n = n(), popScopeId(), n);
|
|
3785
1077
|
const _hoisted_1$6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode(
|
|
3786
1078
|
"h4",
|
|
3787
1079
|
{ align: "center" },
|
|
@@ -3902,418 +1194,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3902
1194
|
};
|
|
3903
1195
|
}
|
|
3904
1196
|
});
|
|
3905
|
-
|
|
3906
|
-
constructor(a4, b2, c3, d4, f2) {
|
|
3907
|
-
this._legacyCanvasSize = e2.DEFAULT_CANVAS_SIZE;
|
|
3908
|
-
this._preferredCamera = "environment";
|
|
3909
|
-
this._maxScansPerSecond = 25;
|
|
3910
|
-
this._lastScanTimestamp = -1;
|
|
3911
|
-
this._destroyed = this._flashOn = this._paused = this._active = false;
|
|
3912
|
-
this.$video = a4;
|
|
3913
|
-
this.$canvas = document.createElement("canvas");
|
|
3914
|
-
c3 && "object" === typeof c3 ? this._onDecode = b2 : (c3 || d4 || f2 ? console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future") : console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."), this._legacyOnDecode = b2);
|
|
3915
|
-
b2 = "object" === typeof c3 ? c3 : {};
|
|
3916
|
-
this._onDecodeError = b2.onDecodeError || ("function" === typeof c3 ? c3 : this._onDecodeError);
|
|
3917
|
-
this._calculateScanRegion = b2.calculateScanRegion || ("function" === typeof d4 ? d4 : this._calculateScanRegion);
|
|
3918
|
-
this._preferredCamera = b2.preferredCamera || f2 || this._preferredCamera;
|
|
3919
|
-
this._legacyCanvasSize = "number" === typeof c3 ? c3 : "number" === typeof d4 ? d4 : this._legacyCanvasSize;
|
|
3920
|
-
this._maxScansPerSecond = b2.maxScansPerSecond || this._maxScansPerSecond;
|
|
3921
|
-
this._onPlay = this._onPlay.bind(this);
|
|
3922
|
-
this._onLoadedMetaData = this._onLoadedMetaData.bind(this);
|
|
3923
|
-
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
3924
|
-
this._updateOverlay = this._updateOverlay.bind(this);
|
|
3925
|
-
a4.disablePictureInPicture = true;
|
|
3926
|
-
a4.playsInline = true;
|
|
3927
|
-
a4.muted = true;
|
|
3928
|
-
let h4 = false;
|
|
3929
|
-
a4.hidden && (a4.hidden = false, h4 = true);
|
|
3930
|
-
document.body.contains(a4) || (document.body.appendChild(a4), h4 = true);
|
|
3931
|
-
c3 = a4.parentElement;
|
|
3932
|
-
if (b2.highlightScanRegion || b2.highlightCodeOutline) {
|
|
3933
|
-
d4 = !!b2.overlay;
|
|
3934
|
-
this.$overlay = b2.overlay || document.createElement("div");
|
|
3935
|
-
f2 = this.$overlay.style;
|
|
3936
|
-
f2.position = "absolute";
|
|
3937
|
-
f2.display = "none";
|
|
3938
|
-
f2.pointerEvents = "none";
|
|
3939
|
-
this.$overlay.classList.add("scan-region-highlight");
|
|
3940
|
-
if (!d4 && b2.highlightScanRegion) {
|
|
3941
|
-
this.$overlay.innerHTML = '<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';
|
|
3942
|
-
try {
|
|
3943
|
-
this.$overlay.firstElementChild.animate({ transform: [
|
|
3944
|
-
"scale(.98)",
|
|
3945
|
-
"scale(1.01)"
|
|
3946
|
-
] }, { duration: 400, iterations: Infinity, direction: "alternate", easing: "ease-in-out" });
|
|
3947
|
-
} catch (m4) {
|
|
3948
|
-
}
|
|
3949
|
-
c3.insertBefore(this.$overlay, this.$video.nextSibling);
|
|
3950
|
-
}
|
|
3951
|
-
b2.highlightCodeOutline && (this.$overlay.insertAdjacentHTML("beforeend", '<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'), this.$codeOutlineHighlight = this.$overlay.lastElementChild);
|
|
3952
|
-
}
|
|
3953
|
-
this._scanRegion = this._calculateScanRegion(a4);
|
|
3954
|
-
requestAnimationFrame(() => {
|
|
3955
|
-
let m4 = window.getComputedStyle(a4);
|
|
3956
|
-
"none" === m4.display && (a4.style.setProperty("display", "block", "important"), h4 = true);
|
|
3957
|
-
"visible" !== m4.visibility && (a4.style.setProperty("visibility", "visible", "important"), h4 = true);
|
|
3958
|
-
h4 && (console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."), a4.style.opacity = "0", a4.style.width = "0", a4.style.height = "0", this.$overlay && this.$overlay.parentElement && this.$overlay.parentElement.removeChild(this.$overlay), delete this.$overlay, delete this.$codeOutlineHighlight);
|
|
3959
|
-
this.$overlay && this._updateOverlay();
|
|
3960
|
-
});
|
|
3961
|
-
a4.addEventListener("play", this._onPlay);
|
|
3962
|
-
a4.addEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
3963
|
-
document.addEventListener("visibilitychange", this._onVisibilityChange);
|
|
3964
|
-
window.addEventListener("resize", this._updateOverlay);
|
|
3965
|
-
this._qrEnginePromise = e2.createQrEngine();
|
|
3966
|
-
}
|
|
3967
|
-
static set WORKER_PATH(a4) {
|
|
3968
|
-
console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.");
|
|
3969
|
-
}
|
|
3970
|
-
static async hasCamera() {
|
|
3971
|
-
try {
|
|
3972
|
-
return !!(await e2.listCameras(false)).length;
|
|
3973
|
-
} catch (a4) {
|
|
3974
|
-
return false;
|
|
3975
|
-
}
|
|
3976
|
-
}
|
|
3977
|
-
static async listCameras(a4 = false) {
|
|
3978
|
-
if (!navigator.mediaDevices)
|
|
3979
|
-
return [];
|
|
3980
|
-
let b2 = async () => (await navigator.mediaDevices.enumerateDevices()).filter((d4) => "videoinput" === d4.kind), c3;
|
|
3981
|
-
try {
|
|
3982
|
-
a4 && (await b2()).every((d4) => !d4.label) && (c3 = await navigator.mediaDevices.getUserMedia({ audio: false, video: true }));
|
|
3983
|
-
} catch (d4) {
|
|
3984
|
-
}
|
|
3985
|
-
try {
|
|
3986
|
-
return (await b2()).map((d4, f2) => ({ id: d4.deviceId, label: d4.label || (0 === f2 ? "Default Camera" : `Camera ${f2 + 1}`) }));
|
|
3987
|
-
} finally {
|
|
3988
|
-
c3 && (console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"), e2._stopVideoStream(c3));
|
|
3989
|
-
}
|
|
3990
|
-
}
|
|
3991
|
-
async hasFlash() {
|
|
3992
|
-
let a4;
|
|
3993
|
-
try {
|
|
3994
|
-
if (this.$video.srcObject) {
|
|
3995
|
-
if (!(this.$video.srcObject instanceof MediaStream))
|
|
3996
|
-
return false;
|
|
3997
|
-
a4 = this.$video.srcObject;
|
|
3998
|
-
} else
|
|
3999
|
-
a4 = (await this._getCameraStream()).stream;
|
|
4000
|
-
return "torch" in a4.getVideoTracks()[0].getSettings();
|
|
4001
|
-
} catch (b2) {
|
|
4002
|
-
return false;
|
|
4003
|
-
} finally {
|
|
4004
|
-
a4 && a4 !== this.$video.srcObject && (console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"), e2._stopVideoStream(a4));
|
|
4005
|
-
}
|
|
4006
|
-
}
|
|
4007
|
-
isFlashOn() {
|
|
4008
|
-
return this._flashOn;
|
|
4009
|
-
}
|
|
4010
|
-
async toggleFlash() {
|
|
4011
|
-
this._flashOn ? await this.turnFlashOff() : await this.turnFlashOn();
|
|
4012
|
-
}
|
|
4013
|
-
async turnFlashOn() {
|
|
4014
|
-
if (!this._flashOn && !this._destroyed && (this._flashOn = true, this._active && !this._paused))
|
|
4015
|
-
try {
|
|
4016
|
-
if (!await this.hasFlash())
|
|
4017
|
-
throw "No flash available";
|
|
4018
|
-
await this.$video.srcObject.getVideoTracks()[0].applyConstraints({ advanced: [{ torch: true }] });
|
|
4019
|
-
} catch (a4) {
|
|
4020
|
-
throw this._flashOn = false, a4;
|
|
4021
|
-
}
|
|
4022
|
-
}
|
|
4023
|
-
async turnFlashOff() {
|
|
4024
|
-
this._flashOn && (this._flashOn = false, await this._restartVideoStream());
|
|
4025
|
-
}
|
|
4026
|
-
destroy() {
|
|
4027
|
-
this.$video.removeEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4028
|
-
this.$video.removeEventListener("play", this._onPlay);
|
|
4029
|
-
document.removeEventListener(
|
|
4030
|
-
"visibilitychange",
|
|
4031
|
-
this._onVisibilityChange
|
|
4032
|
-
);
|
|
4033
|
-
window.removeEventListener("resize", this._updateOverlay);
|
|
4034
|
-
this._destroyed = true;
|
|
4035
|
-
this._flashOn = false;
|
|
4036
|
-
this.stop();
|
|
4037
|
-
e2._postWorkerMessage(this._qrEnginePromise, "close");
|
|
4038
|
-
}
|
|
4039
|
-
async start() {
|
|
4040
|
-
if (this._destroyed)
|
|
4041
|
-
throw Error("The QR scanner can not be started as it had been destroyed.");
|
|
4042
|
-
if (!this._active || this._paused) {
|
|
4043
|
-
if ("https:" !== window.location.protocol && console.warn("The camera stream is only accessible if the page is transferred via https."), this._active = true, !document.hidden)
|
|
4044
|
-
if (this._paused = false, this.$video.srcObject)
|
|
4045
|
-
await this.$video.play();
|
|
4046
|
-
else
|
|
4047
|
-
try {
|
|
4048
|
-
let { stream: a4, facingMode: b2 } = await this._getCameraStream();
|
|
4049
|
-
!this._active || this._paused ? e2._stopVideoStream(a4) : (this._setVideoMirror(b2), this.$video.srcObject = a4, await this.$video.play(), this._flashOn && (this._flashOn = false, this.turnFlashOn().catch(() => {
|
|
4050
|
-
})));
|
|
4051
|
-
} catch (a4) {
|
|
4052
|
-
if (!this._paused)
|
|
4053
|
-
throw this._active = false, a4;
|
|
4054
|
-
}
|
|
4055
|
-
}
|
|
4056
|
-
}
|
|
4057
|
-
stop() {
|
|
4058
|
-
this.pause();
|
|
4059
|
-
this._active = false;
|
|
4060
|
-
}
|
|
4061
|
-
async pause(a4 = false) {
|
|
4062
|
-
this._paused = true;
|
|
4063
|
-
if (!this._active)
|
|
4064
|
-
return true;
|
|
4065
|
-
this.$video.pause();
|
|
4066
|
-
this.$overlay && (this.$overlay.style.display = "none");
|
|
4067
|
-
let b2 = () => {
|
|
4068
|
-
this.$video.srcObject instanceof MediaStream && (e2._stopVideoStream(this.$video.srcObject), this.$video.srcObject = null);
|
|
4069
|
-
};
|
|
4070
|
-
if (a4)
|
|
4071
|
-
return b2(), true;
|
|
4072
|
-
await new Promise((c3) => setTimeout(c3, 300));
|
|
4073
|
-
if (!this._paused)
|
|
4074
|
-
return false;
|
|
4075
|
-
b2();
|
|
4076
|
-
return true;
|
|
4077
|
-
}
|
|
4078
|
-
async setCamera(a4) {
|
|
4079
|
-
a4 !== this._preferredCamera && (this._preferredCamera = a4, await this._restartVideoStream());
|
|
4080
|
-
}
|
|
4081
|
-
static async scanImage(a4, b2, c3, d4, f2 = false, h4 = false) {
|
|
4082
|
-
let m4, n2 = false;
|
|
4083
|
-
b2 && ("scanRegion" in b2 || "qrEngine" in b2 || "canvas" in b2 || "disallowCanvasResizing" in b2 || "alsoTryWithoutScanRegion" in b2 || "returnDetailedScanResult" in b2) ? (m4 = b2.scanRegion, c3 = b2.qrEngine, d4 = b2.canvas, f2 = b2.disallowCanvasResizing || false, h4 = b2.alsoTryWithoutScanRegion || false, n2 = true) : b2 || c3 || d4 || f2 || h4 ? console.warn("You're using a deprecated api for scanImage which will be removed in the future.") : console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.");
|
|
4084
|
-
b2 = !!c3;
|
|
4085
|
-
try {
|
|
4086
|
-
let p2, k2;
|
|
4087
|
-
[c3, p2] = await Promise.all([c3 || e2.createQrEngine(), e2._loadImage(a4)]);
|
|
4088
|
-
[d4, k2] = e2._drawToCanvas(p2, m4, d4, f2);
|
|
4089
|
-
let q2;
|
|
4090
|
-
if (c3 instanceof Worker) {
|
|
4091
|
-
let g2 = c3;
|
|
4092
|
-
b2 || e2._postWorkerMessageSync(g2, "inversionMode", "both");
|
|
4093
|
-
q2 = await new Promise((l2, v2) => {
|
|
4094
|
-
let w2, u3, r, y4 = -1;
|
|
4095
|
-
u3 = (t3) => {
|
|
4096
|
-
t3.data.id === y4 && (g2.removeEventListener("message", u3), g2.removeEventListener("error", r), clearTimeout(w2), null !== t3.data.data ? l2({ data: t3.data.data, cornerPoints: e2._convertPoints(t3.data.cornerPoints, m4) }) : v2(e2.NO_QR_CODE_FOUND));
|
|
4097
|
-
};
|
|
4098
|
-
r = (t3) => {
|
|
4099
|
-
g2.removeEventListener("message", u3);
|
|
4100
|
-
g2.removeEventListener("error", r);
|
|
4101
|
-
clearTimeout(w2);
|
|
4102
|
-
v2("Scanner error: " + (t3 ? t3.message || t3 : "Unknown Error"));
|
|
4103
|
-
};
|
|
4104
|
-
g2.addEventListener("message", u3);
|
|
4105
|
-
g2.addEventListener("error", r);
|
|
4106
|
-
w2 = setTimeout(() => r("timeout"), 1e4);
|
|
4107
|
-
let x3 = k2.getImageData(0, 0, d4.width, d4.height);
|
|
4108
|
-
y4 = e2._postWorkerMessageSync(g2, "decode", x3, [x3.data.buffer]);
|
|
4109
|
-
});
|
|
4110
|
-
} else
|
|
4111
|
-
q2 = await Promise.race([new Promise((g2, l2) => window.setTimeout(() => l2("Scanner error: timeout"), 1e4)), (async () => {
|
|
4112
|
-
try {
|
|
4113
|
-
var [g2] = await c3.detect(d4);
|
|
4114
|
-
if (!g2)
|
|
4115
|
-
throw e2.NO_QR_CODE_FOUND;
|
|
4116
|
-
return { data: g2.rawValue, cornerPoints: e2._convertPoints(g2.cornerPoints, m4) };
|
|
4117
|
-
} catch (l2) {
|
|
4118
|
-
g2 = l2.message || l2;
|
|
4119
|
-
if (/not implemented|service unavailable/.test(g2))
|
|
4120
|
-
return e2._disableBarcodeDetector = true, e2.scanImage(a4, { scanRegion: m4, canvas: d4, disallowCanvasResizing: f2, alsoTryWithoutScanRegion: h4 });
|
|
4121
|
-
throw `Scanner error: ${g2}`;
|
|
4122
|
-
}
|
|
4123
|
-
})()]);
|
|
4124
|
-
return n2 ? q2 : q2.data;
|
|
4125
|
-
} catch (p2) {
|
|
4126
|
-
if (!m4 || !h4)
|
|
4127
|
-
throw p2;
|
|
4128
|
-
let k2 = await e2.scanImage(a4, { qrEngine: c3, canvas: d4, disallowCanvasResizing: f2 });
|
|
4129
|
-
return n2 ? k2 : k2.data;
|
|
4130
|
-
} finally {
|
|
4131
|
-
b2 || e2._postWorkerMessage(c3, "close");
|
|
4132
|
-
}
|
|
4133
|
-
}
|
|
4134
|
-
setGrayscaleWeights(a4, b2, c3, d4 = true) {
|
|
4135
|
-
e2._postWorkerMessage(this._qrEnginePromise, "grayscaleWeights", {
|
|
4136
|
-
red: a4,
|
|
4137
|
-
green: b2,
|
|
4138
|
-
blue: c3,
|
|
4139
|
-
useIntegerApproximation: d4
|
|
4140
|
-
});
|
|
4141
|
-
}
|
|
4142
|
-
setInversionMode(a4) {
|
|
4143
|
-
e2._postWorkerMessage(this._qrEnginePromise, "inversionMode", a4);
|
|
4144
|
-
}
|
|
4145
|
-
static async createQrEngine(a4) {
|
|
4146
|
-
a4 && console.warn("Specifying a worker path is not required and not supported anymore.");
|
|
4147
|
-
a4 = () => Promise.resolve().then(() => qrScannerWorker_min).then((c3) => c3.createWorker());
|
|
4148
|
-
if (!(!e2._disableBarcodeDetector && "BarcodeDetector" in window && BarcodeDetector.getSupportedFormats && (await BarcodeDetector.getSupportedFormats()).includes("qr_code")))
|
|
4149
|
-
return a4();
|
|
4150
|
-
let b2 = navigator.userAgentData;
|
|
4151
|
-
return b2 && b2.brands.some(({ brand: c3 }) => /Chromium/i.test(c3)) && /mac ?OS/i.test(b2.platform) && await b2.getHighEntropyValues(["architecture", "platformVersion"]).then(({ architecture: c3, platformVersion: d4 }) => /arm/i.test(c3 || "arm") && 13 <= parseInt(d4 || "13")).catch(() => true) ? a4() : new BarcodeDetector({ formats: ["qr_code"] });
|
|
4152
|
-
}
|
|
4153
|
-
_onPlay() {
|
|
4154
|
-
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4155
|
-
this._updateOverlay();
|
|
4156
|
-
this.$overlay && (this.$overlay.style.display = "");
|
|
4157
|
-
this._scanFrame();
|
|
4158
|
-
}
|
|
4159
|
-
_onLoadedMetaData() {
|
|
4160
|
-
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4161
|
-
this._updateOverlay();
|
|
4162
|
-
}
|
|
4163
|
-
_onVisibilityChange() {
|
|
4164
|
-
document.hidden ? this.pause() : this._active && this.start();
|
|
4165
|
-
}
|
|
4166
|
-
_calculateScanRegion(a4) {
|
|
4167
|
-
let b2 = Math.round(2 / 3 * Math.min(a4.videoWidth, a4.videoHeight));
|
|
4168
|
-
return { x: Math.round((a4.videoWidth - b2) / 2), y: Math.round((a4.videoHeight - b2) / 2), width: b2, height: b2, downScaledWidth: this._legacyCanvasSize, downScaledHeight: this._legacyCanvasSize };
|
|
4169
|
-
}
|
|
4170
|
-
_updateOverlay() {
|
|
4171
|
-
requestAnimationFrame(() => {
|
|
4172
|
-
if (this.$overlay) {
|
|
4173
|
-
var a4 = this.$video, b2 = a4.videoWidth, c3 = a4.videoHeight, d4 = a4.offsetWidth, f2 = a4.offsetHeight, h4 = a4.offsetLeft, m4 = a4.offsetTop, n2 = window.getComputedStyle(a4), p2 = n2.objectFit, k2 = b2 / c3, q2 = d4 / f2;
|
|
4174
|
-
switch (p2) {
|
|
4175
|
-
case "none":
|
|
4176
|
-
var g2 = b2;
|
|
4177
|
-
var l2 = c3;
|
|
4178
|
-
break;
|
|
4179
|
-
case "fill":
|
|
4180
|
-
g2 = d4;
|
|
4181
|
-
l2 = f2;
|
|
4182
|
-
break;
|
|
4183
|
-
default:
|
|
4184
|
-
("cover" === p2 ? k2 > q2 : k2 < q2) ? (l2 = f2, g2 = l2 * k2) : (g2 = d4, l2 = g2 / k2), "scale-down" === p2 && (g2 = Math.min(g2, b2), l2 = Math.min(l2, c3));
|
|
4185
|
-
}
|
|
4186
|
-
var [v2, w2] = n2.objectPosition.split(" ").map((r, y4) => {
|
|
4187
|
-
const x3 = parseFloat(r);
|
|
4188
|
-
return r.endsWith("%") ? (y4 ? f2 - l2 : d4 - g2) * x3 / 100 : x3;
|
|
4189
|
-
});
|
|
4190
|
-
n2 = this._scanRegion.width || b2;
|
|
4191
|
-
q2 = this._scanRegion.height || c3;
|
|
4192
|
-
p2 = this._scanRegion.x || 0;
|
|
4193
|
-
var u3 = this._scanRegion.y || 0;
|
|
4194
|
-
k2 = this.$overlay.style;
|
|
4195
|
-
k2.width = `${n2 / b2 * g2}px`;
|
|
4196
|
-
k2.height = `${q2 / c3 * l2}px`;
|
|
4197
|
-
k2.top = `${m4 + w2 + u3 / c3 * l2}px`;
|
|
4198
|
-
c3 = /scaleX\(-1\)/.test(a4.style.transform);
|
|
4199
|
-
k2.left = `${h4 + (c3 ? d4 - v2 - g2 : v2) + (c3 ? b2 - p2 - n2 : p2) / b2 * g2}px`;
|
|
4200
|
-
k2.transform = a4.style.transform;
|
|
4201
|
-
}
|
|
4202
|
-
});
|
|
4203
|
-
}
|
|
4204
|
-
static _convertPoints(a4, b2) {
|
|
4205
|
-
if (!b2)
|
|
4206
|
-
return a4;
|
|
4207
|
-
let c3 = b2.x || 0, d4 = b2.y || 0, f2 = b2.width && b2.downScaledWidth ? b2.width / b2.downScaledWidth : 1;
|
|
4208
|
-
b2 = b2.height && b2.downScaledHeight ? b2.height / b2.downScaledHeight : 1;
|
|
4209
|
-
for (let h4 of a4)
|
|
4210
|
-
h4.x = h4.x * f2 + c3, h4.y = h4.y * b2 + d4;
|
|
4211
|
-
return a4;
|
|
4212
|
-
}
|
|
4213
|
-
_scanFrame() {
|
|
4214
|
-
!this._active || this.$video.paused || this.$video.ended || ("requestVideoFrameCallback" in this.$video ? this.$video.requestVideoFrameCallback.bind(this.$video) : requestAnimationFrame)(async () => {
|
|
4215
|
-
if (!(1 >= this.$video.readyState)) {
|
|
4216
|
-
var a4 = Date.now() - this._lastScanTimestamp, b2 = 1e3 / this._maxScansPerSecond;
|
|
4217
|
-
a4 < b2 && await new Promise((d4) => setTimeout(d4, b2 - a4));
|
|
4218
|
-
this._lastScanTimestamp = Date.now();
|
|
4219
|
-
try {
|
|
4220
|
-
var c3 = await e2.scanImage(this.$video, { scanRegion: this._scanRegion, qrEngine: this._qrEnginePromise, canvas: this.$canvas });
|
|
4221
|
-
} catch (d4) {
|
|
4222
|
-
if (!this._active)
|
|
4223
|
-
return;
|
|
4224
|
-
this._onDecodeError(d4);
|
|
4225
|
-
}
|
|
4226
|
-
!e2._disableBarcodeDetector || await this._qrEnginePromise instanceof Worker || (this._qrEnginePromise = e2.createQrEngine());
|
|
4227
|
-
c3 ? (this._onDecode ? this._onDecode(c3) : this._legacyOnDecode && this._legacyOnDecode(c3.data), this.$codeOutlineHighlight && (clearTimeout(this._codeOutlineHighlightRemovalTimeout), this._codeOutlineHighlightRemovalTimeout = void 0, this.$codeOutlineHighlight.setAttribute("viewBox", `${this._scanRegion.x || 0} ${this._scanRegion.y || 0} ${this._scanRegion.width || this.$video.videoWidth} ${this._scanRegion.height || this.$video.videoHeight}`), this.$codeOutlineHighlight.firstElementChild.setAttribute(
|
|
4228
|
-
"points",
|
|
4229
|
-
c3.cornerPoints.map(({ x: d4, y: f2 }) => `${d4},${f2}`).join(" ")
|
|
4230
|
-
), this.$codeOutlineHighlight.style.display = "")) : this.$codeOutlineHighlight && !this._codeOutlineHighlightRemovalTimeout && (this._codeOutlineHighlightRemovalTimeout = setTimeout(() => this.$codeOutlineHighlight.style.display = "none", 100));
|
|
4231
|
-
}
|
|
4232
|
-
this._scanFrame();
|
|
4233
|
-
});
|
|
4234
|
-
}
|
|
4235
|
-
_onDecodeError(a4) {
|
|
4236
|
-
a4 !== e2.NO_QR_CODE_FOUND && console.log(a4);
|
|
4237
|
-
}
|
|
4238
|
-
async _getCameraStream() {
|
|
4239
|
-
if (!navigator.mediaDevices)
|
|
4240
|
-
throw "Camera not found.";
|
|
4241
|
-
let a4 = /^(environment|user)$/.test(this._preferredCamera) ? "facingMode" : "deviceId", b2 = [{ width: { min: 1024 } }, { width: { min: 768 } }, {}], c3 = b2.map((d4) => Object.assign({}, d4, { [a4]: { exact: this._preferredCamera } }));
|
|
4242
|
-
for (let d4 of [...c3, ...b2])
|
|
4243
|
-
try {
|
|
4244
|
-
let f2 = await navigator.mediaDevices.getUserMedia({ video: d4, audio: false }), h4 = this._getFacingMode(f2) || (d4.facingMode ? this._preferredCamera : "environment" === this._preferredCamera ? "user" : "environment");
|
|
4245
|
-
return { stream: f2, facingMode: h4 };
|
|
4246
|
-
} catch (f2) {
|
|
4247
|
-
}
|
|
4248
|
-
throw "Camera not found.";
|
|
4249
|
-
}
|
|
4250
|
-
async _restartVideoStream() {
|
|
4251
|
-
let a4 = this._paused;
|
|
4252
|
-
await this.pause(true) && !a4 && this._active && await this.start();
|
|
4253
|
-
}
|
|
4254
|
-
static _stopVideoStream(a4) {
|
|
4255
|
-
for (let b2 of a4.getTracks())
|
|
4256
|
-
b2.stop(), a4.removeTrack(b2);
|
|
4257
|
-
}
|
|
4258
|
-
_setVideoMirror(a4) {
|
|
4259
|
-
this.$video.style.transform = "scaleX(" + ("user" === a4 ? -1 : 1) + ")";
|
|
4260
|
-
}
|
|
4261
|
-
_getFacingMode(a4) {
|
|
4262
|
-
return (a4 = a4.getVideoTracks()[0]) ? /rear|back|environment/i.test(a4.label) ? "environment" : /front|user|face/i.test(a4.label) ? "user" : null : null;
|
|
4263
|
-
}
|
|
4264
|
-
static _drawToCanvas(a4, b2, c3, d4 = false) {
|
|
4265
|
-
c3 = c3 || document.createElement("canvas");
|
|
4266
|
-
let f2 = b2 && b2.x ? b2.x : 0, h4 = b2 && b2.y ? b2.y : 0, m4 = b2 && b2.width ? b2.width : a4.videoWidth || a4.width, n2 = b2 && b2.height ? b2.height : a4.videoHeight || a4.height;
|
|
4267
|
-
d4 || (d4 = b2 && b2.downScaledWidth ? b2.downScaledWidth : m4, b2 = b2 && b2.downScaledHeight ? b2.downScaledHeight : n2, c3.width !== d4 && (c3.width = d4), c3.height !== b2 && (c3.height = b2));
|
|
4268
|
-
b2 = c3.getContext("2d", { alpha: false });
|
|
4269
|
-
b2.imageSmoothingEnabled = false;
|
|
4270
|
-
b2.drawImage(a4, f2, h4, m4, n2, 0, 0, c3.width, c3.height);
|
|
4271
|
-
return [c3, b2];
|
|
4272
|
-
}
|
|
4273
|
-
static async _loadImage(a4) {
|
|
4274
|
-
if (a4 instanceof Image)
|
|
4275
|
-
return await e2._awaitImageLoad(a4), a4;
|
|
4276
|
-
if (a4 instanceof HTMLVideoElement || a4 instanceof HTMLCanvasElement || a4 instanceof SVGImageElement || "OffscreenCanvas" in window && a4 instanceof OffscreenCanvas || "ImageBitmap" in window && a4 instanceof ImageBitmap)
|
|
4277
|
-
return a4;
|
|
4278
|
-
if (a4 instanceof File || a4 instanceof Blob || a4 instanceof URL || "string" === typeof a4) {
|
|
4279
|
-
let b2 = new Image();
|
|
4280
|
-
b2.src = a4 instanceof File || a4 instanceof Blob ? URL.createObjectURL(a4) : a4.toString();
|
|
4281
|
-
try {
|
|
4282
|
-
return await e2._awaitImageLoad(b2), b2;
|
|
4283
|
-
} finally {
|
|
4284
|
-
(a4 instanceof File || a4 instanceof Blob) && URL.revokeObjectURL(b2.src);
|
|
4285
|
-
}
|
|
4286
|
-
} else
|
|
4287
|
-
throw "Unsupported image type.";
|
|
4288
|
-
}
|
|
4289
|
-
static async _awaitImageLoad(a4) {
|
|
4290
|
-
a4.complete && 0 !== a4.naturalWidth || await new Promise((b2, c3) => {
|
|
4291
|
-
let d4 = (f2) => {
|
|
4292
|
-
a4.removeEventListener("load", d4);
|
|
4293
|
-
a4.removeEventListener("error", d4);
|
|
4294
|
-
f2 instanceof ErrorEvent ? c3("Image load error") : b2();
|
|
4295
|
-
};
|
|
4296
|
-
a4.addEventListener("load", d4);
|
|
4297
|
-
a4.addEventListener("error", d4);
|
|
4298
|
-
});
|
|
4299
|
-
}
|
|
4300
|
-
static async _postWorkerMessage(a4, b2, c3, d4) {
|
|
4301
|
-
return e2._postWorkerMessageSync(await a4, b2, c3, d4);
|
|
4302
|
-
}
|
|
4303
|
-
static _postWorkerMessageSync(a4, b2, c3, d4) {
|
|
4304
|
-
if (!(a4 instanceof Worker))
|
|
4305
|
-
return -1;
|
|
4306
|
-
let f2 = e2._workerMessageId++;
|
|
4307
|
-
a4.postMessage({ id: f2, type: b2, data: c3 }, d4);
|
|
4308
|
-
return f2;
|
|
4309
|
-
}
|
|
4310
|
-
}
|
|
4311
|
-
e2.DEFAULT_CANVAS_SIZE = 400;
|
|
4312
|
-
e2.NO_QR_CODE_FOUND = "No QR code found";
|
|
4313
|
-
e2._disableBarcodeDetector = false;
|
|
4314
|
-
e2._workerMessageId = 0;
|
|
4315
|
-
const Scanner = e2;
|
|
4316
|
-
const _withScopeId = (n2) => (pushScopeId("data-v-ef426ef3"), n2 = n2(), popScopeId(), n2);
|
|
1197
|
+
const _withScopeId = (n) => (pushScopeId("data-v-ef426ef3"), n = n(), popScopeId(), n);
|
|
4317
1198
|
const _hoisted_1$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
|
|
4318
1199
|
"div",
|
|
4319
1200
|
{ class: "invalid-message" },
|
|
@@ -4966,7 +1847,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4966
1847
|
if (!staff)
|
|
4967
1848
|
return;
|
|
4968
1849
|
const user = staff.user;
|
|
4969
|
-
const branches = (_a = staff.branches) == null ? void 0 : _a.map((
|
|
1850
|
+
const branches = (_a = staff.branches) == null ? void 0 : _a.map((s) => s.name).join(", ");
|
|
4970
1851
|
return {
|
|
4971
1852
|
name: staff.name,
|
|
4972
1853
|
image: user == null ? void 0 : user.image,
|
|
@@ -5643,7 +2524,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5643
2524
|
}).toPromise();
|
|
5644
2525
|
const wrapper = (_b = responseStartTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5645
2526
|
window.location.reload();
|
|
5646
|
-
} catch (
|
|
2527
|
+
} catch (error) {
|
|
5647
2528
|
}
|
|
5648
2529
|
};
|
|
5649
2530
|
const onClickHandlerFinishTaskWork = async () => {
|
|
@@ -5661,7 +2542,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5661
2542
|
}).toPromise();
|
|
5662
2543
|
const wrapper = (_b = responseFinishedTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5663
2544
|
window.location.reload();
|
|
5664
|
-
} catch (
|
|
2545
|
+
} catch (error) {
|
|
5665
2546
|
}
|
|
5666
2547
|
};
|
|
5667
2548
|
return (_ctx, _cache) => {
|
|
@@ -6209,6 +3090,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6209
3090
|
saveOne,
|
|
6210
3091
|
discardChanges
|
|
6211
3092
|
} = useSingle();
|
|
3093
|
+
const appStore = useAppStore();
|
|
3094
|
+
const objectDef = computed(
|
|
3095
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3096
|
+
);
|
|
6212
3097
|
return (_ctx, _cache) => {
|
|
6213
3098
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
|
|
6214
3099
|
default: withCtx(() => [
|
|
@@ -6357,30 +3242,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6357
3242
|
icon: "circle-info",
|
|
6358
3243
|
title: "Dokumen"
|
|
6359
3244
|
}, {
|
|
6360
|
-
default: withCtx(() => [
|
|
6361
|
-
createVNode(
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
modelValue: unref(values).document,
|
|
6374
|
-
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).document = $event)
|
|
6375
|
-
}, unref(fields).document), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
6376
|
-
createVNode(unref(NeonField), mergeProps({
|
|
6377
|
-
modelValue: unref(values).image,
|
|
6378
|
-
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).image = $event)
|
|
6379
|
-
}, unref(fields).image), null, 16, ["modelValue"])
|
|
6380
|
-
]),
|
|
6381
|
-
_: 1
|
|
6382
|
-
/* STABLE */
|
|
6383
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3245
|
+
default: withCtx(({ isTouched }) => [
|
|
3246
|
+
createVNode(
|
|
3247
|
+
unref(CatatSketchPad),
|
|
3248
|
+
normalizeProps(guardReactiveProps({
|
|
3249
|
+
applicationId: unref(appStore).appId,
|
|
3250
|
+
object: `${objectDef.value}:office`,
|
|
3251
|
+
isReady: unref(isReady) && isTouched,
|
|
3252
|
+
isLoading: unref(isLoading)
|
|
3253
|
+
})),
|
|
3254
|
+
null,
|
|
3255
|
+
16
|
|
3256
|
+
/* FULL_PROPS */
|
|
3257
|
+
)
|
|
6384
3258
|
]),
|
|
6385
3259
|
_: 1
|
|
6386
3260
|
/* STABLE */
|
|
@@ -6396,8 +3270,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6396
3270
|
};
|
|
6397
3271
|
}
|
|
6398
3272
|
});
|
|
6399
|
-
const
|
|
6400
|
-
const SubmissionSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
3273
|
+
const SubmissionSingle_vue_vue_type_style_index_0_scoped_39553dbd_lang = "";
|
|
3274
|
+
const SubmissionSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-39553dbd"]]);
|
|
6401
3275
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
6402
3276
|
__name: "SubmissionStaff",
|
|
6403
3277
|
setup(__props) {
|
|
@@ -6445,10 +3319,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6445
3319
|
watch(
|
|
6446
3320
|
isNew,
|
|
6447
3321
|
(isNew2) => {
|
|
3322
|
+
var _a2;
|
|
6448
3323
|
if (!isNew2)
|
|
6449
3324
|
return;
|
|
6450
3325
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6451
3326
|
values.value.submissionStaffIds = [staffId];
|
|
3327
|
+
values.value.submissionStaffs = [
|
|
3328
|
+
{
|
|
3329
|
+
id: staffId,
|
|
3330
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
3331
|
+
}
|
|
3332
|
+
];
|
|
6452
3333
|
},
|
|
6453
3334
|
{
|
|
6454
3335
|
immediate: true
|
|
@@ -6458,6 +3339,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6458
3339
|
executeOne("raiseSubmission", { submissionId: id.value });
|
|
6459
3340
|
syncOne();
|
|
6460
3341
|
};
|
|
3342
|
+
const appStore = useAppStore();
|
|
3343
|
+
const objectDef = computed(
|
|
3344
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3345
|
+
);
|
|
6461
3346
|
return (_ctx, _cache) => {
|
|
6462
3347
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
|
|
6463
3348
|
default: withCtx(() => [
|
|
@@ -6635,34 +3520,20 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6635
3520
|
icon: "circle-info",
|
|
6636
3521
|
title: "Dokumen"
|
|
6637
3522
|
}, {
|
|
6638
|
-
default: withCtx(() => [
|
|
6639
|
-
createVNode(
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).document = $event)
|
|
6653
|
-
}, unref(fields).document, {
|
|
6654
|
-
"is-disabled": unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
6655
|
-
}), null, 16, ["modelValue", "is-disabled"])) : createCommentVNode("v-if", true),
|
|
6656
|
-
createVNode(unref(NeonField), mergeProps({
|
|
6657
|
-
modelValue: unref(values).image,
|
|
6658
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).image = $event)
|
|
6659
|
-
}, unref(fields).image, {
|
|
6660
|
-
"is-disabled": unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
6661
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
6662
|
-
]),
|
|
6663
|
-
_: 1
|
|
6664
|
-
/* STABLE */
|
|
6665
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3523
|
+
default: withCtx(({ isTouched }) => [
|
|
3524
|
+
createVNode(
|
|
3525
|
+
unref(CatatSketchPad),
|
|
3526
|
+
normalizeProps(guardReactiveProps({
|
|
3527
|
+
applicationId: unref(appStore).appId,
|
|
3528
|
+
object: `${objectDef.value}:office`,
|
|
3529
|
+
isReady: unref(isReady) && isTouched,
|
|
3530
|
+
isLoading: unref(isLoading),
|
|
3531
|
+
isReadonly: unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
3532
|
+
})),
|
|
3533
|
+
null,
|
|
3534
|
+
16
|
|
3535
|
+
/* FULL_PROPS */
|
|
3536
|
+
)
|
|
6666
3537
|
]),
|
|
6667
3538
|
_: 1
|
|
6668
3539
|
/* STABLE */
|
|
@@ -6678,8 +3549,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6678
3549
|
};
|
|
6679
3550
|
}
|
|
6680
3551
|
});
|
|
6681
|
-
const
|
|
6682
|
-
const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
3552
|
+
const SubmissionStaff_vue_vue_type_style_index_0_scoped_af256a74_lang = "";
|
|
3553
|
+
const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-af256a74"]]);
|
|
6683
3554
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
6684
3555
|
__name: "SubmissionFollowUp",
|
|
6685
3556
|
setup(__props) {
|
|
@@ -6698,6 +3569,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6698
3569
|
discardChanges,
|
|
6699
3570
|
executeOne
|
|
6700
3571
|
} = useSingle();
|
|
3572
|
+
const appStore = useAppStore();
|
|
3573
|
+
const objectDef = computed(
|
|
3574
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3575
|
+
);
|
|
6701
3576
|
return (_ctx, _cache) => {
|
|
6702
3577
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
|
|
6703
3578
|
default: withCtx(() => [
|
|
@@ -6837,30 +3712,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6837
3712
|
icon: "circle-info",
|
|
6838
3713
|
title: "Dokumen"
|
|
6839
3714
|
}, {
|
|
6840
|
-
default: withCtx(() => [
|
|
6841
|
-
createVNode(
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).document = $event)
|
|
6855
|
-
}, unref(fields).document, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
6856
|
-
createVNode(unref(NeonField), mergeProps({
|
|
6857
|
-
modelValue: unref(values).image,
|
|
6858
|
-
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).image = $event)
|
|
6859
|
-
}, unref(fields).image, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
6860
|
-
]),
|
|
6861
|
-
_: 1
|
|
6862
|
-
/* STABLE */
|
|
6863
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3715
|
+
default: withCtx(({ isTouched }) => [
|
|
3716
|
+
createVNode(
|
|
3717
|
+
unref(CatatSketchPad),
|
|
3718
|
+
normalizeProps(guardReactiveProps({
|
|
3719
|
+
applicationId: unref(appStore).appId,
|
|
3720
|
+
object: `${objectDef.value}:office`,
|
|
3721
|
+
isReady: unref(isReady) && isTouched,
|
|
3722
|
+
isLoading: unref(isLoading),
|
|
3723
|
+
isReadonly: true
|
|
3724
|
+
})),
|
|
3725
|
+
null,
|
|
3726
|
+
16
|
|
3727
|
+
/* FULL_PROPS */
|
|
3728
|
+
)
|
|
6864
3729
|
]),
|
|
6865
3730
|
_: 1
|
|
6866
3731
|
/* STABLE */
|
|
@@ -6876,8 +3741,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6876
3741
|
};
|
|
6877
3742
|
}
|
|
6878
3743
|
});
|
|
6879
|
-
const
|
|
6880
|
-
const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3744
|
+
const SubmissionFollowUp_vue_vue_type_style_index_0_scoped_6fd14e52_lang = "";
|
|
3745
|
+
const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6fd14e52"]]);
|
|
6881
3746
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
6882
3747
|
__name: "SubmissionAudit",
|
|
6883
3748
|
setup(__props) {
|
|
@@ -6925,10 +3790,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6925
3790
|
watch(
|
|
6926
3791
|
isNew,
|
|
6927
3792
|
(isNew2) => {
|
|
3793
|
+
var _a2;
|
|
6928
3794
|
if (!isNew2)
|
|
6929
3795
|
return;
|
|
6930
3796
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6931
3797
|
values.value.submissionStaffIds = [staffId];
|
|
3798
|
+
values.value.submissionStaffs = [
|
|
3799
|
+
{
|
|
3800
|
+
id: staffId,
|
|
3801
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
3802
|
+
}
|
|
3803
|
+
];
|
|
6932
3804
|
},
|
|
6933
3805
|
{
|
|
6934
3806
|
immediate: true
|
|
@@ -6950,6 +3822,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6950
3822
|
executeOne("processedSubmission", { submissionId: id.value });
|
|
6951
3823
|
syncOne();
|
|
6952
3824
|
};
|
|
3825
|
+
const appStore = useAppStore();
|
|
3826
|
+
const objectDef = computed(
|
|
3827
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3828
|
+
);
|
|
6953
3829
|
return (_ctx, _cache) => {
|
|
6954
3830
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
|
|
6955
3831
|
default: withCtx(() => [
|
|
@@ -7185,34 +4061,20 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7185
4061
|
icon: "circle-info",
|
|
7186
4062
|
title: "Dokumen"
|
|
7187
4063
|
}, {
|
|
7188
|
-
default: withCtx(() => [
|
|
7189
|
-
createVNode(
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).document = $event)
|
|
7203
|
-
}, unref(fields).document, {
|
|
7204
|
-
"is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
7205
|
-
}), null, 16, ["modelValue", "is-disabled"])) : createCommentVNode("v-if", true),
|
|
7206
|
-
createVNode(unref(NeonField), mergeProps({
|
|
7207
|
-
modelValue: unref(values).image,
|
|
7208
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).image = $event)
|
|
7209
|
-
}, unref(fields).image, {
|
|
7210
|
-
"is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
7211
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
7212
|
-
]),
|
|
7213
|
-
_: 1
|
|
7214
|
-
/* STABLE */
|
|
7215
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
4064
|
+
default: withCtx(({ isTouched }) => [
|
|
4065
|
+
createVNode(
|
|
4066
|
+
unref(CatatSketchPad),
|
|
4067
|
+
normalizeProps(guardReactiveProps({
|
|
4068
|
+
applicationId: unref(appStore).appId,
|
|
4069
|
+
object: `${objectDef.value}:office`,
|
|
4070
|
+
isReady: unref(isReady) && isTouched,
|
|
4071
|
+
isLoading: unref(isLoading),
|
|
4072
|
+
isReadonly: unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
4073
|
+
})),
|
|
4074
|
+
null,
|
|
4075
|
+
16
|
|
4076
|
+
/* FULL_PROPS */
|
|
4077
|
+
)
|
|
7216
4078
|
]),
|
|
7217
4079
|
_: 1
|
|
7218
4080
|
/* STABLE */
|
|
@@ -7228,8 +4090,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7228
4090
|
};
|
|
7229
4091
|
}
|
|
7230
4092
|
});
|
|
7231
|
-
const
|
|
7232
|
-
const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
4093
|
+
const SubmissionAudit_vue_vue_type_style_index_0_scoped_cf27d98b_lang = "";
|
|
4094
|
+
const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-cf27d98b"]]);
|
|
7233
4095
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7234
4096
|
__name: "SubmissionDecision",
|
|
7235
4097
|
setup(__props) {
|
|
@@ -7277,10 +4139,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7277
4139
|
watch(
|
|
7278
4140
|
isNew,
|
|
7279
4141
|
(isNew2) => {
|
|
4142
|
+
var _a2;
|
|
7280
4143
|
if (!isNew2)
|
|
7281
4144
|
return;
|
|
7282
4145
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7283
4146
|
values.value.submissionStaffIds = [staffId];
|
|
4147
|
+
values.value.submissionStaffs = [
|
|
4148
|
+
{
|
|
4149
|
+
id: staffId,
|
|
4150
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
4151
|
+
}
|
|
4152
|
+
];
|
|
7284
4153
|
},
|
|
7285
4154
|
{
|
|
7286
4155
|
immediate: true
|
|
@@ -7302,6 +4171,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7302
4171
|
});
|
|
7303
4172
|
syncOne();
|
|
7304
4173
|
};
|
|
4174
|
+
const appStore = useAppStore();
|
|
4175
|
+
const objectDef = computed(
|
|
4176
|
+
() => `neu:operasional:submission:${id.value}`
|
|
4177
|
+
);
|
|
7305
4178
|
return (_ctx, _cache) => {
|
|
7306
4179
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
|
|
7307
4180
|
default: withCtx(() => [
|
|
@@ -7499,34 +4372,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7499
4372
|
icon: "circle-info",
|
|
7500
4373
|
title: "Dokumen"
|
|
7501
4374
|
}, {
|
|
7502
|
-
default: withCtx(() => [
|
|
7503
|
-
createVNode(
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).document = $event)
|
|
7517
|
-
}, unref(fields).document, {
|
|
7518
|
-
"is-disabled": unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "delay" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
7519
|
-
}), null, 16, ["modelValue", "is-disabled"])) : createCommentVNode("v-if", true),
|
|
7520
|
-
createVNode(unref(NeonField), mergeProps({
|
|
7521
|
-
modelValue: unref(values).image,
|
|
7522
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).image = $event)
|
|
7523
|
-
}, unref(fields).image, {
|
|
7524
|
-
"is-disabled": unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "delay" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
7525
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
7526
|
-
]),
|
|
7527
|
-
_: 1
|
|
7528
|
-
/* STABLE */
|
|
7529
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
4375
|
+
default: withCtx(({ isTouched }) => [
|
|
4376
|
+
createVNode(
|
|
4377
|
+
unref(CatatSketchPad),
|
|
4378
|
+
normalizeProps(guardReactiveProps({
|
|
4379
|
+
applicationId: unref(appStore).appId,
|
|
4380
|
+
object: `${objectDef.value}:office`,
|
|
4381
|
+
isReady: unref(isReady) && isTouched,
|
|
4382
|
+
isLoading: unref(isLoading),
|
|
4383
|
+
isReadonly: unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "delay" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved"
|
|
4384
|
+
})),
|
|
4385
|
+
null,
|
|
4386
|
+
16
|
|
4387
|
+
/* FULL_PROPS */
|
|
4388
|
+
)
|
|
7530
4389
|
]),
|
|
7531
4390
|
_: 1
|
|
7532
4391
|
/* STABLE */
|
|
@@ -7542,8 +4401,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7542
4401
|
};
|
|
7543
4402
|
}
|
|
7544
4403
|
});
|
|
7545
|
-
const
|
|
7546
|
-
const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
4404
|
+
const SubmissionDecision_vue_vue_type_style_index_0_scoped_5b7cb4ef_lang = "";
|
|
4405
|
+
const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5b7cb4ef"]]);
|
|
7547
4406
|
const SubmissionTypeModel = models$2.SubmissionTypeModel;
|
|
7548
4407
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7549
4408
|
...{
|
|
@@ -7673,8 +4532,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
7673
4532
|
XxxButton: _sfc_main$v
|
|
7674
4533
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7675
4534
|
function registerComponents(app) {
|
|
7676
|
-
Object.entries(components).forEach(([
|
|
7677
|
-
ComponentUtil$1.register(app,
|
|
4535
|
+
Object.entries(components).forEach(([name, component]) => {
|
|
4536
|
+
ComponentUtil$1.register(app, name, component);
|
|
7678
4537
|
});
|
|
7679
4538
|
}
|
|
7680
4539
|
const graphql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -7685,108 +4544,6 @@ const OperasionalInterfacesPlugin = {
|
|
|
7685
4544
|
registerComponents(app);
|
|
7686
4545
|
}
|
|
7687
4546
|
};
|
|
7688
|
-
const createWorker = () => new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
7689
|
-
class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
|
|
7690
|
-
class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
|
|
7691
|
-
this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|
|
7692
|
-
function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
|
|
7693
|
-
function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
|
|
7694
|
-
e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
|
|
7695
|
-
d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
|
|
7696
|
-
else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
|
|
7697
|
-
class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
|
|
7698
|
-
if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
|
|
7699
|
-
a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
|
|
7700
|
-
a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
|
|
7701
|
-
class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
|
|
7702
|
-
a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
|
|
7703
|
-
function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
|
|
7704
|
-
if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
|
|
7705
|
-
function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
|
|
7706
|
-
f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
|
|
7707
|
-
let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
|
|
7708
|
-
dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
|
|
7709
|
-
ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
|
|
7710
|
-
{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
|
|
7711
|
-
34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
|
|
7712
|
-
ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
|
|
7713
|
-
{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
|
|
7714
|
-
{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
|
|
7715
|
-
dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
|
|
7716
|
-
dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
|
|
7717
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
|
|
7718
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
|
|
7719
|
-
{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
|
|
7720
|
-
ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
|
|
7721
|
-
74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
|
|
7722
|
-
versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
|
|
7723
|
-
dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
|
|
7724
|
-
dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
|
|
7725
|
-
{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
|
|
7726
|
-
{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
|
|
7727
|
-
{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
|
|
7728
|
-
{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
|
|
7729
|
-
{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
|
|
7730
|
-
ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
|
|
7731
|
-
dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
|
|
7732
|
-
dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
7733
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
|
|
7734
|
-
{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
|
|
7735
|
-
ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
|
|
7736
|
-
26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
|
|
7737
|
-
{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
|
|
7738
|
-
{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
|
|
7739
|
-
dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
|
|
7740
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
|
|
7741
|
-
dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
|
|
7742
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
|
|
7743
|
-
dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
7744
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
|
|
7745
|
-
dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
|
|
7746
|
-
errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
|
|
7747
|
-
versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
|
|
7748
|
-
{numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
|
|
7749
|
-
let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
|
|
7750
|
-
dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
|
|
7751
|
-
formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
|
|
7752
|
-
dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
|
|
7753
|
-
2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
|
|
7754
|
-
function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
|
|
7755
|
-
k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
|
|
7756
|
-
function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
|
|
7757
|
-
function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
|
|
7758
|
-
function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
|
|
7759
|
-
return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
|
|
7760
|
-
function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
|
|
7761
|
-
function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
|
|
7762
|
-
function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
|
|
7763
|
-
c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
|
|
7764
|
-
function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
|
|
7765
|
-
function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
|
|
7766
|
-
function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
|
|
7767
|
-
[];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
|
|
7768
|
-
function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
|
|
7769
|
-
Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
|
|
7770
|
-
function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
|
|
7771
|
-
y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
|
|
7772
|
-
k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
|
|
7773
|
-
1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
|
|
7774
|
-
l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
|
|
7775
|
-
function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
|
|
7776
|
-
c&&b.length?b[0]:m,dimension:f}}
|
|
7777
|
-
function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
|
|
7778
|
-
e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
|
|
7779
|
-
function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
|
|
7780
|
-
g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
|
|
7781
|
-
u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
|
|
7782
|
-
y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
|
|
7783
|
-
self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
|
|
7784
|
-
break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
|
|
7785
|
-
`]), { type: "application/javascript" }));
|
|
7786
|
-
const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7787
|
-
__proto__: null,
|
|
7788
|
-
createWorker
|
|
7789
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
7790
4547
|
export {
|
|
7791
4548
|
CheckInAccess,
|
|
7792
4549
|
_sfc_main$m as CheckInCollection,
|