50p82u21t54k 0.0.26 → 0.0.28

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.
@@ -1,115 +1,112 @@
1
- import K from "axios";
2
- import { ref as q } from "vue";
3
- import m from "crypto-js";
4
- const C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import Yt from "axios";
2
+ import { ref as Xt } from "vue";
3
+ import C from "crypto-js";
4
+ const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  get DefaultHotGamesResponse() {
7
- return y;
7
+ return pt;
8
8
  },
9
9
  get getHotGames() {
10
- return G;
10
+ return Nt;
11
11
  }
12
- }, Symbol.toStringTag, { value: "Module" })), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ }, Symbol.toStringTag, { value: "Module" })), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
13
  __proto__: null,
14
14
  get DefaultFishGamesResponse() {
15
- return S;
15
+ return gt;
16
16
  },
17
17
  get getFishGames() {
18
- return E;
18
+ return Vt;
19
19
  }
20
- }, Symbol.toStringTag, { value: "Module" })), $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20
+ }, Symbol.toStringTag, { value: "Module" })), te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21
21
  __proto__: null,
22
22
  get DefaultTrialGamesResponse() {
23
- return b;
23
+ return dt;
24
24
  },
25
25
  get getTrialGames() {
26
- return R;
26
+ return Lt;
27
27
  }
28
- }, Symbol.toStringTag, { value: "Module" })), Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ }, Symbol.toStringTag, { value: "Module" })), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
29
  __proto__: null,
30
30
  get DefaultPromotionResponse() {
31
- return P;
31
+ return vt;
32
32
  },
33
33
  get getPromotion() {
34
- return A;
34
+ return It;
35
35
  }
36
- }, Symbol.toStringTag, { value: "Module" })), X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
+ }, Symbol.toStringTag, { value: "Module" })), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
37
37
  __proto__: null,
38
38
  get CmsId() {
39
- return L;
39
+ return yt;
40
40
  },
41
41
  get DefaultCmsListResponse() {
42
- return h;
42
+ return mt;
43
43
  },
44
44
  get getCmsList() {
45
- return D;
45
+ return Mt;
46
46
  }
47
- }, Symbol.toStringTag, { value: "Module" })), Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
47
+ }, Symbol.toStringTag, { value: "Module" })), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
48
48
  __proto__: null,
49
49
  get DefaultHomeResponse() {
50
- return N;
50
+ return Ft;
51
51
  },
52
52
  get GameType() {
53
- return j;
53
+ return kt;
54
54
  },
55
55
  get getHome() {
56
- return re;
56
+ return le;
57
57
  }
58
- }, Symbol.toStringTag, { value: "Module" })), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ }, Symbol.toStringTag, { value: "Module" })), se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
59
59
  __proto__: null,
60
60
  get DefaultCurrentLangResponse() {
61
- return k;
61
+ return Ht;
62
62
  },
63
63
  get getCurrentLang() {
64
- return ne;
64
+ return ce;
65
65
  }
66
- }, Symbol.toStringTag, { value: "Module" })), Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
66
+ }, Symbol.toStringTag, { value: "Module" })), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67
67
  __proto__: null,
68
68
  get DefaultGetLocaleResponse() {
69
- return T;
69
+ return jt;
70
70
  },
71
71
  get getGetLocale() {
72
- return oe;
72
+ return pe;
73
73
  }
74
- }, Symbol.toStringTag, { value: "Module" })), I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
75
  __proto__: null,
76
76
  get DefaultCsLinkResponse() {
77
- return M;
77
+ return qt;
78
78
  },
79
79
  get getCsLink() {
80
- return ue;
80
+ return ge;
81
81
  }
82
- }, Symbol.toStringTag, { value: "Module" })), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ }, Symbol.toStringTag, { value: "Module" })), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
83
83
  __proto__: null,
84
84
  get DefaultEGameResponse() {
85
- return B;
85
+ return Ct;
86
86
  },
87
87
  get getEGame() {
88
- return le;
88
+ return de;
89
89
  }
90
- }, Symbol.toStringTag, { value: "Module" })), te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
90
+ }, Symbol.toStringTag, { value: "Module" })), ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
91
91
  __proto__: null,
92
92
  get DefaultGetSettingResponse() {
93
- return F;
93
+ return Gt;
94
94
  },
95
95
  get getGetSetting() {
96
- return pe;
96
+ return Ut;
97
97
  }
98
- }, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
98
+ }, Symbol.toStringTag, { value: "Module" })), fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99
99
  __proto__: null,
100
100
  get DefaultGetLoginKeyResponse() {
101
- return x;
101
+ return je;
102
102
  },
103
103
  get DefaultLoginResponse() {
104
- return z;
105
- },
106
- get getLoginKey() {
107
- return ce;
104
+ return Zt;
108
105
  },
109
106
  get submitLogin() {
110
- return ge;
107
+ return qe;
111
108
  }
112
- }, Symbol.toStringTag, { value: "Module" })), l = K.create({
109
+ }, Symbol.toStringTag, { value: "Module" })), R = Yt.create({
113
110
  baseURL: "",
114
111
  timeout: 5e3,
115
112
  // Request timeout
@@ -155,67 +152,67 @@ const C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
155
152
  // },
156
153
  // },
157
154
  });
