vome-core 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(_0x3cc6fd,_0x1c690c){const _0x25c602=_0x1d7e,_0x546d00=_0x3cc6fd();while(!![]){try{const _0x5ea833=parseInt(_0x25c602(0x90))/0x1*(-parseInt(_0x25c602(0x92))/0x2)+parseInt(_0x25c602(0x9a))/0x3+-parseInt(_0x25c602(0x99))/0x4*(parseInt(_0x25c602(0x87))/0x5)+parseInt(_0x25c602(0x86))/0x6+-parseInt(_0x25c602(0x8f))/0x7+parseInt(_0x25c602(0x8c))/0x8+parseInt(_0x25c602(0x93))/0x9;if(_0x5ea833===_0x1c690c)break;else _0x546d00['push'](_0x546d00['shift']());}catch(_0x125fff){_0x546d00['push'](_0x546d00['shift']());}}}(_0x4405,0x37aa9));import*as _0x32672f from'xlsx';export function buildExcelBuffer(_0x24c52f,_0x14e45f,_0x5b9904){const _0x5c51fd=_0x1d7e,_0x51b225=_0x24c52f[_0x5c51fd(0x94)](_0x2d608e=>_0x2d608e['label']||_0x2d608e[_0x5c51fd(0x96)]),_0x189842=_0x14e45f[_0x5c51fd(0x94)](_0xdd9f10=>_0x24c52f['map'](_0x188b5f=>{const _0x1ca940=_0x5c51fd;if(_0x5b9904)return _0x5b9904(_0x188b5f[_0x1ca940(0x96)],_0xdd9f10);const _0x497028=_0xdd9f10[_0x188b5f[_0x1ca940(0x96)]];if(_0x497028==null)return'';return String(_0x497028);})),_0xbae401=_0x32672f[_0x5c51fd(0x95)][_0x5c51fd(0x88)]([_0x51b225,..._0x189842]),_0x534754=_0x32672f['utils'][_0x5c51fd(0x91)]();return _0x32672f[_0x5c51fd(0x95)][_0x5c51fd(0x8d)](_0x534754,_0xbae401,_0x5c51fd(0x98)),_0x32672f['write'](_0x534754,{'bookType':_0x5c51fd(0x89),'type':'array'});}export function excelFilename(_0x3bc765){const _0x4d533e=_0x1d7e;return _0x3bc765[_0x4d533e(0x8a)](_0x4d533e(0x97))?_0x3bc765:_0x3bc765+'.xlsx';}function _0x1d7e(_0x14a4c5,_0x214a9f){_0x14a4c5=_0x14a4c5-0x86;const _0x4405c1=_0x4405();let _0x1d7e34=_0x4405c1[_0x14a4c5];if(_0x1d7e['CiAxNX']===undefined){var _0x43771e=function(_0x1d682e){const _0x5864f5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x32672f='',_0x24c52f='';for(let _0x14e45f=0x0,_0x5b9904,_0x51b225,_0x189842=0x0;_0x51b225=_0x1d682e['charAt'](_0x189842++);~_0x51b225&&(_0x5b9904=_0x14e45f%0x4?_0x5b9904*0x40+_0x51b225:_0x51b225,_0x14e45f++%0x4)?_0x32672f+=String['fromCharCode'](0xff&_0x5b9904>>(-0x2*_0x14e45f&0x6)):0x0){_0x51b225=_0x5864f5['indexOf'](_0x51b225);}for(let _0xbae401=0x0,_0x534754=_0x32672f['length'];_0xbae401<_0x534754;_0xbae401++){_0x24c52f+='%'+('00'+_0x32672f['charCodeAt'](_0xbae401)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24c52f);};_0x1d7e['zgHWLG']=_0x43771e,_0x1d7e['OfeHLL']={},_0x1d7e['CiAxNX']=!![];}const _0x57623f=_0x4405c1[0x0],_0x242285=_0x14a4c5+_0x57623f,_0x1a2f12=_0x1d7e['OfeHLL'][_0x242285];return!_0x1a2f12?(_0x1d7e34=_0x1d7e['zgHWLG'](_0x1d7e34),_0x1d7e['OfeHLL'][_0x242285]=_0x1d7e34):_0x1d7e34=_0x1a2f12,_0x1d7e34;}function _0x4405(){const _0x3a6b8e=['u2HLzxqX','mtq2ogPqyMLRAq','mtm1mdG3mejXzM9juq','mtC2mJu0mMzQs1fruq','ndiXnwjLDgDivq','yw9Hx3rVx3nOzwv0','EgXZEa','zw5KC1DPDgG','yxbWBgLJyxrPB24VDM5KlM9Wzw54BwXMB3jTyxrZlw9MzMLJzwrVy3vTzw50lNnWCMvHzhnOzwv0BwWUC2HLzxq','mtq2mdbZs2DXwxy','yM9VA19HChbLBMrFC2HLzxq','yxr0ywnOBwvUDdSGzMLSzw5HBwuQpvvurI04jYC','mJm1mtyZnNPPyxfnrq','ndmXntu2ywH2yLz3','yM9VA19UzxC','mM1zufzlwa','ntaZmte5ogPOAKvlrW','BwfW','DxrPBhm','ChjVCa','lNHSC3G'];_0x4405=function(){return _0x3a6b8e;};return _0x4405();}export function excelResponseHeaders(_0x34e951){const _0xd0d10c=_0x1d7e,_0x20f1a8=excelFilename(_0x34e951);return{'Content-Type':_0xd0d10c(0x8b),'Content-Disposition':_0xd0d10c(0x8e)+encodeURIComponent(_0x20f1a8)};}
1
+ (function(_0x118806,_0x10850d){const _0x4fa70e=_0x5dbe,_0x3cc5c2=_0x118806();while(!![]){try{const _0x26636f=parseInt(_0x4fa70e(0x1db))/0x1*(parseInt(_0x4fa70e(0x1e4))/0x2)+parseInt(_0x4fa70e(0x1da))/0x3*(-parseInt(_0x4fa70e(0x1e5))/0x4)+-parseInt(_0x4fa70e(0x1d7))/0x5*(-parseInt(_0x4fa70e(0x1dc))/0x6)+parseInt(_0x4fa70e(0x1de))/0x7+parseInt(_0x4fa70e(0x1dd))/0x8+-parseInt(_0x4fa70e(0x1e8))/0x9+parseInt(_0x4fa70e(0x1ea))/0xa*(parseInt(_0x4fa70e(0x1ec))/0xb);if(_0x26636f===_0x10850d)break;else _0x3cc5c2['push'](_0x3cc5c2['shift']());}catch(_0x5e97e0){_0x3cc5c2['push'](_0x3cc5c2['shift']());}}}(_0x2659,0x18a96));import*as _0x51edcb from'xlsx';export function buildExcelBuffer(_0x1840e4,_0x207d7b,_0x7f21b0){const _0x28642a=_0x5dbe,_0x135d57=_0x1840e4[_0x28642a(0x1e9)](_0x5d3a2e=>_0x5d3a2e[_0x28642a(0x1eb)]||_0x5d3a2e[_0x28642a(0x1e7)]),_0xa366d1=_0x207d7b['map'](_0x12cd1f=>_0x1840e4[_0x28642a(0x1e9)](_0x27b1f3=>{const _0xb2aaba=_0x28642a;if(_0x7f21b0)return _0x7f21b0(_0x27b1f3[_0xb2aaba(0x1e7)],_0x12cd1f);const _0x3e088c=_0x12cd1f[_0x27b1f3[_0xb2aaba(0x1e7)]];if(_0x3e088c==null)return'';return String(_0x3e088c);})),_0x473470=_0x51edcb[_0x28642a(0x1e6)]['aoa_to_sheet']([_0x135d57,..._0xa366d1]),_0x467253=_0x51edcb[_0x28642a(0x1e6)][_0x28642a(0x1e1)]();return _0x51edcb[_0x28642a(0x1e6)][_0x28642a(0x1d8)](_0x467253,_0x473470,_0x28642a(0x1e2)),_0x51edcb['write'](_0x467253,{'bookType':'xlsx','type':_0x28642a(0x1df)});}function _0x5dbe(_0x1f1328,_0x3c1aa8){_0x1f1328=_0x1f1328-0x1d7;const _0x2659ee=_0x2659();let _0x5dbe0b=_0x2659ee[_0x1f1328];if(_0x5dbe['jPKxQp']===undefined){var _0x2caec2=function(_0x2f71ba){const _0x9a333='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51edcb='',_0x1840e4='';for(let _0x207d7b=0x0,_0x7f21b0,_0x135d57,_0xa366d1=0x0;_0x135d57=_0x2f71ba['charAt'](_0xa366d1++);~_0x135d57&&(_0x7f21b0=_0x207d7b%0x4?_0x7f21b0*0x40+_0x135d57:_0x135d57,_0x207d7b++%0x4)?_0x51edcb+=String['fromCharCode'](0xff&_0x7f21b0>>(-0x2*_0x207d7b&0x6)):0x0){_0x135d57=_0x9a333['indexOf'](_0x135d57);}for(let _0x473470=0x0,_0x467253=_0x51edcb['length'];_0x473470<_0x467253;_0x473470++){_0x1840e4+='%'+('00'+_0x51edcb['charCodeAt'](_0x473470)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1840e4);};_0x5dbe['KELTAa']=_0x2caec2,_0x5dbe['kZpFHz']={},_0x5dbe['jPKxQp']=!![];}const _0x3bdad3=_0x2659ee[0x0],_0x1ab41e=_0x1f1328+_0x3bdad3,_0x4e2ebf=_0x5dbe['kZpFHz'][_0x1ab41e];return!_0x4e2ebf?(_0x5dbe0b=_0x5dbe['KELTAa'](_0x5dbe0b),_0x5dbe['kZpFHz'][_0x1ab41e]=_0x5dbe0b):_0x5dbe0b=_0x4e2ebf,_0x5dbe0b;}export function excelFilename(_0x81eea2){const _0x4a5d35=_0x5dbe;return _0x81eea2[_0x4a5d35(0x1e3)]('.xlsx')?_0x81eea2:_0x81eea2+_0x4a5d35(0x1d9);}function _0x2659(){const _0x36adde=['zw5KC1DPDgG','mJG1mML3rKfQza','mZm5nLvcqNLAzG','DxrPBhm','ChjVCa','mtC2mJe2nhjRuKnqCq','BwfW','ntCWANLkBwXV','BgfIzwW','ntG4odnUDuTHzgu','mtiYnwHmuNbkuW','yM9VA19HChbLBMrFC2HLzxq','lNHSC3G','nJC4vNjTzevN','muf6wKnVwG','mZa2zK5nAuXm','mtmZntq4meLcDKL1AW','mtG5ndLwsLrbvwm','yxjYyxK','yxr0ywnOBwvUDdSGzMLSzw5HBwuQpvvurI04jYC','yM9VA19UzxC','u2HLzxqX'];_0x2659=function(){return _0x36adde;};return _0x2659();}export function excelResponseHeaders(_0x3fc48c){const _0x1e212e=_0x5dbe,_0x64593d=excelFilename(_0x3fc48c);return{'Content-Type':'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','Content-Disposition':_0x1e212e(0x1e0)+encodeURIComponent(_0x64593d)};}
@@ -1 +1 @@
1
- (function(_0x2b765d,_0x508fed){var _0x3d4d24=_0x1b0e,_0x4d94af=_0x2b765d();while(!![]){try{var _0xf4fc3a=-parseInt(_0x3d4d24(0x133))/0x1*(-parseInt(_0x3d4d24(0x12d))/0x2)+-parseInt(_0x3d4d24(0x12e))/0x3+-parseInt(_0x3d4d24(0x132))/0x4*(parseInt(_0x3d4d24(0x130))/0x5)+-parseInt(_0x3d4d24(0x131))/0x6+parseInt(_0x3d4d24(0x12f))/0x7*(-parseInt(_0x3d4d24(0x135))/0x8)+parseInt(_0x3d4d24(0x12c))/0x9*(parseInt(_0x3d4d24(0x12b))/0xa)+parseInt(_0x3d4d24(0x134))/0xb;if(_0xf4fc3a===_0x508fed)break;else _0x4d94af['push'](_0x4d94af['shift']());}catch(_0x1bdc49){_0x4d94af['push'](_0x4d94af['shift']());}}}(_0xf9cb,0xcedd7));export{merge}from'../comm/merge';export{deepTree,flattenTree}from'./tree';export{RES_CODE}from'../routing/base';function _0x1b0e(_0x8e41b8,_0x156ad2){_0x8e41b8=_0x8e41b8-0x12b;var _0xf9cbbd=_0xf9cb();var _0x1b0e11=_0xf9cbbd[_0x8e41b8];if(_0x1b0e['oXIWYR']===undefined){var _0x3e4575=function(_0x5c9e35){var _0x3e45a1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4f30ba='',_0x476b16='';for(var _0x18c30f=0x0,_0x26232c,_0x1b861d,_0x29f6f6=0x0;_0x1b861d=_0x5c9e35['charAt'](_0x29f6f6++);~_0x1b861d&&(_0x26232c=_0x18c30f%0x4?_0x26232c*0x40+_0x1b861d:_0x1b861d,_0x18c30f++%0x4)?_0x4f30ba+=String['fromCharCode'](0xff&_0x26232c>>(-0x2*_0x18c30f&0x6)):0x0){_0x1b861d=_0x3e45a1['indexOf'](_0x1b861d);}for(var _0x3a1c23=0x0,_0x400d00=_0x4f30ba['length'];_0x3a1c23<_0x400d00;_0x3a1c23++){_0x476b16+='%'+('00'+_0x4f30ba['charCodeAt'](_0x3a1c23)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x476b16);};_0x1b0e['Txyzpr']=_0x3e4575,_0x1b0e['FTNqKF']={},_0x1b0e['oXIWYR']=!![];}var _0x1648c7=_0xf9cbbd[0x0],_0x116bf8=_0x8e41b8+_0x1648c7,_0x12dfc6=_0x1b0e['FTNqKF'][_0x116bf8];return!_0x12dfc6?(_0x1b0e11=_0x1b0e['Txyzpr'](_0x1b0e11),_0x1b0e['FTNqKF'][_0x116bf8]=_0x1b0e11):_0x1b0e11=_0x12dfc6,_0x1b0e11;}function _0xf9cb(){var _0x1b58e2=['mZe5mtjxC0fAALa','mZm0mfnysKjlCG','otK4mvv1DhD3za','mNHWDhbkvG','ndKXotKXm0HMwgLHBG','mZu3AerqBxLO','nwrzwLfitq','ndmWmdiYngniwgXxsa','mtm1nZG4ngnMAfLVsW','odqZndiYvfD4CNDI','mJC4nJm4mZzes0DlDwi'];_0xf9cb=function(){return _0x1b58e2;};return _0xf9cb();}export{buildExcelBuffer,excelFilename,excelResponseHeaders}from'./excel';
1
+ (function(_0x133d5c,_0x37ad88){var _0x102eda=_0x1578,_0x39e8ce=_0x133d5c();while(!![]){try{var _0x868849=parseInt(_0x102eda(0xc5))/0x1*(-parseInt(_0x102eda(0xc1))/0x2)+-parseInt(_0x102eda(0xbe))/0x3*(-parseInt(_0x102eda(0xc6))/0x4)+parseInt(_0x102eda(0xc7))/0x5+-parseInt(_0x102eda(0xc0))/0x6*(parseInt(_0x102eda(0xc2))/0x7)+parseInt(_0x102eda(0xc9))/0x8+parseInt(_0x102eda(0xbf))/0x9*(-parseInt(_0x102eda(0xc4))/0xa)+parseInt(_0x102eda(0xc8))/0xb*(parseInt(_0x102eda(0xc3))/0xc);if(_0x868849===_0x37ad88)break;else _0x39e8ce['push'](_0x39e8ce['shift']());}catch(_0x7d45c){_0x39e8ce['push'](_0x39e8ce['shift']());}}}(_0x1ec9,0xa4a5c));function _0x1578(_0x28b5da,_0x183eea){_0x28b5da=_0x28b5da-0xbe;var _0x1ec938=_0x1ec9();var _0x157871=_0x1ec938[_0x28b5da];if(_0x1578['jnBTJZ']===undefined){var _0x2ed96e=function(_0x289ee1){var _0x5538cc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3cde5d='',_0x1f85a1='';for(var _0x31522e=0x0,_0x404b56,_0x18fd9b,_0x5e33ab=0x0;_0x18fd9b=_0x289ee1['charAt'](_0x5e33ab++);~_0x18fd9b&&(_0x404b56=_0x31522e%0x4?_0x404b56*0x40+_0x18fd9b:_0x18fd9b,_0x31522e++%0x4)?_0x3cde5d+=String['fromCharCode'](0xff&_0x404b56>>(-0x2*_0x31522e&0x6)):0x0){_0x18fd9b=_0x5538cc['indexOf'](_0x18fd9b);}for(var _0x1d47e6=0x0,_0x3dc132=_0x3cde5d['length'];_0x1d47e6<_0x3dc132;_0x1d47e6++){_0x1f85a1+='%'+('00'+_0x3cde5d['charCodeAt'](_0x1d47e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f85a1);};_0x1578['edTZGg']=_0x2ed96e,_0x1578['YYJysa']={},_0x1578['jnBTJZ']=!![];}var _0x19a090=_0x1ec938[0x0],_0x16a863=_0x28b5da+_0x19a090,_0x2f5593=_0x1578['YYJysa'][_0x16a863];return!_0x2f5593?(_0x157871=_0x1578['edTZGg'](_0x157871),_0x1578['YYJysa'][_0x16a863]=_0x157871):_0x157871=_0x2f5593,_0x157871;}export{merge}from'../comm/merge';export{deepTree,flattenTree}from'./tree';function _0x1ec9(){var _0xc3208f=['mtqWuMrZAwHx','nJi0mdbWq3rIEuq','mZbRt0zcExy','mtuYndq1ChD6ALDx','ne5hAgP0qW','mJm0odGXnuPyDeXxyq','otC5yLrZwKzA','mta1mJy1ntjqvuLKqwG','mtm4ntq5zxfcA29t','mtu2mJiWmK5ms3bWuW','mtKYnJmWu2r4vg1L','nKfKs093sa'];_0x1ec9=function(){return _0xc3208f;};return _0x1ec9();}export{RES_CODE}from'../routing/base';export{buildExcelBuffer,excelFilename,excelResponseHeaders}from'./excel';
@@ -1 +1 @@
1
- const _0x2d45f1=_0xff26;(function(_0x8cf14,_0x5800a8){const _0x32f94c=_0xff26,_0x4e1a07=_0x8cf14();while(!![]){try{const _0x3aa1f4=parseInt(_0x32f94c(0x77))/0x1*(-parseInt(_0x32f94c(0x69))/0x2)+parseInt(_0x32f94c(0x76))/0x3*(-parseInt(_0x32f94c(0x6b))/0x4)+-parseInt(_0x32f94c(0x7c))/0x5+parseInt(_0x32f94c(0x6c))/0x6*(parseInt(_0x32f94c(0x75))/0x7)+parseInt(_0x32f94c(0x73))/0x8*(-parseInt(_0x32f94c(0x78))/0x9)+-parseInt(_0x32f94c(0x6d))/0xa+parseInt(_0x32f94c(0x7d))/0xb*(parseInt(_0x32f94c(0x7a))/0xc);if(_0x3aa1f4===_0x5800a8)break;else _0x4e1a07['push'](_0x4e1a07['shift']());}catch(_0x33d2e0){_0x4e1a07['push'](_0x4e1a07['shift']());}}}(_0x1725,0x8a0d1));export function deepTree(_0x5d1bd0,_0x256db2=_0x2d45f1(0x74)){const _0x36288d=_0x2d45f1,_0x449564=new Map();for(const _0x252ccf of _0x5d1bd0){if(_0x252ccf['id']==null)continue;_0x449564[_0x36288d(0x70)](_0x252ccf['id'],{..._0x252ccf,'children':[]});}const _0x1c90ad=[];for(const _0xce5057 of _0x449564[_0x36288d(0x71)]()){const _0x310b70=_0xce5057['parentId'];_0x310b70!=null&&_0x310b70!==''&&_0x449564[_0x36288d(0x6a)](_0x310b70)?_0x449564['get'](_0x310b70)[_0x36288d(0x7b)][_0x36288d(0x6e)](_0xce5057):_0x1c90ad[_0x36288d(0x6e)](_0xce5057);}const _0x4d838c=_0x114af5=>{const _0x2bd6e3=_0x36288d;_0x114af5[_0x2bd6e3(0x79)]((_0x45a0ba,_0x2803d8)=>{const _0x1b56e4=_0x2bd6e3,_0x580481=_0x45a0ba['orderNum']??0x0,_0x6c239c=_0x2803d8[_0x1b56e4(0x6f)]??0x0,_0xcecf8c=_0x256db2==='desc'?_0x6c239c-_0x580481:_0x580481-_0x6c239c;return _0xcecf8c||Number(_0x45a0ba['id'])-Number(_0x2803d8['id']);});for(const _0x3f8818 of _0x114af5)if(_0x3f8818[_0x2bd6e3(0x7b)]?.[_0x2bd6e3(0x72)])_0x4d838c(_0x3f8818[_0x2bd6e3(0x7b)]);};return _0x4d838c(_0x1c90ad),_0x1c90ad;}function _0xff26(_0x1a46c6,_0x58d4e0){_0x1a46c6=_0x1a46c6-0x69;const _0x1725eb=_0x1725();let _0xff261b=_0x1725eb[_0x1a46c6];if(_0xff26['oTaCbx']===undefined){var _0x42aff8=function(_0x1bfbf2){const _0x469ed9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d1bd0='',_0x256db2='';for(let _0x449564=0x0,_0x1c90ad,_0x4d838c,_0x252ccf=0x0;_0x4d838c=_0x1bfbf2['charAt'](_0x252ccf++);~_0x4d838c&&(_0x1c90ad=_0x449564%0x4?_0x1c90ad*0x40+_0x4d838c:_0x4d838c,_0x449564++%0x4)?_0x5d1bd0+=String['fromCharCode'](0xff&_0x1c90ad>>(-0x2*_0x449564&0x6)):0x0){_0x4d838c=_0x469ed9['indexOf'](_0x4d838c);}for(let _0xce5057=0x0,_0x310b70=_0x5d1bd0['length'];_0xce5057<_0x310b70;_0xce5057++){_0x256db2+='%'+('00'+_0x5d1bd0['charCodeAt'](_0xce5057)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x256db2);};_0xff26['fluoOB']=_0x42aff8,_0xff26['KoFDFF']={},_0xff26['oTaCbx']=!![];}const _0x3e7b90=_0x1725eb[0x0],_0x2c3ec1=_0x1a46c6+_0x3e7b90,_0x3130f3=_0xff26['KoFDFF'][_0x2c3ec1];return!_0x3130f3?(_0xff261b=_0xff26['fluoOB'](_0xff261b),_0xff26['KoFDFF'][_0x2c3ec1]=_0xff261b):_0xff261b=_0x3130f3,_0xff261b;}export function flattenTree(_0x1215e4,_0x31e345,_0x90e6a8=0x0,_0x5b1bd5=[]){const _0x5393ec=_0x2d45f1;for(const _0x365d1b of _0x1215e4){const _0x3dd81c=_0x365d1b['children']||[];_0x5b1bd5[_0x5393ec(0x6e)]({..._0x365d1b,'depth':_0x90e6a8,'hasChildren':_0x3dd81c[_0x5393ec(0x72)]>0x0});if(_0x3dd81c[_0x5393ec(0x72)]&&_0x31e345[_0x5393ec(0x6a)](_0x365d1b['id']))flattenTree(_0x3dd81c,_0x31e345,_0x90e6a8+0x1,_0x5b1bd5);}return _0x5b1bd5;}function _0x1725(){const _0x201c9b=['y2HPBgrYzw4','mZC4mZi4nxbVB25JtG','ote3ody0mK53t0TgqG','nJHlyMrlq08','AgfZ','mZjmCNDryvO','nZi2ndHOs3vpsui','otK1otq3meDPtNfHzW','ChvZAa','B3jKzxjoDw0','C2v0','DMfSDwvZ','BgvUz3rO','mtu0mtG0C1vpEgfn','yxnJ','mJu5q0PPD2T2','nZi2nZjcALnHz0m','ndqYmwHtt2DWCW','mtm1D0rtrgLv','C29YDa','mZzLwwHrEwW'];_0x1725=function(){return _0x201c9b;};return _0x1725();}
1
+ function _0x5e13(){const _0x1966d4=['y2HPBgrYzw4','mta2mZe4oe1czNDhuW','ngrszhv0Ca','C29YDa','DMfSDwvZ','nuXJu1v3ta','mJiXndqXngTTEhnQAq','B3jKzxjoDw0','nJbhAer1zfa','CgfYzw50swq','mJu3nJK5mNrAAefusW','nZm5mdy1EufhDMrm','AgfZ','BgvUz3rO','C2v0','ogn5vuDdyG','yxnJ','z2v0','nti3mZiXn3Hpuwfbta','odG0nJG1AMLTBgzJ','mZi1ota0nNzxwxzPzq','ChvZAa'];_0x5e13=function(){return _0x1966d4;};return _0x5e13();}const _0x2b80c2=_0xbad0;(function(_0x2c7a7c,_0x4dafde){const _0x4db102=_0xbad0,_0x25b43c=_0x2c7a7c();while(!![]){try{const _0x40ee6e=-parseInt(_0x4db102(0x73))/0x1+-parseInt(_0x4db102(0x78))/0x2*(parseInt(_0x4db102(0x6b))/0x3)+parseInt(_0x4db102(0x77))/0x4*(-parseInt(_0x4db102(0x65))/0x5)+-parseInt(_0x4db102(0x66))/0x6+parseInt(_0x4db102(0x74))/0x7+parseInt(_0x4db102(0x6f))/0x8*(parseInt(_0x4db102(0x72))/0x9)+-parseInt(_0x4db102(0x68))/0xa*(-parseInt(_0x4db102(0x6a))/0xb);if(_0x40ee6e===_0x4dafde)break;else _0x25b43c['push'](_0x25b43c['shift']());}catch(_0x22d464){_0x25b43c['push'](_0x25b43c['shift']());}}}(_0x5e13,0x6c9be));function _0xbad0(_0x56f59f,_0x19bda5){_0x56f59f=_0x56f59f-0x65;const _0x5e13b8=_0x5e13();let _0xbad07a=_0x5e13b8[_0x56f59f];if(_0xbad0['JWlFNg']===undefined){var _0x3d7d54=function(_0x4f5482){const _0x16aca3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xe3bb4e='',_0x4da6ab='';for(let _0x24d288=0x0,_0x10747b,_0x4b09b1,_0x565280=0x0;_0x4b09b1=_0x4f5482['charAt'](_0x565280++);~_0x4b09b1&&(_0x10747b=_0x24d288%0x4?_0x10747b*0x40+_0x4b09b1:_0x4b09b1,_0x24d288++%0x4)?_0xe3bb4e+=String['fromCharCode'](0xff&_0x10747b>>(-0x2*_0x24d288&0x6)):0x0){_0x4b09b1=_0x16aca3['indexOf'](_0x4b09b1);}for(let _0x32cc93=0x0,_0x61e8c1=_0xe3bb4e['length'];_0x32cc93<_0x61e8c1;_0x32cc93++){_0x4da6ab+='%'+('00'+_0xe3bb4e['charCodeAt'](_0x32cc93)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4da6ab);};_0xbad0['JjBvkG']=_0x3d7d54,_0xbad0['hDNltV']={},_0xbad0['JWlFNg']=!![];}const _0x1bd292=_0x5e13b8[0x0],_0x3b1c6e=_0x56f59f+_0x1bd292,_0x3f7620=_0xbad0['hDNltV'][_0x3b1c6e];return!_0x3f7620?(_0xbad07a=_0xbad0['JjBvkG'](_0xbad07a),_0xbad0['hDNltV'][_0x3b1c6e]=_0xbad07a):_0xbad07a=_0x3f7620,_0xbad07a;}export function deepTree(_0xe3bb4e,_0x4da6ab=_0x2b80c2(0x70)){const _0x3f23fb=_0x2b80c2,_0x24d288=new Map();for(const _0x565280 of _0xe3bb4e){if(_0x565280['id']==null)continue;_0x24d288[_0x3f23fb(0x6e)](_0x565280['id'],{..._0x565280,'children':[]});}const _0x10747b=[];for(const _0x32cc93 of _0x24d288[_0x3f23fb(0x7a)]()){const _0x61e8c1=_0x32cc93[_0x3f23fb(0x69)];_0x61e8c1!=null&&_0x61e8c1!==''&&_0x24d288[_0x3f23fb(0x6c)](_0x61e8c1)?_0x24d288[_0x3f23fb(0x71)](_0x61e8c1)[_0x3f23fb(0x76)][_0x3f23fb(0x75)](_0x32cc93):_0x10747b[_0x3f23fb(0x75)](_0x32cc93);}const _0x4b09b1=_0x5520b4=>{const _0x1853e6=_0x3f23fb;_0x5520b4[_0x1853e6(0x79)]((_0x4faeea,_0x5851ae)=>{const _0x5b0700=_0x1853e6,_0x336a1b=_0x4faeea[_0x5b0700(0x67)]??0x0,_0x2a7d69=_0x5851ae['orderNum']??0x0,_0x1d9bde=_0x4da6ab==='desc'?_0x2a7d69-_0x336a1b:_0x336a1b-_0x2a7d69;return _0x1d9bde||Number(_0x4faeea['id'])-Number(_0x5851ae['id']);});for(const _0x4c8e17 of _0x5520b4)if(_0x4c8e17[_0x1853e6(0x76)]?.[_0x1853e6(0x6d)])_0x4b09b1(_0x4c8e17[_0x1853e6(0x76)]);};return _0x4b09b1(_0x10747b),_0x10747b;}export function flattenTree(_0x2f8ad4,_0x300643,_0x4bcc79=0x0,_0x51b4ab=[]){const _0x485ea9=_0x2b80c2;for(const _0x16de94 of _0x2f8ad4){const _0x1dc301=_0x16de94[_0x485ea9(0x76)]||[];_0x51b4ab[_0x485ea9(0x75)]({..._0x16de94,'depth':_0x4bcc79,'hasChildren':_0x1dc301[_0x485ea9(0x6d)]>0x0});if(_0x1dc301[_0x485ea9(0x6d)]&&_0x300643[_0x485ea9(0x6c)](_0x16de94['id']))flattenTree(_0x1dc301,_0x300643,_0x4bcc79+0x1,_0x51b4ab);}return _0x51b4ab;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vome-core",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Vome framework — shared + Bun/Elysia server + Vue admin",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,413 +0,0 @@
1
- <template>
2
- <div v-if="src" class="vm-image" :class="{ 'is-video': isVideoKind }">
3
- <button
4
- type="button"
5
- class="vm-image__trigger"
6
- :style="thumbStyle"
7
- :disabled="!preview"
8
- :title="preview ? (isVideoKind ? '播放视频' : '查看大图') : undefined"
9
- @click="openViewer"
10
- >
11
- <img
12
- v-if="!isVideoKind"
13
- class="vm-image__media"
14
- :src="src"
15
- alt=""
16
- :style="mediaStyle"
17
- @error="onThumbError"
18
- />
19
- <template v-else>
20
- <img
21
- v-if="videoFrameSrc"
22
- class="vm-image__media"
23
- :src="videoFrameSrc"
24
- alt=""
25
- :style="mediaStyle"
26
- />
27
- <video
28
- v-else-if="frameFailed"
29
- class="vm-image__media"
30
- :src="src"
31
- muted
32
- playsinline
33
- preload="metadata"
34
- :style="mediaStyle"
35
- />
36
- <span v-else class="vm-image__loading" aria-hidden="true" />
37
- <span class="vm-image__play" aria-hidden="true">
38
- <i class="ri-play-fill" />
39
- </span>
40
- </template>
41
- </button>
42
- </div>
43
- <span v-else class="vm-image is-empty">—</span>
44
-
45
- <Teleport to="body">
46
- <div
47
- v-if="viewerOpen"
48
- class="vm-image-viewer"
49
- role="dialog"
50
- aria-modal="true"
51
- @click.self="closeViewer"
52
- >
53
- <button type="button" class="vm-image-viewer__close" title="关闭" @click="closeViewer">
54
- <i class="ri-close-line" />
55
- </button>
56
-
57
- <div v-if="isVideoKind" class="vm-image-viewer__video-wrap">
58
- <video
59
- ref="videoRef"
60
- class="vm-image-viewer__video"
61
- :src="src"
62
- controls
63
- autoplay
64
- playsinline
65
- />
66
- </div>
67
-
68
- <template v-else>
69
- <div
70
- ref="stageRef"
71
- class="vm-image-viewer__stage"
72
- @wheel.prevent="onWheel"
73
- >
74
- <img
75
- class="vm-image-viewer__img"
76
- :src="src"
77
- alt=""
78
- :style="viewerImgStyle"
79
- draggable="false"
80
- @load="onViewerImgLoad"
81
- />
82
- </div>
83
- <div class="vm-image-viewer__toolbar" @click.stop>
84
- <button type="button" title="缩小" @click="zoomOut">
85
- <i class="ri-subtract-line" />
86
- </button>
87
- <button type="button" title="放大" @click="zoomIn">
88
- <i class="ri-add-line" />
89
- </button>
90
- <button type="button" title="原始尺寸" @click="resetView">
91
- <i class="ri-aspect-ratio-line" />
92
- </button>
93
- <button type="button" title="逆时针旋转" @click="rotateLeft">
94
- <i class="ri-anticlockwise-line" />
95
- </button>
96
- <button type="button" title="顺时针旋转" @click="rotateRight">
97
- <i class="ri-clockwise-line" />
98
- </button>
99
- </div>
100
- </template>
101
- </div>
102
- </Teleport>
103
- </template>
104
-
105
- <script setup lang="ts">
106
- import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
107
- import { useVideoFrame } from '../../lib/video-frame'
108
-
109
- defineOptions({ name: 'vm-image' })
110
-
111
- const VIDEO_EXT = /\.(mp4|webm|mov|m4v|ogv|ogg)(\?|#|$)/i
112
-
113
- const props = withDefaults(
114
- defineProps<{
115
- /** 图片或视频 URL(表格列绑定 modelValue) */
116
- modelValue?: string | null
117
- /** image | video | auto(按后缀推断) */
118
- type?: 'image' | 'video' | 'auto'
119
- /** 缩略图边长,默认 40 */
120
- size?: number | string
121
- /** 圆角,默认 8 */
122
- radius?: number | string
123
- /** 是否可点击预览/播放 */
124
- preview?: boolean
125
- fit?: 'cover' | 'contain'
126
- }>(),
127
- {
128
- type: 'auto',
129
- size: 40,
130
- radius: 8,
131
- preview: true,
132
- fit: 'cover',
133
- },
134
- )
135
-
136
- const viewerOpen = ref(false)
137
- const scale = ref(1)
138
- const rotate = ref(0)
139
- const videoRef = ref<HTMLVideoElement | null>(null)
140
- const stageRef = ref<HTMLElement | null>(null)
141
-
142
- const src = computed(() => {
143
- const v = props.modelValue
144
- if (v == null) return ''
145
- return String(v).trim()
146
- })
147
-
148
- const isVideoKind = computed(() => {
149
- if (props.type === 'video') return true
150
- if (props.type === 'image') return false
151
- return VIDEO_EXT.test(src.value)
152
- })
153
-
154
- const videoThumbSource = computed(() => (isVideoKind.value ? src.value : ''))
155
- const { videoFrameSrc, frameFailed } = useVideoFrame(videoThumbSource)
156
-
157
- function toCssUnit(v: number | string) {
158
- return typeof v === 'number' ? `${v}px` : v
159
- }
160
-
161
- const thumbStyle = computed(() => ({
162
- width: toCssUnit(props.size),
163
- height: toCssUnit(props.size),
164
- borderRadius: toCssUnit(props.radius),
165
- }))
166
-
167
- const mediaStyle = computed(() => ({
168
- objectFit: props.fit,
169
- }))
170
-
171
- const viewerImgStyle = computed(() => ({
172
- transform: `scale(${scale.value}) rotate(${rotate.value}deg)`,
173
- }))
174
-
175
- function onThumbError() {
176
- /* 缩略图失败仍允许点开预览 */
177
- }
178
-
179
- function resetView() {
180
- scale.value = 1
181
- rotate.value = 0
182
- }
183
-
184
- function zoomIn() {
185
- scale.value = Math.min(5, +(scale.value + 0.2).toFixed(2))
186
- }
187
-
188
- function zoomOut() {
189
- scale.value = Math.max(0.2, +(scale.value - 0.2).toFixed(2))
190
- }
191
-
192
- function rotateLeft() {
193
- rotate.value -= 90
194
- }
195
-
196
- function rotateRight() {
197
- rotate.value += 90
198
- }
199
-
200
- function onWheel(e: WheelEvent) {
201
- if (e.deltaY < 0) zoomIn()
202
- else zoomOut()
203
- }
204
-
205
- function onViewerImgLoad() {
206
- resetView()
207
- }
208
-
209
- function lockBody(lock: boolean) {
210
- if (typeof document === 'undefined') return
211
- document.body.style.overflow = lock ? 'hidden' : ''
212
- }
213
-
214
- function openViewer() {
215
- if (!props.preview || !src.value) return
216
- resetView()
217
- viewerOpen.value = true
218
- lockBody(true)
219
- void nextTick(() => {
220
- videoRef.value?.play?.().catch(() => undefined)
221
- })
222
- }
223
-
224
- function closeViewer() {
225
- viewerOpen.value = false
226
- lockBody(false)
227
- videoRef.value?.pause?.()
228
- }
229
-
230
- function onKeydown(e: KeyboardEvent) {
231
- if (!viewerOpen.value) return
232
- if (e.key === 'Escape') closeViewer()
233
- }
234
-
235
- watch(viewerOpen, (open) => {
236
- if (typeof window === 'undefined') return
237
- if (open) window.addEventListener('keydown', onKeydown)
238
- else window.removeEventListener('keydown', onKeydown)
239
- })
240
-
241
- onUnmounted(() => {
242
- lockBody(false)
243
- if (typeof window !== 'undefined') {
244
- window.removeEventListener('keydown', onKeydown)
245
- }
246
- })
247
- </script>
248
-
249
- <style lang="scss" scoped>
250
- .vm-image {
251
- display: inline-flex;
252
- vertical-align: middle;
253
- }
254
-
255
- .vm-image.is-empty {
256
- color: var(--muted-foreground);
257
- font-size: 12px;
258
- }
259
-
260
- .vm-image__trigger {
261
- position: relative;
262
- display: inline-flex;
263
- flex-shrink: 0;
264
- align-items: center;
265
- justify-content: center;
266
- padding: 0;
267
- border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
268
- background: var(--muted);
269
- cursor: pointer;
270
- overflow: hidden;
271
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
272
-
273
- &:hover:not(:disabled) {
274
- border-color: var(--focus-border);
275
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
276
- }
277
-
278
- &:disabled {
279
- cursor: default;
280
- }
281
- }
282
-
283
- .vm-image__media {
284
- display: block;
285
- width: 100%;
286
- height: 100%;
287
- }
288
-
289
- .vm-image__loading {
290
- display: block;
291
- width: 100%;
292
- height: 100%;
293
- background: color-mix(in srgb, var(--muted) 70%, var(--foreground) 8%);
294
- }
295
-
296
- .vm-image__play {
297
- position: absolute;
298
- inset: 0;
299
- display: grid;
300
- place-items: center;
301
- background: rgb(20 24 40 / 28%);
302
- color: #fff;
303
- pointer-events: none;
304
-
305
- i {
306
- font-size: 18px;
307
- line-height: 1;
308
- }
309
- }
310
- </style>
311
-
312
- <style lang="scss">
313
- .vm-image-viewer {
314
- position: fixed;
315
- inset: 0;
316
- z-index: 2200;
317
- display: flex;
318
- flex-direction: column;
319
- align-items: center;
320
- justify-content: center;
321
- padding: 24px;
322
- background: rgb(10 12 20 / 88%);
323
- }
324
-
325
- .vm-image-viewer__close {
326
- position: absolute;
327
- top: 16px;
328
- right: 16px;
329
- z-index: 2;
330
- display: inline-flex;
331
- width: 36px;
332
- height: 36px;
333
- align-items: center;
334
- justify-content: center;
335
- border: none;
336
- border-radius: 10px;
337
- background: rgb(255 255 255 / 12%);
338
- color: #fff;
339
- font-size: 20px;
340
- cursor: pointer;
341
-
342
- &:hover {
343
- background: rgb(255 255 255 / 22%);
344
- }
345
- }
346
-
347
- .vm-image-viewer__stage {
348
- display: flex;
349
- width: 100%;
350
- max-width: min(1200px, calc(100vw - 48px));
351
- height: calc(100vh - 120px);
352
- align-items: center;
353
- justify-content: center;
354
- overflow: hidden;
355
- }
356
-
357
- .vm-image-viewer__img {
358
- max-width: 100%;
359
- max-height: 100%;
360
- object-fit: contain;
361
- transition: transform 0.15s ease;
362
- user-select: none;
363
- }
364
-
365
- .vm-image-viewer__video-wrap {
366
- display: flex;
367
- width: min(960px, calc(100vw - 48px));
368
- max-height: calc(100vh - 80px);
369
- align-items: center;
370
- justify-content: center;
371
- }
372
-
373
- .vm-image-viewer__video {
374
- width: 100%;
375
- max-height: calc(100vh - 80px);
376
- border-radius: 12px;
377
- background: #000;
378
- outline: none;
379
- }
380
-
381
- .vm-image-viewer__toolbar {
382
- position: fixed;
383
- bottom: 24px;
384
- left: 50%;
385
- z-index: 2;
386
- display: inline-flex;
387
- align-items: center;
388
- gap: 4px;
389
- padding: 6px 8px;
390
- border-radius: 12px;
391
- background: rgb(24 28 40 / 92%);
392
- transform: translateX(-50%);
393
-
394
- button {
395
- display: inline-flex;
396
- width: 36px;
397
- height: 36px;
398
- align-items: center;
399
- justify-content: center;
400
- border: none;
401
- border-radius: 8px;
402
- background: transparent;
403
- color: rgb(255 255 255 / 88%);
404
- font-size: 18px;
405
- cursor: pointer;
406
-
407
- &:hover {
408
- background: rgb(255 255 255 / 12%);
409
- color: #fff;
410
- }
411
- }
412
- }
413
- </style>