gc_mobile 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,7 +45,7 @@ this.$store.commit("setUserInfo", res.userInfo); // 保存到vuex
45
45
  | :-------: | :------------------------------------------------------: | :----: | :----: |
46
46
  | appCode | 必传,应用 appCode 名字 | string | / |
47
47
  | apiPrefix | api 前缀,dev/prod/自定义 api 路径,不传默认为测试环境 api | string | dev |
48
- | map | 接口数据路径 | object | {dataPath:"data"} |
48
+ | map | 接口数据路径 | object | { dataPath:"data" } |
49
49
  | gc_rsa | 网关配置项 | object | / |
50
50
 
51
51
  ## 返回参数说明
package/libs/main.js CHANGED
@@ -1,9 +1,9 @@
1
- import Oe, { mapKeys as ke, isEmpty as ae, includes as $e, sortBy as Le, map as De, isArray as Ge, toLower as Qe, mapValues as Xe, keys as Ve, compact as Ze, forEach as Ye, get as Be, isString as Je, toString as Ae, now as et, random as tt } from "lodash-es";
2
- import * as ne from "dingtalk-jsapi";
3
- import ie, { stringify as rt } from "qs";
1
+ import ne, { mapKeys as ke, isEmpty as se, includes as $e, sortBy as Le, map as De, isArray as Ge, toLower as Qe, mapValues as Xe, keys as Ve, compact as Ze, forEach as Ye, get as Be, isString as Je, toString as Ae, now as et, random as tt } from "lodash-es";
2
+ import * as oe from "dingtalk-jsapi";
3
+ import fe, { stringify as rt } from "qs";
4
4
  import Re from "axios";
