@glodon-aiot/agent-cli-ui 3.0.6 → 3.0.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/es/Dialog/AgentChat/index.mjs +454 -434
  2. package/dist/es/_virtual/lib.mjs +4 -0
  3. package/dist/es/_virtual/ua-parser.min.mjs +4 -0
  4. package/dist/es/components/Markdown/ATag/index.mjs +47 -0
  5. package/dist/es/components/Markdown/Image/index.mjs +56 -22
  6. package/dist/es/components/Markdown/Video/index.mjs +22 -0
  7. package/dist/es/components/Markdown/index.mjs +41 -37
  8. package/dist/es/index.mjs +15 -15
  9. package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +201 -0
  10. package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +1087 -0
  11. package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +104 -0
  12. package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +568 -0
  13. package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +158 -0
  14. package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +847 -0
  15. package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +35 -0
  16. package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +226 -0
  17. package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +33 -0
  18. package/dist/es/node_modules/ahooks/es/useRafState/index.mjs +16 -0
  19. package/dist/es/node_modules/ahooks/es/useSize/index.mjs +34 -0
  20. package/dist/es/node_modules/ahooks/es/useUnmountedRef/index.mjs +13 -0
  21. package/dist/es/node_modules/ahooks/es/utils/useIsomorphicLayoutEffectWithTarget.mjs +8 -0
  22. package/dist/es/node_modules/ahooks/es/utils/useLayoutEffectWithTarget.mjs +7 -0
  23. package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +20 -0
  24. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +4 -0
  25. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +76 -0
  26. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +14 -0
  27. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +34 -0
  28. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +172 -0
  29. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +81 -0
  30. package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +5 -0
  31. package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +4 -0
  32. package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +84 -0
  33. package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +5 -0
  34. package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +4 -0
  35. package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +9 -0
  36. package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +4 -0
  37. package/dist/es/node_modules/antd-mobile/es/global/index.mjs +4 -0
  38. package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +141 -0
  39. package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +9 -0
  40. package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +7 -0
  41. package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +4 -0
  42. package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +9 -0
  43. package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +6 -0
  44. package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +22 -0
  45. package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +11 -0
  46. package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +12 -0
  47. package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +46 -0
  48. package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +12 -0
  49. package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +13 -0
  50. package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +52 -0
  51. package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +11 -0
  52. package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +10 -0
  53. package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +15 -0
  54. package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +6 -0
  55. package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +8 -0
  56. package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +54 -0
  57. package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +32 -0
  58. package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +11 -0
  59. package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +19 -0
  60. package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +11 -11
  61. package/dist/es/node_modules/react-device-detect/dist/lib.mjs +723 -0
  62. package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs +294 -0
  63. package/dist/es/node_modules/tslib/tslib.es6.mjs +56 -7
  64. package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +120 -0
  65. package/dist/es/utils/index.mjs +37 -22
  66. package/dist/lib/index.js +50 -48
  67. package/dist/src/components/Markdown/ATag/index.d.ts +3 -0
  68. package/dist/src/components/Markdown/Video/index.d.ts +3 -0
  69. package/dist/src/utils/index.d.ts +1 -0
  70. package/package.json +3 -3