158
- l.interceptors.request.use(
159
- (e) => e,
160
- (e) => (console.error("Error request:", e.response), Promise.reject(e))
155
+ R.interceptors.request.use(
156
+ (r) => r,
157
+ (r) => (console.error("Error request:", r.response), Promise.reject(r))
161
158
  );
162
- l.interceptors.response.use(
163
- (e) => e,
164
- (e) => {
165
- const s = {
159
+ R.interceptors.response.use(
160
+ (r) => r,
161
+ (r) => {
162
+ const t = {
166
163
  status: null,
167
164
  message: "An error occurred"
168
165
  };
169
- return e.response ? (s.status = e.response.status, s.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(s)), e.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : e.response.status === 404 ? console.error("Resource not found.") : e.response.status >= 500 && console.error("Server error. Please try again later.")) : e.request ? console.error("No response received:", e.request) : console.error("Error setting up request:", e.message), Promise.reject(s);
166
+ return r.response ? (t.status = r.response.status, t.message = r.response.data.message || r.response.statusText, console.error("Error response:", JSON.stringify(t)), r.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : r.response.status === 404 ? console.error("Resource not found.") : r.response.status >= 500 && console.error("Server error. Please try again later.")) : r.request ? console.error("No response received:", r.request) : console.error("Error setting up request:", r.message), Promise.reject(t);
170
167
  }
171
168
  );
172
- const v = q("");
173
- function o() {
174
- return v.value === "" ? 0 : 1;
175
- }
176
- const se = {
177
- home: Q,
178
- hotGames: C,
179
- fishGames: w,
180
- trialGames: $,
181
- currentLang: W,
182
- promotion: Y,
183
- getLocale: Z,
184
- csLink: I,
185
- eGame: ee,
186
- cmsList: X,
187
- getSetting: te,
188
- login: ae
189
- }, de = {
190
- install(e) {
191
- e.config.globalProperties.$library = se;
192
- }
193
- }, p = (e) => {
169
+ const Pt = Xt("");
170
+ function m() {
171
+ return Pt.value === "" ? 0 : 1;
172
+ }
173
+ const he = {
174
+ home: ne,
175
+ hotGames: Qt,
176
+ fishGames: Wt,
177
+ trialGames: te,
178
+ currentLang: se,
179
+ promotion: ee,
180
+ getLocale: ie,
181
+ csLink: ae,
182
+ eGame: oe,
183
+ cmsList: re,
184
+ getSetting: ue,
185
+ login: fe
186
+ }, Ke = {
187
+ install(r) {
188
+ r.config.globalProperties.$library = he;
189
+ }
190
+ }, A = (r) => {
194
191
  try {
195
- const s = JSON.parse(
196
- m.AES.decrypt(e, v.value, {
192
+ const t = JSON.parse(
193
+ C.AES.decrypt(r, Pt.value, {
197
194
  format: {
198
195
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
199
- stringify: (t) => {
200
- const a = {
201
- ct: t.ciphertext.toString(m.enc.Base64)
196
+ stringify: (e) => {
197
+ const n = {
198
+ ct: e.ciphertext.toString(C.enc.Base64)
202
199
  };
203
- return t.iv && (a.iv = t.iv.toString()), t.salt && (a.s = t.salt.toString()), JSON.stringify(a);
200
+ return e.iv && (n.iv = e.iv.toString()), e.salt && (n.s = e.salt.toString()), JSON.stringify(n);
204
201
  },
205
- parse: (t) => {
206
- const a = JSON.parse(t), n = m.lib.CipherParams.create({
207
- ciphertext: m.enc.Base64.parse(a.ct)
202
+ parse: (e) => {
203
+ const n = JSON.parse(e), s = C.lib.CipherParams.create({
204
+ ciphertext: C.enc.Base64.parse(n.ct)
208
205
  });
209
- return a.iv && (n.iv = m.enc.Hex.parse(a.iv)), a.s && (n.salt = m.enc.Hex.parse(a.s)), n;
206
+ return n.iv && (s.iv = C.enc.Hex.parse(n.iv)), n.s && (s.salt = C.enc.Hex.parse(n.s)), s;
210
207
  }
211
208
  }
212
- }).toString(m.enc.Utf8)
209
+ }).toString(C.enc.Utf8)
213
210
  );
214
- return s !== "" ? JSON.parse(s) : s;
215
- } catch (s) {
216
- return console.error(s), "";
211
+ return t !== "" ? JSON.parse(t) : t;
212
+ } catch (t) {
213
+ return console.error(t), "";
217
214
  }
218
- }, y = {
215
+ }, pt = {
219
216
  status: 200,
220
217
  message: "",
221
218
  data: {
@@ -231,55 +228,55 @@ const se = {
231
228
  total: 0
232
229
  }
233
230
  };
234
- async function G() {
235
- const e = y;
231
+ async function Nt() {
232
+ const r = pt;
236
233
  try {
237
- const s = await l.get("/apis/hotGames", {
234
+ const t = await R.get("/apis/hotGames", {
238
235
  params: {
239
- render: o()
236
+ render: m()
240
237
  }
241
238
  });
242
- let t;
243
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
244
- currentPage: t.current_page ?? 0,
245
- data: t.data.map((a) => ({
246
- id: a.id ?? 0,
247
- name: a.name ?? "",
248
- pfid: a.pfid ?? 0,
249
- ppname: a.ppname ?? "",
250
- code: a.code ?? "",
251
- img: a.img ?? "",
252
- progressive: a.progressive ?? "",
253
- ppid: a.ppid ?? 0,
254
- notry: a.notry === 1,
255
- productCode: a.product_code ?? "",
256
- imgSrc: a.imgSrc ?? "",
257
- imgPf: a.imgPf ?? "",
258
- favouriteFlag: a.favourite_flag === 1,
259
- platformStatusFlag: a.platform_status_flag ?? "",
260
- platformFlagName: a.platform_flag_name ?? "",
239
+ let e;
240
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
241
+ currentPage: e.current_page ?? 0,
242
+ data: e.data.map((n) => ({
243
+ id: n.id ?? 0,
244
+ name: n.name ?? "",
245
+ pfid: n.pfid ?? 0,
246
+ ppname: n.ppname ?? "",
247
+ code: n.code ?? "",
248
+ img: n.img ?? "",
249
+ progressive: n.progressive ?? "",
250
+ ppid: n.ppid ?? 0,
251
+ notry: n.notry === 1,
252
+ productCode: n.product_code ?? "",
253
+ imgSrc: n.imgSrc ?? "",
254
+ imgPf: n.imgPf ?? "",
255
+ favouriteFlag: n.favourite_flag === 1,
256
+ platformStatusFlag: n.platform_status_flag ?? "",
257
+ platformFlagName: n.platform_flag_name ?? "",
261
258
  platformStatusParams: {
262
- eb: a.platform_status_params.eb ?? !1,
263
- fit: a.platform_status_params.fit ?? !1,
264
- fs: a.platform_status_params.fs ?? !1
259
+ eb: n.platform_status_params.eb ?? !1,
260
+ fit: n.platform_status_params.fit ?? !1,
261
+ fs: n.platform_status_params.fs ?? !1
265
262
  },
266
- gameId: a.game_id ?? 0
263
+ gameId: n.game_id ?? 0
267
264
  })),
268
- from: t.from ?? 0,
269
- lastPage: t.last_page ?? 0,
270
- nextPageUrl: t.next_page_url ?? "",
271
- path: t.path ?? "",
272
- perPage: t.per_page ?? 0,
273
- prevPageUrl: t.prev_page_url ?? "",
274
- to: t.to ?? 0,
275
- total: t.total ?? 0
276
- }, e);
277
- } catch (s) {
278
- const t = s;
279
- return e.status = t.status || 500, e.message = t.message, e;
280
- }
281
- }
282
- const S = {
265
+ from: e.from ?? 0,
266
+ lastPage: e.last_page ?? 0,
267
+ nextPageUrl: e.next_page_url ?? "",
268
+ path: e.path ?? "",
269
+ perPage: e.per_page ?? 0,
270
+ prevPageUrl: e.prev_page_url ?? "",
271
+ to: e.to ?? 0,
272
+ total: e.total ?? 0
273
+ }, r);
274
+ } catch (t) {
275
+ const e = t;
276
+ return r.status = e.status || 500, r.message = e.message, r;
277
+ }
278
+ }
279
+ const gt = {
283
280
  status: 200,
284
281
  message: "",
285
282
  data: {
@@ -287,87 +284,87 @@ const S = {
287
284
  data: []
288
285
  }
289
286
  };
290
- async function E() {
291
- const e = S;
287
+ async function Vt() {
288
+ const r = gt;
292
289
  try {
293
- const s = await l.get("/apis/fishGames", {
290
+ const t = await R.get("/apis/fishGames", {
294
291
  params: {
295
- render: o()
292
+ render: m()
296
293
  }
297
294
  });
298
- let t;
299
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
300
- hotfish: t.hotfish.map((a) => O(a)),
301
- data: t.data.map((a) => O(a))
302
- }, e);
303
- } catch (s) {
304
- const t = s;
305
- return e.status = t.status || 500, e.message = t.message, e;
306
- }
307
- }
308
- const O = (e) => ({
309
- id: e.id ?? 0,
310
- name: e.name ?? "",
311
- ppid: e.pp_id ?? "",
312
- img: e.img ?? "",
313
- desc: e.desc ?? "",
314
- ppname: e.pp_name ?? "",
315
- platformCode: e.platform_code ?? "",
316
- code: e.code ?? "",
317
- flag: e.flag ?? 0,
318
- gameId: e.game_id ?? 0,
319
- imgSrc: e.imgSrc ?? "",
320
- imgPf: e.imgPf ?? "",
321
- favouriteFlag: e.favourite_flag === 1,
322
- platformStatusFflag: e.platform_status_Fflag ?? "",
323
- platformFlagName: e.platform_flag_name ?? "",
295
+ let e;
296
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
297
+ hotfish: e.hotfish.map((n) => bt(n)),
298
+ data: e.data.map((n) => bt(n))
299
+ }, r);
300
+ } catch (t) {
301
+ const e = t;
302
+ return r.status = e.status || 500, r.message = e.message, r;
303
+ }
304
+ }
305
+ const bt = (r) => ({
306
+ id: r.id ?? 0,
307
+ name: r.name ?? "",
308
+ ppid: r.pp_id ?? "",
309
+ img: r.img ?? "",
310
+ desc: r.desc ?? "",
311
+ ppname: r.pp_name ?? "",
312
+ platformCode: r.platform_code ?? "",
313
+ code: r.code ?? "",
314
+ flag: r.flag ?? 0,
315
+ gameId: r.game_id ?? 0,
316
+ imgSrc: r.imgSrc ?? "",
317
+ imgPf: r.imgPf ?? "",
318
+ favouriteFlag: r.favourite_flag === 1,
319
+ platformStatusFflag: r.platform_status_Fflag ?? "",
320
+ platformFlagName: r.platform_flag_name ?? "",
324
321
  platformStatusParams: {
325
- eb: e.platform_status_params.eb ?? !1,
326
- fit: e.platform_status_params.fit ?? !1,
327
- fs: e.platform_status_params.fs ?? !1
322
+ eb: r.platform_status_params.eb ?? !1,
323
+ fit: r.platform_status_params.fit ?? !1,
324
+ fs: r.platform_status_params.fs ?? !1
328
325
  }
329
- }), b = {
326
+ }), dt = {
330
327
  status: 200,
331
328
  message: "",
332
329
  data: []
333
330
  };
334
- async function R() {
335
- const e = b;
331
+ async function Lt() {
332
+ const r = dt;
336
333
  try {
337
- const s = await l.get("/apis/trialGames", {
334
+ const t = await R.get("/apis/trialGames", {
338
335
  params: {
339
- render: o()
336
+ render: m()
340
337
  }
341
338
  });
342
- let t;
343
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = t.map((a) => ({
344
- ppid: a.ppid ?? 0,
345
- ppname: a.ppname ?? "",
346
- games: a.games.map((n) => ({
347
- id: n.id ?? 0,
348
- name: n.name ?? "",
349
- img: n.img ?? "",
350
- progressive: n.progressive ?? "",
351
- notry: n.notry === 1,
352
- imgSrc: n.imgSrc ?? "",
353
- imgPf: n.imgPf ?? "",
354
- favouriteFlag: n.favourite_flag === 1,
355
- platformStatusFflag: n.platform_status_Fflag ?? "",
356
- platformFlagName: n.platform_flag_name ?? "",
339
+ let e;
340
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = e.map((n) => ({
341
+ ppid: n.ppid ?? 0,
342
+ ppname: n.ppname ?? "",
343
+ games: n.games.map((s) => ({
344
+ id: s.id ?? 0,
345
+ name: s.name ?? "",
346
+ img: s.img ?? "",
347
+ progressive: s.progressive ?? "",
348
+ notry: s.notry === 1,
349
+ imgSrc: s.imgSrc ?? "",
350
+ imgPf: s.imgPf ?? "",
351
+ favouriteFlag: s.favourite_flag === 1,
352
+ platformStatusFflag: s.platform_status_Fflag ?? "",
353
+ platformFlagName: s.platform_flag_name ?? "",
357
354
  platformStatusParams: {
358
- eb: n.platform_status_params.eb ?? !1,
359
- fit: n.platform_status_params.fit ?? !1,
360
- fs: n.platform_status_params.fs ?? !1
355
+ eb: s.platform_status_params.eb ?? !1,
356
+ fit: s.platform_status_params.fit ?? !1,
357
+ fs: s.platform_status_params.fs ?? !1
361
358
  },
362
- ppname: a.ppname ?? ""
359
+ ppname: n.ppname ?? ""
363
360
  }))
364
- })), e);
365
- } catch (s) {
366
- const t = s;
367
- return e.status = t.status || 500, e.message = t.message, e;
361
+ })), r);
362
+ } catch (t) {
363
+ const e = t;
364
+ return r.status = e.status || 500, r.message = e.message, r;
368
365
  }
369
366
  }
370
- const P = {
367
+ const vt = {
371
368
  status: 200,
372
369
  message: "",
373
370
  data: {
@@ -376,96 +373,96 @@ const P = {
376
373
  resize: 0
377
374
  }
378
375
  };
379
- async function A() {
380
- const e = P;
376
+ async function It() {
377
+ const r = vt;
381
378
  try {
382
- const s = await l.get("/apis/promotion", {
379
+ const t = await R.get("/apis/promotion", {
383
380
  params: {
384
- render: o()
381
+ render: m()
385
382
  }
386
383
  });
387
- let t;
388
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
389
- objList: t.objList.map((a) => ({
390
- promoIndex: a.promoindex ?? 0,
391
- type: a.type ?? 0,
392
- thumb: a.thumb ?? 0,
393
- title: a.title ?? "",
394
- displayTime: a.display_time ?? "",
395
- handle: a.handle ?? "",
396
- content: a.content ?? "",
397
- langList: a.lang_list ?? "",
398
- agentList: a.agent_list ?? "",
399
- dateCreated: a.datecreated ?? "",
400
- updateBy: a.updateby ?? "",
401
- lastUpdated: a.lastupdated ?? "",
402
- sequence: a.sequence ?? 0,
403
- status: a.status === 1,
404
- timer: a.timer ?? "",
405
- stime: a.stime ?? "",
406
- etime: a.etime ?? "",
407
- smaid: a.smaid ?? "",
408
- companyIndex: a.companyindex ?? "",
409
- fileName: a.filename ?? "",
410
- version: a.version ?? "",
411
- categoryName: a.category_name ?? "",
412
- barImg: a.bar_img ?? "",
413
- buttonImg: a.button_img ?? "",
414
- promoImg: a.promo_image ?? "",
415
- catId: a.catid ?? "",
416
- imageType: a.image_type ?? "",
417
- image: a.image ?? "",
418
- isLink: a.isLink,
419
- latestUpdate: a.latestupdate ?? ""
384
+ let e;
385
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
386
+ objList: e.objList.map((n) => ({
387
+ promoIndex: n.promoindex ?? 0,
388
+ type: n.type ?? 0,
389
+ thumb: n.thumb ?? 0,
390
+ title: n.title ?? "",
391
+ displayTime: n.display_time ?? "",
392
+ handle: n.handle ?? "",
393
+ content: n.content ?? "",
394
+ langList: n.lang_list ?? "",
395
+ agentList: n.agent_list ?? "",
396
+ dateCreated: n.datecreated ?? "",
397
+ updateBy: n.updateby ?? "",
398
+ lastUpdated: n.lastupdated ?? "",
399
+ sequence: n.sequence ?? 0,
400
+ status: n.status === 1,
401
+ timer: n.timer ?? "",
402
+ stime: n.stime ?? "",
403
+ etime: n.etime ?? "",
404
+ smaid: n.smaid ?? "",
405
+ companyIndex: n.companyindex ?? "",
406
+ fileName: n.filename ?? "",
407
+ version: n.version ?? "",
408
+ categoryName: n.category_name ?? "",
409
+ barImg: n.bar_img ?? "",
410
+ buttonImg: n.button_img ?? "",
411
+ promoImg: n.promo_image ?? "",
412
+ catId: n.catid ?? "",
413
+ imageType: n.image_type ?? "",
414
+ image: n.image ?? "",
415
+ isLink: n.isLink,
416
+ latestUpdate: n.latestupdate ?? ""
420
417
  })),
421
- promoCat: t.promoCat.map((a) => ({
422
- catId: a.catid ?? 0,
423
- name: a.name ?? "",
424
- barImg: a.bar_img ?? "",
425
- buttonImg: a.button_img ?? ""
418
+ promoCat: e.promoCat.map((n) => ({
419
+ catId: n.catid ?? 0,
420
+ name: n.name ?? "",
421
+ barImg: n.bar_img ?? "",
422
+ buttonImg: n.button_img ?? ""
426
423
  })),
427
- resize: t.resize
428
- }, e);
429
- } catch (s) {
430
- const t = s;
431
- return e.status = t.status || 500, e.message = t.message, e;
424
+ resize: e.resize
425
+ }, r);
426
+ } catch (t) {
427
+ const e = t;
428
+ return r.status = e.status || 500, r.message = e.message, r;
432
429
  }
433
430
  }
434
- var L = /* @__PURE__ */ ((e) => (e[e.AllCategories = 0] = "AllCategories", e[e.Lotto = 2] = "Lotto", e[e.LiveCasino = 3] = "LiveCasino", e[e.SlotGames = 4] = "SlotGames", e[e.SportsBetting = 5] = "SportsBetting", e[e.LatestAd = 7] = "LatestAd", e[e.Promotions = 8] = "Promotions", e[e.MobileBetting = 9] = "MobileBetting", e[e.ESports = 12] = "ESports", e[e.CardGames = 13] = "CardGames", e[e.FishingGames = 14] = "FishingGames", e[e.BottomRightAd = 16] = "BottomRightAd", e[e.LotteryActivity = 18] = "LotteryActivity", e[e.HomepagePopup = 101] = "HomepagePopup", e[e.LeftAd = 102] = "LeftAd", e[e.RightAd = 103] = "RightAd", e[e.MobileAd = 104] = "MobileAd", e[e.MobilePopup = 105] = "MobilePopup", e[e.BottomLeftAd = 106] = "BottomLeftAd", e[e.InfoGallery = 109] = "InfoGallery", e[e.AgentBackendAd = 114] = "AgentBackendAd", e[e.CheckInBanner = 123] = "CheckInBanner", e[e.PlatformActivities = 128] = "PlatformActivities", e[e.LotterySlogan = 130] = "LotterySlogan", e[e.MobileLotterySlogan = 131] = "MobileLotterySlogan", e[e.PointsMallSlogan = 135] = "PointsMallSlogan", e))(L || {});
435
- const h = {
431
+ var yt = /* @__PURE__ */ ((r) => (r[r.AllCategories = 0] = "AllCategories", r[r.Lotto = 2] = "Lotto", r[r.LiveCasino = 3] = "LiveCasino", r[r.SlotGames = 4] = "SlotGames", r[r.SportsBetting = 5] = "SportsBetting", r[r.LatestAd = 7] = "LatestAd", r[r.Promotions = 8] = "Promotions", r[r.MobileBetting = 9] = "MobileBetting", r[r.ESports = 12] = "ESports", r[r.CardGames = 13] = "CardGames", r[r.FishingGames = 14] = "FishingGames", r[r.BottomRightAd = 16] = "BottomRightAd", r[r.LotteryActivity = 18] = "LotteryActivity", r[r.HomepagePopup = 101] = "HomepagePopup", r[r.LeftAd = 102] = "LeftAd", r[r.RightAd = 103] = "RightAd", r[r.MobileAd = 104] = "MobileAd", r[r.MobilePopup = 105] = "MobilePopup", r[r.BottomLeftAd = 106] = "BottomLeftAd", r[r.InfoGallery = 109] = "InfoGallery", r[r.AgentBackendAd = 114] = "AgentBackendAd", r[r.CheckInBanner = 123] = "CheckInBanner", r[r.PlatformActivities = 128] = "PlatformActivities", r[r.LotterySlogan = 130] = "LotterySlogan", r[r.MobileLotterySlogan = 131] = "MobileLotterySlogan", r[r.PointsMallSlogan = 135] = "PointsMallSlogan", r))(yt || {});
432
+ const mt = {
436
433
  status: 200,
437
434
  message: "",
438
435
  data: {
439
436
  cmsList: []
440
437
  }
441
438
  };
442
- async function D(e) {
443
- const s = h;
439
+ async function Mt(r) {
440
+ const t = mt;
444
441
  try {
445
- const t = await l.get(`/apis/cmsList?id=${e}`, {
442
+ const e = await R.get(`/apis/cmsList?id=${r}`, {
446
443
  params: {
447
- render: o()
444
+ render: m()
448
445
  }
449
446
  });
450
- let a;
451
- return o() ? a = JSON.parse(p(t.data)) : a = t.data, t.status != 200 ? (s.status = t.status, s.message = "", s) : (s.data = {
452
- cmsList: a.cmslist.map((n) => ({
453
- name: n.name ?? "",
454
- content: n.content ?? "",
455
- link: n.link ?? "",
456
- linkTarget: n.link_target ?? "",
457
- updatedOn: n.updated_on ?? "",
458
- idCmsCategory: n.id_cms_category ?? 0,
459
- contentOrg: n.content_org ?? "",
460
- linkOrg: n.link_org ?? ""
447
+ let n;
448
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = {
449
+ cmsList: n.cmslist.map((s) => ({
450
+ name: s.name ?? "",
451
+ content: s.content ?? "",
452
+ link: s.link ?? "",
453
+ linkTarget: s.link_target ?? "",
454
+ updatedOn: s.updated_on ?? "",
455
+ idCmsCategory: s.id_cms_category ?? 0,
456
+ contentOrg: s.content_org ?? "",
457
+ linkOrg: s.link_org ?? ""
461
458
  }))
462
- }, s);
463
- } catch (t) {
464
- const a = t;
465
- return s.status = a.status || 500, s.message = a.message, s;
459
+ }, t);
460
+ } catch (e) {
461
+ const n = e;
462
+ return t.status = n.status || 500, t.message = n.message, t;
466
463
  }
467
464
  }
468
- const N = {
465
+ const Ft = {
469
466
  status: 200,
470
467
  message: "",
471
468
  data: {
@@ -482,251 +479,251 @@ const N = {
482
479
  mobileBanner: [],
483
480
  announcement: [],
484
481
  alertAnnouncement: [],
485
- hotGames: y,
486
- fishGames: S,
487
- trialGames: b,
488
- promotion: P,
489
- cmsList: h
482
+ hotGames: pt,
483
+ fishGames: gt,
484
+ trialGames: dt,
485
+ promotion: vt,
486
+ cmsList: mt
490
487
  }
491
488
  };
492
- async function re() {
493
- const e = N;
489
+ async function le() {
490
+ const r = Ft;
494
491
  try {
495
492
  const [
496
- s,
497
493
  t,
498
- a,
494
+ e,
499
495
  n,
500
- d,
501
- _
496
+ s,
497
+ i,
498
+ o
502
499
  ] = await Promise.all([
503
- l.get("/apis/home", {
500
+ R.get("/apis/home", {
504
501
  params: {
505
- render: o()
502
+ render: m()
506
503
  }
507
504
  }),
508
- G(),
509
- E(),
510
- R(),
511
- A(),
512
- D(L.LatestAd)
505
+ Nt(),
506
+ Vt(),
507
+ Lt(),
508
+ It(),
509
+ Mt(yt.LatestAd)
513
510
  ]);
514
- let u;
515
- return o() ? u = JSON.parse(p(s.data)) : u = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
511
+ let a;
512
+ return m() ? a = JSON.parse(A(t.data)) : a = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
516
513
  game: {
517
- SPORT: u.game.SPORT.map((r) => i(r)),
518
- SPECIAL: u.game.SPECIAL.map((r) => i(r)),
519
- PVP: u.game.PVP.map((r) => i(r)),
520
- LIVE: u.game.LIVE.map((r) => i(r)),
521
- EVENT: u.game.EVENT.map((r) => i(r)),
522
- ESPORT: u.game.ESPORT.map((r) => i(r)),
523
- EGAME: u.game.EGAME.map((r) => i(r)),
524
- BINGO: u.game.BINGO.map((r) => i(r))
514
+ SPORT: a.game.SPORT.map((u) => F(u)),
515
+ SPECIAL: a.game.SPECIAL.map((u) => F(u)),
516
+ PVP: a.game.PVP.map((u) => F(u)),
517
+ LIVE: a.game.LIVE.map((u) => F(u)),
518
+ EVENT: a.game.EVENT.map((u) => F(u)),
519
+ ESPORT: a.game.ESPORT.map((u) => F(u)),
520
+ EGAME: a.game.EGAME.map((u) => F(u)),
521
+ BINGO: a.game.BINGO.map((u) => F(u))
525
522
  },
526
- mobileBanner: u.mobileBanner.map((r) => ({
527
- name: r.name ?? "",
528
- content: r.content ?? "",
529
- link: r.link ?? "",
530
- linkTarget: r.link_target ?? "",
531
- updatedOn: r.updated_on ?? "",
532
- idCmsCategory: r.id_cms_category ?? 0,
533
- contentOrg: r.content_org ?? ""
523
+ mobileBanner: a.mobileBanner.map((u) => ({
524
+ name: u.name ?? "",
525
+ content: u.content ?? "",
526
+ link: u.link ?? "",
527
+ linkTarget: u.link_target ?? "",
528
+ updatedOn: u.updated_on ?? "",
529
+ idCmsCategory: u.id_cms_category ?? 0,
530
+ contentOrg: u.content_org ?? ""
534
531
  })),
535
- announcement: u.announcement.map((r) => ({
536
- announcementIndex: r.announcement_index ?? 0,
537
- announcementEnglish: r.announcement_english ?? "",
538
- announcementSimplified: r.announcement_simplified ?? "",
539
- announcementTraditional: r.announcement_traditional ?? "",
540
- announcementMalay: r.announcement_malay ?? "",
541
- announcementStatus: r.announcement_status === "1",
542
- announcementShow: r.announcement_show === "1",
543
- announcementAlert: r.announcement_alert === "1",
544
- announcementUser: r.announcement_user === "1",
545
- announcementSequence: r.announcement_sequence ?? 0,
546
- announcementCompany: r.announcement_company === "1",
547
- companyIndex: r.companyindex ?? 0,
548
- announcementLastUpdated: r.announcement_lastupdated ?? "",
549
- announcementDateCreated: r.announcement_datecreated ?? "",
550
- announcementSmaid: r.announcement_smaid ?? "",
551
- annTimer: r.ann_timer ?? "",
552
- annStart: r.ann_start ?? "",
553
- annEnd: r.ann_end ?? "",
554
- grp: r.grp ?? "",
555
- time: r.time ?? ""
532
+ announcement: a.announcement.map((u) => ({
533
+ announcementIndex: u.announcement_index ?? 0,
534
+ announcementEnglish: u.announcement_english ?? "",
535
+ announcementSimplified: u.announcement_simplified ?? "",
536
+ announcementTraditional: u.announcement_traditional ?? "",
537
+ announcementMalay: u.announcement_malay ?? "",
538
+ announcementStatus: u.announcement_status === "1",
539
+ announcementShow: u.announcement_show === "1",
540
+ announcementAlert: u.announcement_alert === "1",
541
+ announcementUser: u.announcement_user === "1",
542
+ announcementSequence: u.announcement_sequence ?? 0,
543
+ announcementCompany: u.announcement_company === "1",
544
+ companyIndex: u.companyindex ?? 0,
545
+ announcementLastUpdated: u.announcement_lastupdated ?? "",
546
+ announcementDateCreated: u.announcement_datecreated ?? "",
547
+ announcementSmaid: u.announcement_smaid ?? "",
548
+ annTimer: u.ann_timer ?? "",
549
+ annStart: u.ann_start ?? "",
550
+ annEnd: u.ann_end ?? "",
551
+ grp: u.grp ?? "",
552
+ time: u.time ?? ""
556
553
  })),
557
- alertAnnouncement: u.alert_announcement.map((r) => ({
558
- announcementDateCreated: r.announcement_datecreated ?? "",
559
- announcementSimplified: r.announcement_simplified ?? ""
554
+ alertAnnouncement: a.alert_announcement.map((u) => ({
555
+ announcementDateCreated: u.announcement_datecreated ?? "",
556
+ announcementSimplified: u.announcement_simplified ?? ""
560
557
  })),
561
- hotGames: t,
562
- fishGames: a,
563
- trialGames: n,
564
- promotion: d,
565
- cmsList: _
566
- }, e);
567
- } catch (s) {
568
- const t = s;
569
- return e.status = t.status || 500, e.message = t.message, e;
570
- }
571
- }
572
- const i = (e) => ({
573
- id: e.id ?? 0,
574
- idPlatformMaster: e.id_PlatformMaster ?? 0,
575
- idProductMaster: e.id_ProductMaster ?? 0,
576
- name: e.name ?? "",
577
- shortName: e.shortName ?? "",
578
- img: e.img ?? "",
579
- mobileUrl: e.mobileUrl ?? "",
580
- url: e.url ?? "",
581
- desc: e.desc ?? "",
582
- seq: e.seq ?? 0,
583
- flag: e.flag ?? 0,
584
- status: e.status ?? "",
585
- createdBy: e.created_by ?? 0,
586
- createdOn: e.created_on ?? "",
587
- categoryID: e.categoryid ?? 0,
588
- com: e.com ?? "",
589
- cur: e.cur ?? "",
590
- pt: e.pt ?? "",
591
- ppName: e.pp_name ?? "",
592
- ppImage: e.pp_image ?? "",
593
- platformCode: e.platform_code ?? "",
594
- platformName: e.platform_name ?? "",
595
- classIcon: e.class_icon ?? "",
596
- productCode: e.product_code ?? "",
597
- productName: e.product_name ?? "",
598
- gameID: e.game_id ?? 0,
599
- fAuth: e.fAuth ?? !1,
558
+ hotGames: e,
559
+ fishGames: n,
560
+ trialGames: s,
561
+ promotion: i,
562
+ cmsList: o
563
+ }, r);
564
+ } catch (t) {
565
+ const e = t;
566
+ return r.status = e.status || 500, r.message = e.message, r;
567
+ }
568
+ }
569
+ const F = (r) => ({
570
+ id: r.id ?? 0,
571
+ idPlatformMaster: r.id_PlatformMaster ?? 0,
572
+ idProductMaster: r.id_ProductMaster ?? 0,
573
+ name: r.name ?? "",
574
+ shortName: r.shortName ?? "",
575
+ img: r.img ?? "",
576
+ mobileUrl: r.mobileUrl ?? "",
577
+ url: r.url ?? "",
578
+ desc: r.desc ?? "",
579
+ seq: r.seq ?? 0,
580
+ flag: r.flag ?? 0,
581
+ status: r.status ?? "",
582
+ createdBy: r.created_by ?? 0,
583
+ createdOn: r.created_on ?? "",
584
+ categoryID: r.categoryid ?? 0,
585
+ com: r.com ?? "",
586
+ cur: r.cur ?? "",
587
+ pt: r.pt ?? "",
588
+ ppName: r.pp_name ?? "",
589
+ ppImage: r.pp_image ?? "",
590
+ platformCode: r.platform_code ?? "",
591
+ platformName: r.platform_name ?? "",
592
+ classIcon: r.class_icon ?? "",
593
+ productCode: r.product_code ?? "",
594
+ productName: r.product_name ?? "",
595
+ gameID: r.game_id ?? 0,
596
+ fAuth: r.fAuth ?? !1,
600
597
  platformStatusParams: {
601
- eb: e.platform_status_params.eb ?? !1,
602
- fit: e.platform_status_params.fit ?? !1,
603
- fs: e.platform_status_params.fs ?? !1
598
+ eb: r.platform_status_params.eb ?? !1,
599
+ fit: r.platform_status_params.fit ?? !1,
600
+ fs: r.platform_status_params.fs ?? !1
604
601
  },
605
- loginFlag: e.login_flag === "1",
606
- link: e.link ?? "",
607
- favouriteFlag: e.favourite_flag === 1,
608
- platformStatusFlag: e.platform_status_flag ?? "",
609
- platformFlagName: e.platform_flag_name ?? "",
610
- homeLogo: e.home_logo ?? "",
611
- imgPf: e.imgPf ?? "",
612
- imgSport: e.imgSport ?? "",
613
- imgTemplate: e.imgTemplate ?? ""
602
+ loginFlag: r.login_flag === "1",
603
+ link: r.link ?? "",
604
+ favouriteFlag: r.favourite_flag === 1,
605
+ platformStatusFlag: r.platform_status_flag ?? "",
606
+ platformFlagName: r.platform_flag_name ?? "",
607
+ homeLogo: r.home_logo ?? "",
608
+ imgPf: r.imgPf ?? "",
609
+ imgSport: r.imgSport ?? "",
610
+ imgTemplate: r.imgTemplate ?? ""
614
611
  });
615
- var j = /* @__PURE__ */ ((e) => (e.SPORT = "SPORT", e.SPECIAL = "SPECIAL", e.PVP = "PVP", e.LIVE = "LIVE", e.EVENT = "EVENT", e.ESPORT = "ESPORT", e.EGAME = "EGAME", e.BINGO = "BINGO", e))(j || {});
616
- const k = {
612
+ var kt = /* @__PURE__ */ ((r) => (r.SPORT = "SPORT", r.SPECIAL = "SPECIAL", r.PVP = "PVP", r.LIVE = "LIVE", r.EVENT = "EVENT", r.ESPORT = "ESPORT", r.EGAME = "EGAME", r.BINGO = "BINGO", r))(kt || {});
613
+ const Ht = {
617
614
  status: 200,
618
615
  message: "",
619
616
  data: ""
620
617
  };
621
- async function ne() {
622
- const e = k;
618
+ async function ce() {
619
+ const r = Ht;
623
620
  try {
624
- const s = await l.get("/apis/currentLang", {
621
+ const t = await R.get("/apis/currentLang", {
625
622
  params: {
626
- render: o()
623
+ render: m()
627
624
  }
628
625
  });
629
- let t;
630
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = t, e);
631
- } catch (s) {
632
- const t = s;
633
- return e.status = t.status || 500, e.message = t.message, e;
626
+ let e;
627
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = e, r);
628
+ } catch (t) {
629
+ const e = t;
630
+ return r.status = e.status || 500, r.message = e.message, r;
634
631
  }
635
632
  }
636
- const T = {
633
+ const jt = {
637
634
  status: 200,
638
635
  message: "",
639
636
  data: []
640
637
  };
641
- async function oe() {
642
- const e = T;
638
+ async function pe() {
639
+ const r = jt;
643
640
  try {
644
- const s = await l.get("/apis/getLocale", {
641
+ const t = await R.get("/apis/getLocale", {
645
642
  params: {
646
- render: o()
643
+ render: m()
647
644
  }
648
645
  });
649
- let t;
650
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = [
646
+ let e;
647
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = [
651
648
  {
652
649
  code: "en",
653
- label: t.en.label ?? ""
650
+ label: e.en.label ?? ""
654
651
  },
655
652
  {
656
653
  code: "zh",
657
- label: t.zh.label ?? ""
654
+ label: e.zh.label ?? ""
658
655
  },
659
656
  {
660
657
  code: "ms",
661
- label: t.ms.label ?? ""
658
+ label: e.ms.label ?? ""
662
659
  }
663
- ], e);
664
- } catch (s) {
665
- const t = s;
666
- return e.status = t.status || 500, e.message = t.message, e;
660
+ ], r);
661
+ } catch (t) {
662
+ const e = t;
663
+ return r.status = e.status || 500, r.message = e.message, r;
667
664
  }
668
665
  }
669
- const M = {
666
+ const qt = {
670
667
  status: 200,
671
668
  message: "",
672
669
  data: {
673
670
  liveChat: ""
674
671
  }
675
672
  };
676
- async function ue() {
677
- const e = M;
673
+ async function ge() {
674
+ const r = qt;
678
675
  try {
679
- const s = await l.get("/apis/cslink", {
676
+ const t = await R.get("/apis/cslink", {
680
677
  params: {
681
- render: o()
678
+ render: m()
682
679
  }
683
680
  });
684
- let t;
685
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
686
- liveChat: t.livechat ?? ""
687
- }, e);
688
- } catch (s) {
689
- const t = s;
690
- return e.status = t.status || 500, e.message = t.message, e;
681
+ let e;
682
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
683
+ liveChat: e.livechat ?? ""
684
+ }, r);
685
+ } catch (t) {
686
+ const e = t;
687
+ return r.status = e.status || 500, r.message = e.message, r;
691
688
  }
692
689
  }
693
- const B = {
690
+ const Ct = {
694
691
  status: 200,
695
692
  message: "",
696
693
  data: []
697
694
  };
698
- async function le(e) {
699
- const s = B;
695
+ async function de(r) {
696
+ const t = Ct;
700
697
  try {
701
- const t = await l.get(`/apis/egame/json/${e}`, {
698
+ const e = await R.get(`/apis/egame/json/${r}`, {
702
699
  params: {
703
- render: o()
700
+ render: m()
704
701
  }
705
702
  });
706
- let a;
707
- return o() ? a = JSON.parse(p(t.data)) : a = t.data, t.status != 200 ? (s.status = t.status, s.message = "", s) : (s.data = a.map((n) => ({
708
- gameId: n.game_id ?? "",
709
- imgSrc: n.imgSrc ?? "",
710
- imgPf: n.imgPf ?? "",
711
- name: n.name ?? "",
712
- favouriteFlag: n.favourite_flag === 1,
713
- platformStatusFflag: n.platform_status_Fflag ?? "",
714
- platformFlagName: n.platform_flag_name ?? "",
703
+ let n;
704
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = n.map((s) => ({
705
+ gameId: s.game_id ?? "",
706
+ imgSrc: s.imgSrc ?? "",
707
+ imgPf: s.imgPf ?? "",
708
+ name: s.name ?? "",
709
+ favouriteFlag: s.favourite_flag === 1,
710
+ platformStatusFflag: s.platform_status_Fflag ?? "",
711
+ platformFlagName: s.platform_flag_name ?? "",
715
712
  platformStatusParams: {
716
- eb: n.platform_status_params.eb ?? !1,
717
- fit: n.platform_status_params.fit ?? !1,
718
- fs: n.platform_status_params.fs ?? !1
713
+ eb: s.platform_status_params.eb ?? !1,
714
+ fit: s.platform_status_params.fit ?? !1,
715
+ fs: s.platform_status_params.fs ?? !1
719
716
  },
720
- progressive: n.progressive ?? "",
721
- gameCategory: n.game_category ?? "",
722
- ppid: n.pp_id ?? ""
723
- })), s);
724
- } catch (t) {
725
- const a = t;
726
- return s.status = a.status || 500, s.message = a.message, s;
717
+ progressive: s.progressive ?? "",
718
+ gameCategory: s.game_category ?? "",
719
+ ppid: s.pp_id ?? ""
720
+ })), t);
721
+ } catch (e) {
722
+ const n = e;
723
+ return t.status = n.status || 500, t.message = n.message, t;
727
724
  }
728
725
  }
729
- const F = {
726
+ const Gt = {
730
727
  status: 200,
731
728
  message: "",
732
729
  data: {
@@ -737,36 +734,1999 @@ const F = {
737
734
  concantenatedKey: ""
738
735
  }
739
736
  };
740
- async function pe(e) {
741
- const s = F;
737
+ async function Ut(r) {
738
+ const t = Gt;
742
739
  try {
743
- const t = await l.get("/apis/getSetting", {
740
+ const e = await R.get("/apis/getSetting", {
744
741
  params: {
745
- render: o(),
746
- setting: e
742
+ render: m(),
743
+ setting: r
747
744
  }
748
745
  });
749
- let a;
750
- return o() ? a = JSON.parse(p(t.data)) : a = t.data, t.status != 200 ? (s.status = t.status, s.message = "", s) : (s.data = {
751
- csrf: a.csrf,
752
- getCaptcha: a.data.CAPTCHA ?? "",
753
- verificationBeforeLogin: a.data["slide-verification"] === "1",
754
- publicKey: a.data.encryptkey.pub.replace(
746
+ console.log(e);
747
+ let n;
748
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = {
749
+ csrf: n.csrf ?? "",
750
+ getCaptcha: n.data.CAPTCHA ?? "",
751
+ verificationBeforeLogin: n.data["slide-verification"] === "1",
752
+ publicKey: n.data.encryptkey ? n.data.encryptkey.pub.replace(
755
753
  /-----BEGIN PUBLIC KEY-----|-----END PUBLIC KEY-----|\r|\n|=#/g,
756
754
  ""
757
- ),
758
- concantenatedKey: Object.keys(a.data.encryptkey.pubarr).join("+")
759
- }, s);
760
- } catch (t) {
761
- const a = t;
762
- return s.status = a.status || 500, s.message = a.message, s;
755
+ ) : "",
756
+ concantenatedKey: n.data.encryptkey ? Object.keys(n.data.encryptkey.pubarr).join("+") : ""
757
+ }, t);
758
+ } catch (e) {
759
+ const n = e;
760
+ return t.status = n.status || 500, t.message = n.message, t;
761
+ }
762
+ }
763
+ var ve = "0123456789abcdefghijklmnopqrstuvwxyz";
764
+ function M(r) {
765
+ return ve.charAt(r);
766
+ }
767
+ function ye(r, t) {
768
+ return r & t;
769
+ }
770
+ function Q(r, t) {
771
+ return r | t;
772
+ }
773
+ function Tt(r, t) {
774
+ return r ^ t;
775
+ }
776
+ function Et(r, t) {
777
+ return r & ~t;
778
+ }
779
+ function me(r) {
780
+ if (r == 0)
781
+ return -1;
782
+ var t = 0;
783
+ return r & 65535 || (r >>= 16, t += 16), r & 255 || (r >>= 8, t += 8), r & 15 || (r >>= 4, t += 4), r & 3 || (r >>= 2, t += 2), r & 1 || ++t, t;
784
+ }
785
+ function Se(r) {
786
+ for (var t = 0; r != 0; )
787
+ r &= r - 1, ++t;
788
+ return t;
789
+ }
790
+ var z = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Kt = "=";
791
+ function it(r) {
792
+ var t, e, n = "";
793
+ for (t = 0; t + 3 <= r.length; t += 3)
794
+ e = parseInt(r.substring(t, t + 3), 16), n += z.charAt(e >> 6) + z.charAt(e & 63);
795
+ for (t + 1 == r.length ? (e = parseInt(r.substring(t, t + 1), 16), n += z.charAt(e << 2)) : t + 2 == r.length && (e = parseInt(r.substring(t, t + 2), 16), n += z.charAt(e >> 2) + z.charAt((e & 3) << 4)); (n.length & 3) > 0; )
796
+ n += Kt;
797
+ return n;
798
+ }
799
+ function Dt(r) {
800
+ var t = "", e, n = 0, s = 0;
801
+ for (e = 0; e < r.length && r.charAt(e) != Kt; ++e) {
802
+ var i = z.indexOf(r.charAt(e));
803
+ i < 0 || (n == 0 ? (t += M(i >> 2), s = i & 3, n = 1) : n == 1 ? (t += M(s << 2 | i >> 4), s = i & 15, n = 2) : n == 2 ? (t += M(s), t += M(i >> 2), s = i & 3, n = 3) : (t += M(s << 2 | i >> 4), t += M(i & 15), n = 0));
804
+ }
805
+ return n == 1 && (t += M(s << 2)), t;
806
+ }
807
+ var U, be = {
808
+ decode: function(r) {
809
+ var t;
810
+ if (U === void 0) {
811
+ var e = "0123456789ABCDEF", n = ` \f
812
+ \r  \u2028\u2029`;
813
+ for (U = {}, t = 0; t < 16; ++t)
814
+ U[e.charAt(t)] = t;
815
+ for (e = e.toLowerCase(), t = 10; t < 16; ++t)
816
+ U[e.charAt(t)] = t;
817
+ for (t = 0; t < n.length; ++t)
818
+ U[n.charAt(t)] = -1;
819
+ }
820
+ var s = [], i = 0, o = 0;
821
+ for (t = 0; t < r.length; ++t) {
822
+ var a = r.charAt(t);
823
+ if (a == "=")
824
+ break;
825
+ if (a = U[a], a != -1) {
826
+ if (a === void 0)
827
+ throw new Error("Illegal character at offset " + t);
828
+ i |= a, ++o >= 2 ? (s[s.length] = i, i = 0, o = 0) : i <<= 4;
829
+ }
830
+ }
831
+ if (o)
832
+ throw new Error("Hex encoding incomplete: 4 bits missing");
833
+ return s;
834
+ }
835
+ }, G, lt = {
836
+ decode: function(r) {
837
+ var t;
838
+ if (G === void 0) {
839
+ var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = `= \f
840
+ \r  \u2028\u2029`;
841
+ for (G = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
842
+ G[e.charAt(t)] = t;
843
+ for (G["-"] = 62, G._ = 63, t = 0; t < n.length; ++t)
844
+ G[n.charAt(t)] = -1;
845
+ }
846
+ var s = [], i = 0, o = 0;
847
+ for (t = 0; t < r.length; ++t) {
848
+ var a = r.charAt(t);
849
+ if (a == "=")
850
+ break;
851
+ if (a = G[a], a != -1) {
852
+ if (a === void 0)
853
+ throw new Error("Illegal character at offset " + t);
854
+ i |= a, ++o >= 4 ? (s[s.length] = i >> 16, s[s.length] = i >> 8 & 255, s[s.length] = i & 255, i = 0, o = 0) : i <<= 6;
855
+ }
856
+ }
857
+ switch (o) {
858
+ case 1:
859
+ throw new Error("Base64 encoding incomplete: at least 2 bits missing");
860
+ case 2:
861
+ s[s.length] = i >> 10;
862
+ break;
863
+ case 3:
864
+ s[s.length] = i >> 16, s[s.length] = i >> 8 & 255;
865
+ break;
866
+ }
867
+ return s;
868
+ },
869
+ re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
870
+ unarmor: function(r) {
871
+ var t = lt.re.exec(r);
872
+ if (t)
873
+ if (t[1])
874
+ r = t[1];
875
+ else if (t[2])
876
+ r = t[2];
877
+ else
878
+ throw new Error("RegExp out of sync");
879
+ return lt.decode(r);
763
880
  }
881
+ }, K = 1e13, Y = (
882
+ /** @class */
883
+ function() {
884
+ function r(t) {
885
+ this.buf = [+t || 0];
886
+ }
887
+ return r.prototype.mulAdd = function(t, e) {
888
+ var n = this.buf, s = n.length, i, o;
889
+ for (i = 0; i < s; ++i)
890
+ o = n[i] * t + e, o < K ? e = 0 : (e = 0 | o / K, o -= e * K), n[i] = o;
891
+ e > 0 && (n[i] = e);
892
+ }, r.prototype.sub = function(t) {
893
+ var e = this.buf, n = e.length, s, i;
894
+ for (s = 0; s < n; ++s)
895
+ i = e[s] - t, i < 0 ? (i += K, t = 1) : t = 0, e[s] = i;
896
+ for (; e[e.length - 1] === 0; )
897
+ e.pop();
898
+ }, r.prototype.toString = function(t) {
899
+ if ((t || 10) != 10)
900
+ throw new Error("only base 10 is supported");
901
+ for (var e = this.buf, n = e[e.length - 1].toString(), s = e.length - 2; s >= 0; --s)
902
+ n += (K + e[s]).toString().substring(1);
903
+ return n;
904
+ }, r.prototype.valueOf = function() {
905
+ for (var t = this.buf, e = 0, n = t.length - 1; n >= 0; --n)
906
+ e = e * K + t[n];
907
+ return e;
908
+ }, r.prototype.simplify = function() {
909
+ var t = this.buf;
910
+ return t.length == 1 ? t[0] : this;
911
+ }, r;
912
+ }()
913
+ ), zt = "…", Te = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Ee = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
914
+ function J(r, t) {
915
+ return r.length > t && (r = r.substring(0, t) + zt), r;
764
916
  }
765
- const x = {
917
+ var ut = (
918
+ /** @class */
919
+ function() {
920
+ function r(t, e) {
921
+ this.hexDigits = "0123456789ABCDEF", t instanceof r ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = e);
922
+ }
923
+ return r.prototype.get = function(t) {
924
+ if (t === void 0 && (t = this.pos++), t >= this.enc.length)
925
+ throw new Error("Requesting byte offset ".concat(t, " on a stream of length ").concat(this.enc.length));
926
+ return typeof this.enc == "string" ? this.enc.charCodeAt(t) : this.enc[t];
927
+ }, r.prototype.hexByte = function(t) {
928
+ return this.hexDigits.charAt(t >> 4 & 15) + this.hexDigits.charAt(t & 15);
929
+ }, r.prototype.hexDump = function(t, e, n) {
930
+ for (var s = "", i = t; i < e; ++i)
931
+ if (s += this.hexByte(this.get(i)), n !== !0)
932
+ switch (i & 15) {
933
+ case 7:
934
+ s += " ";
935
+ break;
936
+ case 15:
937
+ s += `
938
+ `;
939
+ break;
940
+ default:
941
+ s += " ";
942
+ }
943
+ return s;
944
+ }, r.prototype.isASCII = function(t, e) {
945
+ for (var n = t; n < e; ++n) {
946
+ var s = this.get(n);
947
+ if (s < 32 || s > 176)
948
+ return !1;
949
+ }
950
+ return !0;
951
+ }, r.prototype.parseStringISO = function(t, e) {
952
+ for (var n = "", s = t; s < e; ++s)
953
+ n += String.fromCharCode(this.get(s));
954
+ return n;
955
+ }, r.prototype.parseStringUTF = function(t, e) {
956
+ for (var n = "", s = t; s < e; ) {
957
+ var i = this.get(s++);
958
+ i < 128 ? n += String.fromCharCode(i) : i > 191 && i < 224 ? n += String.fromCharCode((i & 31) << 6 | this.get(s++) & 63) : n += String.fromCharCode((i & 15) << 12 | (this.get(s++) & 63) << 6 | this.get(s++) & 63);
959
+ }
960
+ return n;
961
+ }, r.prototype.parseStringBMP = function(t, e) {
962
+ for (var n = "", s, i, o = t; o < e; )
963
+ s = this.get(o++), i = this.get(o++), n += String.fromCharCode(s << 8 | i);
964
+ return n;
965
+ }, r.prototype.parseTime = function(t, e, n) {
966
+ var s = this.parseStringISO(t, e), i = (n ? Te : Ee).exec(s);
967
+ return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), s = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (s += ":" + i[5], i[6] && (s += ":" + i[6], i[7] && (s += "." + i[7]))), i[8] && (s += " UTC", i[8] != "Z" && (s += i[8], i[9] && (s += ":" + i[9]))), s) : "Unrecognized time: " + s;
968
+ }, r.prototype.parseInteger = function(t, e) {
969
+ for (var n = this.get(t), s = n > 127, i = s ? 255 : 0, o, a = ""; n == i && ++t < e; )
970
+ n = this.get(t);
971
+ if (o = e - t, o === 0)
972
+ return s ? -1 : 0;
973
+ if (o > 4) {
974
+ for (a = n, o <<= 3; !((+a ^ i) & 128); )
975
+ a = +a << 1, --o;
976
+ a = "(" + o + ` bit)
977
+ `;
978
+ }
979
+ s && (n = n - 256);
980
+ for (var u = new Y(n), h = t + 1; h < e; ++h)
981
+ u.mulAdd(256, this.get(h));
982
+ return a + u.toString();
983
+ }, r.prototype.parseBitString = function(t, e, n) {
984
+ for (var s = this.get(t), i = (e - t - 1 << 3) - s, o = "(" + i + ` bit)
985
+ `, a = "", u = t + 1; u < e; ++u) {
986
+ for (var h = this.get(u), l = u == e - 1 ? s : 0, c = 7; c >= l; --c)
987
+ a += h >> c & 1 ? "1" : "0";
988
+ if (a.length > n)
989
+ return o + J(a, n);
990
+ }
991
+ return o + a;
992
+ }, r.prototype.parseOctetString = function(t, e, n) {
993
+ if (this.isASCII(t, e))
994
+ return J(this.parseStringISO(t, e), n);
995
+ var s = e - t, i = "(" + s + ` byte)
996
+ `;
997
+ n /= 2, s > n && (e = t + n);
998
+ for (var o = t; o < e; ++o)
999
+ i += this.hexByte(this.get(o));
1000
+ return s > n && (i += zt), i;
1001
+ }, r.prototype.parseOID = function(t, e, n) {
1002
+ for (var s = "", i = new Y(), o = 0, a = t; a < e; ++a) {
1003
+ var u = this.get(a);
1004
+ if (i.mulAdd(128, u & 127), o += 7, !(u & 128)) {
1005
+ if (s === "")
1006
+ if (i = i.simplify(), i instanceof Y)
1007
+ i.sub(80), s = "2." + i.toString();
1008
+ else {
1009
+ var h = i < 80 ? i < 40 ? 0 : 1 : 2;
1010
+ s = h + "." + (i - h * 40);
1011
+ }
1012
+ else
1013
+ s += "." + i.toString();
1014
+ if (s.length > n)
1015
+ return J(s, n);
1016
+ i = new Y(), o = 0;
1017
+ }
1018
+ }
1019
+ return o > 0 && (s += ".incomplete"), s;
1020
+ }, r;
1021
+ }()
1022
+ ), De = (
1023
+ /** @class */
1024
+ function() {
1025
+ function r(t, e, n, s, i) {
1026
+ if (!(s instanceof wt))
1027
+ throw new Error("Invalid tag value.");
1028
+ this.stream = t, this.header = e, this.length = n, this.tag = s, this.sub = i;
1029
+ }
1030
+ return r.prototype.typeName = function() {
1031
+ switch (this.tag.tagClass) {
1032
+ case 0:
1033
+ switch (this.tag.tagNumber) {
1034
+ case 0:
1035
+ return "EOC";
1036
+ case 1:
1037
+ return "BOOLEAN";
1038
+ case 2:
1039
+ return "INTEGER";
1040
+ case 3:
1041
+ return "BIT_STRING";
1042
+ case 4:
1043
+ return "OCTET_STRING";
1044
+ case 5:
1045
+ return "NULL";
1046
+ case 6:
1047
+ return "OBJECT_IDENTIFIER";
1048
+ case 7:
1049
+ return "ObjectDescriptor";
1050
+ case 8:
1051
+ return "EXTERNAL";
1052
+ case 9:
1053
+ return "REAL";
1054
+ case 10:
1055
+ return "ENUMERATED";
1056
+ case 11:
1057
+ return "EMBEDDED_PDV";
1058
+ case 12:
1059
+ return "UTF8String";
1060
+ case 16:
1061
+ return "SEQUENCE";
1062
+ case 17:
1063
+ return "SET";
1064
+ case 18:
1065
+ return "NumericString";
1066
+ case 19:
1067
+ return "PrintableString";
1068
+ case 20:
1069
+ return "TeletexString";
1070
+ case 21:
1071
+ return "VideotexString";
1072
+ case 22:
1073
+ return "IA5String";
1074
+ case 23:
1075
+ return "UTCTime";
1076
+ case 24:
1077
+ return "GeneralizedTime";
1078
+ case 25:
1079
+ return "GraphicString";
1080
+ case 26:
1081
+ return "VisibleString";
1082
+ case 27:
1083
+ return "GeneralString";
1084
+ case 28:
1085
+ return "UniversalString";
1086
+ case 30:
1087
+ return "BMPString";
1088
+ }
1089
+ return "Universal_" + this.tag.tagNumber.toString();
1090
+ case 1:
1091
+ return "Application_" + this.tag.tagNumber.toString();
1092
+ case 2:
1093
+ return "[" + this.tag.tagNumber.toString() + "]";
1094
+ case 3:
1095
+ return "Private_" + this.tag.tagNumber.toString();
1096
+ }
1097
+ }, r.prototype.content = function(t) {
1098
+ if (this.tag === void 0)
1099
+ return null;
1100
+ t === void 0 && (t = 1 / 0);
1101
+ var e = this.posContent(), n = Math.abs(this.length);
1102
+ if (!this.tag.isUniversal())
1103
+ return this.sub !== null ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
1104
+ switch (this.tag.tagNumber) {
1105
+ case 1:
1106
+ return this.stream.get(e) === 0 ? "false" : "true";
1107
+ case 2:
1108
+ return this.stream.parseInteger(e, e + n);
1109
+ case 3:
1110
+ return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(e, e + n, t);
1111
+ case 4:
1112
+ return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
1113
+ case 6:
1114
+ return this.stream.parseOID(e, e + n, t);
1115
+ case 16:
1116
+ case 17:
1117
+ return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
1118
+ case 12:
1119
+ return J(this.stream.parseStringUTF(e, e + n), t);
1120
+ case 18:
1121
+ case 19:
1122
+ case 20:
1123
+ case 21:
1124
+ case 22:
1125
+ case 26:
1126
+ return J(this.stream.parseStringISO(e, e + n), t);
1127
+ case 30:
1128
+ return J(this.stream.parseStringBMP(e, e + n), t);
1129
+ case 23:
1130
+ case 24:
1131
+ return this.stream.parseTime(e, e + n, this.tag.tagNumber == 23);
1132
+ }
1133
+ return null;
1134
+ }, r.prototype.toString = function() {
1135
+ return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
1136
+ }, r.prototype.toPrettyString = function(t) {
1137
+ t === void 0 && (t = "");
1138
+ var e = t + this.typeName() + " @" + this.stream.pos;
1139
+ if (this.length >= 0 && (e += "+"), e += this.length, this.tag.tagConstructed ? e += " (constructed)" : this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null && (e += " (encapsulates)"), e += `
1140
+ `, this.sub !== null) {
1141
+ t += " ";
1142
+ for (var n = 0, s = this.sub.length; n < s; ++n)
1143
+ e += this.sub[n].toPrettyString(t);
1144
+ }
1145
+ return e;
1146
+ }, r.prototype.posStart = function() {
1147
+ return this.stream.pos;
1148
+ }, r.prototype.posContent = function() {
1149
+ return this.stream.pos + this.header;
1150
+ }, r.prototype.posEnd = function() {
1151
+ return this.stream.pos + this.header + Math.abs(this.length);
1152
+ }, r.prototype.toHexString = function() {
1153
+ return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
1154
+ }, r.decodeLength = function(t) {
1155
+ var e = t.get(), n = e & 127;
1156
+ if (n == e)
1157
+ return n;
1158
+ if (n > 6)
1159
+ throw new Error("Length over 48 bits not supported at position " + (t.pos - 1));
1160
+ if (n === 0)
1161
+ return null;
1162
+ e = 0;
1163
+ for (var s = 0; s < n; ++s)
1164
+ e = e * 256 + t.get();
1165
+ return e;
1166
+ }, r.prototype.getHexStringValue = function() {
1167
+ var t = this.toHexString(), e = this.header * 2, n = this.length * 2;
1168
+ return t.substr(e, n);
1169
+ }, r.decode = function(t) {
1170
+ var e;
1171
+ t instanceof ut ? e = t : e = new ut(t, 0);
1172
+ var n = new ut(e), s = new wt(e), i = r.decodeLength(e), o = e.pos, a = o - n.pos, u = null, h = function() {
1173
+ var c = [];
1174
+ if (i !== null) {
1175
+ for (var v = o + i; e.pos < v; )
1176
+ c[c.length] = r.decode(e);
1177
+ if (e.pos != v)
1178
+ throw new Error("Content size is not correct for container starting at offset " + o);
1179
+ } else
1180
+ try {
1181
+ for (; ; ) {
1182
+ var y = r.decode(e);
1183
+ if (y.tag.isEOC())
1184
+ break;
1185
+ c[c.length] = y;
1186
+ }
1187
+ i = o - e.pos;
1188
+ } catch (S) {
1189
+ throw new Error("Exception while decoding undefined length content: " + S);
1190
+ }
1191
+ return c;
1192
+ };
1193
+ if (s.tagConstructed)
1194
+ u = h();
1195
+ else if (s.isUniversal() && (s.tagNumber == 3 || s.tagNumber == 4))
1196
+ try {
1197
+ if (s.tagNumber == 3 && e.get() != 0)
1198
+ throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
1199
+ u = h();
1200
+ for (var l = 0; l < u.length; ++l)
1201
+ if (u[l].tag.isEOC())
1202
+ throw new Error("EOC is not supposed to be actual content.");
1203
+ } catch {
1204
+ u = null;
1205
+ }
1206
+ if (u === null) {
1207
+ if (i === null)
1208
+ throw new Error("We can't skip over an invalid tag with undefined length at offset " + o);
1209
+ e.pos = o + Math.abs(i);
1210
+ }
1211
+ return new r(n, a, i, s, u);
1212
+ }, r;
1213
+ }()
1214
+ ), wt = (
1215
+ /** @class */
1216
+ function() {
1217
+ function r(t) {
1218
+ var e = t.get();
1219
+ if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
1220
+ var n = new Y();
1221
+ do
1222
+ e = t.get(), n.mulAdd(128, e & 127);
1223
+ while (e & 128);
1224
+ this.tagNumber = n.simplify();
1225
+ }
1226
+ }
1227
+ return r.prototype.isUniversal = function() {
1228
+ return this.tagClass === 0;
1229
+ }, r.prototype.isEOC = function() {
1230
+ return this.tagClass === 0 && this.tagNumber === 0;
1231
+ }, r;
1232
+ }()
1233
+ ), j, we = 244837814094590, _t = (we & 16777215) == 15715070, _ = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], _e = (1 << 26) / _[_.length - 1], g = (
1234
+ /** @class */
1235
+ function() {
1236
+ function r(t, e, n) {
1237
+ t != null && (typeof t == "number" ? this.fromNumber(t, e, n) : e == null && typeof t != "string" ? this.fromString(t, 256) : this.fromString(t, e));
1238
+ }
1239
+ return r.prototype.toString = function(t) {
1240
+ if (this.s < 0)
1241
+ return "-" + this.negate().toString(t);
1242
+ var e;
1243
+ if (t == 16)
1244
+ e = 4;
1245
+ else if (t == 8)
1246
+ e = 3;
1247
+ else if (t == 2)
1248
+ e = 1;
1249
+ else if (t == 32)
1250
+ e = 5;
1251
+ else if (t == 4)
1252
+ e = 2;
1253
+ else
1254
+ return this.toRadix(t);
1255
+ var n = (1 << e) - 1, s, i = !1, o = "", a = this.t, u = this.DB - a * this.DB % e;
1256
+ if (a-- > 0)
1257
+ for (u < this.DB && (s = this[a] >> u) > 0 && (i = !0, o = M(s)); a >= 0; )
1258
+ u < e ? (s = (this[a] & (1 << u) - 1) << e - u, s |= this[--a] >> (u += this.DB - e)) : (s = this[a] >> (u -= e) & n, u <= 0 && (u += this.DB, --a)), s > 0 && (i = !0), i && (o += M(s));
1259
+ return i ? o : "0";
1260
+ }, r.prototype.negate = function() {
1261
+ var t = d();
1262
+ return r.ZERO.subTo(this, t), t;
1263
+ }, r.prototype.abs = function() {
1264
+ return this.s < 0 ? this.negate() : this;
1265
+ }, r.prototype.compareTo = function(t) {
1266
+ var e = this.s - t.s;
1267
+ if (e != 0)
1268
+ return e;
1269
+ var n = this.t;
1270
+ if (e = n - t.t, e != 0)
1271
+ return this.s < 0 ? -e : e;
1272
+ for (; --n >= 0; )
1273
+ if ((e = this[n] - t[n]) != 0)
1274
+ return e;
1275
+ return 0;
1276
+ }, r.prototype.bitLength = function() {
1277
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + W(this[this.t - 1] ^ this.s & this.DM);
1278
+ }, r.prototype.mod = function(t) {
1279
+ var e = d();
1280
+ return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(r.ZERO) > 0 && t.subTo(e, e), e;
1281
+ }, r.prototype.modPowInt = function(t, e) {
1282
+ var n;
1283
+ return t < 256 || e.isEven() ? n = new Rt(e) : n = new xt(e), this.exp(t, n);
1284
+ }, r.prototype.clone = function() {
1285
+ var t = d();
1286
+ return this.copyTo(t), t;
1287
+ }, r.prototype.intValue = function() {
1288
+ if (this.s < 0) {
1289
+ if (this.t == 1)
1290
+ return this[0] - this.DV;
1291
+ if (this.t == 0)
1292
+ return -1;
1293
+ } else {
1294
+ if (this.t == 1)
1295
+ return this[0];
1296
+ if (this.t == 0)
1297
+ return 0;
1298
+ }
1299
+ return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
1300
+ }, r.prototype.byteValue = function() {
1301
+ return this.t == 0 ? this.s : this[0] << 24 >> 24;
1302
+ }, r.prototype.shortValue = function() {
1303
+ return this.t == 0 ? this.s : this[0] << 16 >> 16;
1304
+ }, r.prototype.signum = function() {
1305
+ return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
1306
+ }, r.prototype.toByteArray = function() {
1307
+ var t = this.t, e = [];
1308
+ e[0] = this.s;
1309
+ var n = this.DB - t * this.DB % 8, s, i = 0;
1310
+ if (t-- > 0)
1311
+ for (n < this.DB && (s = this[t] >> n) != (this.s & this.DM) >> n && (e[i++] = s | this.s << this.DB - n); t >= 0; )
1312
+ n < 8 ? (s = (this[t] & (1 << n) - 1) << 8 - n, s |= this[--t] >> (n += this.DB - 8)) : (s = this[t] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --t)), s & 128 && (s |= -256), i == 0 && (this.s & 128) != (s & 128) && ++i, (i > 0 || s != this.s) && (e[i++] = s);
1313
+ return e;
1314
+ }, r.prototype.equals = function(t) {
1315
+ return this.compareTo(t) == 0;
1316
+ }, r.prototype.min = function(t) {
1317
+ return this.compareTo(t) < 0 ? this : t;
1318
+ }, r.prototype.max = function(t) {
1319
+ return this.compareTo(t) > 0 ? this : t;
1320
+ }, r.prototype.and = function(t) {
1321
+ var e = d();
1322
+ return this.bitwiseTo(t, ye, e), e;
1323
+ }, r.prototype.or = function(t) {
1324
+ var e = d();
1325
+ return this.bitwiseTo(t, Q, e), e;
1326
+ }, r.prototype.xor = function(t) {
1327
+ var e = d();
1328
+ return this.bitwiseTo(t, Tt, e), e;
1329
+ }, r.prototype.andNot = function(t) {
1330
+ var e = d();
1331
+ return this.bitwiseTo(t, Et, e), e;
1332
+ }, r.prototype.not = function() {
1333
+ for (var t = d(), e = 0; e < this.t; ++e)
1334
+ t[e] = this.DM & ~this[e];
1335
+ return t.t = this.t, t.s = ~this.s, t;
1336
+ }, r.prototype.shiftLeft = function(t) {
1337
+ var e = d();
1338
+ return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
1339
+ }, r.prototype.shiftRight = function(t) {
1340
+ var e = d();
1341
+ return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
1342
+ }, r.prototype.getLowestSetBit = function() {
1343
+ for (var t = 0; t < this.t; ++t)
1344
+ if (this[t] != 0)
1345
+ return t * this.DB + me(this[t]);
1346
+ return this.s < 0 ? this.t * this.DB : -1;
1347
+ }, r.prototype.bitCount = function() {
1348
+ for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
1349
+ t += Se(this[n] ^ e);
1350
+ return t;
1351
+ }, r.prototype.testBit = function(t) {
1352
+ var e = Math.floor(t / this.DB);
1353
+ return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
1354
+ }, r.prototype.setBit = function(t) {
1355
+ return this.changeBit(t, Q);
1356
+ }, r.prototype.clearBit = function(t) {
1357
+ return this.changeBit(t, Et);
1358
+ }, r.prototype.flipBit = function(t) {
1359
+ return this.changeBit(t, Tt);
1360
+ }, r.prototype.add = function(t) {
1361
+ var e = d();
1362
+ return this.addTo(t, e), e;
1363
+ }, r.prototype.subtract = function(t) {
1364
+ var e = d();
1365
+ return this.subTo(t, e), e;
1366
+ }, r.prototype.multiply = function(t) {
1367
+ var e = d();
1368
+ return this.multiplyTo(t, e), e;
1369
+ }, r.prototype.divide = function(t) {
1370
+ var e = d();
1371
+ return this.divRemTo(t, e, null), e;
1372
+ }, r.prototype.remainder = function(t) {
1373
+ var e = d();
1374
+ return this.divRemTo(t, null, e), e;
1375
+ }, r.prototype.divideAndRemainder = function(t) {
1376
+ var e = d(), n = d();
1377
+ return this.divRemTo(t, e, n), [e, n];
1378
+ }, r.prototype.modPow = function(t, e) {
1379
+ var n = t.bitLength(), s, i = k(1), o;
1380
+ if (n <= 0)
1381
+ return i;
1382
+ n < 18 ? s = 1 : n < 48 ? s = 3 : n < 144 ? s = 4 : n < 768 ? s = 5 : s = 6, n < 8 ? o = new Rt(e) : e.isEven() ? o = new xe(e) : o = new xt(e);
1383
+ var a = [], u = 3, h = s - 1, l = (1 << s) - 1;
1384
+ if (a[1] = o.convert(this), s > 1) {
1385
+ var c = d();
1386
+ for (o.sqrTo(a[1], c); u <= l; )
1387
+ a[u] = d(), o.mulTo(c, a[u - 2], a[u]), u += 2;
1388
+ }
1389
+ var v = t.t - 1, y, S = !0, b = d(), D;
1390
+ for (n = W(t[v]) - 1; v >= 0; ) {
1391
+ for (n >= h ? y = t[v] >> n - h & l : (y = (t[v] & (1 << n + 1) - 1) << h - n, v > 0 && (y |= t[v - 1] >> this.DB + n - h)), u = s; !(y & 1); )
1392
+ y >>= 1, --u;
1393
+ if ((n -= u) < 0 && (n += this.DB, --v), S)
1394
+ a[y].copyTo(i), S = !1;
1395
+ else {
1396
+ for (; u > 1; )
1397
+ o.sqrTo(i, b), o.sqrTo(b, i), u -= 2;
1398
+ u > 0 ? o.sqrTo(i, b) : (D = i, i = b, b = D), o.mulTo(b, a[y], i);
1399
+ }
1400
+ for (; v >= 0 && !(t[v] & 1 << n); )
1401
+ o.sqrTo(i, b), D = i, i = b, b = D, --n < 0 && (n = this.DB - 1, --v);
1402
+ }
1403
+ return o.revert(i);
1404
+ }, r.prototype.modInverse = function(t) {
1405
+ var e = t.isEven();
1406
+ if (this.isEven() && e || t.signum() == 0)
1407
+ return r.ZERO;
1408
+ for (var n = t.clone(), s = this.clone(), i = k(1), o = k(0), a = k(0), u = k(1); n.signum() != 0; ) {
1409
+ for (; n.isEven(); )
1410
+ n.rShiftTo(1, n), e ? ((!i.isEven() || !o.isEven()) && (i.addTo(this, i), o.subTo(t, o)), i.rShiftTo(1, i)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
1411
+ for (; s.isEven(); )
1412
+ s.rShiftTo(1, s), e ? ((!a.isEven() || !u.isEven()) && (a.addTo(this, a), u.subTo(t, u)), a.rShiftTo(1, a)) : u.isEven() || u.subTo(t, u), u.rShiftTo(1, u);
1413
+ n.compareTo(s) >= 0 ? (n.subTo(s, n), e && i.subTo(a, i), o.subTo(u, o)) : (s.subTo(n, s), e && a.subTo(i, a), u.subTo(o, u));
1414
+ }
1415
+ if (s.compareTo(r.ONE) != 0)
1416
+ return r.ZERO;
1417
+ if (u.compareTo(t) >= 0)
1418
+ return u.subtract(t);
1419
+ if (u.signum() < 0)
1420
+ u.addTo(t, u);
1421
+ else
1422
+ return u;
1423
+ return u.signum() < 0 ? u.add(t) : u;
1424
+ }, r.prototype.pow = function(t) {
1425
+ return this.exp(t, new Re());
1426
+ }, r.prototype.gcd = function(t) {
1427
+ var e = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
1428
+ if (e.compareTo(n) < 0) {
1429
+ var s = e;
1430
+ e = n, n = s;
1431
+ }
1432
+ var i = e.getLowestSetBit(), o = n.getLowestSetBit();
1433
+ if (o < 0)
1434
+ return e;
1435
+ for (i < o && (o = i), o > 0 && (e.rShiftTo(o, e), n.rShiftTo(o, n)); e.signum() > 0; )
1436
+ (i = e.getLowestSetBit()) > 0 && e.rShiftTo(i, e), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), e.compareTo(n) >= 0 ? (e.subTo(n, e), e.rShiftTo(1, e)) : (n.subTo(e, n), n.rShiftTo(1, n));
1437
+ return o > 0 && n.lShiftTo(o, n), n;
1438
+ }, r.prototype.isProbablePrime = function(t) {
1439
+ var e, n = this.abs();
1440
+ if (n.t == 1 && n[0] <= _[_.length - 1]) {
1441
+ for (e = 0; e < _.length; ++e)
1442
+ if (n[0] == _[e])
1443
+ return !0;
1444
+ return !1;
1445
+ }
1446
+ if (n.isEven())
1447
+ return !1;
1448
+ for (e = 1; e < _.length; ) {
1449
+ for (var s = _[e], i = e + 1; i < _.length && s < _e; )
1450
+ s *= _[i++];
1451
+ for (s = n.modInt(s); e < i; )
1452
+ if (s % _[e++] == 0)
1453
+ return !1;
1454
+ }
1455
+ return n.millerRabin(t);
1456
+ }, r.prototype.copyTo = function(t) {
1457
+ for (var e = this.t - 1; e >= 0; --e)
1458
+ t[e] = this[e];
1459
+ t.t = this.t, t.s = this.s;
1460
+ }, r.prototype.fromInt = function(t) {
1461
+ this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0;
1462
+ }, r.prototype.fromString = function(t, e) {
1463
+ var n;
1464
+ if (e == 16)
1465
+ n = 4;
1466
+ else if (e == 8)
1467
+ n = 3;
1468
+ else if (e == 256)
1469
+ n = 8;
1470
+ else if (e == 2)
1471
+ n = 1;
1472
+ else if (e == 32)
1473
+ n = 5;
1474
+ else if (e == 4)
1475
+ n = 2;
1476
+ else {
1477
+ this.fromRadix(t, e);
1478
+ return;
1479
+ }
1480
+ this.t = 0, this.s = 0;
1481
+ for (var s = t.length, i = !1, o = 0; --s >= 0; ) {
1482
+ var a = n == 8 ? +t[s] & 255 : At(t, s);
1483
+ if (a < 0) {
1484
+ t.charAt(s) == "-" && (i = !0);
1485
+ continue;
1486
+ }
1487
+ i = !1, o == 0 ? this[this.t++] = a : o + n > this.DB ? (this[this.t - 1] |= (a & (1 << this.DB - o) - 1) << o, this[this.t++] = a >> this.DB - o) : this[this.t - 1] |= a << o, o += n, o >= this.DB && (o -= this.DB);
1488
+ }
1489
+ n == 8 && +t[0] & 128 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), i && r.ZERO.subTo(this, this);
1490
+ }, r.prototype.clamp = function() {
1491
+ for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t; )
1492
+ --this.t;
1493
+ }, r.prototype.dlShiftTo = function(t, e) {
1494
+ var n;
1495
+ for (n = this.t - 1; n >= 0; --n)
1496
+ e[n + t] = this[n];
1497
+ for (n = t - 1; n >= 0; --n)
1498
+ e[n] = 0;
1499
+ e.t = this.t + t, e.s = this.s;
1500
+ }, r.prototype.drShiftTo = function(t, e) {
1501
+ for (var n = t; n < this.t; ++n)
1502
+ e[n - t] = this[n];
1503
+ e.t = Math.max(this.t - t, 0), e.s = this.s;
1504
+ }, r.prototype.lShiftTo = function(t, e) {
1505
+ for (var n = t % this.DB, s = this.DB - n, i = (1 << s) - 1, o = Math.floor(t / this.DB), a = this.s << n & this.DM, u = this.t - 1; u >= 0; --u)
1506
+ e[u + o + 1] = this[u] >> s | a, a = (this[u] & i) << n;
1507
+ for (var u = o - 1; u >= 0; --u)
1508
+ e[u] = 0;
1509
+ e[o] = a, e.t = this.t + o + 1, e.s = this.s, e.clamp();
1510
+ }, r.prototype.rShiftTo = function(t, e) {
1511
+ e.s = this.s;
1512
+ var n = Math.floor(t / this.DB);
1513
+ if (n >= this.t) {
1514
+ e.t = 0;
1515
+ return;
1516
+ }
1517
+ var s = t % this.DB, i = this.DB - s, o = (1 << s) - 1;
1518
+ e[0] = this[n] >> s;
1519
+ for (var a = n + 1; a < this.t; ++a)
1520
+ e[a - n - 1] |= (this[a] & o) << i, e[a - n] = this[a] >> s;
1521
+ s > 0 && (e[this.t - n - 1] |= (this.s & o) << i), e.t = this.t - n, e.clamp();
1522
+ }, r.prototype.subTo = function(t, e) {
1523
+ for (var n = 0, s = 0, i = Math.min(t.t, this.t); n < i; )
1524
+ s += this[n] - t[n], e[n++] = s & this.DM, s >>= this.DB;
1525
+ if (t.t < this.t) {
1526
+ for (s -= t.s; n < this.t; )
1527
+ s += this[n], e[n++] = s & this.DM, s >>= this.DB;
1528
+ s += this.s;
1529
+ } else {
1530
+ for (s += this.s; n < t.t; )
1531
+ s -= t[n], e[n++] = s & this.DM, s >>= this.DB;
1532
+ s -= t.s;
1533
+ }
1534
+ e.s = s < 0 ? -1 : 0, s < -1 ? e[n++] = this.DV + s : s > 0 && (e[n++] = s), e.t = n, e.clamp();
1535
+ }, r.prototype.multiplyTo = function(t, e) {
1536
+ var n = this.abs(), s = t.abs(), i = n.t;
1537
+ for (e.t = i + s.t; --i >= 0; )
1538
+ e[i] = 0;
1539
+ for (i = 0; i < s.t; ++i)
1540
+ e[i + n.t] = n.am(0, s[i], e, i, 0, n.t);
1541
+ e.s = 0, e.clamp(), this.s != t.s && r.ZERO.subTo(e, e);
1542
+ }, r.prototype.squareTo = function(t) {
1543
+ for (var e = this.abs(), n = t.t = 2 * e.t; --n >= 0; )
1544
+ t[n] = 0;
1545
+ for (n = 0; n < e.t - 1; ++n) {
1546
+ var s = e.am(n, e[n], t, 2 * n, 0, 1);
1547
+ (t[n + e.t] += e.am(n + 1, 2 * e[n], t, 2 * n + 1, s, e.t - n - 1)) >= e.DV && (t[n + e.t] -= e.DV, t[n + e.t + 1] = 1);
1548
+ }
1549
+ t.t > 0 && (t[t.t - 1] += e.am(n, e[n], t, 2 * n, 0, 1)), t.s = 0, t.clamp();
1550
+ }, r.prototype.divRemTo = function(t, e, n) {
1551
+ var s = t.abs();
1552
+ if (!(s.t <= 0)) {
1553
+ var i = this.abs();
1554
+ if (i.t < s.t) {
1555
+ e != null && e.fromInt(0), n != null && this.copyTo(n);
1556
+ return;
1557
+ }
1558
+ n == null && (n = d());
1559
+ var o = d(), a = this.s, u = t.s, h = this.DB - W(s[s.t - 1]);
1560
+ h > 0 ? (s.lShiftTo(h, o), i.lShiftTo(h, n)) : (s.copyTo(o), i.copyTo(n));
1561
+ var l = o.t, c = o[l - 1];
1562
+ if (c != 0) {
1563
+ var v = c * (1 << this.F1) + (l > 1 ? o[l - 2] >> this.F2 : 0), y = this.FV / v, S = (1 << this.F1) / v, b = 1 << this.F2, D = n.t, x = D - l, O = e ?? d();
1564
+ for (o.dlShiftTo(x, O), n.compareTo(O) >= 0 && (n[n.t++] = 1, n.subTo(O, n)), r.ONE.dlShiftTo(l, O), O.subTo(o, o); o.t < l; )
1565
+ o[o.t++] = 0;
1566
+ for (; --x >= 0; ) {
1567
+ var w = n[--D] == c ? this.DM : Math.floor(n[D] * y + (n[D - 1] + b) * S);
1568
+ if ((n[D] += o.am(0, w, n, x, 0, l)) < w)
1569
+ for (o.dlShiftTo(x, O), n.subTo(O, n); n[D] < --w; )
1570
+ n.subTo(O, n);
1571
+ }
1572
+ e != null && (n.drShiftTo(l, e), a != u && r.ZERO.subTo(e, e)), n.t = l, n.clamp(), h > 0 && n.rShiftTo(h, n), a < 0 && r.ZERO.subTo(n, n);
1573
+ }
1574
+ }
1575
+ }, r.prototype.invDigit = function() {
1576
+ if (this.t < 1)
1577
+ return 0;
1578
+ var t = this[0];
1579
+ if (!(t & 1))
1580
+ return 0;
1581
+ var e = t & 3;
1582
+ return e = e * (2 - (t & 15) * e) & 15, e = e * (2 - (t & 255) * e) & 255, e = e * (2 - ((t & 65535) * e & 65535)) & 65535, e = e * (2 - t * e % this.DV) % this.DV, e > 0 ? this.DV - e : -e;
1583
+ }, r.prototype.isEven = function() {
1584
+ return (this.t > 0 ? this[0] & 1 : this.s) == 0;
1585
+ }, r.prototype.exp = function(t, e) {
1586
+ if (t > 4294967295 || t < 1)
1587
+ return r.ONE;
1588
+ var n = d(), s = d(), i = e.convert(this), o = W(t) - 1;
1589
+ for (i.copyTo(n); --o >= 0; )
1590
+ if (e.sqrTo(n, s), (t & 1 << o) > 0)
1591
+ e.mulTo(s, i, n);
1592
+ else {
1593
+ var a = n;
1594
+ n = s, s = a;
1595
+ }
1596
+ return e.revert(n);
1597
+ }, r.prototype.chunkSize = function(t) {
1598
+ return Math.floor(Math.LN2 * this.DB / Math.log(t));
1599
+ }, r.prototype.toRadix = function(t) {
1600
+ if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
1601
+ return "0";
1602
+ var e = this.chunkSize(t), n = Math.pow(t, e), s = k(n), i = d(), o = d(), a = "";
1603
+ for (this.divRemTo(s, i, o); i.signum() > 0; )
1604
+ a = (n + o.intValue()).toString(t).substr(1) + a, i.divRemTo(s, i, o);
1605
+ return o.intValue().toString(t) + a;
1606
+ }, r.prototype.fromRadix = function(t, e) {
1607
+ this.fromInt(0), e == null && (e = 10);
1608
+ for (var n = this.chunkSize(e), s = Math.pow(e, n), i = !1, o = 0, a = 0, u = 0; u < t.length; ++u) {
1609
+ var h = At(t, u);
1610
+ if (h < 0) {
1611
+ t.charAt(u) == "-" && this.signum() == 0 && (i = !0);
1612
+ continue;
1613
+ }
1614
+ a = e * a + h, ++o >= n && (this.dMultiply(s), this.dAddOffset(a, 0), o = 0, a = 0);
1615
+ }
1616
+ o > 0 && (this.dMultiply(Math.pow(e, o)), this.dAddOffset(a, 0)), i && r.ZERO.subTo(this, this);
1617
+ }, r.prototype.fromNumber = function(t, e, n) {
1618
+ if (typeof e == "number")
1619
+ if (t < 2)
1620
+ this.fromInt(1);
1621
+ else
1622
+ for (this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), Q, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
1623
+ this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(r.ONE.shiftLeft(t - 1), this);
1624
+ else {
1625
+ var s = [], i = t & 7;
1626
+ s.length = (t >> 3) + 1, e.nextBytes(s), i > 0 ? s[0] &= (1 << i) - 1 : s[0] = 0, this.fromString(s, 256);
1627
+ }
1628
+ }, r.prototype.bitwiseTo = function(t, e, n) {
1629
+ var s, i, o = Math.min(t.t, this.t);
1630
+ for (s = 0; s < o; ++s)
1631
+ n[s] = e(this[s], t[s]);
1632
+ if (t.t < this.t) {
1633
+ for (i = t.s & this.DM, s = o; s < this.t; ++s)
1634
+ n[s] = e(this[s], i);
1635
+ n.t = this.t;
1636
+ } else {
1637
+ for (i = this.s & this.DM, s = o; s < t.t; ++s)
1638
+ n[s] = e(i, t[s]);
1639
+ n.t = t.t;
1640
+ }
1641
+ n.s = e(this.s, t.s), n.clamp();
1642
+ }, r.prototype.changeBit = function(t, e) {
1643
+ var n = r.ONE.shiftLeft(t);
1644
+ return this.bitwiseTo(n, e, n), n;
1645
+ }, r.prototype.addTo = function(t, e) {
1646
+ for (var n = 0, s = 0, i = Math.min(t.t, this.t); n < i; )
1647
+ s += this[n] + t[n], e[n++] = s & this.DM, s >>= this.DB;
1648
+ if (t.t < this.t) {
1649
+ for (s += t.s; n < this.t; )
1650
+ s += this[n], e[n++] = s & this.DM, s >>= this.DB;
1651
+ s += this.s;
1652
+ } else {
1653
+ for (s += this.s; n < t.t; )
1654
+ s += t[n], e[n++] = s & this.DM, s >>= this.DB;
1655
+ s += t.s;
1656
+ }
1657
+ e.s = s < 0 ? -1 : 0, s > 0 ? e[n++] = s : s < -1 && (e[n++] = this.DV + s), e.t = n, e.clamp();
1658
+ }, r.prototype.dMultiply = function(t) {
1659
+ this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp();
1660
+ }, r.prototype.dAddOffset = function(t, e) {
1661
+ if (t != 0) {
1662
+ for (; this.t <= e; )
1663
+ this[this.t++] = 0;
1664
+ for (this[e] += t; this[e] >= this.DV; )
1665
+ this[e] -= this.DV, ++e >= this.t && (this[this.t++] = 0), ++this[e];
1666
+ }
1667
+ }, r.prototype.multiplyLowerTo = function(t, e, n) {
1668
+ var s = Math.min(this.t + t.t, e);
1669
+ for (n.s = 0, n.t = s; s > 0; )
1670
+ n[--s] = 0;
1671
+ for (var i = n.t - this.t; s < i; ++s)
1672
+ n[s + this.t] = this.am(0, t[s], n, s, 0, this.t);
1673
+ for (var i = Math.min(t.t, e); s < i; ++s)
1674
+ this.am(0, t[s], n, s, 0, e - s);
1675
+ n.clamp();
1676
+ }, r.prototype.multiplyUpperTo = function(t, e, n) {
1677
+ --e;
1678
+ var s = n.t = this.t + t.t - e;
1679
+ for (n.s = 0; --s >= 0; )
1680
+ n[s] = 0;
1681
+ for (s = Math.max(e - this.t, 0); s < t.t; ++s)
1682
+ n[this.t + s - e] = this.am(e - s, t[s], n, 0, 0, this.t + s - e);
1683
+ n.clamp(), n.drShiftTo(1, n);
1684
+ }, r.prototype.modInt = function(t) {
1685
+ if (t <= 0)
1686
+ return 0;
1687
+ var e = this.DV % t, n = this.s < 0 ? t - 1 : 0;
1688
+ if (this.t > 0)
1689
+ if (e == 0)
1690
+ n = this[0] % t;
1691
+ else
1692
+ for (var s = this.t - 1; s >= 0; --s)
1693
+ n = (e * n + this[s]) % t;
1694
+ return n;
1695
+ }, r.prototype.millerRabin = function(t) {
1696
+ var e = this.subtract(r.ONE), n = e.getLowestSetBit();
1697
+ if (n <= 0)
1698
+ return !1;
1699
+ var s = e.shiftRight(n);
1700
+ t = t + 1 >> 1, t > _.length && (t = _.length);
1701
+ for (var i = d(), o = 0; o < t; ++o) {
1702
+ i.fromInt(_[Math.floor(Math.random() * _.length)]);
1703
+ var a = i.modPow(s, this);
1704
+ if (a.compareTo(r.ONE) != 0 && a.compareTo(e) != 0) {
1705
+ for (var u = 1; u++ < n && a.compareTo(e) != 0; )
1706
+ if (a = a.modPowInt(2, this), a.compareTo(r.ONE) == 0)
1707
+ return !1;
1708
+ if (a.compareTo(e) != 0)
1709
+ return !1;
1710
+ }
1711
+ }
1712
+ return !0;
1713
+ }, r.prototype.square = function() {
1714
+ var t = d();
1715
+ return this.squareTo(t), t;
1716
+ }, r.prototype.gcda = function(t, e) {
1717
+ var n = this.s < 0 ? this.negate() : this.clone(), s = t.s < 0 ? t.negate() : t.clone();
1718
+ if (n.compareTo(s) < 0) {
1719
+ var i = n;
1720
+ n = s, s = i;
1721
+ }
1722
+ var o = n.getLowestSetBit(), a = s.getLowestSetBit();
1723
+ if (a < 0) {
1724
+ e(n);
1725
+ return;
1726
+ }
1727
+ o < a && (a = o), a > 0 && (n.rShiftTo(a, n), s.rShiftTo(a, s));
1728
+ var u = function() {
1729
+ (o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n), (o = s.getLowestSetBit()) > 0 && s.rShiftTo(o, s), n.compareTo(s) >= 0 ? (n.subTo(s, n), n.rShiftTo(1, n)) : (s.subTo(n, s), s.rShiftTo(1, s)), n.signum() > 0 ? setTimeout(u, 0) : (a > 0 && s.lShiftTo(a, s), setTimeout(function() {
1730
+ e(s);
1731
+ }, 0));
1732
+ };
1733
+ setTimeout(u, 10);
1734
+ }, r.prototype.fromNumberAsync = function(t, e, n, s) {
1735
+ if (typeof e == "number")
1736
+ if (t < 2)
1737
+ this.fromInt(1);
1738
+ else {
1739
+ this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), Q, this), this.isEven() && this.dAddOffset(1, 0);
1740
+ var i = this, o = function() {
1741
+ i.dAddOffset(2, 0), i.bitLength() > t && i.subTo(r.ONE.shiftLeft(t - 1), i), i.isProbablePrime(e) ? setTimeout(function() {
1742
+ s();
1743
+ }, 0) : setTimeout(o, 0);
1744
+ };
1745
+ setTimeout(o, 0);
1746
+ }
1747
+ else {
1748
+ var a = [], u = t & 7;
1749
+ a.length = (t >> 3) + 1, e.nextBytes(a), u > 0 ? a[0] &= (1 << u) - 1 : a[0] = 0, this.fromString(a, 256);
1750
+ }
1751
+ }, r;
1752
+ }()
1753
+ ), Re = (
1754
+ /** @class */
1755
+ function() {
1756
+ function r() {
1757
+ }
1758
+ return r.prototype.convert = function(t) {
1759
+ return t;
1760
+ }, r.prototype.revert = function(t) {
1761
+ return t;
1762
+ }, r.prototype.mulTo = function(t, e, n) {
1763
+ t.multiplyTo(e, n);
1764
+ }, r.prototype.sqrTo = function(t, e) {
1765
+ t.squareTo(e);
1766
+ }, r;
1767
+ }()
1768
+ ), Rt = (
1769
+ /** @class */
1770
+ function() {
1771
+ function r(t) {
1772
+ this.m = t;
1773
+ }
1774
+ return r.prototype.convert = function(t) {
1775
+ return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
1776
+ }, r.prototype.revert = function(t) {
1777
+ return t;
1778
+ }, r.prototype.reduce = function(t) {
1779
+ t.divRemTo(this.m, null, t);
1780
+ }, r.prototype.mulTo = function(t, e, n) {
1781
+ t.multiplyTo(e, n), this.reduce(n);
1782
+ }, r.prototype.sqrTo = function(t, e) {
1783
+ t.squareTo(e), this.reduce(e);
1784
+ }, r;
1785
+ }()
1786
+ ), xt = (
1787
+ /** @class */
1788
+ function() {
1789
+ function r(t) {
1790
+ this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
1791
+ }
1792
+ return r.prototype.convert = function(t) {
1793
+ var e = d();
1794
+ return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(g.ZERO) > 0 && this.m.subTo(e, e), e;
1795
+ }, r.prototype.revert = function(t) {
1796
+ var e = d();
1797
+ return t.copyTo(e), this.reduce(e), e;
1798
+ }, r.prototype.reduce = function(t) {
1799
+ for (; t.t <= this.mt2; )
1800
+ t[t.t++] = 0;
1801
+ for (var e = 0; e < this.m.t; ++e) {
1802
+ var n = t[e] & 32767, s = n * this.mpl + ((n * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
1803
+ for (n = e + this.m.t, t[n] += this.m.am(0, s, t, e, 0, this.m.t); t[n] >= t.DV; )
1804
+ t[n] -= t.DV, t[++n]++;
1805
+ }
1806
+ t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
1807
+ }, r.prototype.mulTo = function(t, e, n) {
1808
+ t.multiplyTo(e, n), this.reduce(n);
1809
+ }, r.prototype.sqrTo = function(t, e) {
1810
+ t.squareTo(e), this.reduce(e);
1811
+ }, r;
1812
+ }()
1813
+ ), xe = (
1814
+ /** @class */
1815
+ function() {
1816
+ function r(t) {
1817
+ this.m = t, this.r2 = d(), this.q3 = d(), g.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1818
+ }
1819
+ return r.prototype.convert = function(t) {
1820
+ if (t.s < 0 || t.t > 2 * this.m.t)
1821
+ return t.mod(this.m);
1822
+ if (t.compareTo(this.m) < 0)
1823
+ return t;
1824
+ var e = d();
1825
+ return t.copyTo(e), this.reduce(e), e;
1826
+ }, r.prototype.revert = function(t) {
1827
+ return t;
1828
+ }, r.prototype.reduce = function(t) {
1829
+ for (t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0; )
1830
+ t.dAddOffset(1, this.m.t + 1);
1831
+ for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0; )
1832
+ t.subTo(this.m, t);
1833
+ }, r.prototype.mulTo = function(t, e, n) {
1834
+ t.multiplyTo(e, n), this.reduce(n);
1835
+ }, r.prototype.sqrTo = function(t, e) {
1836
+ t.squareTo(e), this.reduce(e);
1837
+ }, r;
1838
+ }()
1839
+ );
1840
+ function d() {
1841
+ return new g(null);
1842
+ }
1843
+ function T(r, t) {
1844
+ return new g(r, t);
1845
+ }
1846
+ var Ot = typeof navigator < "u";
1847
+ Ot && _t && navigator.appName == "Microsoft Internet Explorer" ? (g.prototype.am = function(t, e, n, s, i, o) {
1848
+ for (var a = e & 32767, u = e >> 15; --o >= 0; ) {
1849
+ var h = this[t] & 32767, l = this[t++] >> 15, c = u * h + l * a;
1850
+ h = a * h + ((c & 32767) << 15) + n[s] + (i & 1073741823), i = (h >>> 30) + (c >>> 15) + u * l + (i >>> 30), n[s++] = h & 1073741823;
1851
+ }
1852
+ return i;
1853
+ }, j = 30) : Ot && _t && navigator.appName != "Netscape" ? (g.prototype.am = function(t, e, n, s, i, o) {
1854
+ for (; --o >= 0; ) {
1855
+ var a = e * this[t++] + n[s] + i;
1856
+ i = Math.floor(a / 67108864), n[s++] = a & 67108863;
1857
+ }
1858
+ return i;
1859
+ }, j = 26) : (g.prototype.am = function(t, e, n, s, i, o) {
1860
+ for (var a = e & 16383, u = e >> 14; --o >= 0; ) {
1861
+ var h = this[t] & 16383, l = this[t++] >> 14, c = u * h + l * a;
1862
+ h = a * h + ((c & 16383) << 14) + n[s] + i, i = (h >> 28) + (c >> 14) + u * l, n[s++] = h & 268435455;
1863
+ }
1864
+ return i;
1865
+ }, j = 28);
1866
+ g.prototype.DB = j;
1867
+ g.prototype.DM = (1 << j) - 1;
1868
+ g.prototype.DV = 1 << j;
1869
+ var St = 52;
1870
+ g.prototype.FV = Math.pow(2, St);
1871
+ g.prototype.F1 = St - j;
1872
+ g.prototype.F2 = 2 * j - St;
1873
+ var at = [], Z, P;
1874
+ Z = 48;
1875
+ for (P = 0; P <= 9; ++P)
1876
+ at[Z++] = P;
1877
+ Z = 97;
1878
+ for (P = 10; P < 36; ++P)
1879
+ at[Z++] = P;
1880
+ Z = 65;
1881
+ for (P = 10; P < 36; ++P)
1882
+ at[Z++] = P;
1883
+ function At(r, t) {
1884
+ var e = at[r.charCodeAt(t)];
1885
+ return e ?? -1;
1886
+ }
1887
+ function k(r) {
1888
+ var t = d();
1889
+ return t.fromInt(r), t;
1890
+ }
1891
+ function W(r) {
1892
+ var t = 1, e;
1893
+ return (e = r >>> 16) != 0 && (r = e, t += 16), (e = r >> 8) != 0 && (r = e, t += 8), (e = r >> 4) != 0 && (r = e, t += 4), (e = r >> 2) != 0 && (r = e, t += 2), (e = r >> 1) != 0 && (r = e, t += 1), t;
1894
+ }
1895
+ g.ZERO = k(0);
1896
+ g.ONE = k(1);
1897
+ var Oe = (
1898
+ /** @class */
1899
+ function() {
1900
+ function r() {
1901
+ this.i = 0, this.j = 0, this.S = [];
1902
+ }
1903
+ return r.prototype.init = function(t) {
1904
+ var e, n, s;
1905
+ for (e = 0; e < 256; ++e)
1906
+ this.S[e] = e;
1907
+ for (n = 0, e = 0; e < 256; ++e)
1908
+ n = n + this.S[e] + t[e % t.length] & 255, s = this.S[e], this.S[e] = this.S[n], this.S[n] = s;
1909
+ this.i = 0, this.j = 0;
1910
+ }, r.prototype.next = function() {
1911
+ var t;
1912
+ return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255];
1913
+ }, r;
1914
+ }()
1915
+ );
1916
+ function Ae() {
1917
+ return new Oe();
1918
+ }
1919
+ var Jt = 256, tt, H = null, V;
1920
+ if (H == null) {
1921
+ H = [], V = 0;
1922
+ var et = void 0;
1923
+ if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
1924
+ var ft = new Uint32Array(256);
1925
+ for (window.crypto.getRandomValues(ft), et = 0; et < ft.length; ++et)
1926
+ H[V++] = ft[et] & 255;
1927
+ }
1928
+ var rt = 0, nt = function(r) {
1929
+ if (rt = rt || 0, rt >= 256 || V >= Jt) {
1930
+ window.removeEventListener ? window.removeEventListener("mousemove", nt, !1) : window.detachEvent && window.detachEvent("onmousemove", nt);
1931
+ return;
1932
+ }
1933
+ try {
1934
+ var t = r.x + r.y;
1935
+ H[V++] = t & 255, rt += 1;
1936
+ } catch {
1937
+ }
1938
+ };
1939
+ typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", nt, !1) : window.attachEvent && window.attachEvent("onmousemove", nt));
1940
+ }
1941
+ function Be() {
1942
+ if (tt == null) {
1943
+ for (tt = Ae(); V < Jt; ) {
1944
+ var r = Math.floor(65536 * Math.random());
1945
+ H[V++] = r & 255;
1946
+ }
1947
+ for (tt.init(H), V = 0; V < H.length; ++V)
1948
+ H[V] = 0;
1949
+ V = 0;
1950
+ }
1951
+ return tt.next();
1952
+ }
1953
+ var ct = (
1954
+ /** @class */
1955
+ function() {
1956
+ function r() {
1957
+ }
1958
+ return r.prototype.nextBytes = function(t) {
1959
+ for (var e = 0; e < t.length; ++e)
1960
+ t[e] = Be();
1961
+ }, r;
1962
+ }()
1963
+ );
1964
+ function Pe(r, t) {
1965
+ if (t < r.length + 22)
1966
+ return console.error("Message too long for RSA"), null;
1967
+ for (var e = t - r.length - 6, n = "", s = 0; s < e; s += 2)
1968
+ n += "ff";
1969
+ var i = "0001" + n + "00" + r;
1970
+ return T(i, 16);
1971
+ }
1972
+ function Ne(r, t) {
1973
+ if (t < r.length + 11)
1974
+ return console.error("Message too long for RSA"), null;
1975
+ for (var e = [], n = r.length - 1; n >= 0 && t > 0; ) {
1976
+ var s = r.charCodeAt(n--);
1977
+ s < 128 ? e[--t] = s : s > 127 && s < 2048 ? (e[--t] = s & 63 | 128, e[--t] = s >> 6 | 192) : (e[--t] = s & 63 | 128, e[--t] = s >> 6 & 63 | 128, e[--t] = s >> 12 | 224);
1978
+ }
1979
+ e[--t] = 0;
1980
+ for (var i = new ct(), o = []; t > 2; ) {
1981
+ for (o[0] = 0; o[0] == 0; )
1982
+ i.nextBytes(o);
1983
+ e[--t] = o[0];
1984
+ }
1985
+ return e[--t] = 2, e[--t] = 0, new g(e);
1986
+ }
1987
+ var Ve = (
1988
+ /** @class */
1989
+ function() {
1990
+ function r() {
1991
+ this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
1992
+ }
1993
+ return r.prototype.doPublic = function(t) {
1994
+ return t.modPowInt(this.e, this.n);
1995
+ }, r.prototype.doPrivate = function(t) {
1996
+ if (this.p == null || this.q == null)
1997
+ return t.modPow(this.d, this.n);
1998
+ for (var e = t.mod(this.p).modPow(this.dmp1, this.p), n = t.mod(this.q).modPow(this.dmq1, this.q); e.compareTo(n) < 0; )
1999
+ e = e.add(this.p);
2000
+ return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
2001
+ }, r.prototype.setPublic = function(t, e) {
2002
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
2003
+ }, r.prototype.encrypt = function(t) {
2004
+ var e = this.n.bitLength() + 7 >> 3, n = Ne(t, e);
2005
+ if (n == null)
2006
+ return null;
2007
+ var s = this.doPublic(n);
2008
+ if (s == null)
2009
+ return null;
2010
+ for (var i = s.toString(16), o = i.length, a = 0; a < e * 2 - o; a++)
2011
+ i = "0" + i;
2012
+ return i;
2013
+ }, r.prototype.setPrivate = function(t, e, n) {
2014
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16), this.d = T(n, 16)) : console.error("Invalid RSA private key");
2015
+ }, r.prototype.setPrivateEx = function(t, e, n, s, i, o, a, u) {
2016
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16), this.d = T(n, 16), this.p = T(s, 16), this.q = T(i, 16), this.dmp1 = T(o, 16), this.dmq1 = T(a, 16), this.coeff = T(u, 16)) : console.error("Invalid RSA private key");
2017
+ }, r.prototype.generate = function(t, e) {
2018
+ var n = new ct(), s = t >> 1;
2019
+ this.e = parseInt(e, 16);
2020
+ for (var i = new g(e, 16); ; ) {
2021
+ for (; this.p = new g(t - s, 1, n), !(this.p.subtract(g.ONE).gcd(i).compareTo(g.ONE) == 0 && this.p.isProbablePrime(10)); )
2022
+ ;
2023
+ for (; this.q = new g(s, 1, n), !(this.q.subtract(g.ONE).gcd(i).compareTo(g.ONE) == 0 && this.q.isProbablePrime(10)); )
2024
+ ;
2025
+ if (this.p.compareTo(this.q) <= 0) {
2026
+ var o = this.p;
2027
+ this.p = this.q, this.q = o;
2028
+ }
2029
+ var a = this.p.subtract(g.ONE), u = this.q.subtract(g.ONE), h = a.multiply(u);
2030
+ if (h.gcd(i).compareTo(g.ONE) == 0) {
2031
+ this.n = this.p.multiply(this.q), this.d = i.modInverse(h), this.dmp1 = this.d.mod(a), this.dmq1 = this.d.mod(u), this.coeff = this.q.modInverse(this.p);
2032
+ break;
2033
+ }
2034
+ }
2035
+ }, r.prototype.decrypt = function(t) {
2036
+ var e = T(t, 16), n = this.doPrivate(e);
2037
+ return n == null ? null : Le(n, this.n.bitLength() + 7 >> 3);
2038
+ }, r.prototype.generateAsync = function(t, e, n) {
2039
+ var s = new ct(), i = t >> 1;
2040
+ this.e = parseInt(e, 16);
2041
+ var o = new g(e, 16), a = this, u = function() {
2042
+ var h = function() {
2043
+ if (a.p.compareTo(a.q) <= 0) {
2044
+ var v = a.p;
2045
+ a.p = a.q, a.q = v;
2046
+ }
2047
+ var y = a.p.subtract(g.ONE), S = a.q.subtract(g.ONE), b = y.multiply(S);
2048
+ b.gcd(o).compareTo(g.ONE) == 0 ? (a.n = a.p.multiply(a.q), a.d = o.modInverse(b), a.dmp1 = a.d.mod(y), a.dmq1 = a.d.mod(S), a.coeff = a.q.modInverse(a.p), setTimeout(function() {
2049
+ n();
2050
+ }, 0)) : setTimeout(u, 0);
2051
+ }, l = function() {
2052
+ a.q = d(), a.q.fromNumberAsync(i, 1, s, function() {
2053
+ a.q.subtract(g.ONE).gcda(o, function(v) {
2054
+ v.compareTo(g.ONE) == 0 && a.q.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(l, 0);
2055
+ });
2056
+ });
2057
+ }, c = function() {
2058
+ a.p = d(), a.p.fromNumberAsync(t - i, 1, s, function() {
2059
+ a.p.subtract(g.ONE).gcda(o, function(v) {
2060
+ v.compareTo(g.ONE) == 0 && a.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(c, 0);
2061
+ });
2062
+ });
2063
+ };
2064
+ setTimeout(c, 0);
2065
+ };
2066
+ setTimeout(u, 0);
2067
+ }, r.prototype.sign = function(t, e, n) {
2068
+ var s = Ie(n), i = s + e(t).toString(), o = Pe(i, this.n.bitLength() / 4);
2069
+ if (o == null)
2070
+ return null;
2071
+ var a = this.doPrivate(o);
2072
+ if (a == null)
2073
+ return null;
2074
+ var u = a.toString(16);
2075
+ return u.length & 1 ? "0" + u : u;
2076
+ }, r.prototype.verify = function(t, e, n) {
2077
+ var s = T(e, 16), i = this.doPublic(s);
2078
+ if (i == null)
2079
+ return null;
2080
+ var o = i.toString(16).replace(/^1f+00/, ""), a = Me(o);
2081
+ return a == n(t).toString();
2082
+ }, r;
2083
+ }()
2084
+ );
2085
+ function Le(r, t) {
2086
+ for (var e = r.toByteArray(), n = 0; n < e.length && e[n] == 0; )
2087
+ ++n;
2088
+ if (e.length - n != t - 1 || e[n] != 2)
2089
+ return null;
2090
+ for (++n; e[n] != 0; )
2091
+ if (++n >= e.length)
2092
+ return null;
2093
+ for (var s = ""; ++n < e.length; ) {
2094
+ var i = e[n] & 255;
2095
+ i < 128 ? s += String.fromCharCode(i) : i > 191 && i < 224 ? (s += String.fromCharCode((i & 31) << 6 | e[n + 1] & 63), ++n) : (s += String.fromCharCode((i & 15) << 12 | (e[n + 1] & 63) << 6 | e[n + 2] & 63), n += 2);
2096
+ }
2097
+ return s;
2098
+ }
2099
+ var st = {
2100
+ md2: "3020300c06082a864886f70d020205000410",
2101
+ md5: "3020300c06082a864886f70d020505000410",
2102
+ sha1: "3021300906052b0e03021a05000414",
2103
+ sha224: "302d300d06096086480165030402040500041c",
2104
+ sha256: "3031300d060960864801650304020105000420",
2105
+ sha384: "3041300d060960864801650304020205000430",
2106
+ sha512: "3051300d060960864801650304020305000440",
2107
+ ripemd160: "3021300906052b2403020105000414"
2108
+ };
2109
+ function Ie(r) {
2110
+ return st[r] || "";
2111
+ }
2112
+ function Me(r) {
2113
+ for (var t in st)
2114
+ if (st.hasOwnProperty(t)) {
2115
+ var e = st[t], n = e.length;
2116
+ if (r.substr(0, n) == e)
2117
+ return r.substr(n);
2118
+ }
2119
+ return r;
2120
+ }
2121
+ /*!
2122
+ Copyright (c) 2011, Yahoo! Inc. All rights reserved.
2123
+ Code licensed under the BSD License:
2124
+ http://developer.yahoo.com/yui/license.html
2125
+ version: 2.9.0
2126
+ */
2127
+ var E = {};
2128
+ E.lang = {
2129
+ /**
2130
+ * Utility to set up the prototype, constructor and superclass properties to
2131
+ * support an inheritance strategy that can chain constructors and methods.
2132
+ * Static members will not be inherited.
2133
+ *
2134
+ * @method extend
2135
+ * @static
2136
+ * @param {Function} subc the object to modify
2137
+ * @param {Function} superc the object to inherit
2138
+ * @param {Object} overrides additional properties/methods to add to the
2139
+ * subclass prototype. These will override the
2140
+ * matching items obtained from the superclass
2141
+ * if present.
2142
+ */
2143
+ extend: function(r, t, e) {
2144
+ if (!t || !r)
2145
+ throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
2146
+ var n = function() {
2147
+ };
2148
+ if (n.prototype = t.prototype, r.prototype = new n(), r.prototype.constructor = r, r.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), e) {
2149
+ var s;
2150
+ for (s in e)
2151
+ r.prototype[s] = e[s];
2152
+ var i = function() {
2153
+ }, o = ["toString", "valueOf"];
2154
+ try {
2155
+ /MSIE/.test(navigator.userAgent) && (i = function(a, u) {
2156
+ for (s = 0; s < o.length; s = s + 1) {
2157
+ var h = o[s], l = u[h];
2158
+ typeof l == "function" && l != Object.prototype[h] && (a[h] = l);
2159
+ }
2160
+ });
2161
+ } catch {
2162
+ }
2163
+ i(r.prototype, e);
2164
+ }
2165
+ }
2166
+ };
2167
+ /**
2168
+ * @fileOverview
2169
+ * @name asn1-1.0.js
2170
+ * @author Kenji Urushima kenji.urushima@gmail.com
2171
+ * @version asn1 1.0.13 (2017-Jun-02)
2172
+ * @since jsrsasign 2.1
2173
+ * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
2174
+ */
2175
+ var f = {};
2176
+ (typeof f.asn1 > "u" || !f.asn1) && (f.asn1 = {});
2177
+ f.asn1.ASN1Util = new function() {
2178
+ this.integerToByteHex = function(r) {
2179
+ var t = r.toString(16);
2180
+ return t.length % 2 == 1 && (t = "0" + t), t;
2181
+ }, this.bigIntToMinTwosComplementsHex = function(r) {
2182
+ var t = r.toString(16);
2183
+ if (t.substr(0, 1) != "-")
2184
+ t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
2185
+ else {
2186
+ var e = t.substr(1), n = e.length;
2187
+ n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
2188
+ for (var s = "", i = 0; i < n; i++)
2189
+ s += "f";
2190
+ var o = new g(s, 16), a = o.xor(r).add(g.ONE);
2191
+ t = a.toString(16).replace(/^-/, "");
2192
+ }
2193
+ return t;
2194
+ }, this.getPEMStringFromHex = function(r, t) {
2195
+ return hextopem(r, t);
2196
+ }, this.newObject = function(r) {
2197
+ var t = f, e = t.asn1, n = e.DERBoolean, s = e.DERInteger, i = e.DERBitString, o = e.DEROctetString, a = e.DERNull, u = e.DERObjectIdentifier, h = e.DEREnumerated, l = e.DERUTF8String, c = e.DERNumericString, v = e.DERPrintableString, y = e.DERTeletexString, S = e.DERIA5String, b = e.DERUTCTime, D = e.DERGeneralizedTime, x = e.DERSequence, O = e.DERSet, w = e.DERTaggedObject, L = e.ASN1Util.newObject, B = Object.keys(r);
2198
+ if (B.length != 1)
2199
+ throw "key of param shall be only one.";
2200
+ var p = B[0];
2201
+ if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + p + ":") == -1)
2202
+ throw "undefined key: " + p;
2203
+ if (p == "bool")
2204
+ return new n(r[p]);
2205
+ if (p == "int")
2206
+ return new s(r[p]);
2207
+ if (p == "bitstr")
2208
+ return new i(r[p]);
2209
+ if (p == "octstr")
2210
+ return new o(r[p]);
2211
+ if (p == "null")
2212
+ return new a(r[p]);
2213
+ if (p == "oid")
2214
+ return new u(r[p]);
2215
+ if (p == "enum")
2216
+ return new h(r[p]);
2217
+ if (p == "utf8str")
2218
+ return new l(r[p]);
2219
+ if (p == "numstr")
2220
+ return new c(r[p]);
2221
+ if (p == "prnstr")
2222
+ return new v(r[p]);
2223
+ if (p == "telstr")
2224
+ return new y(r[p]);
2225
+ if (p == "ia5str")
2226
+ return new S(r[p]);
2227
+ if (p == "utctime")
2228
+ return new b(r[p]);
2229
+ if (p == "gentime")
2230
+ return new D(r[p]);
2231
+ if (p == "seq") {
2232
+ for (var I = r[p], $ = [], q = 0; q < I.length; q++) {
2233
+ var ot = L(I[q]);
2234
+ $.push(ot);
2235
+ }
2236
+ return new x({ array: $ });
2237
+ }
2238
+ if (p == "set") {
2239
+ for (var I = r[p], $ = [], q = 0; q < I.length; q++) {
2240
+ var ot = L(I[q]);
2241
+ $.push(ot);
2242
+ }
2243
+ return new O({ array: $ });
2244
+ }
2245
+ if (p == "tag") {
2246
+ var N = r[p];
2247
+ if (Object.prototype.toString.call(N) === "[object Array]" && N.length == 3) {
2248
+ var $t = L(N[2]);
2249
+ return new w({
2250
+ tag: N[0],
2251
+ explicit: N[1],
2252
+ obj: $t
2253
+ });
2254
+ } else {
2255
+ var X = {};
2256
+ if (N.explicit !== void 0 && (X.explicit = N.explicit), N.tag !== void 0 && (X.tag = N.tag), N.obj === void 0)
2257
+ throw "obj shall be specified for 'tag'.";
2258
+ return X.obj = L(N.obj), new w(X);
2259
+ }
2260
+ }
2261
+ }, this.jsonToASN1HEX = function(r) {
2262
+ var t = this.newObject(r);
2263
+ return t.getEncodedHex();
2264
+ };
2265
+ }();
2266
+ f.asn1.ASN1Util.oidHexToInt = function(r) {
2267
+ for (var s = "", t = parseInt(r.substr(0, 2), 16), e = Math.floor(t / 40), n = t % 40, s = e + "." + n, i = "", o = 2; o < r.length; o += 2) {
2268
+ var a = parseInt(r.substr(o, 2), 16), u = ("00000000" + a.toString(2)).slice(-8);
2269
+ if (i = i + u.substr(1, 7), u.substr(0, 1) == "0") {
2270
+ var h = new g(i, 2);
2271
+ s = s + "." + h.toString(10), i = "";
2272
+ }
2273
+ }
2274
+ return s;
2275
+ };
2276
+ f.asn1.ASN1Util.oidIntToHex = function(r) {
2277
+ var t = function(a) {
2278
+ var u = a.toString(16);
2279
+ return u.length == 1 && (u = "0" + u), u;
2280
+ }, e = function(a) {
2281
+ var u = "", h = new g(a, 10), l = h.toString(2), c = 7 - l.length % 7;
2282
+ c == 7 && (c = 0);
2283
+ for (var v = "", y = 0; y < c; y++)
2284
+ v += "0";
2285
+ l = v + l;
2286
+ for (var y = 0; y < l.length - 1; y += 7) {
2287
+ var S = l.substr(y, 7);
2288
+ y != l.length - 7 && (S = "1" + S), u += t(parseInt(S, 2));
2289
+ }
2290
+ return u;
2291
+ };
2292
+ if (!r.match(/^[0-9.]+$/))
2293
+ throw "malformed oid string: " + r;
2294
+ var n = "", s = r.split("."), i = parseInt(s[0]) * 40 + parseInt(s[1]);
2295
+ n += t(i), s.splice(0, 2);
2296
+ for (var o = 0; o < s.length; o++)
2297
+ n += e(s[o]);
2298
+ return n;
2299
+ };
2300
+ f.asn1.ASN1Object = function() {
2301
+ var r = "";
2302
+ this.getLengthHexFromValue = function() {
2303
+ if (typeof this.hV > "u" || this.hV == null)
2304
+ throw "this.hV is null or undefined.";
2305
+ if (this.hV.length % 2 == 1)
2306
+ throw "value hex must be even length: n=" + r.length + ",v=" + this.hV;
2307
+ var t = this.hV.length / 2, e = t.toString(16);
2308
+ if (e.length % 2 == 1 && (e = "0" + e), t < 128)
2309
+ return e;
2310
+ var n = e.length / 2;
2311
+ if (n > 15)
2312
+ throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
2313
+ var s = 128 + n;
2314
+ return s.toString(16) + e;
2315
+ }, this.getEncodedHex = function() {
2316
+ return (this.hTLV == null || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
2317
+ }, this.getValueHex = function() {
2318
+ return this.getEncodedHex(), this.hV;
2319
+ }, this.getFreshValueHex = function() {
2320
+ return "";
2321
+ };
2322
+ };
2323
+ f.asn1.DERAbstractString = function(r) {
2324
+ f.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
2325
+ return this.s;
2326
+ }, this.setString = function(t) {
2327
+ this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(this.s);
2328
+ }, this.setStringHex = function(t) {
2329
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t;
2330
+ }, this.getFreshValueHex = function() {
2331
+ return this.hV;
2332
+ }, typeof r < "u" && (typeof r == "string" ? this.setString(r) : typeof r.str < "u" ? this.setString(r.str) : typeof r.hex < "u" && this.setStringHex(r.hex));
2333
+ };
2334
+ E.lang.extend(f.asn1.DERAbstractString, f.asn1.ASN1Object);
2335
+ f.asn1.DERAbstractTime = function(r) {
2336
+ f.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
2337
+ utc = t.getTime() + t.getTimezoneOffset() * 6e4;
2338
+ var e = new Date(utc);
2339
+ return e;
2340
+ }, this.formatDate = function(t, e, n) {
2341
+ var s = this.zeroPadding, i = this.localDateToUTC(t), o = String(i.getFullYear());
2342
+ e == "utc" && (o = o.substr(2, 2));
2343
+ var a = s(String(i.getMonth() + 1), 2), u = s(String(i.getDate()), 2), h = s(String(i.getHours()), 2), l = s(String(i.getMinutes()), 2), c = s(String(i.getSeconds()), 2), v = o + a + u + h + l + c;
2344
+ if (n === !0) {
2345
+ var y = i.getMilliseconds();
2346
+ if (y != 0) {
2347
+ var S = s(String(y), 3);
2348
+ S = S.replace(/[0]+$/, ""), v = v + "." + S;
2349
+ }
2350
+ }
2351
+ return v + "Z";
2352
+ }, this.zeroPadding = function(t, e) {
2353
+ return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t;
2354
+ }, this.getString = function() {
2355
+ return this.s;
2356
+ }, this.setString = function(t) {
2357
+ this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(t);
2358
+ }, this.setByDateValue = function(t, e, n, s, i, o) {
2359
+ var a = new Date(Date.UTC(t, e - 1, n, s, i, o, 0));
2360
+ this.setByDate(a);
2361
+ }, this.getFreshValueHex = function() {
2362
+ return this.hV;
2363
+ };
2364
+ };
2365
+ E.lang.extend(f.asn1.DERAbstractTime, f.asn1.ASN1Object);
2366
+ f.asn1.DERAbstractStructured = function(r) {
2367
+ f.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
2368
+ this.hTLV = null, this.isModified = !0, this.asn1Array = t;
2369
+ }, this.appendASN1Object = function(t) {
2370
+ this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
2371
+ }, this.asn1Array = new Array(), typeof r < "u" && typeof r.array < "u" && (this.asn1Array = r.array);
2372
+ };
2373
+ E.lang.extend(f.asn1.DERAbstractStructured, f.asn1.ASN1Object);
2374
+ f.asn1.DERBoolean = function() {
2375
+ f.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
2376
+ };
2377
+ E.lang.extend(f.asn1.DERBoolean, f.asn1.ASN1Object);
2378
+ f.asn1.DERInteger = function(r) {
2379
+ f.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
2380
+ this.hTLV = null, this.isModified = !0, this.hV = f.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
2381
+ }, this.setByInteger = function(t) {
2382
+ var e = new g(String(t), 10);
2383
+ this.setByBigInteger(e);
2384
+ }, this.setValueHex = function(t) {
2385
+ this.hV = t;
2386
+ }, this.getFreshValueHex = function() {
2387
+ return this.hV;
2388
+ }, typeof r < "u" && (typeof r.bigint < "u" ? this.setByBigInteger(r.bigint) : typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
2389
+ };
2390
+ E.lang.extend(f.asn1.DERInteger, f.asn1.ASN1Object);
2391
+ f.asn1.DERBitString = function(r) {
2392
+ if (r !== void 0 && typeof r.obj < "u") {
2393
+ var t = f.asn1.ASN1Util.newObject(r.obj);
2394
+ r.hex = "00" + t.getEncodedHex();
2395
+ }
2396
+ f.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
2397
+ this.hTLV = null, this.isModified = !0, this.hV = e;
2398
+ }, this.setUnusedBitsAndHexValue = function(e, n) {
2399
+ if (e < 0 || 7 < e)
2400
+ throw "unused bits shall be from 0 to 7: u = " + e;
2401
+ var s = "0" + e;
2402
+ this.hTLV = null, this.isModified = !0, this.hV = s + n;
2403
+ }, this.setByBinaryString = function(e) {
2404
+ e = e.replace(/0+$/, "");
2405
+ var n = 8 - e.length % 8;
2406
+ n == 8 && (n = 0);
2407
+ for (var s = 0; s <= n; s++)
2408
+ e += "0";
2409
+ for (var i = "", s = 0; s < e.length - 1; s += 8) {
2410
+ var o = e.substr(s, 8), a = parseInt(o, 2).toString(16);
2411
+ a.length == 1 && (a = "0" + a), i += a;
2412
+ }
2413
+ this.hTLV = null, this.isModified = !0, this.hV = "0" + n + i;
2414
+ }, this.setByBooleanArray = function(e) {
2415
+ for (var n = "", s = 0; s < e.length; s++)
2416
+ e[s] == !0 ? n += "1" : n += "0";
2417
+ this.setByBinaryString(n);
2418
+ }, this.newFalseArray = function(e) {
2419
+ for (var n = new Array(e), s = 0; s < e; s++)
2420
+ n[s] = !1;
2421
+ return n;
2422
+ }, this.getFreshValueHex = function() {
2423
+ return this.hV;
2424
+ }, typeof r < "u" && (typeof r == "string" && r.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(r) : typeof r.hex < "u" ? this.setHexValueIncludingUnusedBits(r.hex) : typeof r.bin < "u" ? this.setByBinaryString(r.bin) : typeof r.array < "u" && this.setByBooleanArray(r.array));
2425
+ };
2426
+ E.lang.extend(f.asn1.DERBitString, f.asn1.ASN1Object);
2427
+ f.asn1.DEROctetString = function(r) {
2428
+ if (r !== void 0 && typeof r.obj < "u") {
2429
+ var t = f.asn1.ASN1Util.newObject(r.obj);
2430
+ r.hex = t.getEncodedHex();
2431
+ }
2432
+ f.asn1.DEROctetString.superclass.constructor.call(this, r), this.hT = "04";
2433
+ };
2434
+ E.lang.extend(f.asn1.DEROctetString, f.asn1.DERAbstractString);
2435
+ f.asn1.DERNull = function() {
2436
+ f.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
2437
+ };
2438
+ E.lang.extend(f.asn1.DERNull, f.asn1.ASN1Object);
2439
+ f.asn1.DERObjectIdentifier = function(r) {
2440
+ var t = function(n) {
2441
+ var s = n.toString(16);
2442
+ return s.length == 1 && (s = "0" + s), s;
2443
+ }, e = function(n) {
2444
+ var s = "", i = new g(n, 10), o = i.toString(2), a = 7 - o.length % 7;
2445
+ a == 7 && (a = 0);
2446
+ for (var u = "", h = 0; h < a; h++)
2447
+ u += "0";
2448
+ o = u + o;
2449
+ for (var h = 0; h < o.length - 1; h += 7) {
2450
+ var l = o.substr(h, 7);
2451
+ h != o.length - 7 && (l = "1" + l), s += t(parseInt(l, 2));
2452
+ }
2453
+ return s;
2454
+ };
2455
+ f.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(n) {
2456
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = n;
2457
+ }, this.setValueOidString = function(n) {
2458
+ if (!n.match(/^[0-9.]+$/))
2459
+ throw "malformed oid string: " + n;
2460
+ var s = "", i = n.split("."), o = parseInt(i[0]) * 40 + parseInt(i[1]);
2461
+ s += t(o), i.splice(0, 2);
2462
+ for (var a = 0; a < i.length; a++)
2463
+ s += e(i[a]);
2464
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = s;
2465
+ }, this.setValueName = function(n) {
2466
+ var s = f.asn1.x509.OID.name2oid(n);
2467
+ if (s !== "")
2468
+ this.setValueOidString(s);
2469
+ else
2470
+ throw "DERObjectIdentifier oidName undefined: " + n;
2471
+ }, this.getFreshValueHex = function() {
2472
+ return this.hV;
2473
+ }, r !== void 0 && (typeof r == "string" ? r.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(r) : this.setValueName(r) : r.oid !== void 0 ? this.setValueOidString(r.oid) : r.hex !== void 0 ? this.setValueHex(r.hex) : r.name !== void 0 && this.setValueName(r.name));
2474
+ };
2475
+ E.lang.extend(f.asn1.DERObjectIdentifier, f.asn1.ASN1Object);
2476
+ f.asn1.DEREnumerated = function(r) {
2477
+ f.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
2478
+ this.hTLV = null, this.isModified = !0, this.hV = f.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
2479
+ }, this.setByInteger = function(t) {
2480
+ var e = new g(String(t), 10);
2481
+ this.setByBigInteger(e);
2482
+ }, this.setValueHex = function(t) {
2483
+ this.hV = t;
2484
+ }, this.getFreshValueHex = function() {
2485
+ return this.hV;
2486
+ }, typeof r < "u" && (typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
2487
+ };
2488
+ E.lang.extend(f.asn1.DEREnumerated, f.asn1.ASN1Object);
2489
+ f.asn1.DERUTF8String = function(r) {
2490
+ f.asn1.DERUTF8String.superclass.constructor.call(this, r), this.hT = "0c";
2491
+ };
2492
+ E.lang.extend(f.asn1.DERUTF8String, f.asn1.DERAbstractString);
2493
+ f.asn1.DERNumericString = function(r) {
2494
+ f.asn1.DERNumericString.superclass.constructor.call(this, r), this.hT = "12";
2495
+ };
2496
+ E.lang.extend(f.asn1.DERNumericString, f.asn1.DERAbstractString);
2497
+ f.asn1.DERPrintableString = function(r) {
2498
+ f.asn1.DERPrintableString.superclass.constructor.call(this, r), this.hT = "13";
2499
+ };
2500
+ E.lang.extend(f.asn1.DERPrintableString, f.asn1.DERAbstractString);
2501
+ f.asn1.DERTeletexString = function(r) {
2502
+ f.asn1.DERTeletexString.superclass.constructor.call(this, r), this.hT = "14";
2503
+ };
2504
+ E.lang.extend(f.asn1.DERTeletexString, f.asn1.DERAbstractString);
2505
+ f.asn1.DERIA5String = function(r) {
2506
+ f.asn1.DERIA5String.superclass.constructor.call(this, r), this.hT = "16";
2507
+ };
2508
+ E.lang.extend(f.asn1.DERIA5String, f.asn1.DERAbstractString);
2509
+ f.asn1.DERUTCTime = function(r) {
2510
+ f.asn1.DERUTCTime.superclass.constructor.call(this, r), this.hT = "17", this.setByDate = function(t) {
2511
+ this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
2512
+ }, this.getFreshValueHex = function() {
2513
+ return typeof this.date > "u" && typeof this.s > "u" && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
2514
+ }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{12}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date));
2515
+ };
2516
+ E.lang.extend(f.asn1.DERUTCTime, f.asn1.DERAbstractTime);
2517
+ f.asn1.DERGeneralizedTime = function(r) {
2518
+ f.asn1.DERGeneralizedTime.superclass.constructor.call(this, r), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
2519
+ this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
2520
+ }, this.getFreshValueHex = function() {
2521
+ return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
2522
+ }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{14}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date), r.millis === !0 && (this.withMillis = !0));
2523
+ };
2524
+ E.lang.extend(f.asn1.DERGeneralizedTime, f.asn1.DERAbstractTime);
2525
+ f.asn1.DERSequence = function(r) {
2526
+ f.asn1.DERSequence.superclass.constructor.call(this, r), this.hT = "30", this.getFreshValueHex = function() {
2527
+ for (var t = "", e = 0; e < this.asn1Array.length; e++) {
2528
+ var n = this.asn1Array[e];
2529
+ t += n.getEncodedHex();
2530
+ }
2531
+ return this.hV = t, this.hV;
2532
+ };
2533
+ };
2534
+ E.lang.extend(f.asn1.DERSequence, f.asn1.DERAbstractStructured);
2535
+ f.asn1.DERSet = function(r) {
2536
+ f.asn1.DERSet.superclass.constructor.call(this, r), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
2537
+ for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
2538
+ var n = this.asn1Array[e];
2539
+ t.push(n.getEncodedHex());
2540
+ }
2541
+ return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
2542
+ }, typeof r < "u" && typeof r.sortflag < "u" && r.sortflag == !1 && (this.sortFlag = !1);
2543
+ };
2544
+ E.lang.extend(f.asn1.DERSet, f.asn1.DERAbstractStructured);
2545
+ f.asn1.DERTaggedObject = function(r) {
2546
+ f.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, n) {
2547
+ this.hT = e, this.isExplicit = t, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
2548
+ }, this.getFreshValueHex = function() {
2549
+ return this.hV;
2550
+ }, typeof r < "u" && (typeof r.tag < "u" && (this.hT = r.tag), typeof r.explicit < "u" && (this.isExplicit = r.explicit), typeof r.obj < "u" && (this.asn1Object = r.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
2551
+ };
2552
+ E.lang.extend(f.asn1.DERTaggedObject, f.asn1.ASN1Object);
2553
+ var Fe = /* @__PURE__ */ function() {
2554
+ var r = function(t, e) {
2555
+ return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, s) {
2556
+ n.__proto__ = s;
2557
+ } || function(n, s) {
2558
+ for (var i in s)
2559
+ Object.prototype.hasOwnProperty.call(s, i) && (n[i] = s[i]);
2560
+ }, r(t, e);
2561
+ };
2562
+ return function(t, e) {
2563
+ if (typeof e != "function" && e !== null)
2564
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
2565
+ r(t, e);
2566
+ function n() {
2567
+ this.constructor = t;
2568
+ }
2569
+ t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
2570
+ };
2571
+ }(), Bt = (
2572
+ /** @class */
2573
+ function(r) {
2574
+ Fe(t, r);
2575
+ function t(e) {
2576
+ var n = r.call(this) || this;
2577
+ return e && (typeof e == "string" ? n.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && n.parsePropertiesFrom(e)), n;
2578
+ }
2579
+ return t.prototype.parseKey = function(e) {
2580
+ try {
2581
+ var n = 0, s = 0, i = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, o = i.test(e) ? be.decode(e) : lt.unarmor(e), a = De.decode(o);
2582
+ if (a.sub.length === 3 && (a = a.sub[2].sub[0]), a.sub.length === 9) {
2583
+ n = a.sub[1].getHexStringValue(), this.n = T(n, 16), s = a.sub[2].getHexStringValue(), this.e = parseInt(s, 16);
2584
+ var u = a.sub[3].getHexStringValue();
2585
+ this.d = T(u, 16);
2586
+ var h = a.sub[4].getHexStringValue();
2587
+ this.p = T(h, 16);
2588
+ var l = a.sub[5].getHexStringValue();
2589
+ this.q = T(l, 16);
2590
+ var c = a.sub[6].getHexStringValue();
2591
+ this.dmp1 = T(c, 16);
2592
+ var v = a.sub[7].getHexStringValue();
2593
+ this.dmq1 = T(v, 16);
2594
+ var y = a.sub[8].getHexStringValue();
2595
+ this.coeff = T(y, 16);
2596
+ } else if (a.sub.length === 2)
2597
+ if (a.sub[0].sub) {
2598
+ var S = a.sub[1], b = S.sub[0];
2599
+ n = b.sub[0].getHexStringValue(), this.n = T(n, 16), s = b.sub[1].getHexStringValue(), this.e = parseInt(s, 16);
2600
+ } else
2601
+ n = a.sub[0].getHexStringValue(), this.n = T(n, 16), s = a.sub[1].getHexStringValue(), this.e = parseInt(s, 16);
2602
+ else
2603
+ return !1;
2604
+ return !0;
2605
+ } catch {
2606
+ return !1;
2607
+ }
2608
+ }, t.prototype.getPrivateBaseKey = function() {
2609
+ var e = {
2610
+ array: [
2611
+ new f.asn1.DERInteger({ int: 0 }),
2612
+ new f.asn1.DERInteger({ bigint: this.n }),
2613
+ new f.asn1.DERInteger({ int: this.e }),
2614
+ new f.asn1.DERInteger({ bigint: this.d }),
2615
+ new f.asn1.DERInteger({ bigint: this.p }),
2616
+ new f.asn1.DERInteger({ bigint: this.q }),
2617
+ new f.asn1.DERInteger({ bigint: this.dmp1 }),
2618
+ new f.asn1.DERInteger({ bigint: this.dmq1 }),
2619
+ new f.asn1.DERInteger({ bigint: this.coeff })
2620
+ ]
2621
+ }, n = new f.asn1.DERSequence(e);
2622
+ return n.getEncodedHex();
2623
+ }, t.prototype.getPrivateBaseKeyB64 = function() {
2624
+ return it(this.getPrivateBaseKey());
2625
+ }, t.prototype.getPublicBaseKey = function() {
2626
+ var e = new f.asn1.DERSequence({
2627
+ array: [
2628
+ new f.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
2629
+ new f.asn1.DERNull()
2630
+ ]
2631
+ }), n = new f.asn1.DERSequence({
2632
+ array: [
2633
+ new f.asn1.DERInteger({ bigint: this.n }),
2634
+ new f.asn1.DERInteger({ int: this.e })
2635
+ ]
2636
+ }), s = new f.asn1.DERBitString({
2637
+ hex: "00" + n.getEncodedHex()
2638
+ }), i = new f.asn1.DERSequence({
2639
+ array: [e, s]
2640
+ });
2641
+ return i.getEncodedHex();
2642
+ }, t.prototype.getPublicBaseKeyB64 = function() {
2643
+ return it(this.getPublicBaseKey());
2644
+ }, t.wordwrap = function(e, n) {
2645
+ if (n = n || 64, !e)
2646
+ return e;
2647
+ var s = "(.{1," + n + `})( +|$
2648
+ ?)|(.{1,` + n + "})";
2649
+ return e.match(RegExp(s, "g")).join(`
2650
+ `);
2651
+ }, t.prototype.getPrivateKey = function() {
2652
+ var e = `-----BEGIN RSA PRIVATE KEY-----
2653
+ `;
2654
+ return e += t.wordwrap(this.getPrivateBaseKeyB64()) + `
2655
+ `, e += "-----END RSA PRIVATE KEY-----", e;
2656
+ }, t.prototype.getPublicKey = function() {
2657
+ var e = `-----BEGIN PUBLIC KEY-----
2658
+ `;
2659
+ return e += t.wordwrap(this.getPublicBaseKeyB64()) + `
2660
+ `, e += "-----END PUBLIC KEY-----", e;
2661
+ }, t.hasPublicKeyProperty = function(e) {
2662
+ return e = e || {}, e.hasOwnProperty("n") && e.hasOwnProperty("e");
2663
+ }, t.hasPrivateKeyProperty = function(e) {
2664
+ return e = e || {}, e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff");
2665
+ }, t.prototype.parsePropertiesFrom = function(e) {
2666
+ this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
2667
+ }, t;
2668
+ }(Ve)
2669
+ ), ht, ke = typeof process < "u" ? (ht = process.env) === null || ht === void 0 ? void 0 : ht.npm_package_version : void 0, He = (
2670
+ /** @class */
2671
+ function() {
2672
+ function r(t) {
2673
+ t === void 0 && (t = {}), t = t || {}, this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = null;
2674
+ }
2675
+ return r.prototype.setKey = function(t) {
2676
+ this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Bt(t);
2677
+ }, r.prototype.setPrivateKey = function(t) {
2678
+ this.setKey(t);
2679
+ }, r.prototype.setPublicKey = function(t) {
2680
+ this.setKey(t);
2681
+ }, r.prototype.decrypt = function(t) {
2682
+ try {
2683
+ return this.getKey().decrypt(Dt(t));
2684
+ } catch {
2685
+ return !1;
2686
+ }
2687
+ }, r.prototype.encrypt = function(t) {
2688
+ try {
2689
+ return it(this.getKey().encrypt(t));
2690
+ } catch {
2691
+ return !1;
2692
+ }
2693
+ }, r.prototype.sign = function(t, e, n) {
2694
+ try {
2695
+ return it(this.getKey().sign(t, e, n));
2696
+ } catch {
2697
+ return !1;
2698
+ }
2699
+ }, r.prototype.verify = function(t, e, n) {
2700
+ try {
2701
+ return this.getKey().verify(t, Dt(e), n);
2702
+ } catch {
2703
+ return !1;
2704
+ }
2705
+ }, r.prototype.getKey = function(t) {
2706
+ if (!this.key) {
2707
+ if (this.key = new Bt(), t && {}.toString.call(t) === "[object Function]") {
2708
+ this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
2709
+ return;
2710
+ }
2711
+ this.key.generate(this.default_key_size, this.default_public_exponent);
2712
+ }
2713
+ return this.key;
2714
+ }, r.prototype.getPrivateKey = function() {
2715
+ return this.getKey().getPrivateKey();
2716
+ }, r.prototype.getPrivateKeyB64 = function() {
2717
+ return this.getKey().getPrivateBaseKeyB64();
2718
+ }, r.prototype.getPublicKey = function() {
2719
+ return this.getKey().getPublicKey();
2720
+ }, r.prototype.getPublicKeyB64 = function() {
2721
+ return this.getKey().getPublicBaseKeyB64();
2722
+ }, r.version = ke, r;
2723
+ }()
2724
+ );
2725
+ const je = {
766
2726
  status: 200,
767
2727
  message: "",
768
2728
  key: ""
769
- }, z = {
2729
+ }, Zt = {
770
2730
  status: 200,
771
2731
  message: "",
772
2732
  data: {
@@ -780,64 +2740,71 @@ const x = {
780
2740
  captcha: ""
781
2741
  }
782
2742
  };
783
- async function ce() {
784
- const e = x;
2743
+ async function qe(r, t, e, n, s) {
2744
+ const i = Zt, o = r, a = t, u = e, h = s;
785
2745
  try {
786
- const s = await l.get("/mbuhx0as4kui?ajax=1", {
787
- params: {
788
- render: o()
789
- }
790
- });
791
- let t;
792
- return o() ? t = JSON.parse(p(s.data)) : t = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.key = t.key, e);
793
- } catch (s) {
794
- const t = s;
795
- return e.status = t.status || 500, e.message = t.message, e;
796
- }
797
- }
798
- async function ge(e, s, t, a, n, d, _) {
799
- const u = z, r = e, J = s, U = t, V = a, H = n;
800
- try {
801
- const c = {};
802
- c.fr_username = r, c.fr_password = J, c.fr_gdcode = U, c.isApp = H, c.domain = V, c._token = d, c.json = 1, c.encrypt = 1;
803
- const f = await l.post("/kdink8anl8z3", {
2746
+ const l = await Ut([
2747
+ "slide-verification",
2748
+ "encryptkey",
2749
+ "CAPTCHA"
2750
+ ]), c = l.data.verificationBeforeLogin, v = l.data.publicKey, y = l.data.csrf, S = l.data.getCaptcha;
2751
+ let b = "";
2752
+ if (c) {
2753
+ const p = await R.get("/mbuhx0as4kui?ajax=1", {
2754
+ params: {
2755
+ render: m()
2756
+ }
2757
+ });
2758
+ let I;
2759
+ if (m() ? I = JSON.parse(A(p.data)) : I = p.data, p.status != 200)
2760
+ return i.status = p.status, i.message = "", i;
2761
+ b = I.key;
2762
+ }
2763
+ const D = new He();
2764
+ D.setPublicKey(v);
2765
+ let x = n.host.split(":")[0];
2766
+ const O = D.encrypt(x.trim());
2767
+ O && x.length < 53 ? x = O : x = x.trim();
2768
+ const w = {};
2769
+ w.fr_username = D.encrypt(o.trim()), w.fr_password = D.encrypt(a.trim()), w.fr_gdcode = u, w.isApp = h, w.domain = x, w._token = y, w.json = 1, w.encrypt = 1, console.log(w);
2770
+ const L = await R.post("/kdink8anl8z3", {
804
2771
  headers: {
805
- "X-CSRF-TOKEN": d
2772
+ "X-CSRF-TOKEN": y
806
2773
  },
807
2774
  params: {
808
- render: o()
2775
+ render: m()
809
2776
  },
810
- data: c,
811
- key: d
2777
+ data: w,
2778
+ key: b
812
2779
  });
813
- let g;
814
- return o() ? g = JSON.parse(p(f.data)) : g = f.data, f.status != 200 ? (u.status = f.status, u.message = "", u) : (u.data = {
815
- msg: g.msg ?? "",
816
- accessToken: g.access_token ?? "",
817
- fullName: g.fullname ?? "",
818
- unreadMailCount: g.news ?? "",
819
- status: g.status ?? "",
820
- username: g.username ?? "",
821
- walletAmount: g.wallet ?? "",
822
- captcha: _ ?? ""
823
- }, u);
824
- } catch (c) {
825
- const f = c;
826
- return u.status = f.status || 500, u.message = f.message, u;
2780
+ let B;
2781
+ return m() ? B = JSON.parse(A(L.data)) : B = L.data, L.status != 200 ? (i.status = L.status, i.message = "", i) : (i.data = {
2782
+ msg: B.msg ?? "",
2783
+ accessToken: B.access_token ?? "",
2784
+ fullName: B.fullname ?? "",
2785
+ unreadMailCount: B.news ?? "",
2786
+ status: B.status ?? "",
2787
+ username: B.username ?? "",
2788
+ walletAmount: B.wallet ?? "",
2789
+ captcha: S ?? ""
2790
+ }, i);
2791
+ } catch (l) {
2792
+ const c = l;
2793
+ return i.status = c.status || 500, i.message = c.message, i;
827
2794
  }
828
2795
  }
829
2796
  export {
830
- de as Repository,
831
- X as cmsList,
832
- I as csLink,
833
- W as currentLang,
834
- ee as eGame,
835
- w as fishGames,
836
- Z as getLocale,
837
- te as getSetting,
838
- Q as home,
839
- C as hotGames,
840
- ae as login,
841
- Y as promotion,
842
- $ as trialGames
2797
+ Ke as Repository,
2798
+ re as cmsList,
2799
+ ae as csLink,
2800
+ se as currentLang,
2801
+ oe as eGame,
2802
+ Wt as fishGames,
2803
+ ie as getLocale,
2804
+ ue as getSetting,
2805
+ ne as home,
2806
+ Qt as hotGames,
2807
+ fe as login,
2808
+ ee as promotion,
2809
+ te as trialGames
843
2810
  };