5
- const le = window.navigator.userAgent.toLowerCase();
6
- let ge = {
5
+ const pe = window.navigator.userAgent.toLowerCase();
6
+ let xe = {
7
7
  code: "",
8
8
  name: "未知"
9
9
  };
@@ -14,50 +14,50 @@ const ot = [
14
14
  {
15
15
  code: "weixin",
16
16
  name: "微信",
17
- value: /MicroMessenger/i.test(le)
17
+ value: /MicroMessenger/i.test(pe)
18
18
  },
19
19
  {
20
20
  code: "wxmp",
21
21
  name: "微信小程序",
22
- value: /miniProgram/i.test(le) || window.__wxjs_environment === "miniprogram"
22
+ value: /miniProgram/i.test(pe) || window.__wxjs_environment === "miniprogram"
23
23
  },
24
24
  {
25
25
  code: "dd",
26
26
  name: "钉钉",
27
- value: /DingTalk/i.test(le)
27
+ value: /DingTalk/i.test(pe)
28
28
  }
29
- ], at = (t) => t.value, je = Oe.find(ot, at);
30
- je ? ge = je : nt() && (ge = {
29
+ ], at = (t) => t.value, je = ne.find(ot, at);
30
+ je ? xe = je : nt() && (xe = {
31
31
  code: "h5",
32
32
  name: "H5"
33
33
  });
34
- const xe = ge, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcding" : t == "prod" ? "https://smart.ihotel.cn/guardian/gw/v1/platform-gcding" : t || "https://test.ihotel.cn/gw/v1/platform-gcding", it = ie.parse(location.search, { ignoreQueryPrefix: !0 }), pe = Oe.get(it, "corpId"), ft = async ({
34
+ const we = xe, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcding" : t == "prod" ? "https://smart.ihotel.cn/guardian/gw/v1/platform-gcding" : t || "https://test.ihotel.cn/gw/v1/platform-gcding", it = fe.parse(location.search, { ignoreQueryPrefix: !0 }), de = ne.get(it, "corpId"), ft = async ({
35
35
  appCode: t,
36
36
  apiPrefix: r,
37
37
  map: e = { dataPath: "data" }
38
38
  }) => {
39
39
  const a = st(r);
40
40
  return new Promise(async (p) => {
41
- if (pe) {
42
- const { code: c } = await ne.getAuthCode({
43
- corpId: pe
41
+ if (de) {
42
+ const { code: c } = await oe.getAuthCode({
43
+ corpId: de
44
44
  }), g = await Re.post(
45
45
  `${a}/api/auth/queryAuthNoExternalCompatible`,
46
46
  {
47
47
  appCode: t,
48
48
  authCode: c,
49
- corpId: pe
49
+ corpId: de
50
50
  }
51
- ), n = Oe.get(g, e.dataPath);
52
- n && n.result === 0 ? p({ userInfo: n.retVal, res: g }) : (ne.showToast({
51
+ ), n = ne.get(g, e.dataPath, g);
52
+ n && ne.get(n, "result") === 0 ? p({ userInfo: ne.get(n, "retVal"), res: g }) : (oe.showToast({
53
53
  type: "fail",
54
54
  duration: 2e3,
55
- content: n.msg,
55
+ content: ne.get(n, "msg") || "未知错误",
56
56
  complete: () => {
57
57
  }
58
58
  }), p({ res: g }));
59
59
  } else
60
- ne.showToast({
60
+ oe.showToast({
61
61
  type: "fail",
62
62
  duration: 2e3,
63
63
  content: "未配置参数:corpId",
@@ -67,9 +67,9 @@ const xe = ge, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-g
67
67
  });
68
68
  }, ct = {
69
69
  login: ft,
70
- dd: ne
70
+ dd: oe
71
71
  }, ht = () => new Promise(async (t) => {
72
- const { token: r } = ie.parse(location.search, { ignoreQueryPrefix: !0 });
72
+ const { token: r } = fe.parse(location.search, { ignoreQueryPrefix: !0 });
73
73
  t(r ? {
74
74
  userInfo: {
75
75
  ucToken: r
@@ -78,7 +78,7 @@ const xe = ge, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-g
78
78
  }), ut = {
79
79
  login: ht
80
80
  }, lt = () => new Promise((t) => {
81
- const { token: r } = ie.parse(location.search, { ignoreQueryPrefix: !0 });
81
+ const { token: r } = fe.parse(location.search, { ignoreQueryPrefix: !0 });
82
82
  t(r ? {
83
83
  userInfo: {
84
84
  ucToken: r
@@ -87,7 +87,7 @@ const xe = ge, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-g
87
87
  }), pt = {
88
88
  login: lt
89
89
  }, dt = () => new Promise((t) => {
90
- const { token: r } = ie.parse(location.search, { ignoreQueryPrefix: !0 });
90
+ const { token: r } = fe.parse(location.search, { ignoreQueryPrefix: !0 });
91
91
  t(r ? {
92
92
  userInfo: {
93
93
  ucToken: r
@@ -101,17 +101,17 @@ const xe = ge, st = (t) => t == "dev" ? "https://test.ihotel.cn/gw/v1/platform-g
101
101
  wxmp: vt,
102
102
  weixin: pt
103
103
  }, yt = (t) => {
104
- xe.code === "dd" ? (console.log("钉钉对象", ne), ne.setNavigationTitle(t)) : xe.code === "weixin" ? wx.setNavigationBarTitle(t) : document.title = t.title;
104
+ we.code === "dd" ? (console.log("钉钉对象", oe), oe.setNavigationTitle(t)) : we.code === "weixin" ? wx.setNavigationBarTitle(t) : document.title = t.title;
105
105
  }, _r = {
106
106
  setNavigationBarTitle: yt
107
107
  }, gt = (t) => {
108
108
  let r = "";
109
109
  return ke(t, (e, a) => {
110
- a && (ae(e) ? r += "&" + a : r += "&" + a + "=" + e);
110
+ a && (se(e) ? r += "&" + a : r += "&" + a + "=" + e);
111
111
  }), r;
112
- }, xt = (t, r) => ae(r) ? t : ($e(t, "?") ? t : t + "?") + r.substring(1), wt = (t, r) => ae(r) ? t : `${t}?${rt(r)}`;
112
+ }, xt = (t, r) => se(r) ? t : ($e(t, "?") ? t : t + "?") + r.substring(1), wt = (t, r) => se(r) ? t : `${t}?${rt(r)}`;
113
113
  var K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
114
- function he(t) {
114
+ function ue(t) {
115
115
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
116
116
  }
117
117
  function bt(t) {
@@ -135,7 +135,7 @@ function bt(t) {
135
135
  });
136
136
  }), e;
137
137
  }
138
- var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
138
+ var ve = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
139
139
  for (var t = [], r = 0; r < 256; ++r)
140
140
  t.push("%" + ((r < 16 ? "0" : "") + r.toString(16)).toUpperCase());
141
141
  return t;
@@ -159,7 +159,7 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
159
159
  if (re(r))
160
160
  r.push(e);
161
161
  else if (r && typeof r == "object")
162
- (a && (a.plainObjects || a.allowPrototypes) || !de.call(Object.prototype, e)) && (r[e] = !0);
162
+ (a && (a.plainObjects || a.allowPrototypes) || !ve.call(Object.prototype, e)) && (r[e] = !0);
163
163
  else
164
164
  return [r, e];
165
165
  return r;
@@ -168,14 +168,14 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
168
168
  return [r].concat(e);
169
169
  var p = r;
170
170
  return re(r) && !re(e) && (p = ze(r, a)), re(r) && re(e) ? (e.forEach(function(c, g) {
171
- if (de.call(r, g)) {
171
+ if (ve.call(r, g)) {
172
172
  var n = r[g];
173
173
  n && typeof n == "object" && c && typeof c == "object" ? r[g] = t(n, c, a) : r.push(c);
174
174
  } else
175
175
  r[g] = c;
176
176
  }), r) : Object.keys(e).reduce(function(c, g) {
177
177
  var n = e[g];
178
- return de.call(c, g) ? c[g] = t(c[g], n, a) : c[g] = n, c;
178
+ return ve.call(c, g) ? c[g] = t(c[g], n, a) : c[g] = n, c;
179
179
  }, p);
180
180
  }, Ot = function(r, e) {
181
181
  return Object.keys(e).reduce(function(a, p) {
@@ -242,14 +242,14 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
242
242
  isBuffer: Pt,
243
243
  isRegExp: St,
244
244
  merge: Ct
245
- }, se = Tt, we = Object.prototype.hasOwnProperty, Ft = Array.isArray, q = {
245
+ }, ie = Tt, be = Object.prototype.hasOwnProperty, Ft = Array.isArray, q = {
246
246
  allowDots: !1,
247
247
  allowPrototypes: !1,
248
248
  arrayLimit: 20,
249
249
  charset: "utf-8",
250
250
  charsetSentinel: !1,
251
251
  comma: !1,
252
- decoder: se.decode,
252
+ decoder: ie.decode,
253
253
  delimiter: "&",
254
254
  depth: 5,
255
255
  ignoreQueryPrefix: !1,
@@ -270,7 +270,7 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
270
270
  for (x = 0; x < g.length; ++x)
271
271
  if (x !== n) {
272
272
  var C = g[x], O = C.indexOf("]="), w = O === -1 ? C.indexOf("=") : O + 1, v, b;
273
- w === -1 ? (v = e.decoder(C, q.decoder, s, "key"), b = e.strictNullHandling ? null : "") : (v = e.decoder(C.slice(0, w), q.decoder, s, "key"), b = e.decoder(C.slice(w + 1), q.decoder, s, "value")), b && e.interpretNumericEntities && s === "iso-8859-1" && (b = It(b)), b && typeof b == "string" && e.comma && b.indexOf(",") > -1 && (b = b.split(",")), C.indexOf("[]=") > -1 && (b = Ft(b) ? [b] : b), we.call(a, v) ? a[v] = se.combine(a[v], b) : a[v] = b;
273
+ w === -1 ? (v = e.decoder(C, q.decoder, s, "key"), b = e.strictNullHandling ? null : "") : (v = e.decoder(C.slice(0, w), q.decoder, s, "key"), b = e.decoder(C.slice(w + 1), q.decoder, s, "value")), b && e.interpretNumericEntities && s === "iso-8859-1" && (b = It(b)), b && typeof b == "string" && e.comma && b.indexOf(",") > -1 && (b = b.split(",")), C.indexOf("[]=") > -1 && (b = Ft(b) ? [b] : b), be.call(a, v) ? a[v] = ie.combine(a[v], b) : a[v] = b;
274
274
  }
275
275
  return a;
276
276
  }, Lt = function(t, r, e) {
@@ -290,12 +290,12 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
290
290
  if (r) {
291
291
  var p = a.allowDots ? r.replace(/\.([^.[]+)/g, "[$1]") : r, c = /(\[[^[\]]*])/, g = /(\[[^[\]]*])/g, n = a.depth > 0 && c.exec(p), x = n ? p.slice(0, n.index) : p, s = [];
292
292
  if (x) {
293
- if (!a.plainObjects && we.call(Object.prototype, x) && !a.allowPrototypes)
293
+ if (!a.plainObjects && be.call(Object.prototype, x) && !a.allowPrototypes)
294
294
  return;
295
295
  s.push(x);
296
296
  }
297
297
  for (var C = 0; a.depth > 0 && (n = g.exec(p)) !== null && C < a.depth; ) {
298
- if (C += 1, !a.plainObjects && we.call(Object.prototype, n[1].slice(1, -1)) && !a.allowPrototypes)
298
+ if (C += 1, !a.plainObjects && be.call(Object.prototype, n[1].slice(1, -1)) && !a.allowPrototypes)
299
299
  return;
300
300
  s.push(n[1]);
301
301
  }
@@ -317,7 +317,7 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
317
317
  charsetSentinel: typeof r.charsetSentinel == "boolean" ? r.charsetSentinel : q.charsetSentinel,
318
318
  comma: typeof r.comma == "boolean" ? r.comma : q.comma,
319
319
  decoder: typeof r.decoder == "function" ? r.decoder : q.decoder,
320
- delimiter: typeof r.delimiter == "string" || se.isRegExp(r.delimiter) ? r.delimiter : q.delimiter,
320
+ delimiter: typeof r.delimiter == "string" || ie.isRegExp(r.delimiter) ? r.delimiter : q.delimiter,
321
321
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
322
322
  depth: typeof r.depth == "number" || r.depth === !1 ? +r.depth : q.depth,
323
323
  ignoreQueryPrefix: r.ignoreQueryPrefix === !0,
@@ -333,14 +333,14 @@ var de = Object.prototype.hasOwnProperty, re = Array.isArray, X = function() {
333
333
  return e.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
334
334
  for (var a = typeof t == "string" ? $t(t, e) : t, p = e.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, c = Object.keys(a), g = 0; g < c.length; ++g) {
335
335
  var n = c[g], x = Dt(n, a[n], e);
336
- p = se.merge(p, x, e);
336
+ p = ie.merge(p, x, e);
337
337
  }
338
- return se.compact(p);
338
+ return ie.compact(p);
339
339
  };
340
- const Nt = /* @__PURE__ */ he(zt);
341
- var ce = { exports: {} };
340
+ const Nt = /* @__PURE__ */ ue(zt);
341
+ var he = { exports: {} };
342
342
  /*! https://mths.be/punycode v1.4.1 by @mathias */
343
- ce.exports;
343
+ he.exports;
344
344
  (function(t, r) {
345
345
  (function(e) {
346
346
  var a = r && !r.nodeType && r, p = t && !t.nodeType && t, c = typeof K == "object" && K;
@@ -399,7 +399,7 @@ ce.exports;
399
399
  return $(i);
400
400
  }
401
401
  function U(A) {
402
- var i, f, h, u, L, I, M, k, Q, V, E, W = [], G, J, ee, ue;
402
+ var i, f, h, u, L, I, M, k, Q, V, E, W = [], G, J, ee, le;
403
403
  for (A = F(A), G = A.length, i = b, f = 0, L = v, I = 0; I < G; ++I)
404
404
  E = A[I], E < 128 && W.push(B(E));
405
405
  for (h = u = W.length, u && W.push(d); h < G; ) {
@@ -408,9 +408,9 @@ ce.exports;
408
408
  for (J = h + 1, M - i > _((n - f) / J) && S("overflow"), f += (M - i) * J, i = M, I = 0; I < G; ++I)
409
409
  if (E = A[I], E < i && ++f > n && S("overflow"), E == i) {
410
410
  for (k = f, Q = x; V = Q <= L ? s : Q >= L + C ? C : Q - L, !(k < V); Q += x)
411
- ue = k - V, ee = x - V, W.push(
412
- B(z(V + ue % ee, 0))
413
- ), k = _(ue / ee);
411
+ le = k - V, ee = x - V, W.push(
412
+ B(z(V + le % ee, 0))
413
+ ), k = _(le / ee);
414
414
  W.push(B(z(k, 0))), L = N(f, J, h == u), f = 0, ++h;
415
415
  }
416
416
  ++f, ++i;
@@ -458,8 +458,8 @@ ce.exports;
458
458
  else
459
459
  e.punycode = g;
460
460
  })(K);
461
- })(ce, ce.exports);
462
- var Mt = ce.exports, Ut = Mt;
461
+ })(he, he.exports);
462
+ var Mt = he.exports, Ut = Mt;
463
463
  function Z() {
464
464
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
465
465
  }
@@ -480,23 +480,23 @@ var Wt = /^([a-z0-9.+-]+:)/i, Kt = /:[0-9]*$/, kt = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
480
480
  "\\",
481
481
  "^",
482
482
  "`"
483
- ].concat(Gt), be = ["'"].concat(Qt), Se = [
483
+ ].concat(Gt), _e = ["'"].concat(Qt), Se = [
484
484
  "%",
485
485
  "/",
486
486
  "?",
487
487
  ";",
488
488
  "#"
489
- ].concat(be), Pe = [
489
+ ].concat(_e), Pe = [
490
490
  "/",
491
491
  "?",
492
492
  "#"
493
493
  ], Xt = 255, He = /^[+a-z0-9A-Z_-]{0,63}$/, Vt = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Zt = {
494
494
  javascript: !0,
495
495
  "javascript:": !0
496
- }, _e = {
496
+ }, Ce = {
497
497
  javascript: !0,
498
498
  "javascript:": !0
499
- }, oe = {
499
+ }, ae = {
500
500
  http: !0,
501
501
  https: !0,
502
502
  ftp: !0,
@@ -507,7 +507,7 @@ var Wt = /^([a-z0-9.+-]+:)/i, Kt = /:[0-9]*$/, kt = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
507
507
  "ftp:": !0,
508
508
  "gopher:": !0,
509
509
  "file:": !0
510
- }, Ce = ie;
510
+ }, Oe = fe;
511
511
  function Ne(t, r, e) {
512
512
  if (t && typeof t == "object" && t instanceof Z)
513
513
  return t;
@@ -523,7 +523,7 @@ Z.prototype.parse = function(t, r, e) {
523
523
  if (n = n.trim(), !e && t.split("#").length === 1) {
524
524
  var x = kt.exec(n);
525
525
  if (x)
526
- return this.path = n, this.href = n, this.pathname = x[1], x[2] ? (this.search = x[2], r ? this.query = Ce.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : r && (this.search = "", this.query = {}), this;
526
+ return this.path = n, this.href = n, this.pathname = x[1], x[2] ? (this.search = x[2], r ? this.query = Oe.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : r && (this.search = "", this.query = {}), this;
527
527
  }
528
528
  var s = Wt.exec(n);
529
529
  if (s) {
@@ -533,9 +533,9 @@ Z.prototype.parse = function(t, r, e) {
533
533
  }
534
534
  if (e || s || n.match(/^\/\/[^@/]+@[^@/]+/)) {
535
535
  var O = n.substr(0, 2) === "//";
536
- O && !(s && _e[s]) && (n = n.substr(2), this.slashes = !0);
536
+ O && !(s && Ce[s]) && (n = n.substr(2), this.slashes = !0);
537
537
  }
538
- if (!_e[s] && (O || s && !oe[s])) {
538
+ if (!Ce[s] && (O || s && !ae[s])) {
539
539
  for (var w = -1, v = 0; v < Pe.length; v++) {
540
540
  var b = n.indexOf(Pe[v]);
541
541
  b !== -1 && (w === -1 || b < w) && (w = b);
@@ -566,8 +566,8 @@ Z.prototype.parse = function(t, r, e) {
566
566
  this.host = $ + F, this.href += this.host, j && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), n[0] !== "/" && (n = "/" + n));
567
567
  }
568
568
  if (!Zt[C])
569
- for (var v = 0, l = be.length; v < l; v++) {
570
- var D = be[v];
569
+ for (var v = 0, l = _e.length; v < l; v++) {
570
+ var D = _e[v];
571
571
  if (n.indexOf(D) !== -1) {
572
572
  var z = encodeURIComponent(D);
573
573
  z === D && (z = escape(D)), n = n.split(D).join(z);
@@ -576,7 +576,7 @@ Z.prototype.parse = function(t, r, e) {
576
576
  var N = n.indexOf("#");
577
577
  N !== -1 && (this.hash = n.substr(N), n = n.slice(0, N));
578
578
  var R = n.indexOf("?");
579
- if (R !== -1 ? (this.search = n.substr(R), this.query = n.substr(R + 1), r && (this.query = Ce.parse(this.query)), n = n.slice(0, R)) : r && (this.search = "", this.query = {}), n && (this.pathname = n), oe[C] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
579
+ if (R !== -1 ? (this.search = n.substr(R), this.query = n.substr(R + 1), r && (this.query = Oe.parse(this.query)), n = n.slice(0, R)) : r && (this.search = "", this.query = {}), n && (this.pathname = n), ae[C] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
580
580
  var F = this.pathname || "", U = this.search || "";
581
581
  this.path = F + U;
582
582
  }
@@ -586,12 +586,12 @@ Z.prototype.format = function() {
586
586
  var t = this.auth || "";
587
587
  t && (t = encodeURIComponent(t), t = t.replace(/%3A/i, ":"), t += "@");
588
588
  var r = this.protocol || "", e = this.pathname || "", a = this.hash || "", p = !1, c = "";
589
- this.host ? p = t + this.host : this.hostname && (p = t + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (p += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (c = Ce.stringify(this.query, {
589
+ this.host ? p = t + this.host : this.hostname && (p = t + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (p += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (c = Oe.stringify(this.query, {
590
590
  arrayFormat: "repeat",
591
591
  addQueryPrefix: !1
592
592
  }));
593
593
  var g = this.search || c && "?" + c || "";
594
- return r && r.substr(-1) !== ":" && (r += ":"), this.slashes || (!r || oe[r]) && p !== !1 ? (p = "//" + (p || ""), e && e.charAt(0) !== "/" && (e = "/" + e)) : p || (p = ""), a && a.charAt(0) !== "#" && (a = "#" + a), g && g.charAt(0) !== "?" && (g = "?" + g), e = e.replace(/[?#]/g, function(n) {
594
+ return r && r.substr(-1) !== ":" && (r += ":"), this.slashes || (!r || ae[r]) && p !== !1 ? (p = "//" + (p || ""), e && e.charAt(0) !== "/" && (e = "/" + e)) : p || (p = ""), a && a.charAt(0) !== "#" && (a = "#" + a), g && g.charAt(0) !== "?" && (g = "?" + g), e = e.replace(/[?#]/g, function(n) {
595
595
  return encodeURIComponent(n);
596
596
  }), g = g.replace("#", "%23"), r + p + e + g + a;
597
597
  };
@@ -614,17 +614,17 @@ Z.prototype.resolveObject = function(t) {
614
614
  var x = g[n];
615
615
  x !== "protocol" && (e[x] = t[x]);
616
616
  }
617
- return oe[e.protocol] && e.hostname && !e.pathname && (e.pathname = "/", e.path = e.pathname), e.href = e.format(), e;
617
+ return ae[e.protocol] && e.hostname && !e.pathname && (e.pathname = "/", e.path = e.pathname), e.href = e.format(), e;
618
618
  }
619
619
  if (t.protocol && t.protocol !== e.protocol) {
620
- if (!oe[t.protocol]) {
620
+ if (!ae[t.protocol]) {
621
621
  for (var s = Object.keys(t), C = 0; C < s.length; C++) {
622
622
  var O = s[C];
623
623
  e[O] = t[O];
624
624
  }
625
625
  return e.href = e.format(), e;
626
626
  }
627
- if (e.protocol = t.protocol, !t.host && !_e[t.protocol]) {
627
+ if (e.protocol = t.protocol, !t.host && !Ce[t.protocol]) {
628
628
  for (var l = (t.pathname || "").split("/"); l.length && !(t.host = l.shift()); )
629
629
  ;
630
630
  t.host || (t.host = ""), t.hostname || (t.hostname = ""), l[0] !== "" && l.unshift(""), l.length < 2 && l.unshift(""), e.pathname = l.join("/");
@@ -636,7 +636,7 @@ Z.prototype.resolveObject = function(t) {
636
636
  }
637
637
  return e.slashes = e.slashes || t.slashes, e.href = e.format(), e;
638
638
  }
639
- var b = e.pathname && e.pathname.charAt(0) === "/", d = t.host || t.pathname && t.pathname.charAt(0) === "/", m = d || b || e.host && t.pathname, j = m, o = e.pathname && e.pathname.split("/") || [], l = t.pathname && t.pathname.split("/") || [], y = e.protocol && !oe[e.protocol];
639
+ var b = e.pathname && e.pathname.charAt(0) === "/", d = t.host || t.pathname && t.pathname.charAt(0) === "/", m = d || b || e.host && t.pathname, j = m, o = e.pathname && e.pathname.split("/") || [], l = t.pathname && t.pathname.split("/") || [], y = e.protocol && !ae[e.protocol];
640
640
  if (y && (e.hostname = "", e.port = null, e.host && (o[0] === "" ? o[0] = e.host : o.unshift(e.host)), e.host = "", t.protocol && (t.hostname = null, t.port = null, t.host && (l[0] === "" ? l[0] = t.host : l.unshift(t.host)), t.host = null), m = m && (l[0] === "" || o[0] === "")), d)
641
641
  e.host = t.host || t.host === "" ? t.host : e.host, e.hostname = t.hostname || t.hostname === "" ? t.hostname : e.hostname, e.search = t.search, e.query = t.query, o = l;
642
642
  else if (l.length)
@@ -673,13 +673,13 @@ var Yt = Ne, Me = { exports: {} };
673
673
  function Jt(t) {
674
674
  throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
675
675
  }
676
- var ve = { exports: {} };
676
+ var me = { exports: {} };
677
677
  const er = {}, tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
678
678
  __proto__: null,
679
679
  default: er
680
680
  }, Symbol.toStringTag, { value: "Module" })), rr = /* @__PURE__ */ bt(tr);
681
681
  var Te;
682
- function fe() {
682
+ function ce() {
683
683
  return Te || (Te = 1, function(t, r) {
684
684
  (function(e, a) {
685
685
  t.exports = a();
@@ -1177,13 +1177,13 @@ function fe() {
1177
1177
  }(Math);
1178
1178
  return e;
1179
1179
  });
1180
- }(ve)), ve.exports;
1180
+ }(me)), me.exports;
1181
1181
  }
1182
- var me = { exports: {} }, Fe;
1182
+ var ye = { exports: {} }, Fe;
1183
1183
  function nr() {
1184
1184
  return Fe || (Fe = 1, function(t, r) {
1185
1185
  (function(e, a) {
1186
- t.exports = a(fe());
1186
+ t.exports = a(ce());
1187
1187
  })(K, function(e) {
1188
1188
  return function(a) {
1189
1189
  var p = e, c = p.lib, g = c.WordArray, n = c.Hasher, x = p.algo, s = [], C = [];
@@ -1229,13 +1229,13 @@ function nr() {
1229
1229
  p.SHA256 = n._createHelper(w), p.HmacSHA256 = n._createHmacHelper(w);
1230
1230
  }(Math), e.SHA256;
1231
1231
  });
1232
- }(me)), me.exports;
1232
+ }(ye)), ye.exports;
1233
1233
  }
1234
- var ye = { exports: {} }, Ie;
1234
+ var ge = { exports: {} }, Ie;
1235
1235
  function or() {
1236
1236
  return Ie || (Ie = 1, function(t, r) {
1237
1237
  (function(e, a) {
1238
- t.exports = a(fe());
1238
+ t.exports = a(ce());
1239
1239
  })(K, function(e) {
1240
1240
  (function() {
1241
1241
  var a = e, p = a.lib, c = p.Base, g = a.enc, n = g.Utf8, x = a.algo;
@@ -1307,21 +1307,21 @@ function or() {
1307
1307
  });
1308
1308
  })();
1309
1309
  });
1310
- }(ye)), ye.exports;
1310
+ }(ge)), ge.exports;
1311
1311
  }
1312
1312
  (function(t, r) {
1313
1313
  (function(e, a, p) {
1314
- t.exports = a(fe(), nr(), or());
1314
+ t.exports = a(ce(), nr(), or());
1315
1315
  })(K, function(e) {
1316
1316
  return e.HmacSHA256;
1317
1317
  });
1318
1318
  })(Me);
1319
1319
  var ar = Me.exports;
1320
- const sr = /* @__PURE__ */ he(ar);
1320
+ const sr = /* @__PURE__ */ ue(ar);
1321
1321
  var Ue = { exports: {} };
1322
1322
  (function(t, r) {
1323
1323
  (function(e, a) {
1324
- t.exports = a(fe());
1324
+ t.exports = a(ce());
1325
1325
  })(K, function(e) {
1326
1326
  return function() {
1327
1327
  var a = e, p = a.lib, c = p.WordArray, g = a.enc;
@@ -1392,11 +1392,11 @@ var Ue = { exports: {} };
1392
1392
  });
1393
1393
  })(Ue);
1394
1394
  var ir = Ue.exports;
1395
- const We = /* @__PURE__ */ he(ir);
1395
+ const We = /* @__PURE__ */ ue(ir);
1396
1396
  var Ke = { exports: {} };
1397
1397
  (function(t, r) {
1398
1398
  (function(e, a) {
1399
- t.exports = a(fe());
1399
+ t.exports = a(ce());
1400
1400
  })(K, function(e) {
1401
1401
  return function(a) {
1402
1402
  var p = e, c = p.lib, g = c.WordArray, n = c.Hasher, x = p.algo, s = [];
@@ -1458,14 +1458,14 @@ var Ke = { exports: {} };
1458
1458
  });
1459
1459
  })(Ke);
1460
1460
  var fr = Ke.exports;
1461
- const cr = /* @__PURE__ */ he(fr), hr = (t, r) => We.stringify(sr(t, r)), ur = (t) => ae(t) ? (
1461
+ const cr = /* @__PURE__ */ ue(fr), hr = (t, r) => We.stringify(sr(t, r)), ur = (t) => se(t) ? (
1462
1462
  //createHash("md5").update(data, "utf-8").digest("base64")
1463
1463
  ""
1464
1464
  ) : We.stringify(cr(t)), qe = { sign: hr, md5Content: ur }, lr = (t) => {
1465
1465
  const r = Le(Object.keys(t));
1466
1466
  let e = {};
1467
1467
  return De(r, (a) => {
1468
- ae(t[a]) ? e[a] = null : Ge(t[a]) ? e[a] = t[a][0] : e[a] = t[a];
1468
+ se(t[a]) ? e[a] = null : Ge(t[a]) ? e[a] = t[a][0] : e[a] = t[a];
1469
1469
  }), e;
1470
1470
  }, pr = {
1471
1471
  map: De,
@@ -1512,7 +1512,7 @@ const cr = /* @__PURE__ */ he(fr), hr = (t, r) => We.stringify(sr(t, r)), ur = (
1512
1512
  let m = t.body;
1513
1513
  if (Je(m)) {
1514
1514
  const j = Nt(m);
1515
- ae(w) ? w = j : w = Object.assign({}, w, j);
1515
+ se(w) ? w = j : w = Object.assign({}, w, j);
1516
1516
  }
1517
1517
  }
1518
1518
  const v = xt(s.pathname, gt(lr(w))), b = n["Content-Type"] ? n["Content-Type"] : "";
@@ -1537,7 +1537,7 @@ ${Ee(n).transformHeader}${decodeURIComponent(v)}`;
1537
1537
  };
1538
1538
  class gr {
1539
1539
  constructor(r) {
1540
- this.config = r, this.env = xe, this.js = mt[this.env.code], this.userInfo = null;
1540
+ this.config = r, this.env = we, this.js = mt[this.env.code], this.userInfo = null;
1541
1541
  const { gc_rsa: e } = r;
1542
1542
  console.log("网关配置:", e), e && yr(e);
1543
1543
  }
package/libs/main.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(G,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios")):typeof define=="function"&&define.amd?define(["exports","lodash-es","dingtalk-jsapi","qs","axios"],H):(G=typeof globalThis<"u"?globalThis:G||self,H(G.Main={},G._,G.dd$1,G.qs,G.axios))})(this,function(G,H,ze,ne,Be){"use strict";function Ne(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const oe=Ne(ze),le=window.navigator.userAgent.toLowerCase();let pe={code:"",name:"未知"};function Ue(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const We=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(le)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(le)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(le)}],ke=t=>t.value,Ae=H.find(We,ke);Ae?pe=Ae:Ue()&&(pe={code:"h5",name:"H5"});const de=pe,Ke=t=>t=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":t=="prod"?"https://smart.ihotel.cn/guardian/gw/v1/platform-gcding":t||"https://test.ihotel.cn/gw/v1/platform-gcding",Ge=ne.parse(location.search,{ignoreQueryPrefix:!0}),ve=H.get(Ge,"corpId"),Qe={dd:{login:async({appCode:t,apiPrefix:r,map:e={dataPath:"data"}})=>{const a=Ke(r);return new Promise(async p=>{if(ve){const{code:c}=await oe.getAuthCode({corpId:ve}),g=await Be.post(`${a}/api/auth/queryAuthNoExternalCompatible`,{appCode:t,authCode:c,corpId:ve}),n=H.get(g,e.dataPath);n&&n.result===0?p({userInfo:n.retVal,res:g}):(oe.showToast({type:"fail",duration:2e3,content:n.msg,complete:()=>{}}),p({res:g}))}else oe.showToast({type:"fail",duration:2e3,content:"未配置参数:corpId",complete:()=>{}})})},dd:oe},h5:{login:()=>new Promise(async t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})},wxmp:{login:()=>new Promise(t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})},weixin:{login:()=>new Promise(t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})}},Xe={setNavigationBarTitle:t=>{de.code==="dd"?(console.log("钉钉对象",oe),oe.setNavigationTitle(t)):de.code==="weixin"?wx.setNavigationBarTitle(t):document.title=t.title}},Ve=t=>{let r="";return H.mapKeys(t,(e,a)=>{a&&(H.isEmpty(e)?r+="&"+a:r+="&"+a+"="+e)}),r},Ze=(t,r)=>H.isEmpty(r)?t:(H.includes(t,"?")?t:t+"?")+r.substring(1),Ye=(t,r)=>H.isEmpty(r)?t:`${t}?${ne.stringify(r)}`;var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function he(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Je(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var p=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,p.get?p:{enumerable:!0,get:function(){return t[a]}})}),e}var me=Object.prototype.hasOwnProperty,ae=Array.isArray,V=function(){for(var t=[],r=0;r<256;++r)t.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return t}(),et=function(r){for(;r.length>1;){var e=r.pop(),a=e.obj[e.prop];if(ae(a)){for(var p=[],c=0;c<a.length;++c)typeof a[c]<"u"&&p.push(a[c]);e.obj[e.prop]=p}}},je=function(r,e){for(var a=e&&e.plainObjects?Object.create(null):{},p=0;p<r.length;++p)typeof r[p]<"u"&&(a[p]=r[p]);return a},tt=function t(r,e,a){if(!e)return r;if(typeof e!="object"){if(ae(r))r.push(e);else if(r&&typeof r=="object")(a&&(a.plainObjects||a.allowPrototypes)||!me.call(Object.prototype,e))&&(r[e]=!0);else return[r,e];return r}if(!r||typeof r!="object")return[r].concat(e);var p=r;return ae(r)&&!ae(e)&&(p=je(r,a)),ae(r)&&ae(e)?(e.forEach(function(c,g){if(me.call(r,g)){var n=r[g];n&&typeof n=="object"&&c&&typeof c=="object"?r[g]=t(n,c,a):r.push(c)}else r[g]=c}),r):Object.keys(e).reduce(function(c,g){var n=e[g];return me.call(c,g)?c[g]=t(c[g],n,a):c[g]=n,c},p)},rt=function(r,e){return Object.keys(e).reduce(function(a,p){return a[p]=e[p],a},r)},nt=function(t,r,e){var a=t.replace(/\+/g," ");if(e==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},ot=function(r,e,a){if(r.length===0)return r;var p=r;if(typeof r=="symbol"?p=Symbol.prototype.toString.call(r):typeof r!="string"&&(p=String(r)),a==="iso-8859-1")return escape(p).replace(/%u[0-9a-f]{4}/gi,function(x){return"%26%23"+parseInt(x.slice(2),16)+"%3B"});for(var c="",g=0;g<p.length;++g){var n=p.charCodeAt(g);if(n===45||n===46||n===95||n===126||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){c+=p.charAt(g);continue}if(n<128){c=c+V[n];continue}if(n<2048){c=c+(V[192|n>>6]+V[128|n&63]);continue}if(n<55296||n>=57344){c=c+(V[224|n>>12]+V[128|n>>6&63]+V[128|n&63]);continue}g+=1,n=65536+((n&1023)<<10|p.charCodeAt(g)&1023),c+=V[240|n>>18]+V[128|n>>12&63]+V[128|n>>6&63]+V[128|n&63]}return c},at=function(r){for(var e=[{obj:{o:r},prop:"o"}],a=[],p=0;p<e.length;++p)for(var c=e[p],g=c.obj[c.prop],n=Object.keys(g),x=0;x<n.length;++x){var s=n[x],C=g[s];typeof C=="object"&&C!==null&&a.indexOf(C)===-1&&(e.push({obj:g,prop:s}),a.push(C))}return et(e),r},st=function(r){return Object.prototype.toString.call(r)==="[object RegExp]"},it=function(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))},ft=function(r,e){return[].concat(r,e)},ct={arrayToObject:je,assign:rt,combine:ft,compact:at,decode:nt,encode:ot,isBuffer:it,isRegExp:st,merge:tt},fe=ct,ye=Object.prototype.hasOwnProperty,ht=Array.isArray,I={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:fe.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ut=function(t){return t.replace(/&#(\d+);/g,function(r,e){return String.fromCharCode(parseInt(e,10))})},lt="utf8=%26%2310003%3B",pt="utf8=%E2%9C%93",dt=function(r,e){var a={},p=e.ignoreQueryPrefix?r.replace(/^\?/,""):r,c=e.parameterLimit===1/0?void 0:e.parameterLimit,g=p.split(e.delimiter,c),n=-1,x,s=e.charset;if(e.charsetSentinel)for(x=0;x<g.length;++x)g[x].indexOf("utf8=")===0&&(g[x]===pt?s="utf-8":g[x]===lt&&(s="iso-8859-1"),n=x,x=g.length);for(x=0;x<g.length;++x)if(x!==n){var C=g[x],O=C.indexOf("]="),w=O===-1?C.indexOf("="):O+1,v,b;w===-1?(v=e.decoder(C,I.decoder,s,"key"),b=e.strictNullHandling?null:""):(v=e.decoder(C.slice(0,w),I.decoder,s,"key"),b=e.decoder(C.slice(w+1),I.decoder,s,"value")),b&&e.interpretNumericEntities&&s==="iso-8859-1"&&(b=ut(b)),b&&typeof b=="string"&&e.comma&&b.indexOf(",")>-1&&(b=b.split(",")),C.indexOf("[]=")>-1&&(b=ht(b)?[b]:b),ye.call(a,v)?a[v]=fe.combine(a[v],b):a[v]=b}return a},vt=function(t,r,e){for(var a=r,p=t.length-1;p>=0;--p){var c,g=t[p];if(g==="[]"&&e.parseArrays)c=[].concat(a);else{c=e.plainObjects?Object.create(null):{};var n=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,x=parseInt(n,10);!e.parseArrays&&n===""?c={0:a}:!isNaN(x)&&g!==n&&String(x)===n&&x>=0&&e.parseArrays&&x<=e.arrayLimit?(c=[],c[x]=a):c[n]=a}a=c}return a},mt=function(r,e,a){if(r){var p=a.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/,g=/(\[[^[\]]*])/g,n=a.depth>0&&c.exec(p),x=n?p.slice(0,n.index):p,s=[];if(x){if(!a.plainObjects&&ye.call(Object.prototype,x)&&!a.allowPrototypes)return;s.push(x)}for(var C=0;a.depth>0&&(n=g.exec(p))!==null&&C<a.depth;){if(C+=1,!a.plainObjects&&ye.call(Object.prototype,n[1].slice(1,-1))&&!a.allowPrototypes)return;s.push(n[1])}return n&&s.push("["+p.slice(n.index)+"]"),vt(s,e,a)}},yt=function(r){if(!r)return I;if(r.decoder!==null&&r.decoder!==void 0&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var e=typeof r.charset>"u"?I.charset:r.charset;return{allowDots:typeof r.allowDots>"u"?I.allowDots:!!r.allowDots,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:I.allowPrototypes,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:I.arrayLimit,charset:e,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:I.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:I.comma,decoder:typeof r.decoder=="function"?r.decoder:I.decoder,delimiter:typeof r.delimiter=="string"||fe.isRegExp(r.delimiter)?r.delimiter:I.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:I.depth,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:I.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:I.plainObjects,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:I.strictNullHandling}},gt=function(t,r){var e=yt(r);if(t===""||t===null||typeof t>"u")return e.plainObjects?Object.create(null):{};for(var a=typeof t=="string"?dt(t,e):t,p=e.plainObjects?Object.create(null):{},c=Object.keys(a),g=0;g<c.length;++g){var n=c[g],x=mt(n,a[n],e);p=fe.merge(p,x,e)}return fe.compact(p)};const xt=he(gt);var ue={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ue.exports,function(t,r){(function(e){var a=r&&!r.nodeType&&r,p=t&&!t.nodeType&&t,c=typeof W=="object"&&W;(c.global===c||c.window===c||c.self===c)&&(e=c);var g,n=2147483647,x=36,s=1,C=26,O=38,w=700,v=72,b=128,d="-",m=/^xn--/,j=/[^\x20-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=x-s,_=Math.floor,B=String.fromCharCode,P;function S(A){throw new RangeError(l[A])}function T(A,i){for(var f=A.length,h=[];f--;)h[f]=i(A[f]);return h}function E(A,i){var f=A.split("@"),h="";f.length>1&&(h=f[0]+"@",A=f[1]),A=A.replace(o,".");var u=A.split("."),L=T(u,i).join(".");return h+L}function F(A){for(var i=[],f=0,h=A.length,u,L;f<h;)u=A.charCodeAt(f++),u>=55296&&u<=56319&&f<h?(L=A.charCodeAt(f++),(L&64512)==56320?i.push(((u&1023)<<10)+(L&1023)+65536):(i.push(u),f--)):i.push(u);return i}function D(A){return T(A,function(i){var f="";return i>65535&&(i-=65536,f+=B(i>>>10&1023|55296),i=56320|i&1023),f+=B(i),f}).join("")}function R(A){return A-48<10?A-22:A-65<26?A-65:A-97<26?A-97:x}function z(A,i){return A+22+75*(A<26)-((i!=0)<<5)}function N(A,i,f){var h=0;for(A=f?_(A/w):A>>1,A+=_(A/i);A>y*C>>1;h+=x)A=_(A/y);return _(h+(y+1)*A/(A+O))}function M(A){var i=[],f=A.length,h,u=0,L=b,q=v,U,Q,Z,J,$,K,X,te,re;for(U=A.lastIndexOf(d),U<0&&(U=0),Q=0;Q<U;++Q)A.charCodeAt(Q)>=128&&S("not-basic"),i.push(A.charCodeAt(Q));for(Z=U>0?U+1:0;Z<f;){for(J=u,$=1,K=x;Z>=f&&S("invalid-input"),X=R(A.charCodeAt(Z++)),(X>=x||X>_((n-u)/$))&&S("overflow"),u+=X*$,te=K<=q?s:K>=q+C?C:K-q,!(X<te);K+=x)re=x-te,$>_(n/re)&&S("overflow"),$*=re;h=i.length+1,q=N(u-J,h,J==0),_(u/h)>n-L&&S("overflow"),L+=_(u/h),u%=h,i.splice(u++,0,L)}return D(i)}function k(A){var i,f,h,u,L,q,U,Q,Z,J,$,K=[],X,te,re,Oe;for(A=F(A),X=A.length,i=b,f=0,L=v,q=0;q<X;++q)$=A[q],$<128&&K.push(B($));for(h=u=K.length,u&&K.push(d);h<X;){for(U=n,q=0;q<X;++q)$=A[q],$>=i&&$<U&&(U=$);for(te=h+1,U-i>_((n-f)/te)&&S("overflow"),f+=(U-i)*te,i=U,q=0;q<X;++q)if($=A[q],$<i&&++f>n&&S("overflow"),$==i){for(Q=f,Z=x;J=Z<=L?s:Z>=L+C?C:Z-L,!(Q<J);Z+=x)Oe=Q-J,re=x-J,K.push(B(z(J+Oe%re,0))),Q=_(Oe/re);K.push(B(z(Q,0))),L=N(f,te,h==u),f=0,++h}++f,++i}return K.join("")}function ee(A){return E(A,function(i){return m.test(i)?M(i.slice(4).toLowerCase()):i})}function ie(A){return E(A,function(i){return j.test(i)?"xn--"+k(i):i})}if(g={version:"1.4.1",ucs2:{decode:F,encode:D},decode:M,encode:k,toASCII:ie,toUnicode:ee},a&&p)if(t.exports==a)p.exports=g;else for(P in g)g.hasOwnProperty(P)&&(a[P]=g[P]);else e.punycode=g})(W)}(ue,ue.exports);var wt=ue.exports,bt=wt;function Y(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _t=/^([a-z0-9.+-]+:)/i,Ct=/:[0-9]*$/,Ot=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Bt=["<",">",'"',"`"," ","\r",`
2
- `," "],At=["{","}","|","\\","^","`"].concat(Bt),ge=["'"].concat(At),Se=["%","/","?",";","#"].concat(ge),Pe=["/","?","#"],jt=255,Te=/^[+a-z0-9A-Z_-]{0,63}$/,St=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pt={javascript:!0,"javascript:":!0},xe={javascript:!0,"javascript:":!0},se={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},we=ne;function He(t,r,e){if(t&&typeof t=="object"&&t instanceof Y)return t;var a=new Y;return a.parse(t,r,e),a}Y.prototype.parse=function(t,r,e){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var a=t.indexOf("?"),p=a!==-1&&a<t.indexOf("#")?"?":"#",c=t.split(p),g=/\\/g;c[0]=c[0].replace(g,"/"),t=c.join(p);var n=t;if(n=n.trim(),!e&&t.split("#").length===1){var x=Ot.exec(n);if(x)return this.path=n,this.href=n,this.pathname=x[1],x[2]?(this.search=x[2],r?this.query=we.parse(this.search.substr(1)):this.query=this.search.substr(1)):r&&(this.search="",this.query={}),this}var s=_t.exec(n);if(s){s=s[0];var C=s.toLowerCase();this.protocol=C,n=n.substr(s.length)}if(e||s||n.match(/^\/\/[^@/]+@[^@/]+/)){var O=n.substr(0,2)==="//";O&&!(s&&xe[s])&&(n=n.substr(2),this.slashes=!0)}if(!xe[s]&&(O||s&&!se[s])){for(var w=-1,v=0;v<Pe.length;v++){var b=n.indexOf(Pe[v]);b!==-1&&(w===-1||b<w)&&(w=b)}var d,m;w===-1?m=n.lastIndexOf("@"):m=n.lastIndexOf("@",w),m!==-1&&(d=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(d)),w=-1;for(var v=0;v<Se.length;v++){var b=n.indexOf(Se[v]);b!==-1&&(w===-1||b<w)&&(w=b)}w===-1&&(w=n.length),this.host=n.slice(0,w),n=n.slice(w),this.parseHost(),this.hostname=this.hostname||"";var j=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!j)for(var o=this.hostname.split(/\./),v=0,l=o.length;v<l;v++){var y=o[v];if(y&&!y.match(Te)){for(var _="",B=0,P=y.length;B<P;B++)y.charCodeAt(B)>127?_+="x":_+=y[B];if(!_.match(Te)){var S=o.slice(0,v),T=o.slice(v+1),E=y.match(St);E&&(S.push(E[1]),T.unshift(E[2])),T.length&&(n="/"+T.join(".")+n),this.hostname=S.join(".");break}}}this.hostname.length>jt?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=bt.toASCII(this.hostname));var F=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),n[0]!=="/"&&(n="/"+n))}if(!Pt[C])for(var v=0,l=ge.length;v<l;v++){var R=ge[v];if(n.indexOf(R)!==-1){var z=encodeURIComponent(R);z===R&&(z=escape(R)),n=n.split(R).join(z)}}var N=n.indexOf("#");N!==-1&&(this.hash=n.substr(N),n=n.slice(0,N));var M=n.indexOf("?");if(M!==-1?(this.search=n.substr(M),this.query=n.substr(M+1),r&&(this.query=we.parse(this.query)),n=n.slice(0,M)):r&&(this.search="",this.query={}),n&&(this.pathname=n),se[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",k=this.search||"";this.path=F+k}return this.href=this.format(),this},Y.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var r=this.protocol||"",e=this.pathname||"",a=this.hash||"",p=!1,c="";this.host?p=t+this.host:this.hostname&&(p=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(c=we.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var g=this.search||c&&"?"+c||"";return r&&r.substr(-1)!==":"&&(r+=":"),this.slashes||(!r||se[r])&&p!==!1?(p="//"+(p||""),e&&e.charAt(0)!=="/"&&(e="/"+e)):p||(p=""),a&&a.charAt(0)!=="#"&&(a="#"+a),g&&g.charAt(0)!=="?"&&(g="?"+g),e=e.replace(/[?#]/g,function(n){return encodeURIComponent(n)}),g=g.replace("#","%23"),r+p+e+g+a},Y.prototype.resolve=function(t){return this.resolveObject(He(t,!1,!0)).format()},Y.prototype.resolveObject=function(t){if(typeof t=="string"){var r=new Y;r.parse(t,!1,!0),t=r}for(var e=new Y,a=Object.keys(this),p=0;p<a.length;p++){var c=a[p];e[c]=this[c]}if(e.hash=t.hash,t.href==="")return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var g=Object.keys(t),n=0;n<g.length;n++){var x=g[n];x!=="protocol"&&(e[x]=t[x])}return se[e.protocol]&&e.hostname&&!e.pathname&&(e.pathname="/",e.path=e.pathname),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!se[t.protocol]){for(var s=Object.keys(t),C=0;C<s.length;C++){var O=s[C];e[O]=t[O]}return e.href=e.format(),e}if(e.protocol=t.protocol,!t.host&&!xe[t.protocol]){for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),l[0]!==""&&l.unshift(""),l.length<2&&l.unshift(""),e.pathname=l.join("/")}else e.pathname=t.pathname;if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var w=e.pathname||"",v=e.search||"";e.path=w+v}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var b=e.pathname&&e.pathname.charAt(0)==="/",d=t.host||t.pathname&&t.pathname.charAt(0)==="/",m=d||b||e.host&&t.pathname,j=m,o=e.pathname&&e.pathname.split("/")||[],l=t.pathname&&t.pathname.split("/")||[],y=e.protocol&&!se[e.protocol];if(y&&(e.hostname="",e.port=null,e.host&&(o[0]===""?o[0]=e.host:o.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(l[0]===""?l[0]=t.host:l.unshift(t.host)),t.host=null),m=m&&(l[0]===""||o[0]==="")),d)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,o=l;else if(l.length)o||(o=[]),o.pop(),o=o.concat(l),e.search=t.search,e.query=t.query;else if(t.search!=null){if(y){e.host=o.shift(),e.hostname=e.host;var _=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;_&&(e.auth=_.shift(),e.hostname=_.shift(),e.host=e.hostname)}return e.search=t.search,e.query=t.query,(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!o.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var B=o.slice(-1)[0],P=(e.host||t.host||o.length>1)&&(B==="."||B==="..")||B==="",S=0,T=o.length;T>=0;T--)B=o[T],B==="."?o.splice(T,1):B===".."?(o.splice(T,1),S++):S&&(o.splice(T,1),S--);if(!m&&!j)for(;S--;S)o.unshift("..");m&&o[0]!==""&&(!o[0]||o[0].charAt(0)!=="/")&&o.unshift(""),P&&o.join("/").substr(-1)!=="/"&&o.push("");var E=o[0]===""||o[0]&&o[0].charAt(0)==="/";if(y){e.hostname=E?"":o.length?o.shift():"",e.host=e.hostname;var _=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;_&&(e.auth=_.shift(),e.hostname=_.shift(),e.host=e.hostname)}return m=m||e.host&&o.length,m&&!E&&o.unshift(""),o.length>0?e.pathname=o.join("/"):(e.pathname=null,e.path=null),(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Y.prototype.parseHost=function(){var t=this.host,r=Ct.exec(t);r&&(r=r[0],r!==":"&&(this.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(this.hostname=t)};var Tt=He,Ee={exports:{}};function Ht(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var be={exports:{}};const Et=Je(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fe;function ce(){return Fe||(Fe=1,function(t,r){(function(e,a){t.exports=a()})(W,function(){var e=e||function(a,p){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof W<"u"&&W.crypto&&(c=W.crypto),!c&&typeof Ht=="function")try{c=Et}catch{}var g=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function o(){}return function(l){var y;return o.prototype=l,y=new o,o.prototype=null,y}}(),x={},s=x.lib={},C=s.Base=function(){return{extend:function(o){var l=n(this);return o&&l.mixIn(o),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var l in o)o.hasOwnProperty(l)&&(this[l]=o[l]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),O=s.WordArray=C.extend({init:function(o,l){o=this.words=o||[],l!=p?this.sigBytes=l:this.sigBytes=o.length*4},toString:function(o){return(o||v).stringify(this)},concat:function(o){var l=this.words,y=o.words,_=this.sigBytes,B=o.sigBytes;if(this.clamp(),_%4)for(var P=0;P<B;P++){var S=y[P>>>2]>>>24-P%4*8&255;l[_+P>>>2]|=S<<24-(_+P)%4*8}else for(var T=0;T<B;T+=4)l[_+T>>>2]=y[T>>>2];return this.sigBytes+=B,this},clamp:function(){var o=this.words,l=this.sigBytes;o[l>>>2]&=4294967295<<32-l%4*8,o.length=a.ceil(l/4)},clone:function(){var o=C.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var l=[],y=0;y<o;y+=4)l.push(g());return new O.init(l,o)}}),w=x.enc={},v=w.Hex={stringify:function(o){for(var l=o.words,y=o.sigBytes,_=[],B=0;B<y;B++){var P=l[B>>>2]>>>24-B%4*8&255;_.push((P>>>4).toString(16)),_.push((P&15).toString(16))}return _.join("")},parse:function(o){for(var l=o.length,y=[],_=0;_<l;_+=2)y[_>>>3]|=parseInt(o.substr(_,2),16)<<24-_%8*4;return new O.init(y,l/2)}},b=w.Latin1={stringify:function(o){for(var l=o.words,y=o.sigBytes,_=[],B=0;B<y;B++){var P=l[B>>>2]>>>24-B%4*8&255;_.push(String.fromCharCode(P))}return _.join("")},parse:function(o){for(var l=o.length,y=[],_=0;_<l;_++)y[_>>>2]|=(o.charCodeAt(_)&255)<<24-_%4*8;return new O.init(y,l)}},d=w.Utf8={stringify:function(o){try{return decodeURIComponent(escape(b.stringify(o)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(o){return b.parse(unescape(encodeURIComponent(o)))}},m=s.BufferedBlockAlgorithm=C.extend({reset:function(){this._data=new O.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=d.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var l,y=this._data,_=y.words,B=y.sigBytes,P=this.blockSize,S=P*4,T=B/S;o?T=a.ceil(T):T=a.max((T|0)-this._minBufferSize,0);var E=T*P,F=a.min(E*4,B);if(E){for(var D=0;D<E;D+=P)this._doProcessBlock(_,D);l=_.splice(0,E),y.sigBytes-=F}return new O.init(l,F)},clone:function(){var o=C.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0});s.Hasher=m.extend({cfg:C.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(o){return function(l,y){return new o.init(y).finalize(l)}},_createHmacHelper:function(o){return function(l,y){return new j.HMAC.init(o,y).finalize(l)}}});var j=x.algo={};return x}(Math);return e})}(be)),be.exports}var _e={exports:{}},Ie;function Ft(){return Ie||(Ie=1,function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(a){var p=e,c=p.lib,g=c.WordArray,n=c.Hasher,x=p.algo,s=[],C=[];(function(){function v(j){for(var o=a.sqrt(j),l=2;l<=o;l++)if(!(j%l))return!1;return!0}function b(j){return(j-(j|0))*4294967296|0}for(var d=2,m=0;m<64;)v(d)&&(m<8&&(s[m]=b(a.pow(d,1/2))),C[m]=b(a.pow(d,1/3)),m++),d++})();var O=[],w=x.SHA256=n.extend({_doReset:function(){this._hash=new g.init(s.slice(0))},_doProcessBlock:function(v,b){for(var d=this._hash.words,m=d[0],j=d[1],o=d[2],l=d[3],y=d[4],_=d[5],B=d[6],P=d[7],S=0;S<64;S++){if(S<16)O[S]=v[b+S]|0;else{var T=O[S-15],E=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,F=O[S-2],D=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;O[S]=E+O[S-7]+D+O[S-16]}var R=y&_^~y&B,z=m&j^m&o^j&o,N=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),M=(y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25),k=P+M+R+C[S]+O[S],ee=N+z;P=B,B=_,_=y,y=l+k|0,l=o,o=j,j=m,m=k+ee|0}d[0]=d[0]+m|0,d[1]=d[1]+j|0,d[2]=d[2]+o|0,d[3]=d[3]+l|0,d[4]=d[4]+y|0,d[5]=d[5]+_|0,d[6]=d[6]+B|0,d[7]=d[7]+P|0},_doFinalize:function(){var v=this._data,b=v.words,d=this._nDataBytes*8,m=v.sigBytes*8;return b[m>>>5]|=128<<24-m%32,b[(m+64>>>9<<4)+14]=a.floor(d/4294967296),b[(m+64>>>9<<4)+15]=d,v.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var v=n.clone.call(this);return v._hash=this._hash.clone(),v}});p.SHA256=n._createHelper(w),p.HmacSHA256=n._createHmacHelper(w)}(Math),e.SHA256})}(_e)),_e.exports}var Ce={exports:{}},qe;function It(){return qe||(qe=1,function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){(function(){var a=e,p=a.lib,c=p.Base,g=a.enc,n=g.Utf8,x=a.algo;x.HMAC=c.extend({init:function(s,C){s=this._hasher=new s.init,typeof C=="string"&&(C=n.parse(C));var O=s.blockSize,w=O*4;C.sigBytes>w&&(C=s.finalize(C)),C.clamp();for(var v=this._oKey=C.clone(),b=this._iKey=C.clone(),d=v.words,m=b.words,j=0;j<O;j++)d[j]^=1549556828,m[j]^=909522486;v.sigBytes=b.sigBytes=w,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var C=this._hasher,O=C.finalize(s);C.reset();var w=C.finalize(this._oKey.clone().concat(O));return w}})})()})}(Ce)),Ce.exports}(function(t,r){(function(e,a,p){t.exports=a(ce(),Ft(),It())})(W,function(e){return e.HmacSHA256})})(Ee);var qt=Ee.exports;const $t=he(qt);var $e={exports:{}};(function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(){var a=e,p=a.lib,c=p.WordArray,g=a.enc;g.Base64={stringify:function(x){var s=x.words,C=x.sigBytes,O=this._map;x.clamp();for(var w=[],v=0;v<C;v+=3)for(var b=s[v>>>2]>>>24-v%4*8&255,d=s[v+1>>>2]>>>24-(v+1)%4*8&255,m=s[v+2>>>2]>>>24-(v+2)%4*8&255,j=b<<16|d<<8|m,o=0;o<4&&v+o*.75<C;o++)w.push(O.charAt(j>>>6*(3-o)&63));var l=O.charAt(64);if(l)for(;w.length%4;)w.push(l);return w.join("")},parse:function(x){var s=x.length,C=this._map,O=this._reverseMap;if(!O){O=this._reverseMap=[];for(var w=0;w<C.length;w++)O[C.charCodeAt(w)]=w}var v=C.charAt(64);if(v){var b=x.indexOf(v);b!==-1&&(s=b)}return n(x,s,O)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function n(x,s,C){for(var O=[],w=0,v=0;v<s;v++)if(v%4){var b=C[x.charCodeAt(v-1)]<<v%4*2,d=C[x.charCodeAt(v)]>>>6-v%4*2,m=b|d;O[w>>>2]|=m<<24-w%4*8,w++}return c.create(O,w)}}(),e.enc.Base64})})($e);var Dt=$e.exports;const De=he(Dt);var Le={exports:{}};(function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(a){var p=e,c=p.lib,g=c.WordArray,n=c.Hasher,x=p.algo,s=[];(function(){for(var d=0;d<64;d++)s[d]=a.abs(a.sin(d+1))*4294967296|0})();var C=x.MD5=n.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(d,m){for(var j=0;j<16;j++){var o=m+j,l=d[o];d[o]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var y=this._hash.words,_=d[m+0],B=d[m+1],P=d[m+2],S=d[m+3],T=d[m+4],E=d[m+5],F=d[m+6],D=d[m+7],R=d[m+8],z=d[m+9],N=d[m+10],M=d[m+11],k=d[m+12],ee=d[m+13],ie=d[m+14],A=d[m+15],i=y[0],f=y[1],h=y[2],u=y[3];i=O(i,f,h,u,_,7,s[0]),u=O(u,i,f,h,B,12,s[1]),h=O(h,u,i,f,P,17,s[2]),f=O(f,h,u,i,S,22,s[3]),i=O(i,f,h,u,T,7,s[4]),u=O(u,i,f,h,E,12,s[5]),h=O(h,u,i,f,F,17,s[6]),f=O(f,h,u,i,D,22,s[7]),i=O(i,f,h,u,R,7,s[8]),u=O(u,i,f,h,z,12,s[9]),h=O(h,u,i,f,N,17,s[10]),f=O(f,h,u,i,M,22,s[11]),i=O(i,f,h,u,k,7,s[12]),u=O(u,i,f,h,ee,12,s[13]),h=O(h,u,i,f,ie,17,s[14]),f=O(f,h,u,i,A,22,s[15]),i=w(i,f,h,u,B,5,s[16]),u=w(u,i,f,h,F,9,s[17]),h=w(h,u,i,f,M,14,s[18]),f=w(f,h,u,i,_,20,s[19]),i=w(i,f,h,u,E,5,s[20]),u=w(u,i,f,h,N,9,s[21]),h=w(h,u,i,f,A,14,s[22]),f=w(f,h,u,i,T,20,s[23]),i=w(i,f,h,u,z,5,s[24]),u=w(u,i,f,h,ie,9,s[25]),h=w(h,u,i,f,S,14,s[26]),f=w(f,h,u,i,R,20,s[27]),i=w(i,f,h,u,ee,5,s[28]),u=w(u,i,f,h,P,9,s[29]),h=w(h,u,i,f,D,14,s[30]),f=w(f,h,u,i,k,20,s[31]),i=v(i,f,h,u,E,4,s[32]),u=v(u,i,f,h,R,11,s[33]),h=v(h,u,i,f,M,16,s[34]),f=v(f,h,u,i,ie,23,s[35]),i=v(i,f,h,u,B,4,s[36]),u=v(u,i,f,h,T,11,s[37]),h=v(h,u,i,f,D,16,s[38]),f=v(f,h,u,i,N,23,s[39]),i=v(i,f,h,u,ee,4,s[40]),u=v(u,i,f,h,_,11,s[41]),h=v(h,u,i,f,S,16,s[42]),f=v(f,h,u,i,F,23,s[43]),i=v(i,f,h,u,z,4,s[44]),u=v(u,i,f,h,k,11,s[45]),h=v(h,u,i,f,A,16,s[46]),f=v(f,h,u,i,P,23,s[47]),i=b(i,f,h,u,_,6,s[48]),u=b(u,i,f,h,D,10,s[49]),h=b(h,u,i,f,ie,15,s[50]),f=b(f,h,u,i,E,21,s[51]),i=b(i,f,h,u,k,6,s[52]),u=b(u,i,f,h,S,10,s[53]),h=b(h,u,i,f,N,15,s[54]),f=b(f,h,u,i,B,21,s[55]),i=b(i,f,h,u,R,6,s[56]),u=b(u,i,f,h,A,10,s[57]),h=b(h,u,i,f,F,15,s[58]),f=b(f,h,u,i,ee,21,s[59]),i=b(i,f,h,u,T,6,s[60]),u=b(u,i,f,h,M,10,s[61]),h=b(h,u,i,f,P,15,s[62]),f=b(f,h,u,i,z,21,s[63]),y[0]=y[0]+i|0,y[1]=y[1]+f|0,y[2]=y[2]+h|0,y[3]=y[3]+u|0},_doFinalize:function(){var d=this._data,m=d.words,j=this._nDataBytes*8,o=d.sigBytes*8;m[o>>>5]|=128<<24-o%32;var l=a.floor(j/4294967296),y=j;m[(o+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,m[(o+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,d.sigBytes=(m.length+1)*4,this._process();for(var _=this._hash,B=_.words,P=0;P<4;P++){var S=B[P];B[P]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return _},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d}});function O(d,m,j,o,l,y,_){var B=d+(m&j|~m&o)+l+_;return(B<<y|B>>>32-y)+m}function w(d,m,j,o,l,y,_){var B=d+(m&o|j&~o)+l+_;return(B<<y|B>>>32-y)+m}function v(d,m,j,o,l,y,_){var B=d+(m^j^o)+l+_;return(B<<y|B>>>32-y)+m}function b(d,m,j,o,l,y,_){var B=d+(j^(m|~o))+l+_;return(B<<y|B>>>32-y)+m}p.MD5=n._createHelper(C),p.HmacMD5=n._createHmacHelper(C)}(Math),e.MD5})})(Le);var Lt=Le.exports;const Rt=he(Lt),Re={sign:(t,r)=>De.stringify($t(t,r)),md5Content:t=>H.isEmpty(t)?"":De.stringify(Rt(t))},Mt=t=>{const r=H.sortBy(Object.keys(t));let e={};return H.map(r,a=>{H.isEmpty(t[a])?e[a]=null:H.isArray(t[a])?e[a]=t[a][0]:e[a]=t[a]}),e},zt={map:H.map,keys:H.keys,compact:H.compact,sortBy:H.sortBy,forEach:H.forEach},Nt=t=>{let r=t,e=H.mapValues(zt,p=>(...c)=>(r=p(r,...c),a));const a=Object.assign(e,{value:()=>r});return a},Me=t=>{const r=["X-Gw-Signature","X-Gw-Signature-headers","Accept","Content-MD5","Content-Type","Date"];let e="",a="",p=!0;return Nt(t).keys(t).map(c=>!H.includes(r,c)&&{value:t[c],key:H.toLower(c)}).compact().sortBy(c=>c.key).forEach(c=>{e+=`${c.key}:${c.value}
3
- `,p?a+=c.key:a+=","+c.key,p=!1}),{transformHeader:e,transformHeaderKeys:a}},Ut="application/x-www-form-urlencoded",Wt=(t,{appkey:r,appsecret:e,originQuery:a})=>{try{if(r&&e){const{method:p,url:c}=t;let g=a?Ye(c,a):c,n=H.get(t,"headers")||H.get(t,"header");const{Accept:x}=n,s=Tt(g,!0),C=s.query;let O="",w=C;if(n["Content-Type"]||(n["Content-Type"]="application/json"),n.Accept||(n.Accept="*/*"),t.body&&n["Content-Type"].indexOf(Ut)===-1)O=Re.md5Content(t.body),n["Content-MD5"]=O;else{let m=t.body;if(H.isString(m)){const j=xt(m);H.isEmpty(w)?w=j:w=Object.assign({},w,j)}}const v=Ze(s.pathname,Ve(Mt(w))),b=n["Content-Type"]?n["Content-Type"]:"";n["X-Gw-Key"]=r,n["X-Gw-Timestamp"]=H.toString(H.now()),n["X-Gw-Nonce"]=H.toString(H.random(1e12,9999999999999));const d=`${p}
1
+ (function(G,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios")):typeof define=="function"&&define.amd?define(["exports","lodash-es","dingtalk-jsapi","qs","axios"],T):(G=typeof globalThis<"u"?globalThis:G||self,T(G.Main={},G._,G.dd$1,G.qs,G.axios))})(this,function(G,T,ze,ne,Be){"use strict";function Ne(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const oe=Ne(ze),le=window.navigator.userAgent.toLowerCase();let pe={code:"",name:"未知"};function Ue(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const We=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(le)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(le)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(le)}],ke=t=>t.value,Ae=T.find(We,ke);Ae?pe=Ae:Ue()&&(pe={code:"h5",name:"H5"});const de=pe,Ke=t=>t=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":t=="prod"?"https://smart.ihotel.cn/guardian/gw/v1/platform-gcding":t||"https://test.ihotel.cn/gw/v1/platform-gcding",Ge=ne.parse(location.search,{ignoreQueryPrefix:!0}),ve=T.get(Ge,"corpId"),Qe={dd:{login:async({appCode:t,apiPrefix:r,map:e={dataPath:"data"}})=>{const a=Ke(r);return new Promise(async p=>{if(ve){const{code:c}=await oe.getAuthCode({corpId:ve}),g=await Be.post(`${a}/api/auth/queryAuthNoExternalCompatible`,{appCode:t,authCode:c,corpId:ve}),n=T.get(g,e.dataPath,g);n&&T.get(n,"result")===0?p({userInfo:T.get(n,"retVal"),res:g}):(oe.showToast({type:"fail",duration:2e3,content:T.get(n,"msg")||"未知错误",complete:()=>{}}),p({res:g}))}else oe.showToast({type:"fail",duration:2e3,content:"未配置参数:corpId",complete:()=>{}})})},dd:oe},h5:{login:()=>new Promise(async t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})},wxmp:{login:()=>new Promise(t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})},weixin:{login:()=>new Promise(t=>{const{token:r}=ne.parse(location.search,{ignoreQueryPrefix:!0});t(r?{userInfo:{ucToken:r}}:{userInfo:null})})}},Xe={setNavigationBarTitle:t=>{de.code==="dd"?(console.log("钉钉对象",oe),oe.setNavigationTitle(t)):de.code==="weixin"?wx.setNavigationBarTitle(t):document.title=t.title}},Ve=t=>{let r="";return T.mapKeys(t,(e,a)=>{a&&(T.isEmpty(e)?r+="&"+a:r+="&"+a+"="+e)}),r},Ze=(t,r)=>T.isEmpty(r)?t:(T.includes(t,"?")?t:t+"?")+r.substring(1),Ye=(t,r)=>T.isEmpty(r)?t:`${t}?${ne.stringify(r)}`;var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function he(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Je(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var p=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,p.get?p:{enumerable:!0,get:function(){return t[a]}})}),e}var me=Object.prototype.hasOwnProperty,ae=Array.isArray,V=function(){for(var t=[],r=0;r<256;++r)t.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return t}(),et=function(r){for(;r.length>1;){var e=r.pop(),a=e.obj[e.prop];if(ae(a)){for(var p=[],c=0;c<a.length;++c)typeof a[c]<"u"&&p.push(a[c]);e.obj[e.prop]=p}}},je=function(r,e){for(var a=e&&e.plainObjects?Object.create(null):{},p=0;p<r.length;++p)typeof r[p]<"u"&&(a[p]=r[p]);return a},tt=function t(r,e,a){if(!e)return r;if(typeof e!="object"){if(ae(r))r.push(e);else if(r&&typeof r=="object")(a&&(a.plainObjects||a.allowPrototypes)||!me.call(Object.prototype,e))&&(r[e]=!0);else return[r,e];return r}if(!r||typeof r!="object")return[r].concat(e);var p=r;return ae(r)&&!ae(e)&&(p=je(r,a)),ae(r)&&ae(e)?(e.forEach(function(c,g){if(me.call(r,g)){var n=r[g];n&&typeof n=="object"&&c&&typeof c=="object"?r[g]=t(n,c,a):r.push(c)}else r[g]=c}),r):Object.keys(e).reduce(function(c,g){var n=e[g];return me.call(c,g)?c[g]=t(c[g],n,a):c[g]=n,c},p)},rt=function(r,e){return Object.keys(e).reduce(function(a,p){return a[p]=e[p],a},r)},nt=function(t,r,e){var a=t.replace(/\+/g," ");if(e==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},ot=function(r,e,a){if(r.length===0)return r;var p=r;if(typeof r=="symbol"?p=Symbol.prototype.toString.call(r):typeof r!="string"&&(p=String(r)),a==="iso-8859-1")return escape(p).replace(/%u[0-9a-f]{4}/gi,function(x){return"%26%23"+parseInt(x.slice(2),16)+"%3B"});for(var c="",g=0;g<p.length;++g){var n=p.charCodeAt(g);if(n===45||n===46||n===95||n===126||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){c+=p.charAt(g);continue}if(n<128){c=c+V[n];continue}if(n<2048){c=c+(V[192|n>>6]+V[128|n&63]);continue}if(n<55296||n>=57344){c=c+(V[224|n>>12]+V[128|n>>6&63]+V[128|n&63]);continue}g+=1,n=65536+((n&1023)<<10|p.charCodeAt(g)&1023),c+=V[240|n>>18]+V[128|n>>12&63]+V[128|n>>6&63]+V[128|n&63]}return c},at=function(r){for(var e=[{obj:{o:r},prop:"o"}],a=[],p=0;p<e.length;++p)for(var c=e[p],g=c.obj[c.prop],n=Object.keys(g),x=0;x<n.length;++x){var s=n[x],_=g[s];typeof _=="object"&&_!==null&&a.indexOf(_)===-1&&(e.push({obj:g,prop:s}),a.push(_))}return et(e),r},st=function(r){return Object.prototype.toString.call(r)==="[object RegExp]"},it=function(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))},ft=function(r,e){return[].concat(r,e)},ct={arrayToObject:je,assign:rt,combine:ft,compact:at,decode:nt,encode:ot,isBuffer:it,isRegExp:st,merge:tt},fe=ct,ye=Object.prototype.hasOwnProperty,ht=Array.isArray,I={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:fe.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ut=function(t){return t.replace(/&#(\d+);/g,function(r,e){return String.fromCharCode(parseInt(e,10))})},lt="utf8=%26%2310003%3B",pt="utf8=%E2%9C%93",dt=function(r,e){var a={},p=e.ignoreQueryPrefix?r.replace(/^\?/,""):r,c=e.parameterLimit===1/0?void 0:e.parameterLimit,g=p.split(e.delimiter,c),n=-1,x,s=e.charset;if(e.charsetSentinel)for(x=0;x<g.length;++x)g[x].indexOf("utf8=")===0&&(g[x]===pt?s="utf-8":g[x]===lt&&(s="iso-8859-1"),n=x,x=g.length);for(x=0;x<g.length;++x)if(x!==n){var _=g[x],O=_.indexOf("]="),w=O===-1?_.indexOf("="):O+1,v,b;w===-1?(v=e.decoder(_,I.decoder,s,"key"),b=e.strictNullHandling?null:""):(v=e.decoder(_.slice(0,w),I.decoder,s,"key"),b=e.decoder(_.slice(w+1),I.decoder,s,"value")),b&&e.interpretNumericEntities&&s==="iso-8859-1"&&(b=ut(b)),b&&typeof b=="string"&&e.comma&&b.indexOf(",")>-1&&(b=b.split(",")),_.indexOf("[]=")>-1&&(b=ht(b)?[b]:b),ye.call(a,v)?a[v]=fe.combine(a[v],b):a[v]=b}return a},vt=function(t,r,e){for(var a=r,p=t.length-1;p>=0;--p){var c,g=t[p];if(g==="[]"&&e.parseArrays)c=[].concat(a);else{c=e.plainObjects?Object.create(null):{};var n=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,x=parseInt(n,10);!e.parseArrays&&n===""?c={0:a}:!isNaN(x)&&g!==n&&String(x)===n&&x>=0&&e.parseArrays&&x<=e.arrayLimit?(c=[],c[x]=a):c[n]=a}a=c}return a},mt=function(r,e,a){if(r){var p=a.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/,g=/(\[[^[\]]*])/g,n=a.depth>0&&c.exec(p),x=n?p.slice(0,n.index):p,s=[];if(x){if(!a.plainObjects&&ye.call(Object.prototype,x)&&!a.allowPrototypes)return;s.push(x)}for(var _=0;a.depth>0&&(n=g.exec(p))!==null&&_<a.depth;){if(_+=1,!a.plainObjects&&ye.call(Object.prototype,n[1].slice(1,-1))&&!a.allowPrototypes)return;s.push(n[1])}return n&&s.push("["+p.slice(n.index)+"]"),vt(s,e,a)}},yt=function(r){if(!r)return I;if(r.decoder!==null&&r.decoder!==void 0&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var e=typeof r.charset>"u"?I.charset:r.charset;return{allowDots:typeof r.allowDots>"u"?I.allowDots:!!r.allowDots,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:I.allowPrototypes,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:I.arrayLimit,charset:e,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:I.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:I.comma,decoder:typeof r.decoder=="function"?r.decoder:I.decoder,delimiter:typeof r.delimiter=="string"||fe.isRegExp(r.delimiter)?r.delimiter:I.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:I.depth,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:I.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:I.plainObjects,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:I.strictNullHandling}},gt=function(t,r){var e=yt(r);if(t===""||t===null||typeof t>"u")return e.plainObjects?Object.create(null):{};for(var a=typeof t=="string"?dt(t,e):t,p=e.plainObjects?Object.create(null):{},c=Object.keys(a),g=0;g<c.length;++g){var n=c[g],x=mt(n,a[n],e);p=fe.merge(p,x,e)}return fe.compact(p)};const xt=he(gt);var ue={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ue.exports,function(t,r){(function(e){var a=r&&!r.nodeType&&r,p=t&&!t.nodeType&&t,c=typeof W=="object"&&W;(c.global===c||c.window===c||c.self===c)&&(e=c);var g,n=2147483647,x=36,s=1,_=26,O=38,w=700,v=72,b=128,d="-",m=/^xn--/,j=/[^\x20-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=x-s,C=Math.floor,B=String.fromCharCode,P;function S(A){throw new RangeError(l[A])}function H(A,i){for(var f=A.length,h=[];f--;)h[f]=i(A[f]);return h}function E(A,i){var f=A.split("@"),h="";f.length>1&&(h=f[0]+"@",A=f[1]),A=A.replace(o,".");var u=A.split("."),L=H(u,i).join(".");return h+L}function F(A){for(var i=[],f=0,h=A.length,u,L;f<h;)u=A.charCodeAt(f++),u>=55296&&u<=56319&&f<h?(L=A.charCodeAt(f++),(L&64512)==56320?i.push(((u&1023)<<10)+(L&1023)+65536):(i.push(u),f--)):i.push(u);return i}function D(A){return H(A,function(i){var f="";return i>65535&&(i-=65536,f+=B(i>>>10&1023|55296),i=56320|i&1023),f+=B(i),f}).join("")}function R(A){return A-48<10?A-22:A-65<26?A-65:A-97<26?A-97:x}function z(A,i){return A+22+75*(A<26)-((i!=0)<<5)}function N(A,i,f){var h=0;for(A=f?C(A/w):A>>1,A+=C(A/i);A>y*_>>1;h+=x)A=C(A/y);return C(h+(y+1)*A/(A+O))}function M(A){var i=[],f=A.length,h,u=0,L=b,q=v,U,Q,Z,J,$,K,X,te,re;for(U=A.lastIndexOf(d),U<0&&(U=0),Q=0;Q<U;++Q)A.charCodeAt(Q)>=128&&S("not-basic"),i.push(A.charCodeAt(Q));for(Z=U>0?U+1:0;Z<f;){for(J=u,$=1,K=x;Z>=f&&S("invalid-input"),X=R(A.charCodeAt(Z++)),(X>=x||X>C((n-u)/$))&&S("overflow"),u+=X*$,te=K<=q?s:K>=q+_?_:K-q,!(X<te);K+=x)re=x-te,$>C(n/re)&&S("overflow"),$*=re;h=i.length+1,q=N(u-J,h,J==0),C(u/h)>n-L&&S("overflow"),L+=C(u/h),u%=h,i.splice(u++,0,L)}return D(i)}function k(A){var i,f,h,u,L,q,U,Q,Z,J,$,K=[],X,te,re,Oe;for(A=F(A),X=A.length,i=b,f=0,L=v,q=0;q<X;++q)$=A[q],$<128&&K.push(B($));for(h=u=K.length,u&&K.push(d);h<X;){for(U=n,q=0;q<X;++q)$=A[q],$>=i&&$<U&&(U=$);for(te=h+1,U-i>C((n-f)/te)&&S("overflow"),f+=(U-i)*te,i=U,q=0;q<X;++q)if($=A[q],$<i&&++f>n&&S("overflow"),$==i){for(Q=f,Z=x;J=Z<=L?s:Z>=L+_?_:Z-L,!(Q<J);Z+=x)Oe=Q-J,re=x-J,K.push(B(z(J+Oe%re,0))),Q=C(Oe/re);K.push(B(z(Q,0))),L=N(f,te,h==u),f=0,++h}++f,++i}return K.join("")}function ee(A){return E(A,function(i){return m.test(i)?M(i.slice(4).toLowerCase()):i})}function ie(A){return E(A,function(i){return j.test(i)?"xn--"+k(i):i})}if(g={version:"1.4.1",ucs2:{decode:F,encode:D},decode:M,encode:k,toASCII:ie,toUnicode:ee},a&&p)if(t.exports==a)p.exports=g;else for(P in g)g.hasOwnProperty(P)&&(a[P]=g[P]);else e.punycode=g})(W)}(ue,ue.exports);var wt=ue.exports,bt=wt;function Y(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ct=/^([a-z0-9.+-]+:)/i,_t=/:[0-9]*$/,Ot=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Bt=["<",">",'"',"`"," ","\r",`
2
+ `," "],At=["{","}","|","\\","^","`"].concat(Bt),ge=["'"].concat(At),Se=["%","/","?",";","#"].concat(ge),Pe=["/","?","#"],jt=255,Te=/^[+a-z0-9A-Z_-]{0,63}$/,St=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pt={javascript:!0,"javascript:":!0},xe={javascript:!0,"javascript:":!0},se={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},we=ne;function He(t,r,e){if(t&&typeof t=="object"&&t instanceof Y)return t;var a=new Y;return a.parse(t,r,e),a}Y.prototype.parse=function(t,r,e){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var a=t.indexOf("?"),p=a!==-1&&a<t.indexOf("#")?"?":"#",c=t.split(p),g=/\\/g;c[0]=c[0].replace(g,"/"),t=c.join(p);var n=t;if(n=n.trim(),!e&&t.split("#").length===1){var x=Ot.exec(n);if(x)return this.path=n,this.href=n,this.pathname=x[1],x[2]?(this.search=x[2],r?this.query=we.parse(this.search.substr(1)):this.query=this.search.substr(1)):r&&(this.search="",this.query={}),this}var s=Ct.exec(n);if(s){s=s[0];var _=s.toLowerCase();this.protocol=_,n=n.substr(s.length)}if(e||s||n.match(/^\/\/[^@/]+@[^@/]+/)){var O=n.substr(0,2)==="//";O&&!(s&&xe[s])&&(n=n.substr(2),this.slashes=!0)}if(!xe[s]&&(O||s&&!se[s])){for(var w=-1,v=0;v<Pe.length;v++){var b=n.indexOf(Pe[v]);b!==-1&&(w===-1||b<w)&&(w=b)}var d,m;w===-1?m=n.lastIndexOf("@"):m=n.lastIndexOf("@",w),m!==-1&&(d=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(d)),w=-1;for(var v=0;v<Se.length;v++){var b=n.indexOf(Se[v]);b!==-1&&(w===-1||b<w)&&(w=b)}w===-1&&(w=n.length),this.host=n.slice(0,w),n=n.slice(w),this.parseHost(),this.hostname=this.hostname||"";var j=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!j)for(var o=this.hostname.split(/\./),v=0,l=o.length;v<l;v++){var y=o[v];if(y&&!y.match(Te)){for(var C="",B=0,P=y.length;B<P;B++)y.charCodeAt(B)>127?C+="x":C+=y[B];if(!C.match(Te)){var S=o.slice(0,v),H=o.slice(v+1),E=y.match(St);E&&(S.push(E[1]),H.unshift(E[2])),H.length&&(n="/"+H.join(".")+n),this.hostname=S.join(".");break}}}this.hostname.length>jt?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=bt.toASCII(this.hostname));var F=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),n[0]!=="/"&&(n="/"+n))}if(!Pt[_])for(var v=0,l=ge.length;v<l;v++){var R=ge[v];if(n.indexOf(R)!==-1){var z=encodeURIComponent(R);z===R&&(z=escape(R)),n=n.split(R).join(z)}}var N=n.indexOf("#");N!==-1&&(this.hash=n.substr(N),n=n.slice(0,N));var M=n.indexOf("?");if(M!==-1?(this.search=n.substr(M),this.query=n.substr(M+1),r&&(this.query=we.parse(this.query)),n=n.slice(0,M)):r&&(this.search="",this.query={}),n&&(this.pathname=n),se[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",k=this.search||"";this.path=F+k}return this.href=this.format(),this},Y.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var r=this.protocol||"",e=this.pathname||"",a=this.hash||"",p=!1,c="";this.host?p=t+this.host:this.hostname&&(p=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(c=we.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var g=this.search||c&&"?"+c||"";return r&&r.substr(-1)!==":"&&(r+=":"),this.slashes||(!r||se[r])&&p!==!1?(p="//"+(p||""),e&&e.charAt(0)!=="/"&&(e="/"+e)):p||(p=""),a&&a.charAt(0)!=="#"&&(a="#"+a),g&&g.charAt(0)!=="?"&&(g="?"+g),e=e.replace(/[?#]/g,function(n){return encodeURIComponent(n)}),g=g.replace("#","%23"),r+p+e+g+a},Y.prototype.resolve=function(t){return this.resolveObject(He(t,!1,!0)).format()},Y.prototype.resolveObject=function(t){if(typeof t=="string"){var r=new Y;r.parse(t,!1,!0),t=r}for(var e=new Y,a=Object.keys(this),p=0;p<a.length;p++){var c=a[p];e[c]=this[c]}if(e.hash=t.hash,t.href==="")return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var g=Object.keys(t),n=0;n<g.length;n++){var x=g[n];x!=="protocol"&&(e[x]=t[x])}return se[e.protocol]&&e.hostname&&!e.pathname&&(e.pathname="/",e.path=e.pathname),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!se[t.protocol]){for(var s=Object.keys(t),_=0;_<s.length;_++){var O=s[_];e[O]=t[O]}return e.href=e.format(),e}if(e.protocol=t.protocol,!t.host&&!xe[t.protocol]){for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),l[0]!==""&&l.unshift(""),l.length<2&&l.unshift(""),e.pathname=l.join("/")}else e.pathname=t.pathname;if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var w=e.pathname||"",v=e.search||"";e.path=w+v}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var b=e.pathname&&e.pathname.charAt(0)==="/",d=t.host||t.pathname&&t.pathname.charAt(0)==="/",m=d||b||e.host&&t.pathname,j=m,o=e.pathname&&e.pathname.split("/")||[],l=t.pathname&&t.pathname.split("/")||[],y=e.protocol&&!se[e.protocol];if(y&&(e.hostname="",e.port=null,e.host&&(o[0]===""?o[0]=e.host:o.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(l[0]===""?l[0]=t.host:l.unshift(t.host)),t.host=null),m=m&&(l[0]===""||o[0]==="")),d)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,o=l;else if(l.length)o||(o=[]),o.pop(),o=o.concat(l),e.search=t.search,e.query=t.query;else if(t.search!=null){if(y){e.host=o.shift(),e.hostname=e.host;var C=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;C&&(e.auth=C.shift(),e.hostname=C.shift(),e.host=e.hostname)}return e.search=t.search,e.query=t.query,(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!o.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var B=o.slice(-1)[0],P=(e.host||t.host||o.length>1)&&(B==="."||B==="..")||B==="",S=0,H=o.length;H>=0;H--)B=o[H],B==="."?o.splice(H,1):B===".."?(o.splice(H,1),S++):S&&(o.splice(H,1),S--);if(!m&&!j)for(;S--;S)o.unshift("..");m&&o[0]!==""&&(!o[0]||o[0].charAt(0)!=="/")&&o.unshift(""),P&&o.join("/").substr(-1)!=="/"&&o.push("");var E=o[0]===""||o[0]&&o[0].charAt(0)==="/";if(y){e.hostname=E?"":o.length?o.shift():"",e.host=e.hostname;var C=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;C&&(e.auth=C.shift(),e.hostname=C.shift(),e.host=e.hostname)}return m=m||e.host&&o.length,m&&!E&&o.unshift(""),o.length>0?e.pathname=o.join("/"):(e.pathname=null,e.path=null),(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Y.prototype.parseHost=function(){var t=this.host,r=_t.exec(t);r&&(r=r[0],r!==":"&&(this.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(this.hostname=t)};var Tt=He,Ee={exports:{}};function Ht(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var be={exports:{}};const Et=Je(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fe;function ce(){return Fe||(Fe=1,function(t,r){(function(e,a){t.exports=a()})(W,function(){var e=e||function(a,p){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof W<"u"&&W.crypto&&(c=W.crypto),!c&&typeof Ht=="function")try{c=Et}catch{}var g=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function o(){}return function(l){var y;return o.prototype=l,y=new o,o.prototype=null,y}}(),x={},s=x.lib={},_=s.Base=function(){return{extend:function(o){var l=n(this);return o&&l.mixIn(o),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var l in o)o.hasOwnProperty(l)&&(this[l]=o[l]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),O=s.WordArray=_.extend({init:function(o,l){o=this.words=o||[],l!=p?this.sigBytes=l:this.sigBytes=o.length*4},toString:function(o){return(o||v).stringify(this)},concat:function(o){var l=this.words,y=o.words,C=this.sigBytes,B=o.sigBytes;if(this.clamp(),C%4)for(var P=0;P<B;P++){var S=y[P>>>2]>>>24-P%4*8&255;l[C+P>>>2]|=S<<24-(C+P)%4*8}else for(var H=0;H<B;H+=4)l[C+H>>>2]=y[H>>>2];return this.sigBytes+=B,this},clamp:function(){var o=this.words,l=this.sigBytes;o[l>>>2]&=4294967295<<32-l%4*8,o.length=a.ceil(l/4)},clone:function(){var o=_.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var l=[],y=0;y<o;y+=4)l.push(g());return new O.init(l,o)}}),w=x.enc={},v=w.Hex={stringify:function(o){for(var l=o.words,y=o.sigBytes,C=[],B=0;B<y;B++){var P=l[B>>>2]>>>24-B%4*8&255;C.push((P>>>4).toString(16)),C.push((P&15).toString(16))}return C.join("")},parse:function(o){for(var l=o.length,y=[],C=0;C<l;C+=2)y[C>>>3]|=parseInt(o.substr(C,2),16)<<24-C%8*4;return new O.init(y,l/2)}},b=w.Latin1={stringify:function(o){for(var l=o.words,y=o.sigBytes,C=[],B=0;B<y;B++){var P=l[B>>>2]>>>24-B%4*8&255;C.push(String.fromCharCode(P))}return C.join("")},parse:function(o){for(var l=o.length,y=[],C=0;C<l;C++)y[C>>>2]|=(o.charCodeAt(C)&255)<<24-C%4*8;return new O.init(y,l)}},d=w.Utf8={stringify:function(o){try{return decodeURIComponent(escape(b.stringify(o)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(o){return b.parse(unescape(encodeURIComponent(o)))}},m=s.BufferedBlockAlgorithm=_.extend({reset:function(){this._data=new O.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=d.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var l,y=this._data,C=y.words,B=y.sigBytes,P=this.blockSize,S=P*4,H=B/S;o?H=a.ceil(H):H=a.max((H|0)-this._minBufferSize,0);var E=H*P,F=a.min(E*4,B);if(E){for(var D=0;D<E;D+=P)this._doProcessBlock(C,D);l=C.splice(0,E),y.sigBytes-=F}return new O.init(l,F)},clone:function(){var o=_.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0});s.Hasher=m.extend({cfg:_.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(o){return function(l,y){return new o.init(y).finalize(l)}},_createHmacHelper:function(o){return function(l,y){return new j.HMAC.init(o,y).finalize(l)}}});var j=x.algo={};return x}(Math);return e})}(be)),be.exports}var Ce={exports:{}},Ie;function Ft(){return Ie||(Ie=1,function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(a){var p=e,c=p.lib,g=c.WordArray,n=c.Hasher,x=p.algo,s=[],_=[];(function(){function v(j){for(var o=a.sqrt(j),l=2;l<=o;l++)if(!(j%l))return!1;return!0}function b(j){return(j-(j|0))*4294967296|0}for(var d=2,m=0;m<64;)v(d)&&(m<8&&(s[m]=b(a.pow(d,1/2))),_[m]=b(a.pow(d,1/3)),m++),d++})();var O=[],w=x.SHA256=n.extend({_doReset:function(){this._hash=new g.init(s.slice(0))},_doProcessBlock:function(v,b){for(var d=this._hash.words,m=d[0],j=d[1],o=d[2],l=d[3],y=d[4],C=d[5],B=d[6],P=d[7],S=0;S<64;S++){if(S<16)O[S]=v[b+S]|0;else{var H=O[S-15],E=(H<<25|H>>>7)^(H<<14|H>>>18)^H>>>3,F=O[S-2],D=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;O[S]=E+O[S-7]+D+O[S-16]}var R=y&C^~y&B,z=m&j^m&o^j&o,N=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),M=(y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25),k=P+M+R+_[S]+O[S],ee=N+z;P=B,B=C,C=y,y=l+k|0,l=o,o=j,j=m,m=k+ee|0}d[0]=d[0]+m|0,d[1]=d[1]+j|0,d[2]=d[2]+o|0,d[3]=d[3]+l|0,d[4]=d[4]+y|0,d[5]=d[5]+C|0,d[6]=d[6]+B|0,d[7]=d[7]+P|0},_doFinalize:function(){var v=this._data,b=v.words,d=this._nDataBytes*8,m=v.sigBytes*8;return b[m>>>5]|=128<<24-m%32,b[(m+64>>>9<<4)+14]=a.floor(d/4294967296),b[(m+64>>>9<<4)+15]=d,v.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var v=n.clone.call(this);return v._hash=this._hash.clone(),v}});p.SHA256=n._createHelper(w),p.HmacSHA256=n._createHmacHelper(w)}(Math),e.SHA256})}(Ce)),Ce.exports}var _e={exports:{}},qe;function It(){return qe||(qe=1,function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){(function(){var a=e,p=a.lib,c=p.Base,g=a.enc,n=g.Utf8,x=a.algo;x.HMAC=c.extend({init:function(s,_){s=this._hasher=new s.init,typeof _=="string"&&(_=n.parse(_));var O=s.blockSize,w=O*4;_.sigBytes>w&&(_=s.finalize(_)),_.clamp();for(var v=this._oKey=_.clone(),b=this._iKey=_.clone(),d=v.words,m=b.words,j=0;j<O;j++)d[j]^=1549556828,m[j]^=909522486;v.sigBytes=b.sigBytes=w,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var _=this._hasher,O=_.finalize(s);_.reset();var w=_.finalize(this._oKey.clone().concat(O));return w}})})()})}(_e)),_e.exports}(function(t,r){(function(e,a,p){t.exports=a(ce(),Ft(),It())})(W,function(e){return e.HmacSHA256})})(Ee);var qt=Ee.exports;const $t=he(qt);var $e={exports:{}};(function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(){var a=e,p=a.lib,c=p.WordArray,g=a.enc;g.Base64={stringify:function(x){var s=x.words,_=x.sigBytes,O=this._map;x.clamp();for(var w=[],v=0;v<_;v+=3)for(var b=s[v>>>2]>>>24-v%4*8&255,d=s[v+1>>>2]>>>24-(v+1)%4*8&255,m=s[v+2>>>2]>>>24-(v+2)%4*8&255,j=b<<16|d<<8|m,o=0;o<4&&v+o*.75<_;o++)w.push(O.charAt(j>>>6*(3-o)&63));var l=O.charAt(64);if(l)for(;w.length%4;)w.push(l);return w.join("")},parse:function(x){var s=x.length,_=this._map,O=this._reverseMap;if(!O){O=this._reverseMap=[];for(var w=0;w<_.length;w++)O[_.charCodeAt(w)]=w}var v=_.charAt(64);if(v){var b=x.indexOf(v);b!==-1&&(s=b)}return n(x,s,O)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function n(x,s,_){for(var O=[],w=0,v=0;v<s;v++)if(v%4){var b=_[x.charCodeAt(v-1)]<<v%4*2,d=_[x.charCodeAt(v)]>>>6-v%4*2,m=b|d;O[w>>>2]|=m<<24-w%4*8,w++}return c.create(O,w)}}(),e.enc.Base64})})($e);var Dt=$e.exports;const De=he(Dt);var Le={exports:{}};(function(t,r){(function(e,a){t.exports=a(ce())})(W,function(e){return function(a){var p=e,c=p.lib,g=c.WordArray,n=c.Hasher,x=p.algo,s=[];(function(){for(var d=0;d<64;d++)s[d]=a.abs(a.sin(d+1))*4294967296|0})();var _=x.MD5=n.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(d,m){for(var j=0;j<16;j++){var o=m+j,l=d[o];d[o]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var y=this._hash.words,C=d[m+0],B=d[m+1],P=d[m+2],S=d[m+3],H=d[m+4],E=d[m+5],F=d[m+6],D=d[m+7],R=d[m+8],z=d[m+9],N=d[m+10],M=d[m+11],k=d[m+12],ee=d[m+13],ie=d[m+14],A=d[m+15],i=y[0],f=y[1],h=y[2],u=y[3];i=O(i,f,h,u,C,7,s[0]),u=O(u,i,f,h,B,12,s[1]),h=O(h,u,i,f,P,17,s[2]),f=O(f,h,u,i,S,22,s[3]),i=O(i,f,h,u,H,7,s[4]),u=O(u,i,f,h,E,12,s[5]),h=O(h,u,i,f,F,17,s[6]),f=O(f,h,u,i,D,22,s[7]),i=O(i,f,h,u,R,7,s[8]),u=O(u,i,f,h,z,12,s[9]),h=O(h,u,i,f,N,17,s[10]),f=O(f,h,u,i,M,22,s[11]),i=O(i,f,h,u,k,7,s[12]),u=O(u,i,f,h,ee,12,s[13]),h=O(h,u,i,f,ie,17,s[14]),f=O(f,h,u,i,A,22,s[15]),i=w(i,f,h,u,B,5,s[16]),u=w(u,i,f,h,F,9,s[17]),h=w(h,u,i,f,M,14,s[18]),f=w(f,h,u,i,C,20,s[19]),i=w(i,f,h,u,E,5,s[20]),u=w(u,i,f,h,N,9,s[21]),h=w(h,u,i,f,A,14,s[22]),f=w(f,h,u,i,H,20,s[23]),i=w(i,f,h,u,z,5,s[24]),u=w(u,i,f,h,ie,9,s[25]),h=w(h,u,i,f,S,14,s[26]),f=w(f,h,u,i,R,20,s[27]),i=w(i,f,h,u,ee,5,s[28]),u=w(u,i,f,h,P,9,s[29]),h=w(h,u,i,f,D,14,s[30]),f=w(f,h,u,i,k,20,s[31]),i=v(i,f,h,u,E,4,s[32]),u=v(u,i,f,h,R,11,s[33]),h=v(h,u,i,f,M,16,s[34]),f=v(f,h,u,i,ie,23,s[35]),i=v(i,f,h,u,B,4,s[36]),u=v(u,i,f,h,H,11,s[37]),h=v(h,u,i,f,D,16,s[38]),f=v(f,h,u,i,N,23,s[39]),i=v(i,f,h,u,ee,4,s[40]),u=v(u,i,f,h,C,11,s[41]),h=v(h,u,i,f,S,16,s[42]),f=v(f,h,u,i,F,23,s[43]),i=v(i,f,h,u,z,4,s[44]),u=v(u,i,f,h,k,11,s[45]),h=v(h,u,i,f,A,16,s[46]),f=v(f,h,u,i,P,23,s[47]),i=b(i,f,h,u,C,6,s[48]),u=b(u,i,f,h,D,10,s[49]),h=b(h,u,i,f,ie,15,s[50]),f=b(f,h,u,i,E,21,s[51]),i=b(i,f,h,u,k,6,s[52]),u=b(u,i,f,h,S,10,s[53]),h=b(h,u,i,f,N,15,s[54]),f=b(f,h,u,i,B,21,s[55]),i=b(i,f,h,u,R,6,s[56]),u=b(u,i,f,h,A,10,s[57]),h=b(h,u,i,f,F,15,s[58]),f=b(f,h,u,i,ee,21,s[59]),i=b(i,f,h,u,H,6,s[60]),u=b(u,i,f,h,M,10,s[61]),h=b(h,u,i,f,P,15,s[62]),f=b(f,h,u,i,z,21,s[63]),y[0]=y[0]+i|0,y[1]=y[1]+f|0,y[2]=y[2]+h|0,y[3]=y[3]+u|0},_doFinalize:function(){var d=this._data,m=d.words,j=this._nDataBytes*8,o=d.sigBytes*8;m[o>>>5]|=128<<24-o%32;var l=a.floor(j/4294967296),y=j;m[(o+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,m[(o+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,d.sigBytes=(m.length+1)*4,this._process();for(var C=this._hash,B=C.words,P=0;P<4;P++){var S=B[P];B[P]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return C},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d}});function O(d,m,j,o,l,y,C){var B=d+(m&j|~m&o)+l+C;return(B<<y|B>>>32-y)+m}function w(d,m,j,o,l,y,C){var B=d+(m&o|j&~o)+l+C;return(B<<y|B>>>32-y)+m}function v(d,m,j,o,l,y,C){var B=d+(m^j^o)+l+C;return(B<<y|B>>>32-y)+m}function b(d,m,j,o,l,y,C){var B=d+(j^(m|~o))+l+C;return(B<<y|B>>>32-y)+m}p.MD5=n._createHelper(_),p.HmacMD5=n._createHmacHelper(_)}(Math),e.MD5})})(Le);var Lt=Le.exports;const Rt=he(Lt),Re={sign:(t,r)=>De.stringify($t(t,r)),md5Content:t=>T.isEmpty(t)?"":De.stringify(Rt(t))},Mt=t=>{const r=T.sortBy(Object.keys(t));let e={};return T.map(r,a=>{T.isEmpty(t[a])?e[a]=null:T.isArray(t[a])?e[a]=t[a][0]:e[a]=t[a]}),e},zt={map:T.map,keys:T.keys,compact:T.compact,sortBy:T.sortBy,forEach:T.forEach},Nt=t=>{let r=t,e=T.mapValues(zt,p=>(...c)=>(r=p(r,...c),a));const a=Object.assign(e,{value:()=>r});return a},Me=t=>{const r=["X-Gw-Signature","X-Gw-Signature-headers","Accept","Content-MD5","Content-Type","Date"];let e="",a="",p=!0;return Nt(t).keys(t).map(c=>!T.includes(r,c)&&{value:t[c],key:T.toLower(c)}).compact().sortBy(c=>c.key).forEach(c=>{e+=`${c.key}:${c.value}
3
+ `,p?a+=c.key:a+=","+c.key,p=!1}),{transformHeader:e,transformHeaderKeys:a}},Ut="application/x-www-form-urlencoded",Wt=(t,{appkey:r,appsecret:e,originQuery:a})=>{try{if(r&&e){const{method:p,url:c}=t;let g=a?Ye(c,a):c,n=T.get(t,"headers")||T.get(t,"header");const{Accept:x}=n,s=Tt(g,!0),_=s.query;let O="",w=_;if(n["Content-Type"]||(n["Content-Type"]="application/json"),n.Accept||(n.Accept="*/*"),t.body&&n["Content-Type"].indexOf(Ut)===-1)O=Re.md5Content(t.body),n["Content-MD5"]=O;else{let m=t.body;if(T.isString(m)){const j=xt(m);T.isEmpty(w)?w=j:w=Object.assign({},w,j)}}const v=Ze(s.pathname,Ve(Mt(w))),b=n["Content-Type"]?n["Content-Type"]:"";n["X-Gw-Key"]=r,n["X-Gw-Timestamp"]=T.toString(T.now()),n["X-Gw-Nonce"]=T.toString(T.random(1e12,9999999999999));const d=`${p}
4
4
  ${x||"*/*"}
5
5
  ${O}
6
6
  ${b}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gc_mobile",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "example",
package/src/modules/dd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as dd from "dingtalk-jsapi";
2
2
  import qs from "qs";
3
- import _, { reject } from "lodash-es";
3
+ import _ from "lodash-es";
4
4
  import axios from "axios";
5
5
  import { prefix } from "../lib/api";
6
6
 
@@ -25,14 +25,14 @@ export const login = async ({
25
25
  corpId
26
26
  }
27
27
  );
28
- const response = _.get(res, map.dataPath);
29
- if (response && response.result === 0) {
30
- resolve({ userInfo: response.retVal, res });
28
+ const response = _.get(res, map.dataPath, res);
29
+ if (response && _.get(response, "result") === 0) {
30
+ resolve({ userInfo: _.get(response, "retVal"), res });
31
31
  } else {
32
32
  dd.showToast({
33
33
  type: "fail",
34
34
  duration: 2000,
35
- content: response.msg,
35
+ content: _.get(response, "msg") || "未知错误",
36
36
  complete: () => {}
37
37
  });
38
38
  resolve({ res });