@@ -0,0 +1,294 @@
1
+ var _ = function() {
2
+ if (typeof Map != "undefined")
3
+ return Map;
4
+ function e(t, n) {
5
+ var r = -1;
6
+ return t.some(function(i, o) {
7
+ return i[0] === n ? (r = o, !0) : !1;
8
+ }), r;
9
+ }
10
+ return (
11
+ /** @class */
12
+ function() {
13
+ function t() {
14
+ this.__entries__ = [];
15
+ }
16
+ return Object.defineProperty(t.prototype, "size", {
17
+ /**
18
+ * @returns {boolean}
19
+ */
20
+ get: function() {
21
+ return this.__entries__.length;
22
+ },
23
+ enumerable: !0,
24
+ configurable: !0
25
+ }), t.prototype.get = function(n) {
26
+ var r = e(this.__entries__, n), i = this.__entries__[r];
27
+ return i && i[1];
28
+ }, t.prototype.set = function(n, r) {
29
+ var i = e(this.__entries__, n);
30
+ ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
31
+ }, t.prototype.delete = function(n) {
32
+ var r = this.__entries__, i = e(r, n);
33
+ ~i && r.splice(i, 1);
34
+ }, t.prototype.has = function(n) {
35
+ return !!~e(this.__entries__, n);
36
+ }, t.prototype.clear = function() {
37
+ this.__entries__.splice(0);
38
+ }, t.prototype.forEach = function(n, r) {
39
+ r === void 0 && (r = null);
40
+ for (var i = 0, o = this.__entries__; i < o.length; i++) {
41
+ var s = o[i];
42
+ n.call(r, s[1], s[0]);
43
+ }
44
+ }, t;
45
+ }()
46
+ );
47
+ }(), v = typeof window != "undefined" && typeof document != "undefined" && window.document === document, f = function() {
48
+ return typeof global != "undefined" && global.Math === Math ? global : typeof self != "undefined" && self.Math === Math ? self : typeof window != "undefined" && window.Math === Math ? window : Function("return this")();
49
+ }(), O = function() {
50
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(f) : function(e) {
51
+ return setTimeout(function() {
52
+ return e(Date.now());
53
+ }, 1e3 / 60);
54
+ };
55
+ }(), E = 2;
56
+ function R(e, t) {
57
+ var n = !1, r = !1, i = 0;
58
+ function o() {
59
+ n && (n = !1, e()), r && a();
60
+ }
61
+ function s() {
62
+ O(o);
63
+ }
64
+ function a() {
65
+ var u = Date.now();
66
+ if (n) {
67
+ if (u - i < E)
68
+ return;
69
+ r = !0;
70
+ } else
71
+ n = !0, r = !1, setTimeout(s, t);
72
+ i = u;
73
+ }
74
+ return a;
75
+ }
76
+ var M = 20, x = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], A = typeof MutationObserver != "undefined", z = (
77
+ /** @class */
78
+ function() {
79
+ function e() {
80
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = R(this.refresh.bind(this), M);
81
+ }
82
+ return e.prototype.addObserver = function(t) {
83
+ ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
84
+ }, e.prototype.removeObserver = function(t) {
85
+ var n = this.observers_, r = n.indexOf(t);
86
+ ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
87
+ }, e.prototype.refresh = function() {
88
+ var t = this.updateObservers_();
89
+ t && this.refresh();
90
+ }, e.prototype.updateObservers_ = function() {
91
+ var t = this.observers_.filter(function(n) {
92
+ return n.gatherActive(), n.hasActive();
93
+ });
94
+ return t.forEach(function(n) {
95
+ return n.broadcastActive();
96
+ }), t.length > 0;
97
+ }, e.prototype.connect_ = function() {
98
+ !v || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), A ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
99
+ attributes: !0,
100
+ childList: !0,
101
+ characterData: !0,
102
+ subtree: !0
103
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
104
+ }, e.prototype.disconnect_ = function() {
105
+ !v || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
106
+ }, e.prototype.onTransitionEnd_ = function(t) {
107
+ var n = t.propertyName, r = n === void 0 ? "" : n, i = x.some(function(o) {
108
+ return !!~r.indexOf(o);
109
+ });
110
+ i && this.refresh();
111
+ }, e.getInstance = function() {
112
+ return this.instance_ || (this.instance_ = new e()), this.instance_;
113
+ }, e.instance_ = null, e;
114
+ }()
115
+ ), m = function(e, t) {
116
+ for (var n = 0, r = Object.keys(t); n < r.length; n++) {
117
+ var i = r[n];
118
+ Object.defineProperty(e, i, {
119
+ value: t[i],
120
+ enumerable: !1,
121
+ writable: !1,
122
+ configurable: !0
123
+ });
124
+ }
125
+ return e;
126
+ }, c = function(e) {
127
+ var t = e && e.ownerDocument && e.ownerDocument.defaultView;
128
+ return t || f;
129
+ }, y = d(0, 0, 0, 0);
130
+ function h(e) {
131
+ return parseFloat(e) || 0;
132
+ }
133
+ function b(e) {
134
+ for (var t = [], n = 1; n < arguments.length; n++)
135
+ t[n - 1] = arguments[n];
136
+ return t.reduce(function(r, i) {
137
+ var o = e["border-" + i + "-width"];
138
+ return r + h(o);
139
+ }, 0);
140
+ }
141
+ function T(e) {
142
+ for (var t = ["top", "right", "bottom", "left"], n = {}, r = 0, i = t; r < i.length; r++) {
143
+ var o = i[r], s = e["padding-" + o];
144
+ n[o] = h(s);
145
+ }
146
+ return n;
147
+ }
148
+ function C(e) {
149
+ var t = e.getBBox();
150
+ return d(0, 0, t.width, t.height);
151
+ }
152
+ function S(e) {
153
+ var t = e.clientWidth, n = e.clientHeight;
154
+ if (!t && !n)
155
+ return y;
156
+ var r = c(e).getComputedStyle(e), i = T(r), o = i.left + i.right, s = i.top + i.bottom, a = h(r.width), u = h(r.height);
157
+ if (r.boxSizing === "border-box" && (Math.round(a + o) !== t && (a -= b(r, "left", "right") + o), Math.round(u + s) !== n && (u -= b(r, "top", "bottom") + s)), !G(e)) {
158
+ var l = Math.round(a + o) - t, p = Math.round(u + s) - n;
159
+ Math.abs(l) !== 1 && (a -= l), Math.abs(p) !== 1 && (u -= p);
160
+ }
161
+ return d(i.left, i.top, a, u);
162
+ }
163
+ var D = function() {
164
+ return typeof SVGGraphicsElement != "undefined" ? function(e) {
165
+ return e instanceof c(e).SVGGraphicsElement;
166
+ } : function(e) {
167
+ return e instanceof c(e).SVGElement && typeof e.getBBox == "function";
168
+ };
169
+ }();
170
+ function G(e) {
171
+ return e === c(e).document.documentElement;
172
+ }
173
+ function L(e) {
174
+ return v ? D(e) ? C(e) : S(e) : y;
175
+ }
176
+ function P(e) {
177
+ var t = e.x, n = e.y, r = e.width, i = e.height, o = typeof DOMRectReadOnly != "undefined" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
178
+ return m(s, {
179
+ x: t,
180
+ y: n,
181
+ width: r,
182
+ height: i,
183
+ top: n,
184
+ right: t + r,
185
+ bottom: i + n,
186
+ left: t
187
+ }), s;
188
+ }
189
+ function d(e, t, n, r) {
190
+ return {
191
+ x: e,
192
+ y: t,
193
+ width: n,
194
+ height: r
195
+ };
196
+ }
197
+ var W = (
198
+ /** @class */
199
+ function() {
200
+ function e(t) {
201
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = d(0, 0, 0, 0), this.target = t;
202
+ }
203
+ return e.prototype.isActive = function() {
204
+ var t = L(this.target);
205
+ return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
206
+ }, e.prototype.broadcastRect = function() {
207
+ var t = this.contentRect_;
208
+ return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
209
+ }, e;
210
+ }()
211
+ ), j = (
212
+ /** @class */
213
+ function() {
214
+ function e(t, n) {
215
+ var r = P(n);
216
+ m(this, {
217
+ target: t,
218
+ contentRect: r
219
+ });
220
+ }
221
+ return e;
222
+ }()
223
+ ), F = (
224
+ /** @class */
225
+ function() {
226
+ function e(t, n, r) {
227
+ if (this.activeObservations_ = [], this.observations_ = new _(), typeof t != "function")
228
+ throw new TypeError("The callback provided as parameter 1 is not a function.");
229
+ this.callback_ = t, this.controller_ = n, this.callbackCtx_ = r;
230
+ }
231
+ return e.prototype.observe = function(t) {
232
+ if (!arguments.length)
233
+ throw new TypeError("1 argument required, but only 0 present.");
234
+ if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
235
+ if (!(t instanceof c(t).Element))
236
+ throw new TypeError('parameter 1 is not of type "Element".');
237
+ var n = this.observations_;
238
+ n.has(t) || (n.set(t, new W(t)), this.controller_.addObserver(this), this.controller_.refresh());
239
+ }
240
+ }, e.prototype.unobserve = function(t) {
241
+ if (!arguments.length)
242
+ throw new TypeError("1 argument required, but only 0 present.");
243
+ if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
244
+ if (!(t instanceof c(t).Element))
245
+ throw new TypeError('parameter 1 is not of type "Element".');
246
+ var n = this.observations_;
247
+ n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
248
+ }
249
+ }, e.prototype.disconnect = function() {
250
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
251
+ }, e.prototype.gatherActive = function() {
252
+ var t = this;
253
+ this.clearActive(), this.observations_.forEach(function(n) {
254
+ n.isActive() && t.activeObservations_.push(n);
255
+ });
256
+ }, e.prototype.broadcastActive = function() {
257
+ if (this.hasActive()) {
258
+ var t = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
259
+ return new j(r.target, r.broadcastRect());
260
+ });
261
+ this.callback_.call(t, n, t), this.clearActive();
262
+ }
263
+ }, e.prototype.clearActive = function() {
264
+ this.activeObservations_.splice(0);
265
+ }, e.prototype.hasActive = function() {
266
+ return this.activeObservations_.length > 0;
267
+ }, e;
268
+ }()
269
+ ), g = typeof WeakMap != "undefined" ? /* @__PURE__ */ new WeakMap() : new _(), w = (
270
+ /** @class */
271
+ function() {
272
+ function e(t) {
273
+ if (!(this instanceof e))
274
+ throw new TypeError("Cannot call a class as a function.");
275
+ if (!arguments.length)
276
+ throw new TypeError("1 argument required, but only 0 present.");
277
+ var n = z.getInstance(), r = new F(t, n, this);
278
+ g.set(this, r);
279
+ }
280
+ return e;
281
+ }()
282
+ );
283
+ ["observe", "unobserve", "disconnect"].forEach(function(e) {
284
+ w.prototype[e] = function() {
285
+ var t;
286
+ return (t = g.get(this))[e].apply(t, arguments);
287
+ };
288
+ });
289
+ var H = function() {
290
+ return typeof f.ResizeObserver != "undefined" ? f.ResizeObserver : w;
291
+ }();
292
+ export {
293
+ H as default
294
+ };
@@ -1,15 +1,64 @@
1
- function i(r) {
2
- var e = typeof Symbol == "function" && Symbol.iterator, n = e && r[e], t = 0;
3
- if (n)
4
- return n.call(r);
1
+ function y(r, t, e, n) {
2
+ function f(i) {
3
+ return i instanceof e ? i : new e(function(o) {
4
+ o(i);
5
+ });
6
+ }
7
+ return new (e || (e = Promise))(function(i, o) {
8
+ function c(u) {
9
+ try {
10
+ a(n.next(u));
11
+ } catch (l) {
12
+ o(l);
13
+ }
14
+ }
15
+ function p(u) {
16
+ try {
17
+ a(n.throw(u));
18
+ } catch (l) {
19
+ o(l);
20
+ }
21
+ }
22
+ function a(u) {
23
+ u.done ? i(u.value) : f(u.value).then(c, p);
24
+ }
25
+ a((n = n.apply(r, t || [])).next());
26
+ });
27
+ }
28
+ function d(r) {
29
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
30
+ if (e)
31
+ return e.call(r);
5
32
  if (r && typeof r.length == "number")
6
33
  return {
7
34
  next: function() {
8
- return r && t >= r.length && (r = void 0), { value: r && r[t++], done: !r };
35
+ return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
9
36
  }
10
37
  };
11
- throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
38
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
39
+ }
40
+ function s(r, t) {
41
+ var e = typeof Symbol == "function" && r[Symbol.iterator];
42
+ if (!e)
43
+ return r;
44
+ var n = e.call(r), f, i = [], o;
45
+ try {
46
+ for (; (t === void 0 || t-- > 0) && !(f = n.next()).done; )
47
+ i.push(f.value);
48
+ } catch (c) {
49
+ o = { error: c };
50
+ } finally {
51
+ try {
52
+ f && !f.done && (e = n.return) && e.call(n);
53
+ } finally {
54
+ if (o)
55
+ throw o.error;
56
+ }
57
+ }
58
+ return i;
12
59
  }
13
60
  export {
14
- i as __values
61
+ y as __awaiter,
62
+ s as __read,
63
+ d as __values
15
64
  };
@@ -0,0 +1,120 @@
1
+ import { commonjsGlobal as gi } from "../../../_virtual/_commonjsHelpers.mjs";
2
+ import { __module as J } from "../../../_virtual/ua-parser.min.mjs";
3
+ (function(Q, $) {
4
+ (function(x, u) {
5
+ var mi = "1.0.37", O = "", ii = "?", j = "function", N = "undefined", D = "object", R = "string", ei = "major", e = "model", a = "name", i = "type", o = "vendor", r = "version", p = "architecture", E = "console", n = "mobile", b = "tablet", m = "smarttv", _ = "wearable", V = "embedded", G = 500, M = "Amazon", S = "Apple", oi = "ASUS", ai = "BlackBerry", k = "Browser", z = "Chrome", pi = "Edge", q = "Firefox", C = "Google", ri = "Huawei", F = "LG", H = "Microsoft", ti = "Motorola", U = "Opera", P = "Samsung", si = "Sharp", B = "Sony", Y = "Xiaomi", W = "Zebra", ni = "Facebook", bi = "Chromium OS", wi = "Mac OS", hi = function(w, c) {
6
+ var s = {};
7
+ for (var d in w)
8
+ c[d] && c[d].length % 2 === 0 ? s[d] = c[d].concat(w[d]) : s[d] = w[d];
9
+ return s;
10
+ }, I = function(w) {
11
+ for (var c = {}, s = 0; s < w.length; s++)
12
+ c[w[s].toUpperCase()] = w[s];
13
+ return c;
14
+ }, li = function(w, c) {
15
+ return typeof w === R ? T(c).indexOf(T(w)) !== -1 : !1;
16
+ }, T = function(w) {
17
+ return w.toLowerCase();
18
+ }, vi = function(w) {
19
+ return typeof w === R ? w.replace(/[^\d\.]/g, O).split(".")[0] : u;
20
+ }, Z = function(w, c) {
21
+ if (typeof w === R)
22
+ return w = w.replace(/^\s\s*/, O), typeof c === N ? w : w.substring(0, G);
23
+ }, A = function(w, c) {
24
+ for (var s = 0, d, g, v, l, t, f; s < c.length && !t; ) {
25
+ var K = c[s], ui = c[s + 1];
26
+ for (d = g = 0; d < K.length && !t && K[d]; )
27
+ if (t = K[d++].exec(w), t)
28
+ for (v = 0; v < ui.length; v++)
29
+ f = t[++g], l = ui[v], typeof l === D && l.length > 0 ? l.length === 2 ? typeof l[1] == j ? this[l[0]] = l[1].call(this, f) : this[l[0]] = l[1] : l.length === 3 ? typeof l[1] === j && !(l[1].exec && l[1].test) ? this[l[0]] = f ? l[1].call(this, f, l[2]) : u : this[l[0]] = f ? f.replace(l[1], l[2]) : u : l.length === 4 && (this[l[0]] = f ? l[3].call(this, f.replace(l[1], l[2])) : u) : this[l] = f || u;
30
+ s += 2;
31
+ }
32
+ }, X = function(w, c) {
33
+ for (var s in c)
34
+ if (typeof c[s] === D && c[s].length > 0) {
35
+ for (var d = 0; d < c[s].length; d++)
36
+ if (li(c[s][d], w))
37
+ return s === ii ? u : s;
38
+ } else if (li(c[s], w))
39
+ return s === ii ? u : s;
40
+ return w;
41
+ }, fi = {
42
+ "1.0": "/8",
43
+ 1.2: "/1",
44
+ 1.3: "/3",
45
+ "2.0": "/412",
46
+ "2.0.2": "/416",
47
+ "2.0.3": "/417",
48
+ "2.0.4": "/419",
49
+ "?": "/"
50
+ }, ci = {
51
+ ME: "4.90",
52
+ "NT 3.11": "NT3.51",
53
+ "NT 4.0": "NT4.0",
54
+ 2e3: "NT 5.0",
55
+ XP: ["NT 5.1", "NT 5.2"],
56
+ Vista: "NT 6.0",
57
+ 7: "NT 6.1",
58
+ 8: "NT 6.2",
59
+ 8.1: "NT 6.3",
60
+ 10: ["NT 6.4", "NT 10.0"],
61
+ RT: "ARM"
62
+ }, di = {
63
+ browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [r, [a, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [r, [a, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [a, r], [/opios[\/ ]+([\w\.]+)/i], [r, [a, U + " Mini"]], [/\bopr\/([\w\.]+)/i], [r, [a, U]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [r, [a, "Baidu"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [a, r], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [r, [a, "UC" + k]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [r, [a, "WeChat"]], [/konqueror\/([\w\.]+)/i], [r, [a, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [r, [a, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [r, [a, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [r, [a, "Smart Lenovo " + k]], [/(avast|avg)\/([\w\.]+)/i], [[a, /(.+)/, "$1 Secure " + k], r], [/\bfocus\/([\w\.]+)/i], [r, [a, q + " Focus"]], [/\bopt\/([\w\.]+)/i], [r, [a, U + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [r, [a, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [r, [a, "Dolphin"]], [/coast\/([\w\.]+)/i], [r, [a, U + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [r, [a, "MIUI " + k]], [/fxios\/([-\w\.]+)/i], [r, [a, q]], [/\bqihu|(qi?ho?o?|360)browser/i], [[a, "360 " + k]], [/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i], [[a, /(.+)/, "$1 " + k], r], [/samsungbrowser\/([\w\.]+)/i], [r, [a, P + " Internet"]], [/(comodo_dragon)\/([\w\.]+)/i], [[a, /_/g, " "], r], [/metasr[\/ ]?([\d\.]+)/i], [r, [a, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[a, "Sogou Mobile"], r], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i], [a, r], [/(lbbrowser)/i, /\[(linkedin)app\]/i], [a], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[a, ni], r], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [a, r], [/\bgsa\/([\w\.]+) .*safari\//i], [r, [a, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [r, [a, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [r, [a, z + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[a, z + " WebView"], r], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [r, [a, "Android " + k]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [a, r], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [r, [a, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [r, a], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [a, [r, X, fi]], [/(webkit|khtml)\/([\w\.]+)/i], [a, r], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[a, "Netscape"], r], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [r, [a, q + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [a, r], [/(cobalt)\/([\w\.]+)/i], [a, [r, /master.|lts./, ""]]],
64
+ cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[p, "amd64"]], [/(ia32(?=;))/i], [[p, T]], [/((?:i[346]|x)86)[;\)]/i], [[p, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[p, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[p, "armhf"]], [/windows (ce|mobile); ppc;/i], [[p, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[p, /ower/, O, T]], [/(sun4\w)[;\)]/i], [[p, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[p, T]]],
65
+ device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [e, [o, P], [i, b]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [e, [o, P], [i, n]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [e, [o, S], [i, n]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [e, [o, S], [i, b]], [/(macintosh);/i], [e, [o, S]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [e, [o, si], [i, n]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [e, [o, ri], [i, b]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [e, [o, ri], [i, n]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[e, /_/g, " "], [o, Y], [i, n]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[e, /_/g, " "], [o, Y], [i, b]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [e, [o, "OPPO"], [i, n]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [e, [o, "Vivo"], [i, n]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [e, [o, "Realme"], [i, n]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [e, [o, ti], [i, n]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [e, [o, ti], [i, b]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [e, [o, F], [i, b]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [e, [o, F], [i, n]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [e, [o, "Lenovo"], [i, b]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[e, /_/g, " "], [o, "Nokia"], [i, n]], [/(pixel c)\b/i], [e, [o, C], [i, b]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [e, [o, C], [i, n]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [e, [o, B], [i, n]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[e, "Xperia Tablet"], [o, B], [i, b]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [e, [o, "OnePlus"], [i, n]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [e, [o, M], [i, b]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[e, /(.+)/g, "Fire Phone $1"], [o, M], [i, n]], [/(playbook);[-\w\),; ]+(rim)/i], [e, o, [i, b]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [e, [o, ai], [i, n]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [e, [o, oi], [i, b]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [e, [o, oi], [i, n]], [/(nexus 9)/i], [e, [o, "HTC"], [i, b]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [o, [e, /_/g, " "], [i, n]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [e, [o, "Acer"], [i, b]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [e, [o, "Meizu"], [i, n]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [e, [o, "Ulefone"], [i, n]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [o, e, [i, n]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [o, e, [i, b]], [/(surface duo)/i], [e, [o, H], [i, b]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [e, [o, "Fairphone"], [i, n]], [/(u304aa)/i], [e, [o, "AT&T"], [i, n]], [/\bsie-(\w*)/i], [e, [o, "Siemens"], [i, n]], [/\b(rct\w+) b/i], [e, [o, "RCA"], [i, b]], [/\b(venue[\d ]{2,7}) b/i], [e, [o, "Dell"], [i, b]], [/\b(q(?:mv|ta)\w+) b/i], [e, [o, "Verizon"], [i, b]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [e, [o, "Barnes & Noble"], [i, b]], [/\b(tm\d{3}\w+) b/i], [e, [o, "NuVision"], [i, b]], [/\b(k88) b/i], [e, [o, "ZTE"], [i, b]], [/\b(nx\d{3}j) b/i], [e, [o, "ZTE"], [i, n]], [/\b(gen\d{3}) b.+49h/i], [e, [o, "Swiss"], [i, n]], [/\b(zur\d{3}) b/i], [e, [o, "Swiss"], [i, b]], [/\b((zeki)?tb.*\b) b/i], [e, [o, "Zeki"], [i, b]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[o, "Dragon Touch"], e, [i, b]], [/\b(ns-?\w{0,9}) b/i], [e, [o, "Insignia"], [i, b]], [/\b((nxa|next)-?\w{0,9}) b/i], [e, [o, "NextBook"], [i, b]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[o, "Voice"], e, [i, n]], [/\b(lvtel\-)?(v1[12]) b/i], [[o, "LvTel"], e, [i, n]], [/\b(ph-1) /i], [e, [o, "Essential"], [i, n]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [e, [o, "Envizen"], [i, b]], [/\b(trio[-\w\. ]+) b/i], [e, [o, "MachSpeed"], [i, b]], [/\btu_(1491) b/i], [e, [o, "Rotor"], [i, b]], [/(shield[\w ]+) b/i], [e, [o, "Nvidia"], [i, b]], [/(sprint) (\w+)/i], [o, e, [i, n]], [/(kin\.[onetw]{3})/i], [[e, /\./g, " "], [o, H], [i, n]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [e, [o, W], [i, b]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [e, [o, W], [i, n]], [/smart-tv.+(samsung)/i], [o, [i, m]], [/hbbtv.+maple;(\d+)/i], [[e, /^/, "SmartTV"], [o, P], [i, m]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[o, F], [i, m]], [/(apple) ?tv/i], [o, [e, S + " TV"], [i, m]], [/crkey/i], [[e, z + "cast"], [o, C], [i, m]], [/droid.+aft(\w+)( bui|\))/i], [e, [o, M], [i, m]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [e, [o, si], [i, m]], [/(bravia[\w ]+)( bui|\))/i], [e, [o, B], [i, m]], [/(mitv-\w{5}) bui/i], [e, [o, Y], [i, m]], [/Hbbtv.*(technisat) (.*);/i], [o, e, [i, m]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[o, Z], [e, Z], [i, m]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[i, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [o, e, [i, E]], [/droid.+; (shield) bui/i], [e, [o, "Nvidia"], [i, E]], [/(playstation [345portablevi]+)/i], [e, [o, B], [i, E]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [e, [o, H], [i, E]], [/((pebble))app/i], [o, e, [i, _]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [e, [o, S], [i, _]], [/droid.+; (glass) \d/i], [e, [o, C], [i, _]], [/droid.+; (wt63?0{2,3})\)/i], [e, [o, W], [i, _]], [/(quest( 2| pro)?)/i], [e, [o, ni], [i, _]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [o, [i, V]], [/(aeobc)\b/i], [e, [o, M], [i, V]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [e, [i, n]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [e, [i, b]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[i, b]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[i, n]], [/(android[-\w\. ]{0,9});.+buil/i], [e, [o, "Generic"]]],
66
+ engine: [[/windows.+ edge\/([\w\.]+)/i], [r, [a, pi + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [r, [a, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [a, r], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [r, a]],
67
+ os: [[/microsoft (windows) (vista|xp)/i], [a, r], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [a, [r, X, ci]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[r, X, ci], [a, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[r, /_/g, "."], [a, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[a, wi], [r, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [r, a], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [a, r], [/\(bb(10);/i], [r, [a, ai]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [r, [a, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [r, [a, q + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [r, [a, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [r, [a, "watchOS"]], [/crkey\/([\d\.]+)/i], [r, [a, z + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[a, bi], r], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [a, r], [/(sunos) ?([\w\.\d]*)/i], [[a, "Solaris"], r], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [a, r]]
68
+ }, h = function(w, c) {
69
+ if (typeof w === D && (c = w, w = u), !(this instanceof h))
70
+ return new h(w, c).getResult();
71
+ var s = typeof x !== N && x.navigator ? x.navigator : u, d = w || (s && s.userAgent ? s.userAgent : O), g = s && s.userAgentData ? s.userAgentData : u, v = c ? hi(di, c) : di, l = s && s.userAgent == d;
72
+ return this.getBrowser = function() {
73
+ var t = {};
74
+ return t[a] = u, t[r] = u, A.call(t, d, v.browser), t[ei] = vi(t[r]), l && s && s.brave && typeof s.brave.isBrave == j && (t[a] = "Brave"), t;
75
+ }, this.getCPU = function() {
76
+ var t = {};
77
+ return t[p] = u, A.call(t, d, v.cpu), t;
78
+ }, this.getDevice = function() {
79
+ var t = {};
80
+ return t[o] = u, t[e] = u, t[i] = u, A.call(t, d, v.device), l && !t[i] && g && g.mobile && (t[i] = n), l && t[e] == "Macintosh" && s && typeof s.standalone !== N && s.maxTouchPoints && s.maxTouchPoints > 2 && (t[e] = "iPad", t[i] = b), t;
81
+ }, this.getEngine = function() {
82
+ var t = {};
83
+ return t[a] = u, t[r] = u, A.call(t, d, v.engine), t;
84
+ }, this.getOS = function() {
85
+ var t = {};
86
+ return t[a] = u, t[r] = u, A.call(t, d, v.os), l && !t[a] && g && g.platform != "Unknown" && (t[a] = g.platform.replace(/chrome os/i, bi).replace(/macos/i, wi)), t;
87
+ }, this.getResult = function() {
88
+ return {
89
+ ua: this.getUA(),
90
+ browser: this.getBrowser(),
91
+ engine: this.getEngine(),
92
+ os: this.getOS(),
93
+ device: this.getDevice(),
94
+ cpu: this.getCPU()
95
+ };
96
+ }, this.getUA = function() {
97
+ return d;
98
+ }, this.setUA = function(t) {
99
+ return d = typeof t === R && t.length > G ? Z(t, G) : t, this;
100
+ }, this.setUA(d), this;
101
+ };
102
+ h.VERSION = mi, h.BROWSER = I([a, r, ei]), h.CPU = I([p]), h.DEVICE = I([e, o, i, E, n, m, b, _, V]), h.ENGINE = h.OS = I([a, r]), Q.exports && ($ = Q.exports = h), $.UAParser = h;
103
+ var y = typeof x !== N && (x.jQuery || x.Zepto);
104
+ if (y && !y.ua) {
105
+ var L = new h();
106
+ y.ua = L.getResult(), y.ua.get = function() {
107
+ return L.getUA();
108
+ }, y.ua.set = function(w) {
109
+ L.setUA(w);
110
+ var c = L.getResult();
111
+ for (var s in c)
112
+ y.ua[s] = c[s];
113
+ };
114
+ }
115
+ })(typeof window == "object" ? window : gi);
116
+ })(J, J.exports);
117
+ var _i = J.exports;
118
+ export {
119
+ _i as u
120
+ };
@@ -1,49 +1,64 @@
1
- import { KB as c, MB as p, GB as a } from "../constant.mjs";
2
- const m = (e) => {
1
+ import { KB as i, MB as a, GB as p } from "../constant.mjs";
2
+ const g = (e) => {
3
3
  if (e)
4
4
  return e.split(".").pop();
5
- }, g = (e) => {
5
+ }, x = (e) => {
6
6
  var t = e.match(/^.*\.(jpg|jpeg|png|bmp|JPG|JPEG|PNG|BMP)$/);
7
7
  return t ? t[1] : null;
8
- }, x = (e) => e < c ? e + " B" : e < p ? (e / c).toFixed(1) + " KB" : e < a ? (e / p).toFixed(1) + " MB" : (e / a).toFixed(1) + " GB", $ = (e) => e == null ? void 0 : e.replace(/[\r\n]+/gm, ""), w = (e) => {
8
+ }, v = (e) => e < i ? e + " B" : e < a ? (e / i).toFixed(1) + " KB" : e < p ? (e / a).toFixed(1) + " MB" : (e / p).toFixed(1) + " GB", f = (e) => e == null ? void 0 : e.replace(/[\r\n]+/gm, ""), w = (e) => {
9
9
  const t = /(.+)(?=\.\w+$)/, r = e == null ? void 0 : e.match(t);
10
10
  return r && r[1] ? r[1] : "";
11
- }, B = (e) => new Promise((t, r) => {
11
+ }, $ = (e) => new Promise((t, r) => {
12
12
  const n = new FileReader();
13
- n.readAsDataURL(e), n.onload = () => t(n.result), n.onerror = (o) => r(o);
14
- }), l = (e) => JSON.parse(window.atob(e.split(".")[1])), E = (e) => {
13
+ n.readAsDataURL(e), n.onload = () => t(n.result), n.onerror = (s) => r(s);
14
+ }), l = (e) => JSON.parse(window.atob(e.split(".")[1])), h = (e) => {
15
15
  const t = l(e).exp;
16
16
  return (/* @__PURE__ */ new Date()).valueOf() / 1e3 >= t;
17
17
  };
18
18
  var u = /* @__PURE__ */ ((e) => (e.NETWORK = "请你优先从网络中搜索", e.DOCUMENT = "请你优先从以上文件中搜索", e))(u || {});
19
- const f = 40, F = (e) => /^https?:\/\/.*?\..+$/.test(e), T = ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword", "application/wps-office.docx"];
20
- function h(e) {
19
+ const E = 40, B = (e) => /^https?:\/\/.*?\..+$/.test(e), T = ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword", "application/wps-office.docx"];
20
+ function F(e) {
21
21
  const t = e.split(/(```[\s\S]*?```|`[^`]*?`|<code>[\s\S]*?<\/code>)/);
22
22
  let r = "";
23
23
  for (let n = 0; n < t.length; n++)
24
24
  if (n % 2 === 0) {
25
- let o = t[n].replaceAll(/\\\[([\s\S]*?)\\\]/g, (i, s) => `$$${s}$$`).replaceAll(/\\\(([\s\S]*?)\\\)/g, (i, s) => `$${s}$`);
26
- r += o;
25
+ let s = t[n].replaceAll(/\\\[([\s\S]*?)\\\]/g, (c, o) => `$$${o}$$`).replaceAll(/\\\(([\s\S]*?)\\\)/g, (c, o) => `$${o}$`);
26
+ r += s;
27
27
  } else
28
28
  r += t[n];
29
29
  return r;
30
30
  }
31
- function A(e) {
31
+ function M(e) {
32
32
  return e.replace(/([\\])/g, "\\$1");
33
33
  }
34
+ function A(e) {
35
+ var o;
36
+ var t = (() => {
37
+ try {
38
+ return new URL(e);
39
+ } catch (d) {
40
+ return null;
41
+ }
42
+ })();
43
+ if (!t)
44
+ return null;
45
+ var r = t.pathname, n = ((o = r.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "", s = ["jpg", "jpeg", "gif", "png"], c = ["mp4", "wmv", "avi", "mov"];
46
+ return s.includes(n) ? "image" : c.includes(n) ? "video" : null;
47
+ }
34
48
  export {
35
- f as FILE_NAME_MAX_LENGTH,
49
+ E as FILE_NAME_MAX_LENGTH,
36
50
  l as JWT,
37
- A as escapeSlash,
51
+ A as checkMediaType,
52
+ M as escapeSlash,
38
53
  w as extractFileName,
39
54
  T as fileTypes,
40
- x as formatFileSize,
41
- B as getBase64,
42
- m as getFileExtension,
43
- g as getImageExtension,
44
- E as isExpired,
45
- F as isValidImageUrlWithAnyExtension,
46
- $ as removeNewlines,
47
- h as replaceLatexDelimiters,
55
+ v as formatFileSize,
56
+ $ as getBase64,
57
+ g as getFileExtension,
58
+ x as getImageExtension,
59
+ h as isExpired,
60
+ B as isValidImageUrlWithAnyExtension,
61
+ f as removeNewlines,
62
+ F as replaceLatexDelimiters,
48
63
  u as shortCutEnum
49
64
  };