@zcrkey/js-utils 0.0.3 → 0.0.4
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 +56 -56
- package/dist/eventCenter.js +36 -36
- package/dist/index.umd.js +1 -1
- package/dist/storage.js +26 -26
- package/dist/util.d.ts +9 -0
- package/dist/util.js +101 -27
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# @zcrkey/js-utils
|
|
2
|
-
|
|
3
|
-
一个 javascript 实用函数库
|
|
4
|
-
|
|
5
|
-
## 安装和使用
|
|
6
|
-
|
|
7
|
-
### 通过 import 方式安装
|
|
8
|
-
|
|
9
|
-
在开始之前,你可能需要安装 [yarn](https://github.com/yarnpkg/yarn/) 或者 [pnpm](https://pnpm.io/zh/)。
|
|
10
|
-
|
|
11
|
-
从 yarn 或 npm 或 pnpm 安装并引入
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
$ yarn add @zcrkey/js-utils
|
|
15
|
-
# or
|
|
16
|
-
$ npm install @zcrkey/js-utils --save
|
|
17
|
-
# or
|
|
18
|
-
$ pnpm install @zcrkey/js-utils --save
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
修改 `src/App.js`,引入 @zcrkey/js-utils 。
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
import React from 'react';
|
|
26
|
-
import { CrUtil } from '@zcrkey/js-utils';
|
|
27
|
-
|
|
28
|
-
const App = () => (
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
console.log(CrUtil.trim(' @zcrkey/js-utils '))
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
<div className="App">
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default App;
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 通过独立版本安装
|
|
42
|
-
|
|
43
|
-
- 下载 @zcrkey/js-utils 的独立版本文件(如 index.umd.js)
|
|
44
|
-
- 在 HTML 文件的 \<head\> 或 \<body\> 部分添加 \<script\> 标签,并指向下载的 @zcrkey/js-utils 文件
|
|
45
|
-
- 在 HTML 文件中使用 @zcrkey/js-utils
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
<script src="./index.umd.js"></script>
|
|
49
|
-
<script>
|
|
50
|
-
console.log(CrUtil.trim(' @zcrkey/js-utils '))
|
|
51
|
-
</script>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## LICENSE
|
|
55
|
-
|
|
56
|
-
MIT
|
|
1
|
+
# @zcrkey/js-utils
|
|
2
|
+
|
|
3
|
+
一个 javascript 实用函数库
|
|
4
|
+
|
|
5
|
+
## 安装和使用
|
|
6
|
+
|
|
7
|
+
### 通过 import 方式安装
|
|
8
|
+
|
|
9
|
+
在开始之前,你可能需要安装 [yarn](https://github.com/yarnpkg/yarn/) 或者 [pnpm](https://pnpm.io/zh/)。
|
|
10
|
+
|
|
11
|
+
从 yarn 或 npm 或 pnpm 安装并引入
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
$ yarn add @zcrkey/js-utils
|
|
15
|
+
# or
|
|
16
|
+
$ npm install @zcrkey/js-utils --save
|
|
17
|
+
# or
|
|
18
|
+
$ pnpm install @zcrkey/js-utils --save
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
修改 `src/App.js`,引入 @zcrkey/js-utils 。
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
import React from 'react';
|
|
26
|
+
import { CrUtil } from '@zcrkey/js-utils';
|
|
27
|
+
|
|
28
|
+
const App = () => (
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
console.log(CrUtil.trim(' @zcrkey/js-utils '))
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
<div className="App">
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default App;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 通过独立版本安装
|
|
42
|
+
|
|
43
|
+
- 下载 @zcrkey/js-utils 的独立版本文件(如 index.umd.js)
|
|
44
|
+
- 在 HTML 文件的 \<head\> 或 \<body\> 部分添加 \<script\> 标签,并指向下载的 @zcrkey/js-utils 文件
|
|
45
|
+
- 在 HTML 文件中使用 @zcrkey/js-utils
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
<script src="./index.umd.js"></script>
|
|
49
|
+
<script>
|
|
50
|
+
console.log(CrUtil.trim(' @zcrkey/js-utils '))
|
|
51
|
+
</script>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## LICENSE
|
|
55
|
+
|
|
56
|
+
MIT
|
package/dist/eventCenter.js
CHANGED
|
@@ -12,14 +12,14 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
12
12
|
_createClass(CrEventCenter, null, [{
|
|
13
13
|
key: "on",
|
|
14
14
|
value:
|
|
15
|
-
/**
|
|
16
|
-
* 新增订阅
|
|
17
|
-
*
|
|
18
|
-
* @param {*} key 名称
|
|
19
|
-
* @param {*} listener 执行函数
|
|
20
|
-
* @returns 订阅信息
|
|
21
|
-
* @example
|
|
22
|
-
this.subscription = CrEventCenter.on('名称', (参数) => {});
|
|
15
|
+
/**
|
|
16
|
+
* 新增订阅
|
|
17
|
+
*
|
|
18
|
+
* @param {*} key 名称
|
|
19
|
+
* @param {*} listener 执行函数
|
|
20
|
+
* @returns 订阅信息
|
|
21
|
+
* @example
|
|
22
|
+
this.subscription = CrEventCenter.on('名称', (参数) => {});
|
|
23
23
|
*/
|
|
24
24
|
function on(key, listener) {
|
|
25
25
|
var _this = this;
|
|
@@ -44,13 +44,13 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
44
44
|
return subscription;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* 移除订阅
|
|
49
|
-
*
|
|
50
|
-
* @param {*} subscription
|
|
51
|
-
* @param {*} type 'all'
|
|
52
|
-
* @example
|
|
53
|
-
CrEventCenter.off(this.subscription);
|
|
47
|
+
/**
|
|
48
|
+
* 移除订阅
|
|
49
|
+
*
|
|
50
|
+
* @param {*} subscription
|
|
51
|
+
* @param {*} type 'all'
|
|
52
|
+
* @example
|
|
53
|
+
CrEventCenter.off(this.subscription);
|
|
54
54
|
*/
|
|
55
55
|
}, {
|
|
56
56
|
key: "off",
|
|
@@ -73,13 +73,13 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
/**
|
|
77
|
-
* 派发事件
|
|
78
|
-
*
|
|
79
|
-
* @param {*} key 名称
|
|
80
|
-
* @param {*} args 其余参数
|
|
81
|
-
* @example
|
|
82
|
-
CrEventCenter.emit('名称', 参数数据);
|
|
76
|
+
/**
|
|
77
|
+
* 派发事件
|
|
78
|
+
*
|
|
79
|
+
* @param {*} key 名称
|
|
80
|
+
* @param {*} args 其余参数
|
|
81
|
+
* @example
|
|
82
|
+
CrEventCenter.emit('名称', 参数数据);
|
|
83
83
|
*/
|
|
84
84
|
}, {
|
|
85
85
|
key: "emit",
|
|
@@ -97,12 +97,12 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* 查找事件
|
|
102
|
-
*
|
|
103
|
-
* @param {*} key 名称
|
|
104
|
-
* @example
|
|
105
|
-
let subscriber = CrEventCenter.find('名称');
|
|
100
|
+
/**
|
|
101
|
+
* 查找事件
|
|
102
|
+
*
|
|
103
|
+
* @param {*} key 名称
|
|
104
|
+
* @example
|
|
105
|
+
let subscriber = CrEventCenter.find('名称');
|
|
106
106
|
*/
|
|
107
107
|
}, {
|
|
108
108
|
key: "find",
|
|
@@ -112,12 +112,12 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
/**
|
|
116
|
-
* 清理所有事件
|
|
117
|
-
*
|
|
118
|
-
* @memberof CrEventCenter
|
|
119
|
-
* @example
|
|
120
|
-
CrEventCenter.clear();
|
|
115
|
+
/**
|
|
116
|
+
* 清理所有事件
|
|
117
|
+
*
|
|
118
|
+
* @memberof CrEventCenter
|
|
119
|
+
* @example
|
|
120
|
+
CrEventCenter.clear();
|
|
121
121
|
*/
|
|
122
122
|
}, {
|
|
123
123
|
key: "clear",
|
|
@@ -127,8 +127,8 @@ var CrEventCenter = /*#__PURE__*/function () {
|
|
|
127
127
|
}]);
|
|
128
128
|
return CrEventCenter;
|
|
129
129
|
}();
|
|
130
|
-
/**
|
|
131
|
-
* 储存订阅者
|
|
130
|
+
/**
|
|
131
|
+
* 储存订阅者
|
|
132
132
|
*/
|
|
133
133
|
_defineProperty(CrEventCenter, "subscribers", []);
|
|
134
134
|
export { CrEventCenter as default };
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){var e={192:function(e,t,r){"use strict";var n=r(898),o=r(610),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},610:function(e,t,r){"use strict";var n=r(345),o=r(898),i=r(481),a=r(115),l=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||n.call(c,l),p=r(696),f=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=u(n,c,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var s=function(){return u(n,l,arguments)};p?p(e.exports,"apply",{value:s}):e.exports.apply=s},270:function(e,t,r){"use strict";var n=r(944).default,o=r(696),i=r(619),a=r(115),l=r(305);e.exports=function(e,t,r){if(!e||"object"!==n(e)&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==n(t))throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],s=!!l&&l(e,t);if(o)o(e,t,{configurable:null===p&&s?s.configurable:!p,enumerable:null===c&&s?s.enumerable:!c,value:r,writable:null===u&&s?s.writable:!u});else{if(!f&&(c||u||p))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},696:function(e,t,r){"use strict";var n=r(898)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},413:function(e){"use strict";e.exports=EvalError},497:function(e){"use strict";e.exports=Error},313:function(e){"use strict";e.exports=RangeError},98:function(e){"use strict";e.exports=ReferenceError},619:function(e){"use strict";e.exports=SyntaxError},115:function(e){"use strict";e.exports=TypeError},59:function(e){"use strict";e.exports=URIError},206:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,o="[object Function]",i=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},l=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var c=this;if("function"!=typeof c||r.apply(c)!==o)throw new TypeError(t+c);for(var u,p=a(arguments,1),f=function(){if(this instanceof u){var t=c.apply(this,i(p,arguments));return Object(t)===t?t:this}return c.apply(e,i(p,arguments))},s=n(0,c.length-p.length),y=[],d=0;d<s;d++)y[d]="$"+d;if(u=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var b=function(){};b.prototype=c.prototype,u.prototype=new b,b.prototype=null}return u}},345:function(e,t,r){"use strict";var n=r(206);e.exports=Function.prototype.bind||n},898:function(e,t,r){"use strict";var n,o=r(944).default,i=r(497),a=r(413),l=r(313),c=r(98),u=r(619),p=r(115),f=r(59),s=Function,y=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}var b=function(){throw new p},g=d?function(){try{return b}catch(e){try{return d(arguments,"callee").get}catch(e){return b}}}():b,m=r(561)(),h=r(390)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),S={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":o(JSON))?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":l,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":w,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var x=v(v(e));j["%Error.prototype%"]=x}var O=function e(t){var r;if("%AsyncFunction%"===t)r=y("async function () {}");else if("%GeneratorFunction%"===t)r=y("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=y("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return j[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=r(345),E=r(156),I=P.call(Function.call,Array.prototype.concat),k=P.call(Function.apply,Array.prototype.splice),F=P.call(Function.call,String.prototype.replace),_=P.call(Function.call,String.prototype.slice),D=P.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,R=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return F(e,M,(function(e,t,r,o){n[n.length]=r?F(o,N,"$1"):t||e})),n},T=function(e,t){var r,n=e;if(E(A,n)&&(n="%"+(r=A[n])[0]+"%"),E(j,n)){var o=j[n];if(o===S&&(o=O(n)),void 0===o&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===D(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=R(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),i=o.name,a=o.value,l=!1,c=o.alias;c&&(n=c[0],k(r,I([0,1],c)));for(var f=1,s=!0;f<r.length;f+=1){var y=r[f],b=_(y,0,1),g=_(y,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==y&&s||(l=!0),E(j,i="%"+(n+="."+y)+"%"))a=j[i];else if(null!=a){if(!(y in a)){if(!t)throw new p("base intrinsic for "+e+" exists, but the property is not available.");return}if(d&&f+1>=r.length){var m=d(a,y);a=(s=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[y]}else s=E(a,y),a=a[y];s&&!l&&(j[i]=a)}}return a}},305:function(e,t,r){"use strict";var n=r(898)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},772:function(e,t,r){"use strict";var n=r(696),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},390:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},561:function(e,t,r){"use strict";var n=r(944).default,o="undefined"!=typeof Symbol&&Symbol,i=r(300);e.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"===n(o("foo"))&&("symbol"===n(Symbol("bar"))&&i())))}},300:function(e,t,r){"use strict";var n=r(944).default;e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===n(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},156:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(345);e.exports=i.call(n,o)},182:function(e,t,r){var n=r(944).default,o="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,l=o&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=c&&u&&"function"==typeof u.get?u.get:null,f=c&&Set.prototype.forEach,s="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,y="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,S=String.prototype.replace,w=String.prototype.toUpperCase,j=String.prototype.toLowerCase,x=RegExp.prototype.test,O=Array.prototype.concat,A=Array.prototype.join,P=Array.prototype.slice,E=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,F="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?Symbol.prototype.toString:null,_="function"==typeof Symbol&&"object"===n(Symbol.iterator),D="function"==typeof Symbol&&Symbol.toStringTag&&(n(Symbol.toStringTag)===_||"symbol")?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-E(-e):E(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return S.call(o,r,"$&_")+"."+S.call(S.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(t,r,"$&_")}var T=r(654),C=T.custom,U=$(C)?C:null;function B(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function L(e){return S.call(String(e),/"/g,""")}function W(e){return!("[object Array]"!==V(e)||D&&"object"===n(e)&&D in e)}function K(e){return!("[object RegExp]"!==V(e)||D&&"object"===n(e)&&D in e)}function $(e){if(_)return e&&"object"===n(e)&&e instanceof Symbol;if("symbol"===n(e))return!0;if(!e||"object"!==n(e)||!F)return!1;try{return F.call(e),!0}catch(e){}return!1}e.exports=function e(t,o,i,c){var u=o||{};if(H(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!H(u,"customInspect")||u.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var x=String(t);return w?R(t,x):x}if("bigint"==typeof t){var E=String(t)+"n";return w?R(t,E):E}var k=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=k&&k>0&&"object"===n(t))return W(t)?"[Array]":"[Object]";var C=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=A.call(Array(e.indent+1)," ")}return{base:r,prev:A.call(Array(t+1),r)}}(u,i);if(void 0===c)c=[];else if(q(c,t)>=0)return"[Circular]";function G(t,r,n){if(r&&(c=P.call(c)).push(r),n){var o={depth:u.depth};return H(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),e(t,o,i+1,c)}return e(t,u,i+1,c)}if("function"==typeof t&&!K(t)){var J=function(e){if(e.name)return e.name;var t=h.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),te=ee(t,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(te.length>0?" { "+A.call(te,", ")+" }":"")}if($(t)){var re=_?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==n(t)||_?re:Q(re)}if(function(e){if(!e||"object"!==n(e))return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+j.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie<oe.length;ie++)ne+=" "+oe[ie].name+"="+B(L(oe[ie].value),"double",u);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+j.call(String(t.nodeName))+">"}if(W(t)){if(0===t.length)return"[]";var ae=ee(t,G);return C&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Z(ae,C)+"]":"[ "+A.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||D&&"object"===n(e)&&D in e)}(t)){var le=ee(t,G);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(le,", ")+" }":"{ ["+String(t)+"] "+A.call(O.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"===n(t)&&g){if(U&&"function"==typeof t[U]&&T)return T(t,{depth:k-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==n(e))return!1;try{a.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return l&&l.call(t,(function(e,r){ce.push(G(r,t,!0)+" => "+G(e,t))})),Y("Map",a.call(t),ce,C)}if(function(e){if(!p||!e||"object"!==n(e))return!1;try{p.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return f&&f.call(t,(function(e){ue.push(G(e,t))})),Y("Set",p.call(t),ue,C)}if(function(e){if(!s||!e||"object"!==n(e))return!1;try{s.call(e,s);try{y.call(e,y)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!y||!e||"object"!==n(e))return!1;try{y.call(e,y);try{s.call(e,s)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!d||!e||"object"!==n(e))return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return!("[object Number]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(G(Number(t)));if(function(e){if(!e||"object"!==n(e)||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return Q(G(I.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(b.call(t));if(function(e){return!("[object String]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==V(e)||D&&"object"===n(e)&&D in e)}(t)&&!K(t)){var pe=ee(t,G),fe=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",ye=!fe&&D&&Object(t)===t&&D in t?v.call(V(t),8,-1):se?"Object":"",de=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ye||se?"["+A.call(O.call([],ye||[],se||[]),": ")+"] ":"");return 0===pe.length?de+"{}":C?de+"{"+Z(pe,C)+"}":de+"{ "+A.call(pe,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function V(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(v.call(e,0,t.maxStringLength),t)+n}return B(S.call(S.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+A.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r=W(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=H(e,o)?t(e[o],e):""}var i,a="function"==typeof k?k(e):[];if(_){i={};for(var l=0;l<a.length;l++)i["$"+a[l]]=a[l]}for(var c in e)H(e,c)&&(r&&String(Number(c))===c&&c<e.length||_&&i["$"+c]instanceof Symbol||(x.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof k)for(var u=0;u<a.length;u++)M.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}},112:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},460:function(e,t,r){"use strict";var n=r(302),o=r(355),i=r(112);e.exports={formats:i,parse:o,stringify:n}},355:function(e,t,r){"use strict";var n=r(133),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=l?i.slice(0,l.index):i,p=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;p.push(u)}for(var f=0;r.depth>0&&null!==(l=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(l[1])}return l&&p.push("["+i.slice(l.index)+"]"),function(e,t,r,n){for(var o=n?t:c(t,r),i=e.length-1;i>=0;--i){var a,l=e[i];if("[]"===l&&r.parseArrays)a=r.allowEmptyArrays&&""===o?[]:[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,p=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,f=parseInt(p,10);r.parseArrays||""!==p?!isNaN(f)&&l!==p&&String(f)===p&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=o:"__proto__"!==p&&(a[p]=o):a={0:o}}o=a}return o}(p,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var p="string"==typeof e?function(e,t){var r,u={__proto__:null},p=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,s=p.split(t.delimiter,f),y=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?d="utf-8":"utf8=%26%2310003%3B"===s[r]&&(d="iso-8859-1"),y=r,r=s.length);for(r=0;r<s.length;++r)if(r!==y){var b,g,m=s[r],h=m.indexOf("]="),v=-1===h?m.indexOf("="):h+1;-1===v?(b=t.decoder(m,a.decoder,d,"key"),g=t.strictNullHandling?null:""):(b=t.decoder(m.slice(0,v),a.decoder,d,"key"),g=n.maybeMap(c(m.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,d,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===d&&(g=l(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g);var S=o.call(u,b);S&&"combine"===t.duplicates?u[b]=n.combine(u[b],g):S&&"last"!==t.duplicates||(u[b]=g)}return u}(e,r):e,f=r.plainObjects?Object.create(null):{},s=Object.keys(p),y=0;y<s.length;++y){var d=s[y],b=u(d,p[d],r,"string"==typeof e);f=n.merge(f,b,r)}return!0===r.allowSparse?f:n.compact(f)}},302:function(e,t,r){"use strict";var n=r(944).default,o=r(520),i=r(133),a=r(112),l=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,p=Array.prototype.push,f=function(e,t){p.apply(e,u(t)?t:[t])},s=Date.prototype.toISOString,y=a.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:y,formatter:a.formatters[y],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},b={},g=function e(t,r,a,l,c,p,s,y,g,m,h,v,S,w,j,x,O,A){for(var P,E=t,I=A,k=0,F=!1;void 0!==(I=I.get(b))&&!F;){var _=I.get(t);if(k+=1,void 0!==_){if(_===k)throw new RangeError("Cyclic object value");F=!0}void 0===I.get(b)&&(k=0)}if("function"==typeof m?E=m(r,E):E instanceof Date?E=S(E):"comma"===a&&u(E)&&(E=i.maybeMap(E,(function(e){return e instanceof Date?S(e):e}))),null===E){if(p)return g&&!x?g(r,d.encoder,O,"key",w):r;E=""}if("string"==typeof(P=E)||"number"==typeof P||"boolean"==typeof P||"symbol"===n(P)||"bigint"==typeof P||i.isBuffer(E))return g?[j(x?r:g(r,d.encoder,O,"key",w))+"="+j(g(E,d.encoder,O,"value",w))]:[j(r)+"="+j(String(E))];var D,M=[];if(void 0===E)return M;if("comma"===a&&u(E))x&&g&&(E=i.maybeMap(E,g)),D=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(m))D=m;else{var N=Object.keys(E);D=h?N.sort(h):N}var R=y?r.replace(/\./g,"%2E"):r,T=l&&u(E)&&1===E.length?R+"[]":R;if(c&&u(E)&&0===E.length)return T+"[]";for(var C=0;C<D.length;++C){var U=D[C],B="object"===n(U)&&void 0!==U.value?U.value:E[U];if(!s||null!==B){var L=v&&y?U.replace(/\./g,"%2E"):U,W=u(E)?"function"==typeof a?a(T,L):T:T+(v?"."+L:"["+L+"]");A.set(t,k);var K=o();K.set(b,A),f(M,e(B,W,a,l,c,p,s,y,"comma"===a&&x&&u(E)?null:g,m,h,v,S,w,j,x,O,K))}}return M};e.exports=function(e,t){var r,i=e,p=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=a.default;if(void 0!==e.format){if(!l.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=a.formatters[r],i=d.filter;if(("function"==typeof e.filter||u(e.filter))&&(i=e.filter),n=e.arrayFormat in c?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof p.filter?i=(0,p.filter)("",i):u(p.filter)&&(r=p.filter);var s=[];if("object"!==n(i)||null===i)return"";var y=c[p.arrayFormat],b="comma"===y&&p.commaRoundTrip;r||(r=Object.keys(i)),p.sort&&r.sort(p.sort);for(var m=o(),h=0;h<r.length;++h){var v=r[h];p.skipNulls&&null===i[v]||f(s,g(i[v],v,y,b,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,m))}var S=s.join(p.delimiter),w=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),S.length>0?w+S:""}},133:function(e,t,r){"use strict";var n=r(944).default,o=r(112),i=Object.prototype.hasOwnProperty,a=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},u=1024;e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],l=i.obj[i.prop],c=Object.keys(l),u=0;u<c.length;++u){var p=c[u],f=l[p];"object"===n(f)&&null!==f&&-1===r.indexOf(f)&&(t.push({obj:l,prop:p}),r.push(f))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var c=e;if("symbol"===n(e)?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var p="",f=0;f<c.length;f+=u){for(var s=c.length>=u?c.slice(f,f+u):c,y=[],d=0;d<s.length;++d){var b=s.charCodeAt(d);45===b||46===b||95===b||126===b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||a===o.RFC1738&&(40===b||41===b)?y[y.length]=s.charAt(d):b<128?y[y.length]=l[b]:b<2048?y[y.length]=l[192|b>>6]+l[128|63&b]:b<55296||b>=57344?y[y.length]=l[224|b>>12]+l[128|b>>6&63]+l[128|63&b]:(d+=1,b=65536+((1023&b)<<10|1023&s.charCodeAt(d)),y[y.length]=l[240|b>>18]+l[128|b>>12&63]+l[128|b>>6&63]+l[128|63&b])}p+=y.join("")}return p},isBuffer:function(e){return!(!e||"object"!==n(e))&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!==n(r)){if(a(t))t.push(r);else{if(!t||"object"!==n(t))return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==n(t))return[t].concat(r);var l=t;return a(t)&&!a(r)&&(l=c(t,o)),a(t)&&a(r)?(r.forEach((function(r,a){if(i.call(t,a)){var l=t[a];l&&"object"===n(l)&&r&&"object"===n(r)?t[a]=e(l,r,o):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),l)}}},481:function(e,t,r){"use strict";var n=r(898),o=r(270),i=r(772)(),a=r(305),l=r(115),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new l("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new l("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var p=a(e,"length");p&&!p.configurable&&(n=!1),p&&!p.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},520:function(e,t,r){"use strict";var n=r(944).default,o=r(898),i=r(192),a=r(182),l=r(115),c=o("%WeakMap%",!0),u=o("%Map%",!0),p=i("WeakMap.prototype.get",!0),f=i("WeakMap.prototype.set",!0),s=i("WeakMap.prototype.has",!0),y=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),b=i("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new l("Side channel does not contain "+a(e))},get:function(o){if(c&&o&&("object"===n(o)||"function"==typeof o)){if(e)return p(e,o)}else if(u){if(t)return y(t,o)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,o)},has:function(o){if(c&&o&&("object"===n(o)||"function"==typeof o)){if(e)return s(e,o)}else if(u){if(t)return b(t,o)}else if(r)return function(e,t){return!!g(e,t)}(r,o);return!1},set:function(o,i){c&&o&&("object"===n(o)||"function"==typeof o)?(e||(e=new c),f(e,o,i)):u?(t||(t=new u),d(t,o,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,o,i))}};return o}},654:function(){},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},786:function(e,t,r){var n=r(317);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,r){var n=r(281);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,r){var n=r(281);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},682:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},114:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,r){var n=r(143);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,r){var n=r(180),o=r(249),i=r(508),a=r(20);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},44:function(e,t,r){var n=r(786),o=r(682),i=r(508),a=r(114);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,r){var n=r(944).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,r){var n=r(944).default,o=r(224);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,r){var n=r(317);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{CrEventCenter:function(){return c},CrStorage:function(){return u},CrUtil:function(){return S}});var e=r(486),t=r.n(e),o=r(702),i=r.n(o),a=r(143),l=r.n(a),c=function(){function e(){t()(this,e)}return i()(e,null,[{key:"on",value:function(e,t){var r=this,n=this.subscribers.find((function(t){return t.key==e}));n?n.listeners.push(t):this.subscribers.push({key:e,listeners:[t]});var o={key:e,listener:t,remove:function(){r.off(o)}};return o}},{key:"off",value:function(e,t){var r=this.subscribers.findIndex((function(t){return t.key==e.key}));if(r>-1)if("all"==t)this.subscribers.splice(r,1);else{var n=this.subscribers[r],o=n.listeners.findIndex((function(t){return t==e.listener}));o>-1&&n.listeners.splice(o,1)}}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=this.subscribers.find((function(t){return t.key==e}));o&&o.listeners&&o.listeners.length>0&&o.listeners.forEach((function(e){e.apply(void 0,r)}))}},{key:"find",value:function(e){return this.subscribers.find((function(t){return t.key==e}))}},{key:"clear",value:function(){this.subscribers.length=0}}]),e}();l()(c,"subscribers",[]);var u=function(){function e(){t()(this,e)}return i()(e,null,[{key:"setLocalItem",value:function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){console.warn("setLocalItem:".concat(e,":").concat(t))}}},{key:"getLocalItem",value:function(e){var t=localStorage.getItem(e);if(!t)return null;if("undefined"===t)return null;try{return JSON.parse(t)}catch(t){return console.warn("getLocalItem:".concat(e,":").concat(t)),null}}},{key:"removeLocalItem",value:function(e){localStorage.removeItem(e)}},{key:"clearLocal",value:function(){localStorage.clear()}},{key:"setSessionItem",value:function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(t){console.warn("setSessionItem:".concat(e,":").concat(t))}}},{key:"getSessionItem",value:function(e){var t=sessionStorage.getItem(e);if(!t)return null;if("undefined"===t)return null;try{return JSON.parse(t)}catch(t){return console.warn("getSessionItem:".concat(e,":").concat(t)),null}}},{key:"removeSessionItem",value:function(e){sessionStorage.removeItem(e)}},{key:"clearSession",value:function(){sessionStorage.clear()}}]),e}(),p=r(925),f=r.n(p),s=r(44),y=r.n(s),d=r(118),b=r.n(d),g=r(944),m=r.n(g),h=r(460),v=r.n(h),S=function(){function e(){t()(this,e)}return i()(e,null,[{key:"isArray",value:function(e){return Array.isArray(e)}},{key:"isObject",value:function(t){return"object"===m()(t)&&null!==t&&!e.isArray(t)}},{key:"isEmptyObject",value:function(e){return 0===Object.keys(e).length&&e.constructor===Object}},{key:"isObjectPropertiesAllEmpty",value:function(e){return Object.keys(e).every((function(t){var r=e[t];return null==r||""===r||0===r&&"number"==typeof r||isNaN(r)}))}},{key:"isDate",value:function(e){return"[object Date]"===Object.prototype.toString.call(e)}},{key:"isString",value:function(e){return"[object String]"===Object.prototype.toString.call(e)}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"isFile",value:function(e){return"[object File]"===Object.prototype.toString.call(e)}},{key:"isBoolean",value:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)}},{key:"trim",value:function(e){return(e+"").replace(/(^[\s\n\t]+|[\s\n\t]+$)/g,"")}},{key:"getArrayDimension",value:function(t){if(!e.isArray(t))return 0;for(var r=0,n=0;n<t.length;n++){var o=e.getArrayDimension(t[n]);r=Math.max(r,o)}return r+1}},{key:"deepCopy",value:function(t){var r;if(e.isArray(t)){r=[];for(var n=0,o=t.length;n<o;n++)e.isArray(t[n])||e.isObject(t[n])?r.push(e.deepCopy(t[n])):r.push(t[n])}else if(e.isObject(t))for(var i in r={},t)e.isArray(t[i])||e.isObject(t[i])?r[i]=e.deepCopy(t[i]):r[i]=t[i];else r=t;return r}},{key:"listToTreeData",value:function(t,r){var n=Object.assign({idField:"id",pidField:"parentId",childrenField:"children",isDeepCopy:!1,getData:function(e){return e}},r);n.isDeepCopy&&(t=e.deepCopy(t));var o=[],i={};return t.forEach((function(e){o.push(n.getData(e)),i[e[n.idField]]=e})),o.filter((function(e){var t=o.filter((function(t){return e[n.idField]==t[n.pidField]}));return null!=t&&t.length>0&&(e[n.childrenField]=t),0==e[n.pidField]||null==e[n.pidField]||null==e[n.pidField]||!i[e[n.pidField]]}))}},{key:"treeDataToListData",value:function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,o=Object.assign({idField:"id",pidField:"parentId",childrenField:"children",isDeepCopy:!1},n),i=[],a=0;a<t.length;a++){var l=t[a],c=b()({},l);if(c[o.pidField]=r,delete c[o.childrenField],i.push(c),l[o.childrenField]){var u,p=this.treeDataToListData(l[o.childrenField],c[o.idField],n);(u=i).push.apply(u,y()(p))}}return o.isDeepCopy&&(i=e.deepCopy(i)),i}},{key:"getParentNodes",value:function(e,t,r){var n=Object.assign({valueField:"value",idField:"id",pidField:"parentId",getData:function(e){return e}},r);if(!(e&&e.length>0&&t))return[];var o=n.idField,i=n.pidField,a=n.valueField,l=[],c=e.find((function(e){return e[a]==t}));if(c)for(l.push(n.getData(c));c&&c[i];){var u=e.find((function(e){return e[o]==c[i]}));u&&l.push(n.getData(u)),c=u}return l.reverse(),l}},{key:"paramsSerializer",value:function(e,t){return Object.assign({isFilterNonNull:!1},t).isFilterNonNull&&(e=Object.fromEntries(Object.entries(e).filter((function(e){var t=f()(e,2),r=(t[0],t[1]);return!(null==r||""===r)})))),v().stringify(e)}},{key:"paramsParse",value:function(e,t){var r={},n=Object.assign({ignoreQueryPrefix:!0},t);return e&&(r=v().parse(e,n)),r}},{key:"compareVersion",value:function(t,r){for(var n=e.trim(t).split("."),o=e.trim(r).split("."),i=Math.max(t.length,r.length);n.length<i;)n.push("0");for(;o.length<i;)o.push("0");for(var a=0;a<i;a++){var l=parseInt(n[a]),c=parseInt(o[a]);if(l>c)return 1;if(l<c)return-1}return 0}},{key:"getDataNameByIds",value:function(e,t,r){var n=Object.assign({sep:"、",idField:"id",nameField:"name"},r),o="";return t&&t.length>0&&(o=t.map((function(t){var r=e.find((function(e){return e[n.idField]==t}));return r?r[n.nameField]:""})).join(n.sep)),o}},{key:"appendHtmlTagAttr",value:function(e,t,r,n){var o=new RegExp("(<".concat(t,"\\s+)([^>]*?)([^>]*>)"),"g"),i=e.replace(o,(function(e,o,i,a){if(new RegExp("".concat(r,'="(.*?)"'),"g").exec(e)){var l=new RegExp("(<".concat(t,"\\s+)([^>]*?)").concat(r,'="(.*)"([^>]*>)'),"g");return e.replace(l,(function(e,t,o,i,a){return t+o+"".concat(r,'="').concat(i," ").concat(n,'"')+a}))}return o+"".concat(r,'="').concat(n,'" ')+a}));return i=i.replace(new RegExp("<".concat(t,">"),"g"),"<".concat(t," ").concat(r,'="').concat(n,'">'))}},{key:"compareDataDiff",value:function(t,r){var n={};return function t(r,o,i){if(e.isArray(o)&&e.isArray(i)){var a=o.length-i.length;if(0!==a)if(n[r]="modified",a>0)for(var l=i.length;l<o.length;l++)n["".concat(r,"[").concat(l,"]")]="removed";else for(var c=o.length;c<i.length;c++)n["".concat(r,"[").concat(c,"]")]="added";else for(var u=0;u<o.length;u++)t("".concat(r,"[").concat(u,"]"),o[u],i[u])}else if(e.isObject(o)&&e.isObject(i)){for(var p in o){var f=r?"".concat(r,".").concat(p):p;Object.prototype.hasOwnProperty.call(o,p)&&!(p in i)?n[f]="removed":Object.prototype.hasOwnProperty.call(i,p)&&t(f,o[p],i[p])}for(var s in i){var y=r?"".concat(r,".").concat(s):s;Object.prototype.hasOwnProperty.call(i,s)&&!(s in o)&&(n[y]="added")}}else o!==i&&(n[r]="modified")}("",t,r),n}}]),e}()}(),n}()}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){var e={192:function(e,t,r){"use strict";var n=r(898),o=r(610),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},610:function(e,t,r){"use strict";var n=r(345),o=r(898),i=r(481),a=r(115),l=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,l),p=r(696),f=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var s=function(){return c(n,l,arguments)};p?p(e.exports,"apply",{value:s}):e.exports.apply=s},270:function(e,t,r){"use strict";var n=r(944).default,o=r(696),i=r(619),a=r(115),l=r(305);e.exports=function(e,t,r){if(!e||"object"!==n(e)&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==n(t))throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],s=!!l&&l(e,t);if(o)o(e,t,{configurable:null===p&&s?s.configurable:!p,enumerable:null===u&&s?s.enumerable:!u,value:r,writable:null===c&&s?s.writable:!c});else{if(!f&&(u||c||p))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},696:function(e,t,r){"use strict";var n=r(898)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},413:function(e){"use strict";e.exports=EvalError},497:function(e){"use strict";e.exports=Error},313:function(e){"use strict";e.exports=RangeError},98:function(e){"use strict";e.exports=ReferenceError},619:function(e){"use strict";e.exports=SyntaxError},115:function(e){"use strict";e.exports=TypeError},59:function(e){"use strict";e.exports=URIError},206:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,o="[object Function]",i=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},l=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var u=this;if("function"!=typeof u||r.apply(u)!==o)throw new TypeError(t+u);for(var c,p=a(arguments,1),f=function(){if(this instanceof c){var t=u.apply(this,i(p,arguments));return Object(t)===t?t:this}return u.apply(e,i(p,arguments))},s=n(0,u.length-p.length),y=[],d=0;d<s;d++)y[d]="$"+d;if(c=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var b=function(){};b.prototype=u.prototype,c.prototype=new b,b.prototype=null}return c}},345:function(e,t,r){"use strict";var n=r(206);e.exports=Function.prototype.bind||n},898:function(e,t,r){"use strict";var n,o=r(944).default,i=r(497),a=r(413),l=r(313),u=r(98),c=r(619),p=r(115),f=r(59),s=Function,y=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}var b=function(){throw new p},g=d?function(){try{return b}catch(e){try{return d(arguments,"callee").get}catch(e){return b}}}():b,m=r(561)(),h=r(390)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),S={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":o(JSON))?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":l,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":w,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var x=v(v(e));j["%Error.prototype%"]=x}var O=function e(t){var r;if("%AsyncFunction%"===t)r=y("async function () {}");else if("%GeneratorFunction%"===t)r=y("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=y("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return j[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=r(345),E=r(156),I=P.call(Function.call,Array.prototype.concat),k=P.call(Function.apply,Array.prototype.splice),_=P.call(Function.call,String.prototype.replace),F=P.call(Function.call,String.prototype.slice),D=P.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,R=function(e){var t=F(e,0,1),r=F(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return _(e,M,(function(e,t,r,o){n[n.length]=r?_(o,N,"$1"):t||e})),n},T=function(e,t){var r,n=e;if(E(A,n)&&(n="%"+(r=A[n])[0]+"%"),E(j,n)){var o=j[n];if(o===S&&(o=O(n)),void 0===o&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===D(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=R(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),i=o.name,a=o.value,l=!1,u=o.alias;u&&(n=u[0],k(r,I([0,1],u)));for(var f=1,s=!0;f<r.length;f+=1){var y=r[f],b=F(y,0,1),g=F(y,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==y&&s||(l=!0),E(j,i="%"+(n+="."+y)+"%"))a=j[i];else if(null!=a){if(!(y in a)){if(!t)throw new p("base intrinsic for "+e+" exists, but the property is not available.");return}if(d&&f+1>=r.length){var m=d(a,y);a=(s=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[y]}else s=E(a,y),a=a[y];s&&!l&&(j[i]=a)}}return a}},305:function(e,t,r){"use strict";var n=r(898)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},772:function(e,t,r){"use strict";var n=r(696),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},390:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},561:function(e,t,r){"use strict";var n=r(944).default,o="undefined"!=typeof Symbol&&Symbol,i=r(300);e.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"===n(o("foo"))&&("symbol"===n(Symbol("bar"))&&i())))}},300:function(e,t,r){"use strict";var n=r(944).default;e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===n(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},156:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(345);e.exports=i.call(n,o)},182:function(e,t,r){var n=r(944).default,o="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,l=o&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=u&&c&&"function"==typeof c.get?c.get:null,f=u&&Set.prototype.forEach,s="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,y="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,S=String.prototype.replace,w=String.prototype.toUpperCase,j=String.prototype.toLowerCase,x=RegExp.prototype.test,O=Array.prototype.concat,A=Array.prototype.join,P=Array.prototype.slice,E=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?Symbol.prototype.toString:null,F="function"==typeof Symbol&&"object"===n(Symbol.iterator),D="function"==typeof Symbol&&Symbol.toStringTag&&(n(Symbol.toStringTag)===F||"symbol")?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-E(-e):E(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return S.call(o,r,"$&_")+"."+S.call(S.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(t,r,"$&_")}var T=r(654),C=T.custom,U=$(C)?C:null;function B(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function L(e){return S.call(String(e),/"/g,""")}function W(e){return!("[object Array]"!==V(e)||D&&"object"===n(e)&&D in e)}function K(e){return!("[object RegExp]"!==V(e)||D&&"object"===n(e)&&D in e)}function $(e){if(F)return e&&"object"===n(e)&&e instanceof Symbol;if("symbol"===n(e))return!0;if(!e||"object"!==n(e)||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}e.exports=function e(t,o,i,u){var c=o||{};if(H(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!H(c,"customInspect")||c.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var x=String(t);return w?R(t,x):x}if("bigint"==typeof t){var E=String(t)+"n";return w?R(t,E):E}var k=void 0===c.depth?5:c.depth;if(void 0===i&&(i=0),i>=k&&k>0&&"object"===n(t))return W(t)?"[Array]":"[Object]";var C=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=A.call(Array(e.indent+1)," ")}return{base:r,prev:A.call(Array(t+1),r)}}(c,i);if(void 0===u)u=[];else if(q(u,t)>=0)return"[Circular]";function G(t,r,n){if(r&&(u=P.call(u)).push(r),n){var o={depth:c.depth};return H(c,"quoteStyle")&&(o.quoteStyle=c.quoteStyle),e(t,o,i+1,u)}return e(t,c,i+1,u)}if("function"==typeof t&&!K(t)){var J=function(e){if(e.name)return e.name;var t=h.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),te=ee(t,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(te.length>0?" { "+A.call(te,", ")+" }":"")}if($(t)){var re=F?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(t);return"object"!==n(t)||F?re:Q(re)}if(function(e){if(!e||"object"!==n(e))return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+j.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie<oe.length;ie++)ne+=" "+oe[ie].name+"="+B(L(oe[ie].value),"double",c);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+j.call(String(t.nodeName))+">"}if(W(t)){if(0===t.length)return"[]";var ae=ee(t,G);return C&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Z(ae,C)+"]":"[ "+A.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||D&&"object"===n(e)&&D in e)}(t)){var le=ee(t,G);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(le,", ")+" }":"{ ["+String(t)+"] "+A.call(O.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"===n(t)&&g){if(U&&"function"==typeof t[U]&&T)return T(t,{depth:k-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==n(e))return!1;try{a.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ue=[];return l&&l.call(t,(function(e,r){ue.push(G(r,t,!0)+" => "+G(e,t))})),Y("Map",a.call(t),ue,C)}if(function(e){if(!p||!e||"object"!==n(e))return!1;try{p.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return f&&f.call(t,(function(e){ce.push(G(e,t))})),Y("Set",p.call(t),ce,C)}if(function(e){if(!s||!e||"object"!==n(e))return!1;try{s.call(e,s);try{y.call(e,y)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!y||!e||"object"!==n(e))return!1;try{y.call(e,y);try{s.call(e,s)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!d||!e||"object"!==n(e))return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return!("[object Number]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(G(Number(t)));if(function(e){if(!e||"object"!==n(e)||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return Q(G(I.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(b.call(t));if(function(e){return!("[object String]"!==V(e)||D&&"object"===n(e)&&D in e)}(t))return Q(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==V(e)||D&&"object"===n(e)&&D in e)}(t)&&!K(t)){var pe=ee(t,G),fe=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",ye=!fe&&D&&Object(t)===t&&D in t?v.call(V(t),8,-1):se?"Object":"",de=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ye||se?"["+A.call(O.call([],ye||[],se||[]),": ")+"] ":"");return 0===pe.length?de+"{}":C?de+"{"+Z(pe,C)+"}":de+"{ "+A.call(pe,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function V(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(v.call(e,0,t.maxStringLength),t)+n}return B(S.call(S.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+A.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r=W(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=H(e,o)?t(e[o],e):""}var i,a="function"==typeof k?k(e):[];if(F){i={};for(var l=0;l<a.length;l++)i["$"+a[l]]=a[l]}for(var u in e)H(e,u)&&(r&&String(Number(u))===u&&u<e.length||F&&i["$"+u]instanceof Symbol||(x.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof k)for(var c=0;c<a.length;c++)M.call(e,a[c])&&n.push("["+t(a[c])+"]: "+t(e[a[c]],e));return n}},112:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},460:function(e,t,r){"use strict";var n=r(302),o=r(355),i=r(112);e.exports={formats:i,parse:o,stringify:n}},355:function(e,t,r){"use strict";var n=r(133),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=l?i.slice(0,l.index):i,p=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;p.push(c)}for(var f=0;r.depth>0&&null!==(l=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(l[1])}return l&&p.push("["+i.slice(l.index)+"]"),function(e,t,r,n){for(var o=n?t:u(t,r),i=e.length-1;i>=0;--i){var a,l=e[i];if("[]"===l&&r.parseArrays)a=r.allowEmptyArrays&&""===o?[]:[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,p=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,f=parseInt(p,10);r.parseArrays||""!==p?!isNaN(f)&&l!==p&&String(f)===p&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=o:"__proto__"!==p&&(a[p]=o):a={0:o}}o=a}return o}(p,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var p="string"==typeof e?function(e,t){var r,c={__proto__:null},p=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,s=p.split(t.delimiter,f),y=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?d="utf-8":"utf8=%26%2310003%3B"===s[r]&&(d="iso-8859-1"),y=r,r=s.length);for(r=0;r<s.length;++r)if(r!==y){var b,g,m=s[r],h=m.indexOf("]="),v=-1===h?m.indexOf("="):h+1;-1===v?(b=t.decoder(m,a.decoder,d,"key"),g=t.strictNullHandling?null:""):(b=t.decoder(m.slice(0,v),a.decoder,d,"key"),g=n.maybeMap(u(m.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,d,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===d&&(g=l(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g);var S=o.call(c,b);S&&"combine"===t.duplicates?c[b]=n.combine(c[b],g):S&&"last"!==t.duplicates||(c[b]=g)}return c}(e,r):e,f=r.plainObjects?Object.create(null):{},s=Object.keys(p),y=0;y<s.length;++y){var d=s[y],b=c(d,p[d],r,"string"==typeof e);f=n.merge(f,b,r)}return!0===r.allowSparse?f:n.compact(f)}},302:function(e,t,r){"use strict";var n=r(944).default,o=r(520),i=r(133),a=r(112),l=Object.prototype.hasOwnProperty,u={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,p=Array.prototype.push,f=function(e,t){p.apply(e,c(t)?t:[t])},s=Date.prototype.toISOString,y=a.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:y,formatter:a.formatters[y],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},b={},g=function e(t,r,a,l,u,p,s,y,g,m,h,v,S,w,j,x,O,A){for(var P,E=t,I=A,k=0,_=!1;void 0!==(I=I.get(b))&&!_;){var F=I.get(t);if(k+=1,void 0!==F){if(F===k)throw new RangeError("Cyclic object value");_=!0}void 0===I.get(b)&&(k=0)}if("function"==typeof m?E=m(r,E):E instanceof Date?E=S(E):"comma"===a&&c(E)&&(E=i.maybeMap(E,(function(e){return e instanceof Date?S(e):e}))),null===E){if(p)return g&&!x?g(r,d.encoder,O,"key",w):r;E=""}if("string"==typeof(P=E)||"number"==typeof P||"boolean"==typeof P||"symbol"===n(P)||"bigint"==typeof P||i.isBuffer(E))return g?[j(x?r:g(r,d.encoder,O,"key",w))+"="+j(g(E,d.encoder,O,"value",w))]:[j(r)+"="+j(String(E))];var D,M=[];if(void 0===E)return M;if("comma"===a&&c(E))x&&g&&(E=i.maybeMap(E,g)),D=[{value:E.length>0?E.join(",")||null:void 0}];else if(c(m))D=m;else{var N=Object.keys(E);D=h?N.sort(h):N}var R=y?r.replace(/\./g,"%2E"):r,T=l&&c(E)&&1===E.length?R+"[]":R;if(u&&c(E)&&0===E.length)return T+"[]";for(var C=0;C<D.length;++C){var U=D[C],B="object"===n(U)&&void 0!==U.value?U.value:E[U];if(!s||null!==B){var L=v&&y?U.replace(/\./g,"%2E"):U,W=c(E)?"function"==typeof a?a(T,L):T:T+(v?"."+L:"["+L+"]");A.set(t,k);var K=o();K.set(b,A),f(M,e(B,W,a,l,u,p,s,y,"comma"===a&&x&&c(E)?null:g,m,h,v,S,w,j,x,O,K))}}return M};e.exports=function(e,t){var r,i=e,p=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=a.default;if(void 0!==e.format){if(!l.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=a.formatters[r],i=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(i=e.filter),n=e.arrayFormat in u?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof p.filter?i=(0,p.filter)("",i):c(p.filter)&&(r=p.filter);var s=[];if("object"!==n(i)||null===i)return"";var y=u[p.arrayFormat],b="comma"===y&&p.commaRoundTrip;r||(r=Object.keys(i)),p.sort&&r.sort(p.sort);for(var m=o(),h=0;h<r.length;++h){var v=r[h];p.skipNulls&&null===i[v]||f(s,g(i[v],v,y,b,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,m))}var S=s.join(p.delimiter),w=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),S.length>0?w+S:""}},133:function(e,t,r){"use strict";var n=r(944).default,o=r(112),i=Object.prototype.hasOwnProperty,a=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},c=1024;e.exports={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],l=i.obj[i.prop],u=Object.keys(l),c=0;c<u.length;++c){var p=u[c],f=l[p];"object"===n(f)&&null!==f&&-1===r.indexOf(f)&&(t.push({obj:l,prop:p}),r.push(f))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var u=e;if("symbol"===n(e)?u=Symbol.prototype.toString.call(e):"string"!=typeof e&&(u=String(e)),"iso-8859-1"===r)return escape(u).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var p="",f=0;f<u.length;f+=c){for(var s=u.length>=c?u.slice(f,f+c):u,y=[],d=0;d<s.length;++d){var b=s.charCodeAt(d);45===b||46===b||95===b||126===b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||a===o.RFC1738&&(40===b||41===b)?y[y.length]=s.charAt(d):b<128?y[y.length]=l[b]:b<2048?y[y.length]=l[192|b>>6]+l[128|63&b]:b<55296||b>=57344?y[y.length]=l[224|b>>12]+l[128|b>>6&63]+l[128|63&b]:(d+=1,b=65536+((1023&b)<<10|1023&s.charCodeAt(d)),y[y.length]=l[240|b>>18]+l[128|b>>12&63]+l[128|b>>6&63]+l[128|63&b])}p+=y.join("")}return p},isBuffer:function(e){return!(!e||"object"!==n(e))&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!==n(r)){if(a(t))t.push(r);else{if(!t||"object"!==n(t))return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==n(t))return[t].concat(r);var l=t;return a(t)&&!a(r)&&(l=u(t,o)),a(t)&&a(r)?(r.forEach((function(r,a){if(i.call(t,a)){var l=t[a];l&&"object"===n(l)&&r&&"object"===n(r)?t[a]=e(l,r,o):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),l)}}},481:function(e,t,r){"use strict";var n=r(898),o=r(270),i=r(772)(),a=r(305),l=r(115),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new l("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new l("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var p=a(e,"length");p&&!p.configurable&&(n=!1),p&&!p.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},520:function(e,t,r){"use strict";var n=r(944).default,o=r(898),i=r(192),a=r(182),l=r(115),u=o("%WeakMap%",!0),c=o("%Map%",!0),p=i("WeakMap.prototype.get",!0),f=i("WeakMap.prototype.set",!0),s=i("WeakMap.prototype.has",!0),y=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),b=i("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new l("Side channel does not contain "+a(e))},get:function(o){if(u&&o&&("object"===n(o)||"function"==typeof o)){if(e)return p(e,o)}else if(c){if(t)return y(t,o)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,o)},has:function(o){if(u&&o&&("object"===n(o)||"function"==typeof o)){if(e)return s(e,o)}else if(c){if(t)return b(t,o)}else if(r)return function(e,t){return!!g(e,t)}(r,o);return!1},set:function(o,i){u&&o&&("object"===n(o)||"function"==typeof o)?(e||(e=new u),f(e,o,i)):c?(t||(t=new c),d(t,o,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,o,i))}};return o}},654:function(){},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},786:function(e,t,r){var n=r(317);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,r){var n=r(281);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,r){var n=r(508);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(u)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,r){var n=r(281);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},682:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},114:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,r){var n=r(143);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,r){var n=r(180),o=r(249),i=r(508),a=r(20);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},44:function(e,t,r){var n=r(786),o=r(682),i=r(508),a=r(114);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,r){var n=r(944).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,r){var n=r(944).default,o=r(224);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,r){var n=r(317);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{CrEventCenter:function(){return u},CrStorage:function(){return c},CrUtil:function(){return j}});var e=r(486),t=r.n(e),o=r(702),i=r.n(o),a=r(143),l=r.n(a),u=function(){function e(){t()(this,e)}return i()(e,null,[{key:"on",value:function(e,t){var r=this,n=this.subscribers.find((function(t){return t.key==e}));n?n.listeners.push(t):this.subscribers.push({key:e,listeners:[t]});var o={key:e,listener:t,remove:function(){r.off(o)}};return o}},{key:"off",value:function(e,t){var r=this.subscribers.findIndex((function(t){return t.key==e.key}));if(r>-1)if("all"==t)this.subscribers.splice(r,1);else{var n=this.subscribers[r],o=n.listeners.findIndex((function(t){return t==e.listener}));o>-1&&n.listeners.splice(o,1)}}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=this.subscribers.find((function(t){return t.key==e}));o&&o.listeners&&o.listeners.length>0&&o.listeners.forEach((function(e){e.apply(void 0,r)}))}},{key:"find",value:function(e){return this.subscribers.find((function(t){return t.key==e}))}},{key:"clear",value:function(){this.subscribers.length=0}}]),e}();l()(u,"subscribers",[]);var c=function(){function e(){t()(this,e)}return i()(e,null,[{key:"setLocalItem",value:function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){console.warn("setLocalItem:".concat(e,":").concat(t))}}},{key:"getLocalItem",value:function(e){var t=localStorage.getItem(e);if(!t)return null;if("undefined"===t)return null;try{return JSON.parse(t)}catch(t){return console.warn("getLocalItem:".concat(e,":").concat(t)),null}}},{key:"removeLocalItem",value:function(e){localStorage.removeItem(e)}},{key:"clearLocal",value:function(){localStorage.clear()}},{key:"setSessionItem",value:function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(t){console.warn("setSessionItem:".concat(e,":").concat(t))}}},{key:"getSessionItem",value:function(e){var t=sessionStorage.getItem(e);if(!t)return null;if("undefined"===t)return null;try{return JSON.parse(t)}catch(t){return console.warn("getSessionItem:".concat(e,":").concat(t)),null}}},{key:"removeSessionItem",value:function(e){sessionStorage.removeItem(e)}},{key:"clearSession",value:function(){sessionStorage.clear()}}]),e}(),p=r(925),f=r.n(p),s=r(44),y=r.n(s),d=r(118),b=r.n(d),g=r(746),m=r.n(g),h=r(944),v=r.n(h),S=r(460),w=r.n(S),j=function(){function e(){t()(this,e)}return i()(e,null,[{key:"isArray",value:function(e){return Array.isArray(e)}},{key:"isObject",value:function(t){return"object"===v()(t)&&null!==t&&!e.isArray(t)}},{key:"isEmptyObject",value:function(e){return 0===Object.keys(e).length&&e.constructor===Object}},{key:"isObjectPropertiesAllEmpty",value:function(e){return Object.keys(e).every((function(t){var r=e[t];return null==r||""===r||0===r&&"number"==typeof r||isNaN(r)}))}},{key:"isDate",value:function(e){return"[object Date]"===Object.prototype.toString.call(e)}},{key:"isString",value:function(e){return"[object String]"===Object.prototype.toString.call(e)}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"isFile",value:function(e){return"[object File]"===Object.prototype.toString.call(e)}},{key:"isBoolean",value:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)}},{key:"trim",value:function(e){return(e+"").replace(/(^[\s\n\t]+|[\s\n\t]+$)/g,"")}},{key:"getArrayDimension",value:function(t){if(!e.isArray(t))return 0;for(var r=0,n=0;n<t.length;n++){var o=e.getArrayDimension(t[n]);r=Math.max(r,o)}return r+1}},{key:"deepCopy",value:function(t){var r;if(e.isArray(t)){r=[];for(var n=0,o=t.length;n<o;n++)e.isArray(t[n])||e.isObject(t[n])?r.push(e.deepCopy(t[n])):r.push(t[n])}else if(e.isObject(t))for(var i in r={},t)e.isArray(t[i])||e.isObject(t[i])?r[i]=e.deepCopy(t[i]):r[i]=t[i];else r=t;return r}},{key:"listToTreeData",value:function(t,r){var n=Object.assign({idField:"id",pidField:"parentId",childrenField:"children",isDeepCopy:!1,getData:function(e){return e}},r),o=n.idField,i=n.pidField,a=n.childrenField,l=n.isDeepCopy,u=n.getData;l&&(t=e.deepCopy(t));var c,p=new Map,f=new Map,s=m()(t);try{for(s.s();!(c=s.n()).done;){var d=c.value,g=d[i],h=d[o];p.has(g)||p.set(g,[]),p.get(g).push(d),f.set(h,d)}}catch(e){s.e(e)}finally{s.f()}var v,S=function e(t){return(p.get(t)||[]).map((function(t){var r=e(t[o]),n=b()({},u(t));return r.length>0&&(n[a]=r),n}))},w=new Set,j=m()(p.keys());try{for(j.s();!(v=j.n()).done;){var x=v.value;null!=x&&0!==x&&f.has(x)||w.add(x)}}catch(e){j.e(e)}finally{j.f()}var O,A=[],P=m()(w);try{for(P.s();!(O=P.n()).done;){var E=O.value;A.push.apply(A,y()(S(E)))}}catch(e){P.e(e)}finally{P.f()}return A}},{key:"treeDataToListData",value:function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,o=Object.assign({idField:"id",pidField:"parentId",childrenField:"children",isDeepCopy:!1},n),i=[],a=0;a<t.length;a++){var l=t[a],u=b()({},l);if(u[o.pidField]=r,delete u[o.childrenField],i.push(u),l[o.childrenField]){var c,p=this.treeDataToListData(l[o.childrenField],u[o.idField],n);(c=i).push.apply(c,y()(p))}}return o.isDeepCopy&&(i=e.deepCopy(i)),i}},{key:"getParentNodes",value:function(e,t,r){var n=Object.assign({valueField:"value",idField:"id",pidField:"parentId",getData:function(e){return e}},r);if(!(e&&e.length>0&&t))return[];var o=n.idField,i=n.pidField,a=n.valueField,l=[],u=e.find((function(e){return e[a]==t}));if(u)for(l.push(n.getData(u));u&&u[i];){var c=e.find((function(e){return e[o]==u[i]}));c&&l.push(n.getData(c)),u=c}return l.reverse(),l}},{key:"paramsSerializer",value:function(e,t){return Object.assign({isFilterNonNull:!1},t).isFilterNonNull&&(e=Object.fromEntries(Object.entries(e).filter((function(e){var t=f()(e,2),r=(t[0],t[1]);return!(null==r||""===r)})))),w().stringify(e)}},{key:"paramsParse",value:function(e,t){var r={},n=Object.assign({ignoreQueryPrefix:!0},t);return e&&(r=w().parse(e,n)),r}},{key:"compareVersion",value:function(t,r){for(var n=e.trim(t).split("."),o=e.trim(r).split("."),i=Math.max(t.length,r.length);n.length<i;)n.push("0");for(;o.length<i;)o.push("0");for(var a=0;a<i;a++){var l=parseInt(n[a]),u=parseInt(o[a]);if(l>u)return 1;if(l<u)return-1}return 0}},{key:"getDataNameByIds",value:function(e,t,r){var n=Object.assign({sep:"、",idField:"id",nameField:"name"},r),o="";return t&&t.length>0&&(o=t.map((function(t){var r=e.find((function(e){return e[n.idField]==t}));return r?r[n.nameField]:""})).join(n.sep)),o}},{key:"appendHtmlTagAttr",value:function(e,t,r,n){var o=new RegExp("(<".concat(t,"\\s+)([^>]*?)([^>]*>)"),"g"),i=e.replace(o,(function(e,o,i,a){if(new RegExp("".concat(r,'="(.*?)"'),"g").exec(e)){var l=new RegExp("(<".concat(t,"\\s+)([^>]*?)").concat(r,'="(.*)"([^>]*>)'),"g");return e.replace(l,(function(e,t,o,i,a){return t+o+"".concat(r,'="').concat(i," ").concat(n,'"')+a}))}return o+"".concat(r,'="').concat(n,'" ')+a}));return i=i.replace(new RegExp("<".concat(t,">"),"g"),"<".concat(t," ").concat(r,'="').concat(n,'">'))}},{key:"compareDataDiff",value:function(t,r){var n={};return function t(r,o,i){if(e.isArray(o)&&e.isArray(i)){var a=o.length-i.length;if(0!==a)if(n[r]="modified",a>0)for(var l=i.length;l<o.length;l++)n["".concat(r,"[").concat(l,"]")]="removed";else for(var u=o.length;u<i.length;u++)n["".concat(r,"[").concat(u,"]")]="added";else for(var c=0;c<o.length;c++)t("".concat(r,"[").concat(c,"]"),o[c],i[c])}else if(e.isObject(o)&&e.isObject(i)){for(var p in o){var f=r?"".concat(r,".").concat(p):p;Object.prototype.hasOwnProperty.call(o,p)&&!(p in i)?n[f]="removed":Object.prototype.hasOwnProperty.call(i,p)&&t(f,o[p],i[p])}for(var s in i){var y=r?"".concat(r,".").concat(s):s;Object.prototype.hasOwnProperty.call(i,s)&&!(s in o)&&(n[y]="added")}}else o!==i&&(n[r]="modified")}("",t,r),n}}]),e}()}(),n}()}));
|
package/dist/storage.js
CHANGED
|
@@ -11,10 +11,10 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
11
11
|
_createClass(CrStorage, null, [{
|
|
12
12
|
key: "setLocalItem",
|
|
13
13
|
value:
|
|
14
|
-
/**
|
|
15
|
-
* 设置本地存储
|
|
16
|
-
* @param key
|
|
17
|
-
* @param data
|
|
14
|
+
/**
|
|
15
|
+
* 设置本地存储
|
|
16
|
+
* @param key
|
|
17
|
+
* @param data
|
|
18
18
|
*/
|
|
19
19
|
function setLocalItem(key, data) {
|
|
20
20
|
try {
|
|
@@ -24,10 +24,10 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* 获取本地存储
|
|
29
|
-
* @param key
|
|
30
|
-
* @returns
|
|
27
|
+
/**
|
|
28
|
+
* 获取本地存储
|
|
29
|
+
* @param key
|
|
30
|
+
* @returns
|
|
31
31
|
*/
|
|
32
32
|
}, {
|
|
33
33
|
key: "getLocalItem",
|
|
@@ -48,9 +48,9 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* 清除某个本地存储
|
|
53
|
-
* @param key
|
|
51
|
+
/**
|
|
52
|
+
* 清除某个本地存储
|
|
53
|
+
* @param key
|
|
54
54
|
*/
|
|
55
55
|
}, {
|
|
56
56
|
key: "removeLocalItem",
|
|
@@ -58,8 +58,8 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
58
58
|
localStorage.removeItem(key);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* 清除所有本地存储
|
|
61
|
+
/**
|
|
62
|
+
* 清除所有本地存储
|
|
63
63
|
*/
|
|
64
64
|
}, {
|
|
65
65
|
key: "clearLocal",
|
|
@@ -67,10 +67,10 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
67
67
|
localStorage.clear();
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
* 设置会话存储
|
|
72
|
-
* @param key
|
|
73
|
-
* @param data
|
|
70
|
+
/**
|
|
71
|
+
* 设置会话存储
|
|
72
|
+
* @param key
|
|
73
|
+
* @param data
|
|
74
74
|
*/
|
|
75
75
|
}, {
|
|
76
76
|
key: "setSessionItem",
|
|
@@ -82,10 +82,10 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* 获取会话存储
|
|
87
|
-
* @param key
|
|
88
|
-
* @returns
|
|
85
|
+
/**
|
|
86
|
+
* 获取会话存储
|
|
87
|
+
* @param key
|
|
88
|
+
* @returns
|
|
89
89
|
*/
|
|
90
90
|
}, {
|
|
91
91
|
key: "getSessionItem",
|
|
@@ -106,9 +106,9 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
/**
|
|
110
|
-
* 清除某个会话存储
|
|
111
|
-
* @param key
|
|
109
|
+
/**
|
|
110
|
+
* 清除某个会话存储
|
|
111
|
+
* @param key
|
|
112
112
|
*/
|
|
113
113
|
}, {
|
|
114
114
|
key: "removeSessionItem",
|
|
@@ -116,8 +116,8 @@ var CrStorage = /*#__PURE__*/function () {
|
|
|
116
116
|
sessionStorage.removeItem(key);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* 清除所有会话存储
|
|
119
|
+
/**
|
|
120
|
+
* 清除所有会话存储
|
|
121
121
|
*/
|
|
122
122
|
}, {
|
|
123
123
|
key: "clearSession",
|
package/dist/util.d.ts
CHANGED
|
@@ -75,6 +75,9 @@ export default class CrUtil {
|
|
|
75
75
|
* 列表数据转树型数据
|
|
76
76
|
* @param listData
|
|
77
77
|
* @param settings
|
|
78
|
+
* @param settings.idField 默认值 id
|
|
79
|
+
* @param settings.pidField 默认值 parentId
|
|
80
|
+
* @param settings.childrenField 默认值 children
|
|
78
81
|
* @returns
|
|
79
82
|
*/
|
|
80
83
|
static listToTreeData(listData: any[], settings?: {
|
|
@@ -88,6 +91,9 @@ export default class CrUtil {
|
|
|
88
91
|
* 树型数据转列表数据
|
|
89
92
|
* @param treeData
|
|
90
93
|
* @param settings
|
|
94
|
+
* @param settings.idField 默认值 id
|
|
95
|
+
* @param settings.pidField 默认值 parentId
|
|
96
|
+
* @param settings.childrenField 默认值 children
|
|
91
97
|
* @returns
|
|
92
98
|
*/
|
|
93
99
|
static treeDataToListData(treeData: any[], pid?: string | number, settings?: {
|
|
@@ -101,6 +107,9 @@ export default class CrUtil {
|
|
|
101
107
|
* @param listData
|
|
102
108
|
* @param value
|
|
103
109
|
* @param settings
|
|
110
|
+
* @param settings.valueField 默认值 value
|
|
111
|
+
* @param settings.idField 默认值 id
|
|
112
|
+
* @param settings.pidField 默认值 parentId
|
|
104
113
|
* @returns
|
|
105
114
|
*/
|
|
106
115
|
static getParentNodes<T, R extends Record<string, any>>(listData: R[], value: number | string, settings?: {
|
package/dist/util.js
CHANGED
|
@@ -4,13 +4,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
4
4
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
8
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
15
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
17
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
@@ -194,6 +195,9 @@ var CrUtil = /*#__PURE__*/function () {
|
|
|
194
195
|
* 列表数据转树型数据
|
|
195
196
|
* @param listData
|
|
196
197
|
* @param settings
|
|
198
|
+
* @param settings.idField 默认值 id
|
|
199
|
+
* @param settings.pidField 默认值 parentId
|
|
200
|
+
* @param settings.childrenField 默认值 children
|
|
197
201
|
* @returns
|
|
198
202
|
*/
|
|
199
203
|
}, {
|
|
@@ -208,34 +212,101 @@ var CrUtil = /*#__PURE__*/function () {
|
|
|
208
212
|
return item;
|
|
209
213
|
}
|
|
210
214
|
}, settings);
|
|
211
|
-
|
|
215
|
+
var idField = options.idField,
|
|
216
|
+
pidField = options.pidField,
|
|
217
|
+
childrenField = options.childrenField,
|
|
218
|
+
isDeepCopy = options.isDeepCopy,
|
|
219
|
+
getData = options.getData;
|
|
220
|
+
if (isDeepCopy) {
|
|
212
221
|
listData = CrUtil.deepCopy(listData);
|
|
213
222
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
|
|
224
|
+
// 构建索引
|
|
225
|
+
var pidMap = new Map();
|
|
226
|
+
var idMap = new Map();
|
|
227
|
+
var _iterator = _createForOfIteratorHelper(listData),
|
|
228
|
+
_step;
|
|
229
|
+
try {
|
|
230
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
231
|
+
var _item = _step.value;
|
|
232
|
+
var pid = _item[pidField];
|
|
233
|
+
var id = _item[idField];
|
|
234
|
+
if (!pidMap.has(pid)) {
|
|
235
|
+
pidMap.set(pid, []);
|
|
236
|
+
}
|
|
237
|
+
pidMap.get(pid).push(_item);
|
|
238
|
+
idMap.set(id, _item);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 递归构建树 + 字段过滤
|
|
242
|
+
} catch (err) {
|
|
243
|
+
_iterator.e(err);
|
|
244
|
+
} finally {
|
|
245
|
+
_iterator.f();
|
|
246
|
+
}
|
|
247
|
+
var buildTree = function buildTree(pid) {
|
|
248
|
+
var children = pidMap.get(pid) || [];
|
|
249
|
+
return children.map(function (item) {
|
|
250
|
+
var rawChildren = buildTree(item[idField]);
|
|
251
|
+
var node = _objectSpread({}, getData(item));
|
|
252
|
+
if (rawChildren.length > 0) {
|
|
253
|
+
node[childrenField] = rawChildren;
|
|
254
|
+
}
|
|
255
|
+
return node;
|
|
224
256
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// 收集所有根节点 pid,去重
|
|
260
|
+
var rootPids = new Set();
|
|
261
|
+
var _iterator2 = _createForOfIteratorHelper(pidMap.keys()),
|
|
262
|
+
_step2;
|
|
263
|
+
try {
|
|
264
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
265
|
+
var _pid = _step2.value;
|
|
266
|
+
if (_pid === undefined || _pid === null || _pid === 0 || !idMap.has(_pid)) {
|
|
267
|
+
rootPids.add(_pid);
|
|
268
|
+
}
|
|
228
269
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
})
|
|
232
|
-
|
|
270
|
+
|
|
271
|
+
// 构建最终树
|
|
272
|
+
} catch (err) {
|
|
273
|
+
_iterator2.e(err);
|
|
274
|
+
} finally {
|
|
275
|
+
_iterator2.f();
|
|
276
|
+
}
|
|
277
|
+
var tree = [];
|
|
278
|
+
var _iterator3 = _createForOfIteratorHelper(rootPids),
|
|
279
|
+
_step3;
|
|
280
|
+
try {
|
|
281
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
282
|
+
var _pid2 = _step3.value;
|
|
283
|
+
tree.push.apply(tree, _toConsumableArray(buildTree(_pid2)));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// 只构建根节点(pid 为 null / 0 / undefined / 不存在)
|
|
287
|
+
// const tree = buildTree(undefined)
|
|
288
|
+
// .concat(buildTree(null))
|
|
289
|
+
// .concat(buildTree(0))
|
|
290
|
+
// .concat(
|
|
291
|
+
// Array.from(pidMap.keys())
|
|
292
|
+
// .filter((pid) => !idMap.has(pid))
|
|
293
|
+
// .flatMap((pid) => buildTree(pid)),
|
|
294
|
+
// );
|
|
295
|
+
} catch (err) {
|
|
296
|
+
_iterator3.e(err);
|
|
297
|
+
} finally {
|
|
298
|
+
_iterator3.f();
|
|
299
|
+
}
|
|
300
|
+
return tree;
|
|
233
301
|
}
|
|
234
302
|
|
|
235
303
|
/**
|
|
236
304
|
* 树型数据转列表数据
|
|
237
305
|
* @param treeData
|
|
238
306
|
* @param settings
|
|
307
|
+
* @param settings.idField 默认值 id
|
|
308
|
+
* @param settings.pidField 默认值 parentId
|
|
309
|
+
* @param settings.childrenField 默认值 children
|
|
239
310
|
* @returns
|
|
240
311
|
*/
|
|
241
312
|
}, {
|
|
@@ -252,14 +323,14 @@ var CrUtil = /*#__PURE__*/function () {
|
|
|
252
323
|
var listData = [];
|
|
253
324
|
for (var i = 0; i < treeData.length; i++) {
|
|
254
325
|
var node = treeData[i];
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
delete
|
|
258
|
-
listData.push(
|
|
326
|
+
var _item2 = _objectSpread({}, node);
|
|
327
|
+
_item2[options.pidField] = pid;
|
|
328
|
+
delete _item2[options.childrenField];
|
|
329
|
+
listData.push(_item2);
|
|
259
330
|
if (node[options.childrenField]) {
|
|
260
|
-
var
|
|
261
|
-
var childrenList = this.treeDataToListData(node[options.childrenField],
|
|
262
|
-
(
|
|
331
|
+
var _listData;
|
|
332
|
+
var childrenList = this.treeDataToListData(node[options.childrenField], _item2[options.idField], settings);
|
|
333
|
+
(_listData = listData).push.apply(_listData, _toConsumableArray(childrenList));
|
|
263
334
|
}
|
|
264
335
|
}
|
|
265
336
|
if (options.isDeepCopy) {
|
|
@@ -273,6 +344,9 @@ var CrUtil = /*#__PURE__*/function () {
|
|
|
273
344
|
* @param listData
|
|
274
345
|
* @param value
|
|
275
346
|
* @param settings
|
|
347
|
+
* @param settings.valueField 默认值 value
|
|
348
|
+
* @param settings.idField 默认值 id
|
|
349
|
+
* @param settings.pidField 默认值 parentId
|
|
276
350
|
* @returns
|
|
277
351
|
*/
|
|
278
352
|
}, {
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zcrkey/js-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "一个 javascript 实用函数库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js"
|
|
7
7
|
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://g-nhxn7953.coding.net/public/zcrkey/js-utils/git"
|
|
11
|
+
},
|
|
8
12
|
"license": "MIT",
|
|
9
13
|
"main": "dist/index.umd.js",
|
|
10
14
|
"module": "dist/index.js",
|