@feedmepos/mf-connect 0.1.103-prod → 0.1.105-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-WQh18XPc.js → App-CsGCNHBx.js} +44 -43
- package/dist/{Bin-IbjpWo35.js → Bin-CEzJQ2fp.js} +8 -8
- package/dist/{Broadcast-BijdkG1f.js → Broadcast-DinQIuUI.js} +11 -11
- package/dist/CampaignAnalytic-B9ecowKf.js +1826 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D_YHOQWW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfVohrMN.js} +6 -6
- package/dist/{Card-Bp8BecBk.js → Card-y413-t0y.js} +19 -19
- package/dist/{Collections-QlS-tKVT.js → Collections-BryT5ufr.js} +21 -21
- package/dist/{Credit-D77lPO5s.js → Credit-BVqcBVPd.js} +118 -93
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B9XP8UeF.js +53 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DA6dCw8Y.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DenseCvA.js} +815 -609
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DLSOD5uV.js → EffectSheet.vue_vue_type_style_index_0_lang-CzDCUJ51.js} +12 -12
- package/dist/{Experience-DzbJiEkB.js → Experience-BIf25_au.js} +109 -84
- package/dist/{FileSaver.min-DMdx33O6.js → FileSaver.min-DcDxTlEv.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-CPFwbnwg.js +355 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B8sYzU76.js → ImageInput.vue_vue_type_script_setup_true_lang-D1_02khe.js} +1 -1
- package/dist/{Index-BrH7zJgF.js → Index-9d6DE1WI.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BdnOZYPt.js → LocationPicker.vue_vue_type_script_setup_true_lang-DVqpfwuC.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Zm2-QRhl.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CY7T4ZrE.js} +1 -1
- package/dist/LoyaltyDashboard-L-dd3bBX.js +2865 -0
- package/dist/{MainLayout-D0w3tXfh.js → MainLayout-B0hVJj0s.js} +3 -3
- package/dist/{Marketing-Bj4eecVJ.js → Marketing-CzQOE5-T.js} +4 -4
- package/dist/{MarketingMaterialEdit-BwrUAQ5g.js → MarketingMaterialEdit-CpnMbm4V.js} +6 -6
- package/dist/Member-BPXOBKnT.js +649 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-W-sQlF8i.js +1286 -0
- package/dist/MemberImportHistory-l5sPRJhS.js +187 -0
- package/dist/MemberList-BaFdqz1y.js +336 -0
- package/dist/{MemberTransactions-B1vwo1rI.js → MemberTransactions-BnzHspeV.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-l8vxv1iA.js → MessageInput.vue_vue_type_script_setup_true_lang-Tn7i0ON5.js} +13 -13
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Dk5jBNjr.js +40 -0
- package/dist/Mission-DwnJVGqw.js +359 -0
- package/dist/{Overview-CB0ZUJrT.js → Overview-Bkk6uY8w.js} +5 -5
- package/dist/{Overview-Dmga8twr.js → Overview-DxxN2iR6.js} +54 -54
- package/dist/Point-CF3bo1z2.js +287 -0
- package/dist/Promotion-BK_vpI2V.js +417 -0
- package/dist/{Queue-C3YE5GyB.js → Queue-BV3LRLDX.js} +47 -47
- package/dist/{Record-BmOaeVjS.js → Record-BsPu-3k0.js} +10 -10
- package/dist/{Review-BxkuBAsN.js → Review-Dbx2GIDF.js} +2 -2
- package/dist/{ReviewFacebookCallback-Cea69Y-B.js → ReviewFacebookCallback-4XmFbOgX.js} +5 -5
- package/dist/{ReviewGoogleCallback-BYb4WfJu.js → ReviewGoogleCallback-D8ZHqblT.js} +5 -5
- package/dist/{Reward-Dtrl4mTA.js → Reward-L350gxt_.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-sF1tR7Xt.js → RewardGroup.vue_vue_type_script_setup_true_lang-C83AonvA.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-cVQnjaRr.js → RuleGroup.vue_vue_type_script_setup_true_lang-C1ZmO0v3.js} +279 -286
- package/dist/{Segment-Cp-6-rVY.js → Segment-BYiiwMUQ.js} +71 -71
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4LpGMJI.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-UcQB3IId.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-24LPf74Z.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DekalcJe.js} +4 -4
- package/dist/{Setting-BJ8tKVyJ.js → Setting-eSozeH-1.js} +59 -59
- package/dist/{SettingAdvertisements-CVN2-ow-.js → SettingAdvertisements-kpV1JOcA.js} +13 -13
- package/dist/{Settings-C1cZ4Ul9.js → Settings-I0ImYOOQ.js} +5 -5
- package/dist/{Store-CPOnmTss.js → Store-C8QSVLw_.js} +24 -24
- package/dist/{StoreRewards-v5eeYGVK.js → StoreRewards-C70avm1_.js} +16 -16
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BeeUp_g7.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CSPdPLsO.js} +327 -386
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-KpT7bdu4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-WYa8H6Cw.js} +2 -2
- package/dist/{Tier-I99UH0xV.js → Tier-CZZDn7iP.js} +23 -23
- package/dist/{Title-CMRp4pX_.js → Title-BvljZZSL.js} +22 -22
- package/dist/{Transaction-B8qt8Ye0.js → Transaction-DXLXu8I9.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-QeAi2nrG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Dwge_i6h.js} +6 -6
- package/dist/{Voucher-BOHAMVZe.js → Voucher-DIdx7Ot3.js} +153 -131
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BmPhkmd-.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D_UeSwP6.js} +115 -121
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-ZCpWiXGk.js → ZodTextField.vue_vue_type_script_setup_true_lang-DY6VnVJA.js} +2 -2
- package/dist/{app-CGvP2lXl.js → app-DIqUapcm.js} +27807 -25649
- package/dist/app.js +1 -1
- package/dist/{business-BzmZPBOG.js → business-xP99MCox.js} +5 -5
- package/dist/{campaign-CJZlkuiR.js → campaign-C4MOBm91.js} +49 -48
- package/dist/{campaign-BmwtMiFP.js → campaign-PkzGqdYO.js} +2 -2
- package/dist/{campaign.enum-DumeHZOS.js → campaign.enum-BUclGILF.js} +1 -1
- package/dist/{campaign.fn-D0CbtE4k.js → campaign.fn-DJVXo9cD.js} +81 -81
- package/dist/{collectible.enum-nrHykvO1.js → collectible.enum-B_YepKWT.js} +1 -1
- package/dist/{collection.fn-DiyFyUl7.js → collection.fn-DAkP3LJ8.js} +2 -2
- package/dist/{effect-BnIGzzLo.js → effect-DrJYnZ16.js} +1 -1
- package/dist/{email-addresses-tjXJdzCY.js → email-addresses-DYXMxvqS.js} +2 -2
- package/dist/{export-Ck8ycGxw.js → export-0Jq4Vo5Y.js} +3 -3
- package/dist/{helper-BHgAkmrz.js → helper-CG763cr5.js} +1 -1
- package/dist/{index-cnFHwNFy.js → index-5Ms90cPU.js} +1 -1
- package/dist/{index-dVfpSXT7.js → index-8e6lLivz.js} +3 -3
- package/dist/{index-qIrN5YA8.js → index-BA3CoioK.js} +10 -10
- package/dist/{index-VJrNyZUx.js → index-BFuyvvVh.js} +1 -1
- package/dist/{index-BBU2_kd6.js → index-BHEZDY8s.js} +3 -3
- package/dist/{index-4PxwTlfE.js → index-BQdlKlsg.js} +9 -9
- package/dist/{index-W-l8HyOk.js → index-ByvnSHRv.js} +18 -2
- package/dist/{index-B-yKEua7.js → index-CB1OaNpY.js} +5 -5
- package/dist/{index-Cnkr1PfZ.js → index-CFRM165i.js} +6 -6
- package/dist/{index-CMGtT4mp.js → index-CU3Wrg9t.js} +1 -1
- package/dist/index-CuVAmjYs.js +137 -0
- package/dist/{index-BwZ8iuRW.js → index-D5zLX78G.js} +1 -1
- package/dist/{index-DHCiP2WT.js → index-DJRR8jk8.js} +1 -1
- package/dist/{index-mF4DrbA_.js → index-JPLeqrlu.js} +680 -680
- package/dist/{index-BozgrjRA.js → index-VZk5ArC3.js} +10 -9
- package/dist/{timezone-xffU-pT6.js → index-tPhZ8CGt.js} +105 -122
- package/dist/{index.esm2017-BbfP9mo3.js → index.esm2017-DuXfdRdC.js} +130 -130
- package/dist/{loading-B89df4lM.js → loading-DwS6f7JW.js} +1 -1
- package/dist/{lodash-CNIdP6dH.js → lodash-Bqpt7DBE.js} +1 -1
- package/dist/member-import-BaHtDv3F.js +187 -0
- package/dist/{membership-xRz6MrAl.js → membership-AYipXBeR.js} +3 -3
- package/dist/{money-CrfU06vj.js → money-BtRy4sUv.js} +1 -1
- package/dist/{number-DAcFWa0g.js → number-KwWSNC_F.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-D6VZ6WZS.js +145 -0
- package/dist/{plugins-BAOJz-5e.js → plugins-B9HEUuta.js} +87 -87
- package/dist/{reward-DV1PXPKT.js → reward-ktfRKJP7.js} +1 -1
- package/dist/{rule-BZBeYy7D.js → rule-Bm4V-BxA.js} +3 -3
- package/dist/{rule-builder-BuBh_voP.js → rule-builder-KkxzK5K-.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-D_4yac6N.js → template-Z0h3NgI8.js} +7 -7
- package/dist/timezone-BxeR2L3i.js +20 -0
- package/dist/transaction.fn-rwxZJxCB.js +64 -0
- package/dist/{trigger-De4OtE_Z.js → trigger-woxMK7-q.js} +5 -5
- package/dist/{useMarketingMaterialActions-CR-3UVH-.js → useMarketingMaterialActions-BCckL9jC.js} +3 -3
- package/dist/{usePagination-Cz1z0Cox.js → usePagination-ChnknACA.js} +1 -1
- package/dist/{user-83vF8U4p.js → user-C-uStXdl.js} +1 -1
- package/dist/{vue-i18n-miVa3rNb.js → vue-i18n-DMRuXVEL.js} +307 -307
- package/dist/{xlsx-Cs6dDN_G.js → xlsx-DIVka-fb.js} +224 -224
- package/dist/{zod-BgYRWcOQ.js → zod-hoW-zibE.js} +1 -1
- package/package.json +4 -3
- package/dist/Analytic-Dcw2QZ7k.js +0 -427
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-tQP4LYyf.js +0 -330
- package/dist/Member-D75eeIZY.js +0 -280
- package/dist/MemberList-BeZ9rqzr.js +0 -1602
- package/dist/Mission-J6_fYNS7.js +0 -334
- package/dist/Point-DWZ9xDIG.js +0 -262
- package/dist/Promotion-Ql-Dn2Uc.js +0 -392
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BhdPS29D.js +0 -181
- package/dist/dto-CBpbRIlX.js +0 -216
- package/dist/index-D-Fz1BGi.js +0 -85
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-D0AHYrGl.js +0 -145
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { z as e, F as t, m as o } from "./index-CB1OaNpY.js";
|
|
2
|
+
const d = {
|
|
3
|
+
collectionName: "MemberImportRuns",
|
|
4
|
+
transform: {
|
|
5
|
+
_id: "oid",
|
|
6
|
+
business: "oid",
|
|
7
|
+
createdAt: "date",
|
|
8
|
+
updatedAt: "date",
|
|
9
|
+
confirmedAt: "date",
|
|
10
|
+
completedAt: "date",
|
|
11
|
+
stoppedAt: "date"
|
|
12
|
+
}
|
|
13
|
+
}, m = {
|
|
14
|
+
collectionName: "MemberImportRows",
|
|
15
|
+
transform: {
|
|
16
|
+
_id: "oid",
|
|
17
|
+
run: "oid",
|
|
18
|
+
business: "oid",
|
|
19
|
+
memberId: "oid",
|
|
20
|
+
createdAt: "date",
|
|
21
|
+
updatedAt: "date"
|
|
22
|
+
}
|
|
23
|
+
}, c = e.enum(["CREATE", "UPDATE", "UPSERT"]), a = e.enum([
|
|
24
|
+
"UPLOADED",
|
|
25
|
+
"VALIDATING",
|
|
26
|
+
"INVALID",
|
|
27
|
+
"READY",
|
|
28
|
+
"QUEUED",
|
|
29
|
+
"RUNNING",
|
|
30
|
+
"CANCELLING",
|
|
31
|
+
"COMPLETED",
|
|
32
|
+
"STOPPED",
|
|
33
|
+
"CANCELLED"
|
|
34
|
+
]), l = e.enum([
|
|
35
|
+
"INVALID",
|
|
36
|
+
"READY",
|
|
37
|
+
"RUNNING",
|
|
38
|
+
"COMPLETED",
|
|
39
|
+
"FAILED"
|
|
40
|
+
]), E = e.enum(["CREATE", "UPDATE"]), r = e.enum([
|
|
41
|
+
"PROFILE",
|
|
42
|
+
"MEMBER",
|
|
43
|
+
"CREDIT",
|
|
44
|
+
"EXPERIENCE",
|
|
45
|
+
"POINT",
|
|
46
|
+
"TIER",
|
|
47
|
+
"TITLES"
|
|
48
|
+
]), u = "SAMPLE - DO NOT REMOVE", p = [
|
|
49
|
+
"Name",
|
|
50
|
+
"Phone",
|
|
51
|
+
"Email",
|
|
52
|
+
"Gender",
|
|
53
|
+
"CardNo",
|
|
54
|
+
"Birthday",
|
|
55
|
+
"Credit",
|
|
56
|
+
"CreditExpiryDate",
|
|
57
|
+
"Experience",
|
|
58
|
+
"Point",
|
|
59
|
+
"Tier",
|
|
60
|
+
"Titles",
|
|
61
|
+
"TitleExpiryDate",
|
|
62
|
+
"TotalSpent",
|
|
63
|
+
"TotalTransaction",
|
|
64
|
+
"LastVisit",
|
|
65
|
+
"Feedback",
|
|
66
|
+
"JoinedAt",
|
|
67
|
+
"JoinedAtLocation"
|
|
68
|
+
], M = {
|
|
69
|
+
Name: u,
|
|
70
|
+
Phone: "0123456789",
|
|
71
|
+
Email: "sample@example.com",
|
|
72
|
+
Gender: "FEMALE",
|
|
73
|
+
CardNo: "",
|
|
74
|
+
Birthday: "01/12/1989 (DD/MM/YYYY)",
|
|
75
|
+
Credit: "12.50",
|
|
76
|
+
CreditExpiryDate: "31/12/2099 (DD/MM/YYYY)",
|
|
77
|
+
Experience: "10",
|
|
78
|
+
Point: "5",
|
|
79
|
+
Tier: "1",
|
|
80
|
+
Titles: "VIP,VVIP",
|
|
81
|
+
TitleExpiryDate: "05/09/2099,06/09/2099 (DD/MM/YYYY)",
|
|
82
|
+
TotalSpent: "205.50",
|
|
83
|
+
TotalTransaction: "10",
|
|
84
|
+
LastVisit: "31/12/2025 (DD/MM/YYYY)",
|
|
85
|
+
Feedback: "1",
|
|
86
|
+
JoinedAt: "31/12/2025 (DD/MM/YYYY)",
|
|
87
|
+
JoinedAtLocation: ""
|
|
88
|
+
}, R = p.map(
|
|
89
|
+
(n) => M[n]
|
|
90
|
+
), b = e.object({
|
|
91
|
+
mode: c
|
|
92
|
+
}), T = e.object({
|
|
93
|
+
total: e.number().int().nonnegative(),
|
|
94
|
+
create: e.number().int().nonnegative(),
|
|
95
|
+
update: e.number().int().nonnegative(),
|
|
96
|
+
invalid: e.number().int().nonnegative(),
|
|
97
|
+
completed: e.number().int().nonnegative(),
|
|
98
|
+
failed: e.number().int().nonnegative(),
|
|
99
|
+
sharedProfiles: e.number().int().nonnegative(),
|
|
100
|
+
balanceRows: e.number().int().nonnegative(),
|
|
101
|
+
creditTargetTotal: e.number(),
|
|
102
|
+
experienceTargetTotal: e.number(),
|
|
103
|
+
pointTargetTotal: e.number(),
|
|
104
|
+
tierRows: e.number().int().nonnegative()
|
|
105
|
+
}), i = e.object({
|
|
106
|
+
_id: t,
|
|
107
|
+
business: t,
|
|
108
|
+
businessName: e.string(),
|
|
109
|
+
requestedBy: e.string(),
|
|
110
|
+
requestedByRole: e.string(),
|
|
111
|
+
confirmedBy: e.string().nullish(),
|
|
112
|
+
file: e.object({
|
|
113
|
+
ref: t,
|
|
114
|
+
originalName: e.string(),
|
|
115
|
+
mimeType: e.string(),
|
|
116
|
+
size: e.number(),
|
|
117
|
+
fbFilePath: e.string()
|
|
118
|
+
}),
|
|
119
|
+
fileHash: e.string().length(64),
|
|
120
|
+
options: b,
|
|
121
|
+
status: a,
|
|
122
|
+
active: e.boolean(),
|
|
123
|
+
previewVersion: e.number().int().positive(),
|
|
124
|
+
summary: T,
|
|
125
|
+
error: e.string().nullish(),
|
|
126
|
+
createdAt: e.coerce.date(),
|
|
127
|
+
updatedAt: e.coerce.date(),
|
|
128
|
+
confirmedAt: e.coerce.date().nullish(),
|
|
129
|
+
completedAt: e.coerce.date().nullish(),
|
|
130
|
+
stoppedAt: e.coerce.date().nullish()
|
|
131
|
+
}).describe(o.describe(d));
|
|
132
|
+
e.object({
|
|
133
|
+
_id: t,
|
|
134
|
+
run: t,
|
|
135
|
+
business: t,
|
|
136
|
+
rowNumber: e.number().int().positive(),
|
|
137
|
+
status: l,
|
|
138
|
+
action: E.nullish(),
|
|
139
|
+
raw: e.record(e.string(), e.unknown()),
|
|
140
|
+
normalized: e.record(e.string(), e.unknown()).nullish(),
|
|
141
|
+
errors: e.array(e.string()),
|
|
142
|
+
memberId: t.nullish(),
|
|
143
|
+
externalMemberId: e.string().nullish(),
|
|
144
|
+
currentStep: r.nullish(),
|
|
145
|
+
completedSteps: e.array(r),
|
|
146
|
+
createdAt: e.coerce.date(),
|
|
147
|
+
updatedAt: e.coerce.date()
|
|
148
|
+
}).describe(o.describe(m));
|
|
149
|
+
e.object({
|
|
150
|
+
businessName: e.string().min(1),
|
|
151
|
+
fileHash: e.string().length(64),
|
|
152
|
+
previewVersion: e.number().int().positive(),
|
|
153
|
+
acknowledgeSharedProfiles: e.boolean(),
|
|
154
|
+
acknowledgeBalanceReplacement: e.boolean()
|
|
155
|
+
});
|
|
156
|
+
e.object({
|
|
157
|
+
skip: e.coerce.number().int().nonnegative().default(0),
|
|
158
|
+
limit: e.coerce.number().int().min(1).max(100).default(15),
|
|
159
|
+
status: e.preprocess(
|
|
160
|
+
(n) => typeof n == "string" ? n.split(",").map((s) => s.trim()).filter(Boolean) : n,
|
|
161
|
+
e.array(a).optional()
|
|
162
|
+
)
|
|
163
|
+
});
|
|
164
|
+
const I = i.pick({
|
|
165
|
+
_id: !0,
|
|
166
|
+
options: !0,
|
|
167
|
+
status: !0,
|
|
168
|
+
summary: !0,
|
|
169
|
+
error: !0,
|
|
170
|
+
createdAt: !0,
|
|
171
|
+
updatedAt: !0,
|
|
172
|
+
completedAt: !0,
|
|
173
|
+
stoppedAt: !0
|
|
174
|
+
}).extend({
|
|
175
|
+
file: i.shape.file.pick({
|
|
176
|
+
originalName: !0,
|
|
177
|
+
mimeType: !0,
|
|
178
|
+
size: !0
|
|
179
|
+
}),
|
|
180
|
+
originalFileExpiresAt: e.coerce.date()
|
|
181
|
+
});
|
|
182
|
+
export {
|
|
183
|
+
a as F,
|
|
184
|
+
p as M,
|
|
185
|
+
R as a,
|
|
186
|
+
I as b
|
|
187
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { components as B } from "@feedmepos/ui-library";
|
|
2
|
-
import { F as i } from "./collectible.enum-
|
|
2
|
+
import { F as i } from "./collectible.enum-B_YepKWT.js";
|
|
3
3
|
import { h as f, ref as n } from "vue";
|
|
4
4
|
import { defineStore as U } from "pinia";
|
|
5
|
-
import { m as p } from "./index-
|
|
6
|
-
import { g as o, u as V } from "./index-
|
|
5
|
+
import { m as p } from "./index-CU3Wrg9t.js";
|
|
6
|
+
import { g as o, u as V } from "./index-VZk5ArC3.js";
|
|
7
7
|
function m(t) {
|
|
8
8
|
return f(
|
|
9
9
|
"div",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function e(r) {
|
|
2
|
+
if (Array.isArray(r))
|
|
3
|
+
return r.map((n) => e(n));
|
|
4
|
+
if (typeof r == "object" && r !== null) {
|
|
5
|
+
const n = {};
|
|
6
|
+
for (const t in r)
|
|
7
|
+
r.hasOwnProperty(t) && !t.startsWith("pf_") && (n[t] = e(r[t]));
|
|
8
|
+
return n;
|
|
9
|
+
}
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
function s(r) {
|
|
13
|
+
return JSON.parse(JSON.stringify(r));
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
e as a,
|
|
17
|
+
s as c
|
|
18
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { g as l } from "./app-DIqUapcm.js";
|
|
2
|
+
var o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_a854ded3-e026-472f-a767-36870f0448c5", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", npm_package_devDependencies_vitest: "^2.1.9", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.20.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_a854ded3-e026-472f-a767-36870f0448c5", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_dependencies_moment_timezone: "^0.6.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-9.7.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.29.23", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.7", SYSTEMD_EXEC_PID: "1721", ACTIONS_ORCHESTRATION_ID: "dba78818-d72a-4632-b630-fc34cfe6c5ab.deploy.__default", npm_package_dependencies__feedmepos_ui_library: "1.10.13", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies__tailwindcss_typography: "^0.5.16", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260831.293.1", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.8", npm_package_devDependencies__playwright_test: "^1.62.1", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_a854ded3-e026-472f-a767-36870f0448c5", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:12134", GITHUB_WORKFLOW: "[CD:dev] connect-portal (mf-connect)", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.14/x64", GITHUB_RUN_ID: "34372648653", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "28fac934c82cf6d06cf2067471b83a62cdc2376b", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.7/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_dependencies__ckeditor_ckeditor5_vue: "^7.3.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] deploy-mf-connect.yml@refs/heads/KDI-5181-unify-menu-select-items", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_946ac50f-f74d-4373-8743-d553fceafdfa", INVOCATION_ID: "9368d415fd324f4abd81fbc655e7d40a", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "370", GITHUB_TRIGGERING_ACTOR: "heiseshandian", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_test_e2e: "playwright test", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.29", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000140552", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "KDI-5181-unify-menu-select-items", GITHUB_REPOSITORY: "feedmepos/marketing-services", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "2.15.21", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest run", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.105-beta.1", npm_package_dependencies__feedmepos_hrm_permission: "1.0.14", npm_package_dependencies_ckeditor5: "^44.3.0", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "28fac934c82cf6d06cf2067471b83a62cdc2376b", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies__ckeditor_ckeditor5_build_classic: "^44.3.0", npm_package_dependencies_vue_router: "^4.4.0", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/KDI-5181-unify-menu-select-items", GITHUB_ACTOR: "heiseshandian", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_scripts_test_watch: "vitest", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_a854ded3-e026-472f-a767-36870f0448c5", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "7780463", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_a854ded3-e026-472f-a767-36870f0448c5", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ARTIFACTS_LIST: "/home/runner/work/_temp/_runner_file_commands/artifacts_list_a854ded3-e026-472f-a767-36870f0448c5", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_a854ded3-e026-472f-a767-36870f0448c5", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_dependencies__feedmepos_mf_remy_panel: "0.15.0", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", IMPORT_FILES_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "feedmedev.vip", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account", LICENSE_PORTAL_URL: "https://license.feedmedev.cc/", VOUCHER_APP_URL: "https://voucher.feedmedev.cc/" } }, i = Math.floor(Math.random() * 16777215), a = n.index = parseInt(Math.random() * 16777215, 10), c = (typeof o > "u" || typeof o.pid != "number" ? Math.floor(Math.random() * 1e5) : o.pid) % 65535, d = (() => {
|
|
3
|
+
try {
|
|
4
|
+
return _Buffer;
|
|
5
|
+
} catch {
|
|
6
|
+
try {
|
|
7
|
+
return Buffer;
|
|
8
|
+
} catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
})(), r = function(e) {
|
|
13
|
+
return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
14
|
+
}, u = [];
|
|
15
|
+
for (var s = 0; s < 256; s++)
|
|
16
|
+
u[s] = (s <= 15 ? "0" : "") + s.toString(16);
|
|
17
|
+
var m = new RegExp("^[0-9a-fA-F]{24}$"), p = [];
|
|
18
|
+
s = 0;
|
|
19
|
+
for (; s < 10; ) p[48 + s] = s++;
|
|
20
|
+
for (; s < 16; ) p[55 + s] = p[87 + s] = s++;
|
|
21
|
+
function n(e) {
|
|
22
|
+
if (!(this instanceof n)) return new n(e);
|
|
23
|
+
if (e && (e instanceof n || e._bsontype === "ObjectID"))
|
|
24
|
+
return e;
|
|
25
|
+
if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
|
|
26
|
+
this.id = this.generate(e);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
var _ = n.isValid(e);
|
|
30
|
+
if (!_ && e != null)
|
|
31
|
+
throw new Error(
|
|
32
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
33
|
+
);
|
|
34
|
+
if (_ && typeof e == "string" && e.length === 24)
|
|
35
|
+
return n.createFromHexString(e);
|
|
36
|
+
if (e != null && e.length === 12)
|
|
37
|
+
this.id = e;
|
|
38
|
+
else {
|
|
39
|
+
if (e != null && typeof e.toHexString == "function")
|
|
40
|
+
return e;
|
|
41
|
+
throw new Error(
|
|
42
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
var f = n;
|
|
47
|
+
n.default = n;
|
|
48
|
+
n.createFromTime = function(e) {
|
|
49
|
+
return e = parseInt(e, 10) % 4294967295, new n(E(8, e) + "0000000000000000");
|
|
50
|
+
};
|
|
51
|
+
n.createFromHexString = function(e) {
|
|
52
|
+
if (typeof e > "u" || e != null && e.length !== 24)
|
|
53
|
+
throw new Error(
|
|
54
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
55
|
+
);
|
|
56
|
+
for (var _ = "", t = 0; t < 24; )
|
|
57
|
+
_ += String.fromCharCode(p[e.charCodeAt(t++)] << 4 | p[e.charCodeAt(t++)]);
|
|
58
|
+
return new n(_);
|
|
59
|
+
};
|
|
60
|
+
n.isValid = function(e) {
|
|
61
|
+
return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && m.test(e) : e instanceof n ? !0 : r(e) ? n.isValid(e.toString("hex")) : typeof e.toHexString == "function" && d && (e.id instanceof d || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && m.test(e.id) : !1;
|
|
62
|
+
};
|
|
63
|
+
n.prototype = {
|
|
64
|
+
constructor: n,
|
|
65
|
+
/**
|
|
66
|
+
* Return the ObjectID id as a 24 byte hex string representation
|
|
67
|
+
*
|
|
68
|
+
* @return {String} return the 24 byte hex string representation.
|
|
69
|
+
* @api public
|
|
70
|
+
*/
|
|
71
|
+
toHexString: function() {
|
|
72
|
+
if (!this.id || !this.id.length)
|
|
73
|
+
throw new Error(
|
|
74
|
+
"invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
|
|
75
|
+
);
|
|
76
|
+
if (this.id.length === 24)
|
|
77
|
+
return this.id;
|
|
78
|
+
if (r(this.id))
|
|
79
|
+
return this.id.toString("hex");
|
|
80
|
+
for (var e = "", _ = 0; _ < this.id.length; _++)
|
|
81
|
+
e += u[this.id.charCodeAt(_)];
|
|
82
|
+
return e;
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Compares the equality of this ObjectID with `otherID`.
|
|
86
|
+
*
|
|
87
|
+
* @param {Object} otherId ObjectID instance to compare against.
|
|
88
|
+
* @return {Boolean} the result of comparing two ObjectID's
|
|
89
|
+
* @api public
|
|
90
|
+
*/
|
|
91
|
+
equals: function(e) {
|
|
92
|
+
return e instanceof n ? this.toString() === e.toString() : typeof e == "string" && n.isValid(e) && e.length === 12 && r(this.id) ? e === this.id.toString("binary") : typeof e == "string" && n.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && n.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof n || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
96
|
+
*
|
|
97
|
+
* @return {Date} the generation date
|
|
98
|
+
* @api public
|
|
99
|
+
*/
|
|
100
|
+
getTimestamp: function() {
|
|
101
|
+
var e = /* @__PURE__ */ new Date(), _;
|
|
102
|
+
return r(this.id) ? _ = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : _ = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(_) * 1e3), e;
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* Generate a 12 byte id buffer used in ObjectID's
|
|
106
|
+
*
|
|
107
|
+
* @method
|
|
108
|
+
* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
|
|
109
|
+
* @return {string} return the 12 byte id buffer string.
|
|
110
|
+
*/
|
|
111
|
+
generate: function(e) {
|
|
112
|
+
typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
|
|
113
|
+
var _ = g();
|
|
114
|
+
return String.fromCharCode(
|
|
115
|
+
e >> 24 & 255,
|
|
116
|
+
e >> 16 & 255,
|
|
117
|
+
e >> 8 & 255,
|
|
118
|
+
e & 255,
|
|
119
|
+
i >> 16 & 255,
|
|
120
|
+
i >> 8 & 255,
|
|
121
|
+
i & 255,
|
|
122
|
+
c >> 8 & 255,
|
|
123
|
+
c & 255,
|
|
124
|
+
_ >> 16 & 255,
|
|
125
|
+
_ >> 8 & 255,
|
|
126
|
+
_ & 255
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
function g() {
|
|
131
|
+
return a = (a + 1) % 16777215;
|
|
132
|
+
}
|
|
133
|
+
function E(e, _) {
|
|
134
|
+
return _ = _.toString(16), _.length === e ? _ : "00000000".substring(_.length, e) + _;
|
|
135
|
+
}
|
|
136
|
+
var h = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
|
|
137
|
+
n.prototype[h] = function() {
|
|
138
|
+
return "ObjectID(" + this + ")";
|
|
139
|
+
};
|
|
140
|
+
n.prototype.toJSON = n.prototype.toHexString;
|
|
141
|
+
n.prototype.toString = n.prototype.toHexString;
|
|
142
|
+
const T = /* @__PURE__ */ l(f);
|
|
143
|
+
export {
|
|
144
|
+
T as O
|
|
145
|
+
};
|