yunlin 1.0.35 → 1.0.36
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/LICENSE +21 -0
- package/README.md +2 -12
- package/dist/index.js +1 -1
- package/dist/price.js +1 -1
- package/dist/room.js +1 -1
- package/dist/test.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 YC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Yunlin
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/js/yunlin)
|
|
4
|
+
[](https://npm-stat.com/charts.html?package=yunlin)
|
|
4
5
|
|
|
5
|
-
`yunlin`
|
|
6
|
+
`yunlin` 是一个实用工具库。
|
|
6
7
|
|
|
7
8
|
## 安装
|
|
8
9
|
|
|
@@ -12,15 +13,4 @@
|
|
|
12
13
|
npm install yunlin
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
## 使用示例
|
|
16
|
-
|
|
17
|
-
```javascript
|
|
18
|
-
import yl from 'yunlin';
|
|
19
|
-
|
|
20
|
-
// 处理成本计算
|
|
21
|
-
console.log('哎哟嚯', yl.func.handleCosting());
|
|
22
|
-
|
|
23
|
-
// 工具函数 - 分割姓名
|
|
24
|
-
console.log('分割姓名:', yl.utils.splitName('端木百惠慧')); // 输出: { surname: "端木", givenName: "百惠慧" }
|
|
25
|
-
```
|
|
26
16
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xff44f1,_0x5b172a){var _0x1ca6dd=a0_0xcc4d,_0x231ce1=_0xff44f1();while(!![]){try{var _0x2eb77a=-parseInt(_0x1ca6dd(0x178))/0x1+parseInt(_0x1ca6dd(0x177))/0x2+-parseInt(_0x1ca6dd(0x17c))/0x3+-parseInt(_0x1ca6dd(0x179))/0x4*(-parseInt(_0x1ca6dd(0x17b))/0x5)+parseInt(_0x1ca6dd(0x176))/0x6*(parseInt(_0x1ca6dd(0x17a))/0x7)+parseInt(_0x1ca6dd(0x17e))/0x8+parseInt(_0x1ca6dd(0x17d))/0x9;if(_0x2eb77a===_0x5b172a)break;else _0x231ce1['push'](_0x231ce1['shift']());}catch(_0x30e476){_0x231ce1['push'](_0x231ce1['shift']());}}}(a0_0x3cfc,0x9be09));import a0_0x1a46b3 from'./utils';function a0_0xcc4d(_0x39b35f,_0x3a7ccf){var _0x3cfcd4=a0_0x3cfc();return a0_0xcc4d=function(_0xcc4d64,_0xb57b3d){_0xcc4d64=_0xcc4d64-0x176;var _0x4c6a6e=_0x3cfcd4[_0xcc4d64];return _0x4c6a6e;},a0_0xcc4d(_0x39b35f,_0x3a7ccf);}import a0_0x5113cf from'./price';import a0_0x16b2b8 from'./test';import a0_0x24baaa from'./room';function a0_0x3cfc(){var _0x4a49ba=['2173914CjwyGs','5765724GBCNKR','1092536OVYFoI','21636tKAlHz','598622aGtryk','1189885dNiHkI','104lDeKMr','1120AefphT','172985xXUjAx'];a0_0x3cfc=function(){return _0x4a49ba;};return a0_0x3cfc();}export default{'test':a0_0x16b2b8,'utils':a0_0x1a46b3,'price':a0_0x5113cf,'room':a0_0x24baaa};
|
package/dist/price.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a1_0x5e55(_0x33fe03,_0x19f6e6){const _0xb46edf=a1_0xb46e();return a1_0x5e55=function(_0x5e55a4,_0x36d4bd){_0x5e55a4=_0x5e55a4-0x94;let _0xee6051=_0xb46edf[_0x5e55a4];return _0xee6051;},a1_0x5e55(_0x33fe03,_0x19f6e6);}(function(_0xfaf121,_0x2963a5){const _0x5c4a5a=a1_0x5e55,_0x168c35=_0xfaf121();while(!![]){try{const _0x5d19d1=-parseInt(_0x5c4a5a(0xb4))/0x1+-parseInt(_0x5c4a5a(0xc3))/0x2*(-parseInt(_0x5c4a5a(0xc7))/0x3)+parseInt(_0x5c4a5a(0xdd))/0x4+parseInt(_0x5c4a5a(0xc9))/0x5+parseInt(_0x5c4a5a(0xa4))/0x6+parseInt(_0x5c4a5a(0x98))/0x7*(-parseInt(_0x5c4a5a(0x99))/0x8)+-parseInt(_0x5c4a5a(0xc0))/0x9;if(_0x5d19d1===_0x2963a5)break;else _0x168c35['push'](_0x168c35['shift']());}catch(_0x21f0fc){_0x168c35['push'](_0x168c35['shift']());}}}(a1_0xb46e,0x6fe3f));function handleCosting(_0x515e62,_0x502a2c='',_0x5ddf79={},_0x599768,_0x3e4617){const _0x198d36=a1_0x5e55;let _0xee4308=[];const _0x3ac77a=_0x198d36(0xd6),_0x4b7f9c={'couponSign':'-','dp':0x2};_0x5ddf79=typeof _0x5ddf79==='object'&&!Array[_0x198d36(0xaa)](_0x5ddf79)&&_0x5ddf79!==null?_0x5ddf79:{};const _0x4ac54e={..._0x4b7f9c,..._0x5ddf79},_0x545585=Object['keys'](_0x4b7f9c);Object[_0x198d36(0x9b)](_0x5ddf79)['forEach'](_0x3125c5=>{const _0xaae2e1=_0x198d36;!_0x545585[_0xaae2e1(0xd2)](_0x3125c5)&&console['warn']('[yunlin\x20warn]\x20handleCosting:传入的\x20expand\x20参数中包含未知键名:\x20'+_0x3125c5);});let _0x224f47=_0x4ac54e[_0x198d36(0xbc)]||'-',_0x58c43a=_0x4ac54e['dp']||0x2;const _0x25c111=(_0x3f7127,_0x4dd52f=_0x58c43a)=>{const _0x41c3d7=_0x198d36;if(typeof _0x3f7127!==_0x41c3d7(0xb1)&&isNaN(Number(_0x3f7127)))return console[_0x41c3d7(0xd8)](_0x41c3d7(0xc5)+_0x3f7127),_0x3f7127;if(isNaN(_0x4dd52f)||_0x4dd52f<0x0)return _0x3f7127;let _0x5d8f20=Number(_0x3f7127);if(!isFinite(_0x5d8f20))return _0x3f7127;return _0x4dd52f=Math[_0x41c3d7(0xbb)](0x0,Math[_0x41c3d7(0xd7)](_0x4dd52f)),_0x5d8f20[_0x41c3d7(0xb2)](_0x4dd52f);},_0x142cac=(_0x14f7c9,_0x5276b9)=>{const _0x99d34d=_0x198d36;if(_0x5276b9&&typeof _0x5276b9===_0x99d34d(0x97)&&!Array[_0x99d34d(0xaa)](_0x5276b9))for(const _0x3df4ef in _0x14f7c9){_0x14f7c9[_0x99d34d(0xdc)](_0x3df4ef)&&_0x5276b9[_0x99d34d(0xdc)](_0x3df4ef)&&(_0x14f7c9[_0x3df4ef]=_0x5276b9[_0x3df4ef]);}else console[_0x99d34d(0xd8)]((_0x99d34d(0x9d)+JSON[_0x99d34d(0xa7)](_0x5276b9,null,0x2)+'\x0a\x09\x09\x09正确参数:'+JSON[_0x99d34d(0xa7)](_0x14f7c9,null,0x2))[_0x99d34d(0xb9)]());return _0x14f7c9;};let _0x175696={'people':'人員費用','service':_0x198d36(0xb8),'trip':_0x198d36(0xa5),'other':_0x198d36(0xb3),'reduction':'減免費用','totalprice':'總計','airtax':'機場稅'},_0x9b8c4c={'adult':'成人','child':'兒童','childusebed':_0x198d36(0x94),'infant':'嬰兒','half':'拼房','tip':'小費','elder':_0x198d36(0xcc),'vip':'會員減免','promotion':'促銷','insure':'保險費用','coupon':_0x198d36(0xe0),'point':'積分','tax':'稅金','viprecharge':_0x198d36(0xa6),'r':'人','t':'天'};_0x175696=_0x142cac(_0x175696,_0x599768),_0x9b8c4c=_0x142cac(_0x9b8c4c,_0x3e4617);const _0xe4eba9=_0x515e62[_0x198d36(0x9f)](_0x3f96ca=>_0x3f96ca[_0x198d36(0xb0)]==_0x198d36(0xd3));if(_0xe4eba9['length']){let _0x3d6806={'title':_0x175696[_0x198d36(0xc2)],'type':_0x198d36(0xd3),'list':[]};_0xe4eba9[_0x198d36(0xcd)](_0x4cdf57=>{const _0x17f928=_0x198d36;_0x3d6806[_0x17f928(0xbf)][_0x17f928(0xac)]({'title':_0x9b8c4c[_0x4cdf57[_0x17f928(0x9a)]],'info':_0x502a2c+_0x25c111(_0x4cdf57[_0x17f928(0xdf)])+_0x3ac77a+_0x4cdf57['nRs'],'nRs':_0x4cdf57[_0x17f928(0x9e)],'unit':_0x4cdf57[_0x17f928(0xdf)],'cb':_0x4cdf57[_0x17f928(0xa1)],'type':_0x17f928(0xd3)});}),_0xee4308[_0x198d36(0xac)](_0x3d6806);}const _0x23e264=_0x515e62['filter'](_0xf5686d=>_0xf5686d[_0x198d36(0xb0)]=='service');if(_0x23e264['length']){let _0x55cd6b={'title':_0x175696['service'],'type':_0x198d36(0xa9),'list':[]};_0x23e264['map'](_0x1089f9=>{const _0xfa405c=_0x198d36;_0x55cd6b[_0xfa405c(0xbf)]['push']({'title':_0x1089f9[_0xfa405c(0xbe)]+('['+_0x1089f9[_0xfa405c(0xba)]+']'),'info':_0x502a2c+_0x25c111(_0x1089f9[_0xfa405c(0xb7)])+_0x3ac77a+_0x1089f9[_0xfa405c(0xd4)],'nRs':_0x1089f9['num'],'unit':_0x1089f9[_0xfa405c(0xb7)],'cb':_0x1089f9[_0xfa405c(0xc1)],'type':_0xfa405c(0xa9)});}),_0xee4308[_0x198d36(0xac)](_0x55cd6b);}const _0x176a74=_0x515e62[_0x198d36(0x9f)](_0x16901e=>_0x16901e[_0x198d36(0xb0)]=='trip');if(_0x176a74[_0x198d36(0xc8)]){let _0x1c9e21={'title':_0x175696[_0x198d36(0xa2)],'type':'trip','list':[]};_0x176a74[_0x198d36(0xcd)](_0x481407=>{const _0x14db0c=_0x198d36;_0x481407['adultnum']!='0'&&_0x1c9e21[_0x14db0c(0xbf)][_0x14db0c(0xac)]({'title':_0x481407[_0x14db0c(0xbe)]+('['+_0x9b8c4c[_0x14db0c(0xde)]+']'),'info':_0x502a2c+_0x25c111(_0x481407[_0x14db0c(0xdb)])+_0x3ac77a+_0x481407[_0x14db0c(0xda)],'nRs':_0x481407[_0x14db0c(0xda)],'unit':_0x481407[_0x14db0c(0xdb)],'cb':_0x481407[_0x14db0c(0xa8)],'type':_0x14db0c(0xa2)}),_0x481407['childnum']!='0'&&_0x1c9e21['list'][_0x14db0c(0xac)]({'title':_0x481407[_0x14db0c(0xbe)]+('['+_0x9b8c4c[_0x14db0c(0xc4)]+']'),'info':_0x502a2c+_0x25c111(_0x481407[_0x14db0c(0xd5)])+_0x3ac77a+_0x481407['childnum'],'nRs':_0x481407[_0x14db0c(0xb5)],'unit':_0x481407[_0x14db0c(0xd5)],'cb':_0x481407['basechildprice'],'type':_0x14db0c(0xa2)});}),_0xee4308[_0x198d36(0xac)](_0x1c9e21);}let _0x52db64=[];const _0x58c8bb=_0x515e62[_0x198d36(0x9f)](_0x10a922=>_0x10a922['strLx']==_0x198d36(0xad));_0x58c8bb[_0x198d36(0xc8)]&&_0x58c8bb[_0x198d36(0xcd)](_0x1d0112=>{const _0xe60a3f=_0x198d36,_0xa608e2=_0x1d0112[_0xe60a3f(0xbe)]['split']('|')||[''];_0x52db64[_0xe60a3f(0xac)]({'title':_0x9b8c4c[_0xe60a3f(0xad)]+('['+_0xa608e2[0x0]+']'),'info':_0x502a2c+_0x224f47+_0x25c111(_0x1d0112[_0xe60a3f(0x96)]),'unit':_0x1d0112[_0xe60a3f(0x96)],'cb':_0x1d0112[_0xe60a3f(0x96)],'type':_0xe60a3f(0xad)});});const _0x1ce210=_0x515e62[_0x198d36(0x9f)](_0x4b5b7f=>_0x4b5b7f[_0x198d36(0xb0)]=='vipdiscounted');_0x1ce210['length']&&_0x1ce210[_0x198d36(0xcd)](_0x21a820=>{const _0x159f52=_0x198d36;_0x52db64[_0x159f52(0xac)]({'title':_0x9b8c4c[_0x159f52(0xab)]+('['+_0x21a820['name']+']'),'info':_0x502a2c+_0x224f47+_0x25c111(_0x21a820['money']),'unit':_0x21a820[_0x159f52(0x96)],'cb':_0x21a820['money'],'type':_0x159f52(0xab)});});const _0x3f638b=_0x515e62[_0x198d36(0x9f)](_0x1acf54=>_0x1acf54['strLx']==_0x198d36(0xcf));_0x3f638b[_0x198d36(0xc8)]&&_0x3f638b['map'](_0xa97744=>{const _0xe51681=_0x198d36;_0x52db64[_0xe51681(0xac)]({'title':_0x9b8c4c[_0xe51681(0xcf)],'info':_0x502a2c+_0x224f47+_0x25c111(_0xa97744[_0xe51681(0x96)]),'unit':_0xa97744[_0xe51681(0x96)],'cb':_0xa97744[_0xe51681(0x96)],'type':_0xe51681(0xcf)});});_0x52db64[_0x198d36(0xc8)]&&_0xee4308[_0x198d36(0xac)]({'title':_0x175696[_0x198d36(0xbd)],'type':'reduction','list':_0x52db64});const _0x1c6fb5=_0x515e62['filter'](_0x100c49=>_0x100c49[_0x198d36(0xb0)]==_0x198d36(0xd1));if(_0x1c6fb5['length']){let _0x88f392={'title':_0x175696[_0x198d36(0xd1)],'type':_0x198d36(0xd1),'list':[]};_0x1c6fb5['map'](_0x5e8116=>{const _0x5808ad=_0x198d36;_0x88f392[_0x5808ad(0xbf)]['push']({'title':_0x9b8c4c[_0x5e8116[_0x5808ad(0xcb)]],'info':_0x502a2c+_0x25c111(_0x5e8116['unitprice'])+_0x3ac77a+_0x5e8116['sl'],'nRs':_0x5e8116['sl'],'unit':_0x5e8116[_0x5808ad(0xb7)],'cb':_0x5e8116[_0x5808ad(0x95)],'type':_0x5e8116[_0x5808ad(0xcb)]});}),_0xee4308[_0x198d36(0xac)](_0x88f392);}const _0x5a089a=['base','service',_0x198d36(0xa2),'elder','vipdiscounted',_0x198d36(0xcf),_0x198d36(0xd1)],_0x130674=_0x515e62[_0x198d36(0x9f)](_0x29a130=>!_0x5a089a[_0x198d36(0xd2)](_0x29a130[_0x198d36(0xb0)]));let _0x236a05={'title':_0x175696[_0x198d36(0xd9)],'type':_0x198d36(0xd9),'list':[]};for(var _0x354ee7=0x0;_0x354ee7<_0x130674[_0x198d36(0xc8)];_0x354ee7++){const _0x559e93=_0x130674[_0x354ee7];_0x559e93[_0x198d36(0xb0)]==_0x198d36(0xa3)&&_0x236a05[_0x198d36(0xbf)]['push']({'title':_0x9b8c4c[_0x198d36(0xa3)]+('['+_0x559e93[_0x198d36(0xbe)]+']'),'info':_0x502a2c+_0x25c111(_0x559e93['money']),'unit':_0x559e93['money'],'type':_0x559e93[_0x198d36(0xb0)]}),_0x559e93[_0x198d36(0xb0)]==_0x198d36(0xb6)&&_0x236a05[_0x198d36(0xbf)]['push']({'title':_0x9b8c4c['insure']+('['+_0x559e93['name']+']'),'info':_0x502a2c+_0x25c111(_0x559e93[_0x198d36(0xaf)])+_0x3ac77a+_0x559e93[_0x198d36(0xc6)]+_0x9b8c4c['r'],'nRs':_0x559e93['users'],'unit':_0x559e93[_0x198d36(0xaf)],'cb':_0x559e93['unit'],'type':'insure'}),(_0x559e93[_0x198d36(0xb0)]==_0x198d36(0xa0)||_0x559e93['strLx']=='point')&&_0x236a05[_0x198d36(0xbf)][_0x198d36(0xac)]({'title':_0x9b8c4c[_0x559e93['strLx']],'info':_0x502a2c+_0x224f47+_0x25c111(_0x559e93['money']),'unit':_0x559e93[_0x198d36(0x96)],'type':_0x559e93[_0x198d36(0xb0)]}),_0x559e93[_0x198d36(0xb0)]==_0x198d36(0x9c)&&_0x236a05[_0x198d36(0xbf)][_0x198d36(0xac)]({'title':_0x9b8c4c[_0x559e93['strLx']],'info':_0x502a2c+_0x25c111(_0x559e93['tip'])+_0x3ac77a+_0x559e93['tipuser']+_0x9b8c4c['r']+_0x3ac77a+_0x559e93[_0x198d36(0xca)]+_0x9b8c4c['t'],'nRs':_0x559e93['tipuser'],'count':_0x559e93[_0x198d36(0xca)],'unit':_0x559e93['tip'],'type':_0x559e93[_0x198d36(0xb0)]}),_0x559e93['strLx']=='tax'&&_0x236a05['list'][_0x198d36(0xac)]({'title':_0x9b8c4c[_0x559e93[_0x198d36(0xb0)]],'info':_0x502a2c+_0x25c111(_0x559e93['totaltax']),'unit':_0x559e93[_0x198d36(0xd0)],'type':_0x559e93[_0x198d36(0xb0)]});}_0x236a05[_0x198d36(0xbf)]['length']&&_0xee4308[_0x198d36(0xac)](_0x236a05);const _0x22ac5e=_0x515e62[_0x198d36(0x9f)](_0x19b824=>_0x19b824[_0x198d36(0xb0)]=='totalprice');return _0x22ac5e[_0x198d36(0xc8)]&&_0xee4308['push']({'title':_0x175696[_0x198d36(0xce)],'type':_0x198d36(0xce),'list':[{'title':_0x175696[_0x198d36(0xce)],'info':_0x502a2c+_0x25c111(_0x22ac5e[0x0][_0x198d36(0xae)])}]}),_0xee4308;}function a1_0xb46e(){const _0x124227=['name','list','5614470dzVAeT','baseprice','people','2qiLRbV','child','ftd\x20函数接收到无效的数字输入:\x20','users','750087AFRznL','length','159860ppeNJB','tipday','rylx','遊客優惠','map','totalprice','promotion','totaltax','airtax','includes','base','num','childprice','\x20*\x20','floor','error','other','adultnum','adultprice','hasOwnProperty','1989788saRYQC','adult','fLsjUnit','優惠券','兒童[占床]','unitpricewb','money','object','353752kFLfFe','56iIeBsR','strJgbm','keys','tip','yunlin:\x20handleCosting函数提交参数错误。\x0a\x09\x09\x09错误参数:','nRs','filter','coupon','fJcbzlsjUnit','trip','viprecharge','4253604AMCPNL','附加行程','會員充值','stringify','baseadultprice','service','isArray','vip','push','elder','price','unit','strLx','number','toFixed','其他費用','52497DzSWkV','childnum','insure','unitprice','附加服務','trim','itemname','max','couponSign','reduction'];a1_0xb46e=function(){return _0x124227;};return a1_0xb46e();}export default{'handleCosting':handleCosting};
|
|
1
|
+
(function(_0x3aa503,_0x5d75b4){const _0x2c219d=a1_0x48fb,_0x27cfc4=_0x3aa503();while(!![]){try{const _0x21810d=-parseInt(_0x2c219d(0x19b))/0x1+parseInt(_0x2c219d(0x190))/0x2+-parseInt(_0x2c219d(0x1bd))/0x3+-parseInt(_0x2c219d(0x18d))/0x4*(-parseInt(_0x2c219d(0x191))/0x5)+-parseInt(_0x2c219d(0x1a6))/0x6*(-parseInt(_0x2c219d(0x183))/0x7)+parseInt(_0x2c219d(0x19e))/0x8+-parseInt(_0x2c219d(0x187))/0x9;if(_0x21810d===_0x5d75b4)break;else _0x27cfc4['push'](_0x27cfc4['shift']());}catch(_0x260246){_0x27cfc4['push'](_0x27cfc4['shift']());}}}(a1_0x55bc,0x95109));function a1_0x48fb(_0x230c45,_0x5f4d35){const _0x55bc2f=a1_0x55bc();return a1_0x48fb=function(_0x48fbe3,_0x1dd2c9){_0x48fbe3=_0x48fbe3-0x175;let _0x2b4841=_0x55bc2f[_0x48fbe3];return _0x2b4841;},a1_0x48fb(_0x230c45,_0x5f4d35);}function handleCosting(_0x4fc607,_0x8dad94='',_0x2713d2={},_0x42f083,_0x2f4901){const _0x2166e2=a1_0x48fb;let _0x3452cd=[];const _0x2b4cbd=_0x2166e2(0x17b),_0x272a8a={'couponSign':'-','dp':0x2};_0x2713d2=typeof _0x2713d2===_0x2166e2(0x178)&&!Array[_0x2166e2(0x18b)](_0x2713d2)&&_0x2713d2!==null?_0x2713d2:{};const _0x4916bc={..._0x272a8a,..._0x2713d2},_0x2bf40a=Object[_0x2166e2(0x185)](_0x272a8a);Object[_0x2166e2(0x185)](_0x2713d2)[_0x2166e2(0x175)](_0x94f66=>{const _0x346703=_0x2166e2;!_0x2bf40a['includes'](_0x94f66)&&console[_0x346703(0x179)]('[yunlin\x20warn]\x20handleCosting:传入的\x20expand\x20参数中包含未知键名:\x20'+_0x94f66);});let _0x2507e5=_0x4916bc[_0x2166e2(0x19f)]||'-',_0x127fcb=_0x4916bc['dp']||0x2;const _0xf1d592=(_0x117ec4,_0x2d13c9=_0x127fcb)=>{const _0x1c429e=_0x2166e2;if(typeof _0x117ec4!==_0x1c429e(0x1c2)&&isNaN(Number(_0x117ec4)))return console[_0x1c429e(0x1be)](_0x1c429e(0x184)+_0x117ec4),_0x117ec4;if(isNaN(_0x2d13c9)||_0x2d13c9<0x0)return _0x117ec4;let _0x330c9c=Number(_0x117ec4);if(!isFinite(_0x330c9c))return _0x117ec4;return _0x2d13c9=Math[_0x1c429e(0x194)](0x0,Math[_0x1c429e(0x18c)](_0x2d13c9)),_0x330c9c[_0x1c429e(0x186)](_0x2d13c9);},_0x593227=(_0x143f3b,_0x1de126)=>{const _0x15aedf=_0x2166e2;if(_0x1de126&&typeof _0x1de126===_0x15aedf(0x178)&&!Array[_0x15aedf(0x18b)](_0x1de126))for(const _0x2d1952 in _0x143f3b){_0x143f3b[_0x15aedf(0x1b2)](_0x2d1952)&&_0x1de126[_0x15aedf(0x1b2)](_0x2d1952)&&(_0x143f3b[_0x2d1952]=_0x1de126[_0x2d1952]);}else console[_0x15aedf(0x1be)](('yunlin:\x20handleCosting函数提交参数错误。\x0a\x09\x09\x09错误参数:'+JSON[_0x15aedf(0x1ae)](_0x1de126,null,0x2)+_0x15aedf(0x182)+JSON[_0x15aedf(0x1ae)](_0x143f3b,null,0x2))[_0x15aedf(0x176)]());return _0x143f3b;};let _0x21f9fc={'people':_0x2166e2(0x19c),'service':_0x2166e2(0x177),'trip':_0x2166e2(0x17f),'other':'其他費用','reduction':_0x2166e2(0x197),'totalprice':'總計','airtax':_0x2166e2(0x1bb)},_0x24cce6={'adult':'成人','child':'兒童','childusebed':_0x2166e2(0x19d),'infant':'嬰兒','half':'拼房','tip':'小費','elder':_0x2166e2(0x18e),'vip':'會員減免','promotion':'促銷','insure':'保險費用','coupon':_0x2166e2(0x1a5),'point':'積分','tax':'稅金','viprecharge':_0x2166e2(0x1b8),'r':'人','t':'天'};_0x21f9fc=_0x593227(_0x21f9fc,_0x42f083),_0x24cce6=_0x593227(_0x24cce6,_0x2f4901);const _0x248f5=_0x4fc607[_0x2166e2(0x1c3)](_0x36ad2c=>_0x36ad2c[_0x2166e2(0x1ba)]==_0x2166e2(0x1a8));if(_0x248f5[_0x2166e2(0x1b4)]){let _0x212ec2={'title':_0x21f9fc['people'],'type':_0x2166e2(0x1a8),'list':[]};_0x248f5['map'](_0x51fad9=>{const _0xaf9545=_0x2166e2;_0x212ec2[_0xaf9545(0x17d)][_0xaf9545(0x1a3)]({'title':_0x24cce6[_0x51fad9[_0xaf9545(0x1c1)]],'info':_0x8dad94+_0xf1d592(_0x51fad9[_0xaf9545(0x193)])+_0x2b4cbd+_0x51fad9[_0xaf9545(0x1b7)],'nRs':_0x51fad9[_0xaf9545(0x1b7)],'unit':_0x51fad9['fLsjUnit'],'cb':_0x51fad9[_0xaf9545(0x1b0)],'type':'base'});}),_0x3452cd['push'](_0x212ec2);}const _0x3b79d4=_0x4fc607['filter'](_0x72ffc1=>_0x72ffc1['strLx']==_0x2166e2(0x1b6));if(_0x3b79d4[_0x2166e2(0x1b4)]){let _0x1db8c5={'title':_0x21f9fc[_0x2166e2(0x1b6)],'type':_0x2166e2(0x1b6),'list':[]};_0x3b79d4[_0x2166e2(0x189)](_0x475096=>{const _0x3ce36e=_0x2166e2;_0x1db8c5['list'][_0x3ce36e(0x1a3)]({'title':_0x475096[_0x3ce36e(0x1bc)]+('['+_0x475096[_0x3ce36e(0x1bf)]+']'),'info':_0x8dad94+_0xf1d592(_0x475096[_0x3ce36e(0x1a2)])+_0x2b4cbd+_0x475096['num'],'nRs':_0x475096[_0x3ce36e(0x188)],'unit':_0x475096[_0x3ce36e(0x1a2)],'cb':_0x475096['baseprice'],'type':_0x3ce36e(0x1b6)});}),_0x3452cd['push'](_0x1db8c5);}const _0xceb8bc=_0x4fc607[_0x2166e2(0x1c3)](_0x5db410=>_0x5db410['strLx']==_0x2166e2(0x1b5));if(_0xceb8bc[_0x2166e2(0x1b4)]){let _0x23ca01={'title':_0x21f9fc[_0x2166e2(0x1b5)],'type':_0x2166e2(0x1b5),'list':[]};_0xceb8bc['map'](_0x314fa3=>{const _0x43af5d=_0x2166e2;_0x314fa3[_0x43af5d(0x1ad)]!='0'&&_0x23ca01[_0x43af5d(0x17d)]['push']({'title':_0x314fa3[_0x43af5d(0x1bc)]+('['+_0x24cce6[_0x43af5d(0x1a1)]+']'),'info':_0x8dad94+_0xf1d592(_0x314fa3['adultprice'])+_0x2b4cbd+_0x314fa3[_0x43af5d(0x1ad)],'nRs':_0x314fa3['adultnum'],'unit':_0x314fa3[_0x43af5d(0x192)],'cb':_0x314fa3[_0x43af5d(0x1af)],'type':_0x43af5d(0x1b5)}),_0x314fa3[_0x43af5d(0x1b9)]!='0'&&_0x23ca01['list'][_0x43af5d(0x1a3)]({'title':_0x314fa3['name']+('['+_0x24cce6[_0x43af5d(0x196)]+']'),'info':_0x8dad94+_0xf1d592(_0x314fa3[_0x43af5d(0x198)])+_0x2b4cbd+_0x314fa3[_0x43af5d(0x1b9)],'nRs':_0x314fa3[_0x43af5d(0x1b9)],'unit':_0x314fa3[_0x43af5d(0x198)],'cb':_0x314fa3['basechildprice'],'type':_0x43af5d(0x1b5)});}),_0x3452cd[_0x2166e2(0x1a3)](_0x23ca01);}let _0xd32b57=[];const _0x12bbd8=_0x4fc607[_0x2166e2(0x1c3)](_0x12cb13=>_0x12cb13[_0x2166e2(0x1ba)]==_0x2166e2(0x1b1));_0x12bbd8[_0x2166e2(0x1b4)]&&_0x12bbd8[_0x2166e2(0x189)](_0x8a5dc4=>{const _0x22462d=_0x2166e2,_0x438202=_0x8a5dc4[_0x22462d(0x1bc)][_0x22462d(0x1ac)]('|')||[''];_0xd32b57[_0x22462d(0x1a3)]({'title':_0x24cce6[_0x22462d(0x1b1)]+('['+_0x438202[0x0]+']'),'info':_0x8dad94+_0x2507e5+_0xf1d592(_0x8a5dc4['money']),'unit':_0x8a5dc4[_0x22462d(0x181)],'cb':_0x8a5dc4[_0x22462d(0x181)],'type':'elder'});});const _0x3637d0=_0x4fc607[_0x2166e2(0x1c3)](_0x37a3b5=>_0x37a3b5[_0x2166e2(0x1ba)]=='vipdiscounted');_0x3637d0[_0x2166e2(0x1b4)]&&_0x3637d0[_0x2166e2(0x189)](_0x3d2b38=>{const _0x2cbfaf=_0x2166e2;_0xd32b57[_0x2cbfaf(0x1a3)]({'title':_0x24cce6[_0x2cbfaf(0x18a)]+('['+_0x3d2b38[_0x2cbfaf(0x1bc)]+']'),'info':_0x8dad94+_0x2507e5+_0xf1d592(_0x3d2b38['money']),'unit':_0x3d2b38[_0x2cbfaf(0x181)],'cb':_0x3d2b38[_0x2cbfaf(0x181)],'type':_0x2cbfaf(0x18a)});});const _0x1bf7fb=_0x4fc607[_0x2166e2(0x1c3)](_0xf15dd0=>_0xf15dd0['strLx']==_0x2166e2(0x195));_0x1bf7fb['length']&&_0x1bf7fb[_0x2166e2(0x189)](_0x1ede1b=>{const _0x183d3e=_0x2166e2;_0xd32b57[_0x183d3e(0x1a3)]({'title':_0x24cce6[_0x183d3e(0x195)],'info':_0x8dad94+_0x2507e5+_0xf1d592(_0x1ede1b[_0x183d3e(0x181)]),'unit':_0x1ede1b[_0x183d3e(0x181)],'cb':_0x1ede1b[_0x183d3e(0x181)],'type':_0x183d3e(0x195)});});_0xd32b57[_0x2166e2(0x1b4)]&&_0x3452cd[_0x2166e2(0x1a3)]({'title':_0x21f9fc[_0x2166e2(0x1aa)],'type':'reduction','list':_0xd32b57});const _0xa8a70=_0x4fc607[_0x2166e2(0x1c3)](_0x981b13=>_0x981b13['strLx']=='airtax');if(_0xa8a70[_0x2166e2(0x1b4)]){let _0x4968c0={'title':_0x21f9fc[_0x2166e2(0x17e)],'type':_0x2166e2(0x17e),'list':[]};_0xa8a70[_0x2166e2(0x189)](_0x5293ff=>{const _0xeeddb3=_0x2166e2;_0x4968c0[_0xeeddb3(0x17d)][_0xeeddb3(0x1a3)]({'title':_0x24cce6[_0x5293ff[_0xeeddb3(0x1a9)]],'info':_0x8dad94+_0xf1d592(_0x5293ff[_0xeeddb3(0x1a2)])+_0x2b4cbd+_0x5293ff['sl'],'nRs':_0x5293ff['sl'],'unit':_0x5293ff[_0xeeddb3(0x1a2)],'cb':_0x5293ff['unitpricewb'],'type':_0x5293ff[_0xeeddb3(0x1a9)]});}),_0x3452cd[_0x2166e2(0x1a3)](_0x4968c0);}const _0x3bbb61=[_0x2166e2(0x1a8),'service','trip',_0x2166e2(0x1b1),'vipdiscounted','promotion',_0x2166e2(0x17e)],_0x5db973=_0x4fc607[_0x2166e2(0x1c3)](_0x3f04d9=>!_0x3bbb61[_0x2166e2(0x1a0)](_0x3f04d9[_0x2166e2(0x1ba)]));let _0x42be8f={'title':_0x21f9fc[_0x2166e2(0x1c0)],'type':_0x2166e2(0x1c0),'list':[]};for(var _0x1c9b05=0x0;_0x1c9b05<_0x5db973['length'];_0x1c9b05++){const _0xb37333=_0x5db973[_0x1c9b05];_0xb37333['strLx']==_0x2166e2(0x1ab)&&_0x42be8f[_0x2166e2(0x17d)][_0x2166e2(0x1a3)]({'title':_0x24cce6[_0x2166e2(0x1ab)]+('['+_0xb37333[_0x2166e2(0x1bc)]+']'),'info':_0x8dad94+_0xf1d592(_0xb37333[_0x2166e2(0x181)]),'unit':_0xb37333[_0x2166e2(0x181)],'type':_0xb37333[_0x2166e2(0x1ba)]}),_0xb37333[_0x2166e2(0x1ba)]==_0x2166e2(0x1b3)&&_0x42be8f[_0x2166e2(0x17d)][_0x2166e2(0x1a3)]({'title':_0x24cce6[_0x2166e2(0x1b3)]+('['+_0xb37333['name']+']'),'info':_0x8dad94+_0xf1d592(_0xb37333['unit'])+_0x2b4cbd+_0xb37333[_0x2166e2(0x17c)]+_0x24cce6['r'],'nRs':_0xb37333[_0x2166e2(0x17c)],'unit':_0xb37333[_0x2166e2(0x17a)],'cb':_0xb37333[_0x2166e2(0x17a)],'type':'insure'}),(_0xb37333[_0x2166e2(0x1ba)]==_0x2166e2(0x1a7)||_0xb37333[_0x2166e2(0x1ba)]=='point')&&_0x42be8f[_0x2166e2(0x17d)][_0x2166e2(0x1a3)]({'title':_0x24cce6[_0xb37333['strLx']],'info':_0x8dad94+_0x2507e5+_0xf1d592(_0xb37333[_0x2166e2(0x181)]),'unit':_0xb37333['money'],'type':_0xb37333[_0x2166e2(0x1ba)]}),_0xb37333['strLx']=='tip'&&_0x42be8f[_0x2166e2(0x17d)][_0x2166e2(0x1a3)]({'title':_0x24cce6[_0xb37333[_0x2166e2(0x1ba)]],'info':_0x8dad94+_0xf1d592(_0xb37333[_0x2166e2(0x19a)])+_0x2b4cbd+_0xb37333['tipuser']+_0x24cce6['r']+_0x2b4cbd+_0xb37333[_0x2166e2(0x199)]+_0x24cce6['t'],'nRs':_0xb37333[_0x2166e2(0x1a4)],'count':_0xb37333['tipday'],'unit':_0xb37333[_0x2166e2(0x19a)],'type':_0xb37333[_0x2166e2(0x1ba)]}),_0xb37333[_0x2166e2(0x1ba)]=='tax'&&_0x42be8f[_0x2166e2(0x17d)]['push']({'title':_0x24cce6[_0xb37333[_0x2166e2(0x1ba)]],'info':_0x8dad94+_0xf1d592(_0xb37333[_0x2166e2(0x180)]),'unit':_0xb37333[_0x2166e2(0x180)],'type':_0xb37333['strLx']});}_0x42be8f['list'][_0x2166e2(0x1b4)]&&_0x3452cd['push'](_0x42be8f);const _0x405073=_0x4fc607['filter'](_0x34aa7c=>_0x34aa7c[_0x2166e2(0x1ba)]=='totalprice');return _0x405073[_0x2166e2(0x1b4)]&&_0x3452cd[_0x2166e2(0x1a3)]({'title':_0x21f9fc['totalprice'],'type':_0x2166e2(0x18f),'list':[{'title':_0x21f9fc[_0x2166e2(0x18f)],'info':_0x8dad94+_0xf1d592(_0x405073[0x0]['price'])}]}),_0x3452cd;}export default{'handleCosting':handleCosting};function a1_0x55bc(){const _0x4ae16f=['totaltax','money','\x0a\x09\x09\x09正确参数:','28oBDfyP','ftd\x20函数接收到无效的数字输入:\x20','keys','toFixed','16044930GgZLRU','num','map','vip','isArray','floor','167644TuexYx','遊客優惠','totalprice','565780wCNXDL','135PgZZhk','adultprice','fLsjUnit','max','promotion','child','減免費用','childprice','tipday','tip','578271HToLcq','人員費用','兒童[占床]','7193384qsjDJr','couponSign','includes','adult','unitprice','push','tipuser','優惠券','1689678QExTnh','coupon','base','rylx','reduction','viprecharge','split','adultnum','stringify','baseadultprice','fJcbzlsjUnit','elder','hasOwnProperty','insure','length','trip','service','nRs','會員充值','childnum','strLx','機場稅','name','1405506yTthFX','error','itemname','other','strJgbm','number','filter','forEach','trim','附加服務','object','warn','unit','\x20*\x20','users','list','airtax','附加行程'];a1_0x55bc=function(){return _0x4ae16f;};return a1_0x55bc();}
|
package/dist/room.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5249d2,_0x27ee9a){const _0x48043c=a2_0x3334,_0x6ee360=_0x5249d2();while(!![]){try{const _0x330ea9=parseInt(_0x48043c(0x105))/0x1*(-parseInt(_0x48043c(0x109))/0x2)+parseInt(_0x48043c(0x120))/0x3*(-parseInt(_0x48043c(0x114))/0x4)+parseInt(_0x48043c(0x108))/0x5+-parseInt(_0x48043c(0x116))/0x6*(parseInt(_0x48043c(0x113))/0x7)+parseInt(_0x48043c(0x11e))/0x8+-parseInt(_0x48043c(0x107))/0x9+-parseInt(_0x48043c(0x121))/0xa*(-parseInt(_0x48043c(0x11d))/0xb);if(_0x330ea9===_0x27ee9a)break;else _0x6ee360['push'](_0x6ee360['shift']());}catch(_0x5494bd){_0x6ee360['push'](_0x6ee360['shift']());}}}(a2_0x51eb,0x2f5c6));function getRoomCount(_0x31ebea,_0xcfa9f0){const _0x3a523f=a2_0x3334,_0x3693f1=Array[_0x3a523f(0x115)](_0x31ebea);if(!_0x3693f1)_0x31ebea=[_0x31ebea];let _0x407899=[];return _0x31ebea[_0x3a523f(0x10c)](_0x1bc361=>{const _0x34e809=_0x3a523f;let _0x44e4a9=![];if(!_0x1bc361[_0x34e809(0x118)]){let _0x5d7652=_0x1bc361[_0x34e809(0x10a)];if(_0x1bc361[_0x34e809(0x11b)]||!_0xcfa9f0[_0x34e809(0x122)])_0x5d7652+=_0x1bc361[_0x34e809(0x110)];const _0x104bb0=_0xcfa9f0[_0x34e809(0x11a)]['find'](_0x1c3e4d=>Number(_0x1c3e4d[_0x34e809(0x10e)])===_0x5d7652);if(!_0x104bb0)_0x44e4a9=!![];else{let _0x5c32b3=_0x1bc361[_0x34e809(0x10a)]+_0x1bc361[_0x34e809(0x110)]+_0x1bc361['infantnum'];_0x5c32b3>_0x104bb0[_0x34e809(0x111)]&&(_0x44e4a9=!![]);}}_0x407899[_0x34e809(0x10b)](_0x44e4a9);}),_0x3693f1?_0x407899:_0x407899[0x0];}function getRoomConfig(_0x2640ab){const _0x3b30b2=a2_0x3334;let _0x119996=_0x2640ab[_0x3b30b2(0x106)](_0x30dd3c=>_0x30dd3c[_0x3b30b2(0x10e)]===_0x3b30b2(0x11b)),_0x270aab=_0x2640ab[_0x3b30b2(0x106)](_0x4b79fd=>_0x4b79fd[_0x3b30b2(0x10e)]===_0x3b30b2(0x119));const _0x24fb42=_0x2640ab['some'](_0x273589=>_0x273589[_0x3b30b2(0x10e)]===_0x3b30b2(0x10d)),_0x2a3df2=_0x2640ab['some'](_0x5a9397=>_0x5a9397[_0x3b30b2(0x10e)]===_0x3b30b2(0x122)),_0xbc998c=_0x2640ab[_0x3b30b2(0x117)](_0x38cfd3=>{const _0x145246=_0x3b30b2;return{'strCode':_0x38cfd3[_0x145246(0x10e)],'nMaxIn':_0x38cfd3[_0x145246(0x111)]};});if(_0x270aab){const _0x48daba=_0x2640ab[_0x3b30b2(0x106)](_0x5d7b27=>_0x5d7b27['strCode']=='2');_0x270aab=_0x270aab&&_0x48daba;}if(_0x119996)_0x119996=_0x119996&&_0x2a3df2;return{'childusebed':_0x119996,'half':_0x270aab,'infant':_0x24fb42,'child':_0x2a3df2,'list':_0xbc998c};}function a2_0x51eb(){const _0x155335=['max','23518AmjLEf','2820032nwjwQj','filter','3jWoOSa','2850jMgknl','child','409QkYKYw','some','136476tytlbC','513240NjzSYq','1214QKpKdy','adultnum','push','forEach','infant','strCode','length','childrennum','nMaxIn','infantnum','154091evbxwI','1019428gHlHUm','isArray','96yNdLej','map','isalotment','half','list','childusebed'];a2_0x51eb=function(){return _0x155335;};return a2_0x51eb();}function isRoomPiece(_0x4975a7,_0x20bca9){const _0x470c27=a2_0x3334;return _0x20bca9&&_0x4975a7[_0x470c27(0x10a)]===0x1&&_0x4975a7[_0x470c27(0x110)]===0x0&&_0x4975a7[_0x470c27(0x112)]===0x0;}function getRoomItemRange(_0x231511,_0x3fac4d,_0x54e84e={'child':'兒童','infant':'嬰兒'}){const _0x18351b=a2_0x3334;if(!_0x3fac4d[_0x18351b(0x10f)])return{'list':[],'yelist':[]};const _0xd93e44=Math[_0x18351b(0x11c)](..._0x3fac4d[_0x18351b(0x117)](_0x5e2b30=>Number(_0x5e2b30['nMaxIn']))),_0x4382fa=_0xd93e44-_0x231511[_0x18351b(0x10a)]-_0x231511['infantnum'];let _0x3d550c=_0xd93e44-_0x231511[_0x18351b(0x10a)]-_0x231511[_0x18351b(0x110)];if(_0x3d550c>0x2)_0x3d550c=0x2;const _0x169df1=(_0x2689df,_0x118307)=>{const _0x228682=_0x18351b,_0x3df840=[];_0x3df840[_0x228682(0x10b)]({'value':0x0,'text':'0\x20'+_0x118307});for(let _0x4d02e3=0x0;_0x4d02e3<_0x2689df;_0x4d02e3++){_0x3df840['push']({'value':_0x4d02e3+0x1,'text':_0x4d02e3+0x1+'\x20'+_0x118307});}return _0x3df840;};return{'list':_0x169df1(_0x4382fa,_0x54e84e[_0x18351b(0x122)]),'yelist':_0x169df1(_0x3d550c,_0x54e84e['infant'])};}function a2_0x3334(_0x495e92,_0x55cf14){const _0x51eb16=a2_0x51eb();return a2_0x3334=function(_0x33345b,_0x2cdc58){_0x33345b=_0x33345b-0x105;let _0x247d98=_0x51eb16[_0x33345b];return _0x247d98;},a2_0x3334(_0x495e92,_0x55cf14);}function getAdultRange(_0x1526c3,_0x16e154='成人'){const _0x5ec510=a2_0x3334;let _0x5f2e20=Math[_0x5ec510(0x11c)](..._0x1526c3[_0x5ec510(0x117)](_0x95806f=>Number(_0x95806f['strCode']))[_0x5ec510(0x11f)](_0x4e3018=>!isNaN(_0x4e3018)));if(!_0x5f2e20)_0x5f2e20=0x4;let _0x415861=[];for(var _0x2c1fe8=0x1;_0x2c1fe8<_0x5f2e20+0x1;_0x2c1fe8++){_0x415861['push']({'value':_0x2c1fe8,'text':_0x2c1fe8+'\x20'+_0x16e154});}return _0x415861;}export default{'getAdultRange':getAdultRange,'getRoomItemRange':getRoomItemRange,'getRoomConfig':getRoomConfig,'isRoomPiece':isRoomPiece,'getRoomCount':getRoomCount};
|
package/dist/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x370fa3,_0x51f4d6){const _0x51071f=a3_0x2e73,_0x54f2b7=_0x370fa3();while(!![]){try{const _0x41c488=-parseInt(_0x51071f(0x77))/0x1+-parseInt(_0x51071f(0x97))/0x2*(parseInt(_0x51071f(0x79))/0x3)+-parseInt(_0x51071f(0x8c))/0x4*(parseInt(_0x51071f(0x87))/0x5)+-parseInt(_0x51071f(0x8a))/0x6+-parseInt(_0x51071f(0x83))/0x7*(-parseInt(_0x51071f(0x92))/0x8)+parseInt(_0x51071f(0x86))/0x9+parseInt(_0x51071f(0x89))/0xa*(parseInt(_0x51071f(0x8d))/0xb);if(_0x41c488===_0x51f4d6)break;else _0x54f2b7['push'](_0x54f2b7['shift']());}catch(_0x1094a5){_0x54f2b7['push'](_0x54f2b7['shift']());}}}(a3_0x29fe,0x538a7));function email(_0x133120){const _0x45c54a=a3_0x2e73;return/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/[_0x45c54a(0x80)](_0x133120);}function a3_0x2e73(_0x52a47e,_0x30d5ae){const _0x29fea7=a3_0x29fe();return a3_0x2e73=function(_0x2e7357,_0x5ebd0a){_0x2e7357=_0x2e7357-0x76;let _0xd2b65c=_0x29fea7[_0x2e7357];return _0xd2b65c;},a3_0x2e73(_0x52a47e,_0x30d5ae);}function mobile(_0x3de062){const _0x1fa0fe=a3_0x2e73;return/^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/[_0x1fa0fe(0x80)](_0x3de062);}function isValidPhoneNumber(_0x5c7743){const _0x4fefd5=a3_0x2e73;if(_0x5c7743[_0x4fefd5(0x94)]('-')){const [_0x27bce8,_0x28bba0]=_0x5c7743[_0x4fefd5(0x8e)]('-');if(_0x27bce8==='86')return/^\d{11}$/[_0x4fefd5(0x80)](_0x28bba0)&&_0x28bba0[_0x4fefd5(0x7e)]('1');else return _0x27bce8==='852'?/^\d{8}$/['test'](_0x28bba0)&&['5','6','9','8'][_0x4fefd5(0x94)](_0x28bba0[_0x4fefd5(0x88)](0x0)):/^\d+$/[_0x4fefd5(0x80)](_0x28bba0);}else return/^\d+$/[_0x4fefd5(0x80)](_0x5c7743);}function url(_0x393342){const _0x4ee758=a3_0x2e73;return/^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/[_0x4ee758(0x80)](_0x393342);}function date(_0x399bfe){const _0x40394e=a3_0x2e73;if(!_0x399bfe)return![];if(number(_0x399bfe))_0x399bfe=+_0x399bfe;return!/Invalid|NaN/['test'](new Date(_0x399bfe)[_0x40394e(0x81)]());}function dateISO(_0x35bfb6){return/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/['test'](_0x35bfb6);}function isNumber(_0x2cbaad){const _0x206f2e=a3_0x2e73;return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/[_0x206f2e(0x80)](_0x2cbaad);}function isString(_0x2839fc){const _0xf70dbe=a3_0x2e73;return typeof _0x2839fc===_0xf70dbe(0x7d);}function digits(_0xd3cdc4){const _0x2dd2cb=a3_0x2e73;return/^\d+$/[_0x2dd2cb(0x80)](_0xd3cdc4);}function idCard(_0x535541){return/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/['test'](_0x535541);}function carNo(_0x148d06){const _0x2421b0=a3_0x2e73,_0x4c125b=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/,_0x259f92=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;if(_0x148d06[_0x2421b0(0x8b)]===0x7)return _0x259f92['test'](_0x148d06);if(_0x148d06[_0x2421b0(0x8b)]===0x8)return _0x4c125b[_0x2421b0(0x80)](_0x148d06);return![];}function amount(_0x4ec42f){const _0x3465b0=a3_0x2e73;return/^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/[_0x3465b0(0x80)](_0x4ec42f);}function a3_0x29fe(){const _0x5987b7=['string','startsWith','number','test','toString','parse','21jauqvK','[object\x20Array]','prototype','50562ljpcQl','892140hIezPK','charAt','149360HFkCTU','2733354CfVjAj','length','4mHnAJv','1122BMPhfE','split','undefined','[object\x20Object]','indexOf','589240GPfzNM','call','includes','object','then','1008vXtrEQ','function','220997abNwQy','isArray','3291OwYHnZ','^\x5cd{','boolean','catch'];a3_0x29fe=function(){return _0x5987b7;};return a3_0x29fe();}function chinese(_0x4c8f2f){const _0x5edc37=a3_0x2e73,_0x40b6e9=/^[\u4e00-\u9fa5]+$/gi;return _0x40b6e9[_0x5edc37(0x80)](_0x4c8f2f);}function letter(_0x15dce0){const _0x1a0ed6=a3_0x2e73;return/^[a-zA-Z]*$/[_0x1a0ed6(0x80)](_0x15dce0);}function enOrNum(_0x46ddf9){const _0x2d592b=/^[0-9a-zA-Z]*$/g;return _0x2d592b['test'](_0x46ddf9);}function contains(_0x15a374,_0x3c4565){const _0x5cec4b=a3_0x2e73;return _0x15a374[_0x5cec4b(0x91)](_0x3c4565)>=0x0;}function range(_0x432e67,_0x5c3888){return _0x432e67>=_0x5c3888[0x0]&&_0x432e67<=_0x5c3888[0x1];}function rangeLength(_0x5be0fb,_0x58b8ef){const _0x2db09a=a3_0x2e73;return _0x5be0fb['length']>=_0x58b8ef[0x0]&&_0x5be0fb[_0x2db09a(0x8b)]<=_0x58b8ef[0x1];}function landline(_0x8dc6ce){const _0x96f519=/^\d{3,4}-\d{7,8}(-\d{3,4})?$/;return _0x96f519['test'](_0x8dc6ce);}function empty(_0xbd4ed0){const _0x289034=a3_0x2e73;switch(typeof _0xbd4ed0){case _0x289034(0x8f):return!![];case _0x289034(0x7d):if(_0xbd4ed0['replace'](/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,'')['length']==0x0)return!![];break;case _0x289034(0x7b):if(!_0xbd4ed0)return!![];break;case _0x289034(0x7f):if(_0xbd4ed0===0x0||isNaN(_0xbd4ed0))return!![];break;case _0x289034(0x95):if(_0xbd4ed0===null||_0xbd4ed0[_0x289034(0x8b)]===0x0)return!![];for(const _0x195fdf in _0xbd4ed0){return![];}return!![];}return![];}function jsonString(_0x1c4e19){const _0x2e46d9=a3_0x2e73;if(typeof _0x1c4e19===_0x2e46d9(0x7d))try{const _0xcb663c=JSON[_0x2e46d9(0x82)](_0x1c4e19);if(typeof _0xcb663c===_0x2e46d9(0x95)&&_0xcb663c)return!![];return![];}catch(_0x41a296){return![];}return![];}function array(_0x164576){const _0x1e6651=a3_0x2e73;if(typeof Array['isArray']===_0x1e6651(0x76))return Array[_0x1e6651(0x78)](_0x164576);return Object[_0x1e6651(0x85)][_0x1e6651(0x81)]['call'](_0x164576)===_0x1e6651(0x84);}function object(_0x36bb25){const _0x230379=a3_0x2e73;return Object['prototype'][_0x230379(0x81)][_0x230379(0x93)](_0x36bb25)===_0x230379(0x90);}function code(_0x40fa24,_0x167bce=0x6){const _0x381f1d=a3_0x2e73;return new RegExp(_0x381f1d(0x7a)+_0x167bce+'}$')[_0x381f1d(0x80)](_0x40fa24);}function func(_0x2fd4cd){return typeof _0x2fd4cd==='function';}function promise(_0x381fe1){const _0x2754d0=a3_0x2e73;return object(_0x381fe1)&&func(_0x381fe1[_0x2754d0(0x96)])&&func(_0x381fe1[_0x2754d0(0x7c)]);}function image(_0x4ed577){const _0x32e0f2=a3_0x2e73,_0x23af36=_0x4ed577[_0x32e0f2(0x8e)]('?')[0x0],_0x11836b=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;return _0x11836b[_0x32e0f2(0x80)](_0x23af36);}function video(_0x178d08){const _0x55eb29=a3_0x2e73,_0x12c978=/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;return _0x12c978[_0x55eb29(0x80)](_0x178d08);}function regExp(_0x2fd03d){const _0x3860aa=a3_0x2e73;return _0x2fd03d&&Object[_0x3860aa(0x85)][_0x3860aa(0x81)][_0x3860aa(0x93)](_0x2fd03d)==='[object\x20RegExp]';}function isNumeric(_0x422b85,_0x48e896=0x0){const _0x283396=a3_0x2e73;if(typeof _0x422b85===_0x283396(0x7f))_0x422b85=_0x422b85[_0x283396(0x81)]();if(typeof _0x422b85!=='string')return![];switch(_0x48e896){case 0x1:return/^\d+(\.\d+)?$/['test'](_0x422b85);case 0x2:return/^-\d+(\.\d+)?$/[_0x283396(0x80)](_0x422b85);case 0x3:return/^-?\d+$/[_0x283396(0x80)](_0x422b85);case 0x4:return/^\d+$/['test'](_0x422b85);case 0x5:return/^-\d+$/['test'](_0x422b85);default:return/^-?\d*\.?\d*$/[_0x283396(0x80)](_0x422b85)&&!_0x422b85[_0x283396(0x7e)]('.')&&!_0x422b85[_0x283396(0x94)]('--');}}export default{'isNumeric':isNumeric,'email':email,'mobile':mobile,'url':url,'date':date,'dateISO':dateISO,'isNumber':isNumber,'digits':digits,'idCard':idCard,'carNo':carNo,'amount':amount,'chinese':chinese,'letter':letter,'enOrNum':enOrNum,'contains':contains,'range':range,'rangeLength':rangeLength,'empty':empty,'jsonString':jsonString,'landline':landline,'object':object,'array':array,'code':code,'func':func,'promise':promise,'video':video,'image':image,'regExp':regExp,'isString':isString,'isValidPhoneNumber':isValidPhoneNumber};
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x4d6713=a4_0x285a;function a4_0x3273(){const _0xe6ed6b=['value','setDate','function','getFullYear','label','substring','split','both','string','3579012XvRoGb','0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','getDate','除数不能为0','surname','trim','en-US','call','Quantity\x20should\x20be\x20greater\x20than\x200.','isArray','abs','49YrkJbt','object','length','getTime','endsWith','givenName','slice','1811032HLlCSB','78984TGKFyR','round','error','find','toLocaleString','parse','replace','22029lVaeCX','2243060ikIzhe','map','_qh','forEach','无效的操作符,操作符应为1、2、3或4','getMonth','fjbh','toString','join','padStart','toFixed','setHours','52872RmIbdP','push','floor','code','match','number','right','hasOwnProperty','78333oXzbzv','includes'];a4_0x3273=function(){return _0xe6ed6b;};return a4_0x3273();}(function(_0x3b0d56,_0x105113){const _0x317637=a4_0x285a,_0x172766=_0x3b0d56();while(!![]){try{const _0x1319fa=-parseInt(_0x317637(0x125))/0x1+parseInt(_0x317637(0x11e))/0x2+parseInt(_0x317637(0x13a))/0x3+parseInt(_0x317637(0x11d))/0x4+parseInt(_0x317637(0x126))/0x5+-parseInt(_0x317637(0x145))/0x6+-parseInt(_0x317637(0x116))/0x7*(parseInt(_0x317637(0x132))/0x8);if(_0x1319fa===_0x105113)break;else _0x172766['push'](_0x172766['shift']());}catch(_0x9e29c3){_0x172766['push'](_0x172766['shift']());}}}(a4_0x3273,0x49c63));function fmtNum(_0x3791cb){const _0x59587e=a4_0x285a;if(_0x3791cb==0x0)return'0';if(!_0x3791cb)return'';let _0x12ad3e=typeof _0x3791cb===_0x59587e(0x144)?parseFloat(_0x3791cb):_0x3791cb;if(isNaN(_0x12ad3e))return'';return _0x12ad3e[_0x59587e(0x122)](_0x59587e(0x14b),{'minimumFractionDigits':0x0,'maximumFractionDigits':0x2});}function splitName(_0x517301,_0x5f4ac3=![]){const _0x2b9153=a4_0x285a;let _0x2a98a1={'surname':'','givenName':''};if(_0x5f4ac3){const _0x31d9cb=_0x517301[_0x2b9153(0x13b)](',')?_0x517301['split'](','):_0x517301[_0x2b9153(0x142)](/\s+/);_0x31d9cb[_0x2b9153(0x118)]>=0x2&&(_0x2a98a1['surname']=_0x31d9cb[0x0][_0x2b9153(0x14a)](),_0x2a98a1['givenName']=_0x31d9cb[0x1][_0x2b9153(0x14a)]());}else{const _0x5e6fb3=['欧阳','太史','端木','上官','司马','东方','独孤','南宫','万俟','闻人','夏侯','诸葛','尉迟','公羊','赫连','澹台','皇甫','宗政','濮阳','公冶','太叔','申屠','公孙','慕容','仲孙','钟离','长孙','宇文','司徒','鲜于','司空','闾丘','子车','亓官','司寇','巫马','公西','颛孙','壤驷','公良','漆雕','乐正','宰父','谷梁','拓跋','夹谷','轩辕','令狐','段干','百里','呼延','东郭','南门','羊舌','微生','公户','公玉','公仪','梁丘','公仲','公上','公门','公山','公坚','左丘','公伯','西门','公祖','第五','公乘','贯丘','公皙','南荣','东里','东宫','仲长','子书','子桑','即墨','达奚','褚师','吴铭','歐陽','太史','端木','上官','司馬','東方','獨孤','南宮','萬俟','聞人','夏侯','諸葛','尉遲','公羊','赫連','澹臺','皇甫','宗政','濮陽','公冶','太叔','申屠','公孫','慕容','仲孫','鐘離','長孫','宇文','司徒','鮮於','司空','閭丘','子車','亓官','司寇','巫馬','公西','顓孫','壤駟','公良','漆雕','樂正','宰父','穀梁','拓跋','夾谷','軒轅','令狐','段幹','百里','呼延','東郭','南門','羊舌','微生','公戶','公玉','公儀','梁丘','公仲','公上','公門','公山','公堅','左丘','公伯','西門','公祖','第五','公乘','貫丘','公皙','南榮','東里','東宮','仲長','子書','子桑','即墨','達奚','褚師','吳銘'];for(let _0x1391c5=0x0;_0x1391c5<_0x5e6fb3[_0x2b9153(0x118)];_0x1391c5++){const _0x22b302=_0x5e6fb3[_0x1391c5];if(_0x517301['startsWith'](_0x22b302))return _0x2a98a1[_0x2b9153(0x149)]=_0x22b302,_0x2a98a1[_0x2b9153(0x11b)]=_0x517301[_0x2b9153(0x141)](_0x22b302[_0x2b9153(0x118)])[_0x2b9153(0x14a)](),_0x2a98a1;}const _0x98c356=_0x517301[_0x2b9153(0x142)]('\x20');if(_0x98c356[_0x2b9153(0x118)]===0x1){const _0x205ded=_0x517301[_0x2b9153(0x136)](/[\u4e00-\u9fa5]/);_0x2a98a1[_0x2b9153(0x149)]=_0x205ded?_0x205ded[0x0]:'',_0x2a98a1['givenName']=_0x517301[_0x2b9153(0x124)](_0x2a98a1[_0x2b9153(0x149)],'')[_0x2b9153(0x14a)]();}else _0x2a98a1[_0x2b9153(0x149)]=_0x98c356[0x0],_0x2a98a1[_0x2b9153(0x11b)]=_0x98c356[_0x2b9153(0x11c)](0x1)['join']('\x20');}return _0x2a98a1;}function modifyKeys(_0x586bb1,_0x20d6a7={'strCode':a4_0x4d6713(0x135),'strFjbh':a4_0x4d6713(0x12c),'strGuid':a4_0x4d6713(0x13c),'strValue':a4_0x4d6713(0x140)}){const _0x4fc26f=a4_0x4d6713;if(!_0x586bb1[_0x4fc26f(0x118)]||_0x586bb1===null)return[];const _0x14dd01=_0x586bb1[_0x4fc26f(0x127)](_0x514533=>{const _0x10a83c={};for(const _0x42f38c in _0x514533){_0x20d6a7['hasOwnProperty'](_0x42f38c)?_0x10a83c[_0x20d6a7[_0x42f38c]]=_0x514533[_0x42f38c]:_0x10a83c[_0x42f38c]=_0x514533[_0x42f38c];}return _0x10a83c;});return _0x14dd01;}function sliceArray(_0x47c93b,_0x4dc12e,_0x4412ef){const _0x37deb1=a4_0x4d6713;if(_0x4dc12e<=0x0)return console[_0x37deb1(0x120)](_0x37deb1(0x14d)),[];return _0x4412ef?_0x47c93b[_0x37deb1(0x11c)](0x0,_0x4dc12e):_0x47c93b[_0x37deb1(0x11c)](-_0x4dc12e);}function findDataByData(_0x346170,_0x15784b,_0x465f8f){const _0x31cada=a4_0x4d6713,_0x5d97ac=_0x346170[_0x31cada(0x121)](_0x3450cd=>_0x3450cd[_0x465f8f]===_0x15784b);return _0x5d97ac||null;}function splitArray(_0x53800b,_0xb58611){const _0x1ef52c=a4_0x4d6713,_0x4289df=[];for(let _0x3dcebb=0x0;_0x3dcebb<_0x53800b[_0x1ef52c(0x118)];_0x3dcebb+=_0xb58611){_0x4289df['push'](_0x53800b['slice'](_0x3dcebb,_0x3dcebb+_0xb58611));}return _0x4289df;}function getProxyType(_0x2bc5ac){const _0x491c64=a4_0x4d6713;return Object['prototype'][_0x491c64(0x12d)][_0x491c64(0x14c)](_0x2bc5ac)[_0x491c64(0x11c)](0x8,-0x1);}let timeout=null;function debounce(_0x460843,_0x55d933=0x1f4,_0x25a226=![]){const _0x28747d=a4_0x4d6713;if(timeout!==null)clearTimeout(timeout);if(_0x25a226){const _0x350304=!timeout;timeout=setTimeout(()=>{timeout=null;},_0x55d933);if(_0x350304)typeof _0x460843===_0x28747d(0x13e)&&_0x460843();}else timeout=setTimeout(()=>{const _0x58b29c=_0x28747d;typeof _0x460843===_0x58b29c(0x13e)&&_0x460843();},_0x55d933);}function urlEncode(_0x1b0898={}){const _0x56524a=a4_0x4d6713,_0x31ba7b=[];for(const _0x1f1f4c in _0x1b0898){const _0x6fcedf=_0x1b0898[_0x1f1f4c];if(!_0x6fcedf)continue;isArray(_0x6fcedf)?_0x6fcedf[_0x56524a(0x129)](_0x4650bc=>{_0x31ba7b['push'](_0x1f1f4c+'='+_0x4650bc);}):_0x31ba7b['push'](_0x1f1f4c+'='+_0x6fcedf);}return _0x31ba7b[_0x56524a(0x12e)]('&');}function compareDates(_0x4a2e94,_0x2a969f){const _0x434b0b=a4_0x4d6713;_0x4a2e94=new Date(_0x4a2e94);!_0x2a969f?_0x2a969f=new Date():_0x2a969f=new Date(_0x2a969f);_0x4a2e94[_0x434b0b(0x131)](0x0,0x0,0x0,0x0),_0x2a969f[_0x434b0b(0x131)](0x0,0x0,0x0,0x0);var _0x418b95=_0x4a2e94[_0x434b0b(0x119)](),_0x20d4e2=_0x2a969f[_0x434b0b(0x119)]();if(_0x418b95<_0x20d4e2)return-0x1;else return _0x418b95>_0x20d4e2?0x1:0x0;}function getDaysBetween(_0x532c35,_0x92fbb3){const _0x44949e=a4_0x4d6713,_0x1f203a=new Date(_0x532c35),_0x1f13f2=new Date(_0x92fbb3),_0x25ee74=Math[_0x44949e(0x14f)](_0x1f203a[_0x44949e(0x119)]()-_0x1f13f2[_0x44949e(0x119)]()),_0x22b1af=Math[_0x44949e(0x134)](_0x25ee74/(0x3e8*0x3c*0x3c*0x18));return _0x22b1af+0x1;}function chineseNumeral(_0x45f8be){const _0x39ad93=a4_0x4d6713,_0x410205=['零','壹','贰','叁','肆','伍','陆','柒','捌','玖'],_0x475b25=['','拾','佰','仟'],_0x502d75=['','万','亿','兆'];let _0x53f01c=Math[_0x39ad93(0x134)](_0x45f8be),_0x56a61c=Math[_0x39ad93(0x11f)]((_0x45f8be-_0x53f01c)*0x64),_0xf57d71='';for(let _0x4dbbe1=0x0;_0x53f01c>0x0;_0x4dbbe1++){let _0x11c286='',_0x44934c=_0x53f01c%0x2710;_0x53f01c=Math[_0x39ad93(0x134)](_0x53f01c/0x2710);for(let _0x141caf=0x0;_0x44934c>0x0;_0x141caf++){let _0x16462b=_0x44934c%0xa;_0x11c286=(_0x16462b?_0x410205[_0x16462b]+_0x475b25[_0x141caf]:'')+_0x11c286,_0x44934c=Math[_0x39ad93(0x134)](_0x44934c/0xa);}_0xf57d71=_0x11c286+(_0x11c286?_0x502d75[_0x4dbbe1]:_0x502d75[_0x4dbbe1]&&!_0xf57d71[_0x39ad93(0x13b)]('零')?'零':'')+_0xf57d71;}_0xf57d71+=_0xf57d71?'元':'零元';if(_0x56a61c>0x0){let _0x27f4b0=Math[_0x39ad93(0x134)](_0x56a61c/0xa),_0x2b350f=_0x56a61c%0xa;_0xf57d71+=(_0x27f4b0?_0x410205[_0x27f4b0]+'角':'')+(_0x2b350f?_0x410205[_0x2b350f]+'分':'');}else _0xf57d71+='整';return _0xf57d71[_0x39ad93(0x124)](/零{2,}/g,'零')[_0x39ad93(0x124)](/零元/,'元');}function getMonthDate(_0xc6258c){const _0x3a3f6e=a4_0x4d6713;(!_0xc6258c||_0xc6258c['trim']()==='')&&(_0xc6258c=new Date()[_0x3a3f6e(0x13f)]()+'-'+(new Date()[_0x3a3f6e(0x12b)]()+0x1));let _0x68fdaf=[],[_0x4ee647,_0x2999b1]=_0xc6258c[_0x3a3f6e(0x142)]('-')[_0x3a3f6e(0x127)](Number),_0x2093b8=new Date(_0x4ee647,_0x2999b1,0x0),_0x341810=_0x2093b8[_0x3a3f6e(0x147)]();for(let _0x5e00e9=0x1;_0x5e00e9<=_0x341810;_0x5e00e9++){let _0xcd726e=_0x5e00e9<0xa?'0'+_0x5e00e9:''+_0x5e00e9,_0x250953=_0x2999b1<0xa?'0'+_0x2999b1:''+_0x2999b1;_0x68fdaf[_0x3a3f6e(0x133)]({'date':_0x4ee647+'-'+_0x250953+'-'+_0xcd726e,'disable':!![]});}return _0x68fdaf;}function getToday(_0x107049){const _0x1875e9=a4_0x4d6713;var _0x454e77=new Date(),_0x4f9804=String(_0x454e77[_0x1875e9(0x147)]())[_0x1875e9(0x12f)](0x2,'0'),_0x25c516=String(_0x454e77[_0x1875e9(0x12b)]()+0x1)[_0x1875e9(0x12f)](0x2,'0'),_0x533588=_0x454e77[_0x1875e9(0x13f)]();return _0x454e77=_0x533588+'-'+_0x25c516+'-'+_0x4f9804,_0x454e77;}function resetObject(_0x216733){const _0x21349d=a4_0x4d6713;let _0x195758=JSON[_0x21349d(0x123)](JSON['stringify'](_0x216733));for(const _0x288d1a in _0x195758){if(typeof _0x195758[_0x288d1a]===_0x21349d(0x137))_0x195758[_0x288d1a]=0x0;else{if(typeof _0x195758[_0x288d1a]==='boolean')_0x195758[_0x288d1a]=![];else{if(Array[_0x21349d(0x14e)](_0x195758[_0x288d1a]))_0x195758[_0x288d1a]=[];else typeof _0x195758[_0x288d1a]===_0x21349d(0x117)&&_0x195758[_0x288d1a]!==null?resetObject(_0x195758[_0x288d1a]):_0x195758[_0x288d1a]='';}}}return _0x195758;}function a4_0x285a(_0x2f0006,_0x288fe4){const _0x3273d7=a4_0x3273();return a4_0x285a=function(_0x285ae8,_0x174e92){_0x285ae8=_0x285ae8-0x116;let _0x5541ed=_0x3273d7[_0x285ae8];return _0x5541ed;},a4_0x285a(_0x2f0006,_0x288fe4);}function preciseOperation(_0x2b1210,_0x9ed985,_0x1dfefc,_0x1d675b=0xf4240){const _0x2e1b96=a4_0x4d6713;if(isNaN(_0x2b1210)||isNaN(_0x9ed985))return NaN;if(!isFinite(_0x2b1210)||!isFinite(_0x9ed985))return NaN;let _0x14da26=BigInt(Math[_0x2e1b96(0x11f)](_0x2b1210*_0x1d675b)),_0x2ce4b8=BigInt(Math[_0x2e1b96(0x11f)](_0x9ed985*_0x1d675b)),_0x5a9bbe;switch(_0x1dfefc){case 0x1:_0x5a9bbe=_0x14da26+_0x2ce4b8;break;case 0x2:_0x5a9bbe=_0x14da26-_0x2ce4b8;break;case 0x3:_0x5a9bbe=_0x14da26*_0x2ce4b8;break;case 0x4:if(_0x2ce4b8===0x0n)throw new Error(_0x2e1b96(0x148));_0x5a9bbe=_0x14da26/_0x2ce4b8;break;default:throw new Error(_0x2e1b96(0x12a));}return Number(_0x5a9bbe)/_0x1d675b;}function preciseSum(_0x2b24c6){const _0x302bb4=a4_0x4d6713;let _0x1f5428=0x0;for(const _0x48e575 of _0x2b24c6){let _0x1dec94=0x0;if(typeof _0x48e575===_0x302bb4(0x144)){const _0x467a77=parseFloat(_0x48e575);!isNaN(_0x467a77)&&(_0x1dec94=_0x467a77);}else typeof _0x48e575===_0x302bb4(0x137)&&(_0x1dec94=_0x48e575);_0x1f5428=preciseOperation(_0x1f5428,_0x1dec94,0x1);}return _0x1f5428;}function getRelativeDate(_0x33985c,_0x124569=0x0){const _0x1aba15=a4_0x4d6713,_0x298ce0=new Date(_0x33985c);_0x298ce0[_0x1aba15(0x13d)](_0x298ce0['getDate']()+_0x124569);const _0x1c07ea=_0x298ce0[_0x1aba15(0x13f)](),_0x4a6849=(_0x298ce0[_0x1aba15(0x12b)]()+0x1)['toString']()[_0x1aba15(0x12f)](0x2,'0'),_0x366dd1=_0x298ce0[_0x1aba15(0x147)]()[_0x1aba15(0x12d)]()[_0x1aba15(0x12f)](0x2,'0');return _0x1c07ea+'-'+_0x4a6849+'-'+_0x366dd1;}function validateFields(_0x44105d,_0x2f5dd3,_0x52f35b=''){for(let _0x4d02a8 of _0x2f5dd3){if(_0x44105d[_0x4d02a8]===_0x52f35b)return!![];}return![];}function mergeObjects(_0x477392,_0x18b205){const _0xa85a6a=a4_0x4d6713;for(const _0x2640ee in _0x477392){_0x18b205[_0xa85a6a(0x139)](_0x2640ee)&&(_0x477392[_0x2640ee]=_0x18b205[_0x2640ee]);}return _0x477392;}const formatToDecimal=(_0x5efffc,_0x2d4dae=0x2)=>{const _0x39af52=a4_0x4d6713;if(isNaN(_0x2d4dae)||_0x2d4dae<0x0)return _0x5efffc;let _0x3576b8=Number(_0x5efffc);if(!isFinite(_0x3576b8))return _0x5efffc;return _0x2d4dae=Math['max'](0x0,Math[_0x39af52(0x134)](_0x2d4dae)),_0x3576b8[_0x39af52(0x130)](_0x2d4dae);};function findKeysEndingWith(_0x54554c,_0x1230fe=a4_0x4d6713(0x128)){const _0x4c8436=a4_0x4d6713;let _0x5f19ff=[];for(var _0x7a042c in _0x54554c){if(_0x54554c[_0x4c8436(0x139)](_0x7a042c)){if(_0x7a042c[_0x4c8436(0x11a)](_0x1230fe))_0x5f19ff[_0x4c8436(0x133)](_0x7a042c);}}return _0x5f19ff;}function guid(_0x97446e=0x20,_0x10d74c=!![],_0x53a45a=null){const _0x6ccfd0=a4_0x4d6713,_0x250ab1=_0x6ccfd0(0x146)[_0x6ccfd0(0x142)](''),_0x46cb61=[];_0x53a45a=_0x53a45a||_0x250ab1[_0x6ccfd0(0x118)];if(_0x97446e){for(let _0x37af29=0x0;_0x37af29<_0x97446e;_0x37af29++)_0x46cb61[_0x37af29]=_0x250ab1[0x0|Math['random']()*_0x53a45a];}else{let _0x39c22a;_0x46cb61[0x8]=_0x46cb61[0xd]=_0x46cb61[0x12]=_0x46cb61[0x17]='-',_0x46cb61[0xe]='4';for(let _0x42436e=0x0;_0x42436e<0x24;_0x42436e++){!_0x46cb61[_0x42436e]&&(_0x39c22a=0x0|Math['random']()*0x10,_0x46cb61[_0x42436e]=_0x250ab1[_0x42436e==0x13?_0x39c22a&0x3|0x8:_0x39c22a]);}}if(_0x10d74c)return _0x46cb61['shift'](),'u'+_0x46cb61['join']('');return _0x46cb61[_0x6ccfd0(0x12e)]('');}function trim(_0x348822,_0x325284='both'){const _0x57bb66=a4_0x4d6713;_0x348822=String(_0x348822);if(_0x325284==_0x57bb66(0x143))return _0x348822[_0x57bb66(0x124)](/^\s+|\s+$/g,'');if(_0x325284=='left')return _0x348822[_0x57bb66(0x124)](/^\s*/,'');if(_0x325284==_0x57bb66(0x138))return _0x348822[_0x57bb66(0x124)](/(\s*$)/g,'');if(_0x325284=='all')return _0x348822['replace'](/\s+/g,'');return _0x348822;}export default{'guid':guid,'trim':trim,'findKeysEndingWith':findKeysEndingWith,'formatToDecimal':formatToDecimal,'fmtNum':fmtNum,'splitName':splitName,'preciseSum':preciseSum,'modifyKeys':modifyKeys,'sliceArray':sliceArray,'findDataByData':findDataByData,'splitArray':splitArray,'getProxyType':getProxyType,'debounce':debounce,'urlEncode':urlEncode,'compareDates':compareDates,'getDaysBetween':getDaysBetween,'chineseNumeral':chineseNumeral,'getMonthDate':getMonthDate,'getToday':getToday,'resetObject':resetObject,'preciseOperation':preciseOperation,'getRelativeDate':getRelativeDate,'validateFields':validateFields,'mergeObjects':mergeObjects};
|
|
1
|
+
const a4_0x2d371c=a4_0x116d;(function(_0x402a17,_0x5b9cd4){const _0x36b746=a4_0x116d,_0x4ca3b0=_0x402a17();while(!![]){try{const _0x43e087=-parseInt(_0x36b746(0x172))/0x1+-parseInt(_0x36b746(0x171))/0x2*(parseInt(_0x36b746(0x173))/0x3)+-parseInt(_0x36b746(0x18c))/0x4+-parseInt(_0x36b746(0x164))/0x5+parseInt(_0x36b746(0x18f))/0x6+-parseInt(_0x36b746(0x189))/0x7*(parseInt(_0x36b746(0x169))/0x8)+parseInt(_0x36b746(0x16e))/0x9*(parseInt(_0x36b746(0x15d))/0xa);if(_0x43e087===_0x5b9cd4)break;else _0x4ca3b0['push'](_0x4ca3b0['shift']());}catch(_0x35f3de){_0x4ca3b0['push'](_0x4ca3b0['shift']());}}}(a4_0x2754,0xc5147));function fmtNum(_0x498f30){const _0x7ca6a=a4_0x116d;if(_0x498f30==0x0)return'0';if(!_0x498f30)return'';let _0x348579=typeof _0x498f30===_0x7ca6a(0x184)?parseFloat(_0x498f30):_0x498f30;if(isNaN(_0x348579))return'';return _0x348579['toLocaleString'](_0x7ca6a(0x170),{'minimumFractionDigits':0x0,'maximumFractionDigits':0x2});}function splitName(_0x53eb52,_0x2bc1f6=![]){const _0x4c48dc=a4_0x116d;let _0x1962a3={'surname':'','givenName':''};if(_0x2bc1f6){const _0x41a0ca=_0x53eb52[_0x4c48dc(0x179)](',')?_0x53eb52[_0x4c48dc(0x16f)](','):_0x53eb52[_0x4c48dc(0x16f)](/\s+/);_0x41a0ca[_0x4c48dc(0x190)]>=0x2&&(_0x1962a3['surname']=_0x41a0ca[0x0][_0x4c48dc(0x188)](),_0x1962a3[_0x4c48dc(0x174)]=_0x41a0ca[0x1][_0x4c48dc(0x188)]());}else{const _0x4cc18c=['欧阳','太史','端木','上官','司马','东方','独孤','南宫','万俟','闻人','夏侯','诸葛','尉迟','公羊','赫连','澹台','皇甫','宗政','濮阳','公冶','太叔','申屠','公孙','慕容','仲孙','钟离','长孙','宇文','司徒','鲜于','司空','闾丘','子车','亓官','司寇','巫马','公西','颛孙','壤驷','公良','漆雕','乐正','宰父','谷梁','拓跋','夹谷','轩辕','令狐','段干','百里','呼延','东郭','南门','羊舌','微生','公户','公玉','公仪','梁丘','公仲','公上','公门','公山','公坚','左丘','公伯','西门','公祖','第五','公乘','贯丘','公皙','南荣','东里','东宫','仲长','子书','子桑','即墨','达奚','褚师','吴铭','歐陽','太史','端木','上官','司馬','東方','獨孤','南宮','萬俟','聞人','夏侯','諸葛','尉遲','公羊','赫連','澹臺','皇甫','宗政','濮陽','公冶','太叔','申屠','公孫','慕容','仲孫','鐘離','長孫','宇文','司徒','鮮於','司空','閭丘','子車','亓官','司寇','巫馬','公西','顓孫','壤駟','公良','漆雕','樂正','宰父','穀梁','拓跋','夾谷','軒轅','令狐','段幹','百里','呼延','東郭','南門','羊舌','微生','公戶','公玉','公儀','梁丘','公仲','公上','公門','公山','公堅','左丘','公伯','西門','公祖','第五','公乘','貫丘','公皙','南榮','東里','東宮','仲長','子書','子桑','即墨','達奚','褚師','吳銘'];for(let _0x382aa8=0x0;_0x382aa8<_0x4cc18c[_0x4c48dc(0x190)];_0x382aa8++){const _0x370ed8=_0x4cc18c[_0x382aa8];if(_0x53eb52[_0x4c48dc(0x17b)](_0x370ed8))return _0x1962a3[_0x4c48dc(0x16a)]=_0x370ed8,_0x1962a3['givenName']=_0x53eb52[_0x4c48dc(0x15a)](_0x370ed8[_0x4c48dc(0x190)])[_0x4c48dc(0x188)](),_0x1962a3;}const _0x3129ec=_0x53eb52[_0x4c48dc(0x16f)]('\x20');if(_0x3129ec['length']===0x1){const _0x3a0928=_0x53eb52[_0x4c48dc(0x162)](/[\u4e00-\u9fa5]/);_0x1962a3[_0x4c48dc(0x16a)]=_0x3a0928?_0x3a0928[0x0]:'',_0x1962a3['givenName']=_0x53eb52[_0x4c48dc(0x168)](_0x1962a3[_0x4c48dc(0x16a)],'')[_0x4c48dc(0x188)]();}else _0x1962a3['surname']=_0x3129ec[0x0],_0x1962a3['givenName']=_0x3129ec[_0x4c48dc(0x17d)](0x1)[_0x4c48dc(0x16d)]('\x20');}return _0x1962a3;}function modifyKeys(_0x101ed7,_0x324032={'strCode':'code','strFjbh':a4_0x2d371c(0x163),'strGuid':a4_0x2d371c(0x157),'strValue':a4_0x2d371c(0x18a)}){const _0x3134f0=a4_0x2d371c;if(!_0x101ed7[_0x3134f0(0x190)]||_0x101ed7===null)return[];const _0x205473=_0x101ed7[_0x3134f0(0x178)](_0xfd4c10=>{const _0x2e6db3=_0x3134f0,_0x4f1e6d={};for(const _0x3e549d in _0xfd4c10){_0x324032[_0x2e6db3(0x176)](_0x3e549d)?_0x4f1e6d[_0x324032[_0x3e549d]]=_0xfd4c10[_0x3e549d]:_0x4f1e6d[_0x3e549d]=_0xfd4c10[_0x3e549d];}return _0x4f1e6d;});return _0x205473;}function sliceArray(_0x58621b,_0x322900,_0x286ee2){const _0x553e6c=a4_0x2d371c;if(_0x322900<=0x0)return console[_0x553e6c(0x15f)](_0x553e6c(0x17c)),[];return _0x286ee2?_0x58621b[_0x553e6c(0x17d)](0x0,_0x322900):_0x58621b[_0x553e6c(0x17d)](-_0x322900);}function findDataByData(_0x5a6abc,_0x20b2fa,_0x3187a5){const _0x4bc759=a4_0x2d371c,_0x113d85=_0x5a6abc[_0x4bc759(0x18b)](_0x33288c=>_0x33288c[_0x3187a5]===_0x20b2fa);return _0x113d85||null;}function splitArray(_0x14fae8,_0x4b0d9c){const _0x2c2119=a4_0x2d371c,_0x3e8ca9=[];for(let _0x30867d=0x0;_0x30867d<_0x14fae8[_0x2c2119(0x190)];_0x30867d+=_0x4b0d9c){_0x3e8ca9[_0x2c2119(0x175)](_0x14fae8[_0x2c2119(0x17d)](_0x30867d,_0x30867d+_0x4b0d9c));}return _0x3e8ca9;}function getProxyType(_0xfab32e){const _0xad6661=a4_0x2d371c;return Object[_0xad6661(0x159)][_0xad6661(0x160)][_0xad6661(0x185)](_0xfab32e)[_0xad6661(0x17d)](0x8,-0x1);}let timeout=null;function debounce(_0x3e4ecf,_0x1ce0e6=0x1f4,_0x5c6af1=![]){const _0x19b3b6=a4_0x2d371c;if(timeout!==null)clearTimeout(timeout);if(_0x5c6af1){const _0x35d378=!timeout;timeout=setTimeout(()=>{timeout=null;},_0x1ce0e6);if(_0x35d378)typeof _0x3e4ecf===_0x19b3b6(0x18d)&&_0x3e4ecf();}else timeout=setTimeout(()=>{const _0x30c4ba=_0x19b3b6;typeof _0x3e4ecf===_0x30c4ba(0x18d)&&_0x3e4ecf();},_0x1ce0e6);}function urlEncode(_0x47e321={}){const _0xc30eb3=a4_0x2d371c,_0x566a61=[];for(const _0x44d96f in _0x47e321){const _0x568ab3=_0x47e321[_0x44d96f];if(!_0x568ab3)continue;isArray(_0x568ab3)?_0x568ab3[_0xc30eb3(0x161)](_0x116df5=>{const _0x5b017d=_0xc30eb3;_0x566a61[_0x5b017d(0x175)](_0x44d96f+'='+_0x116df5);}):_0x566a61['push'](_0x44d96f+'='+_0x568ab3);}return _0x566a61[_0xc30eb3(0x16d)]('&');}function a4_0x116d(_0x3cbc43,_0x34a96c){const _0x275424=a4_0x2754();return a4_0x116d=function(_0x116dc5,_0xee62dd){_0x116dc5=_0x116dc5-0x150;let _0x52127a=_0x275424[_0x116dc5];return _0x52127a;},a4_0x116d(_0x3cbc43,_0x34a96c);}function dateFormat(_0x2c3c7f,_0x4488b7){const _0x240a63=a4_0x2d371c,_0xcf2806=new Date(_0x4488b7),_0x24ba40={'Y+':_0xcf2806[_0x240a63(0x167)]()[_0x240a63(0x160)](),'m+':(_0xcf2806[_0x240a63(0x183)]()+0x1)[_0x240a63(0x160)](),'d+':_0xcf2806[_0x240a63(0x15c)]()[_0x240a63(0x160)](),'H+':_0xcf2806['getHours']()[_0x240a63(0x160)](),'M+':_0xcf2806['getMinutes']()[_0x240a63(0x160)](),'S+':_0xcf2806[_0x240a63(0x158)]()[_0x240a63(0x160)]()};let _0x1abd0d;for(let _0x1cac34 in _0x24ba40){_0x1abd0d=new RegExp('('+_0x1cac34+')')[_0x240a63(0x153)](_0x2c3c7f);_0x1abd0d&&(_0x2c3c7f=_0x2c3c7f[_0x240a63(0x168)](_0x1abd0d[0x1],_0x1abd0d[0x1][_0x240a63(0x190)]==0x1?_0x24ba40[_0x1cac34]:_0x24ba40[_0x1cac34]['padStart'](_0x1abd0d[0x1][_0x240a63(0x190)],'0')));;};return _0x2c3c7f;}function formatDate(_0x5068be,_0x5d8e76='YYYY-MM-DD',_0x4a83eb={'yearTitle':'年','monthTitle':'月','dayTitle':'日'}){const _0x5a9138=a4_0x2d371c,_0x10185c=new Date(_0x5068be),_0x4995bf=_0x10185c[_0x5a9138(0x167)](),_0x316068=_0x10185c['getMonth']()+0x1,_0x4c2743=_0x10185c[_0x5a9138(0x15c)](),_0x1fff0b=_0x316068<0xa?'0'+_0x316068:_0x316068,_0x438902=_0x4c2743<0xa?'0'+_0x4c2743:_0x4c2743;let _0x4cb5ff=_0x5d8e76[_0x5a9138(0x168)](_0x5a9138(0x154),_0x4995bf)[_0x5a9138(0x168)]('MM',_0x1fff0b)['replace']('DD',_0x438902);return _0x4cb5ff=_0x4cb5ff[_0x5a9138(0x168)](/-MM/g,_0x4a83eb[_0x5a9138(0x17a)])[_0x5a9138(0x168)](/-DD/g,_0x4a83eb['dayTitle'])[_0x5a9138(0x168)]('YYYY'+_0x4a83eb[_0x5a9138(0x151)],'')[_0x5a9138(0x168)]('MM'+_0x4a83eb[_0x5a9138(0x17a)],'')[_0x5a9138(0x168)]('DD'+_0x4a83eb['dayTitle'],''),_0x4cb5ff;}function compareDates(_0x4c4525,_0x3606fd){const _0x2b84e4=a4_0x2d371c;_0x4c4525=new Date(_0x4c4525);!_0x3606fd?_0x3606fd=new Date():_0x3606fd=new Date(_0x3606fd);_0x4c4525['setHours'](0x0,0x0,0x0,0x0),_0x3606fd[_0x2b84e4(0x182)](0x0,0x0,0x0,0x0);var _0x1c53aa=_0x4c4525['getTime'](),_0x930553=_0x3606fd[_0x2b84e4(0x16b)]();if(_0x1c53aa<_0x930553)return-0x1;else return _0x1c53aa>_0x930553?0x1:0x0;}function getDaysBetween(_0x37ae6d,_0xee3057){const _0x56e4fb=a4_0x2d371c,_0x479845=new Date(_0x37ae6d),_0x19a749=new Date(_0xee3057),_0x576f70=Math['abs'](_0x479845[_0x56e4fb(0x16b)]()-_0x19a749[_0x56e4fb(0x16b)]()),_0x568441=Math[_0x56e4fb(0x187)](_0x576f70/(0x3e8*0x3c*0x3c*0x18));return _0x568441+0x1;}function chineseNumeral(_0x216c94){const _0x1d41d7=a4_0x2d371c,_0x590680=['零','壹','贰','叁','肆','伍','陆','柒','捌','玖'],_0x4f9b70=['','拾','佰','仟'],_0x3815e=['','万','亿','兆'];let _0xeeff8f=Math[_0x1d41d7(0x187)](_0x216c94),_0x53183b=Math[_0x1d41d7(0x17f)]((_0x216c94-_0xeeff8f)*0x64),_0x3e8991='';for(let _0x232d85=0x0;_0xeeff8f>0x0;_0x232d85++){let _0x57c8c8='',_0x25408a=_0xeeff8f%0x2710;_0xeeff8f=Math[_0x1d41d7(0x187)](_0xeeff8f/0x2710);for(let _0x1ce047=0x0;_0x25408a>0x0;_0x1ce047++){let _0x3a646c=_0x25408a%0xa;_0x57c8c8=(_0x3a646c?_0x590680[_0x3a646c]+_0x4f9b70[_0x1ce047]:'')+_0x57c8c8,_0x25408a=Math[_0x1d41d7(0x187)](_0x25408a/0xa);}_0x3e8991=_0x57c8c8+(_0x57c8c8?_0x3815e[_0x232d85]:_0x3815e[_0x232d85]&&!_0x3e8991['includes']('零')?'零':'')+_0x3e8991;}_0x3e8991+=_0x3e8991?'元':'零元';if(_0x53183b>0x0){let _0x5cd802=Math[_0x1d41d7(0x187)](_0x53183b/0xa),_0x360714=_0x53183b%0xa;_0x3e8991+=(_0x5cd802?_0x590680[_0x5cd802]+'角':'')+(_0x360714?_0x590680[_0x360714]+'分':'');}else _0x3e8991+='整';return _0x3e8991[_0x1d41d7(0x168)](/零{2,}/g,'零')[_0x1d41d7(0x168)](/零元/,'元');}function getMonthDate(_0x9b1f77){const _0x292cd6=a4_0x2d371c;(!_0x9b1f77||_0x9b1f77[_0x292cd6(0x188)]()==='')&&(_0x9b1f77=new Date()[_0x292cd6(0x167)]()+'-'+(new Date()[_0x292cd6(0x183)]()+0x1));let _0x5223a0=[],[_0xf8a5c9,_0x1ce7c6]=_0x9b1f77[_0x292cd6(0x16f)]('-')[_0x292cd6(0x178)](Number),_0x39cdaf=new Date(_0xf8a5c9,_0x1ce7c6,0x0),_0x204eb8=_0x39cdaf[_0x292cd6(0x15c)]();for(let _0x577d03=0x1;_0x577d03<=_0x204eb8;_0x577d03++){let _0x4888d8=_0x577d03<0xa?'0'+_0x577d03:''+_0x577d03,_0x4516ff=_0x1ce7c6<0xa?'0'+_0x1ce7c6:''+_0x1ce7c6;_0x5223a0[_0x292cd6(0x175)]({'date':_0xf8a5c9+'-'+_0x4516ff+'-'+_0x4888d8,'disable':!![]});}return _0x5223a0;}function a4_0x2754(){const _0x4ae44a=['Quantity\x20should\x20be\x20greater\x20than\x200.','slice','shift','round','isArray','max','setHours','getMonth','string','call','setDate','floor','trim','1603wfRjId','label','find','5518004VFOnXK','function','除数不能为0','974496IcGHot','length','_qh','0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','yearTitle','right','exec','YYYY','number','toFixed','value','getSeconds','prototype','substring','both','getDate','4088740bFsOpn','random','error','toString','forEach','match','fjbh','7217035tcpHlT','stringify','object','getFullYear','replace','19344fdvPuW','surname','getTime','padStart','join','135IfgmeA','split','en-US','2LDKYwl','919142whZbcL','3577545nEZusU','givenName','push','hasOwnProperty','endsWith','map','includes','monthTitle','startsWith'];a4_0x2754=function(){return _0x4ae44a;};return a4_0x2754();}function getToday(_0x33fc44){const _0x3d1d44=a4_0x2d371c;var _0xb1dbaa=new Date(),_0x330109=String(_0xb1dbaa[_0x3d1d44(0x15c)]())[_0x3d1d44(0x16c)](0x2,'0'),_0x4614c2=String(_0xb1dbaa[_0x3d1d44(0x183)]()+0x1)[_0x3d1d44(0x16c)](0x2,'0'),_0x2c67c1=_0xb1dbaa[_0x3d1d44(0x167)]();return _0xb1dbaa=_0x2c67c1+'-'+_0x4614c2+'-'+_0x330109,_0xb1dbaa;}function resetObject(_0x45da8f){const _0x20bfea=a4_0x2d371c;let _0x1ffc8e=JSON['parse'](JSON[_0x20bfea(0x165)](_0x45da8f));for(const _0xbadfce in _0x1ffc8e){if(typeof _0x1ffc8e[_0xbadfce]===_0x20bfea(0x155))_0x1ffc8e[_0xbadfce]=0x0;else{if(typeof _0x1ffc8e[_0xbadfce]==='boolean')_0x1ffc8e[_0xbadfce]=![];else{if(Array[_0x20bfea(0x180)](_0x1ffc8e[_0xbadfce]))_0x1ffc8e[_0xbadfce]=[];else typeof _0x1ffc8e[_0xbadfce]===_0x20bfea(0x166)&&_0x1ffc8e[_0xbadfce]!==null?resetObject(_0x1ffc8e[_0xbadfce]):_0x1ffc8e[_0xbadfce]='';}}}return _0x1ffc8e;}function preciseOperation(_0xb14ce3,_0x1769b4,_0x6a6be9,_0x3811c7=0xf4240){const _0x70e2e6=a4_0x2d371c;if(isNaN(_0xb14ce3)||isNaN(_0x1769b4))return NaN;if(!isFinite(_0xb14ce3)||!isFinite(_0x1769b4))return NaN;let _0xa493bd=BigInt(Math[_0x70e2e6(0x17f)](_0xb14ce3*_0x3811c7)),_0x43c341=BigInt(Math[_0x70e2e6(0x17f)](_0x1769b4*_0x3811c7)),_0x32b42c;switch(_0x6a6be9){case 0x1:_0x32b42c=_0xa493bd+_0x43c341;break;case 0x2:_0x32b42c=_0xa493bd-_0x43c341;break;case 0x3:_0x32b42c=_0xa493bd*_0x43c341;break;case 0x4:if(_0x43c341===0x0n)throw new Error(_0x70e2e6(0x18e));_0x32b42c=_0xa493bd/_0x43c341;break;default:throw new Error('无效的操作符,操作符应为1、2、3或4');}return Number(_0x32b42c)/_0x3811c7;}function preciseSum(_0x3cec5e){const _0x5da7c7=a4_0x2d371c;let _0x7e9f2f=0x0;for(const _0x55f992 of _0x3cec5e){let _0x3226d2=0x0;if(typeof _0x55f992==='string'){const _0x48f47a=parseFloat(_0x55f992);!isNaN(_0x48f47a)&&(_0x3226d2=_0x48f47a);}else typeof _0x55f992===_0x5da7c7(0x155)&&(_0x3226d2=_0x55f992);_0x7e9f2f=preciseOperation(_0x7e9f2f,_0x3226d2,0x1);}return _0x7e9f2f;}function getRelativeDate(_0x1f2db4,_0x58106f=0x0){const _0x1631d1=a4_0x2d371c,_0x517808=new Date(_0x1f2db4);_0x517808[_0x1631d1(0x186)](_0x517808[_0x1631d1(0x15c)]()+_0x58106f);const _0x27bcd5=_0x517808[_0x1631d1(0x167)](),_0x5ac993=(_0x517808[_0x1631d1(0x183)]()+0x1)['toString']()[_0x1631d1(0x16c)](0x2,'0'),_0x1acaba=_0x517808[_0x1631d1(0x15c)]()[_0x1631d1(0x160)]()[_0x1631d1(0x16c)](0x2,'0');return _0x27bcd5+'-'+_0x5ac993+'-'+_0x1acaba;}function validateFields(_0x2351a1,_0x438c74,_0x122f00=''){for(let _0x122535 of _0x438c74){if(_0x2351a1[_0x122535]===_0x122f00)return!![];}return![];}function mergeObjects(_0x1c46d2,_0x3ccea8){const _0x2fe06a=a4_0x2d371c;for(const _0x5711ec in _0x1c46d2){_0x3ccea8[_0x2fe06a(0x176)](_0x5711ec)&&(_0x1c46d2[_0x5711ec]=_0x3ccea8[_0x5711ec]);}return _0x1c46d2;}const formatToDecimal=(_0x3639a4,_0x3a8452=0x2)=>{const _0x41e70e=a4_0x2d371c;if(isNaN(_0x3a8452)||_0x3a8452<0x0)return _0x3639a4;let _0x2e7902=Number(_0x3639a4);if(!isFinite(_0x2e7902))return _0x3639a4;return _0x3a8452=Math[_0x41e70e(0x181)](0x0,Math[_0x41e70e(0x187)](_0x3a8452)),_0x2e7902[_0x41e70e(0x156)](_0x3a8452);};function findKeysEndingWith(_0x5964f8,_0x172bd4=a4_0x2d371c(0x191)){const _0xa90e9c=a4_0x2d371c;let _0x244d1b=[];for(var _0x939038 in _0x5964f8){if(_0x5964f8['hasOwnProperty'](_0x939038)){if(_0x939038[_0xa90e9c(0x177)](_0x172bd4))_0x244d1b[_0xa90e9c(0x175)](_0x939038);}}return _0x244d1b;}function guid(_0x10664b=0x20,_0x3209be=!![],_0x5306d4=null){const _0x3fc371=a4_0x2d371c,_0x24abf5=_0x3fc371(0x150)[_0x3fc371(0x16f)](''),_0x26504b=[];_0x5306d4=_0x5306d4||_0x24abf5[_0x3fc371(0x190)];if(_0x10664b){for(let _0x443bee=0x0;_0x443bee<_0x10664b;_0x443bee++)_0x26504b[_0x443bee]=_0x24abf5[0x0|Math[_0x3fc371(0x15e)]()*_0x5306d4];}else{let _0x3e172e;_0x26504b[0x8]=_0x26504b[0xd]=_0x26504b[0x12]=_0x26504b[0x17]='-',_0x26504b[0xe]='4';for(let _0x2788b7=0x0;_0x2788b7<0x24;_0x2788b7++){!_0x26504b[_0x2788b7]&&(_0x3e172e=0x0|Math['random']()*0x10,_0x26504b[_0x2788b7]=_0x24abf5[_0x2788b7==0x13?_0x3e172e&0x3|0x8:_0x3e172e]);}}if(_0x3209be)return _0x26504b[_0x3fc371(0x17e)](),'u'+_0x26504b[_0x3fc371(0x16d)]('');return _0x26504b['join']('');}function trim(_0x15d6c6,_0xf18a19=a4_0x2d371c(0x15b)){const _0x125415=a4_0x2d371c;_0x15d6c6=String(_0x15d6c6);if(_0xf18a19==_0x125415(0x15b))return _0x15d6c6[_0x125415(0x168)](/^\s+|\s+$/g,'');if(_0xf18a19=='left')return _0x15d6c6[_0x125415(0x168)](/^\s*/,'');if(_0xf18a19==_0x125415(0x152))return _0x15d6c6[_0x125415(0x168)](/(\s*$)/g,'');if(_0xf18a19=='all')return _0x15d6c6[_0x125415(0x168)](/\s+/g,'');return _0x15d6c6;}export default{'guid':guid,'trim':trim,'findKeysEndingWith':findKeysEndingWith,'formatToDecimal':formatToDecimal,'fmtNum':fmtNum,'splitName':splitName,'preciseSum':preciseSum,'modifyKeys':modifyKeys,'sliceArray':sliceArray,'findDataByData':findDataByData,'splitArray':splitArray,'getProxyType':getProxyType,'debounce':debounce,'urlEncode':urlEncode,'dateFormat':dateFormat,'formatDate':formatDate,'compareDates':compareDates,'getDaysBetween':getDaysBetween,'chineseNumeral':chineseNumeral,'getMonthDate':getMonthDate,'getToday':getToday,'resetObject':resetObject,'preciseOperation':preciseOperation,'getRelativeDate':getRelativeDate,'validateFields':validateFields,'mergeObjects':mergeObjects};
|