@neutron.co.id/operasional-interfaces 1.3.3-beta.1 → 1.3.3-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 +2822 -808
- package/build/index.mjs +2757 -743
- package/build/style.css +15 -11
- package/build/types/components/checkIn/checkIn.types.d.ts +1 -1
- package/build/types/components/checkIn/sheets/CheckInScanner.vue.d.ts +1 -1
- package/build/types/components/common/OperasionalIdentitas/OperasionalIdentitas.vue.d.ts +106 -0
- package/build/types/components/common/OperasionalIdentitas/index.d.ts +1 -0
- package/build/types/components/common/index.d.ts +1 -0
- package/build/types/components/staff/sheets/StaffIdentity.vue.d.ts +2 -0
- package/build/types/components/staff/sheets/index.d.ts +1 -0
- package/build/types/components/staff/staff.types.d.ts +1 -1
- package/build/types/components/task/task.types.d.ts +1 -1
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { ComponentUtil as ComponentUtil$1 } from "@neon.id/utils/client";
|
|
2
|
-
import { defineComponent, openBlock, createElementBlock, createVNode, unref, onBeforeUnmount, onMounted, getCurrentInstance, inject, reactive, ref, isRef, watchEffect,
|
|
3
|
-
import { NeonButton, useToastStore, NeonSlider, NeonSlide, NeonStat,
|
|
4
|
-
import { models } from "@neutron.co.id/tempat-models";
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, unref, onBeforeUnmount, onMounted, getCurrentInstance, inject, reactive, ref, isRef, watchEffect, computed, h, watch, createBlock, withCtx, mergeProps, createCommentVNode, provide, resolveComponent, createElementVNode, createTextVNode, pushScopeId, popScopeId, normalizeClass, withModifiers, toDisplayString, Fragment } from "vue";
|
|
3
|
+
import { NeonButton, NeonAvatar, NeonDivider, NeonModal, NeonSheet, useToastStore, NeonSlider, NeonSlide, NeonStat, NeonInfo } from "@neon.id/interfaces";
|
|
5
4
|
import { GraphUtil, NeonCollectionContext, useSingle, NeonSingle, useCollection, NeonCollection } from "@neon.id/context";
|
|
5
|
+
import { RowUtil } from "@neon.id/display";
|
|
6
|
+
import { NeonField, NeonForm, NeonFormWrapper, NeonFields } from "@neon.id/form";
|
|
7
|
+
import { IdentitasConnect, IdentitasAssistRegistration, IdentitasDelegate, useAuthStore } from "@neon.id/identitas-interfaces";
|
|
8
|
+
import { models } from "@neon.id/identitas-models";
|
|
9
|
+
import { Field } from "@neon.id/model";
|
|
10
|
+
import { Query } from "@neon.id/query";
|
|
11
|
+
import { withRelation, NeonRelationSheet } from "@neon.id/relation";
|
|
12
|
+
import { CodeUtil } from "@neon.id/utils/code";
|
|
13
|
+
import { models as models$1 } from "@neutron.co.id/tempat-models";
|
|
6
14
|
import { useEventBus, useIntervalFn, useThrottleFn } from "@vueuse/core";
|
|
7
15
|
import { OfficeContent, OfficeCollectionQuery, OfficeCollectionOperation, OfficeTabs, OfficeTab, OfficeRelation, OfficeCollectionTable } from "@neon.id/office";
|
|
8
|
-
import { Query } from "@neon.id/query";
|
|
9
16
|
import { defineStore, storeToRefs } from "pinia";
|
|
17
|
+
import { useRouter } from "vue-router";
|
|
10
18
|
import { ComponentUtil } from "@neon.id/utils/component";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
17
|
-
...__default__$8,
|
|
19
|
+
import { models as models$2 } from "@neutron.co.id/personalia-models";
|
|
20
|
+
const _hoisted_1$9 = { class: "xxx-button" };
|
|
21
|
+
const __default__$9 = defineComponent({ name: "XxxButton" });
|
|
22
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
23
|
+
...__default__$9,
|
|
18
24
|
props: {
|
|
19
25
|
color: {
|
|
20
26
|
type: String,
|
|
@@ -23,13 +29,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
23
29
|
},
|
|
24
30
|
setup(__props) {
|
|
25
31
|
return (_ctx, _cache) => {
|
|
26
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
32
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
27
33
|
createVNode(unref(NeonButton), { label: "XXX" })
|
|
28
34
|
]);
|
|
29
35
|
};
|
|
30
36
|
}
|
|
31
37
|
});
|
|
32
|
-
const CheckInModel = models.CheckInModel;
|
|
33
38
|
function devAssert(condition, message) {
|
|
34
39
|
const booleanCondition = Boolean(condition);
|
|
35
40
|
if (!booleanCondition) {
|
|
@@ -51,12 +56,12 @@ const LineRegExp = /\r\n|[\n\r]/g;
|
|
|
51
56
|
function getLocation(source, position) {
|
|
52
57
|
let lastLineStart = 0;
|
|
53
58
|
let line = 1;
|
|
54
|
-
for (const
|
|
55
|
-
typeof
|
|
56
|
-
if (
|
|
59
|
+
for (const match2 of source.body.matchAll(LineRegExp)) {
|
|
60
|
+
typeof match2.index === "number" || invariant(false);
|
|
61
|
+
if (match2.index >= position) {
|
|
57
62
|
break;
|
|
58
63
|
}
|
|
59
|
-
lastLineStart =
|
|
64
|
+
lastLineStart = match2.index + match2[0].length;
|
|
60
65
|
line += 1;
|
|
61
66
|
}
|
|
62
67
|
return {
|
|
@@ -86,8 +91,8 @@ function printSourceLocation(source, sourceLocation) {
|
|
|
86
91
|
const subLineIndex = Math.floor(columnNum / 80);
|
|
87
92
|
const subLineColumnNum = columnNum % 80;
|
|
88
93
|
const subLines = [];
|
|
89
|
-
for (let
|
|
90
|
-
subLines.push(locationLine.slice(
|
|
94
|
+
for (let i3 = 0; i3 < locationLine.length; i3 += 80) {
|
|
95
|
+
subLines.push(locationLine.slice(i3, i3 + 80));
|
|
91
96
|
}
|
|
92
97
|
return locationStr + printPrefixedLines([
|
|
93
98
|
[`${lineNum} |`, subLines[0]],
|
|
@@ -519,30 +524,30 @@ function dedentBlockStringLines(lines) {
|
|
|
519
524
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
|
520
525
|
let firstNonEmptyLine = null;
|
|
521
526
|
let lastNonEmptyLine = -1;
|
|
522
|
-
for (let
|
|
527
|
+
for (let i3 = 0; i3 < lines.length; ++i3) {
|
|
523
528
|
var _firstNonEmptyLine;
|
|
524
|
-
const line = lines[
|
|
529
|
+
const line = lines[i3];
|
|
525
530
|
const indent2 = leadingWhitespace(line);
|
|
526
531
|
if (indent2 === line.length) {
|
|
527
532
|
continue;
|
|
528
533
|
}
|
|
529
|
-
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine :
|
|
530
|
-
lastNonEmptyLine =
|
|
531
|
-
if (
|
|
534
|
+
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i3;
|
|
535
|
+
lastNonEmptyLine = i3;
|
|
536
|
+
if (i3 !== 0 && indent2 < commonIndent) {
|
|
532
537
|
commonIndent = indent2;
|
|
533
538
|
}
|
|
534
539
|
}
|
|
535
|
-
return lines.map((line,
|
|
540
|
+
return lines.map((line, i3) => i3 === 0 ? line : line.slice(commonIndent)).slice(
|
|
536
541
|
(_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0,
|
|
537
542
|
lastNonEmptyLine + 1
|
|
538
543
|
);
|
|
539
544
|
}
|
|
540
545
|
function leadingWhitespace(str) {
|
|
541
|
-
let
|
|
542
|
-
while (
|
|
543
|
-
++
|
|
546
|
+
let i3 = 0;
|
|
547
|
+
while (i3 < str.length && isWhiteSpace(str.charCodeAt(i3))) {
|
|
548
|
+
++i3;
|
|
544
549
|
}
|
|
545
|
-
return
|
|
550
|
+
return i3;
|
|
546
551
|
}
|
|
547
552
|
function printBlockString(value, options) {
|
|
548
553
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
|
@@ -1151,8 +1156,8 @@ function formatArray(array, seenValues) {
|
|
|
1151
1156
|
const len = Math.min(MAX_ARRAY_LENGTH, array.length);
|
|
1152
1157
|
const remaining = array.length - len;
|
|
1153
1158
|
const items = [];
|
|
1154
|
-
for (let
|
|
1155
|
-
items.push(formatValue(array[
|
|
1159
|
+
for (let i3 = 0; i3 < len; ++i3) {
|
|
1160
|
+
items.push(formatValue(array[i3], seenValues));
|
|
1156
1161
|
}
|
|
1157
1162
|
if (remaining === 1) {
|
|
1158
1163
|
items.push("... 1 more item");
|
|
@@ -3008,7 +3013,7 @@ const printDocASTReducer = {
|
|
|
3008
3013
|
};
|
|
3009
3014
|
function join(maybeArray, separator = "") {
|
|
3010
3015
|
var _maybeArray$filter$jo;
|
|
3011
|
-
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((
|
|
3016
|
+
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x2) => x2).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
|
|
3012
3017
|
}
|
|
3013
3018
|
function block(array) {
|
|
3014
3019
|
return wrap("{\n", indent(join(array, "\n")), "\n}");
|
|
@@ -3024,43 +3029,43 @@ function hasMultilineItems(maybeArray) {
|
|
|
3024
3029
|
return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
|
|
3025
3030
|
}
|
|
3026
3031
|
var e$1;
|
|
3027
|
-
!function(
|
|
3028
|
-
|
|
3029
|
-
|
|
3032
|
+
!function(e3) {
|
|
3033
|
+
e3[e3.Pull = 0] = "Pull";
|
|
3034
|
+
e3[e3.Close = 1] = "Close";
|
|
3030
3035
|
}(e$1 || (e$1 = {}));
|
|
3031
3036
|
var r;
|
|
3032
|
-
!function(
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3037
|
+
!function(e3) {
|
|
3038
|
+
e3[e3.Start = 0] = "Start";
|
|
3039
|
+
e3[e3.Push = 1] = "Push";
|
|
3040
|
+
e3[e3.End = 0] = "End";
|
|
3036
3041
|
}(r || (r = {}));
|
|
3037
3042
|
var teardownPlaceholder = () => {
|
|
3038
3043
|
};
|
|
3039
3044
|
var t = teardownPlaceholder;
|
|
3040
|
-
function start(
|
|
3041
|
-
var
|
|
3042
|
-
|
|
3043
|
-
return
|
|
3045
|
+
function start(e3) {
|
|
3046
|
+
var t3 = [e3];
|
|
3047
|
+
t3.tag = r.Start;
|
|
3048
|
+
return t3;
|
|
3044
3049
|
}
|
|
3045
|
-
function onEnd(
|
|
3050
|
+
function onEnd(t3) {
|
|
3046
3051
|
return (l2) => (n) => {
|
|
3047
|
-
var
|
|
3052
|
+
var a3 = false;
|
|
3048
3053
|
l2((l3) => {
|
|
3049
|
-
if (
|
|
3054
|
+
if (a3)
|
|
3050
3055
|
;
|
|
3051
3056
|
else if (l3 === r.End) {
|
|
3052
|
-
|
|
3057
|
+
a3 = true;
|
|
3053
3058
|
n(r.End);
|
|
3054
|
-
|
|
3059
|
+
t3();
|
|
3055
3060
|
} else if (l3.tag === r.Start) {
|
|
3056
|
-
var
|
|
3061
|
+
var i3 = l3[0];
|
|
3057
3062
|
n(start((r2) => {
|
|
3058
3063
|
if (r2 === e$1.Close) {
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3064
|
+
a3 = true;
|
|
3065
|
+
i3(e$1.Close);
|
|
3066
|
+
t3();
|
|
3062
3067
|
} else {
|
|
3063
|
-
|
|
3068
|
+
i3(r2);
|
|
3064
3069
|
}
|
|
3065
3070
|
}));
|
|
3066
3071
|
} else {
|
|
@@ -3070,64 +3075,64 @@ function onEnd(t2) {
|
|
|
3070
3075
|
};
|
|
3071
3076
|
}
|
|
3072
3077
|
function take(l2) {
|
|
3073
|
-
return (n) => (
|
|
3074
|
-
var
|
|
3075
|
-
var
|
|
3078
|
+
return (n) => (a3) => {
|
|
3079
|
+
var i3 = t;
|
|
3080
|
+
var s4 = false;
|
|
3076
3081
|
var f2 = 0;
|
|
3077
|
-
n((
|
|
3078
|
-
if (
|
|
3082
|
+
n((t3) => {
|
|
3083
|
+
if (s4)
|
|
3079
3084
|
;
|
|
3080
|
-
else if (
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
} else if (
|
|
3085
|
+
else if (t3 === r.End) {
|
|
3086
|
+
s4 = true;
|
|
3087
|
+
a3(r.End);
|
|
3088
|
+
} else if (t3.tag === r.Start) {
|
|
3084
3089
|
if (l2 <= 0) {
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3090
|
+
s4 = true;
|
|
3091
|
+
a3(r.End);
|
|
3092
|
+
t3[0](e$1.Close);
|
|
3088
3093
|
} else {
|
|
3089
|
-
|
|
3094
|
+
i3 = t3[0];
|
|
3090
3095
|
}
|
|
3091
3096
|
} else if (f2++ < l2) {
|
|
3092
|
-
|
|
3093
|
-
if (!
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
+
a3(t3);
|
|
3098
|
+
if (!s4 && f2 >= l2) {
|
|
3099
|
+
s4 = true;
|
|
3100
|
+
a3(r.End);
|
|
3101
|
+
i3(e$1.Close);
|
|
3097
3102
|
}
|
|
3098
3103
|
} else {
|
|
3099
|
-
|
|
3104
|
+
a3(t3);
|
|
3100
3105
|
}
|
|
3101
3106
|
});
|
|
3102
|
-
|
|
3103
|
-
if (r2 === e$1.Close && !
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
} else if (r2 === e$1.Pull && !
|
|
3107
|
-
|
|
3107
|
+
a3(start((r2) => {
|
|
3108
|
+
if (r2 === e$1.Close && !s4) {
|
|
3109
|
+
s4 = true;
|
|
3110
|
+
i3(e$1.Close);
|
|
3111
|
+
} else if (r2 === e$1.Pull && !s4 && f2 < l2) {
|
|
3112
|
+
i3(e$1.Pull);
|
|
3108
3113
|
}
|
|
3109
3114
|
}));
|
|
3110
3115
|
};
|
|
3111
3116
|
}
|
|
3112
3117
|
function subscribe(l2) {
|
|
3113
3118
|
return (n) => {
|
|
3114
|
-
var
|
|
3115
|
-
var
|
|
3116
|
-
n((
|
|
3117
|
-
if (
|
|
3118
|
-
|
|
3119
|
-
} else if (
|
|
3120
|
-
(
|
|
3121
|
-
} else if (!
|
|
3122
|
-
l2(
|
|
3123
|
-
|
|
3119
|
+
var a3 = t;
|
|
3120
|
+
var i3 = false;
|
|
3121
|
+
n((t3) => {
|
|
3122
|
+
if (t3 === r.End) {
|
|
3123
|
+
i3 = true;
|
|
3124
|
+
} else if (t3.tag === r.Start) {
|
|
3125
|
+
(a3 = t3[0])(e$1.Pull);
|
|
3126
|
+
} else if (!i3) {
|
|
3127
|
+
l2(t3[0]);
|
|
3128
|
+
a3(e$1.Pull);
|
|
3124
3129
|
}
|
|
3125
3130
|
});
|
|
3126
3131
|
return {
|
|
3127
3132
|
unsubscribe() {
|
|
3128
|
-
if (!
|
|
3129
|
-
|
|
3130
|
-
|
|
3133
|
+
if (!i3) {
|
|
3134
|
+
i3 = true;
|
|
3135
|
+
a3(e$1.Close);
|
|
3131
3136
|
}
|
|
3132
3137
|
}
|
|
3133
3138
|
};
|
|
@@ -3135,26 +3140,26 @@ function subscribe(l2) {
|
|
|
3135
3140
|
}
|
|
3136
3141
|
function toPromise(l2) {
|
|
3137
3142
|
return new Promise((n) => {
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3140
|
-
l2((
|
|
3141
|
-
if (
|
|
3142
|
-
Promise.resolve(
|
|
3143
|
-
} else if (
|
|
3144
|
-
(
|
|
3143
|
+
var a3 = t;
|
|
3144
|
+
var i3;
|
|
3145
|
+
l2((t3) => {
|
|
3146
|
+
if (t3 === r.End) {
|
|
3147
|
+
Promise.resolve(i3).then(n);
|
|
3148
|
+
} else if (t3.tag === r.Start) {
|
|
3149
|
+
(a3 = t3[0])(e$1.Pull);
|
|
3145
3150
|
} else {
|
|
3146
|
-
|
|
3147
|
-
|
|
3151
|
+
i3 = t3[0];
|
|
3152
|
+
a3(e$1.Pull);
|
|
3148
3153
|
}
|
|
3149
3154
|
});
|
|
3150
3155
|
});
|
|
3151
3156
|
}
|
|
3152
|
-
var phash = (r2,
|
|
3153
|
-
var
|
|
3154
|
-
for (var
|
|
3155
|
-
|
|
3157
|
+
var phash = (r2, e3) => {
|
|
3158
|
+
var t3 = "number" == typeof e3 ? 0 | e3 : 5381;
|
|
3159
|
+
for (var a3 = 0, n = 0 | r2.length; a3 < n; a3++) {
|
|
3160
|
+
t3 = (t3 << 5) + t3 + r2.charCodeAt(a3);
|
|
3156
3161
|
}
|
|
3157
|
-
return
|
|
3162
|
+
return t3;
|
|
3158
3163
|
};
|
|
3159
3164
|
var o = /* @__PURE__ */ new Set();
|
|
3160
3165
|
var i = /* @__PURE__ */ new WeakMap();
|
|
@@ -3166,34 +3171,34 @@ var stringify = (r2) => {
|
|
|
3166
3171
|
} else if (r2.toJSON) {
|
|
3167
3172
|
return stringify(r2.toJSON());
|
|
3168
3173
|
} else if (Array.isArray(r2)) {
|
|
3169
|
-
var
|
|
3170
|
-
for (var
|
|
3171
|
-
if ("[" !==
|
|
3172
|
-
|
|
3174
|
+
var e3 = "[";
|
|
3175
|
+
for (var t3 of r2) {
|
|
3176
|
+
if ("[" !== e3) {
|
|
3177
|
+
e3 += ",";
|
|
3173
3178
|
}
|
|
3174
|
-
|
|
3179
|
+
e3 += (t3 = stringify(t3)).length > 0 ? t3 : "null";
|
|
3175
3180
|
}
|
|
3176
|
-
return
|
|
3181
|
+
return e3 += "]";
|
|
3177
3182
|
}
|
|
3178
|
-
var
|
|
3179
|
-
if (!
|
|
3183
|
+
var a3 = Object.keys(r2).sort();
|
|
3184
|
+
if (!a3.length && r2.constructor && r2.constructor !== Object) {
|
|
3180
3185
|
var n = i.get(r2) || Math.random().toString(36).slice(2);
|
|
3181
3186
|
i.set(r2, n);
|
|
3182
3187
|
return `{"__key":"${n}"}`;
|
|
3183
3188
|
}
|
|
3184
3189
|
o.add(r2);
|
|
3185
|
-
var
|
|
3186
|
-
for (var v2 of
|
|
3190
|
+
var s4 = "{";
|
|
3191
|
+
for (var v2 of a3) {
|
|
3187
3192
|
var f2 = stringify(r2[v2]);
|
|
3188
3193
|
if (f2) {
|
|
3189
|
-
if (
|
|
3190
|
-
|
|
3194
|
+
if (s4.length > 1) {
|
|
3195
|
+
s4 += ",";
|
|
3191
3196
|
}
|
|
3192
|
-
|
|
3197
|
+
s4 += stringify(v2) + ":" + f2;
|
|
3193
3198
|
}
|
|
3194
3199
|
}
|
|
3195
3200
|
o.delete(r2);
|
|
3196
|
-
return
|
|
3201
|
+
return s4 += "}";
|
|
3197
3202
|
};
|
|
3198
3203
|
var stringifyVariables = (r2) => {
|
|
3199
3204
|
o.clear();
|
|
@@ -3201,26 +3206,26 @@ var stringifyVariables = (r2) => {
|
|
|
3201
3206
|
};
|
|
3202
3207
|
var s = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g;
|
|
3203
3208
|
var v = /(#[^\n\r]+)?(?:\n|\r\n?|$)+/g;
|
|
3204
|
-
var replaceOutsideStrings = (r2,
|
|
3209
|
+
var replaceOutsideStrings = (r2, e3) => e3 % 2 == 0 ? r2.replace(v, "\n") : r2;
|
|
3205
3210
|
var sanitizeDocument = (r2) => r2.split(s).map(replaceOutsideStrings).join("").trim();
|
|
3206
3211
|
var f = /* @__PURE__ */ new Map();
|
|
3207
3212
|
var l = /* @__PURE__ */ new Map();
|
|
3208
3213
|
var stringifyDocument = (r2) => {
|
|
3209
|
-
var
|
|
3214
|
+
var e3;
|
|
3210
3215
|
if ("string" == typeof r2) {
|
|
3211
|
-
|
|
3216
|
+
e3 = sanitizeDocument(r2);
|
|
3212
3217
|
} else if (r2.loc && l.get(r2.__key) === r2) {
|
|
3213
|
-
|
|
3218
|
+
e3 = r2.loc.source.body;
|
|
3214
3219
|
} else {
|
|
3215
|
-
|
|
3216
|
-
f.set(r2,
|
|
3220
|
+
e3 = f.get(r2) || sanitizeDocument(print(r2));
|
|
3221
|
+
f.set(r2, e3);
|
|
3217
3222
|
}
|
|
3218
3223
|
if ("string" != typeof r2 && !r2.loc) {
|
|
3219
3224
|
r2.loc = {
|
|
3220
3225
|
start: 0,
|
|
3221
|
-
end:
|
|
3226
|
+
end: e3.length,
|
|
3222
3227
|
source: {
|
|
3223
|
-
body:
|
|
3228
|
+
body: e3,
|
|
3224
3229
|
name: "gql",
|
|
3225
3230
|
locationOffset: {
|
|
3226
3231
|
line: 1,
|
|
@@ -3229,58 +3234,58 @@ var stringifyDocument = (r2) => {
|
|
|
3229
3234
|
}
|
|
3230
3235
|
};
|
|
3231
3236
|
}
|
|
3232
|
-
return
|
|
3237
|
+
return e3;
|
|
3233
3238
|
};
|
|
3234
3239
|
var hashDocument = (r2) => {
|
|
3235
|
-
var
|
|
3240
|
+
var e3 = phash(stringifyDocument(r2));
|
|
3236
3241
|
if ("object" == typeof r2 && "definitions" in r2) {
|
|
3237
|
-
var
|
|
3238
|
-
if (
|
|
3239
|
-
|
|
3240
|
-
# ${
|
|
3242
|
+
var t3 = getOperationName(r2);
|
|
3243
|
+
if (t3) {
|
|
3244
|
+
e3 = phash(`
|
|
3245
|
+
# ${t3}`, e3);
|
|
3241
3246
|
}
|
|
3242
3247
|
}
|
|
3243
|
-
return
|
|
3248
|
+
return e3;
|
|
3244
3249
|
};
|
|
3245
3250
|
var keyDocument = (r2) => {
|
|
3246
|
-
var
|
|
3247
|
-
var
|
|
3251
|
+
var e3;
|
|
3252
|
+
var t3;
|
|
3248
3253
|
if ("string" == typeof r2) {
|
|
3249
|
-
|
|
3250
|
-
|
|
3254
|
+
e3 = hashDocument(r2);
|
|
3255
|
+
t3 = l.get(e3) || parse(r2, {
|
|
3251
3256
|
noLocation: true
|
|
3252
3257
|
});
|
|
3253
3258
|
} else {
|
|
3254
|
-
|
|
3255
|
-
|
|
3259
|
+
e3 = r2.__key || hashDocument(r2);
|
|
3260
|
+
t3 = l.get(e3) || r2;
|
|
3256
3261
|
}
|
|
3257
|
-
if (!
|
|
3258
|
-
stringifyDocument(
|
|
3262
|
+
if (!t3.loc) {
|
|
3263
|
+
stringifyDocument(t3);
|
|
3259
3264
|
}
|
|
3260
|
-
|
|
3261
|
-
l.set(
|
|
3262
|
-
return
|
|
3265
|
+
t3.__key = e3;
|
|
3266
|
+
l.set(e3, t3);
|
|
3267
|
+
return t3;
|
|
3263
3268
|
};
|
|
3264
|
-
var createRequest = (r2,
|
|
3265
|
-
if (!
|
|
3266
|
-
|
|
3269
|
+
var createRequest = (r2, e3) => {
|
|
3270
|
+
if (!e3) {
|
|
3271
|
+
e3 = {};
|
|
3267
3272
|
}
|
|
3268
|
-
var
|
|
3269
|
-
var
|
|
3270
|
-
var n =
|
|
3271
|
-
if ("{}" !==
|
|
3272
|
-
n = phash(
|
|
3273
|
+
var t3 = keyDocument(r2);
|
|
3274
|
+
var a3 = stringifyVariables(e3);
|
|
3275
|
+
var n = t3.__key;
|
|
3276
|
+
if ("{}" !== a3) {
|
|
3277
|
+
n = phash(a3, n);
|
|
3273
3278
|
}
|
|
3274
3279
|
return {
|
|
3275
3280
|
key: n,
|
|
3276
|
-
query:
|
|
3277
|
-
variables:
|
|
3281
|
+
query: t3,
|
|
3282
|
+
variables: e3
|
|
3278
3283
|
};
|
|
3279
3284
|
};
|
|
3280
3285
|
var getOperationName = (r2) => {
|
|
3281
|
-
for (var
|
|
3282
|
-
if (
|
|
3283
|
-
return
|
|
3286
|
+
for (var t3 of r2.definitions) {
|
|
3287
|
+
if (t3.kind === Kind.OPERATION_DEFINITION && t3.name) {
|
|
3288
|
+
return t3.name.value;
|
|
3284
3289
|
}
|
|
3285
3290
|
}
|
|
3286
3291
|
};
|
|
@@ -3289,95 +3294,95 @@ function useClient() {
|
|
|
3289
3294
|
if ("production" !== process.env.NODE_ENV && !getCurrentInstance()) {
|
|
3290
3295
|
throw new Error("use* functions may only be called during the `setup()` or other lifecycle hooks.");
|
|
3291
3296
|
}
|
|
3292
|
-
var
|
|
3293
|
-
if ("production" !== process.env.NODE_ENV && !
|
|
3297
|
+
var e3 = inject("$urql");
|
|
3298
|
+
if ("production" !== process.env.NODE_ENV && !e3) {
|
|
3294
3299
|
throw new Error("No urql Client was provided. Did you forget to install the plugin or call `provideClient` in a parent?");
|
|
3295
3300
|
}
|
|
3296
|
-
return
|
|
3301
|
+
return e3;
|
|
3297
3302
|
}
|
|
3298
|
-
function unwrapPossibleProxy(
|
|
3299
|
-
return
|
|
3303
|
+
function unwrapPossibleProxy(e3) {
|
|
3304
|
+
return e3 && isRef(e3) ? e3.value : e3;
|
|
3300
3305
|
}
|
|
3301
3306
|
var b = {
|
|
3302
3307
|
flush: "pre"
|
|
3303
3308
|
};
|
|
3304
|
-
function callUseQuery(
|
|
3305
|
-
var n = reactive(
|
|
3309
|
+
function callUseQuery(e3, l2 = useClient(), t3 = []) {
|
|
3310
|
+
var n = reactive(e3);
|
|
3306
3311
|
var o2 = ref();
|
|
3307
3312
|
var v2 = ref(false);
|
|
3308
3313
|
var f2 = ref(false);
|
|
3309
|
-
var
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
3314
|
+
var y3 = ref();
|
|
3315
|
+
var d4 = ref();
|
|
3316
|
+
var h4 = ref();
|
|
3317
|
+
var x2 = isRef(e3.pause) ? e3.pause : ref(!!e3.pause);
|
|
3318
|
+
var w2 = ref(createRequest(n.query, unwrapPossibleProxy(n.variables)));
|
|
3314
3319
|
var P = ref();
|
|
3315
|
-
|
|
3316
|
-
var
|
|
3317
|
-
if (
|
|
3318
|
-
|
|
3320
|
+
t3.push(watchEffect(() => {
|
|
3321
|
+
var e4 = createRequest(n.query, unwrapPossibleProxy(n.variables));
|
|
3322
|
+
if (w2.value.key !== e4.key) {
|
|
3323
|
+
w2.value = e4;
|
|
3319
3324
|
}
|
|
3320
3325
|
}, b));
|
|
3321
|
-
|
|
3322
|
-
P.value = !
|
|
3326
|
+
t3.push(watchEffect(() => {
|
|
3327
|
+
P.value = !x2.value ? l2.value.executeQuery(w2.value, {
|
|
3323
3328
|
requestPolicy: n.requestPolicy,
|
|
3324
3329
|
...n.context
|
|
3325
3330
|
}) : void 0;
|
|
3326
3331
|
}, b));
|
|
3327
|
-
var
|
|
3332
|
+
var q2 = {
|
|
3328
3333
|
data: o2,
|
|
3329
3334
|
stale: v2,
|
|
3330
|
-
error:
|
|
3331
|
-
operation:
|
|
3332
|
-
extensions:
|
|
3335
|
+
error: y3,
|
|
3336
|
+
operation: d4,
|
|
3337
|
+
extensions: h4,
|
|
3333
3338
|
fetching: f2,
|
|
3334
|
-
isPaused:
|
|
3335
|
-
executeQuery(
|
|
3336
|
-
var
|
|
3339
|
+
isPaused: x2,
|
|
3340
|
+
executeQuery(e4) {
|
|
3341
|
+
var u2 = P.value = l2.value.executeQuery(w2.value, {
|
|
3337
3342
|
requestPolicy: n.requestPolicy,
|
|
3338
3343
|
...n.context,
|
|
3339
|
-
...
|
|
3344
|
+
...e4
|
|
3340
3345
|
});
|
|
3341
3346
|
return {
|
|
3342
|
-
...
|
|
3343
|
-
then(
|
|
3344
|
-
var
|
|
3345
|
-
return new Promise((
|
|
3347
|
+
...E2,
|
|
3348
|
+
then(e5, r2) {
|
|
3349
|
+
var a3;
|
|
3350
|
+
return new Promise((e6) => {
|
|
3346
3351
|
var r3 = false;
|
|
3347
|
-
|
|
3348
|
-
if (!
|
|
3349
|
-
if (
|
|
3350
|
-
|
|
3352
|
+
a3 = subscribe(() => {
|
|
3353
|
+
if (!q2.fetching.value && !q2.stale.value) {
|
|
3354
|
+
if (a3) {
|
|
3355
|
+
a3.unsubscribe();
|
|
3351
3356
|
}
|
|
3352
3357
|
r3 = true;
|
|
3353
|
-
|
|
3358
|
+
e6(q2);
|
|
3354
3359
|
}
|
|
3355
|
-
})(
|
|
3360
|
+
})(u2);
|
|
3356
3361
|
if (r3) {
|
|
3357
|
-
|
|
3362
|
+
a3.unsubscribe();
|
|
3358
3363
|
}
|
|
3359
|
-
}).then(
|
|
3364
|
+
}).then(e5, r2);
|
|
3360
3365
|
}
|
|
3361
3366
|
};
|
|
3362
3367
|
},
|
|
3363
3368
|
pause() {
|
|
3364
|
-
|
|
3369
|
+
x2.value = true;
|
|
3365
3370
|
},
|
|
3366
3371
|
resume() {
|
|
3367
|
-
|
|
3372
|
+
x2.value = false;
|
|
3368
3373
|
}
|
|
3369
3374
|
};
|
|
3370
|
-
|
|
3375
|
+
t3.push(watchEffect((e4) => {
|
|
3371
3376
|
if (P.value) {
|
|
3372
3377
|
f2.value = true;
|
|
3373
3378
|
v2.value = false;
|
|
3374
|
-
|
|
3375
|
-
o2.value =
|
|
3376
|
-
v2.value = !!
|
|
3379
|
+
e4(subscribe((e5) => {
|
|
3380
|
+
o2.value = e5.data;
|
|
3381
|
+
v2.value = !!e5.stale;
|
|
3377
3382
|
f2.value = false;
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3383
|
+
y3.value = e5.error;
|
|
3384
|
+
d4.value = e5.operation;
|
|
3385
|
+
h4.value = e5.extensions;
|
|
3381
3386
|
})(onEnd(() => {
|
|
3382
3387
|
f2.value = false;
|
|
3383
3388
|
v2.value = false;
|
|
@@ -3389,56 +3394,56 @@ function callUseQuery(e2, l2 = useClient(), t2 = []) {
|
|
|
3389
3394
|
}, {
|
|
3390
3395
|
flush: "sync"
|
|
3391
3396
|
}));
|
|
3392
|
-
var
|
|
3393
|
-
...
|
|
3394
|
-
then(
|
|
3397
|
+
var E2 = {
|
|
3398
|
+
...q2,
|
|
3399
|
+
then(e4, u2) {
|
|
3395
3400
|
var r2;
|
|
3396
|
-
return new Promise((
|
|
3401
|
+
return new Promise((e5) => {
|
|
3397
3402
|
if (!P.value) {
|
|
3398
|
-
return
|
|
3403
|
+
return e5(q2);
|
|
3399
3404
|
}
|
|
3400
|
-
var
|
|
3405
|
+
var u3 = false;
|
|
3401
3406
|
r2 = subscribe(() => {
|
|
3402
|
-
if (!
|
|
3407
|
+
if (!q2.fetching.value && !q2.stale.value) {
|
|
3403
3408
|
if (r2) {
|
|
3404
3409
|
r2.unsubscribe();
|
|
3405
3410
|
}
|
|
3406
|
-
|
|
3407
|
-
|
|
3411
|
+
u3 = true;
|
|
3412
|
+
e5(q2);
|
|
3408
3413
|
}
|
|
3409
3414
|
})(P.value);
|
|
3410
|
-
if (
|
|
3415
|
+
if (u3) {
|
|
3411
3416
|
r2.unsubscribe();
|
|
3412
3417
|
}
|
|
3413
|
-
}).then(
|
|
3418
|
+
}).then(e4, u2);
|
|
3414
3419
|
}
|
|
3415
3420
|
};
|
|
3416
|
-
return
|
|
3421
|
+
return E2;
|
|
3417
3422
|
}
|
|
3418
|
-
function callUseMutation(
|
|
3423
|
+
function callUseMutation(e3, r2 = useClient()) {
|
|
3419
3424
|
var l2 = ref();
|
|
3420
|
-
var
|
|
3425
|
+
var t3 = ref(false);
|
|
3421
3426
|
var n = ref(false);
|
|
3422
|
-
var
|
|
3423
|
-
var
|
|
3427
|
+
var s4 = ref();
|
|
3428
|
+
var i3 = ref();
|
|
3424
3429
|
var o2 = ref();
|
|
3425
3430
|
return {
|
|
3426
3431
|
data: l2,
|
|
3427
|
-
stale:
|
|
3432
|
+
stale: t3,
|
|
3428
3433
|
fetching: n,
|
|
3429
|
-
error:
|
|
3430
|
-
operation:
|
|
3434
|
+
error: s4,
|
|
3435
|
+
operation: i3,
|
|
3431
3436
|
extensions: o2,
|
|
3432
|
-
executeMutation(
|
|
3437
|
+
executeMutation(a3, v2) {
|
|
3433
3438
|
n.value = true;
|
|
3434
|
-
return toPromise(take(1)(r2.value.executeMutation(createRequest(
|
|
3435
|
-
l2.value =
|
|
3436
|
-
|
|
3439
|
+
return toPromise(take(1)(r2.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a3)), v2 || {}))).then((e4) => {
|
|
3440
|
+
l2.value = e4.data;
|
|
3441
|
+
t3.value = !!e4.stale;
|
|
3437
3442
|
n.value = false;
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
o2.value =
|
|
3441
|
-
return
|
|
3443
|
+
s4.value = e4.error;
|
|
3444
|
+
i3.value = e4.operation;
|
|
3445
|
+
o2.value = e4.extensions;
|
|
3446
|
+
return e4;
|
|
3442
3447
|
});
|
|
3443
3448
|
}
|
|
3444
3449
|
};
|
|
@@ -3446,59 +3451,59 @@ function callUseMutation(e2, r2 = useClient()) {
|
|
|
3446
3451
|
var d = {
|
|
3447
3452
|
flush: "pre"
|
|
3448
3453
|
};
|
|
3449
|
-
function callUseSubscription(
|
|
3450
|
-
var o2 = reactive(
|
|
3454
|
+
function callUseSubscription(e3, l2, t3 = useClient(), n = []) {
|
|
3455
|
+
var o2 = reactive(e3);
|
|
3451
3456
|
var v2 = ref();
|
|
3452
3457
|
var f2 = ref(false);
|
|
3453
|
-
var
|
|
3454
|
-
var
|
|
3455
|
-
var
|
|
3456
|
-
var
|
|
3457
|
-
var
|
|
3458
|
-
var P = isRef(
|
|
3459
|
-
var
|
|
3460
|
-
var
|
|
3458
|
+
var y3 = ref(false);
|
|
3459
|
+
var b3 = ref();
|
|
3460
|
+
var h4 = ref();
|
|
3461
|
+
var x2 = ref();
|
|
3462
|
+
var w2 = ref(l2);
|
|
3463
|
+
var P = isRef(e3.pause) ? e3.pause : ref(!!e3.pause);
|
|
3464
|
+
var q2 = ref(createRequest(o2.query, unwrapPossibleProxy(o2.variables)));
|
|
3465
|
+
var E2 = ref();
|
|
3461
3466
|
n.push(watchEffect(() => {
|
|
3462
|
-
var
|
|
3463
|
-
if (
|
|
3464
|
-
|
|
3467
|
+
var e4 = createRequest(o2.query, unwrapPossibleProxy(o2.variables));
|
|
3468
|
+
if (q2.value.key !== e4.key) {
|
|
3469
|
+
q2.value = e4;
|
|
3465
3470
|
}
|
|
3466
3471
|
}, d));
|
|
3467
3472
|
n.push(watchEffect(() => {
|
|
3468
|
-
|
|
3473
|
+
E2.value = !P.value ? t3.value.executeSubscription(q2.value, {
|
|
3469
3474
|
...o2.context
|
|
3470
3475
|
}) : void 0;
|
|
3471
3476
|
}, d));
|
|
3472
|
-
n.push(watchEffect((
|
|
3473
|
-
if (
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
v2.value = void 0 !==
|
|
3478
|
-
|
|
3479
|
-
f2.value = !!
|
|
3480
|
-
|
|
3477
|
+
n.push(watchEffect((e4) => {
|
|
3478
|
+
if (E2.value) {
|
|
3479
|
+
y3.value = true;
|
|
3480
|
+
e4(subscribe((e5) => {
|
|
3481
|
+
y3.value = true;
|
|
3482
|
+
v2.value = void 0 !== e5.data ? "function" == typeof w2.value ? w2.value(v2.value, e5.data) : e5.data : e5.data, b3.value = e5.error;
|
|
3483
|
+
x2.value = e5.extensions;
|
|
3484
|
+
f2.value = !!e5.stale;
|
|
3485
|
+
h4.value = e5.operation;
|
|
3481
3486
|
})(onEnd(() => {
|
|
3482
|
-
|
|
3483
|
-
})(
|
|
3487
|
+
y3.value = false;
|
|
3488
|
+
})(E2.value)).unsubscribe);
|
|
3484
3489
|
} else {
|
|
3485
|
-
|
|
3490
|
+
y3.value = false;
|
|
3486
3491
|
}
|
|
3487
3492
|
}, d));
|
|
3488
|
-
var
|
|
3493
|
+
var m3 = {
|
|
3489
3494
|
data: v2,
|
|
3490
3495
|
stale: f2,
|
|
3491
|
-
error:
|
|
3492
|
-
operation:
|
|
3493
|
-
extensions:
|
|
3494
|
-
fetching:
|
|
3496
|
+
error: b3,
|
|
3497
|
+
operation: h4,
|
|
3498
|
+
extensions: x2,
|
|
3499
|
+
fetching: y3,
|
|
3495
3500
|
isPaused: P,
|
|
3496
|
-
executeSubscription(
|
|
3497
|
-
|
|
3501
|
+
executeSubscription(e4) {
|
|
3502
|
+
E2.value = t3.value.executeSubscription(q2.value, {
|
|
3498
3503
|
...o2.context,
|
|
3499
|
-
...
|
|
3504
|
+
...e4
|
|
3500
3505
|
});
|
|
3501
|
-
return
|
|
3506
|
+
return m3;
|
|
3502
3507
|
},
|
|
3503
3508
|
pause() {
|
|
3504
3509
|
P.value = true;
|
|
@@ -3507,22 +3512,22 @@ function callUseSubscription(e2, l2, t2 = useClient(), n = []) {
|
|
|
3507
3512
|
P.value = false;
|
|
3508
3513
|
}
|
|
3509
3514
|
};
|
|
3510
|
-
return
|
|
3515
|
+
return m3;
|
|
3511
3516
|
}
|
|
3512
3517
|
function useClientHandle() {
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3518
|
+
var e3 = useClient();
|
|
3519
|
+
var u2 = [];
|
|
3515
3520
|
onBeforeUnmount(() => {
|
|
3516
|
-
var
|
|
3517
|
-
while (
|
|
3518
|
-
|
|
3521
|
+
var e4;
|
|
3522
|
+
while (e4 = u2.shift()) {
|
|
3523
|
+
e4();
|
|
3519
3524
|
}
|
|
3520
3525
|
});
|
|
3521
3526
|
var r2 = {
|
|
3522
|
-
client:
|
|
3523
|
-
useQuery: (r3) => callUseQuery(r3,
|
|
3524
|
-
useSubscription: (r3,
|
|
3525
|
-
useMutation: (
|
|
3527
|
+
client: e3.value,
|
|
3528
|
+
useQuery: (r3) => callUseQuery(r3, e3, u2),
|
|
3529
|
+
useSubscription: (r3, a3) => callUseSubscription(r3, a3, e3, u2),
|
|
3530
|
+
useMutation: (u3) => callUseMutation(u3, e3)
|
|
3526
3531
|
};
|
|
3527
3532
|
if ("production" !== process.env.NODE_ENV) {
|
|
3528
3533
|
onMounted(() => {
|
|
@@ -3531,13 +3536,13 @@ function useClientHandle() {
|
|
|
3531
3536
|
if ("production" !== process.env.NODE_ENV && !getCurrentInstance()) {
|
|
3532
3537
|
throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3533
3538
|
}
|
|
3534
|
-
return callUseQuery(r3,
|
|
3539
|
+
return callUseQuery(r3, e3, u2);
|
|
3535
3540
|
},
|
|
3536
|
-
useSubscription(r3,
|
|
3541
|
+
useSubscription(r3, a3) {
|
|
3537
3542
|
if ("production" !== process.env.NODE_ENV && !getCurrentInstance()) {
|
|
3538
3543
|
throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3539
3544
|
}
|
|
3540
|
-
return callUseSubscription(r3,
|
|
3545
|
+
return callUseSubscription(r3, a3, e3, u2);
|
|
3541
3546
|
}
|
|
3542
3547
|
});
|
|
3543
3548
|
});
|
|
@@ -3559,23 +3564,23 @@ function requiredArgs(required, args) {
|
|
|
3559
3564
|
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
3560
3565
|
}
|
|
3561
3566
|
}
|
|
3562
|
-
function _typeof(obj) {
|
|
3567
|
+
function _typeof$1(obj) {
|
|
3563
3568
|
"@babel/helpers - typeof";
|
|
3564
3569
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3565
|
-
_typeof = function _typeof2(obj2) {
|
|
3570
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
3566
3571
|
return typeof obj2;
|
|
3567
3572
|
};
|
|
3568
3573
|
} else {
|
|
3569
|
-
_typeof = function _typeof2(obj2) {
|
|
3574
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
3570
3575
|
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3571
3576
|
};
|
|
3572
3577
|
}
|
|
3573
|
-
return _typeof(obj);
|
|
3578
|
+
return _typeof$1(obj);
|
|
3574
3579
|
}
|
|
3575
3580
|
function toDate(argument) {
|
|
3576
3581
|
requiredArgs(1, arguments);
|
|
3577
3582
|
var argStr = Object.prototype.toString.call(argument);
|
|
3578
|
-
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
3583
|
+
if (argument instanceof Date || _typeof$1(argument) === "object" && argStr === "[object Date]") {
|
|
3579
3584
|
return new Date(argument.getTime());
|
|
3580
3585
|
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
3581
3586
|
return new Date(argument);
|
|
@@ -3600,12 +3605,52 @@ function addDays(dirtyDate, dirtyAmount) {
|
|
|
3600
3605
|
date.setDate(date.getDate() + amount);
|
|
3601
3606
|
return date;
|
|
3602
3607
|
}
|
|
3608
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
3609
|
+
requiredArgs(2, arguments);
|
|
3610
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
3611
|
+
var amount = toInteger(dirtyAmount);
|
|
3612
|
+
return new Date(timestamp + amount);
|
|
3613
|
+
}
|
|
3614
|
+
var defaultOptions = {};
|
|
3615
|
+
function getDefaultOptions() {
|
|
3616
|
+
return defaultOptions;
|
|
3617
|
+
}
|
|
3618
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
3619
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
3620
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
3621
|
+
return date.getTime() - utcDate.getTime();
|
|
3622
|
+
}
|
|
3603
3623
|
function startOfDay(dirtyDate) {
|
|
3604
3624
|
requiredArgs(1, arguments);
|
|
3605
3625
|
var date = toDate(dirtyDate);
|
|
3606
3626
|
date.setHours(0, 0, 0, 0);
|
|
3607
3627
|
return date;
|
|
3608
3628
|
}
|
|
3629
|
+
function _typeof(obj) {
|
|
3630
|
+
"@babel/helpers - typeof";
|
|
3631
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3632
|
+
_typeof = function _typeof2(obj2) {
|
|
3633
|
+
return typeof obj2;
|
|
3634
|
+
};
|
|
3635
|
+
} else {
|
|
3636
|
+
_typeof = function _typeof2(obj2) {
|
|
3637
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3638
|
+
};
|
|
3639
|
+
}
|
|
3640
|
+
return _typeof(obj);
|
|
3641
|
+
}
|
|
3642
|
+
function isDate(value) {
|
|
3643
|
+
requiredArgs(1, arguments);
|
|
3644
|
+
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
3645
|
+
}
|
|
3646
|
+
function isValid(dirtyDate) {
|
|
3647
|
+
requiredArgs(1, arguments);
|
|
3648
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
3649
|
+
return false;
|
|
3650
|
+
}
|
|
3651
|
+
var date = toDate(dirtyDate);
|
|
3652
|
+
return !isNaN(Number(date));
|
|
3653
|
+
}
|
|
3609
3654
|
function endOfDay(dirtyDate) {
|
|
3610
3655
|
requiredArgs(1, arguments);
|
|
3611
3656
|
var date = toDate(dirtyDate);
|
|
@@ -3615,229 +3660,2073 @@ function endOfDay(dirtyDate) {
|
|
|
3615
3660
|
function endOfToday() {
|
|
3616
3661
|
return endOfDay(Date.now());
|
|
3617
3662
|
}
|
|
3618
|
-
function
|
|
3619
|
-
|
|
3663
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
3664
|
+
requiredArgs(2, arguments);
|
|
3665
|
+
var amount = toInteger(dirtyAmount);
|
|
3666
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
3620
3667
|
}
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
this.qrKey = qrKey;
|
|
3661
|
-
this.type = type;
|
|
3662
|
-
const resp = await client.mutation(GraphUtil.executeOne(models.CheckInModel, {}), {
|
|
3663
|
-
action: "presence",
|
|
3664
|
-
input: {
|
|
3665
|
-
staffId,
|
|
3666
|
-
qrKey: this.qrKey || null,
|
|
3667
|
-
type: this.type
|
|
3668
|
-
}
|
|
3669
|
-
}).toPromise();
|
|
3670
|
-
const data = resp.data.executeCheckIn.output;
|
|
3671
|
-
if (data) {
|
|
3672
|
-
this.checkInId = data || "";
|
|
3673
|
-
this.isScanning = false;
|
|
3674
|
-
this.isScanned = true;
|
|
3675
|
-
} else
|
|
3676
|
-
throw new Error("Terjadi kesalahan.");
|
|
3677
|
-
} catch (error) {
|
|
3678
|
-
console.log(error);
|
|
3679
|
-
this.isScanError = true;
|
|
3680
|
-
}
|
|
3681
|
-
}
|
|
3668
|
+
var MILLISECONDS_IN_DAY = 864e5;
|
|
3669
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
3670
|
+
requiredArgs(1, arguments);
|
|
3671
|
+
var date = toDate(dirtyDate);
|
|
3672
|
+
var timestamp = date.getTime();
|
|
3673
|
+
date.setUTCMonth(0, 1);
|
|
3674
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3675
|
+
var startOfYearTimestamp = date.getTime();
|
|
3676
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
3677
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
3678
|
+
}
|
|
3679
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
3680
|
+
requiredArgs(1, arguments);
|
|
3681
|
+
var weekStartsOn = 1;
|
|
3682
|
+
var date = toDate(dirtyDate);
|
|
3683
|
+
var day = date.getUTCDay();
|
|
3684
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3685
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
3686
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3687
|
+
return date;
|
|
3688
|
+
}
|
|
3689
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
3690
|
+
requiredArgs(1, arguments);
|
|
3691
|
+
var date = toDate(dirtyDate);
|
|
3692
|
+
var year = date.getUTCFullYear();
|
|
3693
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
3694
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
3695
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
3696
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
3697
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
3698
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
3699
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
3700
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
3701
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
3702
|
+
return year + 1;
|
|
3703
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
3704
|
+
return year;
|
|
3705
|
+
} else {
|
|
3706
|
+
return year - 1;
|
|
3682
3707
|
}
|
|
3683
|
-
});
|
|
3684
|
-
const operasional_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3685
|
-
__proto__: null
|
|
3686
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3687
|
-
function useOperasional() {
|
|
3688
|
-
const context = ComponentUtil.injectStrict(
|
|
3689
|
-
"neu:operasional:operasional"
|
|
3690
|
-
);
|
|
3691
|
-
return { ...context };
|
|
3692
3708
|
}
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3709
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
3710
|
+
requiredArgs(1, arguments);
|
|
3711
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
3712
|
+
var fourthOfJanuary = new Date(0);
|
|
3713
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
3714
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
3715
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
3716
|
+
return date;
|
|
3717
|
+
}
|
|
3718
|
+
var MILLISECONDS_IN_WEEK$1 = 6048e5;
|
|
3719
|
+
function getUTCISOWeek(dirtyDate) {
|
|
3720
|
+
requiredArgs(1, arguments);
|
|
3721
|
+
var date = toDate(dirtyDate);
|
|
3722
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
3723
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
3724
|
+
}
|
|
3725
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
3726
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3727
|
+
requiredArgs(1, arguments);
|
|
3728
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3729
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
3730
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
3731
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
3711
3732
|
}
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3733
|
+
var date = toDate(dirtyDate);
|
|
3734
|
+
var day = date.getUTCDay();
|
|
3735
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3736
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
3737
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3738
|
+
return date;
|
|
3739
|
+
}
|
|
3740
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
3741
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3742
|
+
requiredArgs(1, arguments);
|
|
3743
|
+
var date = toDate(dirtyDate);
|
|
3744
|
+
var year = date.getUTCFullYear();
|
|
3745
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3746
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
3747
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
3748
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
3749
|
+
}
|
|
3750
|
+
var firstWeekOfNextYear = new Date(0);
|
|
3751
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
3752
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
3753
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
3754
|
+
var firstWeekOfThisYear = new Date(0);
|
|
3755
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
3756
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
3757
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
3758
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
3759
|
+
return year + 1;
|
|
3760
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
3761
|
+
return year;
|
|
3762
|
+
} else {
|
|
3763
|
+
return year - 1;
|
|
3740
3764
|
}
|
|
3741
3765
|
}
|
|
3742
|
-
function
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
}), (i2 = n.get("*")) && i2.slice().map(function(n2) {
|
|
3754
|
-
n2(t2, e2);
|
|
3755
|
-
});
|
|
3756
|
-
} };
|
|
3766
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
3767
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3768
|
+
requiredArgs(1, arguments);
|
|
3769
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3770
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
3771
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
3772
|
+
var firstWeek = new Date(0);
|
|
3773
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
3774
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
3775
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
3776
|
+
return date;
|
|
3757
3777
|
}
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
var _a;
|
|
3804
|
-
return Query.define({
|
|
3805
|
-
filter: {
|
|
3806
|
-
handle: "",
|
|
3807
|
-
operator: "mongo",
|
|
3808
|
-
value: {
|
|
3809
|
-
// staffId: staff.value?.id,
|
|
3810
|
-
// $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
|
|
3811
|
-
$and: [
|
|
3812
|
-
{ staffId: (_a = staff.value) == null ? void 0 : _a.id },
|
|
3813
|
-
{ checkInAt: { $gte: addDays(startOfToday(), 1) } },
|
|
3814
|
-
{ checkInAt: { $lte: endOfToday() } }
|
|
3815
|
-
]
|
|
3816
|
-
}
|
|
3817
|
-
}
|
|
3818
|
-
});
|
|
3819
|
-
});
|
|
3820
|
-
function onPresenceIn(data) {
|
|
3821
|
-
isAsking.value = true;
|
|
3822
|
-
type.value = "in";
|
|
3823
|
-
}
|
|
3824
|
-
function onPresenceOut(data) {
|
|
3825
|
-
isAsking.value = true;
|
|
3826
|
-
type.value = "out";
|
|
3778
|
+
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
3779
|
+
function getUTCWeek(dirtyDate, options) {
|
|
3780
|
+
requiredArgs(1, arguments);
|
|
3781
|
+
var date = toDate(dirtyDate);
|
|
3782
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
3783
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
3784
|
+
}
|
|
3785
|
+
function addLeadingZeros(number, targetLength) {
|
|
3786
|
+
var sign = number < 0 ? "-" : "";
|
|
3787
|
+
var output = Math.abs(number).toString();
|
|
3788
|
+
while (output.length < targetLength) {
|
|
3789
|
+
output = "0" + output;
|
|
3790
|
+
}
|
|
3791
|
+
return sign + output;
|
|
3792
|
+
}
|
|
3793
|
+
var formatters$2 = {
|
|
3794
|
+
// Year
|
|
3795
|
+
y: function y(date, token) {
|
|
3796
|
+
var signedYear = date.getUTCFullYear();
|
|
3797
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3798
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
3799
|
+
},
|
|
3800
|
+
// Month
|
|
3801
|
+
M: function M(date, token) {
|
|
3802
|
+
var month = date.getUTCMonth();
|
|
3803
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
3804
|
+
},
|
|
3805
|
+
// Day of the month
|
|
3806
|
+
d: function d2(date, token) {
|
|
3807
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
3808
|
+
},
|
|
3809
|
+
// AM or PM
|
|
3810
|
+
a: function a(date, token) {
|
|
3811
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
3812
|
+
switch (token) {
|
|
3813
|
+
case "a":
|
|
3814
|
+
case "aa":
|
|
3815
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
3816
|
+
case "aaa":
|
|
3817
|
+
return dayPeriodEnumValue;
|
|
3818
|
+
case "aaaaa":
|
|
3819
|
+
return dayPeriodEnumValue[0];
|
|
3820
|
+
case "aaaa":
|
|
3821
|
+
default:
|
|
3822
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
3827
3823
|
}
|
|
3828
|
-
|
|
3824
|
+
},
|
|
3825
|
+
// Hour [1-12]
|
|
3826
|
+
h: function h2(date, token) {
|
|
3827
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
3828
|
+
},
|
|
3829
|
+
// Hour [0-23]
|
|
3830
|
+
H: function H(date, token) {
|
|
3831
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
3832
|
+
},
|
|
3833
|
+
// Minute
|
|
3834
|
+
m: function m(date, token) {
|
|
3835
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
3836
|
+
},
|
|
3837
|
+
// Second
|
|
3838
|
+
s: function s2(date, token) {
|
|
3839
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
3840
|
+
},
|
|
3841
|
+
// Fraction of second
|
|
3842
|
+
S: function S(date, token) {
|
|
3843
|
+
var numberOfDigits = token.length;
|
|
3844
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
3845
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
3846
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
3847
|
+
}
|
|
3848
|
+
};
|
|
3849
|
+
const formatters$3 = formatters$2;
|
|
3850
|
+
var dayPeriodEnum = {
|
|
3851
|
+
am: "am",
|
|
3852
|
+
pm: "pm",
|
|
3853
|
+
midnight: "midnight",
|
|
3854
|
+
noon: "noon",
|
|
3855
|
+
morning: "morning",
|
|
3856
|
+
afternoon: "afternoon",
|
|
3857
|
+
evening: "evening",
|
|
3858
|
+
night: "night"
|
|
3859
|
+
};
|
|
3860
|
+
var formatters = {
|
|
3861
|
+
// Era
|
|
3862
|
+
G: function G(date, token, localize2) {
|
|
3863
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
3864
|
+
switch (token) {
|
|
3865
|
+
case "G":
|
|
3866
|
+
case "GG":
|
|
3867
|
+
case "GGG":
|
|
3868
|
+
return localize2.era(era, {
|
|
3869
|
+
width: "abbreviated"
|
|
3870
|
+
});
|
|
3871
|
+
case "GGGGG":
|
|
3872
|
+
return localize2.era(era, {
|
|
3873
|
+
width: "narrow"
|
|
3874
|
+
});
|
|
3875
|
+
case "GGGG":
|
|
3876
|
+
default:
|
|
3877
|
+
return localize2.era(era, {
|
|
3878
|
+
width: "wide"
|
|
3879
|
+
});
|
|
3880
|
+
}
|
|
3881
|
+
},
|
|
3882
|
+
// Year
|
|
3883
|
+
y: function y2(date, token, localize2) {
|
|
3884
|
+
if (token === "yo") {
|
|
3885
|
+
var signedYear = date.getUTCFullYear();
|
|
3886
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3887
|
+
return localize2.ordinalNumber(year, {
|
|
3888
|
+
unit: "year"
|
|
3889
|
+
});
|
|
3890
|
+
}
|
|
3891
|
+
return formatters$3.y(date, token);
|
|
3892
|
+
},
|
|
3893
|
+
// Local week-numbering year
|
|
3894
|
+
Y: function Y(date, token, localize2, options) {
|
|
3895
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
3896
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
3897
|
+
if (token === "YY") {
|
|
3898
|
+
var twoDigitYear = weekYear % 100;
|
|
3899
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
3900
|
+
}
|
|
3901
|
+
if (token === "Yo") {
|
|
3902
|
+
return localize2.ordinalNumber(weekYear, {
|
|
3903
|
+
unit: "year"
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
return addLeadingZeros(weekYear, token.length);
|
|
3907
|
+
},
|
|
3908
|
+
// ISO week-numbering year
|
|
3909
|
+
R: function R(date, token) {
|
|
3910
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
3911
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
3912
|
+
},
|
|
3913
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
3914
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
3915
|
+
// | Year | `y` | `u` |
|
|
3916
|
+
// |------|-----|-----|
|
|
3917
|
+
// | AC 1 | 1 | 1 |
|
|
3918
|
+
// | BC 1 | 1 | 0 |
|
|
3919
|
+
// | BC 2 | 2 | -1 |
|
|
3920
|
+
// Also `yy` always returns the last two digits of a year,
|
|
3921
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
3922
|
+
u: function u(date, token) {
|
|
3923
|
+
var year = date.getUTCFullYear();
|
|
3924
|
+
return addLeadingZeros(year, token.length);
|
|
3925
|
+
},
|
|
3926
|
+
// Quarter
|
|
3927
|
+
Q: function Q(date, token, localize2) {
|
|
3928
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
3929
|
+
switch (token) {
|
|
3930
|
+
case "Q":
|
|
3931
|
+
return String(quarter);
|
|
3932
|
+
case "QQ":
|
|
3933
|
+
return addLeadingZeros(quarter, 2);
|
|
3934
|
+
case "Qo":
|
|
3935
|
+
return localize2.ordinalNumber(quarter, {
|
|
3936
|
+
unit: "quarter"
|
|
3937
|
+
});
|
|
3938
|
+
case "QQQ":
|
|
3939
|
+
return localize2.quarter(quarter, {
|
|
3940
|
+
width: "abbreviated",
|
|
3941
|
+
context: "formatting"
|
|
3942
|
+
});
|
|
3943
|
+
case "QQQQQ":
|
|
3944
|
+
return localize2.quarter(quarter, {
|
|
3945
|
+
width: "narrow",
|
|
3946
|
+
context: "formatting"
|
|
3947
|
+
});
|
|
3948
|
+
case "QQQQ":
|
|
3949
|
+
default:
|
|
3950
|
+
return localize2.quarter(quarter, {
|
|
3951
|
+
width: "wide",
|
|
3952
|
+
context: "formatting"
|
|
3953
|
+
});
|
|
3954
|
+
}
|
|
3955
|
+
},
|
|
3956
|
+
// Stand-alone quarter
|
|
3957
|
+
q: function q(date, token, localize2) {
|
|
3958
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
3959
|
+
switch (token) {
|
|
3960
|
+
case "q":
|
|
3961
|
+
return String(quarter);
|
|
3962
|
+
case "qq":
|
|
3963
|
+
return addLeadingZeros(quarter, 2);
|
|
3964
|
+
case "qo":
|
|
3965
|
+
return localize2.ordinalNumber(quarter, {
|
|
3966
|
+
unit: "quarter"
|
|
3967
|
+
});
|
|
3968
|
+
case "qqq":
|
|
3969
|
+
return localize2.quarter(quarter, {
|
|
3970
|
+
width: "abbreviated",
|
|
3971
|
+
context: "standalone"
|
|
3972
|
+
});
|
|
3973
|
+
case "qqqqq":
|
|
3974
|
+
return localize2.quarter(quarter, {
|
|
3975
|
+
width: "narrow",
|
|
3976
|
+
context: "standalone"
|
|
3977
|
+
});
|
|
3978
|
+
case "qqqq":
|
|
3979
|
+
default:
|
|
3980
|
+
return localize2.quarter(quarter, {
|
|
3981
|
+
width: "wide",
|
|
3982
|
+
context: "standalone"
|
|
3983
|
+
});
|
|
3984
|
+
}
|
|
3985
|
+
},
|
|
3986
|
+
// Month
|
|
3987
|
+
M: function M2(date, token, localize2) {
|
|
3988
|
+
var month = date.getUTCMonth();
|
|
3989
|
+
switch (token) {
|
|
3990
|
+
case "M":
|
|
3991
|
+
case "MM":
|
|
3992
|
+
return formatters$3.M(date, token);
|
|
3993
|
+
case "Mo":
|
|
3994
|
+
return localize2.ordinalNumber(month + 1, {
|
|
3995
|
+
unit: "month"
|
|
3996
|
+
});
|
|
3997
|
+
case "MMM":
|
|
3998
|
+
return localize2.month(month, {
|
|
3999
|
+
width: "abbreviated",
|
|
4000
|
+
context: "formatting"
|
|
4001
|
+
});
|
|
4002
|
+
case "MMMMM":
|
|
4003
|
+
return localize2.month(month, {
|
|
4004
|
+
width: "narrow",
|
|
4005
|
+
context: "formatting"
|
|
4006
|
+
});
|
|
4007
|
+
case "MMMM":
|
|
4008
|
+
default:
|
|
4009
|
+
return localize2.month(month, {
|
|
4010
|
+
width: "wide",
|
|
4011
|
+
context: "formatting"
|
|
4012
|
+
});
|
|
4013
|
+
}
|
|
4014
|
+
},
|
|
4015
|
+
// Stand-alone month
|
|
4016
|
+
L: function L(date, token, localize2) {
|
|
4017
|
+
var month = date.getUTCMonth();
|
|
4018
|
+
switch (token) {
|
|
4019
|
+
case "L":
|
|
4020
|
+
return String(month + 1);
|
|
4021
|
+
case "LL":
|
|
4022
|
+
return addLeadingZeros(month + 1, 2);
|
|
4023
|
+
case "Lo":
|
|
4024
|
+
return localize2.ordinalNumber(month + 1, {
|
|
4025
|
+
unit: "month"
|
|
4026
|
+
});
|
|
4027
|
+
case "LLL":
|
|
4028
|
+
return localize2.month(month, {
|
|
4029
|
+
width: "abbreviated",
|
|
4030
|
+
context: "standalone"
|
|
4031
|
+
});
|
|
4032
|
+
case "LLLLL":
|
|
4033
|
+
return localize2.month(month, {
|
|
4034
|
+
width: "narrow",
|
|
4035
|
+
context: "standalone"
|
|
4036
|
+
});
|
|
4037
|
+
case "LLLL":
|
|
4038
|
+
default:
|
|
4039
|
+
return localize2.month(month, {
|
|
4040
|
+
width: "wide",
|
|
4041
|
+
context: "standalone"
|
|
4042
|
+
});
|
|
4043
|
+
}
|
|
4044
|
+
},
|
|
4045
|
+
// Local week of year
|
|
4046
|
+
w: function w(date, token, localize2, options) {
|
|
4047
|
+
var week = getUTCWeek(date, options);
|
|
4048
|
+
if (token === "wo") {
|
|
4049
|
+
return localize2.ordinalNumber(week, {
|
|
4050
|
+
unit: "week"
|
|
4051
|
+
});
|
|
4052
|
+
}
|
|
4053
|
+
return addLeadingZeros(week, token.length);
|
|
4054
|
+
},
|
|
4055
|
+
// ISO week of year
|
|
4056
|
+
I: function I(date, token, localize2) {
|
|
4057
|
+
var isoWeek = getUTCISOWeek(date);
|
|
4058
|
+
if (token === "Io") {
|
|
4059
|
+
return localize2.ordinalNumber(isoWeek, {
|
|
4060
|
+
unit: "week"
|
|
4061
|
+
});
|
|
4062
|
+
}
|
|
4063
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
4064
|
+
},
|
|
4065
|
+
// Day of the month
|
|
4066
|
+
d: function d3(date, token, localize2) {
|
|
4067
|
+
if (token === "do") {
|
|
4068
|
+
return localize2.ordinalNumber(date.getUTCDate(), {
|
|
4069
|
+
unit: "date"
|
|
4070
|
+
});
|
|
4071
|
+
}
|
|
4072
|
+
return formatters$3.d(date, token);
|
|
4073
|
+
},
|
|
4074
|
+
// Day of year
|
|
4075
|
+
D: function D(date, token, localize2) {
|
|
4076
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
4077
|
+
if (token === "Do") {
|
|
4078
|
+
return localize2.ordinalNumber(dayOfYear, {
|
|
4079
|
+
unit: "dayOfYear"
|
|
4080
|
+
});
|
|
4081
|
+
}
|
|
4082
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
4083
|
+
},
|
|
4084
|
+
// Day of week
|
|
4085
|
+
E: function E(date, token, localize2) {
|
|
4086
|
+
var dayOfWeek = date.getUTCDay();
|
|
4087
|
+
switch (token) {
|
|
4088
|
+
case "E":
|
|
4089
|
+
case "EE":
|
|
4090
|
+
case "EEE":
|
|
4091
|
+
return localize2.day(dayOfWeek, {
|
|
4092
|
+
width: "abbreviated",
|
|
4093
|
+
context: "formatting"
|
|
4094
|
+
});
|
|
4095
|
+
case "EEEEE":
|
|
4096
|
+
return localize2.day(dayOfWeek, {
|
|
4097
|
+
width: "narrow",
|
|
4098
|
+
context: "formatting"
|
|
4099
|
+
});
|
|
4100
|
+
case "EEEEEE":
|
|
4101
|
+
return localize2.day(dayOfWeek, {
|
|
4102
|
+
width: "short",
|
|
4103
|
+
context: "formatting"
|
|
4104
|
+
});
|
|
4105
|
+
case "EEEE":
|
|
4106
|
+
default:
|
|
4107
|
+
return localize2.day(dayOfWeek, {
|
|
4108
|
+
width: "wide",
|
|
4109
|
+
context: "formatting"
|
|
4110
|
+
});
|
|
4111
|
+
}
|
|
4112
|
+
},
|
|
4113
|
+
// Local day of week
|
|
4114
|
+
e: function e(date, token, localize2, options) {
|
|
4115
|
+
var dayOfWeek = date.getUTCDay();
|
|
4116
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4117
|
+
switch (token) {
|
|
4118
|
+
case "e":
|
|
4119
|
+
return String(localDayOfWeek);
|
|
4120
|
+
case "ee":
|
|
4121
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
4122
|
+
case "eo":
|
|
4123
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
|
4124
|
+
unit: "day"
|
|
4125
|
+
});
|
|
4126
|
+
case "eee":
|
|
4127
|
+
return localize2.day(dayOfWeek, {
|
|
4128
|
+
width: "abbreviated",
|
|
4129
|
+
context: "formatting"
|
|
4130
|
+
});
|
|
4131
|
+
case "eeeee":
|
|
4132
|
+
return localize2.day(dayOfWeek, {
|
|
4133
|
+
width: "narrow",
|
|
4134
|
+
context: "formatting"
|
|
4135
|
+
});
|
|
4136
|
+
case "eeeeee":
|
|
4137
|
+
return localize2.day(dayOfWeek, {
|
|
4138
|
+
width: "short",
|
|
4139
|
+
context: "formatting"
|
|
4140
|
+
});
|
|
4141
|
+
case "eeee":
|
|
4142
|
+
default:
|
|
4143
|
+
return localize2.day(dayOfWeek, {
|
|
4144
|
+
width: "wide",
|
|
4145
|
+
context: "formatting"
|
|
4146
|
+
});
|
|
4147
|
+
}
|
|
4148
|
+
},
|
|
4149
|
+
// Stand-alone local day of week
|
|
4150
|
+
c: function c(date, token, localize2, options) {
|
|
4151
|
+
var dayOfWeek = date.getUTCDay();
|
|
4152
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4153
|
+
switch (token) {
|
|
4154
|
+
case "c":
|
|
4155
|
+
return String(localDayOfWeek);
|
|
4156
|
+
case "cc":
|
|
4157
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
4158
|
+
case "co":
|
|
4159
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
|
4160
|
+
unit: "day"
|
|
4161
|
+
});
|
|
4162
|
+
case "ccc":
|
|
4163
|
+
return localize2.day(dayOfWeek, {
|
|
4164
|
+
width: "abbreviated",
|
|
4165
|
+
context: "standalone"
|
|
4166
|
+
});
|
|
4167
|
+
case "ccccc":
|
|
4168
|
+
return localize2.day(dayOfWeek, {
|
|
4169
|
+
width: "narrow",
|
|
4170
|
+
context: "standalone"
|
|
4171
|
+
});
|
|
4172
|
+
case "cccccc":
|
|
4173
|
+
return localize2.day(dayOfWeek, {
|
|
4174
|
+
width: "short",
|
|
4175
|
+
context: "standalone"
|
|
4176
|
+
});
|
|
4177
|
+
case "cccc":
|
|
4178
|
+
default:
|
|
4179
|
+
return localize2.day(dayOfWeek, {
|
|
4180
|
+
width: "wide",
|
|
4181
|
+
context: "standalone"
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
},
|
|
4185
|
+
// ISO day of week
|
|
4186
|
+
i: function i2(date, token, localize2) {
|
|
4187
|
+
var dayOfWeek = date.getUTCDay();
|
|
4188
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
4189
|
+
switch (token) {
|
|
4190
|
+
case "i":
|
|
4191
|
+
return String(isoDayOfWeek);
|
|
4192
|
+
case "ii":
|
|
4193
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
4194
|
+
case "io":
|
|
4195
|
+
return localize2.ordinalNumber(isoDayOfWeek, {
|
|
4196
|
+
unit: "day"
|
|
4197
|
+
});
|
|
4198
|
+
case "iii":
|
|
4199
|
+
return localize2.day(dayOfWeek, {
|
|
4200
|
+
width: "abbreviated",
|
|
4201
|
+
context: "formatting"
|
|
4202
|
+
});
|
|
4203
|
+
case "iiiii":
|
|
4204
|
+
return localize2.day(dayOfWeek, {
|
|
4205
|
+
width: "narrow",
|
|
4206
|
+
context: "formatting"
|
|
4207
|
+
});
|
|
4208
|
+
case "iiiiii":
|
|
4209
|
+
return localize2.day(dayOfWeek, {
|
|
4210
|
+
width: "short",
|
|
4211
|
+
context: "formatting"
|
|
4212
|
+
});
|
|
4213
|
+
case "iiii":
|
|
4214
|
+
default:
|
|
4215
|
+
return localize2.day(dayOfWeek, {
|
|
4216
|
+
width: "wide",
|
|
4217
|
+
context: "formatting"
|
|
4218
|
+
});
|
|
4219
|
+
}
|
|
4220
|
+
},
|
|
4221
|
+
// AM or PM
|
|
4222
|
+
a: function a2(date, token, localize2) {
|
|
4223
|
+
var hours = date.getUTCHours();
|
|
4224
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4225
|
+
switch (token) {
|
|
4226
|
+
case "a":
|
|
4227
|
+
case "aa":
|
|
4228
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4229
|
+
width: "abbreviated",
|
|
4230
|
+
context: "formatting"
|
|
4231
|
+
});
|
|
4232
|
+
case "aaa":
|
|
4233
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4234
|
+
width: "abbreviated",
|
|
4235
|
+
context: "formatting"
|
|
4236
|
+
}).toLowerCase();
|
|
4237
|
+
case "aaaaa":
|
|
4238
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4239
|
+
width: "narrow",
|
|
4240
|
+
context: "formatting"
|
|
4241
|
+
});
|
|
4242
|
+
case "aaaa":
|
|
4243
|
+
default:
|
|
4244
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4245
|
+
width: "wide",
|
|
4246
|
+
context: "formatting"
|
|
4247
|
+
});
|
|
4248
|
+
}
|
|
4249
|
+
},
|
|
4250
|
+
// AM, PM, midnight, noon
|
|
4251
|
+
b: function b2(date, token, localize2) {
|
|
4252
|
+
var hours = date.getUTCHours();
|
|
4253
|
+
var dayPeriodEnumValue;
|
|
4254
|
+
if (hours === 12) {
|
|
4255
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
4256
|
+
} else if (hours === 0) {
|
|
4257
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
4258
|
+
} else {
|
|
4259
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4260
|
+
}
|
|
4261
|
+
switch (token) {
|
|
4262
|
+
case "b":
|
|
4263
|
+
case "bb":
|
|
4264
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4265
|
+
width: "abbreviated",
|
|
4266
|
+
context: "formatting"
|
|
4267
|
+
});
|
|
4268
|
+
case "bbb":
|
|
4269
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4270
|
+
width: "abbreviated",
|
|
4271
|
+
context: "formatting"
|
|
4272
|
+
}).toLowerCase();
|
|
4273
|
+
case "bbbbb":
|
|
4274
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4275
|
+
width: "narrow",
|
|
4276
|
+
context: "formatting"
|
|
4277
|
+
});
|
|
4278
|
+
case "bbbb":
|
|
4279
|
+
default:
|
|
4280
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4281
|
+
width: "wide",
|
|
4282
|
+
context: "formatting"
|
|
4283
|
+
});
|
|
4284
|
+
}
|
|
4285
|
+
},
|
|
4286
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
4287
|
+
B: function B(date, token, localize2) {
|
|
4288
|
+
var hours = date.getUTCHours();
|
|
4289
|
+
var dayPeriodEnumValue;
|
|
4290
|
+
if (hours >= 17) {
|
|
4291
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
4292
|
+
} else if (hours >= 12) {
|
|
4293
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
4294
|
+
} else if (hours >= 4) {
|
|
4295
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
4296
|
+
} else {
|
|
4297
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
4298
|
+
}
|
|
4299
|
+
switch (token) {
|
|
4300
|
+
case "B":
|
|
4301
|
+
case "BB":
|
|
4302
|
+
case "BBB":
|
|
4303
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4304
|
+
width: "abbreviated",
|
|
4305
|
+
context: "formatting"
|
|
4306
|
+
});
|
|
4307
|
+
case "BBBBB":
|
|
4308
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4309
|
+
width: "narrow",
|
|
4310
|
+
context: "formatting"
|
|
4311
|
+
});
|
|
4312
|
+
case "BBBB":
|
|
4313
|
+
default:
|
|
4314
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4315
|
+
width: "wide",
|
|
4316
|
+
context: "formatting"
|
|
4317
|
+
});
|
|
4318
|
+
}
|
|
4319
|
+
},
|
|
4320
|
+
// Hour [1-12]
|
|
4321
|
+
h: function h3(date, token, localize2) {
|
|
4322
|
+
if (token === "ho") {
|
|
4323
|
+
var hours = date.getUTCHours() % 12;
|
|
4324
|
+
if (hours === 0)
|
|
4325
|
+
hours = 12;
|
|
4326
|
+
return localize2.ordinalNumber(hours, {
|
|
4327
|
+
unit: "hour"
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4330
|
+
return formatters$3.h(date, token);
|
|
4331
|
+
},
|
|
4332
|
+
// Hour [0-23]
|
|
4333
|
+
H: function H2(date, token, localize2) {
|
|
4334
|
+
if (token === "Ho") {
|
|
4335
|
+
return localize2.ordinalNumber(date.getUTCHours(), {
|
|
4336
|
+
unit: "hour"
|
|
4337
|
+
});
|
|
4338
|
+
}
|
|
4339
|
+
return formatters$3.H(date, token);
|
|
4340
|
+
},
|
|
4341
|
+
// Hour [0-11]
|
|
4342
|
+
K: function K(date, token, localize2) {
|
|
4343
|
+
var hours = date.getUTCHours() % 12;
|
|
4344
|
+
if (token === "Ko") {
|
|
4345
|
+
return localize2.ordinalNumber(hours, {
|
|
4346
|
+
unit: "hour"
|
|
4347
|
+
});
|
|
4348
|
+
}
|
|
4349
|
+
return addLeadingZeros(hours, token.length);
|
|
4350
|
+
},
|
|
4351
|
+
// Hour [1-24]
|
|
4352
|
+
k: function k(date, token, localize2) {
|
|
4353
|
+
var hours = date.getUTCHours();
|
|
4354
|
+
if (hours === 0)
|
|
4355
|
+
hours = 24;
|
|
4356
|
+
if (token === "ko") {
|
|
4357
|
+
return localize2.ordinalNumber(hours, {
|
|
4358
|
+
unit: "hour"
|
|
4359
|
+
});
|
|
4360
|
+
}
|
|
4361
|
+
return addLeadingZeros(hours, token.length);
|
|
4362
|
+
},
|
|
4363
|
+
// Minute
|
|
4364
|
+
m: function m2(date, token, localize2) {
|
|
4365
|
+
if (token === "mo") {
|
|
4366
|
+
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
|
4367
|
+
unit: "minute"
|
|
4368
|
+
});
|
|
4369
|
+
}
|
|
4370
|
+
return formatters$3.m(date, token);
|
|
4371
|
+
},
|
|
4372
|
+
// Second
|
|
4373
|
+
s: function s3(date, token, localize2) {
|
|
4374
|
+
if (token === "so") {
|
|
4375
|
+
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
|
4376
|
+
unit: "second"
|
|
4377
|
+
});
|
|
4378
|
+
}
|
|
4379
|
+
return formatters$3.s(date, token);
|
|
4380
|
+
},
|
|
4381
|
+
// Fraction of second
|
|
4382
|
+
S: function S2(date, token) {
|
|
4383
|
+
return formatters$3.S(date, token);
|
|
4384
|
+
},
|
|
4385
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
4386
|
+
X: function X(date, token, _localize, options) {
|
|
4387
|
+
var originalDate = options._originalDate || date;
|
|
4388
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4389
|
+
if (timezoneOffset === 0) {
|
|
4390
|
+
return "Z";
|
|
4391
|
+
}
|
|
4392
|
+
switch (token) {
|
|
4393
|
+
case "X":
|
|
4394
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4395
|
+
case "XXXX":
|
|
4396
|
+
case "XX":
|
|
4397
|
+
return formatTimezone(timezoneOffset);
|
|
4398
|
+
case "XXXXX":
|
|
4399
|
+
case "XXX":
|
|
4400
|
+
default:
|
|
4401
|
+
return formatTimezone(timezoneOffset, ":");
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
4405
|
+
x: function x(date, token, _localize, options) {
|
|
4406
|
+
var originalDate = options._originalDate || date;
|
|
4407
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4408
|
+
switch (token) {
|
|
4409
|
+
case "x":
|
|
4410
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4411
|
+
case "xxxx":
|
|
4412
|
+
case "xx":
|
|
4413
|
+
return formatTimezone(timezoneOffset);
|
|
4414
|
+
case "xxxxx":
|
|
4415
|
+
case "xxx":
|
|
4416
|
+
default:
|
|
4417
|
+
return formatTimezone(timezoneOffset, ":");
|
|
4418
|
+
}
|
|
4419
|
+
},
|
|
4420
|
+
// Timezone (GMT)
|
|
4421
|
+
O: function O(date, token, _localize, options) {
|
|
4422
|
+
var originalDate = options._originalDate || date;
|
|
4423
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4424
|
+
switch (token) {
|
|
4425
|
+
case "O":
|
|
4426
|
+
case "OO":
|
|
4427
|
+
case "OOO":
|
|
4428
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4429
|
+
case "OOOO":
|
|
4430
|
+
default:
|
|
4431
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4432
|
+
}
|
|
4433
|
+
},
|
|
4434
|
+
// Timezone (specific non-location)
|
|
4435
|
+
z: function z(date, token, _localize, options) {
|
|
4436
|
+
var originalDate = options._originalDate || date;
|
|
4437
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4438
|
+
switch (token) {
|
|
4439
|
+
case "z":
|
|
4440
|
+
case "zz":
|
|
4441
|
+
case "zzz":
|
|
4442
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4443
|
+
case "zzzz":
|
|
4444
|
+
default:
|
|
4445
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4446
|
+
}
|
|
4447
|
+
},
|
|
4448
|
+
// Seconds timestamp
|
|
4449
|
+
t: function t2(date, token, _localize, options) {
|
|
4450
|
+
var originalDate = options._originalDate || date;
|
|
4451
|
+
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
|
4452
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4453
|
+
},
|
|
4454
|
+
// Milliseconds timestamp
|
|
4455
|
+
T: function T(date, token, _localize, options) {
|
|
4456
|
+
var originalDate = options._originalDate || date;
|
|
4457
|
+
var timestamp = originalDate.getTime();
|
|
4458
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4459
|
+
}
|
|
4460
|
+
};
|
|
4461
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
4462
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4463
|
+
var absOffset = Math.abs(offset);
|
|
4464
|
+
var hours = Math.floor(absOffset / 60);
|
|
4465
|
+
var minutes = absOffset % 60;
|
|
4466
|
+
if (minutes === 0) {
|
|
4467
|
+
return sign + String(hours);
|
|
4468
|
+
}
|
|
4469
|
+
var delimiter = dirtyDelimiter || "";
|
|
4470
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
4471
|
+
}
|
|
4472
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
4473
|
+
if (offset % 60 === 0) {
|
|
4474
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4475
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
4476
|
+
}
|
|
4477
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
4478
|
+
}
|
|
4479
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
4480
|
+
var delimiter = dirtyDelimiter || "";
|
|
4481
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4482
|
+
var absOffset = Math.abs(offset);
|
|
4483
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
4484
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
4485
|
+
return sign + hours + delimiter + minutes;
|
|
4486
|
+
}
|
|
4487
|
+
const formatters$1 = formatters;
|
|
4488
|
+
var dateLongFormatter = function dateLongFormatter2(pattern, formatLong2) {
|
|
4489
|
+
switch (pattern) {
|
|
4490
|
+
case "P":
|
|
4491
|
+
return formatLong2.date({
|
|
4492
|
+
width: "short"
|
|
4493
|
+
});
|
|
4494
|
+
case "PP":
|
|
4495
|
+
return formatLong2.date({
|
|
4496
|
+
width: "medium"
|
|
4497
|
+
});
|
|
4498
|
+
case "PPP":
|
|
4499
|
+
return formatLong2.date({
|
|
4500
|
+
width: "long"
|
|
4501
|
+
});
|
|
4502
|
+
case "PPPP":
|
|
4503
|
+
default:
|
|
4504
|
+
return formatLong2.date({
|
|
4505
|
+
width: "full"
|
|
4506
|
+
});
|
|
4507
|
+
}
|
|
4508
|
+
};
|
|
4509
|
+
var timeLongFormatter = function timeLongFormatter2(pattern, formatLong2) {
|
|
4510
|
+
switch (pattern) {
|
|
4511
|
+
case "p":
|
|
4512
|
+
return formatLong2.time({
|
|
4513
|
+
width: "short"
|
|
4514
|
+
});
|
|
4515
|
+
case "pp":
|
|
4516
|
+
return formatLong2.time({
|
|
4517
|
+
width: "medium"
|
|
4518
|
+
});
|
|
4519
|
+
case "ppp":
|
|
4520
|
+
return formatLong2.time({
|
|
4521
|
+
width: "long"
|
|
4522
|
+
});
|
|
4523
|
+
case "pppp":
|
|
4524
|
+
default:
|
|
4525
|
+
return formatLong2.time({
|
|
4526
|
+
width: "full"
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
};
|
|
4530
|
+
var dateTimeLongFormatter = function dateTimeLongFormatter2(pattern, formatLong2) {
|
|
4531
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
4532
|
+
var datePattern = matchResult[1];
|
|
4533
|
+
var timePattern = matchResult[2];
|
|
4534
|
+
if (!timePattern) {
|
|
4535
|
+
return dateLongFormatter(pattern, formatLong2);
|
|
4536
|
+
}
|
|
4537
|
+
var dateTimeFormat;
|
|
4538
|
+
switch (datePattern) {
|
|
4539
|
+
case "P":
|
|
4540
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4541
|
+
width: "short"
|
|
4542
|
+
});
|
|
4543
|
+
break;
|
|
4544
|
+
case "PP":
|
|
4545
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4546
|
+
width: "medium"
|
|
4547
|
+
});
|
|
4548
|
+
break;
|
|
4549
|
+
case "PPP":
|
|
4550
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4551
|
+
width: "long"
|
|
4552
|
+
});
|
|
4553
|
+
break;
|
|
4554
|
+
case "PPPP":
|
|
4555
|
+
default:
|
|
4556
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4557
|
+
width: "full"
|
|
4558
|
+
});
|
|
4559
|
+
break;
|
|
4560
|
+
}
|
|
4561
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
4562
|
+
};
|
|
4563
|
+
var longFormatters = {
|
|
4564
|
+
p: timeLongFormatter,
|
|
4565
|
+
P: dateTimeLongFormatter
|
|
4566
|
+
};
|
|
4567
|
+
const longFormatters$1 = longFormatters;
|
|
4568
|
+
var protectedDayOfYearTokens = ["D", "DD"];
|
|
4569
|
+
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
4570
|
+
function isProtectedDayOfYearToken(token) {
|
|
4571
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
4572
|
+
}
|
|
4573
|
+
function isProtectedWeekYearToken(token) {
|
|
4574
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
4575
|
+
}
|
|
4576
|
+
function throwProtectedError(token, format2, input) {
|
|
4577
|
+
if (token === "YYYY") {
|
|
4578
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4579
|
+
} else if (token === "YY") {
|
|
4580
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4581
|
+
} else if (token === "D") {
|
|
4582
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4583
|
+
} else if (token === "DD") {
|
|
4584
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4585
|
+
}
|
|
4586
|
+
}
|
|
4587
|
+
var formatDistanceLocale = {
|
|
4588
|
+
lessThanXSeconds: {
|
|
4589
|
+
one: "less than a second",
|
|
4590
|
+
other: "less than {{count}} seconds"
|
|
4591
|
+
},
|
|
4592
|
+
xSeconds: {
|
|
4593
|
+
one: "1 second",
|
|
4594
|
+
other: "{{count}} seconds"
|
|
4595
|
+
},
|
|
4596
|
+
halfAMinute: "half a minute",
|
|
4597
|
+
lessThanXMinutes: {
|
|
4598
|
+
one: "less than a minute",
|
|
4599
|
+
other: "less than {{count}} minutes"
|
|
4600
|
+
},
|
|
4601
|
+
xMinutes: {
|
|
4602
|
+
one: "1 minute",
|
|
4603
|
+
other: "{{count}} minutes"
|
|
4604
|
+
},
|
|
4605
|
+
aboutXHours: {
|
|
4606
|
+
one: "about 1 hour",
|
|
4607
|
+
other: "about {{count}} hours"
|
|
4608
|
+
},
|
|
4609
|
+
xHours: {
|
|
4610
|
+
one: "1 hour",
|
|
4611
|
+
other: "{{count}} hours"
|
|
4612
|
+
},
|
|
4613
|
+
xDays: {
|
|
4614
|
+
one: "1 day",
|
|
4615
|
+
other: "{{count}} days"
|
|
4616
|
+
},
|
|
4617
|
+
aboutXWeeks: {
|
|
4618
|
+
one: "about 1 week",
|
|
4619
|
+
other: "about {{count}} weeks"
|
|
4620
|
+
},
|
|
4621
|
+
xWeeks: {
|
|
4622
|
+
one: "1 week",
|
|
4623
|
+
other: "{{count}} weeks"
|
|
4624
|
+
},
|
|
4625
|
+
aboutXMonths: {
|
|
4626
|
+
one: "about 1 month",
|
|
4627
|
+
other: "about {{count}} months"
|
|
4628
|
+
},
|
|
4629
|
+
xMonths: {
|
|
4630
|
+
one: "1 month",
|
|
4631
|
+
other: "{{count}} months"
|
|
4632
|
+
},
|
|
4633
|
+
aboutXYears: {
|
|
4634
|
+
one: "about 1 year",
|
|
4635
|
+
other: "about {{count}} years"
|
|
4636
|
+
},
|
|
4637
|
+
xYears: {
|
|
4638
|
+
one: "1 year",
|
|
4639
|
+
other: "{{count}} years"
|
|
4640
|
+
},
|
|
4641
|
+
overXYears: {
|
|
4642
|
+
one: "over 1 year",
|
|
4643
|
+
other: "over {{count}} years"
|
|
4644
|
+
},
|
|
4645
|
+
almostXYears: {
|
|
4646
|
+
one: "almost 1 year",
|
|
4647
|
+
other: "almost {{count}} years"
|
|
4648
|
+
}
|
|
4649
|
+
};
|
|
4650
|
+
var formatDistance = function formatDistance2(token, count, options) {
|
|
4651
|
+
var result;
|
|
4652
|
+
var tokenValue = formatDistanceLocale[token];
|
|
4653
|
+
if (typeof tokenValue === "string") {
|
|
4654
|
+
result = tokenValue;
|
|
4655
|
+
} else if (count === 1) {
|
|
4656
|
+
result = tokenValue.one;
|
|
4657
|
+
} else {
|
|
4658
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
4659
|
+
}
|
|
4660
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
4661
|
+
if (options.comparison && options.comparison > 0) {
|
|
4662
|
+
return "in " + result;
|
|
4663
|
+
} else {
|
|
4664
|
+
return result + " ago";
|
|
4665
|
+
}
|
|
4666
|
+
}
|
|
4667
|
+
return result;
|
|
4668
|
+
};
|
|
4669
|
+
const formatDistance$1 = formatDistance;
|
|
4670
|
+
function buildFormatLongFn(args) {
|
|
4671
|
+
return function() {
|
|
4672
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4673
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
4674
|
+
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
4675
|
+
return format2;
|
|
4676
|
+
};
|
|
4677
|
+
}
|
|
4678
|
+
var dateFormats = {
|
|
4679
|
+
full: "EEEE, MMMM do, y",
|
|
4680
|
+
long: "MMMM do, y",
|
|
4681
|
+
medium: "MMM d, y",
|
|
4682
|
+
short: "MM/dd/yyyy"
|
|
4683
|
+
};
|
|
4684
|
+
var timeFormats = {
|
|
4685
|
+
full: "h:mm:ss a zzzz",
|
|
4686
|
+
long: "h:mm:ss a z",
|
|
4687
|
+
medium: "h:mm:ss a",
|
|
4688
|
+
short: "h:mm a"
|
|
4689
|
+
};
|
|
4690
|
+
var dateTimeFormats = {
|
|
4691
|
+
full: "{{date}} 'at' {{time}}",
|
|
4692
|
+
long: "{{date}} 'at' {{time}}",
|
|
4693
|
+
medium: "{{date}}, {{time}}",
|
|
4694
|
+
short: "{{date}}, {{time}}"
|
|
4695
|
+
};
|
|
4696
|
+
var formatLong = {
|
|
4697
|
+
date: buildFormatLongFn({
|
|
4698
|
+
formats: dateFormats,
|
|
4699
|
+
defaultWidth: "full"
|
|
4700
|
+
}),
|
|
4701
|
+
time: buildFormatLongFn({
|
|
4702
|
+
formats: timeFormats,
|
|
4703
|
+
defaultWidth: "full"
|
|
4704
|
+
}),
|
|
4705
|
+
dateTime: buildFormatLongFn({
|
|
4706
|
+
formats: dateTimeFormats,
|
|
4707
|
+
defaultWidth: "full"
|
|
4708
|
+
})
|
|
4709
|
+
};
|
|
4710
|
+
const formatLong$1 = formatLong;
|
|
4711
|
+
var formatRelativeLocale = {
|
|
4712
|
+
lastWeek: "'last' eeee 'at' p",
|
|
4713
|
+
yesterday: "'yesterday at' p",
|
|
4714
|
+
today: "'today at' p",
|
|
4715
|
+
tomorrow: "'tomorrow at' p",
|
|
4716
|
+
nextWeek: "eeee 'at' p",
|
|
4717
|
+
other: "P"
|
|
4718
|
+
};
|
|
4719
|
+
var formatRelative = function formatRelative2(token, _date, _baseDate, _options) {
|
|
4720
|
+
return formatRelativeLocale[token];
|
|
4721
|
+
};
|
|
4722
|
+
const formatRelative$1 = formatRelative;
|
|
4723
|
+
function buildLocalizeFn(args) {
|
|
4724
|
+
return function(dirtyIndex, options) {
|
|
4725
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
4726
|
+
var valuesArray;
|
|
4727
|
+
if (context === "formatting" && args.formattingValues) {
|
|
4728
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
4729
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
4730
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
4731
|
+
} else {
|
|
4732
|
+
var _defaultWidth = args.defaultWidth;
|
|
4733
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
4734
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
4735
|
+
}
|
|
4736
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
4737
|
+
return valuesArray[index];
|
|
4738
|
+
};
|
|
4739
|
+
}
|
|
4740
|
+
var eraValues = {
|
|
4741
|
+
narrow: ["B", "A"],
|
|
4742
|
+
abbreviated: ["BC", "AD"],
|
|
4743
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
4744
|
+
};
|
|
4745
|
+
var quarterValues = {
|
|
4746
|
+
narrow: ["1", "2", "3", "4"],
|
|
4747
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
4748
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
4749
|
+
};
|
|
4750
|
+
var monthValues = {
|
|
4751
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
4752
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
4753
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
4754
|
+
};
|
|
4755
|
+
var dayValues = {
|
|
4756
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
4757
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
4758
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
4759
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
4760
|
+
};
|
|
4761
|
+
var dayPeriodValues = {
|
|
4762
|
+
narrow: {
|
|
4763
|
+
am: "a",
|
|
4764
|
+
pm: "p",
|
|
4765
|
+
midnight: "mi",
|
|
4766
|
+
noon: "n",
|
|
4767
|
+
morning: "morning",
|
|
4768
|
+
afternoon: "afternoon",
|
|
4769
|
+
evening: "evening",
|
|
4770
|
+
night: "night"
|
|
4771
|
+
},
|
|
4772
|
+
abbreviated: {
|
|
4773
|
+
am: "AM",
|
|
4774
|
+
pm: "PM",
|
|
4775
|
+
midnight: "midnight",
|
|
4776
|
+
noon: "noon",
|
|
4777
|
+
morning: "morning",
|
|
4778
|
+
afternoon: "afternoon",
|
|
4779
|
+
evening: "evening",
|
|
4780
|
+
night: "night"
|
|
4781
|
+
},
|
|
4782
|
+
wide: {
|
|
4783
|
+
am: "a.m.",
|
|
4784
|
+
pm: "p.m.",
|
|
4785
|
+
midnight: "midnight",
|
|
4786
|
+
noon: "noon",
|
|
4787
|
+
morning: "morning",
|
|
4788
|
+
afternoon: "afternoon",
|
|
4789
|
+
evening: "evening",
|
|
4790
|
+
night: "night"
|
|
4791
|
+
}
|
|
4792
|
+
};
|
|
4793
|
+
var formattingDayPeriodValues = {
|
|
4794
|
+
narrow: {
|
|
4795
|
+
am: "a",
|
|
4796
|
+
pm: "p",
|
|
4797
|
+
midnight: "mi",
|
|
4798
|
+
noon: "n",
|
|
4799
|
+
morning: "in the morning",
|
|
4800
|
+
afternoon: "in the afternoon",
|
|
4801
|
+
evening: "in the evening",
|
|
4802
|
+
night: "at night"
|
|
4803
|
+
},
|
|
4804
|
+
abbreviated: {
|
|
4805
|
+
am: "AM",
|
|
4806
|
+
pm: "PM",
|
|
4807
|
+
midnight: "midnight",
|
|
4808
|
+
noon: "noon",
|
|
4809
|
+
morning: "in the morning",
|
|
4810
|
+
afternoon: "in the afternoon",
|
|
4811
|
+
evening: "in the evening",
|
|
4812
|
+
night: "at night"
|
|
4813
|
+
},
|
|
4814
|
+
wide: {
|
|
4815
|
+
am: "a.m.",
|
|
4816
|
+
pm: "p.m.",
|
|
4817
|
+
midnight: "midnight",
|
|
4818
|
+
noon: "noon",
|
|
4819
|
+
morning: "in the morning",
|
|
4820
|
+
afternoon: "in the afternoon",
|
|
4821
|
+
evening: "in the evening",
|
|
4822
|
+
night: "at night"
|
|
4823
|
+
}
|
|
4824
|
+
};
|
|
4825
|
+
var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
|
|
4826
|
+
var number = Number(dirtyNumber);
|
|
4827
|
+
var rem100 = number % 100;
|
|
4828
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
4829
|
+
switch (rem100 % 10) {
|
|
4830
|
+
case 1:
|
|
4831
|
+
return number + "st";
|
|
4832
|
+
case 2:
|
|
4833
|
+
return number + "nd";
|
|
4834
|
+
case 3:
|
|
4835
|
+
return number + "rd";
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
return number + "th";
|
|
4839
|
+
};
|
|
4840
|
+
var localize = {
|
|
4841
|
+
ordinalNumber,
|
|
4842
|
+
era: buildLocalizeFn({
|
|
4843
|
+
values: eraValues,
|
|
4844
|
+
defaultWidth: "wide"
|
|
4845
|
+
}),
|
|
4846
|
+
quarter: buildLocalizeFn({
|
|
4847
|
+
values: quarterValues,
|
|
4848
|
+
defaultWidth: "wide",
|
|
4849
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
4850
|
+
return quarter - 1;
|
|
4851
|
+
}
|
|
4852
|
+
}),
|
|
4853
|
+
month: buildLocalizeFn({
|
|
4854
|
+
values: monthValues,
|
|
4855
|
+
defaultWidth: "wide"
|
|
4856
|
+
}),
|
|
4857
|
+
day: buildLocalizeFn({
|
|
4858
|
+
values: dayValues,
|
|
4859
|
+
defaultWidth: "wide"
|
|
4860
|
+
}),
|
|
4861
|
+
dayPeriod: buildLocalizeFn({
|
|
4862
|
+
values: dayPeriodValues,
|
|
4863
|
+
defaultWidth: "wide",
|
|
4864
|
+
formattingValues: formattingDayPeriodValues,
|
|
4865
|
+
defaultFormattingWidth: "wide"
|
|
4866
|
+
})
|
|
4867
|
+
};
|
|
4868
|
+
const localize$1 = localize;
|
|
4869
|
+
function buildMatchFn(args) {
|
|
4870
|
+
return function(string) {
|
|
4871
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4872
|
+
var width = options.width;
|
|
4873
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
4874
|
+
var matchResult = string.match(matchPattern);
|
|
4875
|
+
if (!matchResult) {
|
|
4876
|
+
return null;
|
|
4877
|
+
}
|
|
4878
|
+
var matchedString = matchResult[0];
|
|
4879
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
4880
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
4881
|
+
return pattern.test(matchedString);
|
|
4882
|
+
}) : findKey(parsePatterns, function(pattern) {
|
|
4883
|
+
return pattern.test(matchedString);
|
|
4884
|
+
});
|
|
4885
|
+
var value;
|
|
4886
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
4887
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4888
|
+
var rest = string.slice(matchedString.length);
|
|
4889
|
+
return {
|
|
4890
|
+
value,
|
|
4891
|
+
rest
|
|
4892
|
+
};
|
|
4893
|
+
};
|
|
4894
|
+
}
|
|
4895
|
+
function findKey(object, predicate) {
|
|
4896
|
+
for (var key in object) {
|
|
4897
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
4898
|
+
return key;
|
|
4899
|
+
}
|
|
4900
|
+
}
|
|
4901
|
+
return void 0;
|
|
4902
|
+
}
|
|
4903
|
+
function findIndex(array, predicate) {
|
|
4904
|
+
for (var key = 0; key < array.length; key++) {
|
|
4905
|
+
if (predicate(array[key])) {
|
|
4906
|
+
return key;
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
return void 0;
|
|
4910
|
+
}
|
|
4911
|
+
function buildMatchPatternFn(args) {
|
|
4912
|
+
return function(string) {
|
|
4913
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4914
|
+
var matchResult = string.match(args.matchPattern);
|
|
4915
|
+
if (!matchResult)
|
|
4916
|
+
return null;
|
|
4917
|
+
var matchedString = matchResult[0];
|
|
4918
|
+
var parseResult = string.match(args.parsePattern);
|
|
4919
|
+
if (!parseResult)
|
|
4920
|
+
return null;
|
|
4921
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
4922
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4923
|
+
var rest = string.slice(matchedString.length);
|
|
4924
|
+
return {
|
|
4925
|
+
value,
|
|
4926
|
+
rest
|
|
4927
|
+
};
|
|
4928
|
+
};
|
|
4929
|
+
}
|
|
4930
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
4931
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
4932
|
+
var matchEraPatterns = {
|
|
4933
|
+
narrow: /^(b|a)/i,
|
|
4934
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
4935
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
4936
|
+
};
|
|
4937
|
+
var parseEraPatterns = {
|
|
4938
|
+
any: [/^b/i, /^(a|c)/i]
|
|
4939
|
+
};
|
|
4940
|
+
var matchQuarterPatterns = {
|
|
4941
|
+
narrow: /^[1234]/i,
|
|
4942
|
+
abbreviated: /^q[1234]/i,
|
|
4943
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
4944
|
+
};
|
|
4945
|
+
var parseQuarterPatterns = {
|
|
4946
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
4947
|
+
};
|
|
4948
|
+
var matchMonthPatterns = {
|
|
4949
|
+
narrow: /^[jfmasond]/i,
|
|
4950
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
4951
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
4952
|
+
};
|
|
4953
|
+
var parseMonthPatterns = {
|
|
4954
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
4955
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
4956
|
+
};
|
|
4957
|
+
var matchDayPatterns = {
|
|
4958
|
+
narrow: /^[smtwf]/i,
|
|
4959
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
4960
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
4961
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
4962
|
+
};
|
|
4963
|
+
var parseDayPatterns = {
|
|
4964
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
4965
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
4966
|
+
};
|
|
4967
|
+
var matchDayPeriodPatterns = {
|
|
4968
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
4969
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
4970
|
+
};
|
|
4971
|
+
var parseDayPeriodPatterns = {
|
|
4972
|
+
any: {
|
|
4973
|
+
am: /^a/i,
|
|
4974
|
+
pm: /^p/i,
|
|
4975
|
+
midnight: /^mi/i,
|
|
4976
|
+
noon: /^no/i,
|
|
4977
|
+
morning: /morning/i,
|
|
4978
|
+
afternoon: /afternoon/i,
|
|
4979
|
+
evening: /evening/i,
|
|
4980
|
+
night: /night/i
|
|
4981
|
+
}
|
|
4982
|
+
};
|
|
4983
|
+
var match = {
|
|
4984
|
+
ordinalNumber: buildMatchPatternFn({
|
|
4985
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
4986
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
4987
|
+
valueCallback: function valueCallback(value) {
|
|
4988
|
+
return parseInt(value, 10);
|
|
4989
|
+
}
|
|
4990
|
+
}),
|
|
4991
|
+
era: buildMatchFn({
|
|
4992
|
+
matchPatterns: matchEraPatterns,
|
|
4993
|
+
defaultMatchWidth: "wide",
|
|
4994
|
+
parsePatterns: parseEraPatterns,
|
|
4995
|
+
defaultParseWidth: "any"
|
|
4996
|
+
}),
|
|
4997
|
+
quarter: buildMatchFn({
|
|
4998
|
+
matchPatterns: matchQuarterPatterns,
|
|
4999
|
+
defaultMatchWidth: "wide",
|
|
5000
|
+
parsePatterns: parseQuarterPatterns,
|
|
5001
|
+
defaultParseWidth: "any",
|
|
5002
|
+
valueCallback: function valueCallback2(index) {
|
|
5003
|
+
return index + 1;
|
|
5004
|
+
}
|
|
5005
|
+
}),
|
|
5006
|
+
month: buildMatchFn({
|
|
5007
|
+
matchPatterns: matchMonthPatterns,
|
|
5008
|
+
defaultMatchWidth: "wide",
|
|
5009
|
+
parsePatterns: parseMonthPatterns,
|
|
5010
|
+
defaultParseWidth: "any"
|
|
5011
|
+
}),
|
|
5012
|
+
day: buildMatchFn({
|
|
5013
|
+
matchPatterns: matchDayPatterns,
|
|
5014
|
+
defaultMatchWidth: "wide",
|
|
5015
|
+
parsePatterns: parseDayPatterns,
|
|
5016
|
+
defaultParseWidth: "any"
|
|
5017
|
+
}),
|
|
5018
|
+
dayPeriod: buildMatchFn({
|
|
5019
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
5020
|
+
defaultMatchWidth: "any",
|
|
5021
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
5022
|
+
defaultParseWidth: "any"
|
|
5023
|
+
})
|
|
5024
|
+
};
|
|
5025
|
+
const match$1 = match;
|
|
5026
|
+
var locale = {
|
|
5027
|
+
code: "en-US",
|
|
5028
|
+
formatDistance: formatDistance$1,
|
|
5029
|
+
formatLong: formatLong$1,
|
|
5030
|
+
formatRelative: formatRelative$1,
|
|
5031
|
+
localize: localize$1,
|
|
5032
|
+
match: match$1,
|
|
5033
|
+
options: {
|
|
5034
|
+
weekStartsOn: 0,
|
|
5035
|
+
firstWeekContainsDate: 1
|
|
5036
|
+
}
|
|
5037
|
+
};
|
|
5038
|
+
const defaultLocale = locale;
|
|
5039
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
5040
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
5041
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
5042
|
+
var doubleQuoteRegExp = /''/g;
|
|
5043
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
5044
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
5045
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
5046
|
+
requiredArgs(2, arguments);
|
|
5047
|
+
var formatStr = String(dirtyFormatStr);
|
|
5048
|
+
var defaultOptions2 = getDefaultOptions();
|
|
5049
|
+
var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
5050
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
5051
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
5052
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
5053
|
+
}
|
|
5054
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
5055
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
5056
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
5057
|
+
}
|
|
5058
|
+
if (!locale2.localize) {
|
|
5059
|
+
throw new RangeError("locale must contain localize property");
|
|
5060
|
+
}
|
|
5061
|
+
if (!locale2.formatLong) {
|
|
5062
|
+
throw new RangeError("locale must contain formatLong property");
|
|
5063
|
+
}
|
|
5064
|
+
var originalDate = toDate(dirtyDate);
|
|
5065
|
+
if (!isValid(originalDate)) {
|
|
5066
|
+
throw new RangeError("Invalid time value");
|
|
5067
|
+
}
|
|
5068
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
5069
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
5070
|
+
var formatterOptions = {
|
|
5071
|
+
firstWeekContainsDate,
|
|
5072
|
+
weekStartsOn,
|
|
5073
|
+
locale: locale2,
|
|
5074
|
+
_originalDate: originalDate
|
|
5075
|
+
};
|
|
5076
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
|
|
5077
|
+
var firstCharacter = substring[0];
|
|
5078
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
5079
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
5080
|
+
return longFormatter(substring, locale2.formatLong);
|
|
5081
|
+
}
|
|
5082
|
+
return substring;
|
|
5083
|
+
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
|
5084
|
+
if (substring === "''") {
|
|
5085
|
+
return "'";
|
|
5086
|
+
}
|
|
5087
|
+
var firstCharacter = substring[0];
|
|
5088
|
+
if (firstCharacter === "'") {
|
|
5089
|
+
return cleanEscapedString(substring);
|
|
5090
|
+
}
|
|
5091
|
+
var formatter = formatters$1[firstCharacter];
|
|
5092
|
+
if (formatter) {
|
|
5093
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
5094
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5095
|
+
}
|
|
5096
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
5097
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5098
|
+
}
|
|
5099
|
+
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
|
5100
|
+
}
|
|
5101
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
5102
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
|
5103
|
+
}
|
|
5104
|
+
return substring;
|
|
5105
|
+
}).join("");
|
|
5106
|
+
return result;
|
|
5107
|
+
}
|
|
5108
|
+
function cleanEscapedString(input) {
|
|
5109
|
+
var matched = input.match(escapedStringRegExp);
|
|
5110
|
+
if (!matched) {
|
|
5111
|
+
return input;
|
|
5112
|
+
}
|
|
5113
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
5114
|
+
}
|
|
5115
|
+
function startOfToday() {
|
|
5116
|
+
return startOfDay(Date.now());
|
|
5117
|
+
}
|
|
5118
|
+
const _hoisted_1$8 = { class: "operasional-identitas" };
|
|
5119
|
+
const _hoisted_2$5 = {
|
|
5120
|
+
key: 2,
|
|
5121
|
+
class: "section"
|
|
5122
|
+
};
|
|
5123
|
+
const __default__$8 = defineComponent({ name: "OperasionalIdentitas" });
|
|
5124
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5125
|
+
...__default__$8,
|
|
5126
|
+
props: {
|
|
5127
|
+
profile: {
|
|
5128
|
+
type: Object,
|
|
5129
|
+
default: null
|
|
5130
|
+
},
|
|
5131
|
+
user: {
|
|
5132
|
+
type: Object,
|
|
5133
|
+
default: null
|
|
5134
|
+
},
|
|
5135
|
+
conflict: {
|
|
5136
|
+
type: Object,
|
|
5137
|
+
default: null
|
|
5138
|
+
},
|
|
5139
|
+
roles: {
|
|
5140
|
+
type: Array,
|
|
5141
|
+
default: () => []
|
|
5142
|
+
},
|
|
5143
|
+
errors: {
|
|
5144
|
+
type: Object,
|
|
5145
|
+
default: () => ({})
|
|
5146
|
+
},
|
|
5147
|
+
onChoose: {
|
|
5148
|
+
type: Function,
|
|
5149
|
+
default: null
|
|
5150
|
+
},
|
|
5151
|
+
onRegister: {
|
|
5152
|
+
type: Function,
|
|
5153
|
+
default: null
|
|
5154
|
+
},
|
|
5155
|
+
onConnect: {
|
|
5156
|
+
type: Function,
|
|
5157
|
+
default: null
|
|
5158
|
+
},
|
|
5159
|
+
onDisconnect: {
|
|
5160
|
+
type: Function,
|
|
5161
|
+
default: null
|
|
5162
|
+
},
|
|
5163
|
+
onDelegate: {
|
|
5164
|
+
type: Function,
|
|
5165
|
+
default: null
|
|
5166
|
+
}
|
|
5167
|
+
},
|
|
5168
|
+
emits: ["no-conflict"],
|
|
5169
|
+
setup(__props, { emit }) {
|
|
5170
|
+
const props = __props;
|
|
5171
|
+
const fullNameField = {
|
|
5172
|
+
handle: "name",
|
|
5173
|
+
name: "Nama Lengkap",
|
|
5174
|
+
type: "string",
|
|
5175
|
+
input: "short-text",
|
|
5176
|
+
options: {
|
|
5177
|
+
note: "Nama lengkap pengguna, sesuai dengan nama pada data profil."
|
|
5178
|
+
}
|
|
5179
|
+
};
|
|
5180
|
+
const passwordField = {
|
|
5181
|
+
handle: "defaultPassword",
|
|
5182
|
+
name: "Password Awal",
|
|
5183
|
+
type: "string",
|
|
5184
|
+
input: "short-text",
|
|
5185
|
+
options: {
|
|
5186
|
+
note: `<em>Password</em> awal pengguna, dapat menggunakan tanggal lahir dari data profil.`,
|
|
5187
|
+
iconLeft: "key"
|
|
5188
|
+
}
|
|
5189
|
+
};
|
|
5190
|
+
const state = ref("connect");
|
|
5191
|
+
const candidateId = ref(null);
|
|
5192
|
+
const candidate = ref(null);
|
|
5193
|
+
const isChoosing = ref(false);
|
|
5194
|
+
const isLoading = ref(false);
|
|
5195
|
+
const user = computed(() => props.user);
|
|
5196
|
+
const userForDelegating = computed(() => {
|
|
5197
|
+
var _a, _b;
|
|
5198
|
+
if (!user.value)
|
|
5199
|
+
return null;
|
|
5200
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5201
|
+
const roleIds = (_b = (_a = user.value) == null ? void 0 : _a.roleIds) == null ? void 0 : _b.filter(
|
|
5202
|
+
(id) => availableRoleIds.includes(id)
|
|
5203
|
+
);
|
|
5204
|
+
return { ...user.value, roleIds };
|
|
5205
|
+
});
|
|
5206
|
+
const profile = computed(() => props.profile);
|
|
5207
|
+
const initialRegistration = ref({
|
|
5208
|
+
defaultPassword: getDefaultPassword()
|
|
5209
|
+
});
|
|
5210
|
+
const { client } = useClientHandle();
|
|
5211
|
+
const UserModel = models.UserModel;
|
|
5212
|
+
withRelation({
|
|
5213
|
+
field: Field.define({
|
|
5214
|
+
handle: "user",
|
|
5215
|
+
name: "Pengguna",
|
|
5216
|
+
type: "relation",
|
|
5217
|
+
input: "relation",
|
|
5218
|
+
options: {}
|
|
5219
|
+
}),
|
|
5220
|
+
fields: UserModel.fields,
|
|
5221
|
+
title: "Choose Item",
|
|
5222
|
+
icon: "",
|
|
5223
|
+
singular: "",
|
|
5224
|
+
plural: "",
|
|
5225
|
+
scope: CodeUtil.getCode({ prefix: "relation", chars: 6 }),
|
|
5226
|
+
isMultiple: false,
|
|
5227
|
+
query: Query.define({}),
|
|
5228
|
+
filters: [],
|
|
5229
|
+
sorts: [],
|
|
5230
|
+
columns: ["flag", "username", "email", "phone", "status", "lastLoggedInAt"],
|
|
5231
|
+
renders: {
|
|
5232
|
+
flag: (item) => {
|
|
5233
|
+
const Avatar = h(NeonAvatar, {
|
|
5234
|
+
image: item.image,
|
|
5235
|
+
name: item.id,
|
|
5236
|
+
style: { "--neon-avatar-size": "32px" }
|
|
5237
|
+
});
|
|
5238
|
+
const Display = RowUtil.renderDisplay(item, UserModel.fields.flag);
|
|
5239
|
+
return h("div", { class: "flex items-center space-x-2" }, [
|
|
5240
|
+
Avatar,
|
|
5241
|
+
Display
|
|
5242
|
+
]);
|
|
5243
|
+
},
|
|
5244
|
+
username: (item) => RowUtil.renderCode(item, UserModel.fields.username),
|
|
5245
|
+
email: (item) => RowUtil.renderCode(item, UserModel.fields.email),
|
|
5246
|
+
phone: (item) => RowUtil.renderCode(item, UserModel.fields.phone)
|
|
5247
|
+
},
|
|
5248
|
+
ids: [],
|
|
5249
|
+
initialIds: [],
|
|
5250
|
+
initialItems: [],
|
|
5251
|
+
logs: [],
|
|
5252
|
+
getItems: getManyUsers,
|
|
5253
|
+
updateValue: (id) => {
|
|
5254
|
+
candidateId.value = id;
|
|
5255
|
+
}
|
|
5256
|
+
});
|
|
5257
|
+
watch(candidateId, async (id) => {
|
|
5258
|
+
if (!id) {
|
|
5259
|
+
candidate.value = null;
|
|
5260
|
+
} else {
|
|
5261
|
+
isLoading.value = true;
|
|
5262
|
+
const query = Query.define({ ids: [id] });
|
|
5263
|
+
const resp = await getManyUsers(query);
|
|
5264
|
+
candidate.value = resp.items[0] || null;
|
|
5265
|
+
await props.onChoose(id);
|
|
5266
|
+
isLoading.value = false;
|
|
5267
|
+
}
|
|
5268
|
+
});
|
|
5269
|
+
function getDefaultPassword() {
|
|
5270
|
+
if (!profile.value.birthDate)
|
|
5271
|
+
return CodeUtil.getCode({ chars: 6 });
|
|
5272
|
+
const birthDate = new Date(profile.value.birthDate);
|
|
5273
|
+
return format(birthDate, "yyyy-MM-dd");
|
|
5274
|
+
}
|
|
5275
|
+
function onWillChoose() {
|
|
5276
|
+
isChoosing.value = true;
|
|
5277
|
+
}
|
|
5278
|
+
function onWillRegister() {
|
|
5279
|
+
clear();
|
|
5280
|
+
state.value = "register";
|
|
5281
|
+
}
|
|
5282
|
+
async function onRegister(payload) {
|
|
5283
|
+
if (!props.onRegister)
|
|
5284
|
+
return;
|
|
5285
|
+
try {
|
|
5286
|
+
isLoading.value = true;
|
|
5287
|
+
const userId = await props.onRegister({
|
|
5288
|
+
...payload,
|
|
5289
|
+
name: profile.value.name,
|
|
5290
|
+
organizationIds: [
|
|
5291
|
+
"5f8c6b0cc94b750008d4a156",
|
|
5292
|
+
// Neon,
|
|
5293
|
+
"5f8fe9a61e42a200082e3fef"
|
|
5294
|
+
// Neutron
|
|
5295
|
+
]
|
|
5296
|
+
});
|
|
5297
|
+
if (userId) {
|
|
5298
|
+
candidateId.value = userId;
|
|
5299
|
+
state.value = "connect";
|
|
5300
|
+
}
|
|
5301
|
+
} catch (error) {
|
|
5302
|
+
console.log(error);
|
|
5303
|
+
} finally {
|
|
5304
|
+
isLoading.value = false;
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5307
|
+
async function onConnect() {
|
|
5308
|
+
if (!props.onConnect || !candidateId.value)
|
|
5309
|
+
return;
|
|
5310
|
+
isLoading.value = true;
|
|
5311
|
+
await props.onConnect(candidateId.value);
|
|
5312
|
+
isLoading.value = false;
|
|
5313
|
+
}
|
|
5314
|
+
async function onDisconnect() {
|
|
5315
|
+
var _a, _b, _c;
|
|
5316
|
+
if (!props.onDisconnect || !((_a = user.value) == null ? void 0 : _a.id))
|
|
5317
|
+
return;
|
|
5318
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5319
|
+
const roleIds = ((_c = (_b = user.value) == null ? void 0 : _b.roleIds) == null ? void 0 : _c.filter((id) => !availableRoleIds.includes(id))) || [];
|
|
5320
|
+
isLoading.value = true;
|
|
5321
|
+
await props.onDisconnect({ userId: user.value.id, roleIds });
|
|
5322
|
+
isLoading.value = false;
|
|
5323
|
+
}
|
|
5324
|
+
function onBack() {
|
|
5325
|
+
clear();
|
|
5326
|
+
}
|
|
5327
|
+
async function onDelegate(delegation) {
|
|
5328
|
+
var _a, _b, _c;
|
|
5329
|
+
if (!props.onDelegate || !((_a = user.value) == null ? void 0 : _a.id) || !delegation)
|
|
5330
|
+
return;
|
|
5331
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5332
|
+
const existingRoleIds = ((_c = (_b = user.value) == null ? void 0 : _b.roleIds) == null ? void 0 : _c.filter((id) => !availableRoleIds.includes(id))) || [];
|
|
5333
|
+
const roleIds = [
|
|
5334
|
+
...(/* @__PURE__ */ new Set([...delegation.roleIds, ...existingRoleIds])).values()
|
|
5335
|
+
].filter(Boolean);
|
|
5336
|
+
isLoading.value = true;
|
|
5337
|
+
await props.onDelegate({ userId: user.value.id, roleIds });
|
|
5338
|
+
isLoading.value = false;
|
|
5339
|
+
}
|
|
5340
|
+
async function getManyUsers(query) {
|
|
5341
|
+
var _a, _b;
|
|
5342
|
+
const resp = await client.query(
|
|
5343
|
+
GraphUtil.getMany(UserModel, {
|
|
5344
|
+
id: 1,
|
|
5345
|
+
flag: 1,
|
|
5346
|
+
display: 1,
|
|
5347
|
+
name: 1,
|
|
5348
|
+
username: 1,
|
|
5349
|
+
email: 1,
|
|
5350
|
+
phone: 1,
|
|
5351
|
+
image: 1,
|
|
5352
|
+
status: 1,
|
|
5353
|
+
lastLoggedInAt: 1,
|
|
5354
|
+
roleIds: 1
|
|
5355
|
+
}),
|
|
5356
|
+
{
|
|
5357
|
+
ids: query.ids,
|
|
5358
|
+
page: query.final.page,
|
|
5359
|
+
limit: query.final.limit,
|
|
5360
|
+
search: query.search,
|
|
5361
|
+
filter: query.raw.criteria,
|
|
5362
|
+
sort: query.raw.sort,
|
|
5363
|
+
logs: ["error"]
|
|
5364
|
+
},
|
|
5365
|
+
{ requestPolicy: "network-only" }
|
|
5366
|
+
).toPromise();
|
|
5367
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[UserModel.plural];
|
|
5368
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
5369
|
+
const meta = ((_b = wrapper == null ? void 0 : wrapper.info) == null ? void 0 : _b.meta) || {};
|
|
5370
|
+
return { items, meta };
|
|
5371
|
+
}
|
|
5372
|
+
function clear() {
|
|
5373
|
+
emit("no-conflict");
|
|
5374
|
+
candidate.value = null;
|
|
5375
|
+
candidateId.value = null;
|
|
5376
|
+
}
|
|
5377
|
+
return (_ctx, _cache) => {
|
|
5378
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
5379
|
+
state.value === "connect" ? (openBlock(), createBlock(unref(IdentitasConnect), {
|
|
5380
|
+
key: 0,
|
|
5381
|
+
user: unref(user),
|
|
5382
|
+
candidate: candidate.value,
|
|
5383
|
+
conflict: __props.conflict,
|
|
5384
|
+
"is-ready": "",
|
|
5385
|
+
"is-loading": isLoading.value,
|
|
5386
|
+
onChoose: onWillChoose,
|
|
5387
|
+
onRegister: onWillRegister,
|
|
5388
|
+
onConnect,
|
|
5389
|
+
onDisconnect,
|
|
5390
|
+
onBack
|
|
5391
|
+
}, {
|
|
5392
|
+
ready: withCtx(() => {
|
|
5393
|
+
var _a;
|
|
5394
|
+
return [
|
|
5395
|
+
createVNode(unref(NeonField), mergeProps({
|
|
5396
|
+
"model-value": (_a = unref(user)) == null ? void 0 : _a.defaultPassword
|
|
5397
|
+
}, passwordField, {
|
|
5398
|
+
"more-options": {
|
|
5399
|
+
note: `<em>Password</em> awal pengguna. Tidak berlaku apabila pengguna <strong class='text-danger'>telah mengubah <em>password</em></strong> atau <strong class='text-danger'>mendaftarkan akunnya sendiri</strong>.`
|
|
5400
|
+
},
|
|
5401
|
+
"is-disabled": "",
|
|
5402
|
+
"is-alone": ""
|
|
5403
|
+
}), null, 16, ["model-value", "more-options"])
|
|
5404
|
+
];
|
|
5405
|
+
}),
|
|
5406
|
+
_: 1
|
|
5407
|
+
/* STABLE */
|
|
5408
|
+
}, 8, ["user", "candidate", "conflict", "is-loading"])) : state.value === "register" ? (openBlock(), createBlock(unref(IdentitasAssistRegistration), {
|
|
5409
|
+
key: 1,
|
|
5410
|
+
"initial-values": initialRegistration.value,
|
|
5411
|
+
"is-loading": isLoading.value,
|
|
5412
|
+
errors: __props.errors,
|
|
5413
|
+
onBack: _cache[0] || (_cache[0] = ($event) => state.value = "connect"),
|
|
5414
|
+
onSave: onRegister
|
|
5415
|
+
}, {
|
|
5416
|
+
default: withCtx(() => {
|
|
5417
|
+
var _a;
|
|
5418
|
+
return [
|
|
5419
|
+
createVNode(unref(NeonField), mergeProps({
|
|
5420
|
+
"model-value": (_a = unref(profile)) == null ? void 0 : _a.name
|
|
5421
|
+
}, fullNameField, {
|
|
5422
|
+
"is-disabled": "",
|
|
5423
|
+
"is-alone": ""
|
|
5424
|
+
}), null, 16, ["model-value"])
|
|
5425
|
+
];
|
|
5426
|
+
}),
|
|
5427
|
+
_: 1
|
|
5428
|
+
/* STABLE */
|
|
5429
|
+
}, 8, ["initial-values", "is-loading", "errors"])) : createCommentVNode("v-if", true),
|
|
5430
|
+
unref(user) && onDelegate ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
5431
|
+
createVNode(unref(NeonDivider), {
|
|
5432
|
+
"is-dashed": "",
|
|
5433
|
+
label: "Delegasi",
|
|
5434
|
+
class: "divider"
|
|
5435
|
+
}),
|
|
5436
|
+
createVNode(unref(IdentitasDelegate), {
|
|
5437
|
+
user: unref(userForDelegating),
|
|
5438
|
+
roles: __props.roles,
|
|
5439
|
+
"is-loading": isLoading.value,
|
|
5440
|
+
onSave: onDelegate
|
|
5441
|
+
}, null, 8, ["user", "roles", "is-loading"])
|
|
5442
|
+
])) : createCommentVNode("v-if", true),
|
|
5443
|
+
isChoosing.value ? (openBlock(), createBlock(unref(NeonModal), {
|
|
5444
|
+
key: 3,
|
|
5445
|
+
"is-active": "",
|
|
5446
|
+
size: "lg",
|
|
5447
|
+
onClose: _cache[2] || (_cache[2] = ($event) => isChoosing.value = false)
|
|
5448
|
+
}, {
|
|
5449
|
+
default: withCtx(() => [
|
|
5450
|
+
createVNode(unref(NeonSheet), {
|
|
5451
|
+
icon: "user-magnifying-glass",
|
|
5452
|
+
title: "Pilih Akun",
|
|
5453
|
+
label: "User",
|
|
5454
|
+
"no-padding": "",
|
|
5455
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isChoosing.value = false)
|
|
5456
|
+
}, {
|
|
5457
|
+
default: withCtx(() => [
|
|
5458
|
+
createVNode(unref(NeonRelationSheet))
|
|
5459
|
+
]),
|
|
5460
|
+
_: 1
|
|
5461
|
+
/* STABLE */
|
|
5462
|
+
})
|
|
5463
|
+
]),
|
|
5464
|
+
_: 1
|
|
5465
|
+
/* STABLE */
|
|
5466
|
+
})) : createCommentVNode("v-if", true)
|
|
5467
|
+
]);
|
|
5468
|
+
};
|
|
5469
|
+
}
|
|
5470
|
+
});
|
|
5471
|
+
const OperasionalIdentitas_vue_vue_type_style_index_0_scoped_e17256c5_lang = "";
|
|
5472
|
+
const _export_sfc = (sfc, props) => {
|
|
5473
|
+
const target = sfc.__vccOpts || sfc;
|
|
5474
|
+
for (const [key, val] of props) {
|
|
5475
|
+
target[key] = val;
|
|
5476
|
+
}
|
|
5477
|
+
return target;
|
|
5478
|
+
};
|
|
5479
|
+
const OperasionalIdentitas = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-e17256c5"]]);
|
|
5480
|
+
const CheckInModel = models$1.CheckInModel;
|
|
5481
|
+
const useOperasionalStore = defineStore("neu:operasional", () => {
|
|
5482
|
+
const isLoading = ref(false);
|
|
5483
|
+
const staff = ref(null);
|
|
5484
|
+
return {
|
|
5485
|
+
isLoading,
|
|
5486
|
+
staff,
|
|
5487
|
+
setStaff
|
|
5488
|
+
};
|
|
5489
|
+
function setStaff(data) {
|
|
5490
|
+
staff.value = data;
|
|
5491
|
+
}
|
|
5492
|
+
});
|
|
5493
|
+
const useAttendanceStore = defineStore("neu:personalia:attendance", {
|
|
5494
|
+
state: () => ({
|
|
5495
|
+
isEntering: false,
|
|
5496
|
+
isAsking: false,
|
|
5497
|
+
isScanning: false,
|
|
5498
|
+
isScanError: false,
|
|
5499
|
+
isScanned: false,
|
|
5500
|
+
qrKey: "",
|
|
5501
|
+
type: "in",
|
|
5502
|
+
checkInId: ""
|
|
5503
|
+
}),
|
|
5504
|
+
getters: {},
|
|
5505
|
+
actions: {
|
|
5506
|
+
reset() {
|
|
5507
|
+
this.$patch((state) => {
|
|
5508
|
+
state.isEntering = false;
|
|
5509
|
+
state.isScanning = false;
|
|
5510
|
+
state.isScanError = false;
|
|
5511
|
+
state.isScanned = false;
|
|
5512
|
+
state.qrKey = "";
|
|
5513
|
+
state.type = "in";
|
|
5514
|
+
state.checkInId = "";
|
|
5515
|
+
});
|
|
5516
|
+
},
|
|
5517
|
+
async checkInStaff(qrKey, type, staffId) {
|
|
5518
|
+
const { client } = useClientHandle();
|
|
5519
|
+
try {
|
|
5520
|
+
this.qrKey = qrKey;
|
|
5521
|
+
this.type = type;
|
|
5522
|
+
const resp = await client.mutation(GraphUtil.executeOne(models$1.CheckInModel, {}), {
|
|
5523
|
+
action: "presence",
|
|
5524
|
+
input: {
|
|
5525
|
+
staffId,
|
|
5526
|
+
qrKey: this.qrKey || null,
|
|
5527
|
+
type: this.type
|
|
5528
|
+
}
|
|
5529
|
+
}).toPromise();
|
|
5530
|
+
const data = resp.data.executeCheckIn.output;
|
|
5531
|
+
if (data) {
|
|
5532
|
+
this.checkInId = data || "";
|
|
5533
|
+
this.isScanning = false;
|
|
5534
|
+
this.isScanned = true;
|
|
5535
|
+
} else
|
|
5536
|
+
throw new Error("Terjadi kesalahan.");
|
|
5537
|
+
} catch (error) {
|
|
5538
|
+
console.log(error);
|
|
5539
|
+
this.isScanError = true;
|
|
5540
|
+
}
|
|
5541
|
+
}
|
|
5542
|
+
}
|
|
5543
|
+
});
|
|
5544
|
+
const operasional_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5545
|
+
__proto__: null
|
|
5546
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
5547
|
+
function useOperasional() {
|
|
5548
|
+
const context = ComponentUtil.injectStrict(
|
|
5549
|
+
"neu:operasional:operasional"
|
|
5550
|
+
);
|
|
5551
|
+
return { ...context };
|
|
5552
|
+
}
|
|
5553
|
+
const { StaffModel: StaffModel$1 } = models$2;
|
|
5554
|
+
function withOperasional() {
|
|
5555
|
+
const authStore = useAuthStore();
|
|
5556
|
+
const { userId } = storeToRefs(authStore);
|
|
5557
|
+
const store = useOperasionalStore();
|
|
5558
|
+
const { isLoading, staff } = storeToRefs(store);
|
|
5559
|
+
const { client } = useClientHandle();
|
|
5560
|
+
const context = {
|
|
5561
|
+
isLoading,
|
|
5562
|
+
staff,
|
|
5563
|
+
setStaff: store.setStaff,
|
|
5564
|
+
getStaff,
|
|
5565
|
+
init
|
|
5566
|
+
};
|
|
5567
|
+
provide("neu:operasional:operasional", context);
|
|
5568
|
+
return context;
|
|
5569
|
+
async function init() {
|
|
5570
|
+
await Promise.all([getStaff()]);
|
|
5571
|
+
}
|
|
5572
|
+
async function getStaff() {
|
|
5573
|
+
var _a;
|
|
5574
|
+
const resp = await client.query(
|
|
5575
|
+
GraphUtil.getMany(StaffModel$1, {
|
|
5576
|
+
id: 1,
|
|
5577
|
+
flag: 1,
|
|
5578
|
+
display: 1,
|
|
5579
|
+
nik: 1,
|
|
5580
|
+
name: 1,
|
|
5581
|
+
birthDate: 1,
|
|
5582
|
+
birthPlace: 1,
|
|
5583
|
+
image: 1,
|
|
5584
|
+
branchId: 1,
|
|
5585
|
+
branchIds: 1,
|
|
5586
|
+
branch: { id: 1, name: 1 },
|
|
5587
|
+
branches: { id: 1, name: 1 },
|
|
5588
|
+
note: 1
|
|
5589
|
+
}),
|
|
5590
|
+
{
|
|
5591
|
+
filter: { userId: userId.value },
|
|
5592
|
+
limit: 1,
|
|
5593
|
+
logs: ["error"]
|
|
5594
|
+
},
|
|
5595
|
+
{ requestPolicy: "network-only" }
|
|
5596
|
+
).toPromise();
|
|
5597
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[StaffModel$1.plural];
|
|
5598
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
5599
|
+
store.setStaff(items[0]);
|
|
5600
|
+
}
|
|
5601
|
+
}
|
|
5602
|
+
function mitt(n) {
|
|
5603
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t3, e3) {
|
|
5604
|
+
var i3 = n.get(t3);
|
|
5605
|
+
i3 ? i3.push(e3) : n.set(t3, [e3]);
|
|
5606
|
+
}, off: function(t3, e3) {
|
|
5607
|
+
var i3 = n.get(t3);
|
|
5608
|
+
i3 && (e3 ? i3.splice(i3.indexOf(e3) >>> 0, 1) : n.set(t3, []));
|
|
5609
|
+
}, emit: function(t3, e3) {
|
|
5610
|
+
var i3 = n.get(t3);
|
|
5611
|
+
i3 && i3.slice().map(function(n2) {
|
|
5612
|
+
n2(e3);
|
|
5613
|
+
}), (i3 = n.get("*")) && i3.slice().map(function(n2) {
|
|
5614
|
+
n2(t3, e3);
|
|
5615
|
+
});
|
|
5616
|
+
} };
|
|
5617
|
+
}
|
|
5618
|
+
const bus = mitt();
|
|
5619
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-4069e2ed"), n = n(), popScopeId(), n);
|
|
5620
|
+
const _hoisted_1$7 = { id: "view-checkIns" };
|
|
5621
|
+
const _hoisted_2$4 = { class: "summary" };
|
|
5622
|
+
const _hoisted_3$1 = { class: "wrapper" };
|
|
5623
|
+
const _hoisted_4$1 = { class: "header" };
|
|
5624
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode(
|
|
5625
|
+
"div",
|
|
5626
|
+
{ class: "start" },
|
|
5627
|
+
[
|
|
5628
|
+
/* @__PURE__ */ createElementVNode("div", { class: "title" }, "➡️ Presensi"),
|
|
5629
|
+
/* @__PURE__ */ createElementVNode("div", { class: "description" }, "Daftar presensi hari ini.")
|
|
5630
|
+
],
|
|
5631
|
+
-1
|
|
5632
|
+
/* HOISTED */
|
|
5633
|
+
));
|
|
5634
|
+
const _hoisted_6 = { class: "end" };
|
|
5635
|
+
const __default__$7 = defineComponent({
|
|
5636
|
+
name: "CheckInPresenceCollection"
|
|
5637
|
+
});
|
|
5638
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
5639
|
+
...__default__$7,
|
|
5640
|
+
setup(__props) {
|
|
5641
|
+
const collectionBus = useEventBus("neu:tempat:checkIn");
|
|
5642
|
+
const router = useRouter();
|
|
5643
|
+
const { client } = useClientHandle();
|
|
5644
|
+
const { staff } = useOperasional();
|
|
5645
|
+
const attendanceStore = useAttendanceStore();
|
|
5646
|
+
const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = storeToRefs(attendanceStore);
|
|
5647
|
+
const toast = useToastStore();
|
|
5648
|
+
const id = ref("new");
|
|
5649
|
+
const isCheckpoint = ref(false);
|
|
5650
|
+
const isOut = ref(false);
|
|
5651
|
+
collectionBus.on((event, payload) => {
|
|
5652
|
+
const toastId = "neu:personalia:staff:checkIn";
|
|
5653
|
+
if (isCheckpoint.value === true || isOut.value === true) {
|
|
5654
|
+
if (event === "createOne:ok") {
|
|
5655
|
+
toast.push({
|
|
5656
|
+
id: toastId,
|
|
5657
|
+
icon: "check",
|
|
5658
|
+
content: "Presensi berhasil.",
|
|
5659
|
+
color: "success"
|
|
5660
|
+
});
|
|
5661
|
+
isCheckpoint.value = false;
|
|
5662
|
+
setTimeout(() => {
|
|
5663
|
+
router.go(0);
|
|
5664
|
+
}, 500);
|
|
5665
|
+
} else if (event === "updateOne:ok") {
|
|
5666
|
+
toast.push({
|
|
5667
|
+
id: toastId,
|
|
5668
|
+
icon: "check",
|
|
5669
|
+
content: "Catatan presensi berhasil ditambahkan.",
|
|
5670
|
+
color: "success"
|
|
5671
|
+
});
|
|
5672
|
+
isOut.value = false;
|
|
5673
|
+
setTimeout(() => {
|
|
5674
|
+
router.go(0);
|
|
5675
|
+
}, 500);
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5678
|
+
});
|
|
5679
|
+
const query = computed(() => {
|
|
5680
|
+
var _a;
|
|
5681
|
+
return Query.define({
|
|
5682
|
+
filter: {
|
|
5683
|
+
handle: "",
|
|
5684
|
+
operator: "mongo",
|
|
5685
|
+
value: {
|
|
5686
|
+
// staffId: staff.value?.id,
|
|
5687
|
+
// $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
|
|
5688
|
+
$and: [
|
|
5689
|
+
{ staffId: (_a = staff.value) == null ? void 0 : _a.id },
|
|
5690
|
+
{ checkInAt: { $gte: addDays(startOfToday(), 1) } },
|
|
5691
|
+
{ checkInAt: { $lte: endOfToday() } }
|
|
5692
|
+
]
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5695
|
+
});
|
|
5696
|
+
});
|
|
5697
|
+
function onPresenceIn(data) {
|
|
5698
|
+
isAsking.value = true;
|
|
5699
|
+
type.value = "in";
|
|
5700
|
+
}
|
|
5701
|
+
function onPresenceCheckpoint() {
|
|
5702
|
+
isCheckpoint.value = true;
|
|
5703
|
+
id.value = "new";
|
|
5704
|
+
}
|
|
5705
|
+
function onPresenceOut(data) {
|
|
5706
|
+
isAsking.value = true;
|
|
5707
|
+
type.value = "out";
|
|
5708
|
+
}
|
|
5709
|
+
async function onPresenceHome() {
|
|
3829
5710
|
var _a;
|
|
3830
5711
|
await checkInStaff(null, "home", (_a = staff.value) == null ? void 0 : _a.id);
|
|
5712
|
+
setTimeout(() => {
|
|
5713
|
+
router.go(0);
|
|
5714
|
+
}, 500);
|
|
5715
|
+
}
|
|
5716
|
+
function onModalClose() {
|
|
5717
|
+
isCheckpoint.value = false;
|
|
5718
|
+
isOut.value = false;
|
|
3831
5719
|
}
|
|
3832
5720
|
async function onScanned(data) {
|
|
3833
5721
|
var _a;
|
|
3834
|
-
await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
5722
|
+
id.value = await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
3835
5723
|
}
|
|
3836
5724
|
async function checkInStaff(qrKey, type2, staffId) {
|
|
3837
5725
|
const toastId = "neu:personalia:staff:checkIn";
|
|
5726
|
+
let checkInId;
|
|
3838
5727
|
console.log("bangunan...", qrKey);
|
|
3839
5728
|
try {
|
|
3840
|
-
const resp = await client.mutation(GraphUtil.executeOne(models.CheckInModel, {}), {
|
|
5729
|
+
const resp = await client.mutation(GraphUtil.executeOne(models$1.CheckInModel, {}), {
|
|
3841
5730
|
action: "presence",
|
|
3842
5731
|
input: {
|
|
3843
5732
|
staffId,
|
|
@@ -3846,15 +5735,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3846
5735
|
}
|
|
3847
5736
|
}).toPromise();
|
|
3848
5737
|
const data = resp.data.executeCheckIn.output;
|
|
5738
|
+
checkInId = data.checkInId;
|
|
3849
5739
|
if (data) {
|
|
3850
5740
|
isScanning.value = false;
|
|
3851
5741
|
isScanned.value = true;
|
|
5742
|
+
if (type2 === "out") {
|
|
5743
|
+
isOut.value = true;
|
|
5744
|
+
}
|
|
3852
5745
|
toast.push({
|
|
3853
5746
|
id: toastId,
|
|
3854
5747
|
icon: "check",
|
|
3855
5748
|
content: "Presensi berhasil.",
|
|
3856
5749
|
color: "success"
|
|
3857
5750
|
});
|
|
5751
|
+
if (type2 === "in") {
|
|
5752
|
+
setTimeout(() => {
|
|
5753
|
+
router.go(0);
|
|
5754
|
+
}, 500);
|
|
5755
|
+
}
|
|
3858
5756
|
} else
|
|
3859
5757
|
throw new Error("Terjadi kesalahan.");
|
|
3860
5758
|
} catch (error) {
|
|
@@ -3867,6 +5765,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3867
5765
|
color: "danger"
|
|
3868
5766
|
});
|
|
3869
5767
|
}
|
|
5768
|
+
return checkInId;
|
|
3870
5769
|
}
|
|
3871
5770
|
return (_ctx, _cache) => {
|
|
3872
5771
|
const _component_CheckInSingleView = resolveComponent("CheckInSingleView");
|
|
@@ -3914,7 +5813,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3914
5813
|
createVNode(unref(NeonStat), {
|
|
3915
5814
|
label: "Checkpoint",
|
|
3916
5815
|
icon: "barcode-read",
|
|
3917
|
-
onClick:
|
|
5816
|
+
onClick: onPresenceCheckpoint
|
|
3918
5817
|
}, {
|
|
3919
5818
|
default: withCtx(() => [
|
|
3920
5819
|
createTextVNode("Checkpoint")
|
|
@@ -3964,29 +5863,29 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3964
5863
|
_: 1
|
|
3965
5864
|
/* STABLE */
|
|
3966
5865
|
}),
|
|
3967
|
-
isCheckpoint.value ? (openBlock(), createBlock(unref(NeonModal), {
|
|
5866
|
+
isCheckpoint.value || isOut.value ? (openBlock(), createBlock(unref(NeonModal), {
|
|
3968
5867
|
key: 0,
|
|
3969
5868
|
"is-active": "",
|
|
3970
5869
|
size: "lg",
|
|
3971
|
-
onClose:
|
|
5870
|
+
onClose: onModalClose
|
|
3972
5871
|
}, {
|
|
3973
5872
|
default: withCtx(() => [
|
|
3974
5873
|
createVNode(_component_CheckInSingleView, {
|
|
3975
|
-
id:
|
|
5874
|
+
id: id.value,
|
|
3976
5875
|
"is-new": "",
|
|
3977
5876
|
"is-main": false,
|
|
3978
|
-
onClose:
|
|
3979
|
-
})
|
|
5877
|
+
onClose: onModalClose
|
|
5878
|
+
}, null, 8, ["id"])
|
|
3980
5879
|
]),
|
|
3981
5880
|
_: 1
|
|
3982
5881
|
/* STABLE */
|
|
3983
5882
|
})) : createCommentVNode("v-if", true),
|
|
3984
5883
|
createVNode(unref(CheckInAccess), {
|
|
3985
|
-
onClose: _cache[
|
|
5884
|
+
onClose: _cache[0] || (_cache[0] = ($event) => isAsking.value = false)
|
|
3986
5885
|
}),
|
|
3987
5886
|
createVNode(unref(CheckInScanner), {
|
|
3988
5887
|
onScanned,
|
|
3989
|
-
onClose: _cache[
|
|
5888
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isScanning.value = false)
|
|
3990
5889
|
}),
|
|
3991
5890
|
createCommentVNode(' <CheckInScanError @close="isScanError = false" />\n <CheckInScanSuccess @close="isScanned = false" /> ')
|
|
3992
5891
|
])
|
|
@@ -4001,6 +5900,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4001
5900
|
peeks: ["modal"],
|
|
4002
5901
|
excludes: ["create"],
|
|
4003
5902
|
columns: ["type", "checkInAt", "staff", "building"],
|
|
5903
|
+
filters: ["type", "building"],
|
|
5904
|
+
sorts: ["checkInAt"],
|
|
4004
5905
|
"is-ready": "",
|
|
4005
5906
|
"is-main": ""
|
|
4006
5907
|
}, {
|
|
@@ -4021,7 +5922,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4021
5922
|
]),
|
|
4022
5923
|
_: 1
|
|
4023
5924
|
/* STABLE */
|
|
4024
|
-
}, 8, ["query"])
|
|
5925
|
+
}, 8, ["query"]),
|
|
5926
|
+
createCommentVNode(" <NeonDisplayFooter /> ")
|
|
4025
5927
|
])
|
|
4026
5928
|
]),
|
|
4027
5929
|
_: 1
|
|
@@ -4031,17 +5933,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4031
5933
|
};
|
|
4032
5934
|
}
|
|
4033
5935
|
});
|
|
4034
|
-
const
|
|
4035
|
-
const
|
|
4036
|
-
const target = sfc.__vccOpts || sfc;
|
|
4037
|
-
for (const [key, val] of props) {
|
|
4038
|
-
target[key] = val;
|
|
4039
|
-
}
|
|
4040
|
-
return target;
|
|
4041
|
-
};
|
|
4042
|
-
const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3ba48e60"]]);
|
|
5936
|
+
const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_4069e2ed_lang = "";
|
|
5937
|
+
const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4069e2ed"]]);
|
|
4043
5938
|
const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4044
|
-
const _sfc_main$
|
|
5939
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
4045
5940
|
__name: "CheckInSingle",
|
|
4046
5941
|
setup(__props) {
|
|
4047
5942
|
const {
|
|
@@ -4139,7 +6034,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
4139
6034
|
}
|
|
4140
6035
|
});
|
|
4141
6036
|
const CheckInSingle_vue_vue_type_style_index_0_scoped_2e2803fb_lang = "";
|
|
4142
|
-
const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6037
|
+
const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-2e2803fb"]]);
|
|
4143
6038
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-d23b6de5"), n = n(), popScopeId(), n);
|
|
4144
6039
|
const _hoisted_1$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode(
|
|
4145
6040
|
"h4",
|
|
@@ -4159,7 +6054,7 @@ const _hoisted_2$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
4159
6054
|
-1
|
|
4160
6055
|
/* HOISTED */
|
|
4161
6056
|
));
|
|
4162
|
-
const _sfc_main$
|
|
6057
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
4163
6058
|
__name: "CheckInAccess",
|
|
4164
6059
|
emits: ["close"],
|
|
4165
6060
|
setup(__props) {
|
|
@@ -4212,9 +6107,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4212
6107
|
}
|
|
4213
6108
|
});
|
|
4214
6109
|
const CheckInAccess_vue_vue_type_style_index_0_scoped_d23b6de5_lang = "";
|
|
4215
|
-
const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6110
|
+
const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d23b6de5"]]);
|
|
4216
6111
|
const _hoisted_1$4 = { class: "buttons" };
|
|
4217
|
-
const _sfc_main$
|
|
6112
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
4218
6113
|
__name: "CheckInScanError",
|
|
4219
6114
|
setup(__props) {
|
|
4220
6115
|
const attendanceStore = useAttendanceStore();
|
|
@@ -4261,106 +6156,106 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4261
6156
|
};
|
|
4262
6157
|
}
|
|
4263
6158
|
});
|
|
4264
|
-
class
|
|
4265
|
-
constructor(
|
|
4266
|
-
this._legacyCanvasSize =
|
|
6159
|
+
class e2 {
|
|
6160
|
+
constructor(a3, b3, c2, d4, f2) {
|
|
6161
|
+
this._legacyCanvasSize = e2.DEFAULT_CANVAS_SIZE;
|
|
4267
6162
|
this._preferredCamera = "environment";
|
|
4268
6163
|
this._maxScansPerSecond = 25;
|
|
4269
6164
|
this._lastScanTimestamp = -1;
|
|
4270
6165
|
this._destroyed = this._flashOn = this._paused = this._active = false;
|
|
4271
|
-
this.$video =
|
|
6166
|
+
this.$video = a3;
|
|
4272
6167
|
this.$canvas = document.createElement("canvas");
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
this._onDecodeError =
|
|
4276
|
-
this._calculateScanRegion =
|
|
4277
|
-
this._preferredCamera =
|
|
4278
|
-
this._legacyCanvasSize = "number" === typeof
|
|
4279
|
-
this._maxScansPerSecond =
|
|
6168
|
+
c2 && "object" === typeof c2 ? this._onDecode = b3 : (c2 || d4 || f2 ? console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future") : console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."), this._legacyOnDecode = b3);
|
|
6169
|
+
b3 = "object" === typeof c2 ? c2 : {};
|
|
6170
|
+
this._onDecodeError = b3.onDecodeError || ("function" === typeof c2 ? c2 : this._onDecodeError);
|
|
6171
|
+
this._calculateScanRegion = b3.calculateScanRegion || ("function" === typeof d4 ? d4 : this._calculateScanRegion);
|
|
6172
|
+
this._preferredCamera = b3.preferredCamera || f2 || this._preferredCamera;
|
|
6173
|
+
this._legacyCanvasSize = "number" === typeof c2 ? c2 : "number" === typeof d4 ? d4 : this._legacyCanvasSize;
|
|
6174
|
+
this._maxScansPerSecond = b3.maxScansPerSecond || this._maxScansPerSecond;
|
|
4280
6175
|
this._onPlay = this._onPlay.bind(this);
|
|
4281
6176
|
this._onLoadedMetaData = this._onLoadedMetaData.bind(this);
|
|
4282
6177
|
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
4283
6178
|
this._updateOverlay = this._updateOverlay.bind(this);
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
let
|
|
4288
|
-
|
|
4289
|
-
document.body.contains(
|
|
4290
|
-
|
|
4291
|
-
if (
|
|
4292
|
-
|
|
4293
|
-
this.$overlay =
|
|
6179
|
+
a3.disablePictureInPicture = true;
|
|
6180
|
+
a3.playsInline = true;
|
|
6181
|
+
a3.muted = true;
|
|
6182
|
+
let h4 = false;
|
|
6183
|
+
a3.hidden && (a3.hidden = false, h4 = true);
|
|
6184
|
+
document.body.contains(a3) || (document.body.appendChild(a3), h4 = true);
|
|
6185
|
+
c2 = a3.parentElement;
|
|
6186
|
+
if (b3.highlightScanRegion || b3.highlightCodeOutline) {
|
|
6187
|
+
d4 = !!b3.overlay;
|
|
6188
|
+
this.$overlay = b3.overlay || document.createElement("div");
|
|
4294
6189
|
f2 = this.$overlay.style;
|
|
4295
6190
|
f2.position = "absolute";
|
|
4296
6191
|
f2.display = "none";
|
|
4297
6192
|
f2.pointerEvents = "none";
|
|
4298
6193
|
this.$overlay.classList.add("scan-region-highlight");
|
|
4299
|
-
if (!
|
|
6194
|
+
if (!d4 && b3.highlightScanRegion) {
|
|
4300
6195
|
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>';
|
|
4301
6196
|
try {
|
|
4302
6197
|
this.$overlay.firstElementChild.animate({ transform: [
|
|
4303
6198
|
"scale(.98)",
|
|
4304
6199
|
"scale(1.01)"
|
|
4305
6200
|
] }, { duration: 400, iterations: Infinity, direction: "alternate", easing: "ease-in-out" });
|
|
4306
|
-
} catch (
|
|
6201
|
+
} catch (m3) {
|
|
4307
6202
|
}
|
|
4308
|
-
|
|
6203
|
+
c2.insertBefore(this.$overlay, this.$video.nextSibling);
|
|
4309
6204
|
}
|
|
4310
|
-
|
|
6205
|
+
b3.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);
|
|
4311
6206
|
}
|
|
4312
|
-
this._scanRegion = this._calculateScanRegion(
|
|
6207
|
+
this._scanRegion = this._calculateScanRegion(a3);
|
|
4313
6208
|
requestAnimationFrame(() => {
|
|
4314
|
-
let
|
|
4315
|
-
"none" ===
|
|
4316
|
-
"visible" !==
|
|
4317
|
-
|
|
6209
|
+
let m3 = window.getComputedStyle(a3);
|
|
6210
|
+
"none" === m3.display && (a3.style.setProperty("display", "block", "important"), h4 = true);
|
|
6211
|
+
"visible" !== m3.visibility && (a3.style.setProperty("visibility", "visible", "important"), h4 = true);
|
|
6212
|
+
h4 && (console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."), a3.style.opacity = "0", a3.style.width = "0", a3.style.height = "0", this.$overlay && this.$overlay.parentElement && this.$overlay.parentElement.removeChild(this.$overlay), delete this.$overlay, delete this.$codeOutlineHighlight);
|
|
4318
6213
|
this.$overlay && this._updateOverlay();
|
|
4319
6214
|
});
|
|
4320
|
-
|
|
4321
|
-
|
|
6215
|
+
a3.addEventListener("play", this._onPlay);
|
|
6216
|
+
a3.addEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4322
6217
|
document.addEventListener("visibilitychange", this._onVisibilityChange);
|
|
4323
6218
|
window.addEventListener("resize", this._updateOverlay);
|
|
4324
|
-
this._qrEnginePromise =
|
|
6219
|
+
this._qrEnginePromise = e2.createQrEngine();
|
|
4325
6220
|
}
|
|
4326
|
-
static set WORKER_PATH(
|
|
6221
|
+
static set WORKER_PATH(a3) {
|
|
4327
6222
|
console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.");
|
|
4328
6223
|
}
|
|
4329
6224
|
static async hasCamera() {
|
|
4330
6225
|
try {
|
|
4331
|
-
return !!(await
|
|
4332
|
-
} catch (
|
|
6226
|
+
return !!(await e2.listCameras(false)).length;
|
|
6227
|
+
} catch (a3) {
|
|
4333
6228
|
return false;
|
|
4334
6229
|
}
|
|
4335
6230
|
}
|
|
4336
|
-
static async listCameras(
|
|
6231
|
+
static async listCameras(a3 = false) {
|
|
4337
6232
|
if (!navigator.mediaDevices)
|
|
4338
6233
|
return [];
|
|
4339
|
-
let
|
|
6234
|
+
let b3 = async () => (await navigator.mediaDevices.enumerateDevices()).filter((d4) => "videoinput" === d4.kind), c2;
|
|
4340
6235
|
try {
|
|
4341
|
-
|
|
4342
|
-
} catch (
|
|
6236
|
+
a3 && (await b3()).every((d4) => !d4.label) && (c2 = await navigator.mediaDevices.getUserMedia({ audio: false, video: true }));
|
|
6237
|
+
} catch (d4) {
|
|
4343
6238
|
}
|
|
4344
6239
|
try {
|
|
4345
|
-
return (await
|
|
6240
|
+
return (await b3()).map((d4, f2) => ({ id: d4.deviceId, label: d4.label || (0 === f2 ? "Default Camera" : `Camera ${f2 + 1}`) }));
|
|
4346
6241
|
} finally {
|
|
4347
|
-
|
|
6242
|
+
c2 && (console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"), e2._stopVideoStream(c2));
|
|
4348
6243
|
}
|
|
4349
6244
|
}
|
|
4350
6245
|
async hasFlash() {
|
|
4351
|
-
let
|
|
6246
|
+
let a3;
|
|
4352
6247
|
try {
|
|
4353
6248
|
if (this.$video.srcObject) {
|
|
4354
6249
|
if (!(this.$video.srcObject instanceof MediaStream))
|
|
4355
6250
|
return false;
|
|
4356
|
-
|
|
6251
|
+
a3 = this.$video.srcObject;
|
|
4357
6252
|
} else
|
|
4358
|
-
|
|
4359
|
-
return "torch" in
|
|
4360
|
-
} catch (
|
|
6253
|
+
a3 = (await this._getCameraStream()).stream;
|
|
6254
|
+
return "torch" in a3.getVideoTracks()[0].getSettings();
|
|
6255
|
+
} catch (b3) {
|
|
4361
6256
|
return false;
|
|
4362
6257
|
} finally {
|
|
4363
|
-
|
|
6258
|
+
a3 && a3 !== this.$video.srcObject && (console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"), e2._stopVideoStream(a3));
|
|
4364
6259
|
}
|
|
4365
6260
|
}
|
|
4366
6261
|
isFlashOn() {
|
|
@@ -4375,8 +6270,8 @@ class e {
|
|
|
4375
6270
|
if (!await this.hasFlash())
|
|
4376
6271
|
throw "No flash available";
|
|
4377
6272
|
await this.$video.srcObject.getVideoTracks()[0].applyConstraints({ advanced: [{ torch: true }] });
|
|
4378
|
-
} catch (
|
|
4379
|
-
throw this._flashOn = false,
|
|
6273
|
+
} catch (a3) {
|
|
6274
|
+
throw this._flashOn = false, a3;
|
|
4380
6275
|
}
|
|
4381
6276
|
}
|
|
4382
6277
|
async turnFlashOff() {
|
|
@@ -4393,7 +6288,7 @@ class e {
|
|
|
4393
6288
|
this._destroyed = true;
|
|
4394
6289
|
this._flashOn = false;
|
|
4395
6290
|
this.stop();
|
|
4396
|
-
|
|
6291
|
+
e2._postWorkerMessage(this._qrEnginePromise, "close");
|
|
4397
6292
|
}
|
|
4398
6293
|
async start() {
|
|
4399
6294
|
if (this._destroyed)
|
|
@@ -4404,12 +6299,12 @@ class e {
|
|
|
4404
6299
|
await this.$video.play();
|
|
4405
6300
|
else
|
|
4406
6301
|
try {
|
|
4407
|
-
let { stream:
|
|
4408
|
-
!this._active || this._paused ?
|
|
6302
|
+
let { stream: a3, facingMode: b3 } = await this._getCameraStream();
|
|
6303
|
+
!this._active || this._paused ? e2._stopVideoStream(a3) : (this._setVideoMirror(b3), this.$video.srcObject = a3, await this.$video.play(), this._flashOn && (this._flashOn = false, this.turnFlashOn().catch(() => {
|
|
4409
6304
|
})));
|
|
4410
|
-
} catch (
|
|
6305
|
+
} catch (a3) {
|
|
4411
6306
|
if (!this._paused)
|
|
4412
|
-
throw this._active = false,
|
|
6307
|
+
throw this._active = false, a3;
|
|
4413
6308
|
}
|
|
4414
6309
|
}
|
|
4415
6310
|
}
|
|
@@ -4417,93 +6312,93 @@ class e {
|
|
|
4417
6312
|
this.pause();
|
|
4418
6313
|
this._active = false;
|
|
4419
6314
|
}
|
|
4420
|
-
async pause(
|
|
6315
|
+
async pause(a3 = false) {
|
|
4421
6316
|
this._paused = true;
|
|
4422
6317
|
if (!this._active)
|
|
4423
6318
|
return true;
|
|
4424
6319
|
this.$video.pause();
|
|
4425
6320
|
this.$overlay && (this.$overlay.style.display = "none");
|
|
4426
|
-
let
|
|
4427
|
-
this.$video.srcObject instanceof MediaStream && (
|
|
6321
|
+
let b3 = () => {
|
|
6322
|
+
this.$video.srcObject instanceof MediaStream && (e2._stopVideoStream(this.$video.srcObject), this.$video.srcObject = null);
|
|
4428
6323
|
};
|
|
4429
|
-
if (
|
|
4430
|
-
return
|
|
4431
|
-
await new Promise((
|
|
6324
|
+
if (a3)
|
|
6325
|
+
return b3(), true;
|
|
6326
|
+
await new Promise((c2) => setTimeout(c2, 300));
|
|
4432
6327
|
if (!this._paused)
|
|
4433
6328
|
return false;
|
|
4434
|
-
|
|
6329
|
+
b3();
|
|
4435
6330
|
return true;
|
|
4436
6331
|
}
|
|
4437
|
-
async setCamera(
|
|
4438
|
-
|
|
6332
|
+
async setCamera(a3) {
|
|
6333
|
+
a3 !== this._preferredCamera && (this._preferredCamera = a3, await this._restartVideoStream());
|
|
4439
6334
|
}
|
|
4440
|
-
static async scanImage(
|
|
4441
|
-
let
|
|
4442
|
-
|
|
4443
|
-
|
|
6335
|
+
static async scanImage(a3, b3, c2, d4, f2 = false, h4 = false) {
|
|
6336
|
+
let m3, n = false;
|
|
6337
|
+
b3 && ("scanRegion" in b3 || "qrEngine" in b3 || "canvas" in b3 || "disallowCanvasResizing" in b3 || "alsoTryWithoutScanRegion" in b3 || "returnDetailedScanResult" in b3) ? (m3 = b3.scanRegion, c2 = b3.qrEngine, d4 = b3.canvas, f2 = b3.disallowCanvasResizing || false, h4 = b3.alsoTryWithoutScanRegion || false, n = true) : b3 || c2 || d4 || f2 || h4 ? console.warn("You're using a deprecated api for scanImage which will be removed in the future.") : console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.");
|
|
6338
|
+
b3 = !!c2;
|
|
4444
6339
|
try {
|
|
4445
|
-
let p,
|
|
4446
|
-
[
|
|
4447
|
-
[
|
|
4448
|
-
let
|
|
4449
|
-
if (
|
|
4450
|
-
let g =
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
let
|
|
4454
|
-
|
|
4455
|
-
|
|
6340
|
+
let p, k2;
|
|
6341
|
+
[c2, p] = await Promise.all([c2 || e2.createQrEngine(), e2._loadImage(a3)]);
|
|
6342
|
+
[d4, k2] = e2._drawToCanvas(p, m3, d4, f2);
|
|
6343
|
+
let q2;
|
|
6344
|
+
if (c2 instanceof Worker) {
|
|
6345
|
+
let g = c2;
|
|
6346
|
+
b3 || e2._postWorkerMessageSync(g, "inversionMode", "both");
|
|
6347
|
+
q2 = await new Promise((l2, v2) => {
|
|
6348
|
+
let w2, u2, r2, y3 = -1;
|
|
6349
|
+
u2 = (t3) => {
|
|
6350
|
+
t3.data.id === y3 && (g.removeEventListener("message", u2), g.removeEventListener("error", r2), clearTimeout(w2), null !== t3.data.data ? l2({ data: t3.data.data, cornerPoints: e2._convertPoints(t3.data.cornerPoints, m3) }) : v2(e2.NO_QR_CODE_FOUND));
|
|
4456
6351
|
};
|
|
4457
|
-
r2 = (
|
|
4458
|
-
g.removeEventListener("message",
|
|
6352
|
+
r2 = (t3) => {
|
|
6353
|
+
g.removeEventListener("message", u2);
|
|
4459
6354
|
g.removeEventListener("error", r2);
|
|
4460
|
-
clearTimeout(
|
|
4461
|
-
v2("Scanner error: " + (
|
|
6355
|
+
clearTimeout(w2);
|
|
6356
|
+
v2("Scanner error: " + (t3 ? t3.message || t3 : "Unknown Error"));
|
|
4462
6357
|
};
|
|
4463
|
-
g.addEventListener("message",
|
|
6358
|
+
g.addEventListener("message", u2);
|
|
4464
6359
|
g.addEventListener("error", r2);
|
|
4465
|
-
|
|
4466
|
-
let
|
|
4467
|
-
|
|
6360
|
+
w2 = setTimeout(() => r2("timeout"), 1e4);
|
|
6361
|
+
let x2 = k2.getImageData(0, 0, d4.width, d4.height);
|
|
6362
|
+
y3 = e2._postWorkerMessageSync(g, "decode", x2, [x2.data.buffer]);
|
|
4468
6363
|
});
|
|
4469
6364
|
} else
|
|
4470
|
-
|
|
6365
|
+
q2 = await Promise.race([new Promise((g, l2) => window.setTimeout(() => l2("Scanner error: timeout"), 1e4)), (async () => {
|
|
4471
6366
|
try {
|
|
4472
|
-
var [g] = await
|
|
6367
|
+
var [g] = await c2.detect(d4);
|
|
4473
6368
|
if (!g)
|
|
4474
|
-
throw
|
|
4475
|
-
return { data: g.rawValue, cornerPoints:
|
|
6369
|
+
throw e2.NO_QR_CODE_FOUND;
|
|
6370
|
+
return { data: g.rawValue, cornerPoints: e2._convertPoints(g.cornerPoints, m3) };
|
|
4476
6371
|
} catch (l2) {
|
|
4477
6372
|
g = l2.message || l2;
|
|
4478
6373
|
if (/not implemented|service unavailable/.test(g))
|
|
4479
|
-
return
|
|
6374
|
+
return e2._disableBarcodeDetector = true, e2.scanImage(a3, { scanRegion: m3, canvas: d4, disallowCanvasResizing: f2, alsoTryWithoutScanRegion: h4 });
|
|
4480
6375
|
throw `Scanner error: ${g}`;
|
|
4481
6376
|
}
|
|
4482
6377
|
})()]);
|
|
4483
|
-
return n ?
|
|
6378
|
+
return n ? q2 : q2.data;
|
|
4484
6379
|
} catch (p) {
|
|
4485
|
-
if (!
|
|
6380
|
+
if (!m3 || !h4)
|
|
4486
6381
|
throw p;
|
|
4487
|
-
let
|
|
4488
|
-
return n ?
|
|
6382
|
+
let k2 = await e2.scanImage(a3, { qrEngine: c2, canvas: d4, disallowCanvasResizing: f2 });
|
|
6383
|
+
return n ? k2 : k2.data;
|
|
4489
6384
|
} finally {
|
|
4490
|
-
|
|
6385
|
+
b3 || e2._postWorkerMessage(c2, "close");
|
|
4491
6386
|
}
|
|
4492
6387
|
}
|
|
4493
|
-
setGrayscaleWeights(
|
|
4494
|
-
|
|
4495
|
-
red:
|
|
4496
|
-
green:
|
|
4497
|
-
blue:
|
|
4498
|
-
useIntegerApproximation:
|
|
6388
|
+
setGrayscaleWeights(a3, b3, c2, d4 = true) {
|
|
6389
|
+
e2._postWorkerMessage(this._qrEnginePromise, "grayscaleWeights", {
|
|
6390
|
+
red: a3,
|
|
6391
|
+
green: b3,
|
|
6392
|
+
blue: c2,
|
|
6393
|
+
useIntegerApproximation: d4
|
|
4499
6394
|
});
|
|
4500
6395
|
}
|
|
4501
|
-
setInversionMode(
|
|
4502
|
-
|
|
6396
|
+
setInversionMode(a3) {
|
|
6397
|
+
e2._postWorkerMessage(this._qrEnginePromise, "inversionMode", a3);
|
|
4503
6398
|
}
|
|
4504
|
-
static async createQrEngine(
|
|
4505
|
-
|
|
4506
|
-
return !
|
|
6399
|
+
static async createQrEngine(a3) {
|
|
6400
|
+
a3 && console.warn("Specifying a worker path is not required and not supported anymore.");
|
|
6401
|
+
return !e2._disableBarcodeDetector && "BarcodeDetector" in window && BarcodeDetector.getSupportedFormats && (await BarcodeDetector.getSupportedFormats()).includes("qr_code") ? new BarcodeDetector({ formats: ["qr_code"] }) : Promise.resolve().then(() => qrScannerWorker_min).then((b3) => b3.createWorker());
|
|
4507
6402
|
}
|
|
4508
6403
|
_onPlay() {
|
|
4509
6404
|
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
@@ -4518,13 +6413,13 @@ class e {
|
|
|
4518
6413
|
_onVisibilityChange() {
|
|
4519
6414
|
document.hidden ? this.pause() : this._active && this.start();
|
|
4520
6415
|
}
|
|
4521
|
-
_calculateScanRegion(
|
|
4522
|
-
let
|
|
6416
|
+
_calculateScanRegion(a3) {
|
|
6417
|
+
let b3 = Math.round(2 / 3 * Math.min(a3.videoWidth, a3.videoHeight));
|
|
4523
6418
|
return {
|
|
4524
|
-
x: Math.round((
|
|
4525
|
-
y: Math.round((
|
|
4526
|
-
width:
|
|
4527
|
-
height:
|
|
6419
|
+
x: Math.round((a3.videoWidth - b3) / 2),
|
|
6420
|
+
y: Math.round((a3.videoHeight - b3) / 2),
|
|
6421
|
+
width: b3,
|
|
6422
|
+
height: b3,
|
|
4528
6423
|
downScaledWidth: this._legacyCanvasSize,
|
|
4529
6424
|
downScaledHeight: this._legacyCanvasSize
|
|
4530
6425
|
};
|
|
@@ -4532,152 +6427,152 @@ class e {
|
|
|
4532
6427
|
_updateOverlay() {
|
|
4533
6428
|
requestAnimationFrame(() => {
|
|
4534
6429
|
if (this.$overlay) {
|
|
4535
|
-
var
|
|
6430
|
+
var a3 = this.$video, b3 = a3.videoWidth, c2 = a3.videoHeight, d4 = a3.offsetWidth, f2 = a3.offsetHeight, h4 = a3.offsetLeft, m3 = a3.offsetTop, n = window.getComputedStyle(a3), p = n.objectFit, k2 = b3 / c2, q2 = d4 / f2;
|
|
4536
6431
|
switch (p) {
|
|
4537
6432
|
case "none":
|
|
4538
|
-
var g =
|
|
4539
|
-
var l2 =
|
|
6433
|
+
var g = b3;
|
|
6434
|
+
var l2 = c2;
|
|
4540
6435
|
break;
|
|
4541
6436
|
case "fill":
|
|
4542
|
-
g =
|
|
6437
|
+
g = d4;
|
|
4543
6438
|
l2 = f2;
|
|
4544
6439
|
break;
|
|
4545
6440
|
default:
|
|
4546
|
-
("cover" === p ?
|
|
6441
|
+
("cover" === p ? k2 > q2 : k2 < q2) ? (l2 = f2, g = l2 * k2) : (g = d4, l2 = g / k2), "scale-down" === p && (g = Math.min(g, b3), l2 = Math.min(l2, c2));
|
|
4547
6442
|
}
|
|
4548
|
-
var [v2,
|
|
4549
|
-
const
|
|
4550
|
-
return r2.endsWith("%") ? (
|
|
6443
|
+
var [v2, w2] = n.objectPosition.split(" ").map((r2, y3) => {
|
|
6444
|
+
const x2 = parseFloat(r2);
|
|
6445
|
+
return r2.endsWith("%") ? (y3 ? f2 - l2 : d4 - g) * x2 / 100 : x2;
|
|
4551
6446
|
});
|
|
4552
|
-
n = this._scanRegion.width ||
|
|
4553
|
-
|
|
6447
|
+
n = this._scanRegion.width || b3;
|
|
6448
|
+
q2 = this._scanRegion.height || c2;
|
|
4554
6449
|
p = this._scanRegion.x || 0;
|
|
4555
|
-
var
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
6450
|
+
var u2 = this._scanRegion.y || 0;
|
|
6451
|
+
k2 = this.$overlay.style;
|
|
6452
|
+
k2.width = `${n / b3 * g}px`;
|
|
6453
|
+
k2.height = `${q2 / c2 * l2}px`;
|
|
6454
|
+
k2.top = `${m3 + w2 + u2 / c2 * l2}px`;
|
|
6455
|
+
c2 = /scaleX\(-1\)/.test(a3.style.transform);
|
|
6456
|
+
k2.left = `${h4 + (c2 ? d4 - v2 - g : v2) + (c2 ? b3 - p - n : p) / b3 * g}px`;
|
|
6457
|
+
k2.transform = a3.style.transform;
|
|
4563
6458
|
}
|
|
4564
6459
|
});
|
|
4565
6460
|
}
|
|
4566
|
-
static _convertPoints(
|
|
4567
|
-
if (!
|
|
4568
|
-
return
|
|
4569
|
-
let
|
|
4570
|
-
|
|
4571
|
-
for (let
|
|
4572
|
-
|
|
4573
|
-
return
|
|
6461
|
+
static _convertPoints(a3, b3) {
|
|
6462
|
+
if (!b3)
|
|
6463
|
+
return a3;
|
|
6464
|
+
let c2 = b3.x || 0, d4 = b3.y || 0, f2 = b3.width && b3.downScaledWidth ? b3.width / b3.downScaledWidth : 1;
|
|
6465
|
+
b3 = b3.height && b3.downScaledHeight ? b3.height / b3.downScaledHeight : 1;
|
|
6466
|
+
for (let h4 of a3)
|
|
6467
|
+
h4.x = h4.x * f2 + c2, h4.y = h4.y * b3 + d4;
|
|
6468
|
+
return a3;
|
|
4574
6469
|
}
|
|
4575
6470
|
_scanFrame() {
|
|
4576
6471
|
!this._active || this.$video.paused || this.$video.ended || ("requestVideoFrameCallback" in this.$video ? this.$video.requestVideoFrameCallback.bind(this.$video) : requestAnimationFrame)(async () => {
|
|
4577
6472
|
if (!(1 >= this.$video.readyState)) {
|
|
4578
|
-
var
|
|
4579
|
-
|
|
6473
|
+
var a3 = Date.now() - this._lastScanTimestamp, b3 = 1e3 / this._maxScansPerSecond;
|
|
6474
|
+
a3 < b3 && await new Promise((d4) => setTimeout(d4, b3 - a3));
|
|
4580
6475
|
this._lastScanTimestamp = Date.now();
|
|
4581
6476
|
try {
|
|
4582
|
-
var
|
|
6477
|
+
var c2 = await e2.scanImage(
|
|
4583
6478
|
this.$video,
|
|
4584
6479
|
{ scanRegion: this._scanRegion, qrEngine: this._qrEnginePromise, canvas: this.$canvas }
|
|
4585
6480
|
);
|
|
4586
|
-
} catch (
|
|
6481
|
+
} catch (d4) {
|
|
4587
6482
|
if (!this._active)
|
|
4588
6483
|
return;
|
|
4589
|
-
this._onDecodeError(
|
|
6484
|
+
this._onDecodeError(d4);
|
|
4590
6485
|
}
|
|
4591
|
-
!
|
|
4592
|
-
|
|
6486
|
+
!e2._disableBarcodeDetector || await this._qrEnginePromise instanceof Worker || (this._qrEnginePromise = e2.createQrEngine());
|
|
6487
|
+
c2 ? (this._onDecode ? this._onDecode(c2) : this._legacyOnDecode && this._legacyOnDecode(c2.data), this.$codeOutlineHighlight && (clearTimeout(this._codeOutlineHighlightRemovalTimeout), this._codeOutlineHighlightRemovalTimeout = void 0, this.$codeOutlineHighlight.setAttribute(
|
|
4593
6488
|
"viewBox",
|
|
4594
6489
|
`${this._scanRegion.x || 0} ${this._scanRegion.y || 0} ${this._scanRegion.width || this.$video.videoWidth} ${this._scanRegion.height || this.$video.videoHeight}`
|
|
4595
|
-
), this.$codeOutlineHighlight.firstElementChild.setAttribute("points",
|
|
6490
|
+
), this.$codeOutlineHighlight.firstElementChild.setAttribute("points", c2.cornerPoints.map(({ x: d4, y: f2 }) => `${d4},${f2}`).join(" ")), this.$codeOutlineHighlight.style.display = "")) : this.$codeOutlineHighlight && !this._codeOutlineHighlightRemovalTimeout && (this._codeOutlineHighlightRemovalTimeout = setTimeout(() => this.$codeOutlineHighlight.style.display = "none", 100));
|
|
4596
6491
|
}
|
|
4597
6492
|
this._scanFrame();
|
|
4598
6493
|
});
|
|
4599
6494
|
}
|
|
4600
|
-
_onDecodeError(
|
|
4601
|
-
|
|
6495
|
+
_onDecodeError(a3) {
|
|
6496
|
+
a3 !== e2.NO_QR_CODE_FOUND && console.log(a3);
|
|
4602
6497
|
}
|
|
4603
6498
|
async _getCameraStream() {
|
|
4604
6499
|
if (!navigator.mediaDevices)
|
|
4605
6500
|
throw "Camera not found.";
|
|
4606
|
-
let
|
|
4607
|
-
for (let
|
|
6501
|
+
let a3 = /^(environment|user)$/.test(this._preferredCamera) ? "facingMode" : "deviceId", b3 = [{ width: { min: 1024 } }, { width: { min: 768 } }, {}], c2 = b3.map((d4) => Object.assign({}, d4, { [a3]: { exact: this._preferredCamera } }));
|
|
6502
|
+
for (let d4 of [...c2, ...b3])
|
|
4608
6503
|
try {
|
|
4609
|
-
let f2 = await navigator.mediaDevices.getUserMedia({ video:
|
|
4610
|
-
return { stream: f2, facingMode:
|
|
6504
|
+
let f2 = await navigator.mediaDevices.getUserMedia({ video: d4, audio: false }), h4 = this._getFacingMode(f2) || (d4.facingMode ? this._preferredCamera : "environment" === this._preferredCamera ? "user" : "environment");
|
|
6505
|
+
return { stream: f2, facingMode: h4 };
|
|
4611
6506
|
} catch (f2) {
|
|
4612
6507
|
}
|
|
4613
6508
|
throw "Camera not found.";
|
|
4614
6509
|
}
|
|
4615
6510
|
async _restartVideoStream() {
|
|
4616
|
-
let
|
|
4617
|
-
await this.pause(true) && !
|
|
4618
|
-
}
|
|
4619
|
-
static _stopVideoStream(
|
|
4620
|
-
for (let
|
|
4621
|
-
|
|
4622
|
-
}
|
|
4623
|
-
_setVideoMirror(
|
|
4624
|
-
this.$video.style.transform = "scaleX(" + ("user" ===
|
|
4625
|
-
}
|
|
4626
|
-
_getFacingMode(
|
|
4627
|
-
return (
|
|
4628
|
-
}
|
|
4629
|
-
static _drawToCanvas(
|
|
4630
|
-
|
|
4631
|
-
let f2 =
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
return [
|
|
4637
|
-
}
|
|
4638
|
-
static async _loadImage(
|
|
4639
|
-
if (
|
|
4640
|
-
return await
|
|
4641
|
-
if (
|
|
4642
|
-
return
|
|
4643
|
-
if (
|
|
4644
|
-
let
|
|
4645
|
-
|
|
6511
|
+
let a3 = this._paused;
|
|
6512
|
+
await this.pause(true) && !a3 && this._active && await this.start();
|
|
6513
|
+
}
|
|
6514
|
+
static _stopVideoStream(a3) {
|
|
6515
|
+
for (let b3 of a3.getTracks())
|
|
6516
|
+
b3.stop(), a3.removeTrack(b3);
|
|
6517
|
+
}
|
|
6518
|
+
_setVideoMirror(a3) {
|
|
6519
|
+
this.$video.style.transform = "scaleX(" + ("user" === a3 ? -1 : 1) + ")";
|
|
6520
|
+
}
|
|
6521
|
+
_getFacingMode(a3) {
|
|
6522
|
+
return (a3 = a3.getVideoTracks()[0]) ? /rear|back|environment/i.test(a3.label) ? "environment" : /front|user|face/i.test(a3.label) ? "user" : null : null;
|
|
6523
|
+
}
|
|
6524
|
+
static _drawToCanvas(a3, b3, c2, d4 = false) {
|
|
6525
|
+
c2 = c2 || document.createElement("canvas");
|
|
6526
|
+
let f2 = b3 && b3.x ? b3.x : 0, h4 = b3 && b3.y ? b3.y : 0, m3 = b3 && b3.width ? b3.width : a3.videoWidth || a3.width, n = b3 && b3.height ? b3.height : a3.videoHeight || a3.height;
|
|
6527
|
+
d4 || (d4 = b3 && b3.downScaledWidth ? b3.downScaledWidth : m3, b3 = b3 && b3.downScaledHeight ? b3.downScaledHeight : n, c2.width !== d4 && (c2.width = d4), c2.height !== b3 && (c2.height = b3));
|
|
6528
|
+
b3 = c2.getContext("2d", { alpha: false });
|
|
6529
|
+
b3.imageSmoothingEnabled = false;
|
|
6530
|
+
b3.drawImage(a3, f2, h4, m3, n, 0, 0, c2.width, c2.height);
|
|
6531
|
+
return [c2, b3];
|
|
6532
|
+
}
|
|
6533
|
+
static async _loadImage(a3) {
|
|
6534
|
+
if (a3 instanceof Image)
|
|
6535
|
+
return await e2._awaitImageLoad(a3), a3;
|
|
6536
|
+
if (a3 instanceof HTMLVideoElement || a3 instanceof HTMLCanvasElement || a3 instanceof SVGImageElement || "OffscreenCanvas" in window && a3 instanceof OffscreenCanvas || "ImageBitmap" in window && a3 instanceof ImageBitmap)
|
|
6537
|
+
return a3;
|
|
6538
|
+
if (a3 instanceof File || a3 instanceof Blob || a3 instanceof URL || "string" === typeof a3) {
|
|
6539
|
+
let b3 = new Image();
|
|
6540
|
+
b3.src = a3 instanceof File || a3 instanceof Blob ? URL.createObjectURL(a3) : a3.toString();
|
|
4646
6541
|
try {
|
|
4647
|
-
return await
|
|
6542
|
+
return await e2._awaitImageLoad(b3), b3;
|
|
4648
6543
|
} finally {
|
|
4649
|
-
(
|
|
6544
|
+
(a3 instanceof File || a3 instanceof Blob) && URL.revokeObjectURL(b3.src);
|
|
4650
6545
|
}
|
|
4651
6546
|
} else
|
|
4652
6547
|
throw "Unsupported image type.";
|
|
4653
6548
|
}
|
|
4654
|
-
static async _awaitImageLoad(
|
|
4655
|
-
|
|
4656
|
-
let
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
f2 instanceof ErrorEvent ?
|
|
6549
|
+
static async _awaitImageLoad(a3) {
|
|
6550
|
+
a3.complete && 0 !== a3.naturalWidth || await new Promise((b3, c2) => {
|
|
6551
|
+
let d4 = (f2) => {
|
|
6552
|
+
a3.removeEventListener("load", d4);
|
|
6553
|
+
a3.removeEventListener("error", d4);
|
|
6554
|
+
f2 instanceof ErrorEvent ? c2("Image load error") : b3();
|
|
4660
6555
|
};
|
|
4661
|
-
|
|
4662
|
-
|
|
6556
|
+
a3.addEventListener("load", d4);
|
|
6557
|
+
a3.addEventListener("error", d4);
|
|
4663
6558
|
});
|
|
4664
6559
|
}
|
|
4665
|
-
static async _postWorkerMessage(
|
|
4666
|
-
return
|
|
6560
|
+
static async _postWorkerMessage(a3, b3, c2, d4) {
|
|
6561
|
+
return e2._postWorkerMessageSync(await a3, b3, c2, d4);
|
|
4667
6562
|
}
|
|
4668
|
-
static _postWorkerMessageSync(
|
|
4669
|
-
if (!(
|
|
6563
|
+
static _postWorkerMessageSync(a3, b3, c2, d4) {
|
|
6564
|
+
if (!(a3 instanceof Worker))
|
|
4670
6565
|
return -1;
|
|
4671
|
-
let f2 =
|
|
4672
|
-
|
|
6566
|
+
let f2 = e2._workerMessageId++;
|
|
6567
|
+
a3.postMessage({ id: f2, type: b3, data: c2 }, d4);
|
|
4673
6568
|
return f2;
|
|
4674
6569
|
}
|
|
4675
6570
|
}
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
const Scanner =
|
|
6571
|
+
e2.DEFAULT_CANVAS_SIZE = 400;
|
|
6572
|
+
e2.NO_QR_CODE_FOUND = "No QR code found";
|
|
6573
|
+
e2._disableBarcodeDetector = false;
|
|
6574
|
+
e2._workerMessageId = 0;
|
|
6575
|
+
const Scanner = e2;
|
|
4681
6576
|
const _withScopeId = (n) => (pushScopeId("data-v-ef426ef3"), n = n(), popScopeId(), n);
|
|
4682
6577
|
const _hoisted_1$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
|
|
4683
6578
|
"div",
|
|
@@ -4695,7 +6590,7 @@ const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEl
|
|
|
4695
6590
|
));
|
|
4696
6591
|
const _hoisted_3 = ["onClick"];
|
|
4697
6592
|
const _hoisted_4 = { class: "mr-2 text-sm" };
|
|
4698
|
-
const _sfc_main$
|
|
6593
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
4699
6594
|
__name: "CheckInScanner",
|
|
4700
6595
|
emits: ["start", "stop", "scanned", "close"],
|
|
4701
6596
|
setup(__props, { emit }) {
|
|
@@ -4877,7 +6772,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4877
6772
|
}
|
|
4878
6773
|
});
|
|
4879
6774
|
const CheckInScanner_vue_vue_type_style_index_0_scoped_ef426ef3_lang = "";
|
|
4880
|
-
const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6775
|
+
const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-ef426ef3"]]);
|
|
4881
6776
|
const _hoisted_1$2 = /* @__PURE__ */ createElementVNode(
|
|
4882
6777
|
"h3",
|
|
4883
6778
|
{ align: "center" },
|
|
@@ -4885,7 +6780,7 @@ const _hoisted_1$2 = /* @__PURE__ */ createElementVNode(
|
|
|
4885
6780
|
-1
|
|
4886
6781
|
/* HOISTED */
|
|
4887
6782
|
);
|
|
4888
|
-
const _sfc_main$
|
|
6783
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
4889
6784
|
__name: "CheckInScanSuccess",
|
|
4890
6785
|
emits: ["close"],
|
|
4891
6786
|
setup(__props) {
|
|
@@ -4920,7 +6815,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4920
6815
|
const __default__$6 = defineComponent({
|
|
4921
6816
|
name: "CheckInCollection"
|
|
4922
6817
|
});
|
|
4923
|
-
const _sfc_main$
|
|
6818
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
4924
6819
|
...__default__$6,
|
|
4925
6820
|
setup(__props) {
|
|
4926
6821
|
useCollection();
|
|
@@ -4935,11 +6830,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4935
6830
|
};
|
|
4936
6831
|
}
|
|
4937
6832
|
});
|
|
4938
|
-
const StaffModel = models$
|
|
6833
|
+
const StaffModel = models$2.StaffModel;
|
|
4939
6834
|
const __default__$5 = defineComponent({
|
|
4940
6835
|
name: "StaffCollection"
|
|
4941
6836
|
});
|
|
4942
|
-
const _sfc_main$
|
|
6837
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
4943
6838
|
...__default__$5,
|
|
4944
6839
|
setup(__props) {
|
|
4945
6840
|
useCollection();
|
|
@@ -4956,7 +6851,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
4956
6851
|
});
|
|
4957
6852
|
const _hoisted_1$1 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
|
|
4958
6853
|
const _hoisted_2$1 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4959
|
-
const _sfc_main$
|
|
6854
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
4960
6855
|
__name: "StaffSingle",
|
|
4961
6856
|
setup(__props) {
|
|
4962
6857
|
const {
|
|
@@ -5029,7 +6924,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5029
6924
|
_: 1
|
|
5030
6925
|
/* STABLE */
|
|
5031
6926
|
}),
|
|
5032
|
-
createCommentVNode(
|
|
6927
|
+
createCommentVNode(" IDENTITAS "),
|
|
6928
|
+
createVNode(unref(OfficeTab), {
|
|
6929
|
+
handle: "identity",
|
|
6930
|
+
icon: "key",
|
|
6931
|
+
title: "Identitas"
|
|
6932
|
+
}, {
|
|
6933
|
+
default: withCtx(() => [
|
|
6934
|
+
createVNode(unref(_sfc_main$a))
|
|
6935
|
+
]),
|
|
6936
|
+
_: 1
|
|
6937
|
+
/* STABLE */
|
|
6938
|
+
}),
|
|
5033
6939
|
createCommentVNode(" CABANG "),
|
|
5034
6940
|
createVNode(unref(OfficeTab), {
|
|
5035
6941
|
handle: "branch",
|
|
@@ -5101,9 +7007,113 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5101
7007
|
};
|
|
5102
7008
|
}
|
|
5103
7009
|
});
|
|
5104
|
-
const
|
|
5105
|
-
const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5106
|
-
const
|
|
7010
|
+
const StaffSingle_vue_vue_type_style_index_0_scoped_dedad3d9_lang = "";
|
|
7011
|
+
const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-dedad3d9"]]);
|
|
7012
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
7013
|
+
__name: "StaffIdentity",
|
|
7014
|
+
setup(__props) {
|
|
7015
|
+
const { values, saveOne, executeOne, syncOne } = useSingle();
|
|
7016
|
+
const StaffModel2 = models$2.StaffModel;
|
|
7017
|
+
const { client } = useClientHandle();
|
|
7018
|
+
const errors = ref({});
|
|
7019
|
+
const conflict = ref();
|
|
7020
|
+
const profile = computed(() => getProfile(values.value));
|
|
7021
|
+
async function onChoose(userId) {
|
|
7022
|
+
var _a;
|
|
7023
|
+
const resp = await client.query(
|
|
7024
|
+
GraphUtil.getMany(StaffModel2, {
|
|
7025
|
+
id: 1,
|
|
7026
|
+
flag: 1,
|
|
7027
|
+
display: 1,
|
|
7028
|
+
name: 1,
|
|
7029
|
+
birthDate: 1,
|
|
7030
|
+
branch: { id: 1, name: 1 }
|
|
7031
|
+
}),
|
|
7032
|
+
{
|
|
7033
|
+
filter: { userId },
|
|
7034
|
+
limit: 1,
|
|
7035
|
+
logs: ["error"]
|
|
7036
|
+
},
|
|
7037
|
+
{ requestPolicy: "network-only" }
|
|
7038
|
+
).toPromise();
|
|
7039
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[StaffModel2.plural];
|
|
7040
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
7041
|
+
const staff = items[0];
|
|
7042
|
+
const profile2 = getProfile(staff);
|
|
7043
|
+
conflict.value = profile2;
|
|
7044
|
+
}
|
|
7045
|
+
async function onRegister(payload) {
|
|
7046
|
+
const resp = await executeOne("registerUser", payload);
|
|
7047
|
+
const wrapper = resp.data.executeStaff;
|
|
7048
|
+
const info = wrapper.info;
|
|
7049
|
+
const output = wrapper.output;
|
|
7050
|
+
if (info.status === "error") {
|
|
7051
|
+
errors.value = info.messages;
|
|
7052
|
+
return;
|
|
7053
|
+
}
|
|
7054
|
+
return output == null ? void 0 : output.userId;
|
|
7055
|
+
}
|
|
7056
|
+
async function onConnect(userId) {
|
|
7057
|
+
values.value.userId = userId;
|
|
7058
|
+
await saveOne();
|
|
7059
|
+
}
|
|
7060
|
+
async function onDisconnect(payload) {
|
|
7061
|
+
await executeOne("updateUser", payload);
|
|
7062
|
+
values.value.userId = null;
|
|
7063
|
+
await saveOne();
|
|
7064
|
+
}
|
|
7065
|
+
async function onDelegate(payload) {
|
|
7066
|
+
await executeOne("updateUser", payload);
|
|
7067
|
+
await syncOne();
|
|
7068
|
+
}
|
|
7069
|
+
function getProfile(staff) {
|
|
7070
|
+
var _a;
|
|
7071
|
+
if (!staff)
|
|
7072
|
+
return;
|
|
7073
|
+
const user = staff.user;
|
|
7074
|
+
const branches = (_a = staff.branches) == null ? void 0 : _a.map((s4) => s4.name).join(", ");
|
|
7075
|
+
return {
|
|
7076
|
+
name: staff.name,
|
|
7077
|
+
image: user == null ? void 0 : user.image,
|
|
7078
|
+
detail: [branches].filter(Boolean)
|
|
7079
|
+
};
|
|
7080
|
+
}
|
|
7081
|
+
return (_ctx, _cache) => {
|
|
7082
|
+
return openBlock(), createBlock(unref(NeonFormWrapper), null, {
|
|
7083
|
+
default: withCtx(() => [
|
|
7084
|
+
createVNode(unref(OperasionalIdentitas), {
|
|
7085
|
+
user: unref(values).user,
|
|
7086
|
+
profile: unref(profile),
|
|
7087
|
+
conflict: conflict.value,
|
|
7088
|
+
roles: [
|
|
7089
|
+
{ id: "64101f7078ae4f8388b1d1e8", name: "Cabang Operasional" },
|
|
7090
|
+
{ id: "a6c43f08a59b4292e3d1357b", name: "Super Admin" },
|
|
7091
|
+
{ id: "641044c878ae4f8388b1d280", name: "Admin Operasional" },
|
|
7092
|
+
{ id: "6309c3c2e64a1324b8663dab", name: "Karyawan" }
|
|
7093
|
+
// { id: '', name: 'Admin Keuangan' },
|
|
7094
|
+
// { id: '', name: 'Cabang Keuangan' },
|
|
7095
|
+
// { id: '', name: 'Admin Operasional' },
|
|
7096
|
+
// { id: '', name: 'Operasional' },
|
|
7097
|
+
// { id: '', name: 'Admin Marketing' },
|
|
7098
|
+
// { id: '', name: 'Cabang Marketing' },
|
|
7099
|
+
// { id: '', name: 'Admin Sentral' },
|
|
7100
|
+
],
|
|
7101
|
+
errors: errors.value,
|
|
7102
|
+
"on-choose": onChoose,
|
|
7103
|
+
"on-register": onRegister,
|
|
7104
|
+
"on-connect": onConnect,
|
|
7105
|
+
"on-disconnect": onDisconnect,
|
|
7106
|
+
"on-delegate": onDelegate,
|
|
7107
|
+
onNoConflict: _cache[0] || (_cache[0] = ($event) => conflict.value = void 0)
|
|
7108
|
+
}, null, 8, ["user", "profile", "conflict", "errors"])
|
|
7109
|
+
]),
|
|
7110
|
+
_: 1
|
|
7111
|
+
/* STABLE */
|
|
7112
|
+
});
|
|
7113
|
+
};
|
|
7114
|
+
}
|
|
7115
|
+
});
|
|
7116
|
+
const SituationModel = models$2.SituationModel;
|
|
5107
7117
|
const __default__$4 = defineComponent({ name: "SituationCollection" });
|
|
5108
7118
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
5109
7119
|
...__default__$4,
|
|
@@ -5525,7 +7535,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5525
7535
|
};
|
|
5526
7536
|
}
|
|
5527
7537
|
});
|
|
5528
|
-
const SituationTypeModel = models$
|
|
7538
|
+
const SituationTypeModel = models$2.SituationTypeModel;
|
|
5529
7539
|
const __default__$2 = defineComponent({ name: "SituationTypeCollection" });
|
|
5530
7540
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
5531
7541
|
...__default__$2,
|
|
@@ -5613,7 +7623,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
5613
7623
|
};
|
|
5614
7624
|
}
|
|
5615
7625
|
});
|
|
5616
|
-
const TaskModel = models$
|
|
7626
|
+
const TaskModel = models$2.TaskModel;
|
|
5617
7627
|
const _hoisted_1 = { key: 0 };
|
|
5618
7628
|
const _hoisted_2 = { key: 1 };
|
|
5619
7629
|
const __default__$1 = defineComponent({ name: "TaskWorkButton" });
|
|
@@ -5679,7 +7689,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5679
7689
|
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5680
7690
|
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5681
7691
|
try {
|
|
5682
|
-
const responseStartTaskWork = await client.mutation(GraphUtil.executeOne(models$
|
|
7692
|
+
const responseStartTaskWork = await client.mutation(GraphUtil.executeOne(models$2.TaskModel, {}), {
|
|
5683
7693
|
action: "startTaskWork",
|
|
5684
7694
|
input: {
|
|
5685
7695
|
estimatedRealizedAssignmentStart: Date.now(),
|
|
@@ -5697,7 +7707,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5697
7707
|
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5698
7708
|
onHandleTaskWork.value.onFinishedDisabledTaskWorking = true;
|
|
5699
7709
|
try {
|
|
5700
|
-
const responseFinishedTaskWork = await client.mutation(GraphUtil.executeOne(models$
|
|
7710
|
+
const responseFinishedTaskWork = await client.mutation(GraphUtil.executeOne(models$2.TaskModel, {}), {
|
|
5701
7711
|
action: "finishTaskWork",
|
|
5702
7712
|
input: {
|
|
5703
7713
|
estimatedRealizedAssignmentEnd: Date.now(),
|
|
@@ -6219,13 +8229,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6219
8229
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6220
8230
|
__proto__: null,
|
|
6221
8231
|
CheckInAccess,
|
|
6222
|
-
CheckInCollection: _sfc_main$
|
|
8232
|
+
CheckInCollection: _sfc_main$d,
|
|
6223
8233
|
CheckInModel,
|
|
6224
8234
|
CheckInPresenceCollection,
|
|
6225
|
-
CheckInScanError: _sfc_main$
|
|
6226
|
-
CheckInScanSuccess: _sfc_main$
|
|
8235
|
+
CheckInScanError: _sfc_main$g,
|
|
8236
|
+
CheckInScanSuccess: _sfc_main$e,
|
|
6227
8237
|
CheckInScanner,
|
|
6228
8238
|
CheckInSingle,
|
|
8239
|
+
OperasionalIdentitas,
|
|
6229
8240
|
SituationCollection: _sfc_main$9,
|
|
6230
8241
|
SituationModel,
|
|
6231
8242
|
SituationSingle: _sfc_main$8,
|
|
@@ -6234,7 +8245,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
6234
8245
|
SituationTypeModel,
|
|
6235
8246
|
SituationTypeSingle: _sfc_main$4,
|
|
6236
8247
|
SituationWork: _sfc_main$7,
|
|
6237
|
-
StaffCollection: _sfc_main$
|
|
8248
|
+
StaffCollection: _sfc_main$c,
|
|
8249
|
+
StaffIdentity: _sfc_main$a,
|
|
6238
8250
|
StaffModel,
|
|
6239
8251
|
StaffSingle,
|
|
6240
8252
|
TaskCollection: _sfc_main$2,
|
|
@@ -6242,7 +8254,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
6242
8254
|
TaskSingle: _sfc_main$1,
|
|
6243
8255
|
TaskWork: _sfc_main,
|
|
6244
8256
|
TaskWorkButton: _sfc_main$3,
|
|
6245
|
-
XxxButton: _sfc_main$
|
|
8257
|
+
XxxButton: _sfc_main$l
|
|
6246
8258
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6247
8259
|
function registerComponents(app) {
|
|
6248
8260
|
Object.entries(components).forEach(([name, component]) => {
|
|
@@ -6361,14 +8373,15 @@ const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
6361
8373
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6362
8374
|
export {
|
|
6363
8375
|
CheckInAccess,
|
|
6364
|
-
_sfc_main$
|
|
8376
|
+
_sfc_main$d as CheckInCollection,
|
|
6365
8377
|
CheckInModel,
|
|
6366
8378
|
CheckInPresenceCollection,
|
|
6367
|
-
_sfc_main$
|
|
6368
|
-
_sfc_main$
|
|
8379
|
+
_sfc_main$g as CheckInScanError,
|
|
8380
|
+
_sfc_main$e as CheckInScanSuccess,
|
|
6369
8381
|
CheckInScanner,
|
|
6370
8382
|
CheckInSingle,
|
|
6371
8383
|
operasional_types as NOperasional,
|
|
8384
|
+
OperasionalIdentitas,
|
|
6372
8385
|
OperasionalInterfacesPlugin,
|
|
6373
8386
|
graphql as Schema,
|
|
6374
8387
|
_sfc_main$9 as SituationCollection,
|
|
@@ -6379,7 +8392,8 @@ export {
|
|
|
6379
8392
|
SituationTypeModel,
|
|
6380
8393
|
_sfc_main$4 as SituationTypeSingle,
|
|
6381
8394
|
_sfc_main$7 as SituationWork,
|
|
6382
|
-
_sfc_main$
|
|
8395
|
+
_sfc_main$c as StaffCollection,
|
|
8396
|
+
_sfc_main$a as StaffIdentity,
|
|
6383
8397
|
StaffModel,
|
|
6384
8398
|
StaffSingle,
|
|
6385
8399
|
_sfc_main$2 as TaskCollection,
|
|
@@ -6387,7 +8401,7 @@ export {
|
|
|
6387
8401
|
_sfc_main$1 as TaskSingle,
|
|
6388
8402
|
_sfc_main as TaskWork,
|
|
6389
8403
|
_sfc_main$3 as TaskWorkButton,
|
|
6390
|
-
_sfc_main$
|
|
8404
|
+
_sfc_main$l as XxxButton,
|
|
6391
8405
|
bus,
|
|
6392
8406
|
useAttendanceStore,
|
|
6393
8407
|
useOperasional,
|