@neutron.co.id/operasional-interfaces 1.5.1-beta.1 → 1.6.1-beta.1

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