@neutron.co.id/operasional-interfaces 1.2.0-beta.1 → 1.3.0-beta.2
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 +2662 -1051
- package/build/index.mjs +2682 -1071
- package/build/style.css +138 -0
- package/build/types/components/checkIn/checkIn.types.d.ts +2 -0
- package/build/types/components/checkIn/index.d.ts +2 -0
- package/build/types/components/checkIn/sheets/CheckInAccess.vue.d.ts +6 -0
- package/build/types/components/checkIn/sheets/CheckInCollection.vue.d.ts +2 -0
- package/build/types/components/checkIn/sheets/CheckInPresenceCollection.vue.d.ts +2 -0
- package/build/types/components/checkIn/sheets/CheckInScanError.vue.d.ts +2 -0
- package/build/types/components/checkIn/sheets/CheckInScanSuccess.vue.d.ts +6 -0
- package/build/types/components/checkIn/sheets/CheckInScanner.vue.d.ts +7 -0
- package/build/types/components/checkIn/sheets/CheckInSingle.vue.d.ts +2 -0
- package/build/types/components/checkIn/sheets/index.d.ts +7 -0
- package/build/types/components/index.d.ts +1 -0
- package/build/types/components/situation/situation.types.d.ts +1 -1
- package/build/types/components/staff/staff.types.d.ts +1 -1
- package/build/types/components/task/task.types.d.ts +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/providers/index.d.ts +1 -0
- package/build/types/providers/operasional/attendance.store.d.ts +15 -0
- package/build/types/providers/operasional/bus.d.ts +7 -0
- package/build/types/providers/operasional/index.d.ts +6 -0
- package/build/types/providers/operasional/operasional.store.d.ts +2 -0
- package/build/types/providers/operasional/operasional.types.d.ts +11 -0
- package/build/types/providers/operasional/useOperasional.d.ts +7 -0
- package/build/types/providers/operasional/withOperasional.d.ts +2 -0
- package/package.json +6 -4
package/build/index.cjs
CHANGED
|
@@ -3,14 +3,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const client = require("@neon.id/utils/client");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const interfaces = require("@neon.id/interfaces");
|
|
6
|
-
const
|
|
6
|
+
const tempatModels = require("@neutron.co.id/tempat-models");
|
|
7
7
|
const context = require("@neon.id/context");
|
|
8
|
+
const core = require("@vueuse/core");
|
|
8
9
|
const office = require("@neon.id/office");
|
|
10
|
+
const query = require("@neon.id/query");
|
|
11
|
+
const pinia = require("pinia");
|
|
12
|
+
const component = require("@neon.id/utils/component");
|
|
9
13
|
const form = require("@neon.id/form");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
+
const personaliaModels = require("@neutron.co.id/personalia-models");
|
|
15
|
+
const identitasInterfaces = require("@neon.id/identitas-interfaces");
|
|
16
|
+
const _hoisted_1$8 = { class: "xxx-button" };
|
|
17
|
+
const __default__$8 = vue.defineComponent({ name: "XxxButton" });
|
|
18
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__$8,
|
|
14
20
|
props: {
|
|
15
21
|
color: {
|
|
16
22
|
type: String,
|
|
@@ -19,947 +25,260 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
25
|
},
|
|
20
26
|
setup(__props) {
|
|
21
27
|
return (_ctx, _cache) => {
|
|
22
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
28
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
23
29
|
vue.createVNode(vue.unref(interfaces.NeonButton), { label: "XXX" })
|
|
24
30
|
]);
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...__default__$5,
|
|
34
|
-
setup(__props) {
|
|
35
|
-
context.useCollection();
|
|
36
|
-
return (_ctx, _cache) => {
|
|
37
|
-
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-staff-collection" }, {
|
|
38
|
-
default: vue.withCtx(() => [
|
|
39
|
-
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
40
|
-
]),
|
|
41
|
-
_: 1
|
|
42
|
-
/* STABLE */
|
|
43
|
-
});
|
|
44
|
-
};
|
|
34
|
+
const CheckInModel = tempatModels.models.CheckInModel;
|
|
35
|
+
function devAssert(condition, message) {
|
|
36
|
+
const booleanCondition = Boolean(condition);
|
|
37
|
+
if (!booleanCondition) {
|
|
38
|
+
throw new Error(message);
|
|
45
39
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
values,
|
|
57
|
-
isLoading,
|
|
58
|
-
isChanged,
|
|
59
|
-
isReady,
|
|
60
|
-
isMain,
|
|
61
|
-
isNew,
|
|
62
|
-
saveOne,
|
|
63
|
-
discardChanges
|
|
64
|
-
} = context.useSingle();
|
|
65
|
-
return (_ctx, _cache) => {
|
|
66
|
-
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-staff-single" }, {
|
|
67
|
-
default: vue.withCtx(() => [
|
|
68
|
-
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
69
|
-
default: vue.withCtx(() => [
|
|
70
|
-
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
71
|
-
handle: "info",
|
|
72
|
-
icon: "circle-info",
|
|
73
|
-
title: "Info"
|
|
74
|
-
}, {
|
|
75
|
-
default: vue.withCtx(() => [
|
|
76
|
-
vue.createVNode(vue.unref(form.NeonForm), {
|
|
77
|
-
handle: "info",
|
|
78
|
-
"initial-values": vue.unref(initialValues),
|
|
79
|
-
"is-loading": vue.unref(isLoading),
|
|
80
|
-
"is-changed": vue.unref(isChanged),
|
|
81
|
-
"use-unsaved": "",
|
|
82
|
-
onCancel: vue.unref(discardChanges),
|
|
83
|
-
onSubmit: vue.unref(saveOne)
|
|
84
|
-
}, {
|
|
85
|
-
default: vue.withCtx(() => [
|
|
86
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
87
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
88
|
-
modelValue: vue.unref(values).name,
|
|
89
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).name = $event)
|
|
90
|
-
}, vue.unref(fields).name), null, 16, ["modelValue"]),
|
|
91
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
92
|
-
modelValue: vue.unref(values).nik,
|
|
93
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).nik = $event)
|
|
94
|
-
}, vue.unref(fields).nik), null, 16, ["modelValue"])
|
|
95
|
-
]),
|
|
96
|
-
vue.createElementVNode("div", _hoisted_2, [
|
|
97
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
98
|
-
modelValue: vue.unref(values).birthPlace,
|
|
99
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).birthPlace = $event)
|
|
100
|
-
}, vue.unref(fields).birthPlace), null, 16, ["modelValue"]),
|
|
101
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
102
|
-
modelValue: vue.unref(values).birthDate,
|
|
103
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(values).birthDate = $event)
|
|
104
|
-
}, vue.unref(fields).birthDate), null, 16, ["modelValue"])
|
|
105
|
-
]),
|
|
106
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
107
|
-
modelValue: vue.unref(values).image,
|
|
108
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).image = $event)
|
|
109
|
-
}, vue.unref(fields).image), null, 16, ["modelValue"]),
|
|
110
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
111
|
-
modelValue: vue.unref(values).note,
|
|
112
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).note = $event)
|
|
113
|
-
}, vue.unref(fields).note), null, 16, ["modelValue"])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
/* STABLE */
|
|
117
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
118
|
-
]),
|
|
119
|
-
_: 1
|
|
120
|
-
/* STABLE */
|
|
121
|
-
}),
|
|
122
|
-
vue.createCommentVNode(' IDENTITAS\n <OfficeTab handle="identity" icon="circle-info" title="Identity">\n </OfficeTab> '),
|
|
123
|
-
vue.createCommentVNode(" CABANG "),
|
|
124
|
-
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
125
|
-
handle: "branch",
|
|
126
|
-
icon: "circle-info",
|
|
127
|
-
title: "Cabang"
|
|
128
|
-
}, {
|
|
129
|
-
default: vue.withCtx(() => [
|
|
130
|
-
vue.createVNode(vue.unref(form.NeonForm), {
|
|
131
|
-
handle: "branch",
|
|
132
|
-
"initial-values": vue.unref(initialValues),
|
|
133
|
-
"is-loading": vue.unref(isLoading),
|
|
134
|
-
"is-changed": vue.unref(isChanged),
|
|
135
|
-
"use-unsaved": "",
|
|
136
|
-
onCancel: vue.unref(discardChanges),
|
|
137
|
-
onSubmit: vue.unref(saveOne)
|
|
138
|
-
}, {
|
|
139
|
-
default: vue.withCtx(() => [
|
|
140
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
141
|
-
modelValue: vue.unref(values),
|
|
142
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
143
|
-
field: vue.unref(fields).branch
|
|
144
|
-
}, null, 8, ["modelValue", "field"]),
|
|
145
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
146
|
-
modelValue: vue.unref(values),
|
|
147
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
148
|
-
field: vue.unref(fields).branches
|
|
149
|
-
}, null, 8, ["modelValue", "field"])
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
/* STABLE */
|
|
153
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
/* STABLE */
|
|
157
|
-
}),
|
|
158
|
-
vue.createCommentVNode(" KELUAR MASUK "),
|
|
159
|
-
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
160
|
-
handle: "checkIn",
|
|
161
|
-
icon: "person-to-door",
|
|
162
|
-
title: "Keluar Masuk"
|
|
163
|
-
}, {
|
|
164
|
-
default: vue.withCtx(() => [
|
|
165
|
-
vue.createCommentVNode(` <OfficeCollectionRelated
|
|
166
|
-
definition="neu:tempat:checkIn"
|
|
167
|
-
title="Keluar Masuk"
|
|
168
|
-
description="Keluar masuk."
|
|
169
|
-
:query="
|
|
170
|
-
Query.define({
|
|
171
|
-
filter: {
|
|
172
|
-
handle: 'staffId',
|
|
173
|
-
operator: 'eq',
|
|
174
|
-
value: id,
|
|
175
|
-
},
|
|
176
|
-
})
|
|
177
|
-
"
|
|
178
|
-
/> `)
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
/* STABLE */
|
|
182
|
-
})
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
/* STABLE */
|
|
186
|
-
}, 8, ["use-url"])
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
/* STABLE */
|
|
190
|
-
});
|
|
191
|
-
};
|
|
40
|
+
}
|
|
41
|
+
function isObjectLike(value) {
|
|
42
|
+
return typeof value == "object" && value !== null;
|
|
43
|
+
}
|
|
44
|
+
function invariant(condition, message) {
|
|
45
|
+
const booleanCondition = Boolean(condition);
|
|
46
|
+
if (!booleanCondition) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
message != null ? message : "Unexpected invariant triggered."
|
|
49
|
+
);
|
|
192
50
|
}
|
|
193
|
-
}
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
51
|
+
}
|
|
52
|
+
const LineRegExp = /\r\n|[\n\r]/g;
|
|
53
|
+
function getLocation(source, position) {
|
|
54
|
+
let lastLineStart = 0;
|
|
55
|
+
let line = 1;
|
|
56
|
+
for (const match of source.body.matchAll(LineRegExp)) {
|
|
57
|
+
typeof match.index === "number" || invariant(false);
|
|
58
|
+
if (match.index >= position) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
lastLineStart = match.index + match[0].length;
|
|
62
|
+
line += 1;
|
|
199
63
|
}
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
64
|
+
return {
|
|
65
|
+
line,
|
|
66
|
+
column: position + 1 - lastLineStart
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function printLocation(location) {
|
|
70
|
+
return printSourceLocation(
|
|
71
|
+
location.source,
|
|
72
|
+
getLocation(location.source, location.start)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
function printSourceLocation(source, sourceLocation) {
|
|
76
|
+
const firstLineColumnOffset = source.locationOffset.column - 1;
|
|
77
|
+
const body = "".padStart(firstLineColumnOffset) + source.body;
|
|
78
|
+
const lineIndex = sourceLocation.line - 1;
|
|
79
|
+
const lineOffset = source.locationOffset.line - 1;
|
|
80
|
+
const lineNum = sourceLocation.line + lineOffset;
|
|
81
|
+
const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
|
|
82
|
+
const columnNum = sourceLocation.column + columnOffset;
|
|
83
|
+
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
|
84
|
+
`;
|
|
85
|
+
const lines = body.split(/\r\n|[\n\r]/g);
|
|
86
|
+
const locationLine = lines[lineIndex];
|
|
87
|
+
if (locationLine.length > 120) {
|
|
88
|
+
const subLineIndex = Math.floor(columnNum / 80);
|
|
89
|
+
const subLineColumnNum = columnNum % 80;
|
|
90
|
+
const subLines = [];
|
|
91
|
+
for (let i2 = 0; i2 < locationLine.length; i2 += 80) {
|
|
92
|
+
subLines.push(locationLine.slice(i2, i2 + 80));
|
|
93
|
+
}
|
|
94
|
+
return locationStr + printPrefixedLines([
|
|
95
|
+
[`${lineNum} |`, subLines[0]],
|
|
96
|
+
...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]),
|
|
97
|
+
["|", "^".padStart(subLineColumnNum)],
|
|
98
|
+
["|", subLines[subLineIndex + 1]]
|
|
99
|
+
]);
|
|
218
100
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
handle: "info",
|
|
243
|
-
icon: "circle-info",
|
|
244
|
-
title: "Info"
|
|
245
|
-
}, {
|
|
246
|
-
default: vue.withCtx(() => [
|
|
247
|
-
vue.createVNode(vue.unref(form.NeonForm), {
|
|
248
|
-
handle: "info",
|
|
249
|
-
"initial-values": vue.unref(initialValues),
|
|
250
|
-
"is-loading": vue.unref(isLoading),
|
|
251
|
-
"is-changed": vue.unref(isChanged),
|
|
252
|
-
"use-unsaved": "",
|
|
253
|
-
onCancel: vue.unref(discardChanges),
|
|
254
|
-
onSubmit: vue.unref(saveOne)
|
|
255
|
-
}, {
|
|
256
|
-
default: vue.withCtx(() => [
|
|
257
|
-
vue.createVNode(vue.unref(form.NeonFields), {
|
|
258
|
-
md: "grid-cols-4",
|
|
259
|
-
title: "Situasi"
|
|
260
|
-
}, {
|
|
261
|
-
default: vue.withCtx(() => [
|
|
262
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
263
|
-
modelValue: vue.unref(values).situationStatus,
|
|
264
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationStatus = $event)
|
|
265
|
-
}, vue.unref(fields).situationStatus), null, 16, ["modelValue"])
|
|
266
|
-
]),
|
|
267
|
-
_: 1
|
|
268
|
-
/* STABLE */
|
|
269
|
-
}),
|
|
270
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
271
|
-
modelValue: vue.unref(values),
|
|
272
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
273
|
-
field: vue.unref(fields).branches
|
|
274
|
-
}, null, 8, ["modelValue", "field"]),
|
|
275
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
276
|
-
modelValue: vue.unref(values),
|
|
277
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
278
|
-
field: vue.unref(fields).situationType
|
|
279
|
-
}, null, 8, ["modelValue", "field"]),
|
|
280
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
281
|
-
modelValue: vue.unref(values),
|
|
282
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
283
|
-
field: vue.unref(fields).situationReportedBy
|
|
284
|
-
}, null, 8, ["modelValue", "field"]),
|
|
285
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
286
|
-
default: vue.withCtx(() => [
|
|
287
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
288
|
-
modelValue: vue.unref(values).situationDescription,
|
|
289
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).situationDescription = $event)
|
|
290
|
-
}, vue.unref(fields).situationDescription), null, 16, ["modelValue"])
|
|
291
|
-
]),
|
|
292
|
-
_: 1
|
|
293
|
-
/* STABLE */
|
|
294
|
-
}),
|
|
295
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
296
|
-
default: vue.withCtx(() => [
|
|
297
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
298
|
-
modelValue: vue.unref(values).urgentSituationDate,
|
|
299
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).urgentSituationDate = $event)
|
|
300
|
-
}, vue.unref(fields).urgentSituationDate), null, 16, ["modelValue"])
|
|
301
|
-
]),
|
|
302
|
-
_: 1
|
|
303
|
-
/* STABLE */
|
|
304
|
-
}),
|
|
305
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
306
|
-
modelValue: vue.unref(values),
|
|
307
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
308
|
-
field: vue.unref(fields).situationRelatedBy
|
|
309
|
-
}, null, 8, ["modelValue", "field"]),
|
|
310
|
-
vue.createVNode(vue.unref(form.NeonFields), {
|
|
311
|
-
md: "grid-cols-4",
|
|
312
|
-
title: "Suportif"
|
|
313
|
-
}, {
|
|
314
|
-
default: vue.withCtx(() => [
|
|
315
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
316
|
-
modelValue: vue.unref(values).supportiveStatus,
|
|
317
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).supportiveStatus = $event)
|
|
318
|
-
}, vue.unref(fields).supportiveStatus), null, 16, ["modelValue"])
|
|
319
|
-
]),
|
|
320
|
-
_: 1
|
|
321
|
-
/* STABLE */
|
|
322
|
-
}),
|
|
323
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
324
|
-
modelValue: vue.unref(values),
|
|
325
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
326
|
-
field: vue.unref(fields).situationSupportedBy
|
|
327
|
-
}, null, 8, ["modelValue", "field"]),
|
|
328
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
329
|
-
default: vue.withCtx(() => [
|
|
330
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
331
|
-
modelValue: vue.unref(values).situationResponse,
|
|
332
|
-
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(values).situationResponse = $event)
|
|
333
|
-
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
334
|
-
]),
|
|
335
|
-
_: 1
|
|
336
|
-
/* STABLE */
|
|
337
|
-
})
|
|
338
|
-
]),
|
|
339
|
-
_: 1
|
|
340
|
-
/* STABLE */
|
|
341
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
342
|
-
]),
|
|
343
|
-
_: 1
|
|
344
|
-
/* STABLE */
|
|
345
|
-
})
|
|
346
|
-
]),
|
|
347
|
-
_: 1
|
|
348
|
-
/* STABLE */
|
|
349
|
-
}, 8, ["use-url"])
|
|
350
|
-
]),
|
|
351
|
-
_: 1
|
|
352
|
-
/* STABLE */
|
|
353
|
-
});
|
|
101
|
+
return locationStr + printPrefixedLines([
|
|
102
|
+
// Lines specified like this: ["prefix", "string"],
|
|
103
|
+
[`${lineNum - 1} |`, lines[lineIndex - 1]],
|
|
104
|
+
[`${lineNum} |`, locationLine],
|
|
105
|
+
["|", "^".padStart(columnNum)],
|
|
106
|
+
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
function printPrefixedLines(lines) {
|
|
110
|
+
const existingLines = lines.filter(([_, line]) => line !== void 0);
|
|
111
|
+
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
112
|
+
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n");
|
|
113
|
+
}
|
|
114
|
+
function toNormalizedOptions(args) {
|
|
115
|
+
const firstArg = args[0];
|
|
116
|
+
if (firstArg == null || "kind" in firstArg || "length" in firstArg) {
|
|
117
|
+
return {
|
|
118
|
+
nodes: firstArg,
|
|
119
|
+
source: args[1],
|
|
120
|
+
positions: args[2],
|
|
121
|
+
path: args[3],
|
|
122
|
+
originalError: args[4],
|
|
123
|
+
extensions: args[5]
|
|
354
124
|
};
|
|
355
125
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}, {
|
|
452
|
-
default: vue.withCtx(() => [
|
|
453
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
454
|
-
modelValue: vue.unref(values).supportiveStatus,
|
|
455
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).supportiveStatus = $event)
|
|
456
|
-
}, vue.unref(fields).supportiveStatus), null, 16, ["modelValue"])
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
/* STABLE */
|
|
460
|
-
}),
|
|
461
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
462
|
-
modelValue: vue.unref(values),
|
|
463
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
464
|
-
field: vue.unref(fields).situationSupportedBy
|
|
465
|
-
}, null, 8, ["modelValue", "field"]),
|
|
466
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
467
|
-
default: vue.withCtx(() => [
|
|
468
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
469
|
-
modelValue: vue.unref(values).situationResponse,
|
|
470
|
-
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(values).situationResponse = $event)
|
|
471
|
-
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
472
|
-
]),
|
|
473
|
-
_: 1
|
|
474
|
-
/* STABLE */
|
|
475
|
-
})
|
|
476
|
-
]),
|
|
477
|
-
_: 1
|
|
478
|
-
/* STABLE */
|
|
479
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
480
|
-
]),
|
|
481
|
-
_: 1
|
|
482
|
-
/* STABLE */
|
|
483
|
-
})
|
|
484
|
-
]),
|
|
485
|
-
_: 1
|
|
486
|
-
/* STABLE */
|
|
487
|
-
}, 8, ["use-url"])
|
|
488
|
-
]),
|
|
489
|
-
_: 1
|
|
490
|
-
/* STABLE */
|
|
126
|
+
return firstArg;
|
|
127
|
+
}
|
|
128
|
+
class GraphQLError extends Error {
|
|
129
|
+
/**
|
|
130
|
+
* An array of `{ line, column }` locations within the source GraphQL document
|
|
131
|
+
* which correspond to this error.
|
|
132
|
+
*
|
|
133
|
+
* Errors during validation often contain multiple locations, for example to
|
|
134
|
+
* point out two things with the same name. Errors during execution include a
|
|
135
|
+
* single location, the field which produced the error.
|
|
136
|
+
*
|
|
137
|
+
* Enumerable, and appears in the result of JSON.stringify().
|
|
138
|
+
*/
|
|
139
|
+
/**
|
|
140
|
+
* An array describing the JSON-path into the execution response which
|
|
141
|
+
* corresponds to this error. Only included for errors during execution.
|
|
142
|
+
*
|
|
143
|
+
* Enumerable, and appears in the result of JSON.stringify().
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* An array of GraphQL AST Nodes corresponding to this error.
|
|
147
|
+
*/
|
|
148
|
+
/**
|
|
149
|
+
* The source GraphQL document for the first location of this error.
|
|
150
|
+
*
|
|
151
|
+
* Note that if this Error represents more than one node, the source may not
|
|
152
|
+
* represent nodes after the first node.
|
|
153
|
+
*/
|
|
154
|
+
/**
|
|
155
|
+
* An array of character offsets within the source GraphQL document
|
|
156
|
+
* which correspond to this error.
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* The original error thrown from a field resolver during execution.
|
|
160
|
+
*/
|
|
161
|
+
/**
|
|
162
|
+
* Extension fields to add to the formatted error.
|
|
163
|
+
*/
|
|
164
|
+
/**
|
|
165
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
166
|
+
*/
|
|
167
|
+
constructor(message, ...rawArgs) {
|
|
168
|
+
var _this$nodes, _nodeLocations$, _ref;
|
|
169
|
+
const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs);
|
|
170
|
+
super(message);
|
|
171
|
+
this.name = "GraphQLError";
|
|
172
|
+
this.path = path !== null && path !== void 0 ? path : void 0;
|
|
173
|
+
this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0;
|
|
174
|
+
this.nodes = undefinedIfEmpty(
|
|
175
|
+
Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0
|
|
176
|
+
);
|
|
177
|
+
const nodeLocations = undefinedIfEmpty(
|
|
178
|
+
(_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null)
|
|
179
|
+
);
|
|
180
|
+
this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
|
|
181
|
+
this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start);
|
|
182
|
+
this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start));
|
|
183
|
+
const originalExtensions = isObjectLike(
|
|
184
|
+
originalError === null || originalError === void 0 ? void 0 : originalError.extensions
|
|
185
|
+
) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0;
|
|
186
|
+
this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null);
|
|
187
|
+
Object.defineProperties(this, {
|
|
188
|
+
message: {
|
|
189
|
+
writable: true,
|
|
190
|
+
enumerable: true
|
|
191
|
+
},
|
|
192
|
+
name: {
|
|
193
|
+
enumerable: false
|
|
194
|
+
},
|
|
195
|
+
nodes: {
|
|
196
|
+
enumerable: false
|
|
197
|
+
},
|
|
198
|
+
source: {
|
|
199
|
+
enumerable: false
|
|
200
|
+
},
|
|
201
|
+
positions: {
|
|
202
|
+
enumerable: false
|
|
203
|
+
},
|
|
204
|
+
originalError: {
|
|
205
|
+
enumerable: false
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
if (originalError !== null && originalError !== void 0 && originalError.stack) {
|
|
209
|
+
Object.defineProperty(this, "stack", {
|
|
210
|
+
value: originalError.stack,
|
|
211
|
+
writable: true,
|
|
212
|
+
configurable: true
|
|
213
|
+
});
|
|
214
|
+
} else if (Error.captureStackTrace) {
|
|
215
|
+
Error.captureStackTrace(this, GraphQLError);
|
|
216
|
+
} else {
|
|
217
|
+
Object.defineProperty(this, "stack", {
|
|
218
|
+
value: Error().stack,
|
|
219
|
+
writable: true,
|
|
220
|
+
configurable: true
|
|
491
221
|
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
get [Symbol.toStringTag]() {
|
|
225
|
+
return "GraphQLError";
|
|
226
|
+
}
|
|
227
|
+
toString() {
|
|
228
|
+
let output = this.message;
|
|
229
|
+
if (this.nodes) {
|
|
230
|
+
for (const node of this.nodes) {
|
|
231
|
+
if (node.loc) {
|
|
232
|
+
output += "\n\n" + printLocation(node.loc);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
} else if (this.source && this.locations) {
|
|
236
|
+
for (const location of this.locations) {
|
|
237
|
+
output += "\n\n" + printSourceLocation(this.source, location);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return output;
|
|
241
|
+
}
|
|
242
|
+
toJSON() {
|
|
243
|
+
const formattedError = {
|
|
244
|
+
message: this.message
|
|
492
245
|
};
|
|
246
|
+
if (this.locations != null) {
|
|
247
|
+
formattedError.locations = this.locations;
|
|
248
|
+
}
|
|
249
|
+
if (this.path != null) {
|
|
250
|
+
formattedError.path = this.path;
|
|
251
|
+
}
|
|
252
|
+
if (this.extensions != null && Object.keys(this.extensions).length > 0) {
|
|
253
|
+
formattedError.extensions = this.extensions;
|
|
254
|
+
}
|
|
255
|
+
return formattedError;
|
|
493
256
|
}
|
|
494
|
-
});
|
|
495
|
-
const __default__$3 = vue.defineComponent({ name: "SituationSupportive" });
|
|
496
|
-
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
497
|
-
...__default__$3,
|
|
498
|
-
setup(__props) {
|
|
499
|
-
const {
|
|
500
|
-
fields,
|
|
501
|
-
id,
|
|
502
|
-
initialValues,
|
|
503
|
-
values,
|
|
504
|
-
isNew,
|
|
505
|
-
isLoading,
|
|
506
|
-
isChanged,
|
|
507
|
-
isReady,
|
|
508
|
-
isMain,
|
|
509
|
-
saveOne,
|
|
510
|
-
discardChanges
|
|
511
|
-
} = context.useSingle();
|
|
512
|
-
return (_ctx, _cache) => {
|
|
513
|
-
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
514
|
-
default: vue.withCtx(() => [
|
|
515
|
-
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
516
|
-
default: vue.withCtx(() => [
|
|
517
|
-
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
518
|
-
handle: "info",
|
|
519
|
-
icon: "circle-info",
|
|
520
|
-
title: "Info"
|
|
521
|
-
}, {
|
|
522
|
-
default: vue.withCtx(() => [
|
|
523
|
-
vue.createVNode(vue.unref(form.NeonForm), {
|
|
524
|
-
handle: "info",
|
|
525
|
-
"initial-values": vue.unref(initialValues),
|
|
526
|
-
"is-loading": vue.unref(isLoading),
|
|
527
|
-
"is-changed": vue.unref(isChanged),
|
|
528
|
-
"use-unsaved": "",
|
|
529
|
-
onCancel: vue.unref(discardChanges),
|
|
530
|
-
onSubmit: vue.unref(saveOne)
|
|
531
|
-
}, {
|
|
532
|
-
default: vue.withCtx(() => [
|
|
533
|
-
vue.createVNode(vue.unref(form.NeonFields), {
|
|
534
|
-
md: "grid-cols-4",
|
|
535
|
-
title: "Suportif"
|
|
536
|
-
}, {
|
|
537
|
-
default: vue.withCtx(() => [
|
|
538
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
539
|
-
modelValue: vue.unref(values).situationStatus,
|
|
540
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationStatus = $event)
|
|
541
|
-
}, vue.unref(fields).situationStatus, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
542
|
-
]),
|
|
543
|
-
_: 1
|
|
544
|
-
/* STABLE */
|
|
545
|
-
}),
|
|
546
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
547
|
-
modelValue: vue.unref(values),
|
|
548
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
549
|
-
field: vue.unref(fields).situationSupportedBy
|
|
550
|
-
}, null, 8, ["modelValue", "field"]),
|
|
551
|
-
vue.createVNode(vue.unref(form.NeonFields), {
|
|
552
|
-
md: "grid-cols-4",
|
|
553
|
-
title: "Situasi"
|
|
554
|
-
}, {
|
|
555
|
-
default: vue.withCtx(() => [
|
|
556
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
557
|
-
modelValue: vue.unref(values).situationResponse,
|
|
558
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).situationResponse = $event)
|
|
559
|
-
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
560
|
-
]),
|
|
561
|
-
_: 1
|
|
562
|
-
/* STABLE */
|
|
563
|
-
}),
|
|
564
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
565
|
-
modelValue: vue.unref(values),
|
|
566
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
567
|
-
field: vue.unref(fields).branches,
|
|
568
|
-
"is-disabled": ""
|
|
569
|
-
}, null, 8, ["modelValue", "field"]),
|
|
570
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
571
|
-
modelValue: vue.unref(values),
|
|
572
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
573
|
-
field: vue.unref(fields).situationType,
|
|
574
|
-
"is-disabled": ""
|
|
575
|
-
}, null, 8, ["modelValue", "field"]),
|
|
576
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
577
|
-
modelValue: vue.unref(values),
|
|
578
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
579
|
-
field: vue.unref(fields).situationReportedBy,
|
|
580
|
-
"is-disabled": ""
|
|
581
|
-
}, null, 8, ["modelValue", "field"]),
|
|
582
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
583
|
-
default: vue.withCtx(() => [
|
|
584
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
585
|
-
modelValue: vue.unref(values).situationDescription,
|
|
586
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.unref(values).situationDescription = $event)
|
|
587
|
-
}, vue.unref(fields).situationDescription, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
588
|
-
]),
|
|
589
|
-
_: 1
|
|
590
|
-
/* STABLE */
|
|
591
|
-
}),
|
|
592
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
593
|
-
default: vue.withCtx(() => [
|
|
594
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
595
|
-
modelValue: vue.unref(values).urgentSituationDate,
|
|
596
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).urgentSituationDate = $event)
|
|
597
|
-
}, vue.unref(fields).urgentSituationDate, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
598
|
-
]),
|
|
599
|
-
_: 1
|
|
600
|
-
/* STABLE */
|
|
601
|
-
}),
|
|
602
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
603
|
-
modelValue: vue.unref(values),
|
|
604
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
605
|
-
field: vue.unref(fields).situationRelatedBy,
|
|
606
|
-
"is-disabled": ""
|
|
607
|
-
}, null, 8, ["modelValue", "field"])
|
|
608
|
-
]),
|
|
609
|
-
_: 1
|
|
610
|
-
/* STABLE */
|
|
611
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
612
|
-
]),
|
|
613
|
-
_: 1
|
|
614
|
-
/* STABLE */
|
|
615
|
-
})
|
|
616
|
-
]),
|
|
617
|
-
_: 1
|
|
618
|
-
/* STABLE */
|
|
619
|
-
}, 8, ["use-url"])
|
|
620
|
-
]),
|
|
621
|
-
_: 1
|
|
622
|
-
/* STABLE */
|
|
623
|
-
});
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
const SituationTypeModel = personaliaModels.models.SituationTypeModel;
|
|
628
|
-
const __default__$2 = vue.defineComponent({ name: "SituationTypeCollection" });
|
|
629
|
-
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
630
|
-
...__default__$2,
|
|
631
|
-
setup(__props) {
|
|
632
|
-
context.useCollection();
|
|
633
|
-
return (_ctx, _cache) => {
|
|
634
|
-
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-situationType-collection" }, {
|
|
635
|
-
default: vue.withCtx(() => [
|
|
636
|
-
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
637
|
-
]),
|
|
638
|
-
_: 1
|
|
639
|
-
/* STABLE */
|
|
640
|
-
});
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
645
|
-
__name: "SituationTypeSingle",
|
|
646
|
-
setup(__props) {
|
|
647
|
-
const {
|
|
648
|
-
fields,
|
|
649
|
-
id,
|
|
650
|
-
initialValues,
|
|
651
|
-
values,
|
|
652
|
-
isNew,
|
|
653
|
-
isLoading,
|
|
654
|
-
isChanged,
|
|
655
|
-
isReady,
|
|
656
|
-
isMain,
|
|
657
|
-
saveOne,
|
|
658
|
-
discardChanges
|
|
659
|
-
} = context.useSingle();
|
|
660
|
-
return (_ctx, _cache) => {
|
|
661
|
-
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-type-single" }, {
|
|
662
|
-
default: vue.withCtx(() => [
|
|
663
|
-
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
664
|
-
default: vue.withCtx(() => [
|
|
665
|
-
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
666
|
-
handle: "info",
|
|
667
|
-
icon: "circle-info",
|
|
668
|
-
title: "Info"
|
|
669
|
-
}, {
|
|
670
|
-
default: vue.withCtx(() => [
|
|
671
|
-
vue.createVNode(vue.unref(form.NeonForm), {
|
|
672
|
-
handle: "info",
|
|
673
|
-
"initial-values": vue.unref(initialValues),
|
|
674
|
-
"is-loading": vue.unref(isLoading),
|
|
675
|
-
"is-changed": vue.unref(isChanged),
|
|
676
|
-
"use-unsaved": "",
|
|
677
|
-
onCancel: vue.unref(discardChanges),
|
|
678
|
-
onSubmit: vue.unref(saveOne)
|
|
679
|
-
}, {
|
|
680
|
-
default: vue.withCtx(() => [
|
|
681
|
-
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
682
|
-
default: vue.withCtx(() => [
|
|
683
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
684
|
-
modelValue: vue.unref(values).situationTypeName,
|
|
685
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationTypeName = $event)
|
|
686
|
-
}, vue.unref(fields).situationTypeName), null, 16, ["modelValue"])
|
|
687
|
-
]),
|
|
688
|
-
_: 1
|
|
689
|
-
/* STABLE */
|
|
690
|
-
}),
|
|
691
|
-
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
692
|
-
modelValue: vue.unref(values),
|
|
693
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
694
|
-
field: vue.unref(fields).branches
|
|
695
|
-
}, null, 8, ["modelValue", "field"])
|
|
696
|
-
]),
|
|
697
|
-
_: 1
|
|
698
|
-
/* STABLE */
|
|
699
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
700
|
-
]),
|
|
701
|
-
_: 1
|
|
702
|
-
/* STABLE */
|
|
703
|
-
})
|
|
704
|
-
]),
|
|
705
|
-
_: 1
|
|
706
|
-
/* STABLE */
|
|
707
|
-
}, 8, ["use-url"])
|
|
708
|
-
]),
|
|
709
|
-
_: 1
|
|
710
|
-
/* STABLE */
|
|
711
|
-
});
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
const TaskModel = personaliaModels.models.TaskModel;
|
|
716
|
-
function devAssert(condition, message) {
|
|
717
|
-
const booleanCondition = Boolean(condition);
|
|
718
|
-
if (!booleanCondition) {
|
|
719
|
-
throw new Error(message);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
function isObjectLike(value) {
|
|
723
|
-
return typeof value == "object" && value !== null;
|
|
724
|
-
}
|
|
725
|
-
function invariant(condition, message) {
|
|
726
|
-
const booleanCondition = Boolean(condition);
|
|
727
|
-
if (!booleanCondition) {
|
|
728
|
-
throw new Error(
|
|
729
|
-
message != null ? message : "Unexpected invariant triggered."
|
|
730
|
-
);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
const LineRegExp = /\r\n|[\n\r]/g;
|
|
734
|
-
function getLocation(source, position) {
|
|
735
|
-
let lastLineStart = 0;
|
|
736
|
-
let line = 1;
|
|
737
|
-
for (const match of source.body.matchAll(LineRegExp)) {
|
|
738
|
-
typeof match.index === "number" || invariant(false);
|
|
739
|
-
if (match.index >= position) {
|
|
740
|
-
break;
|
|
741
|
-
}
|
|
742
|
-
lastLineStart = match.index + match[0].length;
|
|
743
|
-
line += 1;
|
|
744
|
-
}
|
|
745
|
-
return {
|
|
746
|
-
line,
|
|
747
|
-
column: position + 1 - lastLineStart
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
function printLocation(location) {
|
|
751
|
-
return printSourceLocation(
|
|
752
|
-
location.source,
|
|
753
|
-
getLocation(location.source, location.start)
|
|
754
|
-
);
|
|
755
|
-
}
|
|
756
|
-
function printSourceLocation(source, sourceLocation) {
|
|
757
|
-
const firstLineColumnOffset = source.locationOffset.column - 1;
|
|
758
|
-
const body = "".padStart(firstLineColumnOffset) + source.body;
|
|
759
|
-
const lineIndex = sourceLocation.line - 1;
|
|
760
|
-
const lineOffset = source.locationOffset.line - 1;
|
|
761
|
-
const lineNum = sourceLocation.line + lineOffset;
|
|
762
|
-
const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
|
|
763
|
-
const columnNum = sourceLocation.column + columnOffset;
|
|
764
|
-
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
|
765
|
-
`;
|
|
766
|
-
const lines = body.split(/\r\n|[\n\r]/g);
|
|
767
|
-
const locationLine = lines[lineIndex];
|
|
768
|
-
if (locationLine.length > 120) {
|
|
769
|
-
const subLineIndex = Math.floor(columnNum / 80);
|
|
770
|
-
const subLineColumnNum = columnNum % 80;
|
|
771
|
-
const subLines = [];
|
|
772
|
-
for (let i2 = 0; i2 < locationLine.length; i2 += 80) {
|
|
773
|
-
subLines.push(locationLine.slice(i2, i2 + 80));
|
|
774
|
-
}
|
|
775
|
-
return locationStr + printPrefixedLines([
|
|
776
|
-
[`${lineNum} |`, subLines[0]],
|
|
777
|
-
...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]),
|
|
778
|
-
["|", "^".padStart(subLineColumnNum)],
|
|
779
|
-
["|", subLines[subLineIndex + 1]]
|
|
780
|
-
]);
|
|
781
|
-
}
|
|
782
|
-
return locationStr + printPrefixedLines([
|
|
783
|
-
// Lines specified like this: ["prefix", "string"],
|
|
784
|
-
[`${lineNum - 1} |`, lines[lineIndex - 1]],
|
|
785
|
-
[`${lineNum} |`, locationLine],
|
|
786
|
-
["|", "^".padStart(columnNum)],
|
|
787
|
-
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
|
788
|
-
]);
|
|
789
257
|
}
|
|
790
|
-
function
|
|
791
|
-
|
|
792
|
-
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
793
|
-
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n");
|
|
258
|
+
function undefinedIfEmpty(array) {
|
|
259
|
+
return array === void 0 || array.length === 0 ? void 0 : array;
|
|
794
260
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
source: args[1],
|
|
801
|
-
positions: args[2],
|
|
802
|
-
path: args[3],
|
|
803
|
-
originalError: args[4],
|
|
804
|
-
extensions: args[5]
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
return firstArg;
|
|
261
|
+
function syntaxError(source, position, description) {
|
|
262
|
+
return new GraphQLError(`Syntax Error: ${description}`, {
|
|
263
|
+
source,
|
|
264
|
+
positions: [position]
|
|
265
|
+
});
|
|
808
266
|
}
|
|
809
|
-
class
|
|
810
|
-
/**
|
|
811
|
-
* An array of `{ line, column }` locations within the source GraphQL document
|
|
812
|
-
* which correspond to this error.
|
|
813
|
-
*
|
|
814
|
-
* Errors during validation often contain multiple locations, for example to
|
|
815
|
-
* point out two things with the same name. Errors during execution include a
|
|
816
|
-
* single location, the field which produced the error.
|
|
817
|
-
*
|
|
818
|
-
* Enumerable, and appears in the result of JSON.stringify().
|
|
819
|
-
*/
|
|
820
|
-
/**
|
|
821
|
-
* An array describing the JSON-path into the execution response which
|
|
822
|
-
* corresponds to this error. Only included for errors during execution.
|
|
823
|
-
*
|
|
824
|
-
* Enumerable, and appears in the result of JSON.stringify().
|
|
825
|
-
*/
|
|
826
|
-
/**
|
|
827
|
-
* An array of GraphQL AST Nodes corresponding to this error.
|
|
828
|
-
*/
|
|
267
|
+
class Location {
|
|
829
268
|
/**
|
|
830
|
-
* The
|
|
831
|
-
*
|
|
832
|
-
* Note that if this Error represents more than one node, the source may not
|
|
833
|
-
* represent nodes after the first node.
|
|
269
|
+
* The character offset at which this Node begins.
|
|
834
270
|
*/
|
|
835
271
|
/**
|
|
836
|
-
*
|
|
837
|
-
* which correspond to this error.
|
|
272
|
+
* The character offset at which this Node ends.
|
|
838
273
|
*/
|
|
839
274
|
/**
|
|
840
|
-
* The
|
|
275
|
+
* The Token at which this Node begins.
|
|
841
276
|
*/
|
|
842
277
|
/**
|
|
843
|
-
*
|
|
278
|
+
* The Token at which this Node ends.
|
|
844
279
|
*/
|
|
845
280
|
/**
|
|
846
|
-
*
|
|
847
|
-
*/
|
|
848
|
-
constructor(message, ...rawArgs) {
|
|
849
|
-
var _this$nodes, _nodeLocations$, _ref;
|
|
850
|
-
const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs);
|
|
851
|
-
super(message);
|
|
852
|
-
this.name = "GraphQLError";
|
|
853
|
-
this.path = path !== null && path !== void 0 ? path : void 0;
|
|
854
|
-
this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0;
|
|
855
|
-
this.nodes = undefinedIfEmpty(
|
|
856
|
-
Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0
|
|
857
|
-
);
|
|
858
|
-
const nodeLocations = undefinedIfEmpty(
|
|
859
|
-
(_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null)
|
|
860
|
-
);
|
|
861
|
-
this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
|
|
862
|
-
this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start);
|
|
863
|
-
this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start));
|
|
864
|
-
const originalExtensions = isObjectLike(
|
|
865
|
-
originalError === null || originalError === void 0 ? void 0 : originalError.extensions
|
|
866
|
-
) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0;
|
|
867
|
-
this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null);
|
|
868
|
-
Object.defineProperties(this, {
|
|
869
|
-
message: {
|
|
870
|
-
writable: true,
|
|
871
|
-
enumerable: true
|
|
872
|
-
},
|
|
873
|
-
name: {
|
|
874
|
-
enumerable: false
|
|
875
|
-
},
|
|
876
|
-
nodes: {
|
|
877
|
-
enumerable: false
|
|
878
|
-
},
|
|
879
|
-
source: {
|
|
880
|
-
enumerable: false
|
|
881
|
-
},
|
|
882
|
-
positions: {
|
|
883
|
-
enumerable: false
|
|
884
|
-
},
|
|
885
|
-
originalError: {
|
|
886
|
-
enumerable: false
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
|
-
if (originalError !== null && originalError !== void 0 && originalError.stack) {
|
|
890
|
-
Object.defineProperty(this, "stack", {
|
|
891
|
-
value: originalError.stack,
|
|
892
|
-
writable: true,
|
|
893
|
-
configurable: true
|
|
894
|
-
});
|
|
895
|
-
} else if (Error.captureStackTrace) {
|
|
896
|
-
Error.captureStackTrace(this, GraphQLError);
|
|
897
|
-
} else {
|
|
898
|
-
Object.defineProperty(this, "stack", {
|
|
899
|
-
value: Error().stack,
|
|
900
|
-
writable: true,
|
|
901
|
-
configurable: true
|
|
902
|
-
});
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
get [Symbol.toStringTag]() {
|
|
906
|
-
return "GraphQLError";
|
|
907
|
-
}
|
|
908
|
-
toString() {
|
|
909
|
-
let output = this.message;
|
|
910
|
-
if (this.nodes) {
|
|
911
|
-
for (const node of this.nodes) {
|
|
912
|
-
if (node.loc) {
|
|
913
|
-
output += "\n\n" + printLocation(node.loc);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
} else if (this.source && this.locations) {
|
|
917
|
-
for (const location of this.locations) {
|
|
918
|
-
output += "\n\n" + printSourceLocation(this.source, location);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
return output;
|
|
922
|
-
}
|
|
923
|
-
toJSON() {
|
|
924
|
-
const formattedError = {
|
|
925
|
-
message: this.message
|
|
926
|
-
};
|
|
927
|
-
if (this.locations != null) {
|
|
928
|
-
formattedError.locations = this.locations;
|
|
929
|
-
}
|
|
930
|
-
if (this.path != null) {
|
|
931
|
-
formattedError.path = this.path;
|
|
932
|
-
}
|
|
933
|
-
if (this.extensions != null && Object.keys(this.extensions).length > 0) {
|
|
934
|
-
formattedError.extensions = this.extensions;
|
|
935
|
-
}
|
|
936
|
-
return formattedError;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
function undefinedIfEmpty(array) {
|
|
940
|
-
return array === void 0 || array.length === 0 ? void 0 : array;
|
|
941
|
-
}
|
|
942
|
-
function syntaxError(source, position, description) {
|
|
943
|
-
return new GraphQLError(`Syntax Error: ${description}`, {
|
|
944
|
-
source,
|
|
945
|
-
positions: [position]
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
class Location {
|
|
949
|
-
/**
|
|
950
|
-
* The character offset at which this Node begins.
|
|
951
|
-
*/
|
|
952
|
-
/**
|
|
953
|
-
* The character offset at which this Node ends.
|
|
954
|
-
*/
|
|
955
|
-
/**
|
|
956
|
-
* The Token at which this Node begins.
|
|
957
|
-
*/
|
|
958
|
-
/**
|
|
959
|
-
* The Token at which this Node ends.
|
|
960
|
-
*/
|
|
961
|
-
/**
|
|
962
|
-
* The Source document the AST represents.
|
|
281
|
+
* The Source document the AST represents.
|
|
963
282
|
*/
|
|
964
283
|
constructor(startToken, endToken, source) {
|
|
965
284
|
this.start = startToken.start;
|
|
@@ -3706,11 +3025,11 @@ function hasMultilineItems(maybeArray) {
|
|
|
3706
3025
|
var _maybeArray$some;
|
|
3707
3026
|
return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
|
|
3708
3027
|
}
|
|
3709
|
-
var e;
|
|
3028
|
+
var e$1;
|
|
3710
3029
|
!function(e2) {
|
|
3711
3030
|
e2[e2.Pull = 0] = "Pull";
|
|
3712
3031
|
e2[e2.Close = 1] = "Close";
|
|
3713
|
-
}(e || (e = {}));
|
|
3032
|
+
}(e$1 || (e$1 = {}));
|
|
3714
3033
|
var r;
|
|
3715
3034
|
!function(e2) {
|
|
3716
3035
|
e2[e2.Start = 0] = "Start";
|
|
@@ -3738,9 +3057,9 @@ function onEnd(t2) {
|
|
|
3738
3057
|
} else if (l3.tag === r.Start) {
|
|
3739
3058
|
var i2 = l3[0];
|
|
3740
3059
|
n(start((r2) => {
|
|
3741
|
-
if (r2 === e.Close) {
|
|
3060
|
+
if (r2 === e$1.Close) {
|
|
3742
3061
|
a = true;
|
|
3743
|
-
i2(e.Close);
|
|
3062
|
+
i2(e$1.Close);
|
|
3744
3063
|
t2();
|
|
3745
3064
|
} else {
|
|
3746
3065
|
i2(r2);
|
|
@@ -3767,7 +3086,7 @@ function take(l2) {
|
|
|
3767
3086
|
if (l2 <= 0) {
|
|
3768
3087
|
s2 = true;
|
|
3769
3088
|
a(r.End);
|
|
3770
|
-
t2[0](e.Close);
|
|
3089
|
+
t2[0](e$1.Close);
|
|
3771
3090
|
} else {
|
|
3772
3091
|
i2 = t2[0];
|
|
3773
3092
|
}
|
|
@@ -3776,18 +3095,18 @@ function take(l2) {
|
|
|
3776
3095
|
if (!s2 && f2 >= l2) {
|
|
3777
3096
|
s2 = true;
|
|
3778
3097
|
a(r.End);
|
|
3779
|
-
i2(e.Close);
|
|
3098
|
+
i2(e$1.Close);
|
|
3780
3099
|
}
|
|
3781
3100
|
} else {
|
|
3782
3101
|
a(t2);
|
|
3783
3102
|
}
|
|
3784
3103
|
});
|
|
3785
3104
|
a(start((r2) => {
|
|
3786
|
-
if (r2 === e.Close && !s2) {
|
|
3105
|
+
if (r2 === e$1.Close && !s2) {
|
|
3787
3106
|
s2 = true;
|
|
3788
|
-
i2(e.Close);
|
|
3789
|
-
} else if (r2 === e.Pull && !s2 && f2 < l2) {
|
|
3790
|
-
i2(e.Pull);
|
|
3107
|
+
i2(e$1.Close);
|
|
3108
|
+
} else if (r2 === e$1.Pull && !s2 && f2 < l2) {
|
|
3109
|
+
i2(e$1.Pull);
|
|
3791
3110
|
}
|
|
3792
3111
|
}));
|
|
3793
3112
|
};
|
|
@@ -3800,17 +3119,17 @@ function subscribe(l2) {
|
|
|
3800
3119
|
if (t2 === r.End) {
|
|
3801
3120
|
i2 = true;
|
|
3802
3121
|
} else if (t2.tag === r.Start) {
|
|
3803
|
-
(a = t2[0])(e.Pull);
|
|
3122
|
+
(a = t2[0])(e$1.Pull);
|
|
3804
3123
|
} else if (!i2) {
|
|
3805
3124
|
l2(t2[0]);
|
|
3806
|
-
a(e.Pull);
|
|
3125
|
+
a(e$1.Pull);
|
|
3807
3126
|
}
|
|
3808
3127
|
});
|
|
3809
3128
|
return {
|
|
3810
3129
|
unsubscribe() {
|
|
3811
3130
|
if (!i2) {
|
|
3812
3131
|
i2 = true;
|
|
3813
|
-
a(e.Close);
|
|
3132
|
+
a(e$1.Close);
|
|
3814
3133
|
}
|
|
3815
3134
|
}
|
|
3816
3135
|
};
|
|
@@ -3824,10 +3143,10 @@ function toPromise(l2) {
|
|
|
3824
3143
|
if (t2 === r.End) {
|
|
3825
3144
|
Promise.resolve(i2).then(n);
|
|
3826
3145
|
} else if (t2.tag === r.Start) {
|
|
3827
|
-
(a = t2[0])(e.Pull);
|
|
3146
|
+
(a = t2[0])(e$1.Pull);
|
|
3828
3147
|
} else {
|
|
3829
3148
|
i2 = t2[0];
|
|
3830
|
-
a(e.Pull);
|
|
3149
|
+
a(e$1.Pull);
|
|
3831
3150
|
}
|
|
3832
3151
|
});
|
|
3833
3152
|
});
|
|
@@ -4123,127 +3442,2295 @@ function callUseMutation(e2, r2 = useClient()) {
|
|
|
4123
3442
|
o2.value = e3.extensions;
|
|
4124
3443
|
return e3;
|
|
4125
3444
|
});
|
|
4126
|
-
}
|
|
4127
|
-
};
|
|
4128
|
-
}
|
|
4129
|
-
var d = {
|
|
4130
|
-
flush: "pre"
|
|
4131
|
-
};
|
|
4132
|
-
function callUseSubscription(e2, l2, t2 = useClient(), n = []) {
|
|
4133
|
-
var o2 = vue.reactive(e2);
|
|
4134
|
-
var v2 = vue.ref();
|
|
4135
|
-
var f2 = vue.ref(false);
|
|
4136
|
-
var y = vue.ref(false);
|
|
4137
|
-
var b2 = vue.ref();
|
|
4138
|
-
var h = vue.ref();
|
|
4139
|
-
var x = vue.ref();
|
|
4140
|
-
var w = vue.ref(l2);
|
|
4141
|
-
var P = vue.isRef(e2.pause) ? e2.pause : vue.ref(!!e2.pause);
|
|
4142
|
-
var q = vue.ref(createRequest(o2.query, unwrapPossibleProxy(o2.variables)));
|
|
4143
|
-
var E = vue.ref();
|
|
4144
|
-
n.push(vue.watchEffect(() => {
|
|
4145
|
-
var e3 = createRequest(o2.query, unwrapPossibleProxy(o2.variables));
|
|
4146
|
-
if (q.value.key !== e3.key) {
|
|
4147
|
-
q.value = e3;
|
|
4148
|
-
}
|
|
4149
|
-
}, d));
|
|
4150
|
-
n.push(vue.watchEffect(() => {
|
|
4151
|
-
E.value = !P.value ? t2.value.executeSubscription(q.value, {
|
|
4152
|
-
...o2.context
|
|
4153
|
-
}) : void 0;
|
|
4154
|
-
}, d));
|
|
4155
|
-
n.push(vue.watchEffect((e3) => {
|
|
4156
|
-
if (E.value) {
|
|
4157
|
-
y.value = true;
|
|
4158
|
-
e3(subscribe((e4) => {
|
|
4159
|
-
y.value = true;
|
|
4160
|
-
v2.value = void 0 !== e4.data ? "function" == typeof w.value ? w.value(v2.value, e4.data) : e4.data : e4.data, b2.value = e4.error;
|
|
4161
|
-
x.value = e4.extensions;
|
|
4162
|
-
f2.value = !!e4.stale;
|
|
4163
|
-
h.value = e4.operation;
|
|
4164
|
-
})(onEnd(() => {
|
|
4165
|
-
y.value = false;
|
|
4166
|
-
})(E.value)).unsubscribe);
|
|
4167
|
-
} else {
|
|
4168
|
-
y.value = false;
|
|
4169
|
-
}
|
|
4170
|
-
}, d));
|
|
4171
|
-
var m = {
|
|
4172
|
-
data: v2,
|
|
4173
|
-
stale: f2,
|
|
4174
|
-
error: b2,
|
|
4175
|
-
operation: h,
|
|
4176
|
-
extensions: x,
|
|
4177
|
-
fetching: y,
|
|
4178
|
-
isPaused: P,
|
|
4179
|
-
executeSubscription(e3) {
|
|
4180
|
-
E.value = t2.value.executeSubscription(q.value, {
|
|
4181
|
-
...o2.context,
|
|
4182
|
-
...e3
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
3447
|
+
}
|
|
3448
|
+
var d = {
|
|
3449
|
+
flush: "pre"
|
|
3450
|
+
};
|
|
3451
|
+
function callUseSubscription(e2, l2, t2 = useClient(), n = []) {
|
|
3452
|
+
var o2 = vue.reactive(e2);
|
|
3453
|
+
var v2 = vue.ref();
|
|
3454
|
+
var f2 = vue.ref(false);
|
|
3455
|
+
var y = vue.ref(false);
|
|
3456
|
+
var b2 = vue.ref();
|
|
3457
|
+
var h = vue.ref();
|
|
3458
|
+
var x = vue.ref();
|
|
3459
|
+
var w = vue.ref(l2);
|
|
3460
|
+
var P = vue.isRef(e2.pause) ? e2.pause : vue.ref(!!e2.pause);
|
|
3461
|
+
var q = vue.ref(createRequest(o2.query, unwrapPossibleProxy(o2.variables)));
|
|
3462
|
+
var E = vue.ref();
|
|
3463
|
+
n.push(vue.watchEffect(() => {
|
|
3464
|
+
var e3 = createRequest(o2.query, unwrapPossibleProxy(o2.variables));
|
|
3465
|
+
if (q.value.key !== e3.key) {
|
|
3466
|
+
q.value = e3;
|
|
3467
|
+
}
|
|
3468
|
+
}, d));
|
|
3469
|
+
n.push(vue.watchEffect(() => {
|
|
3470
|
+
E.value = !P.value ? t2.value.executeSubscription(q.value, {
|
|
3471
|
+
...o2.context
|
|
3472
|
+
}) : void 0;
|
|
3473
|
+
}, d));
|
|
3474
|
+
n.push(vue.watchEffect((e3) => {
|
|
3475
|
+
if (E.value) {
|
|
3476
|
+
y.value = true;
|
|
3477
|
+
e3(subscribe((e4) => {
|
|
3478
|
+
y.value = true;
|
|
3479
|
+
v2.value = void 0 !== e4.data ? "function" == typeof w.value ? w.value(v2.value, e4.data) : e4.data : e4.data, b2.value = e4.error;
|
|
3480
|
+
x.value = e4.extensions;
|
|
3481
|
+
f2.value = !!e4.stale;
|
|
3482
|
+
h.value = e4.operation;
|
|
3483
|
+
})(onEnd(() => {
|
|
3484
|
+
y.value = false;
|
|
3485
|
+
})(E.value)).unsubscribe);
|
|
3486
|
+
} else {
|
|
3487
|
+
y.value = false;
|
|
3488
|
+
}
|
|
3489
|
+
}, d));
|
|
3490
|
+
var m = {
|
|
3491
|
+
data: v2,
|
|
3492
|
+
stale: f2,
|
|
3493
|
+
error: b2,
|
|
3494
|
+
operation: h,
|
|
3495
|
+
extensions: x,
|
|
3496
|
+
fetching: y,
|
|
3497
|
+
isPaused: P,
|
|
3498
|
+
executeSubscription(e3) {
|
|
3499
|
+
E.value = t2.value.executeSubscription(q.value, {
|
|
3500
|
+
...o2.context,
|
|
3501
|
+
...e3
|
|
3502
|
+
});
|
|
3503
|
+
return m;
|
|
3504
|
+
},
|
|
3505
|
+
pause() {
|
|
3506
|
+
P.value = true;
|
|
3507
|
+
},
|
|
3508
|
+
resume() {
|
|
3509
|
+
P.value = false;
|
|
3510
|
+
}
|
|
3511
|
+
};
|
|
3512
|
+
return m;
|
|
3513
|
+
}
|
|
3514
|
+
function useClientHandle() {
|
|
3515
|
+
var e2 = useClient();
|
|
3516
|
+
var u = [];
|
|
3517
|
+
vue.onBeforeUnmount(() => {
|
|
3518
|
+
var e3;
|
|
3519
|
+
while (e3 = u.shift()) {
|
|
3520
|
+
e3();
|
|
3521
|
+
}
|
|
3522
|
+
});
|
|
3523
|
+
var r2 = {
|
|
3524
|
+
client: e2.value,
|
|
3525
|
+
useQuery: (r3) => callUseQuery(r3, e2, u),
|
|
3526
|
+
useSubscription: (r3, a) => callUseSubscription(r3, a, e2, u),
|
|
3527
|
+
useMutation: (u2) => callUseMutation(u2, e2)
|
|
3528
|
+
};
|
|
3529
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
3530
|
+
vue.onMounted(() => {
|
|
3531
|
+
Object.assign(r2, {
|
|
3532
|
+
useQuery(r3) {
|
|
3533
|
+
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
3534
|
+
throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3535
|
+
}
|
|
3536
|
+
return callUseQuery(r3, e2, u);
|
|
3537
|
+
},
|
|
3538
|
+
useSubscription(r3, a) {
|
|
3539
|
+
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
3540
|
+
throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3541
|
+
}
|
|
3542
|
+
return callUseSubscription(r3, a, e2, u);
|
|
3543
|
+
}
|
|
3544
|
+
});
|
|
3545
|
+
});
|
|
3546
|
+
}
|
|
3547
|
+
return r2;
|
|
3548
|
+
}
|
|
3549
|
+
function toInteger(dirtyNumber) {
|
|
3550
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
3551
|
+
return NaN;
|
|
3552
|
+
}
|
|
3553
|
+
var number = Number(dirtyNumber);
|
|
3554
|
+
if (isNaN(number)) {
|
|
3555
|
+
return number;
|
|
3556
|
+
}
|
|
3557
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
3558
|
+
}
|
|
3559
|
+
function requiredArgs(required, args) {
|
|
3560
|
+
if (args.length < required) {
|
|
3561
|
+
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
function _typeof(obj) {
|
|
3565
|
+
"@babel/helpers - typeof";
|
|
3566
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3567
|
+
_typeof = function _typeof2(obj2) {
|
|
3568
|
+
return typeof obj2;
|
|
3569
|
+
};
|
|
3570
|
+
} else {
|
|
3571
|
+
_typeof = function _typeof2(obj2) {
|
|
3572
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3573
|
+
};
|
|
3574
|
+
}
|
|
3575
|
+
return _typeof(obj);
|
|
3576
|
+
}
|
|
3577
|
+
function toDate(argument) {
|
|
3578
|
+
requiredArgs(1, arguments);
|
|
3579
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
3580
|
+
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
3581
|
+
return new Date(argument.getTime());
|
|
3582
|
+
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
3583
|
+
return new Date(argument);
|
|
3584
|
+
} else {
|
|
3585
|
+
if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
|
|
3586
|
+
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");
|
|
3587
|
+
console.warn(new Error().stack);
|
|
3588
|
+
}
|
|
3589
|
+
return new Date(NaN);
|
|
3590
|
+
}
|
|
3591
|
+
}
|
|
3592
|
+
function addDays(dirtyDate, dirtyAmount) {
|
|
3593
|
+
requiredArgs(2, arguments);
|
|
3594
|
+
var date = toDate(dirtyDate);
|
|
3595
|
+
var amount = toInteger(dirtyAmount);
|
|
3596
|
+
if (isNaN(amount)) {
|
|
3597
|
+
return new Date(NaN);
|
|
3598
|
+
}
|
|
3599
|
+
if (!amount) {
|
|
3600
|
+
return date;
|
|
3601
|
+
}
|
|
3602
|
+
date.setDate(date.getDate() + amount);
|
|
3603
|
+
return date;
|
|
3604
|
+
}
|
|
3605
|
+
function startOfDay(dirtyDate) {
|
|
3606
|
+
requiredArgs(1, arguments);
|
|
3607
|
+
var date = toDate(dirtyDate);
|
|
3608
|
+
date.setHours(0, 0, 0, 0);
|
|
3609
|
+
return date;
|
|
3610
|
+
}
|
|
3611
|
+
function endOfDay(dirtyDate) {
|
|
3612
|
+
requiredArgs(1, arguments);
|
|
3613
|
+
var date = toDate(dirtyDate);
|
|
3614
|
+
date.setHours(23, 59, 59, 999);
|
|
3615
|
+
return date;
|
|
3616
|
+
}
|
|
3617
|
+
function endOfToday() {
|
|
3618
|
+
return endOfDay(Date.now());
|
|
3619
|
+
}
|
|
3620
|
+
function startOfToday() {
|
|
3621
|
+
return startOfDay(Date.now());
|
|
3622
|
+
}
|
|
3623
|
+
const useOperasionalStore = pinia.defineStore("neu:operasional", () => {
|
|
3624
|
+
const isLoading = vue.ref(false);
|
|
3625
|
+
const staff = vue.ref(null);
|
|
3626
|
+
return {
|
|
3627
|
+
isLoading,
|
|
3628
|
+
staff,
|
|
3629
|
+
setStaff
|
|
3630
|
+
};
|
|
3631
|
+
function setStaff(data) {
|
|
3632
|
+
staff.value = data;
|
|
3633
|
+
}
|
|
3634
|
+
});
|
|
3635
|
+
const useAttendanceStore = pinia.defineStore("neu:personalia:attendance", {
|
|
3636
|
+
state: () => ({
|
|
3637
|
+
isEntering: false,
|
|
3638
|
+
isAsking: false,
|
|
3639
|
+
isScanning: false,
|
|
3640
|
+
isScanError: false,
|
|
3641
|
+
isScanned: false,
|
|
3642
|
+
qrKey: "",
|
|
3643
|
+
type: "in",
|
|
3644
|
+
checkInId: ""
|
|
3645
|
+
}),
|
|
3646
|
+
getters: {},
|
|
3647
|
+
actions: {
|
|
3648
|
+
reset() {
|
|
3649
|
+
this.$patch((state) => {
|
|
3650
|
+
state.isEntering = false;
|
|
3651
|
+
state.isScanning = false;
|
|
3652
|
+
state.isScanError = false;
|
|
3653
|
+
state.isScanned = false;
|
|
3654
|
+
state.qrKey = "";
|
|
3655
|
+
state.type = "in";
|
|
3656
|
+
state.checkInId = "";
|
|
3657
|
+
});
|
|
3658
|
+
},
|
|
3659
|
+
async checkInStaff(qrKey, type, staffId) {
|
|
3660
|
+
const { client: client2 } = useClientHandle();
|
|
3661
|
+
try {
|
|
3662
|
+
this.qrKey = qrKey;
|
|
3663
|
+
this.type = type;
|
|
3664
|
+
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
3665
|
+
action: "presence",
|
|
3666
|
+
input: {
|
|
3667
|
+
staffId,
|
|
3668
|
+
qrKey: this.qrKey || null,
|
|
3669
|
+
type: this.type
|
|
3670
|
+
}
|
|
3671
|
+
}).toPromise();
|
|
3672
|
+
const data = resp.data.executeCheckIn.output;
|
|
3673
|
+
if (data) {
|
|
3674
|
+
this.checkInId = data || "";
|
|
3675
|
+
this.isScanning = false;
|
|
3676
|
+
this.isScanned = true;
|
|
3677
|
+
} else
|
|
3678
|
+
throw new Error("Terjadi kesalahan.");
|
|
3679
|
+
} catch (error) {
|
|
3680
|
+
console.log(error);
|
|
3681
|
+
this.isScanError = true;
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
});
|
|
3686
|
+
const operasional_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3687
|
+
__proto__: null
|
|
3688
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3689
|
+
function useOperasional() {
|
|
3690
|
+
const context2 = component.ComponentUtil.injectStrict(
|
|
3691
|
+
"neu:operasional:operasional"
|
|
3692
|
+
);
|
|
3693
|
+
return { ...context2 };
|
|
3694
|
+
}
|
|
3695
|
+
const { StaffModel: StaffModel$1 } = personaliaModels.models;
|
|
3696
|
+
function withOperasional() {
|
|
3697
|
+
const authStore = identitasInterfaces.useAuthStore();
|
|
3698
|
+
const { userId } = pinia.storeToRefs(authStore);
|
|
3699
|
+
const store = useOperasionalStore();
|
|
3700
|
+
const { isLoading, staff } = pinia.storeToRefs(store);
|
|
3701
|
+
const { client: client2 } = useClientHandle();
|
|
3702
|
+
const context$1 = {
|
|
3703
|
+
isLoading,
|
|
3704
|
+
staff,
|
|
3705
|
+
setStaff: store.setStaff,
|
|
3706
|
+
getStaff,
|
|
3707
|
+
init
|
|
3708
|
+
};
|
|
3709
|
+
vue.provide("neu:operasional:operasional", context$1);
|
|
3710
|
+
return context$1;
|
|
3711
|
+
async function init() {
|
|
3712
|
+
await Promise.all([getStaff()]);
|
|
3713
|
+
}
|
|
3714
|
+
async function getStaff() {
|
|
3715
|
+
var _a;
|
|
3716
|
+
const resp = await client2.query(
|
|
3717
|
+
context.GraphUtil.getMany(StaffModel$1, {
|
|
3718
|
+
id: 1,
|
|
3719
|
+
flag: 1,
|
|
3720
|
+
display: 1,
|
|
3721
|
+
nik: 1,
|
|
3722
|
+
name: 1,
|
|
3723
|
+
birthDate: 1,
|
|
3724
|
+
birthPlace: 1,
|
|
3725
|
+
image: 1,
|
|
3726
|
+
branchId: 1,
|
|
3727
|
+
branchIds: 1,
|
|
3728
|
+
branch: { id: 1, name: 1 },
|
|
3729
|
+
branches: { id: 1, name: 1 },
|
|
3730
|
+
note: 1
|
|
3731
|
+
}),
|
|
3732
|
+
{
|
|
3733
|
+
filter: { userId: userId.value },
|
|
3734
|
+
limit: 1,
|
|
3735
|
+
logs: ["error"]
|
|
3736
|
+
},
|
|
3737
|
+
{ requestPolicy: "network-only" }
|
|
3738
|
+
).toPromise();
|
|
3739
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[StaffModel$1.plural];
|
|
3740
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
3741
|
+
store.setStaff(items[0]);
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
function mitt(n) {
|
|
3745
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t2, e2) {
|
|
3746
|
+
var i2 = n.get(t2);
|
|
3747
|
+
i2 ? i2.push(e2) : n.set(t2, [e2]);
|
|
3748
|
+
}, off: function(t2, e2) {
|
|
3749
|
+
var i2 = n.get(t2);
|
|
3750
|
+
i2 && (e2 ? i2.splice(i2.indexOf(e2) >>> 0, 1) : n.set(t2, []));
|
|
3751
|
+
}, emit: function(t2, e2) {
|
|
3752
|
+
var i2 = n.get(t2);
|
|
3753
|
+
i2 && i2.slice().map(function(n2) {
|
|
3754
|
+
n2(e2);
|
|
3755
|
+
}), (i2 = n.get("*")) && i2.slice().map(function(n2) {
|
|
3756
|
+
n2(t2, e2);
|
|
3757
|
+
});
|
|
3758
|
+
} };
|
|
3759
|
+
}
|
|
3760
|
+
const bus = mitt();
|
|
3761
|
+
const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-3ba48e60"), n = n(), vue.popScopeId(), n);
|
|
3762
|
+
const _hoisted_1$7 = { id: "view-checkIns" };
|
|
3763
|
+
const _hoisted_2$4 = { class: "summary" };
|
|
3764
|
+
const _hoisted_3$1 = { class: "wrapper" };
|
|
3765
|
+
const _hoisted_4$1 = { class: "header" };
|
|
3766
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ vue.createElementVNode(
|
|
3767
|
+
"div",
|
|
3768
|
+
{ class: "start" },
|
|
3769
|
+
[
|
|
3770
|
+
/* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, "➡️ Presensi"),
|
|
3771
|
+
/* @__PURE__ */ vue.createElementVNode("div", { class: "description" }, "Daftar presensi hari ini.")
|
|
3772
|
+
],
|
|
3773
|
+
-1
|
|
3774
|
+
/* HOISTED */
|
|
3775
|
+
));
|
|
3776
|
+
const _hoisted_6 = { class: "end" };
|
|
3777
|
+
const __default__$7 = vue.defineComponent({
|
|
3778
|
+
name: "CheckInPresenceCollection"
|
|
3779
|
+
});
|
|
3780
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
3781
|
+
...__default__$7,
|
|
3782
|
+
setup(__props) {
|
|
3783
|
+
const collectionBus = core.useEventBus("neu:tempat:checkIn");
|
|
3784
|
+
const { client: client2 } = useClientHandle();
|
|
3785
|
+
const { staff } = useOperasional();
|
|
3786
|
+
const attendanceStore = useAttendanceStore();
|
|
3787
|
+
const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = pinia.storeToRefs(attendanceStore);
|
|
3788
|
+
const toast = interfaces.useToastStore();
|
|
3789
|
+
const isCheckpoint = vue.ref(false);
|
|
3790
|
+
collectionBus.on((event, payload) => {
|
|
3791
|
+
if (isCheckpoint.value === true) {
|
|
3792
|
+
if (event === "createOne:ok") {
|
|
3793
|
+
const toastId = "neu:personalia:staff:checkIn";
|
|
3794
|
+
toast.push({
|
|
3795
|
+
id: toastId,
|
|
3796
|
+
icon: "check",
|
|
3797
|
+
content: "Presensi berhasil.",
|
|
3798
|
+
color: "success"
|
|
3799
|
+
});
|
|
3800
|
+
isCheckpoint.value = false;
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
});
|
|
3804
|
+
const query$1 = vue.computed(() => {
|
|
3805
|
+
var _a;
|
|
3806
|
+
return query.Query.define({
|
|
3807
|
+
filter: {
|
|
3808
|
+
handle: "",
|
|
3809
|
+
operator: "mongo",
|
|
3810
|
+
value: {
|
|
3811
|
+
// staffId: staff.value?.id,
|
|
3812
|
+
// $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
|
|
3813
|
+
$and: [
|
|
3814
|
+
{ staffId: (_a = staff.value) == null ? void 0 : _a.id },
|
|
3815
|
+
{ checkInAt: { $gte: addDays(startOfToday(), 1) } },
|
|
3816
|
+
{ checkInAt: { $lte: endOfToday() } }
|
|
3817
|
+
]
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
});
|
|
3821
|
+
});
|
|
3822
|
+
function onPresenceIn(data) {
|
|
3823
|
+
isAsking.value = true;
|
|
3824
|
+
type.value = "in";
|
|
3825
|
+
}
|
|
3826
|
+
function onPresenceOut(data) {
|
|
3827
|
+
isAsking.value = true;
|
|
3828
|
+
type.value = "out";
|
|
3829
|
+
}
|
|
3830
|
+
async function onPresenceHome() {
|
|
3831
|
+
var _a;
|
|
3832
|
+
await checkInStaff(null, "home", (_a = staff.value) == null ? void 0 : _a.id);
|
|
3833
|
+
}
|
|
3834
|
+
async function onScanned(data) {
|
|
3835
|
+
var _a;
|
|
3836
|
+
await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
3837
|
+
}
|
|
3838
|
+
async function checkInStaff(qrKey, type2, staffId) {
|
|
3839
|
+
const toastId = "neu:personalia:staff:checkIn";
|
|
3840
|
+
console.log("bangunan...", qrKey);
|
|
3841
|
+
try {
|
|
3842
|
+
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
3843
|
+
action: "presence",
|
|
3844
|
+
input: {
|
|
3845
|
+
staffId,
|
|
3846
|
+
key: qrKey,
|
|
3847
|
+
type: type2
|
|
3848
|
+
}
|
|
3849
|
+
}).toPromise();
|
|
3850
|
+
const data = resp.data.executeCheckIn.output;
|
|
3851
|
+
if (data) {
|
|
3852
|
+
isScanning.value = false;
|
|
3853
|
+
isScanned.value = true;
|
|
3854
|
+
toast.push({
|
|
3855
|
+
id: toastId,
|
|
3856
|
+
icon: "check",
|
|
3857
|
+
content: "Presensi berhasil.",
|
|
3858
|
+
color: "success"
|
|
3859
|
+
});
|
|
3860
|
+
} else
|
|
3861
|
+
throw new Error("Terjadi kesalahan.");
|
|
3862
|
+
} catch (error) {
|
|
3863
|
+
console.log(error);
|
|
3864
|
+
isScanError.value = true;
|
|
3865
|
+
toast.push({
|
|
3866
|
+
id: toastId,
|
|
3867
|
+
icon: "xmark",
|
|
3868
|
+
content: "Presensi gagal, cek kembali qrcode atau koneksi internet kamu dan coba lagi.",
|
|
3869
|
+
color: "danger"
|
|
3870
|
+
});
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
return (_ctx, _cache) => {
|
|
3874
|
+
const _component_CheckInSingleView = vue.resolveComponent("CheckInSingleView");
|
|
3875
|
+
const _component_CheckInCollection = vue.resolveComponent("CheckInCollection");
|
|
3876
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
|
|
3877
|
+
vue.createVNode(vue.unref(office.OfficeContent), {
|
|
3878
|
+
icon: "barcode-read",
|
|
3879
|
+
title: "Presensi",
|
|
3880
|
+
"is-expanded": ""
|
|
3881
|
+
}, {
|
|
3882
|
+
"header-detail": vue.withCtx(() => [
|
|
3883
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
3884
|
+
vue.createVNode(vue.unref(interfaces.NeonSlider), {
|
|
3885
|
+
"per-view": 2,
|
|
3886
|
+
gap: 16,
|
|
3887
|
+
offset: 16,
|
|
3888
|
+
peek: 24,
|
|
3889
|
+
breakpoints: {
|
|
3890
|
+
xl: { perView: 5 },
|
|
3891
|
+
lg: { perView: 4 },
|
|
3892
|
+
md: { perView: 4 },
|
|
3893
|
+
sm: { perView: 3 }
|
|
3894
|
+
}
|
|
3895
|
+
}, {
|
|
3896
|
+
default: vue.withCtx(() => [
|
|
3897
|
+
vue.createVNode(vue.unref(interfaces.NeonSlide), null, {
|
|
3898
|
+
default: vue.withCtx(() => [
|
|
3899
|
+
vue.createVNode(vue.unref(interfaces.NeonStat), {
|
|
3900
|
+
label: "Masuk",
|
|
3901
|
+
icon: "barcode-read",
|
|
3902
|
+
onClick: onPresenceIn
|
|
3903
|
+
}, {
|
|
3904
|
+
default: vue.withCtx(() => [
|
|
3905
|
+
vue.createTextVNode("Masuk")
|
|
3906
|
+
]),
|
|
3907
|
+
_: 1
|
|
3908
|
+
/* STABLE */
|
|
3909
|
+
})
|
|
3910
|
+
]),
|
|
3911
|
+
_: 1
|
|
3912
|
+
/* STABLE */
|
|
3913
|
+
}),
|
|
3914
|
+
vue.createVNode(vue.unref(interfaces.NeonSlide), null, {
|
|
3915
|
+
default: vue.withCtx(() => [
|
|
3916
|
+
vue.createVNode(vue.unref(interfaces.NeonStat), {
|
|
3917
|
+
label: "Checkpoint",
|
|
3918
|
+
icon: "barcode-read",
|
|
3919
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isCheckpoint.value = true)
|
|
3920
|
+
}, {
|
|
3921
|
+
default: vue.withCtx(() => [
|
|
3922
|
+
vue.createTextVNode("Checkpoint")
|
|
3923
|
+
]),
|
|
3924
|
+
_: 1
|
|
3925
|
+
/* STABLE */
|
|
3926
|
+
})
|
|
3927
|
+
]),
|
|
3928
|
+
_: 1
|
|
3929
|
+
/* STABLE */
|
|
3930
|
+
}),
|
|
3931
|
+
vue.createVNode(vue.unref(interfaces.NeonSlide), null, {
|
|
3932
|
+
default: vue.withCtx(() => [
|
|
3933
|
+
vue.createVNode(vue.unref(interfaces.NeonStat), {
|
|
3934
|
+
label: "Keluar",
|
|
3935
|
+
icon: "barcode-read",
|
|
3936
|
+
onClick: onPresenceOut
|
|
3937
|
+
}, {
|
|
3938
|
+
default: vue.withCtx(() => [
|
|
3939
|
+
vue.createTextVNode("Keluar")
|
|
3940
|
+
]),
|
|
3941
|
+
_: 1
|
|
3942
|
+
/* STABLE */
|
|
3943
|
+
})
|
|
3944
|
+
]),
|
|
3945
|
+
_: 1
|
|
3946
|
+
/* STABLE */
|
|
3947
|
+
}),
|
|
3948
|
+
vue.createVNode(vue.unref(interfaces.NeonSlide), null, {
|
|
3949
|
+
default: vue.withCtx(() => [
|
|
3950
|
+
vue.createVNode(vue.unref(interfaces.NeonStat), {
|
|
3951
|
+
label: "Pulang",
|
|
3952
|
+
icon: "barcode-read",
|
|
3953
|
+
onClick: onPresenceHome
|
|
3954
|
+
}, {
|
|
3955
|
+
default: vue.withCtx(() => [
|
|
3956
|
+
vue.createTextVNode("Pulang")
|
|
3957
|
+
]),
|
|
3958
|
+
_: 1
|
|
3959
|
+
/* STABLE */
|
|
3960
|
+
})
|
|
3961
|
+
]),
|
|
3962
|
+
_: 1
|
|
3963
|
+
/* STABLE */
|
|
3964
|
+
})
|
|
3965
|
+
]),
|
|
3966
|
+
_: 1
|
|
3967
|
+
/* STABLE */
|
|
3968
|
+
}),
|
|
3969
|
+
isCheckpoint.value ? (vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
3970
|
+
key: 0,
|
|
3971
|
+
"is-active": "",
|
|
3972
|
+
size: "lg",
|
|
3973
|
+
onClose: _cache[2] || (_cache[2] = ($event) => isCheckpoint.value = false)
|
|
3974
|
+
}, {
|
|
3975
|
+
default: vue.withCtx(() => [
|
|
3976
|
+
vue.createVNode(_component_CheckInSingleView, {
|
|
3977
|
+
id: "new",
|
|
3978
|
+
"is-new": "",
|
|
3979
|
+
"is-main": false,
|
|
3980
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isCheckpoint.value = false)
|
|
3981
|
+
})
|
|
3982
|
+
]),
|
|
3983
|
+
_: 1
|
|
3984
|
+
/* STABLE */
|
|
3985
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
3986
|
+
vue.createVNode(vue.unref(CheckInAccess), {
|
|
3987
|
+
onClose: _cache[3] || (_cache[3] = ($event) => isAsking.value = false)
|
|
3988
|
+
}),
|
|
3989
|
+
vue.createVNode(vue.unref(CheckInScanner), {
|
|
3990
|
+
onScanned,
|
|
3991
|
+
onClose: _cache[4] || (_cache[4] = ($event) => isScanning.value = false)
|
|
3992
|
+
}),
|
|
3993
|
+
vue.createCommentVNode(' <CheckInScanError @close="isScanError = false" />\n <CheckInScanSuccess @close="isScanned = false" /> ')
|
|
3994
|
+
])
|
|
3995
|
+
]),
|
|
3996
|
+
default: vue.withCtx(() => [
|
|
3997
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
3998
|
+
vue.createVNode(vue.unref(context.NeonCollectionContext), {
|
|
3999
|
+
definition: "neu:tempat:checkIn",
|
|
4000
|
+
scope: "_checkIns",
|
|
4001
|
+
sheet: "single-view",
|
|
4002
|
+
query: vue.unref(query$1),
|
|
4003
|
+
peeks: ["modal"],
|
|
4004
|
+
excludes: ["create"],
|
|
4005
|
+
columns: ["type", "checkInAt", "staff", "building"],
|
|
4006
|
+
"is-ready": "",
|
|
4007
|
+
"is-main": ""
|
|
4008
|
+
}, {
|
|
4009
|
+
default: vue.withCtx(() => [
|
|
4010
|
+
vue.createElementVNode("div", _hoisted_4$1, [
|
|
4011
|
+
_hoisted_5,
|
|
4012
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
4013
|
+
vue.createVNode(vue.unref(office.OfficeCollectionQuery), { displays: ["table"] }, {
|
|
4014
|
+
default: vue.withCtx(() => [
|
|
4015
|
+
vue.createVNode(vue.unref(office.OfficeCollectionOperation), { "is-main": "" })
|
|
4016
|
+
]),
|
|
4017
|
+
_: 1
|
|
4018
|
+
/* STABLE */
|
|
4019
|
+
})
|
|
4020
|
+
])
|
|
4021
|
+
]),
|
|
4022
|
+
vue.createVNode(_component_CheckInCollection)
|
|
4023
|
+
]),
|
|
4024
|
+
_: 1
|
|
4025
|
+
/* STABLE */
|
|
4026
|
+
}, 8, ["query"])
|
|
4027
|
+
])
|
|
4028
|
+
]),
|
|
4029
|
+
_: 1
|
|
4030
|
+
/* STABLE */
|
|
4031
|
+
})
|
|
4032
|
+
]);
|
|
4033
|
+
};
|
|
4034
|
+
}
|
|
4035
|
+
});
|
|
4036
|
+
const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_3ba48e60_lang = "";
|
|
4037
|
+
const _export_sfc = (sfc, props) => {
|
|
4038
|
+
const target = sfc.__vccOpts || sfc;
|
|
4039
|
+
for (const [key, val] of props) {
|
|
4040
|
+
target[key] = val;
|
|
4041
|
+
}
|
|
4042
|
+
return target;
|
|
4043
|
+
};
|
|
4044
|
+
const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3ba48e60"]]);
|
|
4045
|
+
const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4046
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
4047
|
+
__name: "CheckInSingle",
|
|
4048
|
+
setup(__props) {
|
|
4049
|
+
const {
|
|
4050
|
+
fields,
|
|
4051
|
+
id,
|
|
4052
|
+
initialValues,
|
|
4053
|
+
values,
|
|
4054
|
+
isLoading,
|
|
4055
|
+
isChanged,
|
|
4056
|
+
isReady,
|
|
4057
|
+
isMain,
|
|
4058
|
+
isNew,
|
|
4059
|
+
saveOne,
|
|
4060
|
+
discardChanges,
|
|
4061
|
+
getOne
|
|
4062
|
+
} = context.useSingle();
|
|
4063
|
+
const { staff } = useOperasional();
|
|
4064
|
+
vue.onMounted(() => {
|
|
4065
|
+
var _a, _b, _c;
|
|
4066
|
+
console.log("idnya?", id.value);
|
|
4067
|
+
if (id.value === "new") {
|
|
4068
|
+
values.value.staffId = (_a = staff.value) == null ? void 0 : _a.id;
|
|
4069
|
+
values.value.staff = {
|
|
4070
|
+
id: (_b = staff.value) == null ? void 0 : _b.id,
|
|
4071
|
+
display: (_c = staff.value) == null ? void 0 : _c.display
|
|
4072
|
+
};
|
|
4073
|
+
values.value.checkInAt = new Date().toISOString();
|
|
4074
|
+
values.value.type = "checkpoint";
|
|
4075
|
+
}
|
|
4076
|
+
});
|
|
4077
|
+
return (_ctx, _cache) => {
|
|
4078
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-checkIn-single" }, {
|
|
4079
|
+
default: vue.withCtx(() => [
|
|
4080
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
4081
|
+
default: vue.withCtx(() => [
|
|
4082
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
4083
|
+
handle: "info",
|
|
4084
|
+
icon: "circle-info",
|
|
4085
|
+
title: "Info"
|
|
4086
|
+
}, {
|
|
4087
|
+
default: vue.withCtx(() => [
|
|
4088
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
4089
|
+
handle: "info",
|
|
4090
|
+
"initial-values": vue.unref(initialValues),
|
|
4091
|
+
"is-loading": vue.unref(isLoading),
|
|
4092
|
+
"is-changed": vue.unref(isChanged),
|
|
4093
|
+
"use-unsaved": "",
|
|
4094
|
+
onCancel: vue.unref(discardChanges),
|
|
4095
|
+
onSubmit: vue.unref(saveOne)
|
|
4096
|
+
}, {
|
|
4097
|
+
default: vue.withCtx(() => [
|
|
4098
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
4099
|
+
modelValue: vue.unref(values),
|
|
4100
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
4101
|
+
field: vue.unref(fields).building,
|
|
4102
|
+
"is-disabled": ""
|
|
4103
|
+
}, null, 8, ["modelValue", "field"]),
|
|
4104
|
+
vue.createElementVNode("div", _hoisted_1$6, [
|
|
4105
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
4106
|
+
modelValue: vue.unref(values).type,
|
|
4107
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).type = $event)
|
|
4108
|
+
}, vue.unref(fields).type, { "is-disabled": "" }), null, 16, ["modelValue"]),
|
|
4109
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
4110
|
+
modelValue: vue.unref(values).checkInAt,
|
|
4111
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).checkInAt = $event)
|
|
4112
|
+
}, vue.unref(fields).checkInAt, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
4113
|
+
]),
|
|
4114
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
4115
|
+
modelValue: vue.unref(values),
|
|
4116
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
4117
|
+
field: vue.unref(fields).staff,
|
|
4118
|
+
"is-disabled": ""
|
|
4119
|
+
}, null, 8, ["modelValue", "field"]),
|
|
4120
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
4121
|
+
modelValue: vue.unref(values).note,
|
|
4122
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).note = $event)
|
|
4123
|
+
}, vue.unref(fields).note), null, 16, ["modelValue"])
|
|
4124
|
+
]),
|
|
4125
|
+
_: 1
|
|
4126
|
+
/* STABLE */
|
|
4127
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
4128
|
+
]),
|
|
4129
|
+
_: 1
|
|
4130
|
+
/* STABLE */
|
|
4131
|
+
})
|
|
4132
|
+
]),
|
|
4133
|
+
_: 1
|
|
4134
|
+
/* STABLE */
|
|
4135
|
+
}, 8, ["use-url"])
|
|
4136
|
+
]),
|
|
4137
|
+
_: 1
|
|
4138
|
+
/* STABLE */
|
|
4139
|
+
});
|
|
4140
|
+
};
|
|
4141
|
+
}
|
|
4142
|
+
});
|
|
4143
|
+
const CheckInSingle_vue_vue_type_style_index_0_scoped_2e2803fb_lang = "";
|
|
4144
|
+
const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-2e2803fb"]]);
|
|
4145
|
+
const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d23b6de5"), n = n(), vue.popScopeId(), n);
|
|
4146
|
+
const _hoisted_1$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4147
|
+
"h4",
|
|
4148
|
+
{ align: "center" },
|
|
4149
|
+
"Aktifkan kamera untuk scan QR Code",
|
|
4150
|
+
-1
|
|
4151
|
+
/* HOISTED */
|
|
4152
|
+
));
|
|
4153
|
+
const _hoisted_2$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4154
|
+
"p",
|
|
4155
|
+
{ align: "center" },
|
|
4156
|
+
[
|
|
4157
|
+
/* @__PURE__ */ vue.createTextVNode(' Neutron Kantor membutuhkan akses ke kamera. Dengan klik "'),
|
|
4158
|
+
/* @__PURE__ */ vue.createElementVNode("b", null, "Saya Setuju"),
|
|
4159
|
+
/* @__PURE__ */ vue.createTextVNode('", kamu telah menyetujui syarat dan ketentuan yang berlaku. ')
|
|
4160
|
+
],
|
|
4161
|
+
-1
|
|
4162
|
+
/* HOISTED */
|
|
4163
|
+
));
|
|
4164
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
4165
|
+
__name: "CheckInAccess",
|
|
4166
|
+
emits: ["close"],
|
|
4167
|
+
setup(__props) {
|
|
4168
|
+
const attendanceStore = useAttendanceStore();
|
|
4169
|
+
const { isAsking, isScanError, isScanning } = pinia.storeToRefs(attendanceStore);
|
|
4170
|
+
function ok() {
|
|
4171
|
+
isAsking.value = false;
|
|
4172
|
+
isScanError.value = false;
|
|
4173
|
+
isScanning.value = true;
|
|
4174
|
+
}
|
|
4175
|
+
return (_ctx, _cache) => {
|
|
4176
|
+
return vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
4177
|
+
"is-active": vue.unref(isAsking),
|
|
4178
|
+
"onUpdate:isActive": _cache[1] || (_cache[1] = ($event) => vue.isRef(isAsking) ? isAsking.value = $event : null),
|
|
4179
|
+
size: "lg",
|
|
4180
|
+
onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
|
|
4181
|
+
}, {
|
|
4182
|
+
default: vue.withCtx(() => [
|
|
4183
|
+
vue.createVNode(vue.unref(interfaces.NeonSheet), {
|
|
4184
|
+
title: "Aktifkan Kamera",
|
|
4185
|
+
icon: "camera",
|
|
4186
|
+
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
4187
|
+
}, {
|
|
4188
|
+
default: vue.withCtx(() => [
|
|
4189
|
+
_hoisted_1$5,
|
|
4190
|
+
_hoisted_2$3,
|
|
4191
|
+
vue.createVNode(vue.unref(interfaces.NeonButton), {
|
|
4192
|
+
"is-full": "",
|
|
4193
|
+
size: "md",
|
|
4194
|
+
color: "success",
|
|
4195
|
+
"icon-left": "check",
|
|
4196
|
+
class: "buttons",
|
|
4197
|
+
onClick: ok
|
|
4198
|
+
}, {
|
|
4199
|
+
default: vue.withCtx(() => [
|
|
4200
|
+
vue.createTextVNode("Saya Setuju")
|
|
4201
|
+
]),
|
|
4202
|
+
_: 1
|
|
4203
|
+
/* STABLE */
|
|
4204
|
+
})
|
|
4205
|
+
]),
|
|
4206
|
+
_: 1
|
|
4207
|
+
/* STABLE */
|
|
4208
|
+
})
|
|
4209
|
+
]),
|
|
4210
|
+
_: 1
|
|
4211
|
+
/* STABLE */
|
|
4212
|
+
}, 8, ["is-active"]);
|
|
4213
|
+
};
|
|
4214
|
+
}
|
|
4215
|
+
});
|
|
4216
|
+
const CheckInAccess_vue_vue_type_style_index_0_scoped_d23b6de5_lang = "";
|
|
4217
|
+
const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-d23b6de5"]]);
|
|
4218
|
+
const _hoisted_1$4 = { class: "buttons" };
|
|
4219
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
4220
|
+
__name: "CheckInScanError",
|
|
4221
|
+
setup(__props) {
|
|
4222
|
+
const attendanceStore = useAttendanceStore();
|
|
4223
|
+
const { isScanError } = pinia.storeToRefs(attendanceStore);
|
|
4224
|
+
function ok() {
|
|
4225
|
+
isScanError.value = false;
|
|
4226
|
+
}
|
|
4227
|
+
return (_ctx, _cache) => {
|
|
4228
|
+
return vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), null, {
|
|
4229
|
+
default: vue.withCtx(() => [
|
|
4230
|
+
vue.createVNode(vue.unref(interfaces.NeonSheet), null, {
|
|
4231
|
+
footer: vue.withCtx(() => [
|
|
4232
|
+
vue.createElementVNode("div", _hoisted_1$4, [
|
|
4233
|
+
vue.createVNode(vue.unref(interfaces.NeonButton), {
|
|
4234
|
+
"is-full": "",
|
|
4235
|
+
"is-rounded": "",
|
|
4236
|
+
"icon-left": "arrows-rotate",
|
|
4237
|
+
color: "success",
|
|
4238
|
+
onClick: ok
|
|
4239
|
+
}, {
|
|
4240
|
+
default: vue.withCtx(() => [
|
|
4241
|
+
vue.createTextVNode(" Coba Scan Lagi ")
|
|
4242
|
+
]),
|
|
4243
|
+
_: 1
|
|
4244
|
+
/* STABLE */
|
|
4245
|
+
})
|
|
4246
|
+
])
|
|
4247
|
+
]),
|
|
4248
|
+
default: vue.withCtx(() => [
|
|
4249
|
+
vue.createVNode(vue.unref(interfaces.NeonInfo), {
|
|
4250
|
+
title: "Scan kode QR belum berhasil",
|
|
4251
|
+
description: "Pastikan koneksi internetmu stabil dan kameramu dalam kondisi baik. Coba lagi yuk!",
|
|
4252
|
+
"is-full": "",
|
|
4253
|
+
class: "mt-4"
|
|
4254
|
+
})
|
|
4255
|
+
]),
|
|
4256
|
+
_: 1
|
|
4257
|
+
/* STABLE */
|
|
4258
|
+
})
|
|
4259
|
+
]),
|
|
4260
|
+
_: 1
|
|
4261
|
+
/* STABLE */
|
|
4262
|
+
});
|
|
4263
|
+
};
|
|
4264
|
+
}
|
|
4265
|
+
});
|
|
4266
|
+
class e {
|
|
4267
|
+
constructor(a, b2, c, d2, f2) {
|
|
4268
|
+
this._legacyCanvasSize = e.DEFAULT_CANVAS_SIZE;
|
|
4269
|
+
this._preferredCamera = "environment";
|
|
4270
|
+
this._maxScansPerSecond = 25;
|
|
4271
|
+
this._lastScanTimestamp = -1;
|
|
4272
|
+
this._destroyed = this._flashOn = this._paused = this._active = false;
|
|
4273
|
+
this.$video = a;
|
|
4274
|
+
this.$canvas = document.createElement("canvas");
|
|
4275
|
+
c && "object" === typeof c ? this._onDecode = b2 : (c || d2 || 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);
|
|
4276
|
+
b2 = "object" === typeof c ? c : {};
|
|
4277
|
+
this._onDecodeError = b2.onDecodeError || ("function" === typeof c ? c : this._onDecodeError);
|
|
4278
|
+
this._calculateScanRegion = b2.calculateScanRegion || ("function" === typeof d2 ? d2 : this._calculateScanRegion);
|
|
4279
|
+
this._preferredCamera = b2.preferredCamera || f2 || this._preferredCamera;
|
|
4280
|
+
this._legacyCanvasSize = "number" === typeof c ? c : "number" === typeof d2 ? d2 : this._legacyCanvasSize;
|
|
4281
|
+
this._maxScansPerSecond = b2.maxScansPerSecond || this._maxScansPerSecond;
|
|
4282
|
+
this._onPlay = this._onPlay.bind(this);
|
|
4283
|
+
this._onLoadedMetaData = this._onLoadedMetaData.bind(this);
|
|
4284
|
+
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
4285
|
+
this._updateOverlay = this._updateOverlay.bind(this);
|
|
4286
|
+
a.disablePictureInPicture = true;
|
|
4287
|
+
a.playsInline = true;
|
|
4288
|
+
a.muted = true;
|
|
4289
|
+
let h = false;
|
|
4290
|
+
a.hidden && (a.hidden = false, h = true);
|
|
4291
|
+
document.body.contains(a) || (document.body.appendChild(a), h = true);
|
|
4292
|
+
c = a.parentElement;
|
|
4293
|
+
if (b2.highlightScanRegion || b2.highlightCodeOutline) {
|
|
4294
|
+
d2 = !!b2.overlay;
|
|
4295
|
+
this.$overlay = b2.overlay || document.createElement("div");
|
|
4296
|
+
f2 = this.$overlay.style;
|
|
4297
|
+
f2.position = "absolute";
|
|
4298
|
+
f2.display = "none";
|
|
4299
|
+
f2.pointerEvents = "none";
|
|
4300
|
+
this.$overlay.classList.add("scan-region-highlight");
|
|
4301
|
+
if (!d2 && b2.highlightScanRegion) {
|
|
4302
|
+
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>';
|
|
4303
|
+
try {
|
|
4304
|
+
this.$overlay.firstElementChild.animate({ transform: [
|
|
4305
|
+
"scale(.98)",
|
|
4306
|
+
"scale(1.01)"
|
|
4307
|
+
] }, { duration: 400, iterations: Infinity, direction: "alternate", easing: "ease-in-out" });
|
|
4308
|
+
} catch (m) {
|
|
4309
|
+
}
|
|
4310
|
+
c.insertBefore(this.$overlay, this.$video.nextSibling);
|
|
4311
|
+
}
|
|
4312
|
+
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);
|
|
4313
|
+
}
|
|
4314
|
+
this._scanRegion = this._calculateScanRegion(a);
|
|
4315
|
+
requestAnimationFrame(() => {
|
|
4316
|
+
let m = window.getComputedStyle(a);
|
|
4317
|
+
"none" === m.display && (a.style.setProperty("display", "block", "important"), h = true);
|
|
4318
|
+
"visible" !== m.visibility && (a.style.setProperty("visibility", "visible", "important"), h = true);
|
|
4319
|
+
h && (console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."), a.style.opacity = "0", a.style.width = "0", a.style.height = "0", this.$overlay && this.$overlay.parentElement && this.$overlay.parentElement.removeChild(this.$overlay), delete this.$overlay, delete this.$codeOutlineHighlight);
|
|
4320
|
+
this.$overlay && this._updateOverlay();
|
|
4321
|
+
});
|
|
4322
|
+
a.addEventListener("play", this._onPlay);
|
|
4323
|
+
a.addEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4324
|
+
document.addEventListener("visibilitychange", this._onVisibilityChange);
|
|
4325
|
+
window.addEventListener("resize", this._updateOverlay);
|
|
4326
|
+
this._qrEnginePromise = e.createQrEngine();
|
|
4327
|
+
}
|
|
4328
|
+
static set WORKER_PATH(a) {
|
|
4329
|
+
console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.");
|
|
4330
|
+
}
|
|
4331
|
+
static async hasCamera() {
|
|
4332
|
+
try {
|
|
4333
|
+
return !!(await e.listCameras(false)).length;
|
|
4334
|
+
} catch (a) {
|
|
4335
|
+
return false;
|
|
4336
|
+
}
|
|
4337
|
+
}
|
|
4338
|
+
static async listCameras(a = false) {
|
|
4339
|
+
if (!navigator.mediaDevices)
|
|
4340
|
+
return [];
|
|
4341
|
+
let b2 = async () => (await navigator.mediaDevices.enumerateDevices()).filter((d2) => "videoinput" === d2.kind), c;
|
|
4342
|
+
try {
|
|
4343
|
+
a && (await b2()).every((d2) => !d2.label) && (c = await navigator.mediaDevices.getUserMedia({ audio: false, video: true }));
|
|
4344
|
+
} catch (d2) {
|
|
4345
|
+
}
|
|
4346
|
+
try {
|
|
4347
|
+
return (await b2()).map((d2, f2) => ({ id: d2.deviceId, label: d2.label || (0 === f2 ? "Default Camera" : `Camera ${f2 + 1}`) }));
|
|
4348
|
+
} finally {
|
|
4349
|
+
c && (console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"), e._stopVideoStream(c));
|
|
4350
|
+
}
|
|
4351
|
+
}
|
|
4352
|
+
async hasFlash() {
|
|
4353
|
+
let a;
|
|
4354
|
+
try {
|
|
4355
|
+
if (this.$video.srcObject) {
|
|
4356
|
+
if (!(this.$video.srcObject instanceof MediaStream))
|
|
4357
|
+
return false;
|
|
4358
|
+
a = this.$video.srcObject;
|
|
4359
|
+
} else
|
|
4360
|
+
a = (await this._getCameraStream()).stream;
|
|
4361
|
+
return "torch" in a.getVideoTracks()[0].getSettings();
|
|
4362
|
+
} catch (b2) {
|
|
4363
|
+
return false;
|
|
4364
|
+
} finally {
|
|
4365
|
+
a && a !== this.$video.srcObject && (console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"), e._stopVideoStream(a));
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
isFlashOn() {
|
|
4369
|
+
return this._flashOn;
|
|
4370
|
+
}
|
|
4371
|
+
async toggleFlash() {
|
|
4372
|
+
this._flashOn ? await this.turnFlashOff() : await this.turnFlashOn();
|
|
4373
|
+
}
|
|
4374
|
+
async turnFlashOn() {
|
|
4375
|
+
if (!this._flashOn && !this._destroyed && (this._flashOn = true, this._active && !this._paused))
|
|
4376
|
+
try {
|
|
4377
|
+
if (!await this.hasFlash())
|
|
4378
|
+
throw "No flash available";
|
|
4379
|
+
await this.$video.srcObject.getVideoTracks()[0].applyConstraints({ advanced: [{ torch: true }] });
|
|
4380
|
+
} catch (a) {
|
|
4381
|
+
throw this._flashOn = false, a;
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4384
|
+
async turnFlashOff() {
|
|
4385
|
+
this._flashOn && (this._flashOn = false, await this._restartVideoStream());
|
|
4386
|
+
}
|
|
4387
|
+
destroy() {
|
|
4388
|
+
this.$video.removeEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4389
|
+
this.$video.removeEventListener("play", this._onPlay);
|
|
4390
|
+
document.removeEventListener(
|
|
4391
|
+
"visibilitychange",
|
|
4392
|
+
this._onVisibilityChange
|
|
4393
|
+
);
|
|
4394
|
+
window.removeEventListener("resize", this._updateOverlay);
|
|
4395
|
+
this._destroyed = true;
|
|
4396
|
+
this._flashOn = false;
|
|
4397
|
+
this.stop();
|
|
4398
|
+
e._postWorkerMessage(this._qrEnginePromise, "close");
|
|
4399
|
+
}
|
|
4400
|
+
async start() {
|
|
4401
|
+
if (this._destroyed)
|
|
4402
|
+
throw Error("The QR scanner can not be started as it had been destroyed.");
|
|
4403
|
+
if (!this._active || this._paused) {
|
|
4404
|
+
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)
|
|
4405
|
+
if (this._paused = false, this.$video.srcObject)
|
|
4406
|
+
await this.$video.play();
|
|
4407
|
+
else
|
|
4408
|
+
try {
|
|
4409
|
+
let { stream: a, facingMode: b2 } = await this._getCameraStream();
|
|
4410
|
+
!this._active || this._paused ? e._stopVideoStream(a) : (this._setVideoMirror(b2), this.$video.srcObject = a, await this.$video.play(), this._flashOn && (this._flashOn = false, this.turnFlashOn().catch(() => {
|
|
4411
|
+
})));
|
|
4412
|
+
} catch (a) {
|
|
4413
|
+
if (!this._paused)
|
|
4414
|
+
throw this._active = false, a;
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
}
|
|
4418
|
+
stop() {
|
|
4419
|
+
this.pause();
|
|
4420
|
+
this._active = false;
|
|
4421
|
+
}
|
|
4422
|
+
async pause(a = false) {
|
|
4423
|
+
this._paused = true;
|
|
4424
|
+
if (!this._active)
|
|
4425
|
+
return true;
|
|
4426
|
+
this.$video.pause();
|
|
4427
|
+
this.$overlay && (this.$overlay.style.display = "none");
|
|
4428
|
+
let b2 = () => {
|
|
4429
|
+
this.$video.srcObject instanceof MediaStream && (e._stopVideoStream(this.$video.srcObject), this.$video.srcObject = null);
|
|
4430
|
+
};
|
|
4431
|
+
if (a)
|
|
4432
|
+
return b2(), true;
|
|
4433
|
+
await new Promise((c) => setTimeout(c, 300));
|
|
4434
|
+
if (!this._paused)
|
|
4435
|
+
return false;
|
|
4436
|
+
b2();
|
|
4437
|
+
return true;
|
|
4438
|
+
}
|
|
4439
|
+
async setCamera(a) {
|
|
4440
|
+
a !== this._preferredCamera && (this._preferredCamera = a, await this._restartVideoStream());
|
|
4441
|
+
}
|
|
4442
|
+
static async scanImage(a, b2, c, d2, f2 = false, h = false) {
|
|
4443
|
+
let m, n = false;
|
|
4444
|
+
b2 && ("scanRegion" in b2 || "qrEngine" in b2 || "canvas" in b2 || "disallowCanvasResizing" in b2 || "alsoTryWithoutScanRegion" in b2 || "returnDetailedScanResult" in b2) ? (m = b2.scanRegion, c = b2.qrEngine, d2 = b2.canvas, f2 = b2.disallowCanvasResizing || false, h = b2.alsoTryWithoutScanRegion || false, n = true) : b2 || c || d2 || f2 || h ? 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.");
|
|
4445
|
+
b2 = !!c;
|
|
4446
|
+
try {
|
|
4447
|
+
let p, k;
|
|
4448
|
+
[c, p] = await Promise.all([c || e.createQrEngine(), e._loadImage(a)]);
|
|
4449
|
+
[d2, k] = e._drawToCanvas(p, m, d2, f2);
|
|
4450
|
+
let q;
|
|
4451
|
+
if (c instanceof Worker) {
|
|
4452
|
+
let g = c;
|
|
4453
|
+
b2 || e._postWorkerMessageSync(g, "inversionMode", "both");
|
|
4454
|
+
q = await new Promise((l2, v2) => {
|
|
4455
|
+
let w, u, r2, y = -1;
|
|
4456
|
+
u = (t2) => {
|
|
4457
|
+
t2.data.id === y && (g.removeEventListener("message", u), g.removeEventListener("error", r2), clearTimeout(w), null !== t2.data.data ? l2({ data: t2.data.data, cornerPoints: e._convertPoints(t2.data.cornerPoints, m) }) : v2(e.NO_QR_CODE_FOUND));
|
|
4458
|
+
};
|
|
4459
|
+
r2 = (t2) => {
|
|
4460
|
+
g.removeEventListener("message", u);
|
|
4461
|
+
g.removeEventListener("error", r2);
|
|
4462
|
+
clearTimeout(w);
|
|
4463
|
+
v2("Scanner error: " + (t2 ? t2.message || t2 : "Unknown Error"));
|
|
4464
|
+
};
|
|
4465
|
+
g.addEventListener("message", u);
|
|
4466
|
+
g.addEventListener("error", r2);
|
|
4467
|
+
w = setTimeout(() => r2("timeout"), 1e4);
|
|
4468
|
+
let x = k.getImageData(0, 0, d2.width, d2.height);
|
|
4469
|
+
y = e._postWorkerMessageSync(g, "decode", x, [x.data.buffer]);
|
|
4470
|
+
});
|
|
4471
|
+
} else
|
|
4472
|
+
q = await Promise.race([new Promise((g, l2) => window.setTimeout(() => l2("Scanner error: timeout"), 1e4)), (async () => {
|
|
4473
|
+
try {
|
|
4474
|
+
var [g] = await c.detect(d2);
|
|
4475
|
+
if (!g)
|
|
4476
|
+
throw e.NO_QR_CODE_FOUND;
|
|
4477
|
+
return { data: g.rawValue, cornerPoints: e._convertPoints(g.cornerPoints, m) };
|
|
4478
|
+
} catch (l2) {
|
|
4479
|
+
g = l2.message || l2;
|
|
4480
|
+
if (/not implemented|service unavailable/.test(g))
|
|
4481
|
+
return e._disableBarcodeDetector = true, e.scanImage(a, { scanRegion: m, canvas: d2, disallowCanvasResizing: f2, alsoTryWithoutScanRegion: h });
|
|
4482
|
+
throw `Scanner error: ${g}`;
|
|
4483
|
+
}
|
|
4484
|
+
})()]);
|
|
4485
|
+
return n ? q : q.data;
|
|
4486
|
+
} catch (p) {
|
|
4487
|
+
if (!m || !h)
|
|
4488
|
+
throw p;
|
|
4489
|
+
let k = await e.scanImage(a, { qrEngine: c, canvas: d2, disallowCanvasResizing: f2 });
|
|
4490
|
+
return n ? k : k.data;
|
|
4491
|
+
} finally {
|
|
4492
|
+
b2 || e._postWorkerMessage(c, "close");
|
|
4493
|
+
}
|
|
4494
|
+
}
|
|
4495
|
+
setGrayscaleWeights(a, b2, c, d2 = true) {
|
|
4496
|
+
e._postWorkerMessage(this._qrEnginePromise, "grayscaleWeights", {
|
|
4497
|
+
red: a,
|
|
4498
|
+
green: b2,
|
|
4499
|
+
blue: c,
|
|
4500
|
+
useIntegerApproximation: d2
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4503
|
+
setInversionMode(a) {
|
|
4504
|
+
e._postWorkerMessage(this._qrEnginePromise, "inversionMode", a);
|
|
4505
|
+
}
|
|
4506
|
+
static async createQrEngine(a) {
|
|
4507
|
+
a && console.warn("Specifying a worker path is not required and not supported anymore.");
|
|
4508
|
+
return !e._disableBarcodeDetector && "BarcodeDetector" in window && BarcodeDetector.getSupportedFormats && (await BarcodeDetector.getSupportedFormats()).includes("qr_code") ? new BarcodeDetector({ formats: ["qr_code"] }) : Promise.resolve().then(() => qrScannerWorker_min).then((b2) => b2.createWorker());
|
|
4509
|
+
}
|
|
4510
|
+
_onPlay() {
|
|
4511
|
+
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4512
|
+
this._updateOverlay();
|
|
4513
|
+
this.$overlay && (this.$overlay.style.display = "");
|
|
4514
|
+
this._scanFrame();
|
|
4515
|
+
}
|
|
4516
|
+
_onLoadedMetaData() {
|
|
4517
|
+
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4518
|
+
this._updateOverlay();
|
|
4519
|
+
}
|
|
4520
|
+
_onVisibilityChange() {
|
|
4521
|
+
document.hidden ? this.pause() : this._active && this.start();
|
|
4522
|
+
}
|
|
4523
|
+
_calculateScanRegion(a) {
|
|
4524
|
+
let b2 = Math.round(2 / 3 * Math.min(a.videoWidth, a.videoHeight));
|
|
4525
|
+
return {
|
|
4526
|
+
x: Math.round((a.videoWidth - b2) / 2),
|
|
4527
|
+
y: Math.round((a.videoHeight - b2) / 2),
|
|
4528
|
+
width: b2,
|
|
4529
|
+
height: b2,
|
|
4530
|
+
downScaledWidth: this._legacyCanvasSize,
|
|
4531
|
+
downScaledHeight: this._legacyCanvasSize
|
|
4532
|
+
};
|
|
4533
|
+
}
|
|
4534
|
+
_updateOverlay() {
|
|
4535
|
+
requestAnimationFrame(() => {
|
|
4536
|
+
if (this.$overlay) {
|
|
4537
|
+
var a = this.$video, b2 = a.videoWidth, c = a.videoHeight, d2 = a.offsetWidth, f2 = a.offsetHeight, h = a.offsetLeft, m = a.offsetTop, n = window.getComputedStyle(a), p = n.objectFit, k = b2 / c, q = d2 / f2;
|
|
4538
|
+
switch (p) {
|
|
4539
|
+
case "none":
|
|
4540
|
+
var g = b2;
|
|
4541
|
+
var l2 = c;
|
|
4542
|
+
break;
|
|
4543
|
+
case "fill":
|
|
4544
|
+
g = d2;
|
|
4545
|
+
l2 = f2;
|
|
4546
|
+
break;
|
|
4547
|
+
default:
|
|
4548
|
+
("cover" === p ? k > q : k < q) ? (l2 = f2, g = l2 * k) : (g = d2, l2 = g / k), "scale-down" === p && (g = Math.min(g, b2), l2 = Math.min(l2, c));
|
|
4549
|
+
}
|
|
4550
|
+
var [v2, w] = n.objectPosition.split(" ").map((r2, y) => {
|
|
4551
|
+
const x = parseFloat(r2);
|
|
4552
|
+
return r2.endsWith("%") ? (y ? f2 - l2 : d2 - g) * x / 100 : x;
|
|
4553
|
+
});
|
|
4554
|
+
n = this._scanRegion.width || b2;
|
|
4555
|
+
q = this._scanRegion.height || c;
|
|
4556
|
+
p = this._scanRegion.x || 0;
|
|
4557
|
+
var u = this._scanRegion.y || 0;
|
|
4558
|
+
k = this.$overlay.style;
|
|
4559
|
+
k.width = `${n / b2 * g}px`;
|
|
4560
|
+
k.height = `${q / c * l2}px`;
|
|
4561
|
+
k.top = `${m + w + u / c * l2}px`;
|
|
4562
|
+
c = /scaleX\(-1\)/.test(a.style.transform);
|
|
4563
|
+
k.left = `${h + (c ? d2 - v2 - g : v2) + (c ? b2 - p - n : p) / b2 * g}px`;
|
|
4564
|
+
k.transform = a.style.transform;
|
|
4565
|
+
}
|
|
4566
|
+
});
|
|
4567
|
+
}
|
|
4568
|
+
static _convertPoints(a, b2) {
|
|
4569
|
+
if (!b2)
|
|
4570
|
+
return a;
|
|
4571
|
+
let c = b2.x || 0, d2 = b2.y || 0, f2 = b2.width && b2.downScaledWidth ? b2.width / b2.downScaledWidth : 1;
|
|
4572
|
+
b2 = b2.height && b2.downScaledHeight ? b2.height / b2.downScaledHeight : 1;
|
|
4573
|
+
for (let h of a)
|
|
4574
|
+
h.x = h.x * f2 + c, h.y = h.y * b2 + d2;
|
|
4575
|
+
return a;
|
|
4576
|
+
}
|
|
4577
|
+
_scanFrame() {
|
|
4578
|
+
!this._active || this.$video.paused || this.$video.ended || ("requestVideoFrameCallback" in this.$video ? this.$video.requestVideoFrameCallback.bind(this.$video) : requestAnimationFrame)(async () => {
|
|
4579
|
+
if (!(1 >= this.$video.readyState)) {
|
|
4580
|
+
var a = Date.now() - this._lastScanTimestamp, b2 = 1e3 / this._maxScansPerSecond;
|
|
4581
|
+
a < b2 && await new Promise((d2) => setTimeout(d2, b2 - a));
|
|
4582
|
+
this._lastScanTimestamp = Date.now();
|
|
4583
|
+
try {
|
|
4584
|
+
var c = await e.scanImage(
|
|
4585
|
+
this.$video,
|
|
4586
|
+
{ scanRegion: this._scanRegion, qrEngine: this._qrEnginePromise, canvas: this.$canvas }
|
|
4587
|
+
);
|
|
4588
|
+
} catch (d2) {
|
|
4589
|
+
if (!this._active)
|
|
4590
|
+
return;
|
|
4591
|
+
this._onDecodeError(d2);
|
|
4592
|
+
}
|
|
4593
|
+
!e._disableBarcodeDetector || await this._qrEnginePromise instanceof Worker || (this._qrEnginePromise = e.createQrEngine());
|
|
4594
|
+
c ? (this._onDecode ? this._onDecode(c) : this._legacyOnDecode && this._legacyOnDecode(c.data), this.$codeOutlineHighlight && (clearTimeout(this._codeOutlineHighlightRemovalTimeout), this._codeOutlineHighlightRemovalTimeout = void 0, this.$codeOutlineHighlight.setAttribute(
|
|
4595
|
+
"viewBox",
|
|
4596
|
+
`${this._scanRegion.x || 0} ${this._scanRegion.y || 0} ${this._scanRegion.width || this.$video.videoWidth} ${this._scanRegion.height || this.$video.videoHeight}`
|
|
4597
|
+
), this.$codeOutlineHighlight.firstElementChild.setAttribute("points", c.cornerPoints.map(({ x: d2, y: f2 }) => `${d2},${f2}`).join(" ")), this.$codeOutlineHighlight.style.display = "")) : this.$codeOutlineHighlight && !this._codeOutlineHighlightRemovalTimeout && (this._codeOutlineHighlightRemovalTimeout = setTimeout(() => this.$codeOutlineHighlight.style.display = "none", 100));
|
|
4598
|
+
}
|
|
4599
|
+
this._scanFrame();
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
_onDecodeError(a) {
|
|
4603
|
+
a !== e.NO_QR_CODE_FOUND && console.log(a);
|
|
4604
|
+
}
|
|
4605
|
+
async _getCameraStream() {
|
|
4606
|
+
if (!navigator.mediaDevices)
|
|
4607
|
+
throw "Camera not found.";
|
|
4608
|
+
let a = /^(environment|user)$/.test(this._preferredCamera) ? "facingMode" : "deviceId", b2 = [{ width: { min: 1024 } }, { width: { min: 768 } }, {}], c = b2.map((d2) => Object.assign({}, d2, { [a]: { exact: this._preferredCamera } }));
|
|
4609
|
+
for (let d2 of [...c, ...b2])
|
|
4610
|
+
try {
|
|
4611
|
+
let f2 = await navigator.mediaDevices.getUserMedia({ video: d2, audio: false }), h = this._getFacingMode(f2) || (d2.facingMode ? this._preferredCamera : "environment" === this._preferredCamera ? "user" : "environment");
|
|
4612
|
+
return { stream: f2, facingMode: h };
|
|
4613
|
+
} catch (f2) {
|
|
4614
|
+
}
|
|
4615
|
+
throw "Camera not found.";
|
|
4616
|
+
}
|
|
4617
|
+
async _restartVideoStream() {
|
|
4618
|
+
let a = this._paused;
|
|
4619
|
+
await this.pause(true) && !a && this._active && await this.start();
|
|
4620
|
+
}
|
|
4621
|
+
static _stopVideoStream(a) {
|
|
4622
|
+
for (let b2 of a.getTracks())
|
|
4623
|
+
b2.stop(), a.removeTrack(b2);
|
|
4624
|
+
}
|
|
4625
|
+
_setVideoMirror(a) {
|
|
4626
|
+
this.$video.style.transform = "scaleX(" + ("user" === a ? -1 : 1) + ")";
|
|
4627
|
+
}
|
|
4628
|
+
_getFacingMode(a) {
|
|
4629
|
+
return (a = a.getVideoTracks()[0]) ? /rear|back|environment/i.test(a.label) ? "environment" : /front|user|face/i.test(a.label) ? "user" : null : null;
|
|
4630
|
+
}
|
|
4631
|
+
static _drawToCanvas(a, b2, c, d2 = false) {
|
|
4632
|
+
c = c || document.createElement("canvas");
|
|
4633
|
+
let f2 = b2 && b2.x ? b2.x : 0, h = b2 && b2.y ? b2.y : 0, m = b2 && b2.width ? b2.width : a.videoWidth || a.width, n = b2 && b2.height ? b2.height : a.videoHeight || a.height;
|
|
4634
|
+
d2 || (d2 = b2 && b2.downScaledWidth ? b2.downScaledWidth : m, b2 = b2 && b2.downScaledHeight ? b2.downScaledHeight : n, c.width !== d2 && (c.width = d2), c.height !== b2 && (c.height = b2));
|
|
4635
|
+
b2 = c.getContext("2d", { alpha: false });
|
|
4636
|
+
b2.imageSmoothingEnabled = false;
|
|
4637
|
+
b2.drawImage(a, f2, h, m, n, 0, 0, c.width, c.height);
|
|
4638
|
+
return [c, b2];
|
|
4639
|
+
}
|
|
4640
|
+
static async _loadImage(a) {
|
|
4641
|
+
if (a instanceof Image)
|
|
4642
|
+
return await e._awaitImageLoad(a), a;
|
|
4643
|
+
if (a instanceof HTMLVideoElement || a instanceof HTMLCanvasElement || a instanceof SVGImageElement || "OffscreenCanvas" in window && a instanceof OffscreenCanvas || "ImageBitmap" in window && a instanceof ImageBitmap)
|
|
4644
|
+
return a;
|
|
4645
|
+
if (a instanceof File || a instanceof Blob || a instanceof URL || "string" === typeof a) {
|
|
4646
|
+
let b2 = new Image();
|
|
4647
|
+
b2.src = a instanceof File || a instanceof Blob ? URL.createObjectURL(a) : a.toString();
|
|
4648
|
+
try {
|
|
4649
|
+
return await e._awaitImageLoad(b2), b2;
|
|
4650
|
+
} finally {
|
|
4651
|
+
(a instanceof File || a instanceof Blob) && URL.revokeObjectURL(b2.src);
|
|
4652
|
+
}
|
|
4653
|
+
} else
|
|
4654
|
+
throw "Unsupported image type.";
|
|
4655
|
+
}
|
|
4656
|
+
static async _awaitImageLoad(a) {
|
|
4657
|
+
a.complete && 0 !== a.naturalWidth || await new Promise((b2, c) => {
|
|
4658
|
+
let d2 = (f2) => {
|
|
4659
|
+
a.removeEventListener("load", d2);
|
|
4660
|
+
a.removeEventListener("error", d2);
|
|
4661
|
+
f2 instanceof ErrorEvent ? c("Image load error") : b2();
|
|
4662
|
+
};
|
|
4663
|
+
a.addEventListener("load", d2);
|
|
4664
|
+
a.addEventListener("error", d2);
|
|
4665
|
+
});
|
|
4666
|
+
}
|
|
4667
|
+
static async _postWorkerMessage(a, b2, c, d2) {
|
|
4668
|
+
return e._postWorkerMessageSync(await a, b2, c, d2);
|
|
4669
|
+
}
|
|
4670
|
+
static _postWorkerMessageSync(a, b2, c, d2) {
|
|
4671
|
+
if (!(a instanceof Worker))
|
|
4672
|
+
return -1;
|
|
4673
|
+
let f2 = e._workerMessageId++;
|
|
4674
|
+
a.postMessage({ id: f2, type: b2, data: c }, d2);
|
|
4675
|
+
return f2;
|
|
4676
|
+
}
|
|
4677
|
+
}
|
|
4678
|
+
e.DEFAULT_CANVAS_SIZE = 400;
|
|
4679
|
+
e.NO_QR_CODE_FOUND = "No QR code found";
|
|
4680
|
+
e._disableBarcodeDetector = false;
|
|
4681
|
+
e._workerMessageId = 0;
|
|
4682
|
+
const Scanner = e;
|
|
4683
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-ef426ef3"), n = n(), vue.popScopeId(), n);
|
|
4684
|
+
const _hoisted_1$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4685
|
+
"div",
|
|
4686
|
+
{ class: "invalid-message" },
|
|
4687
|
+
"Invalid Code!",
|
|
4688
|
+
-1
|
|
4689
|
+
/* HOISTED */
|
|
4690
|
+
));
|
|
4691
|
+
const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4692
|
+
"div",
|
|
4693
|
+
null,
|
|
4694
|
+
null,
|
|
4695
|
+
-1
|
|
4696
|
+
/* HOISTED */
|
|
4697
|
+
));
|
|
4698
|
+
const _hoisted_3 = ["onClick"];
|
|
4699
|
+
const _hoisted_4 = { class: "mr-2 text-sm" };
|
|
4700
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
4701
|
+
__name: "CheckInScanner",
|
|
4702
|
+
emits: ["start", "stop", "scanned", "close"],
|
|
4703
|
+
setup(__props, { emit }) {
|
|
4704
|
+
const attendanceStore = useAttendanceStore();
|
|
4705
|
+
const { isScanning } = pinia.storeToRefs(attendanceStore);
|
|
4706
|
+
const frameEl = vue.ref();
|
|
4707
|
+
const videoEl = vue.ref();
|
|
4708
|
+
const scanner = vue.ref();
|
|
4709
|
+
const state = vue.reactive({
|
|
4710
|
+
isScanning: false,
|
|
4711
|
+
isInvalid: false,
|
|
4712
|
+
result: "",
|
|
4713
|
+
currentIndex: 0
|
|
4714
|
+
});
|
|
4715
|
+
const cameras = vue.ref([]);
|
|
4716
|
+
const currentCamera = vue.computed(
|
|
4717
|
+
() => {
|
|
4718
|
+
var _a;
|
|
4719
|
+
return ((_a = cameras.value[state.currentIndex]) == null ? void 0 : _a.label) || "";
|
|
4720
|
+
}
|
|
4721
|
+
);
|
|
4722
|
+
const canSwitch = vue.computed(() => cameras.value.length > 1);
|
|
4723
|
+
const { resume, pause } = core.useIntervalFn(
|
|
4724
|
+
async () => {
|
|
4725
|
+
cameras.value = await Scanner.listCameras();
|
|
4726
|
+
console.log(cameras.value);
|
|
4727
|
+
},
|
|
4728
|
+
1e3,
|
|
4729
|
+
{ immediate: false }
|
|
4730
|
+
);
|
|
4731
|
+
const throttledEmit = core.useThrottleFn(emitResult, 2e3);
|
|
4732
|
+
vue.watchEffect(() => {
|
|
4733
|
+
if (isScanning.value && videoEl.value) {
|
|
4734
|
+
scanner.value = new Scanner(
|
|
4735
|
+
videoEl.value,
|
|
4736
|
+
(result) => {
|
|
4737
|
+
if (!result.data)
|
|
4738
|
+
return;
|
|
4739
|
+
throttledEmit(result.data);
|
|
4740
|
+
stopScan();
|
|
4741
|
+
},
|
|
4742
|
+
{
|
|
4743
|
+
preferredCamera: "environment",
|
|
4744
|
+
highlightScanRegion: true,
|
|
4745
|
+
highlightCodeOutline: true
|
|
4746
|
+
}
|
|
4747
|
+
);
|
|
4748
|
+
resume();
|
|
4749
|
+
startScan();
|
|
4750
|
+
}
|
|
4751
|
+
});
|
|
4752
|
+
vue.watchEffect(() => {
|
|
4753
|
+
if (!isScanning.value) {
|
|
4754
|
+
stopScan();
|
|
4755
|
+
destroy();
|
|
4756
|
+
}
|
|
4757
|
+
});
|
|
4758
|
+
bus.on("attendance:scan", (isStart) => {
|
|
4759
|
+
if (isStart)
|
|
4760
|
+
startScan();
|
|
4761
|
+
else
|
|
4762
|
+
stopScan();
|
|
4763
|
+
});
|
|
4764
|
+
vue.onBeforeUnmount(() => {
|
|
4765
|
+
bus.off("attendance:scan");
|
|
4766
|
+
destroy();
|
|
4767
|
+
});
|
|
4768
|
+
function emitResult(data) {
|
|
4769
|
+
state.result = data;
|
|
4770
|
+
emit("scanned", data);
|
|
4771
|
+
}
|
|
4772
|
+
function switchCamera() {
|
|
4773
|
+
var _a, _b;
|
|
4774
|
+
if (cameras.value.length - 1 === state.currentIndex) {
|
|
4775
|
+
state.currentIndex = 0;
|
|
4776
|
+
} else {
|
|
4777
|
+
state.currentIndex++;
|
|
4778
|
+
}
|
|
4779
|
+
const deviceId = (_a = cameras.value[state.currentIndex]) == null ? void 0 : _a.id;
|
|
4780
|
+
(_b = scanner.value) == null ? void 0 : _b.setCamera(deviceId);
|
|
4781
|
+
}
|
|
4782
|
+
function startScan() {
|
|
4783
|
+
var _a;
|
|
4784
|
+
(_a = scanner.value) == null ? void 0 : _a.start();
|
|
4785
|
+
state.isScanning = true;
|
|
4786
|
+
emit("start");
|
|
4787
|
+
}
|
|
4788
|
+
function stopScan() {
|
|
4789
|
+
var _a;
|
|
4790
|
+
(_a = scanner.value) == null ? void 0 : _a.stop();
|
|
4791
|
+
state.isScanning = false;
|
|
4792
|
+
pause();
|
|
4793
|
+
emit("stop");
|
|
4794
|
+
}
|
|
4795
|
+
function destroy() {
|
|
4796
|
+
var _a;
|
|
4797
|
+
(_a = scanner.value) == null ? void 0 : _a.destroy();
|
|
4798
|
+
scanner.value = void 0;
|
|
4799
|
+
}
|
|
4800
|
+
return (_ctx, _cache) => {
|
|
4801
|
+
return vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
4802
|
+
"is-active": vue.unref(isScanning),
|
|
4803
|
+
"onUpdate:isActive": _cache[1] || (_cache[1] = ($event) => vue.isRef(isScanning) ? isScanning.value = $event : null),
|
|
4804
|
+
size: "xl",
|
|
4805
|
+
onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
|
|
4806
|
+
}, {
|
|
4807
|
+
default: vue.withCtx(() => [
|
|
4808
|
+
vue.createVNode(vue.unref(interfaces.NeonSheet), {
|
|
4809
|
+
icon: "barcode-read",
|
|
4810
|
+
title: "Scan QR Code",
|
|
4811
|
+
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
4812
|
+
}, {
|
|
4813
|
+
default: vue.withCtx(() => [
|
|
4814
|
+
vue.createElementVNode(
|
|
4815
|
+
"div",
|
|
4816
|
+
{
|
|
4817
|
+
ref_key: "frameEl",
|
|
4818
|
+
ref: frameEl,
|
|
4819
|
+
class: vue.normalizeClass(["video-frame", [
|
|
4820
|
+
{
|
|
4821
|
+
"is-scanning": state.isScanning,
|
|
4822
|
+
"is-invalid": state.isInvalid
|
|
4823
|
+
}
|
|
4824
|
+
]])
|
|
4825
|
+
},
|
|
4826
|
+
[
|
|
4827
|
+
vue.createElementVNode(
|
|
4828
|
+
"video",
|
|
4829
|
+
{
|
|
4830
|
+
ref_key: "videoEl",
|
|
4831
|
+
ref: videoEl,
|
|
4832
|
+
style: {
|
|
4833
|
+
height: `auto`,
|
|
4834
|
+
width: `auto`
|
|
4835
|
+
}
|
|
4836
|
+
},
|
|
4837
|
+
null,
|
|
4838
|
+
512
|
|
4839
|
+
/* NEED_PATCH */
|
|
4840
|
+
),
|
|
4841
|
+
vue.createElementVNode("div", {
|
|
4842
|
+
class: "inner",
|
|
4843
|
+
onClick: switchCamera
|
|
4844
|
+
}, [
|
|
4845
|
+
_hoisted_1$3,
|
|
4846
|
+
_hoisted_2$2,
|
|
4847
|
+
vue.createElementVNode("div", {
|
|
4848
|
+
class: "button-switch",
|
|
4849
|
+
onClick: vue.withModifiers(switchCamera, ["stop"])
|
|
4850
|
+
}, [
|
|
4851
|
+
vue.createElementVNode(
|
|
4852
|
+
"div",
|
|
4853
|
+
_hoisted_4,
|
|
4854
|
+
vue.toDisplayString(vue.unref(currentCamera)),
|
|
4855
|
+
1
|
|
4856
|
+
/* TEXT */
|
|
4857
|
+
),
|
|
4858
|
+
vue.createVNode(vue.unref(interfaces.NeonButton), {
|
|
4859
|
+
"icon-left": "arrows-repeat",
|
|
4860
|
+
"is-squared": "",
|
|
4861
|
+
size: "sm",
|
|
4862
|
+
"is-disabled": !vue.unref(canSwitch)
|
|
4863
|
+
}, null, 8, ["is-disabled"])
|
|
4864
|
+
], 8, _hoisted_3)
|
|
4865
|
+
])
|
|
4866
|
+
],
|
|
4867
|
+
2
|
|
4868
|
+
/* CLASS */
|
|
4869
|
+
)
|
|
4870
|
+
]),
|
|
4871
|
+
_: 1
|
|
4872
|
+
/* STABLE */
|
|
4873
|
+
})
|
|
4874
|
+
]),
|
|
4875
|
+
_: 1
|
|
4876
|
+
/* STABLE */
|
|
4877
|
+
}, 8, ["is-active"]);
|
|
4878
|
+
};
|
|
4879
|
+
}
|
|
4880
|
+
});
|
|
4881
|
+
const CheckInScanner_vue_vue_type_style_index_0_scoped_ef426ef3_lang = "";
|
|
4882
|
+
const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-ef426ef3"]]);
|
|
4883
|
+
const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode(
|
|
4884
|
+
"h3",
|
|
4885
|
+
{ align: "center" },
|
|
4886
|
+
"Presensi Berhasil!",
|
|
4887
|
+
-1
|
|
4888
|
+
/* HOISTED */
|
|
4889
|
+
);
|
|
4890
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
4891
|
+
__name: "CheckInScanSuccess",
|
|
4892
|
+
emits: ["close"],
|
|
4893
|
+
setup(__props) {
|
|
4894
|
+
const attendanceStore = useAttendanceStore();
|
|
4895
|
+
const { isScanned } = pinia.storeToRefs(attendanceStore);
|
|
4896
|
+
return (_ctx, _cache) => {
|
|
4897
|
+
return vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
4898
|
+
"is-active": vue.unref(isScanned),
|
|
4899
|
+
"onUpdate:isActive": _cache[1] || (_cache[1] = ($event) => vue.isRef(isScanned) ? isScanned.value = $event : null),
|
|
4900
|
+
size: "lg",
|
|
4901
|
+
onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
|
|
4902
|
+
}, {
|
|
4903
|
+
default: vue.withCtx(() => [
|
|
4904
|
+
vue.createVNode(vue.unref(interfaces.NeonSheet), {
|
|
4905
|
+
title: "Presensi",
|
|
4906
|
+
icon: "check",
|
|
4907
|
+
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
4908
|
+
}, {
|
|
4909
|
+
default: vue.withCtx(() => [
|
|
4910
|
+
_hoisted_1$2
|
|
4911
|
+
]),
|
|
4912
|
+
_: 1
|
|
4913
|
+
/* STABLE */
|
|
4914
|
+
})
|
|
4915
|
+
]),
|
|
4916
|
+
_: 1
|
|
4917
|
+
/* STABLE */
|
|
4918
|
+
}, 8, ["is-active"]);
|
|
4919
|
+
};
|
|
4920
|
+
}
|
|
4921
|
+
});
|
|
4922
|
+
const __default__$6 = vue.defineComponent({
|
|
4923
|
+
name: "CheckInCollection"
|
|
4924
|
+
});
|
|
4925
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
4926
|
+
...__default__$6,
|
|
4927
|
+
setup(__props) {
|
|
4928
|
+
context.useCollection();
|
|
4929
|
+
return (_ctx, _cache) => {
|
|
4930
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-checkIn-collection" }, {
|
|
4931
|
+
default: vue.withCtx(() => [
|
|
4932
|
+
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
4933
|
+
]),
|
|
4934
|
+
_: 1
|
|
4935
|
+
/* STABLE */
|
|
4936
|
+
});
|
|
4937
|
+
};
|
|
4938
|
+
}
|
|
4939
|
+
});
|
|
4940
|
+
const StaffModel = personaliaModels.models.StaffModel;
|
|
4941
|
+
const __default__$5 = vue.defineComponent({
|
|
4942
|
+
name: "StaffCollection"
|
|
4943
|
+
});
|
|
4944
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
4945
|
+
...__default__$5,
|
|
4946
|
+
setup(__props) {
|
|
4947
|
+
context.useCollection();
|
|
4948
|
+
return (_ctx, _cache) => {
|
|
4949
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-staff-collection" }, {
|
|
4950
|
+
default: vue.withCtx(() => [
|
|
4951
|
+
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
4952
|
+
]),
|
|
4953
|
+
_: 1
|
|
4954
|
+
/* STABLE */
|
|
4955
|
+
});
|
|
4956
|
+
};
|
|
4957
|
+
}
|
|
4958
|
+
});
|
|
4959
|
+
const _hoisted_1$1 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
|
|
4960
|
+
const _hoisted_2$1 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4961
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
4962
|
+
__name: "StaffSingle",
|
|
4963
|
+
setup(__props) {
|
|
4964
|
+
const {
|
|
4965
|
+
fields,
|
|
4966
|
+
id,
|
|
4967
|
+
initialValues,
|
|
4968
|
+
values,
|
|
4969
|
+
isLoading,
|
|
4970
|
+
isChanged,
|
|
4971
|
+
isReady,
|
|
4972
|
+
isMain,
|
|
4973
|
+
isNew,
|
|
4974
|
+
saveOne,
|
|
4975
|
+
discardChanges
|
|
4976
|
+
} = context.useSingle();
|
|
4977
|
+
return (_ctx, _cache) => {
|
|
4978
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-staff-single" }, {
|
|
4979
|
+
default: vue.withCtx(() => [
|
|
4980
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
4981
|
+
default: vue.withCtx(() => [
|
|
4982
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
4983
|
+
handle: "info",
|
|
4984
|
+
icon: "circle-info",
|
|
4985
|
+
title: "Info"
|
|
4986
|
+
}, {
|
|
4987
|
+
default: vue.withCtx(() => [
|
|
4988
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
4989
|
+
handle: "info",
|
|
4990
|
+
"initial-values": vue.unref(initialValues),
|
|
4991
|
+
"is-loading": vue.unref(isLoading),
|
|
4992
|
+
"is-changed": vue.unref(isChanged),
|
|
4993
|
+
"use-unsaved": "",
|
|
4994
|
+
onCancel: vue.unref(discardChanges),
|
|
4995
|
+
onSubmit: vue.unref(saveOne)
|
|
4996
|
+
}, {
|
|
4997
|
+
default: vue.withCtx(() => [
|
|
4998
|
+
vue.createElementVNode("div", _hoisted_1$1, [
|
|
4999
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5000
|
+
modelValue: vue.unref(values).name,
|
|
5001
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).name = $event)
|
|
5002
|
+
}, vue.unref(fields).name), null, 16, ["modelValue"]),
|
|
5003
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5004
|
+
modelValue: vue.unref(values).nik,
|
|
5005
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).nik = $event)
|
|
5006
|
+
}, vue.unref(fields).nik), null, 16, ["modelValue"])
|
|
5007
|
+
]),
|
|
5008
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
5009
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5010
|
+
modelValue: vue.unref(values).birthPlace,
|
|
5011
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).birthPlace = $event)
|
|
5012
|
+
}, vue.unref(fields).birthPlace), null, 16, ["modelValue"]),
|
|
5013
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5014
|
+
modelValue: vue.unref(values).birthDate,
|
|
5015
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(values).birthDate = $event)
|
|
5016
|
+
}, vue.unref(fields).birthDate), null, 16, ["modelValue"])
|
|
5017
|
+
]),
|
|
5018
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5019
|
+
modelValue: vue.unref(values).image,
|
|
5020
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).image = $event)
|
|
5021
|
+
}, vue.unref(fields).image), null, 16, ["modelValue"]),
|
|
5022
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5023
|
+
modelValue: vue.unref(values).note,
|
|
5024
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).note = $event)
|
|
5025
|
+
}, vue.unref(fields).note), null, 16, ["modelValue"])
|
|
5026
|
+
]),
|
|
5027
|
+
_: 1
|
|
5028
|
+
/* STABLE */
|
|
5029
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5030
|
+
]),
|
|
5031
|
+
_: 1
|
|
5032
|
+
/* STABLE */
|
|
5033
|
+
}),
|
|
5034
|
+
vue.createCommentVNode(' IDENTITAS\n <OfficeTab handle="identity" icon="circle-info" title="Identity">\n </OfficeTab> '),
|
|
5035
|
+
vue.createCommentVNode(" CABANG "),
|
|
5036
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5037
|
+
handle: "branch",
|
|
5038
|
+
icon: "circle-info",
|
|
5039
|
+
title: "Cabang"
|
|
5040
|
+
}, {
|
|
5041
|
+
default: vue.withCtx(() => [
|
|
5042
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
5043
|
+
handle: "branch",
|
|
5044
|
+
"initial-values": vue.unref(initialValues),
|
|
5045
|
+
"is-loading": vue.unref(isLoading),
|
|
5046
|
+
"is-changed": vue.unref(isChanged),
|
|
5047
|
+
"use-unsaved": "",
|
|
5048
|
+
onCancel: vue.unref(discardChanges),
|
|
5049
|
+
onSubmit: vue.unref(saveOne)
|
|
5050
|
+
}, {
|
|
5051
|
+
default: vue.withCtx(() => [
|
|
5052
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5053
|
+
modelValue: vue.unref(values),
|
|
5054
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5055
|
+
field: vue.unref(fields).branch
|
|
5056
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5057
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5058
|
+
modelValue: vue.unref(values),
|
|
5059
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5060
|
+
field: vue.unref(fields).branches
|
|
5061
|
+
}, null, 8, ["modelValue", "field"])
|
|
5062
|
+
]),
|
|
5063
|
+
_: 1
|
|
5064
|
+
/* STABLE */
|
|
5065
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5066
|
+
]),
|
|
5067
|
+
_: 1
|
|
5068
|
+
/* STABLE */
|
|
5069
|
+
}),
|
|
5070
|
+
vue.createCommentVNode(" KELUAR MASUK "),
|
|
5071
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5072
|
+
handle: "checkIn",
|
|
5073
|
+
icon: "person-to-door",
|
|
5074
|
+
title: "Keluar Masuk"
|
|
5075
|
+
}, {
|
|
5076
|
+
default: vue.withCtx(() => [
|
|
5077
|
+
vue.createCommentVNode(` <OfficeCollectionRelated
|
|
5078
|
+
definition="neu:tempat:checkIn"
|
|
5079
|
+
title="Keluar Masuk"
|
|
5080
|
+
description="Keluar masuk."
|
|
5081
|
+
:query="
|
|
5082
|
+
Query.define({
|
|
5083
|
+
filter: {
|
|
5084
|
+
handle: 'staffId',
|
|
5085
|
+
operator: 'eq',
|
|
5086
|
+
value: id,
|
|
5087
|
+
},
|
|
5088
|
+
})
|
|
5089
|
+
"
|
|
5090
|
+
/> `)
|
|
5091
|
+
]),
|
|
5092
|
+
_: 1
|
|
5093
|
+
/* STABLE */
|
|
5094
|
+
})
|
|
5095
|
+
]),
|
|
5096
|
+
_: 1
|
|
5097
|
+
/* STABLE */
|
|
5098
|
+
}, 8, ["use-url"])
|
|
5099
|
+
]),
|
|
5100
|
+
_: 1
|
|
5101
|
+
/* STABLE */
|
|
5102
|
+
});
|
|
5103
|
+
};
|
|
5104
|
+
}
|
|
5105
|
+
});
|
|
5106
|
+
const StaffSingle_vue_vue_type_style_index_0_scoped_dbeb1998_lang = "";
|
|
5107
|
+
const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-dbeb1998"]]);
|
|
5108
|
+
const SituationModel = personaliaModels.models.SituationModel;
|
|
5109
|
+
const __default__$4 = vue.defineComponent({ name: "SituationCollection" });
|
|
5110
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
5111
|
+
...__default__$4,
|
|
5112
|
+
setup(__props) {
|
|
5113
|
+
context.useCollection();
|
|
5114
|
+
return (_ctx, _cache) => {
|
|
5115
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-situation-collection" }, {
|
|
5116
|
+
default: vue.withCtx(() => [
|
|
5117
|
+
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
5118
|
+
]),
|
|
5119
|
+
_: 1
|
|
5120
|
+
/* STABLE */
|
|
5121
|
+
});
|
|
5122
|
+
};
|
|
5123
|
+
}
|
|
5124
|
+
});
|
|
5125
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
5126
|
+
__name: "SituationSingle",
|
|
5127
|
+
setup(__props) {
|
|
5128
|
+
const {
|
|
5129
|
+
fields,
|
|
5130
|
+
id,
|
|
5131
|
+
initialValues,
|
|
5132
|
+
values,
|
|
5133
|
+
isNew,
|
|
5134
|
+
isLoading,
|
|
5135
|
+
isChanged,
|
|
5136
|
+
isReady,
|
|
5137
|
+
isMain,
|
|
5138
|
+
saveOne,
|
|
5139
|
+
discardChanges
|
|
5140
|
+
} = context.useSingle();
|
|
5141
|
+
return (_ctx, _cache) => {
|
|
5142
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
5143
|
+
default: vue.withCtx(() => [
|
|
5144
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
5145
|
+
default: vue.withCtx(() => [
|
|
5146
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5147
|
+
handle: "info",
|
|
5148
|
+
icon: "circle-info",
|
|
5149
|
+
title: "Info"
|
|
5150
|
+
}, {
|
|
5151
|
+
default: vue.withCtx(() => [
|
|
5152
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
5153
|
+
handle: "info",
|
|
5154
|
+
"initial-values": vue.unref(initialValues),
|
|
5155
|
+
"is-loading": vue.unref(isLoading),
|
|
5156
|
+
"is-changed": vue.unref(isChanged),
|
|
5157
|
+
"use-unsaved": "",
|
|
5158
|
+
onCancel: vue.unref(discardChanges),
|
|
5159
|
+
onSubmit: vue.unref(saveOne)
|
|
5160
|
+
}, {
|
|
5161
|
+
default: vue.withCtx(() => [
|
|
5162
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5163
|
+
md: "grid-cols-4",
|
|
5164
|
+
title: "Situasi"
|
|
5165
|
+
}, {
|
|
5166
|
+
default: vue.withCtx(() => [
|
|
5167
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5168
|
+
modelValue: vue.unref(values).situationStatus,
|
|
5169
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationStatus = $event)
|
|
5170
|
+
}, vue.unref(fields).situationStatus), null, 16, ["modelValue"])
|
|
5171
|
+
]),
|
|
5172
|
+
_: 1
|
|
5173
|
+
/* STABLE */
|
|
5174
|
+
}),
|
|
5175
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5176
|
+
modelValue: vue.unref(values),
|
|
5177
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5178
|
+
field: vue.unref(fields).branches
|
|
5179
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5180
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5181
|
+
modelValue: vue.unref(values),
|
|
5182
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5183
|
+
field: vue.unref(fields).situationType
|
|
5184
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5185
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5186
|
+
modelValue: vue.unref(values),
|
|
5187
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5188
|
+
field: vue.unref(fields).situationReportedBy
|
|
5189
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5190
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5191
|
+
default: vue.withCtx(() => [
|
|
5192
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5193
|
+
modelValue: vue.unref(values).situationDescription,
|
|
5194
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).situationDescription = $event)
|
|
5195
|
+
}, vue.unref(fields).situationDescription), null, 16, ["modelValue"])
|
|
5196
|
+
]),
|
|
5197
|
+
_: 1
|
|
5198
|
+
/* STABLE */
|
|
5199
|
+
}),
|
|
5200
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5201
|
+
default: vue.withCtx(() => [
|
|
5202
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5203
|
+
modelValue: vue.unref(values).urgentSituationDate,
|
|
5204
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).urgentSituationDate = $event)
|
|
5205
|
+
}, vue.unref(fields).urgentSituationDate), null, 16, ["modelValue"])
|
|
5206
|
+
]),
|
|
5207
|
+
_: 1
|
|
5208
|
+
/* STABLE */
|
|
5209
|
+
}),
|
|
5210
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5211
|
+
modelValue: vue.unref(values),
|
|
5212
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5213
|
+
field: vue.unref(fields).situationRelatedBy
|
|
5214
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5215
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5216
|
+
md: "grid-cols-4",
|
|
5217
|
+
title: "Suportif"
|
|
5218
|
+
}, {
|
|
5219
|
+
default: vue.withCtx(() => [
|
|
5220
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5221
|
+
modelValue: vue.unref(values).supportiveStatus,
|
|
5222
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).supportiveStatus = $event)
|
|
5223
|
+
}, vue.unref(fields).supportiveStatus), null, 16, ["modelValue"])
|
|
5224
|
+
]),
|
|
5225
|
+
_: 1
|
|
5226
|
+
/* STABLE */
|
|
5227
|
+
}),
|
|
5228
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5229
|
+
modelValue: vue.unref(values),
|
|
5230
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5231
|
+
field: vue.unref(fields).situationSupportedBy
|
|
5232
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5233
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5234
|
+
default: vue.withCtx(() => [
|
|
5235
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5236
|
+
modelValue: vue.unref(values).situationResponse,
|
|
5237
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(values).situationResponse = $event)
|
|
5238
|
+
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
5239
|
+
]),
|
|
5240
|
+
_: 1
|
|
5241
|
+
/* STABLE */
|
|
5242
|
+
})
|
|
5243
|
+
]),
|
|
5244
|
+
_: 1
|
|
5245
|
+
/* STABLE */
|
|
5246
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5247
|
+
]),
|
|
5248
|
+
_: 1
|
|
5249
|
+
/* STABLE */
|
|
5250
|
+
})
|
|
5251
|
+
]),
|
|
5252
|
+
_: 1
|
|
5253
|
+
/* STABLE */
|
|
5254
|
+
}, 8, ["use-url"])
|
|
5255
|
+
]),
|
|
5256
|
+
_: 1
|
|
5257
|
+
/* STABLE */
|
|
5258
|
+
});
|
|
5259
|
+
};
|
|
5260
|
+
}
|
|
5261
|
+
});
|
|
5262
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
5263
|
+
__name: "SituationWork",
|
|
5264
|
+
setup(__props) {
|
|
5265
|
+
const {
|
|
5266
|
+
fields,
|
|
5267
|
+
id,
|
|
5268
|
+
initialValues,
|
|
5269
|
+
values,
|
|
5270
|
+
isNew,
|
|
5271
|
+
isLoading,
|
|
5272
|
+
isChanged,
|
|
5273
|
+
isReady,
|
|
5274
|
+
isMain,
|
|
5275
|
+
saveOne,
|
|
5276
|
+
discardChanges
|
|
5277
|
+
} = context.useSingle();
|
|
5278
|
+
return (_ctx, _cache) => {
|
|
5279
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
5280
|
+
default: vue.withCtx(() => [
|
|
5281
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
5282
|
+
default: vue.withCtx(() => [
|
|
5283
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5284
|
+
handle: "info",
|
|
5285
|
+
icon: "circle-info",
|
|
5286
|
+
title: "Info"
|
|
5287
|
+
}, {
|
|
5288
|
+
default: vue.withCtx(() => [
|
|
5289
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
5290
|
+
handle: "info",
|
|
5291
|
+
"initial-values": vue.unref(initialValues),
|
|
5292
|
+
"is-loading": vue.unref(isLoading),
|
|
5293
|
+
"is-changed": vue.unref(isChanged),
|
|
5294
|
+
"use-unsaved": "",
|
|
5295
|
+
onCancel: vue.unref(discardChanges),
|
|
5296
|
+
onSubmit: vue.unref(saveOne)
|
|
5297
|
+
}, {
|
|
5298
|
+
default: vue.withCtx(() => [
|
|
5299
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5300
|
+
md: "grid-cols-4",
|
|
5301
|
+
title: "Situasi"
|
|
5302
|
+
}, {
|
|
5303
|
+
default: vue.withCtx(() => [
|
|
5304
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5305
|
+
modelValue: vue.unref(values).situationStatus,
|
|
5306
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationStatus = $event)
|
|
5307
|
+
}, vue.unref(fields).situationStatus, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
5308
|
+
]),
|
|
5309
|
+
_: 1
|
|
5310
|
+
/* STABLE */
|
|
5311
|
+
}),
|
|
5312
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5313
|
+
modelValue: vue.unref(values),
|
|
5314
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5315
|
+
field: vue.unref(fields).branches
|
|
5316
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5317
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5318
|
+
modelValue: vue.unref(values),
|
|
5319
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5320
|
+
field: vue.unref(fields).situationType
|
|
5321
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5322
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5323
|
+
modelValue: vue.unref(values),
|
|
5324
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5325
|
+
field: vue.unref(fields).situationReportedBy,
|
|
5326
|
+
"is-disabled": ""
|
|
5327
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5328
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5329
|
+
default: vue.withCtx(() => [
|
|
5330
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5331
|
+
modelValue: vue.unref(values).situationDescription,
|
|
5332
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).situationDescription = $event)
|
|
5333
|
+
}, vue.unref(fields).situationDescription), null, 16, ["modelValue"])
|
|
5334
|
+
]),
|
|
5335
|
+
_: 1
|
|
5336
|
+
/* STABLE */
|
|
5337
|
+
}),
|
|
5338
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5339
|
+
default: vue.withCtx(() => [
|
|
5340
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5341
|
+
modelValue: vue.unref(values).urgentSituationDate,
|
|
5342
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).urgentSituationDate = $event)
|
|
5343
|
+
}, vue.unref(fields).urgentSituationDate), null, 16, ["modelValue"])
|
|
5344
|
+
]),
|
|
5345
|
+
_: 1
|
|
5346
|
+
/* STABLE */
|
|
5347
|
+
}),
|
|
5348
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5349
|
+
modelValue: vue.unref(values),
|
|
5350
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5351
|
+
field: vue.unref(fields).situationRelatedBy
|
|
5352
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5353
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5354
|
+
md: "grid-cols-4",
|
|
5355
|
+
title: "Suportif"
|
|
5356
|
+
}, {
|
|
5357
|
+
default: vue.withCtx(() => [
|
|
5358
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5359
|
+
modelValue: vue.unref(values).supportiveStatus,
|
|
5360
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).supportiveStatus = $event)
|
|
5361
|
+
}, vue.unref(fields).supportiveStatus), null, 16, ["modelValue"])
|
|
5362
|
+
]),
|
|
5363
|
+
_: 1
|
|
5364
|
+
/* STABLE */
|
|
5365
|
+
}),
|
|
5366
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5367
|
+
modelValue: vue.unref(values),
|
|
5368
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5369
|
+
field: vue.unref(fields).situationSupportedBy
|
|
5370
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5371
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5372
|
+
default: vue.withCtx(() => [
|
|
5373
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5374
|
+
modelValue: vue.unref(values).situationResponse,
|
|
5375
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(values).situationResponse = $event)
|
|
5376
|
+
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
5377
|
+
]),
|
|
5378
|
+
_: 1
|
|
5379
|
+
/* STABLE */
|
|
5380
|
+
})
|
|
5381
|
+
]),
|
|
5382
|
+
_: 1
|
|
5383
|
+
/* STABLE */
|
|
5384
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5385
|
+
]),
|
|
5386
|
+
_: 1
|
|
5387
|
+
/* STABLE */
|
|
5388
|
+
})
|
|
5389
|
+
]),
|
|
5390
|
+
_: 1
|
|
5391
|
+
/* STABLE */
|
|
5392
|
+
}, 8, ["use-url"])
|
|
5393
|
+
]),
|
|
5394
|
+
_: 1
|
|
5395
|
+
/* STABLE */
|
|
5396
|
+
});
|
|
5397
|
+
};
|
|
5398
|
+
}
|
|
5399
|
+
});
|
|
5400
|
+
const __default__$3 = vue.defineComponent({ name: "SituationSupportive" });
|
|
5401
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
5402
|
+
...__default__$3,
|
|
5403
|
+
setup(__props) {
|
|
5404
|
+
const {
|
|
5405
|
+
fields,
|
|
5406
|
+
id,
|
|
5407
|
+
initialValues,
|
|
5408
|
+
values,
|
|
5409
|
+
isNew,
|
|
5410
|
+
isLoading,
|
|
5411
|
+
isChanged,
|
|
5412
|
+
isReady,
|
|
5413
|
+
isMain,
|
|
5414
|
+
saveOne,
|
|
5415
|
+
discardChanges
|
|
5416
|
+
} = context.useSingle();
|
|
5417
|
+
return (_ctx, _cache) => {
|
|
5418
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
5419
|
+
default: vue.withCtx(() => [
|
|
5420
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
5421
|
+
default: vue.withCtx(() => [
|
|
5422
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5423
|
+
handle: "info",
|
|
5424
|
+
icon: "circle-info",
|
|
5425
|
+
title: "Info"
|
|
5426
|
+
}, {
|
|
5427
|
+
default: vue.withCtx(() => [
|
|
5428
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
5429
|
+
handle: "info",
|
|
5430
|
+
"initial-values": vue.unref(initialValues),
|
|
5431
|
+
"is-loading": vue.unref(isLoading),
|
|
5432
|
+
"is-changed": vue.unref(isChanged),
|
|
5433
|
+
"use-unsaved": "",
|
|
5434
|
+
onCancel: vue.unref(discardChanges),
|
|
5435
|
+
onSubmit: vue.unref(saveOne)
|
|
5436
|
+
}, {
|
|
5437
|
+
default: vue.withCtx(() => [
|
|
5438
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5439
|
+
md: "grid-cols-4",
|
|
5440
|
+
title: "Suportif"
|
|
5441
|
+
}, {
|
|
5442
|
+
default: vue.withCtx(() => [
|
|
5443
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5444
|
+
modelValue: vue.unref(values).situationStatus,
|
|
5445
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationStatus = $event)
|
|
5446
|
+
}, vue.unref(fields).situationStatus, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
5447
|
+
]),
|
|
5448
|
+
_: 1
|
|
5449
|
+
/* STABLE */
|
|
5450
|
+
}),
|
|
5451
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5452
|
+
modelValue: vue.unref(values),
|
|
5453
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5454
|
+
field: vue.unref(fields).situationSupportedBy
|
|
5455
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5456
|
+
vue.createVNode(vue.unref(form.NeonFields), {
|
|
5457
|
+
md: "grid-cols-4",
|
|
5458
|
+
title: "Situasi"
|
|
5459
|
+
}, {
|
|
5460
|
+
default: vue.withCtx(() => [
|
|
5461
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5462
|
+
modelValue: vue.unref(values).situationResponse,
|
|
5463
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).situationResponse = $event)
|
|
5464
|
+
}, vue.unref(fields).situationResponse), null, 16, ["modelValue"])
|
|
5465
|
+
]),
|
|
5466
|
+
_: 1
|
|
5467
|
+
/* STABLE */
|
|
5468
|
+
}),
|
|
5469
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5470
|
+
modelValue: vue.unref(values),
|
|
5471
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5472
|
+
field: vue.unref(fields).branches,
|
|
5473
|
+
"is-disabled": ""
|
|
5474
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5475
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5476
|
+
modelValue: vue.unref(values),
|
|
5477
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5478
|
+
field: vue.unref(fields).situationType,
|
|
5479
|
+
"is-disabled": ""
|
|
5480
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5481
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5482
|
+
modelValue: vue.unref(values),
|
|
5483
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5484
|
+
field: vue.unref(fields).situationReportedBy,
|
|
5485
|
+
"is-disabled": ""
|
|
5486
|
+
}, null, 8, ["modelValue", "field"]),
|
|
5487
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5488
|
+
default: vue.withCtx(() => [
|
|
5489
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5490
|
+
modelValue: vue.unref(values).situationDescription,
|
|
5491
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.unref(values).situationDescription = $event)
|
|
5492
|
+
}, vue.unref(fields).situationDescription, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
5493
|
+
]),
|
|
5494
|
+
_: 1
|
|
5495
|
+
/* STABLE */
|
|
5496
|
+
}),
|
|
5497
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5498
|
+
default: vue.withCtx(() => [
|
|
5499
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5500
|
+
modelValue: vue.unref(values).urgentSituationDate,
|
|
5501
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).urgentSituationDate = $event)
|
|
5502
|
+
}, vue.unref(fields).urgentSituationDate, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
5503
|
+
]),
|
|
5504
|
+
_: 1
|
|
5505
|
+
/* STABLE */
|
|
5506
|
+
}),
|
|
5507
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5508
|
+
modelValue: vue.unref(values),
|
|
5509
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5510
|
+
field: vue.unref(fields).situationRelatedBy,
|
|
5511
|
+
"is-disabled": ""
|
|
5512
|
+
}, null, 8, ["modelValue", "field"])
|
|
5513
|
+
]),
|
|
5514
|
+
_: 1
|
|
5515
|
+
/* STABLE */
|
|
5516
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5517
|
+
]),
|
|
5518
|
+
_: 1
|
|
5519
|
+
/* STABLE */
|
|
5520
|
+
})
|
|
5521
|
+
]),
|
|
5522
|
+
_: 1
|
|
5523
|
+
/* STABLE */
|
|
5524
|
+
}, 8, ["use-url"])
|
|
5525
|
+
]),
|
|
5526
|
+
_: 1
|
|
5527
|
+
/* STABLE */
|
|
5528
|
+
});
|
|
5529
|
+
};
|
|
5530
|
+
}
|
|
5531
|
+
});
|
|
5532
|
+
const SituationTypeModel = personaliaModels.models.SituationTypeModel;
|
|
5533
|
+
const __default__$2 = vue.defineComponent({ name: "SituationTypeCollection" });
|
|
5534
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
5535
|
+
...__default__$2,
|
|
5536
|
+
setup(__props) {
|
|
5537
|
+
context.useCollection();
|
|
5538
|
+
return (_ctx, _cache) => {
|
|
5539
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-situationType-collection" }, {
|
|
5540
|
+
default: vue.withCtx(() => [
|
|
5541
|
+
vue.createVNode(vue.unref(office.OfficeCollectionTable))
|
|
5542
|
+
]),
|
|
5543
|
+
_: 1
|
|
5544
|
+
/* STABLE */
|
|
4183
5545
|
});
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
5546
|
+
};
|
|
5547
|
+
}
|
|
5548
|
+
});
|
|
5549
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
5550
|
+
__name: "SituationTypeSingle",
|
|
5551
|
+
setup(__props) {
|
|
5552
|
+
const {
|
|
5553
|
+
fields,
|
|
5554
|
+
id,
|
|
5555
|
+
initialValues,
|
|
5556
|
+
values,
|
|
5557
|
+
isNew,
|
|
5558
|
+
isLoading,
|
|
5559
|
+
isChanged,
|
|
5560
|
+
isReady,
|
|
5561
|
+
isMain,
|
|
5562
|
+
saveOne,
|
|
5563
|
+
discardChanges
|
|
5564
|
+
} = context.useSingle();
|
|
5565
|
+
return (_ctx, _cache) => {
|
|
5566
|
+
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-type-single" }, {
|
|
5567
|
+
default: vue.withCtx(() => [
|
|
5568
|
+
vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
|
|
5569
|
+
default: vue.withCtx(() => [
|
|
5570
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5571
|
+
handle: "info",
|
|
5572
|
+
icon: "circle-info",
|
|
5573
|
+
title: "Info"
|
|
5574
|
+
}, {
|
|
5575
|
+
default: vue.withCtx(() => [
|
|
5576
|
+
vue.createVNode(vue.unref(form.NeonForm), {
|
|
5577
|
+
handle: "info",
|
|
5578
|
+
"initial-values": vue.unref(initialValues),
|
|
5579
|
+
"is-loading": vue.unref(isLoading),
|
|
5580
|
+
"is-changed": vue.unref(isChanged),
|
|
5581
|
+
"use-unsaved": "",
|
|
5582
|
+
onCancel: vue.unref(discardChanges),
|
|
5583
|
+
onSubmit: vue.unref(saveOne)
|
|
5584
|
+
}, {
|
|
5585
|
+
default: vue.withCtx(() => [
|
|
5586
|
+
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5587
|
+
default: vue.withCtx(() => [
|
|
5588
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5589
|
+
modelValue: vue.unref(values).situationTypeName,
|
|
5590
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).situationTypeName = $event)
|
|
5591
|
+
}, vue.unref(fields).situationTypeName), null, 16, ["modelValue"])
|
|
5592
|
+
]),
|
|
5593
|
+
_: 1
|
|
5594
|
+
/* STABLE */
|
|
5595
|
+
}),
|
|
5596
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5597
|
+
modelValue: vue.unref(values),
|
|
5598
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5599
|
+
field: vue.unref(fields).branches
|
|
5600
|
+
}, null, 8, ["modelValue", "field"])
|
|
5601
|
+
]),
|
|
5602
|
+
_: 1
|
|
5603
|
+
/* STABLE */
|
|
5604
|
+
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
5605
|
+
]),
|
|
5606
|
+
_: 1
|
|
5607
|
+
/* STABLE */
|
|
5608
|
+
})
|
|
5609
|
+
]),
|
|
5610
|
+
_: 1
|
|
5611
|
+
/* STABLE */
|
|
5612
|
+
}, 8, ["use-url"])
|
|
5613
|
+
]),
|
|
5614
|
+
_: 1
|
|
5615
|
+
/* STABLE */
|
|
4225
5616
|
});
|
|
4226
|
-
}
|
|
5617
|
+
};
|
|
4227
5618
|
}
|
|
4228
|
-
|
|
4229
|
-
|
|
5619
|
+
});
|
|
5620
|
+
const TaskModel = personaliaModels.models.TaskModel;
|
|
5621
|
+
const _hoisted_1 = { key: 0 };
|
|
5622
|
+
const _hoisted_2 = { key: 1 };
|
|
4230
5623
|
const __default__$1 = vue.defineComponent({ name: "TaskWorkButton" });
|
|
4231
5624
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
4232
5625
|
...__default__$1,
|
|
4233
5626
|
setup(__props) {
|
|
4234
|
-
useClientHandle();
|
|
4235
|
-
const
|
|
4236
|
-
|
|
5627
|
+
const { client: client2 } = useClientHandle();
|
|
5628
|
+
const {
|
|
5629
|
+
fields,
|
|
5630
|
+
id,
|
|
5631
|
+
initialValues,
|
|
5632
|
+
values,
|
|
5633
|
+
isNew,
|
|
5634
|
+
isLoading,
|
|
5635
|
+
isChanged,
|
|
5636
|
+
isReady,
|
|
5637
|
+
isMain,
|
|
5638
|
+
saveOne,
|
|
5639
|
+
discardChanges
|
|
5640
|
+
} = context.useSingle();
|
|
5641
|
+
const onHandleTaskWork = vue.ref({
|
|
5642
|
+
onStartTaskWorking: true,
|
|
5643
|
+
onFinishedTaskWorking: false,
|
|
5644
|
+
onFinishedDisabledTaskWorking: false
|
|
5645
|
+
});
|
|
5646
|
+
vue.watch(
|
|
5647
|
+
() => [values.value.resultAssignment],
|
|
5648
|
+
([resultAssignment]) => {
|
|
5649
|
+
switch (true) {
|
|
5650
|
+
case (resultAssignment === null || resultAssignment === void 0):
|
|
5651
|
+
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5652
|
+
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5653
|
+
break;
|
|
5654
|
+
case (resultAssignment !== null || resultAssignment !== void 0):
|
|
5655
|
+
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5656
|
+
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5657
|
+
onHandleTaskWork.value.onFinishedDisabledTaskWorking = true;
|
|
5658
|
+
break;
|
|
5659
|
+
default:
|
|
5660
|
+
onHandleTaskWork.value.onStartTaskWorking = true;
|
|
5661
|
+
onHandleTaskWork.value.onFinishedTaskWorking = false;
|
|
5662
|
+
break;
|
|
5663
|
+
}
|
|
5664
|
+
},
|
|
5665
|
+
{
|
|
5666
|
+
immediate: true
|
|
5667
|
+
}
|
|
5668
|
+
);
|
|
5669
|
+
const onClickHandlerStartTaskWork = async () => {
|
|
5670
|
+
var _a, _b;
|
|
5671
|
+
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5672
|
+
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5673
|
+
try {
|
|
5674
|
+
const responseStartTaskWork = await client2.mutation(context.GraphUtil.executeOne(personaliaModels.models.TaskModel, {}), {
|
|
5675
|
+
action: "startTaskWork",
|
|
5676
|
+
input: {
|
|
5677
|
+
estimatedRealizedAssignmentStart: Date.now(),
|
|
5678
|
+
taskId: (_a = values.value) == null ? void 0 : _a.id
|
|
5679
|
+
}
|
|
5680
|
+
}).toPromise();
|
|
5681
|
+
const wrapper = (_b = responseStartTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5682
|
+
window.location.reload();
|
|
5683
|
+
} catch (error) {
|
|
5684
|
+
}
|
|
5685
|
+
};
|
|
5686
|
+
const onClickHandlerFinishTaskWork = async () => {
|
|
5687
|
+
var _a, _b;
|
|
5688
|
+
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5689
|
+
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5690
|
+
onHandleTaskWork.value.onFinishedDisabledTaskWorking = true;
|
|
5691
|
+
try {
|
|
5692
|
+
const responseFinishedTaskWork = await client2.mutation(context.GraphUtil.executeOne(personaliaModels.models.TaskModel, {}), {
|
|
5693
|
+
action: "finishTaskWork",
|
|
5694
|
+
input: {
|
|
5695
|
+
estimatedRealizedAssignmentEnd: Date.now(),
|
|
5696
|
+
taskId: (_a = values.value) == null ? void 0 : _a.id
|
|
5697
|
+
}
|
|
5698
|
+
}).toPromise();
|
|
5699
|
+
const wrapper = (_b = responseFinishedTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5700
|
+
window.location.reload();
|
|
5701
|
+
} catch (error) {
|
|
5702
|
+
}
|
|
4237
5703
|
};
|
|
4238
5704
|
return (_ctx, _cache) => {
|
|
4239
|
-
return vue.openBlock(), vue.
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
5705
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
5706
|
+
vue.Fragment,
|
|
5707
|
+
null,
|
|
5708
|
+
[
|
|
5709
|
+
onHandleTaskWork.value.onStartTaskWorking ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
5710
|
+
vue.createVNode(vue.unref(interfaces.NeonButton), {
|
|
5711
|
+
"is-rounded": true,
|
|
5712
|
+
size: "sm",
|
|
5713
|
+
color: "warning",
|
|
5714
|
+
"icon-left": "play",
|
|
5715
|
+
label: "Mulai",
|
|
5716
|
+
onClick: onClickHandlerStartTaskWork
|
|
5717
|
+
})
|
|
5718
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
5719
|
+
onHandleTaskWork.value.onFinishedTaskWorking ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
5720
|
+
vue.createVNode(vue.unref(interfaces.NeonButton), {
|
|
5721
|
+
"is-rounded": true,
|
|
5722
|
+
size: "sm",
|
|
5723
|
+
color: "success",
|
|
5724
|
+
"icon-left": "check",
|
|
5725
|
+
label: "Selesai",
|
|
5726
|
+
"is-disabled": onHandleTaskWork.value.onFinishedDisabledTaskWorking,
|
|
5727
|
+
onClick: onClickHandlerFinishTaskWork
|
|
5728
|
+
}, null, 8, ["is-disabled"])
|
|
5729
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
5730
|
+
],
|
|
5731
|
+
64
|
|
5732
|
+
/* STABLE_FRAGMENT */
|
|
5733
|
+
);
|
|
4247
5734
|
};
|
|
4248
5735
|
}
|
|
4249
5736
|
});
|
|
@@ -4722,6 +6209,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4722
6209
|
});
|
|
4723
6210
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4724
6211
|
__proto__: null,
|
|
6212
|
+
CheckInAccess,
|
|
6213
|
+
CheckInCollection: _sfc_main$c,
|
|
6214
|
+
CheckInModel,
|
|
6215
|
+
CheckInPresenceCollection,
|
|
6216
|
+
CheckInScanError: _sfc_main$f,
|
|
6217
|
+
CheckInScanSuccess: _sfc_main$d,
|
|
6218
|
+
CheckInScanner,
|
|
6219
|
+
CheckInSingle,
|
|
4725
6220
|
SituationCollection: _sfc_main$9,
|
|
4726
6221
|
SituationModel,
|
|
4727
6222
|
SituationSingle: _sfc_main$8,
|
|
@@ -4738,11 +6233,11 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
4738
6233
|
TaskSingle: _sfc_main$1,
|
|
4739
6234
|
TaskWork: _sfc_main,
|
|
4740
6235
|
TaskWorkButton: _sfc_main$3,
|
|
4741
|
-
XxxButton: _sfc_main$
|
|
6236
|
+
XxxButton: _sfc_main$j
|
|
4742
6237
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4743
6238
|
function registerComponents(app) {
|
|
4744
|
-
Object.entries(components).forEach(([name,
|
|
4745
|
-
client.ComponentUtil.register(app, name,
|
|
6239
|
+
Object.entries(components).forEach(([name, component2]) => {
|
|
6240
|
+
client.ComponentUtil.register(app, name, component2);
|
|
4746
6241
|
});
|
|
4747
6242
|
}
|
|
4748
6243
|
const graphql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -4753,6 +6248,117 @@ const OperasionalInterfacesPlugin = {
|
|
|
4753
6248
|
registerComponents(app);
|
|
4754
6249
|
}
|
|
4755
6250
|
};
|
|
6251
|
+
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)}}
|
|
6252
|
+
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}}
|
|
6253
|
+
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,
|
|
6254
|
+
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("");
|
|
6255
|
+
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}}
|
|
6256
|
+
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=
|
|
6257
|
+
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+=
|
|
6258
|
+
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});
|
|
6259
|
+
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}
|
|
6260
|
+
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;
|
|
6261
|
+
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()||
|
|
6262
|
+
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,
|
|
6263
|
+
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}
|
|
6264
|
+
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===
|
|
6265
|
+
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]}}
|
|
6266
|
+
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);
|
|
6267
|
+
if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
|
|
6268
|
+
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];
|
|
6269
|
+
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}
|
|
6270
|
+
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,
|
|
6271
|
+
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,
|
|
6272
|
+
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}]}]},
|
|
6273
|
+
{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,
|
|
6274
|
+
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,
|
|
6275
|
+
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},
|
|
6276
|
+
{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},
|
|
6277
|
+
{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,
|
|
6278
|
+
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,
|
|
6279
|
+
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}]},
|
|
6280
|
+
{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}]},
|
|
6281
|
+
{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},
|
|
6282
|
+
{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,
|
|
6283
|
+
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,
|
|
6284
|
+
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,
|
|
6285
|
+
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,
|
|
6286
|
+
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,
|
|
6287
|
+
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}]},
|
|
6288
|
+
{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},
|
|
6289
|
+
{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},
|
|
6290
|
+
{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},
|
|
6291
|
+
{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},
|
|
6292
|
+
{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,
|
|
6293
|
+
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,
|
|
6294
|
+
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,
|
|
6295
|
+
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}]},
|
|
6296
|
+
{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},
|
|
6297
|
+
{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,
|
|
6298
|
+
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,
|
|
6299
|
+
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}]}]},
|
|
6300
|
+
{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},
|
|
6301
|
+
{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,
|
|
6302
|
+
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}]},
|
|
6303
|
+
{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,
|
|
6304
|
+
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}]},
|
|
6305
|
+
{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,
|
|
6306
|
+
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}]},
|
|
6307
|
+
{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,
|
|
6308
|
+
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],
|
|
6309
|
+
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,
|
|
6310
|
+
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},
|
|
6311
|
+
{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}
|
|
6312
|
+
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,
|
|
6313
|
+
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,
|
|
6314
|
+
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,
|
|
6315
|
+
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%
|
|
6316
|
+
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];
|
|
6317
|
+
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===
|
|
6318
|
+
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}
|
|
6319
|
+
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}
|
|
6320
|
+
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}
|
|
6321
|
+
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());
|
|
6322
|
+
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}}
|
|
6323
|
+
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}}
|
|
6324
|
+
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}}
|
|
6325
|
+
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*
|
|
6326
|
+
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)}
|
|
6327
|
+
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}}
|
|
6328
|
+
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}}
|
|
6329
|
+
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=
|
|
6330
|
+
[];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}}
|
|
6331
|
+
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)+
|
|
6332
|
+
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}}
|
|
6333
|
+
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&&
|
|
6334
|
+
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?
|
|
6335
|
+
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+
|
|
6336
|
+
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);
|
|
6337
|
+
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}
|
|
6338
|
+
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<=
|
|
6339
|
+
c&&b.length?b[0]:m,dimension:f}}
|
|
6340
|
+
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,
|
|
6341
|
+
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]})}
|
|
6342
|
+
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]+
|
|
6343
|
+
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)));
|
|
6344
|
+
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?
|
|
6345
|
+
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};
|
|
6346
|
+
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;
|
|
6347
|
+
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()}}
|
|
6348
|
+
`]), { type: "application/javascript" }));
|
|
6349
|
+
const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6350
|
+
__proto__: null,
|
|
6351
|
+
createWorker
|
|
6352
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
6353
|
+
exports.CheckInAccess = CheckInAccess;
|
|
6354
|
+
exports.CheckInCollection = _sfc_main$c;
|
|
6355
|
+
exports.CheckInModel = CheckInModel;
|
|
6356
|
+
exports.CheckInPresenceCollection = CheckInPresenceCollection;
|
|
6357
|
+
exports.CheckInScanError = _sfc_main$f;
|
|
6358
|
+
exports.CheckInScanSuccess = _sfc_main$d;
|
|
6359
|
+
exports.CheckInScanner = CheckInScanner;
|
|
6360
|
+
exports.CheckInSingle = CheckInSingle;
|
|
6361
|
+
exports.NOperasional = operasional_types;
|
|
4756
6362
|
exports.OperasionalInterfacesPlugin = OperasionalInterfacesPlugin;
|
|
4757
6363
|
exports.Schema = graphql;
|
|
4758
6364
|
exports.SituationCollection = _sfc_main$9;
|
|
@@ -4771,4 +6377,9 @@ exports.TaskModel = TaskModel;
|
|
|
4771
6377
|
exports.TaskSingle = _sfc_main$1;
|
|
4772
6378
|
exports.TaskWork = _sfc_main;
|
|
4773
6379
|
exports.TaskWorkButton = _sfc_main$3;
|
|
4774
|
-
exports.XxxButton = _sfc_main$
|
|
6380
|
+
exports.XxxButton = _sfc_main$j;
|
|
6381
|
+
exports.bus = bus;
|
|
6382
|
+
exports.useAttendanceStore = useAttendanceStore;
|
|
6383
|
+
exports.useOperasional = useOperasional;
|
|
6384
|
+
exports.useOperasionalStore = useOperasionalStore;
|
|
6385
|
+
exports.withOperasional = withOperasional;
|