vome-core 0.0.43 → 0.0.45

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,21 @@
1
- var _0x31fbf2=_0xf75a;(function(_0x3bcbc1,_0x31e83d){var _0x5b7147=_0xf75a,_0x211028=_0x3bcbc1();while(!![]){try{var _0x3333cc=parseInt(_0x5b7147(0x1d9))/0x1+parseInt(_0x5b7147(0x1d4))/0x2+parseInt(_0x5b7147(0x1d8))/0x3*(-parseInt(_0x5b7147(0x1e2))/0x4)+-parseInt(_0x5b7147(0x1de))/0x5*(parseInt(_0x5b7147(0x1d5))/0x6)+parseInt(_0x5b7147(0x1db))/0x7+-parseInt(_0x5b7147(0x1dd))/0x8*(-parseInt(_0x5b7147(0x1dc))/0x9)+-parseInt(_0x5b7147(0x1e0))/0xa;if(_0x3333cc===_0x31e83d)break;else _0x211028['push'](_0x211028['shift']());}catch(_0x3719a6){_0x211028['push'](_0x211028['shift']());}}}(_0x172e,0xd214e));export class Mitt{[_0x31fbf2(0x1e1)]=new Map();['on'](_0xca9858,_0x5438a6){var _0x4c2d4f=_0x31fbf2;if(!this[_0x4c2d4f(0x1e1)]['has'](_0xca9858))this[_0x4c2d4f(0x1e1)][_0x4c2d4f(0x1d7)](_0xca9858,new Set());this[_0x4c2d4f(0x1e1)]['get'](_0xca9858)[_0x4c2d4f(0x1da)](_0x5438a6);}['off'](_0x4f8644,_0x478404){var _0x50320b=_0x31fbf2;if(!_0x478404){this[_0x50320b(0x1e1)]['delete'](_0x4f8644);return;}this[_0x50320b(0x1e1)]['get'](_0x4f8644)?.[_0x50320b(0x1d6)](_0x478404);}[_0x31fbf2(0x1d3)](_0x235f81,..._0x3c3136){var _0x116187=_0x31fbf2;this['map'][_0x116187(0x1d2)](_0x235f81)?.[_0x116187(0x1df)](_0x5bbfba=>_0x5bbfba(..._0x3c3136));}}function _0xf75a(_0x585771,_0x577d71){_0x585771=_0x585771-0x1d2;var _0x172eb8=_0x172e();var _0xf75a62=_0x172eb8[_0x585771];if(_0xf75a['emxfJT']===undefined){var _0x1d5ed1=function(_0x982ced){var _0x16a5bb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xca9858='',_0x5438a6='';for(var _0x4f8644=0x0,_0x478404,_0x235f81,_0x3c3136=0x0;_0x235f81=_0x982ced['charAt'](_0x3c3136++);~_0x235f81&&(_0x478404=_0x4f8644%0x4?_0x478404*0x40+_0x235f81:_0x235f81,_0x4f8644++%0x4)?_0xca9858+=String['fromCharCode'](0xff&_0x478404>>(-0x2*_0x4f8644&0x6)):0x0){_0x235f81=_0x16a5bb['indexOf'](_0x235f81);}for(var _0x5bbfba=0x0,_0x509617=_0xca9858['length'];_0x5bbfba<_0x509617;_0x5bbfba++){_0x5438a6+='%'+('00'+_0xca9858['charCodeAt'](_0x5bbfba)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5438a6);};_0xf75a['xVObhP']=_0x1d5ed1,_0xf75a['AAkSKV']={},_0xf75a['emxfJT']=!![];}var _0xe2b7e4=_0x172eb8[0x0],_0x340816=_0x585771+_0xe2b7e4,_0x18477c=_0xf75a['AAkSKV'][_0x340816];return!_0x18477c?(_0xf75a62=_0xf75a['xVObhP'](_0xf75a62),_0xf75a['AAkSKV'][_0x340816]=_0xf75a62):_0xf75a62=_0x18477c,_0xf75a62;}function _0x172e(){var _0x55f692=['mtm0odG4nNPfDu1UyG','ywrK','mte0nJCYnNvYDefeuq','mtmYmZe3nZnpvLrPywC','ofLuvNLPrG','mZe1s0LYtLv1','zM9YrwfJAa','mtCWntq0otb5ChzQvLG','BwfW','ntjZs0fNB1K','z2v0','zw1PDa','mtCYndm3nLf4AKXuyq','oduWmJzrChbkBuS','zgvSzxrL','C2v0','odKXnJnssK9Qv2W'];_0x172e=function(){return _0x55f692;};return _0x172e();}export function createMitt(){return new Mitt();}
1
+ export class Mitt {
2
+ map = new Map;
3
+ on(type, handler) {
4
+ if (!this.map.has(type))
5
+ this.map.set(type, new Set);
6
+ this.map.get(type).add(handler);
7
+ }
8
+ off(type, handler) {
9
+ if (!handler) {
10
+ this.map.delete(type);
11
+ return;
12
+ }
13
+ this.map.get(type)?.delete(handler);
14
+ }
15
+ emit(type, ...args) {
16
+ this.map.get(type)?.forEach((fn) => fn(...args));
17
+ }
18
+ }
19
+ export function createMitt() {
20
+ return new Mitt;
21
+ }
@@ -1 +1,216 @@
1
- (function(_0x576f97,_0x165954){const _0x1be183=_0x517e,_0x302de3=_0x576f97();while(!![]){try{const _0x154779=-parseInt(_0x1be183(0xc3))/0x1*(-parseInt(_0x1be183(0x9d))/0x2)+-parseInt(_0x1be183(0x93))/0x3+parseInt(_0x1be183(0xa1))/0x4+-parseInt(_0x1be183(0xa9))/0x5*(parseInt(_0x1be183(0x97))/0x6)+parseInt(_0x1be183(0xbb))/0x7*(-parseInt(_0x1be183(0x9e))/0x8)+-parseInt(_0x1be183(0x96))/0x9*(parseInt(_0x1be183(0xbc))/0xa)+parseInt(_0x1be183(0x89))/0xb*(parseInt(_0x1be183(0xc0))/0xc);if(_0x154779===_0x165954)break;else _0x302de3['push'](_0x302de3['shift']());}catch(_0x2c2f0d){_0x302de3['push'](_0x302de3['shift']());}}}(_0x5eb1,0x56d62));import{findEpsEntity}from'../lib/eps';import{getCrudStyle}from'./style';export function toTree(_0x4a34f2={}){const _0x43f670=_0x517e;return{'__plugin':_0x43f670(0xbd),'tree':!![],'lazy':_0x4a34f2[_0x43f670(0xc6)]??![]};}export function setFocus(_0x2c10f5){const _0x318070=_0x517e;return{'__plugin':_0x318070(0x8d),'prop':_0x2c10f5??''};}export function setRules(){const _0x44f10f=_0x517e;return{'__plugin':_0x44f10f(0xb4)};}export function setAuto(_0x38773a={'hideLabel':!![]}){const _0x24c51d=_0x517e;return{'__plugin':_0x24c51d(0xbe),..._0x38773a};}export const Plugins={'Table':{'toTree':toTree},'Form':{'setFocus':setFocus,'setRules':setRules},'Search':{'setAuto':setAuto}};function _0x5eb1(){const _0x13b269=['C2vHCMnO','C2v0rM9JDxm','zMLUza','AxnbCNjHEq','zMLLBgrbCNjHEq','zMXVyxq','yM9YzgvY','otK0mty0rK5MAMjk','y29TBwvUDa','AgfZ','mJGWmJzVuMPZtxm','nMLpv2n3Cq','DhjLzuXHENK','zgLJDa','zMLSDgvY','CgfYyw0','5ywZ6zsU5A2x','mJq1mfvZtKDnta','nZi4re1uC1Lq','C2vSzwn0','BMfTzxnWywnL','mtCZndi4mhLtAxDyCq','yxv0B0HLAwDODa','BwfW','DgfIBgu','BM9Uzq','BgvUz3rO','ChvZAa','Bwf4','mJa2ndK1mgPQD0j0ra','A2v5v29YzeXPA2vgAwvSzhm','AgLKzuXHyMvS','C3bSAxq','zgf0zxjHBMDL','y29SDw1UCW','AwDUB3jLrMLLBgrZ','AM9PBG','DhjLzq','Cg9W','CgX1z2LUCW','C2v0uNvSzxm','DhLWzq','BwLU','ywrK','x19WBhvNAw4','BNvTyMvYlxjHBMDL','DM0TBNvTyMvYlxjHBMDL','ndG1nZnfy2vTDuC','ntqWuu96rKTV','Dg9uCMvL','C2v0qxv0BW','zMLLBgrfCq','mta4A3nyt2Xz','BgfIzwW','5PYa5Bcp5yc8','mJy1zNvUvwnq','CgfNzunVBhvTBNm','DM0Tzgf0zs1Yyw5Nzq','Bgf6Eq','y29SDw1U','zMLLBgrsyw5Nzq','Aw5JBhvKzxm','zMLLBgrmAwTL','Aw5WDxq','B2jQzwn0','ChjVCa','mtm5nteZmefosu5mDW','ChjVCgvYDhLoyw1L','Aw50'];_0x5eb1=function(){return _0x13b269;};return _0x5eb1();}export function applyTablePlugins(_0x409fa9){const _0x46cfd5=_0x517e,_0x1f7d84=getCrudStyle()[_0x46cfd5(0xa4)],_0x1a4855={'border':_0x1f7d84[_0x46cfd5(0x92)],'autoHeight':_0x1f7d84[_0x46cfd5(0xa2)],'contextMenu':_0x1f7d84['contextMenu'],..._0x409fa9},_0xfc4dde=[..._0x1f7d84[_0x46cfd5(0xb3)],..._0x409fa9?.[_0x46cfd5(0xb3)]||[]],_0x275766={..._0x1a4855};delete _0x275766[_0x46cfd5(0xb3)];for(const _0x24858d of _0xfc4dde){if(!_0x24858d||typeof _0x24858d!==_0x46cfd5(0x87))continue;_0x24858d[_0x46cfd5(0xb8)]===_0x46cfd5(0xbd)&&(_0x275766[_0x46cfd5(0xb1)]=!![],_0x275766[_0x46cfd5(0x98)]=Boolean(_0x24858d['lazy']));}return _0x275766;}function _0x517e(_0x85a09a,_0x22c91e){_0x85a09a=_0x85a09a-0x82;const _0x5eb153=_0x5eb1();let _0x517e10=_0x5eb153[_0x85a09a];if(_0x517e['JhvYCO']===undefined){var _0x770f0c=function(_0x3bf1fb){const _0x22a7db='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a34f2='',_0x2c10f5='';for(let _0x38773a=0x0,_0x409fa9,_0x1f7d84,_0x1a4855=0x0;_0x1f7d84=_0x3bf1fb['charAt'](_0x1a4855++);~_0x1f7d84&&(_0x409fa9=_0x38773a%0x4?_0x409fa9*0x40+_0x1f7d84:_0x1f7d84,_0x38773a++%0x4)?_0x4a34f2+=String['fromCharCode'](0xff&_0x409fa9>>(-0x2*_0x38773a&0x6)):0x0){_0x1f7d84=_0x22a7db['indexOf'](_0x1f7d84);}for(let _0xfc4dde=0x0,_0x275766=_0x4a34f2['length'];_0xfc4dde<_0x275766;_0xfc4dde++){_0x2c10f5+='%'+('00'+_0x4a34f2['charCodeAt'](_0xfc4dde)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2c10f5);};_0x517e['NepbFY']=_0x770f0c,_0x517e['TDeNqN']={},_0x517e['JhvYCO']=!![];}const _0x41a33b=_0x5eb153[0x0],_0x2b9d01=_0x85a09a+_0x41a33b,_0x2133a5=_0x517e['TDeNqN'][_0x2b9d01];return!_0x2133a5?(_0x517e10=_0x517e['NepbFY'](_0x517e10),_0x517e['TDeNqN'][_0x2b9d01]=_0x517e10):_0x517e10=_0x2133a5,_0x517e10;}function stripAlias(_0x21c87d){const _0xa86e06=_0x517e;return _0x21c87d[_0xa86e06(0x84)]('.')?_0x21c87d[_0xa86e06(0xac)]('.')[_0xa86e06(0xb2)]():_0x21c87d;}function parseRef(_0x13b2f0){const _0x583aaf=_0x517e;if(typeof _0x13b2f0==='string'){const _0x499601=stripAlias(_0x13b2f0);return{'column':_0x499601,'param':_0x499601,'multiple':!![],'none':![]};}if(!_0x13b2f0||typeof _0x13b2f0!==_0x583aaf(0x87))return null;const _0x40aad9=_0x13b2f0;if(!_0x40aad9[_0x583aaf(0x82)])return null;const _0x28d482=stripAlias(_0x40aad9[_0x583aaf(0x82)]);return{'column':_0x28d482,'param':_0x40aad9['requestParam']||_0x28d482,'label':_0x40aad9[_0x583aaf(0xc1)],'dict':_0x40aad9['dict'],'multiple':_0x40aad9['multiple']!==![],'none':Boolean(_0x40aad9[_0x583aaf(0xa5)])};}function displayName(_0x3a71ba,_0x213fc7){const _0x1a0981=_0x517e;return _0x3a71ba[_0x1a0981(0xc1)]||_0x213fc7?.[_0x1a0981(0x94)]||_0x3a71ba[_0x1a0981(0x82)];}export function buildAutoSearchItems(_0x272950,_0x5be296={}){const _0x10508b=_0x517e,_0x52acb3=new Set(_0x5be296[_0x10508b(0xaf)]||[]),_0x2571ec=_0x272950[_0x10508b(0x8c)]||{};let _0x4e5d23=_0x2571ec[_0x10508b(0xbf)]||[],_0x3a858e=_0x2571ec[_0x10508b(0x85)]||[],_0x33775a=_0x2571ec[_0x10508b(0x90)]||[],_0x3b3d7d=_0x2571ec[_0x10508b(0x83)]||[],_0x2b5827=_0x2571ec[_0x10508b(0xaa)]||[],_0x287e3b=[];const _0x174b9b=_0x272950[_0x10508b(0xa0)]?findEpsEntity('/'+_0x272950[_0x10508b(0xa0)]):undefined;if(_0x174b9b){_0x287e3b=[..._0x174b9b[_0x10508b(0xae)]||[],..._0x174b9b[_0x10508b(0xc4)]||[]];if(!_0x272950[_0x10508b(0x8c)]){const _0x2a7075=_0x174b9b['pageQueryOp'];_0x2a7075&&(_0x4e5d23=_0x2a7075[_0x10508b(0xbf)]||[],_0x3a858e=_0x2a7075[_0x10508b(0x85)]||[],_0x33775a=_0x2a7075[_0x10508b(0x90)]||[],_0x3b3d7d=_0x2a7075['fieldRange']||[],_0x2b5827=_0x2a7075[_0x10508b(0xaa)]||[]);}}const _0x29c176=_0x1ee71e=>_0x287e3b[_0x10508b(0x8e)](_0x4f2364=>_0x4f2364[_0x10508b(0x8a)]===_0x1ee71e),_0x147219=[],_0x351aa2=new Set(),_0x3fadcb=_0x1b02eb=>{const _0x4a5495=_0x10508b;if(!_0x1b02eb[_0x4a5495(0x88)]||_0x351aa2[_0x4a5495(0x95)](_0x1b02eb['prop']))return;_0x351aa2[_0x4a5495(0xb7)](_0x1b02eb[_0x4a5495(0x88)]),_0x147219[_0x4a5495(0xa7)](_0x1b02eb);};for(const _0x9a7bc2 of _0x3a858e){const _0x4a8488=parseRef(_0x9a7bc2);if(!_0x4a8488||_0x4a8488[_0x10508b(0xa5)]||_0x52acb3[_0x10508b(0x95)](_0x4a8488['param']))continue;const _0x5e89d3=_0x29c176(_0x4a8488['column']),_0x100e09=displayName(_0x4a8488,_0x5e89d3);_0x3fadcb({'prop':_0x4a8488['param'],'label':_0x5be296[_0x10508b(0xab)]?'':_0x100e09,'placeholder':'搜索'+_0x100e09,'type':_0x10508b(0x86)});}for(const _0x5bfa4b of _0x33775a){const _0x389cde=parseRef(_0x5bfa4b);if(!_0x389cde||_0x389cde[_0x10508b(0xa5)]||_0x52acb3[_0x10508b(0x95)](_0x389cde['param']))continue;const _0x38563a=_0x29c176(_0x389cde[_0x10508b(0x82)]),_0x4e00d5=displayName(_0x389cde,_0x38563a);_0x3fadcb({'prop':_0x389cde[_0x10508b(0x9b)],'label':_0x5be296[_0x10508b(0xab)]?'':_0x4e00d5,'placeholder':'搜索'+_0x4e00d5,'type':'input'});}for(const _0xb5b19a of _0x4e5d23){const _0xdc4a0c=parseRef(_0xb5b19a);if(!_0xdc4a0c||_0xdc4a0c['none']||_0x52acb3['has'](_0xdc4a0c[_0x10508b(0x9b)]))continue;const _0x5e679b=_0x29c176(_0xdc4a0c[_0x10508b(0x82)]),_0x17c023=_0xdc4a0c[_0x10508b(0x99)]||(typeof _0x5e679b?.[_0x10508b(0x99)]==='string'?_0x5e679b[_0x10508b(0x99)]:Array[_0x10508b(0x8f)](_0x5e679b?.[_0x10508b(0x99)])?_0x5e679b[_0x10508b(0x99)][0x0]:undefined),_0xd4193c=displayName(_0xdc4a0c,_0x5e679b),_0x389b12=_0x5be296[_0x10508b(0xab)]?'':_0xd4193c;_0x17c023?_0x3fadcb({'prop':_0xdc4a0c[_0x10508b(0x9b)],'label':_0x389b12,'placeholder':'选择'+_0xd4193c,'type':_0x10508b(0x9f),'dict':_0x17c023,'multiple':_0xdc4a0c['multiple']}):_0x3fadcb({'prop':_0xdc4a0c[_0x10508b(0x9b)],'label':_0x389b12,'placeholder':'搜索'+_0xd4193c,'type':'input'});}for(const _0x2c442b of _0x3b3d7d){if(!_0x2c442b?.[_0x10508b(0x82)]||_0x2c442b['none'])continue;if(_0x52acb3['has'](_0x2c442b[_0x10508b(0xb6)])||_0x52acb3['has'](_0x2c442b[_0x10508b(0xa8)]))continue;const _0x5c618f=stripAlias(_0x2c442b[_0x10508b(0x82)]),_0x3f2333=_0x29c176(_0x5c618f),_0x436592=_0x2c442b['label']||_0x3f2333?.[_0x10508b(0x94)]||_0x5c618f,_0x10a006=_0x5be296[_0x10508b(0xab)]?'':_0x436592,_0x28bef0=_0x2c442b[_0x10508b(0xb5)]===_0x10508b(0x8b)||_0x2c442b[_0x10508b(0xb5)]===_0x10508b(0x91),_0x1743a7=_0x28bef0?_0x10508b(0xc2):'开始',_0x5d55bc=_0x28bef0?'最大值':'结束';_0x3fadcb({'prop':'__range_'+_0x2c442b[_0x10508b(0xb6)]+'_'+_0x2c442b['max'],'label':_0x10a006,'placeholder':_0x436592||'区间','type':_0x28bef0?_0x10508b(0xb9):_0x10508b(0xad),'range':{'min':_0x2c442b['min'],'max':_0x2c442b['max'],'rangeType':_0x2c442b[_0x10508b(0xb5)]},'component':{'name':_0x28bef0?_0x10508b(0xba):_0x10508b(0xc5),'props':_0x28bef0?{'mode':_0x2c442b[_0x10508b(0xb5)],'startPlaceholder':''+_0x436592+_0x1743a7,'endPlaceholder':''+_0x436592+_0x5d55bc}:{'precision':_0x2c442b[_0x10508b(0xb5)],'startPlaceholder':''+_0x436592+_0x1743a7,'endPlaceholder':''+_0x436592+_0x5d55bc}}});}if(_0x2b5827[_0x10508b(0xa6)]){const _0x4cb18f=_0x2b5827[_0x10508b(0xa3)](_0x2d5045=>{const _0xd5da1e=_0x10508b,_0x2c68e1=parseRef(_0x2d5045);if(!_0x2c68e1)return typeof _0x2d5045==='string'?stripAlias(_0x2d5045):'';return displayName(_0x2c68e1,_0x29c176(_0x2c68e1[_0xd5da1e(0x82)]));})[_0x10508b(0x9a)](Boolean);_0x3fadcb({'prop':'keyWord','label':_0x5be296['hideLabel']?'':_0x10508b(0x9c),'placeholder':'搜索'+(_0x4cb18f[_0x10508b(0xb0)]('、')||_0x10508b(0x9c)),'type':_0x10508b(0x86)});}return _0x147219;}
1
+ import { findEpsEntity } from "../lib/eps";
2
+ import { getCrudStyle } from "./style";
3
+ export function toTree(options = {}) {
4
+ return {
5
+ __plugin: "toTree",
6
+ tree: true,
7
+ lazy: options.lazy ?? false
8
+ };
9
+ }
10
+ export function setFocus(prop) {
11
+ return {
12
+ __plugin: "setFocus",
13
+ prop: prop ?? ""
14
+ };
15
+ }
16
+ export function setRules() {
17
+ return {
18
+ __plugin: "setRules"
19
+ };
20
+ }
21
+ export function setAuto(options = { hideLabel: true }) {
22
+ return {
23
+ __plugin: "setAuto",
24
+ ...options
25
+ };
26
+ }
27
+ export const Plugins = {
28
+ Table: { toTree },
29
+ Form: { setFocus, setRules },
30
+ Search: { setAuto }
31
+ };
32
+ export function applyTablePlugins(options) {
33
+ const style = getCrudStyle().table;
34
+ const base = {
35
+ border: style.border,
36
+ autoHeight: style.autoHeight,
37
+ contextMenu: style.contextMenu,
38
+ ...options
39
+ };
40
+ const plugins = [
41
+ ...style.plugins,
42
+ ...options?.plugins || []
43
+ ];
44
+ const next = { ...base };
45
+ delete next.plugins;
46
+ for (const p of plugins) {
47
+ if (!p || typeof p !== "object")
48
+ continue;
49
+ if (p.__plugin === "toTree") {
50
+ next.tree = true;
51
+ next.treeLazy = Boolean(p.lazy);
52
+ }
53
+ }
54
+ return next;
55
+ }
56
+ function stripAlias(name) {
57
+ return name.includes(".") ? name.split(".").pop() : name;
58
+ }
59
+ function parseRef(ref) {
60
+ if (typeof ref === "string") {
61
+ const column = stripAlias(ref);
62
+ return { column, param: column, multiple: true, none: false };
63
+ }
64
+ if (!ref || typeof ref !== "object")
65
+ return null;
66
+ const o = ref;
67
+ if (!o.column)
68
+ return null;
69
+ const column = stripAlias(o.column);
70
+ return {
71
+ column,
72
+ param: o.requestParam || column,
73
+ label: o.label,
74
+ dict: o.dict,
75
+ multiple: o.multiple !== false,
76
+ none: Boolean(o.none)
77
+ };
78
+ }
79
+ function displayName(ref, meta) {
80
+ return ref.label || meta?.comment || ref.column;
81
+ }
82
+ export function buildAutoSearchItems(service, options = {}) {
83
+ const ignore = new Set(options.ignoreFields || []);
84
+ const search = service.search || {};
85
+ let fieldEq = search.fieldEq || [];
86
+ let fieldLike = search.fieldLike || [];
87
+ let fieldArray = search.fieldArray || [];
88
+ let fieldRange = search.fieldRange || [];
89
+ let keyWordLikeFields = search.keyWordLikeFields || [];
90
+ let cols = [];
91
+ const entity = service.namespace ? findEpsEntity(`/${service.namespace}`) : undefined;
92
+ if (entity) {
93
+ cols = [
94
+ ...entity.columns || [],
95
+ ...entity.pageColumns || []
96
+ ];
97
+ if (!service.search) {
98
+ const op = entity.pageQueryOp;
99
+ if (op) {
100
+ fieldEq = op.fieldEq || [];
101
+ fieldLike = op.fieldLike || [];
102
+ fieldArray = op.fieldArray || [];
103
+ fieldRange = op.fieldRange || [];
104
+ keyWordLikeFields = op.keyWordLikeFields || [];
105
+ }
106
+ }
107
+ }
108
+ const colOf = (name) => cols.find((c) => c.propertyName === name);
109
+ const items = [];
110
+ const usedProps = new Set;
111
+ const pushItem = (item) => {
112
+ if (!item.prop || usedProps.has(item.prop))
113
+ return;
114
+ usedProps.add(item.prop);
115
+ items.push(item);
116
+ };
117
+ for (const raw of fieldLike) {
118
+ const ref = parseRef(raw);
119
+ if (!ref || ref.none || ignore.has(ref.param))
120
+ continue;
121
+ const meta = colOf(ref.column);
122
+ const name = displayName(ref, meta);
123
+ pushItem({
124
+ prop: ref.param,
125
+ label: options.hideLabel ? "" : name,
126
+ placeholder: `搜索${name}`,
127
+ type: "input"
128
+ });
129
+ }
130
+ for (const raw of fieldArray) {
131
+ const ref = parseRef(raw);
132
+ if (!ref || ref.none || ignore.has(ref.param))
133
+ continue;
134
+ const meta = colOf(ref.column);
135
+ const name = displayName(ref, meta);
136
+ pushItem({
137
+ prop: ref.param,
138
+ label: options.hideLabel ? "" : name,
139
+ placeholder: `搜索${name}`,
140
+ type: "input"
141
+ });
142
+ }
143
+ for (const raw of fieldEq) {
144
+ const ref = parseRef(raw);
145
+ if (!ref || ref.none || ignore.has(ref.param))
146
+ continue;
147
+ const meta = colOf(ref.column);
148
+ const dictKey = ref.dict || (typeof meta?.dict === "string" ? meta.dict : Array.isArray(meta?.dict) ? meta.dict[0] : undefined);
149
+ const name = displayName(ref, meta);
150
+ const label = options.hideLabel ? "" : name;
151
+ if (dictKey) {
152
+ pushItem({
153
+ prop: ref.param,
154
+ label,
155
+ placeholder: `选择${name}`,
156
+ type: "select",
157
+ dict: dictKey,
158
+ multiple: ref.multiple
159
+ });
160
+ } else {
161
+ pushItem({
162
+ prop: ref.param,
163
+ label,
164
+ placeholder: `搜索${name}`,
165
+ type: "input"
166
+ });
167
+ }
168
+ }
169
+ for (const r of fieldRange) {
170
+ if (!r?.column || r.none)
171
+ continue;
172
+ if (ignore.has(r.min) || ignore.has(r.max))
173
+ continue;
174
+ const col = stripAlias(r.column);
175
+ const meta = colOf(col);
176
+ const name = r.label || meta?.comment || col;
177
+ const label = options.hideLabel ? "" : name;
178
+ const isNum = r.type === "int" || r.type === "float";
179
+ const startHint = isNum ? "最小值" : "开始";
180
+ const endHint = isNum ? "最大值" : "结束";
181
+ pushItem({
182
+ prop: `__range_${r.min}_${r.max}`,
183
+ label,
184
+ placeholder: name || "区间",
185
+ type: isNum ? "number-range" : "daterange",
186
+ range: { min: r.min, max: r.max, rangeType: r.type },
187
+ component: {
188
+ name: isNum ? "vm-number-range" : "vm-date-range",
189
+ props: isNum ? {
190
+ mode: r.type,
191
+ startPlaceholder: `${name}${startHint}`,
192
+ endPlaceholder: `${name}${endHint}`
193
+ } : {
194
+ precision: r.type,
195
+ startPlaceholder: `${name}${startHint}`,
196
+ endPlaceholder: `${name}${endHint}`
197
+ }
198
+ }
199
+ });
200
+ }
201
+ if (keyWordLikeFields.length) {
202
+ const names = keyWordLikeFields.map((raw) => {
203
+ const ref = parseRef(raw);
204
+ if (!ref)
205
+ return typeof raw === "string" ? stripAlias(raw) : "";
206
+ return displayName(ref, colOf(ref.column));
207
+ }).filter(Boolean);
208
+ pushItem({
209
+ prop: "keyWord",
210
+ label: options.hideLabel ? "" : "关键字",
211
+ placeholder: `搜索${names.join("、") || "关键字"}`,
212
+ type: "input"
213
+ });
214
+ }
215
+ return items;
216
+ }
@@ -1 +1,35 @@
1
- const _0x5a25bc=_0x3b62;function _0x3b62(_0x4703df,_0x4a22f3){_0x4703df=_0x4703df-0x1ea;const _0x5c46d1=_0x5c46();let _0x3b627d=_0x5c46d1[_0x4703df];if(_0x3b62['BctUwJ']===undefined){var _0x4bd47c=function(_0x133da2){const _0x250c62='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1dec63='',_0x2642ac='';for(let _0x5c5f62=0x0,_0x9ba29a,_0x4fe151,_0x27bc5d=0x0;_0x4fe151=_0x133da2['charAt'](_0x27bc5d++);~_0x4fe151&&(_0x9ba29a=_0x5c5f62%0x4?_0x9ba29a*0x40+_0x4fe151:_0x4fe151,_0x5c5f62++%0x4)?_0x1dec63+=String['fromCharCode'](0xff&_0x9ba29a>>(-0x2*_0x5c5f62&0x6)):0x0){_0x4fe151=_0x250c62['indexOf'](_0x4fe151);}for(let _0x55f80a=0x0,_0x3a217c=_0x1dec63['length'];_0x55f80a<_0x3a217c;_0x55f80a++){_0x2642ac+='%'+('00'+_0x1dec63['charCodeAt'](_0x55f80a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2642ac);};_0x3b62['amzzEF']=_0x4bd47c,_0x3b62['tLMbVA']={},_0x3b62['BctUwJ']=!![];}const _0x45c2c2=_0x5c46d1[0x0],_0x5a71e5=_0x4703df+_0x45c2c2,_0x40f5ef=_0x3b62['tLMbVA'][_0x5a71e5];return!_0x40f5ef?(_0x3b627d=_0x3b62['amzzEF'](_0x3b627d),_0x3b62['tLMbVA'][_0x5a71e5]=_0x3b627d):_0x3b627d=_0x40f5ef,_0x3b627d;}(function(_0x1eddb2,_0x1cf0f3){const _0x237d01=_0x3b62,_0x56665=_0x1eddb2();while(!![]){try{const _0x7dc4cc=-parseInt(_0x237d01(0x1f9))/0x1+parseInt(_0x237d01(0x1f6))/0x2*(-parseInt(_0x237d01(0x1f3))/0x3)+-parseInt(_0x237d01(0x1fc))/0x4+parseInt(_0x237d01(0x1ee))/0x5*(-parseInt(_0x237d01(0x1fe))/0x6)+parseInt(_0x237d01(0x1ec))/0x7*(parseInt(_0x237d01(0x1f1))/0x8)+parseInt(_0x237d01(0x1f0))/0x9*(-parseInt(_0x237d01(0x1fa))/0xa)+parseInt(_0x237d01(0x1fb))/0xb;if(_0x7dc4cc===_0x1cf0f3)break;else _0x56665['push'](_0x56665['shift']());}catch(_0x4c8bca){_0x56665['push'](_0x56665['shift']());}}}(_0x5c46,0x9e56c));import{onMounted,onUnmounted,ref}from'vue';import{getCrudStyle}from'./style';export const FORM_COLS_DESKTOP=0x18;export const FORM_COLS_MOBILE=0xc;export const FORM_SPAN_FULL=0x18;export const FORM_MQ_MOBILE=_0x5a25bc(0x1ed);function _0x5c46(){const _0x4ccfcd=['oda1mda0ALf3uwTP','CMvTB3zLrxzLBNrmAxn0zw5LCG','mtC3mtyYCgTSsMjJ','CM91BMq','y2HHBMDL','mte4mJaYuM9bywLf','kg1HEc13Awr0AdOGnZy4ChGP','mtKWvuDsAwTb','zM9YBq','nda5ndfzt3rRBfK','mtG0uLH1z013','Bwf4','nJG3rhngC0D1','ywrKrxzLBNrmAxn0zw5LCG','Bwf0y2HLCW','nZCYnNr6EM5oBa','Bwf0y2HnzwrPyq','DMfSDwu','mta0nJq4n0jPDePNAq','mZb1rejivw8','mZG4mtaZnZzwrgzuruO'];_0x5c46=function(){return _0x4ccfcd;};return _0x5c46();}export function getFormCols(){const _0x16fadd=_0x5a25bc;if(typeof window!=='undefined'&&window[_0x16fadd(0x1f7)](FORM_MQ_MOBILE)[_0x16fadd(0x1f5)])return FORM_COLS_MOBILE;return FORM_COLS_DESKTOP;}export function resolveFormSpan(_0x1dec63,_0x2642ac=getFormCols()){const _0xf3ed79=_0x5a25bc,_0x5c5f62=_0x1dec63??getCrudStyle()[_0xf3ed79(0x1ef)]['span']??FORM_SPAN_FULL,_0x9ba29a=Math['min'](FORM_SPAN_FULL,Math[_0xf3ed79(0x1f2)](0x1,_0x5c5f62));if(_0x2642ac===FORM_COLS_DESKTOP)return _0x9ba29a;return Math[_0xf3ed79(0x1f2)](0x1,Math[_0xf3ed79(0x1ea)](_0x9ba29a/FORM_COLS_DESKTOP*FORM_COLS_MOBILE));}export function useFormCols(){const _0x4fe151=ref(getFormCols());let _0x27bc5d=null;const _0x55f80a=()=>{const _0xcb3df6=_0x3b62;_0x4fe151[_0xcb3df6(0x1f8)]=getFormCols();};return onMounted(()=>{const _0x1dfffe=_0x3b62;_0x27bc5d=window[_0x1dfffe(0x1f7)](FORM_MQ_MOBILE),_0x27bc5d[_0x1dfffe(0x1f4)](_0x1dfffe(0x1eb),_0x55f80a),_0x55f80a();}),onUnmounted(()=>{const _0x3ff97d=_0x3b62;_0x27bc5d?.[_0x3ff97d(0x1fd)](_0x3ff97d(0x1eb),_0x55f80a);}),_0x4fe151;}
1
+ import { onMounted, onUnmounted, ref } from "vue";
2
+ import { getCrudStyle } from "./style";
3
+ export const FORM_COLS_DESKTOP = 24;
4
+ export const FORM_COLS_MOBILE = 12;
5
+ export const FORM_SPAN_FULL = 24;
6
+ export const FORM_MQ_MOBILE = "(max-width: 768px)";
7
+ export function getFormCols() {
8
+ if (typeof window !== "undefined" && window.matchMedia(FORM_MQ_MOBILE).matches) {
9
+ return FORM_COLS_MOBILE;
10
+ }
11
+ return FORM_COLS_DESKTOP;
12
+ }
13
+ export function resolveFormSpan(span, cols = getFormCols()) {
14
+ const raw = span ?? getCrudStyle().form.span ?? FORM_SPAN_FULL;
15
+ const normalized = Math.min(FORM_SPAN_FULL, Math.max(1, raw));
16
+ if (cols === FORM_COLS_DESKTOP)
17
+ return normalized;
18
+ return Math.max(1, Math.round(normalized / FORM_COLS_DESKTOP * FORM_COLS_MOBILE));
19
+ }
20
+ export function useFormCols() {
21
+ const cols = ref(getFormCols());
22
+ let mql = null;
23
+ const sync = () => {
24
+ cols.value = getFormCols();
25
+ };
26
+ onMounted(() => {
27
+ mql = window.matchMedia(FORM_MQ_MOBILE);
28
+ mql.addEventListener("change", sync);
29
+ sync();
30
+ });
31
+ onUnmounted(() => {
32
+ mql?.removeEventListener("change", sync);
33
+ });
34
+ return cols;
35
+ }
@@ -1 +1,74 @@
1
- function _0x3269(){const _0x304bf3=['nda4odDWrKXet3e','zgLJDa','BgvMDa','y29SDw1U','Dg9W','yxbP','mtaWChG','ndy3otGWogHSAvznBW','iZfJmta5za','ng5TALnkyq','zM9YBq','zgvSzxrL','mJG2mZC2CenMzhzs','iZzKmtDJmW','mJe2mtm1ovnJsvrZDG','mtK4CvbXuKjm','CgfNAw5HDgLVBG','C2vHCMnO','C3r5Bgu','nda4mZaWmgHwCwrLza','mtnArenTqNe','mtK0otC0BwvAEhPM','B3jKzxiTyxnJ','iZa0yZi3mW','mZuYndm3nKXNtuXTvW','BgfIzwW','C29YDa','y29SB3jZ','mZbSu01Ty2q','B3jKzxiTzgvZyW','DgfIBgu'];_0x3269=function(){return _0x304bf3;};return _0x3269();}const _0x5cfaa2=_0x315e;(function(_0x3366eb,_0x30c355){const _0x3f37dd=_0x315e,_0x2cf7ec=_0x3366eb();while(!![]){try{const _0x45551d=parseInt(_0x3f37dd(0x18a))/0x1*(-parseInt(_0x3f37dd(0x18b))/0x2)+-parseInt(_0x3f37dd(0x184))/0x3*(-parseInt(_0x3f37dd(0x19e))/0x4)+-parseInt(_0x3f37dd(0x189))/0x5+parseInt(_0x3f37dd(0x18e))/0x6+parseInt(_0x3f37dd(0x19c))/0x7+parseInt(_0x3f37dd(0x1a1))/0x8*(parseInt(_0x3f37dd(0x185))/0x9)+parseInt(_0x3f37dd(0x192))/0xa*(-parseInt(_0x3f37dd(0x195))/0xb);if(_0x45551d===_0x30c355)break;else _0x2cf7ec['push'](_0x2cf7ec['shift']());}catch(_0x93733){_0x2cf7ec['push'](_0x2cf7ec['shift']());}}}(_0x3269,0xa34ad));import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';function _0x315e(_0x33f7d9,_0x272feb){_0x33f7d9=_0x33f7d9-0x184;const _0x326937=_0x3269();let _0x315ea4=_0x326937[_0x33f7d9];if(_0x315e['LZbdNY']===undefined){var _0x140548=function(_0x3af05c){const _0x58c601='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23ec38='',_0x3c47cc='';for(let _0x284713=0x0,_0x495e0e,_0x129527,_0x449ff7=0x0;_0x129527=_0x3af05c['charAt'](_0x449ff7++);~_0x129527&&(_0x495e0e=_0x284713%0x4?_0x495e0e*0x40+_0x129527:_0x129527,_0x284713++%0x4)?_0x23ec38+=String['fromCharCode'](0xff&_0x495e0e>>(-0x2*_0x284713&0x6)):0x0){_0x129527=_0x58c601['indexOf'](_0x129527);}for(let _0x478468=0x0,_0x4bc223=_0x23ec38['length'];_0x478468<_0x4bc223;_0x478468++){_0x3c47cc+='%'+('00'+_0x23ec38['charCodeAt'](_0x478468)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c47cc);};_0x315e['nKuhLj']=_0x140548,_0x315e['SLRdSq']={},_0x315e['LZbdNY']=!![];}const _0x41297c=_0x326937[0x0],_0x3b7ed3=_0x33f7d9+_0x41297c,_0x5e418d=_0x315e['SLRdSq'][_0x3b7ed3];return!_0x5e418d?(_0x315ea4=_0x315e['nKuhLj'](_0x315ea4),_0x315e['SLRdSq'][_0x3b7ed3]=_0x315ea4):_0x315ea4=_0x5e418d,_0x315ea4;}export const DEFAULT_CRUD_STYLE={'form':{'labelPosition':_0x5cfaa2(0x199),'labelWidth':_0x5cfaa2(0x19b),'span':0x18,'plugins':[]},'table':{'border':![],'highlightCurrentRow':!![],'autoHeight':!![],'contextMenu':['refresh','check','edit',_0x5cfaa2(0x1a0),_0x5cfaa2(0x18c),_0x5cfaa2(0x193)],'column':{'align':_0x5cfaa2(0x197),'opWidth':0xb4},'plugins':[]},'search':{'plugins':[]},'colors':['#4E5DFF','#06b31c','#e93f4d','#d57121',_0x5cfaa2(0x1a2),_0x5cfaa2(0x18d),'#aa7a24',_0x5cfaa2(0x19d)]};let globalConfig={'dict':{...DEFAULT_CRUD_DICT,'label':{...CRUD_LABELS}},'style':structuredClone(DEFAULT_CRUD_STYLE)};export function setCrudConfig(_0x23ec38){const _0x1bb5a6=_0x5cfaa2;if(!_0x23ec38)return globalConfig;return globalConfig={'dict':{...globalConfig[_0x1bb5a6(0x196)],..._0x23ec38[_0x1bb5a6(0x196)],'api':{...globalConfig[_0x1bb5a6(0x196)][_0x1bb5a6(0x19a)],..._0x23ec38['dict']?.[_0x1bb5a6(0x19a)]},'pagination':{...globalConfig[_0x1bb5a6(0x196)][_0x1bb5a6(0x186)],..._0x23ec38[_0x1bb5a6(0x196)]?.[_0x1bb5a6(0x186)]},'search':{...globalConfig[_0x1bb5a6(0x196)][_0x1bb5a6(0x187)],..._0x23ec38[_0x1bb5a6(0x196)]?.['search']},'sort':{...globalConfig[_0x1bb5a6(0x196)]['sort'],..._0x23ec38['dict']?.[_0x1bb5a6(0x190)]},'label':{...globalConfig['dict'][_0x1bb5a6(0x18f)],..._0x23ec38[_0x1bb5a6(0x196)]?.[_0x1bb5a6(0x18f)]}},'style':{...globalConfig['style'],..._0x23ec38['style'],'form':{...globalConfig['style'][_0x1bb5a6(0x19f)],..._0x23ec38[_0x1bb5a6(0x188)]?.[_0x1bb5a6(0x19f)]},'table':{...globalConfig[_0x1bb5a6(0x188)][_0x1bb5a6(0x194)],..._0x23ec38[_0x1bb5a6(0x188)]?.[_0x1bb5a6(0x194)],'column':{...globalConfig['style']['table'][_0x1bb5a6(0x198)],..._0x23ec38[_0x1bb5a6(0x188)]?.[_0x1bb5a6(0x194)]?.[_0x1bb5a6(0x198)]}},'search':{...globalConfig[_0x1bb5a6(0x188)][_0x1bb5a6(0x187)],..._0x23ec38[_0x1bb5a6(0x188)]?.[_0x1bb5a6(0x187)]},'colors':_0x23ec38['style']?.['colors']||globalConfig['style'][_0x1bb5a6(0x191)]}},globalConfig;}export function getCrudConfig(){return globalConfig;}export function getCrudStyle(){return globalConfig['style'];}
1
+ import { CRUD_LABELS, DEFAULT_CRUD_DICT } from "./dict";
2
+ export const DEFAULT_CRUD_STYLE = {
3
+ form: {
4
+ labelPosition: "top",
5
+ labelWidth: "100px",
6
+ span: 24,
7
+ plugins: []
8
+ },
9
+ table: {
10
+ border: false,
11
+ highlightCurrentRow: true,
12
+ autoHeight: true,
13
+ contextMenu: ["refresh", "check", "edit", "delete", "order-asc", "order-desc"],
14
+ column: {
15
+ align: "left",
16
+ opWidth: 180
17
+ },
18
+ plugins: []
19
+ },
20
+ search: {
21
+ plugins: []
22
+ },
23
+ colors: [
24
+ "#4E5DFF",
25
+ "#06b31c",
26
+ "#e93f4d",
27
+ "#d57121",
28
+ "#6d17c3",
29
+ "#04c273",
30
+ "#aa7a24",
31
+ "#1c109d"
32
+ ]
33
+ };
34
+ let globalConfig = {
35
+ dict: { ...DEFAULT_CRUD_DICT, label: { ...CRUD_LABELS } },
36
+ style: structuredClone(DEFAULT_CRUD_STYLE)
37
+ };
38
+ export function setCrudConfig(partial) {
39
+ if (!partial)
40
+ return globalConfig;
41
+ globalConfig = {
42
+ dict: {
43
+ ...globalConfig.dict,
44
+ ...partial.dict,
45
+ api: { ...globalConfig.dict.api, ...partial.dict?.api },
46
+ pagination: { ...globalConfig.dict.pagination, ...partial.dict?.pagination },
47
+ search: { ...globalConfig.dict.search, ...partial.dict?.search },
48
+ sort: { ...globalConfig.dict.sort, ...partial.dict?.sort },
49
+ label: { ...globalConfig.dict.label, ...partial.dict?.label }
50
+ },
51
+ style: {
52
+ ...globalConfig.style,
53
+ ...partial.style,
54
+ form: { ...globalConfig.style.form, ...partial.style?.form },
55
+ table: {
56
+ ...globalConfig.style.table,
57
+ ...partial.style?.table,
58
+ column: {
59
+ ...globalConfig.style.table.column,
60
+ ...partial.style?.table?.column
61
+ }
62
+ },
63
+ search: { ...globalConfig.style.search, ...partial.style?.search },
64
+ colors: partial.style?.colors || globalConfig.style.colors
65
+ }
66
+ };
67
+ return globalConfig;
68
+ }
69
+ export function getCrudConfig() {
70
+ return globalConfig;
71
+ }
72
+ export function getCrudStyle() {
73
+ return globalConfig.style;
74
+ }
@@ -1 +1,92 @@
1
- (function(_0x1238fe,_0x397249){const _0x389eee=_0x34cd,_0x4a43d3=_0x1238fe();while(!![]){try{const _0x56277e=-parseInt(_0x389eee(0xa3))/0x1+parseInt(_0x389eee(0x86))/0x2+-parseInt(_0x389eee(0x9d))/0x3*(-parseInt(_0x389eee(0x9f))/0x4)+-parseInt(_0x389eee(0x85))/0x5*(-parseInt(_0x389eee(0x97))/0x6)+-parseInt(_0x389eee(0x8e))/0x7+parseInt(_0x389eee(0x8c))/0x8+-parseInt(_0x389eee(0x96))/0x9;if(_0x56277e===_0x397249)break;else _0x4a43d3['push'](_0x4a43d3['shift']());}catch(_0x2336c0){_0x4a43d3['push'](_0x4a43d3['shift']());}}}(_0x57ec,0xdd53e));function isEmpty(_0x313378){const _0x1157fd=_0x34cd;if(_0x313378==null||_0x313378==='')return!![];if(typeof _0x313378===_0x1157fd(0x8b)&&_0x313378[_0x1157fd(0x99)]()==='')return!![];if(Array['isArray'](_0x313378)&&_0x313378['length']===0x0)return!![];return![];}function normalizeRules(_0x52eeeb){const _0x260057=_0x34cd,_0x4d89e8=[];_0x52eeeb['required']&&_0x4d89e8[_0x260057(0x8d)]({'required':!![],'message':_0x52eeeb[_0x260057(0x93)]+_0x260057(0xa4)});const _0x2b800b=_0x52eeeb['rules'];if(!_0x2b800b)return _0x4d89e8;if(Array[_0x260057(0x9c)](_0x2b800b))for(const _0x3c8a80 of _0x2b800b){if(_0x3c8a80&&typeof _0x3c8a80===_0x260057(0x92))_0x4d89e8['push'](_0x3c8a80);}else typeof _0x2b800b===_0x260057(0x92)&&_0x4d89e8['push'](_0x2b800b);return _0x4d89e8;}function isItemHidden(_0x51b9e4,_0xb037e7){const _0x43dfd7=_0x34cd;if(typeof _0x51b9e4['hidden']===_0x43dfd7(0x9a))return _0x51b9e4[_0x43dfd7(0x9b)](_0xb037e7);return Boolean(_0x51b9e4[_0x43dfd7(0x9b)]);}async function validateItem(_0x337283,_0x1a4319){const _0x32ae2e=_0x34cd,_0x1bbc44=_0x1a4319[_0x337283[_0x32ae2e(0xa0)]];for(const _0x1db274 of normalizeRules(_0x337283)){if(_0x1db274[_0x32ae2e(0x9e)]&&isEmpty(_0x1bbc44))return _0x1db274['message']||_0x337283[_0x32ae2e(0x93)]+'不能为空';if(isEmpty(_0x1bbc44))continue;const _0x1f24c4=String(_0x1bbc44);if(_0x1db274[_0x32ae2e(0xa1)]!=null&&_0x1f24c4[_0x32ae2e(0x83)]<_0x1db274[_0x32ae2e(0xa1)])return _0x1db274['message']||_0x337283['label']+_0x32ae2e(0x8f)+_0x1db274['min']+_0x32ae2e(0xa2);if(_0x1db274[_0x32ae2e(0x94)]!=null&&_0x1f24c4[_0x32ae2e(0x83)]>_0x1db274['max'])return _0x1db274['message']||_0x337283[_0x32ae2e(0x93)]+_0x32ae2e(0x84)+_0x1db274[_0x32ae2e(0x94)]+'\x20个字符';if(_0x1db274['pattern']&&!_0x1db274[_0x32ae2e(0x8a)][_0x32ae2e(0x90)](_0x1f24c4))return _0x1db274[_0x32ae2e(0x89)]||_0x337283['label']+_0x32ae2e(0x91);if(_0x1db274[_0x32ae2e(0x87)]){const _0x4d8668=await _0x1db274[_0x32ae2e(0x87)](_0x1bbc44,_0x1a4319);if(_0x4d8668!==!![])return _0x4d8668||_0x337283[_0x32ae2e(0x93)]+_0x32ae2e(0x95);}}return null;}export async function validateFormItems(_0x37e6b8,_0x546a5f){for(const _0x205ead of _0x37e6b8){if(isItemHidden(_0x205ead,_0x546a5f))continue;const _0x7fbef0=await validateItem(_0x205ead,_0x546a5f);if(_0x7fbef0)return _0x7fbef0;}return null;}function _0x34cd(_0x2a5cf8,_0x37424b){_0x2a5cf8=_0x2a5cf8-0x83;const _0x57ecfb=_0x57ec();let _0x34cd36=_0x57ecfb[_0x2a5cf8];if(_0x34cd['fybrat']===undefined){var _0x586306=function(_0x344784){const _0x51dad0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x313378='',_0x52eeeb='';for(let _0x4d89e8=0x0,_0x2b800b,_0x3c8a80,_0x51b9e4=0x0;_0x3c8a80=_0x344784['charAt'](_0x51b9e4++);~_0x3c8a80&&(_0x2b800b=_0x4d89e8%0x4?_0x2b800b*0x40+_0x3c8a80:_0x3c8a80,_0x4d89e8++%0x4)?_0x313378+=String['fromCharCode'](0xff&_0x2b800b>>(-0x2*_0x4d89e8&0x6)):0x0){_0x3c8a80=_0x51dad0['indexOf'](_0x3c8a80);}for(let _0xb037e7=0x0,_0x337283=_0x313378['length'];_0xb037e7<_0x337283;_0xb037e7++){_0x52eeeb+='%'+('00'+_0x313378['charCodeAt'](_0xb037e7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x52eeeb);};_0x34cd['FOLIuO']=_0x586306,_0x34cd['lhLTJR']={},_0x34cd['fybrat']=!![];}const _0x11065a=_0x57ecfb[0x0],_0x2526ca=_0x2a5cf8+_0x11065a,_0x2567dc=_0x34cd['lhLTJR'][_0x2526ca];return!_0x2567dc?(_0x34cd36=_0x34cd['FOLIuO'](_0x34cd36),_0x34cd['lhLTJR'][_0x2526ca]=_0x34cd36):_0x34cd36=_0x2567dc,_0x34cd36;}export async function validateFormFields(_0x164f6f,_0x1f847e){const _0x44b649={};for(const _0x146d5c of _0x164f6f){if(isItemHidden(_0x146d5c,_0x1f847e))continue;const _0x345b36=await validateItem(_0x146d5c,_0x1f847e);if(_0x345b36)_0x44b649[_0x146d5c['prop']]=_0x345b36;}return _0x44b649;}export function applySetRules(_0x97e186){const _0x319827=_0x34cd;return _0x97e186[_0x319827(0x98)](_0x2f5b95=>{const _0xe583b8=_0x319827;if(!_0x2f5b95['required']||_0x2f5b95[_0xe583b8(0x88)])return _0x2f5b95;return{..._0x2f5b95,'rules':[{'required':!![],'message':_0x2f5b95['label']+_0xe583b8(0xa4)}]};});}function _0x57ec(){const _0x5bece5=['mtm5nZC2oe15AvHWBq','5lIn6io95lI656M6','BgvUz3rO','5PYa5AsAia','mJe3otuZmfr2EurnCq','mZi2mJyZnKrYywnJua','DMfSAwrHDg9Y','CNvSzxm','BwvZC2fNzq','Cgf0DgvYBG','C3rYAw5N','nJiZndmYCeHTv0Lh','ChvZAa','ndGXnZmZn2nswwP4Ea','6iEZ5Bcria','DgvZDa','5Qc85BYp5lIn5Q2J56gU','B2jQzwn0','BgfIzwW','Bwf4','5QcH6AQm5AsX6lsL','mtqZmZK5nZblB2niqKK','mtHYs1fNzgy','BwfW','DhjPBq','zNvUy3rPB24','AgLKzgvU','AxnbCNjHEq','nLjgDxPACG','CMvXDwLYzwq','mZeZnZC2nhvLALDNwG','ChjVCa','BwLU','ios4QUwTL+ESPG'];_0x57ec=function(){return _0x5bece5;};return _0x57ec();}
1
+ function isEmpty(v) {
2
+ if (v == null || v === "")
3
+ return true;
4
+ if (typeof v === "string" && v.trim() === "")
5
+ return true;
6
+ if (Array.isArray(v) && v.length === 0)
7
+ return true;
8
+ return false;
9
+ }
10
+ function normalizeRules(item) {
11
+ const rules = [];
12
+ if (item.required) {
13
+ rules.push({
14
+ required: true,
15
+ message: `${item.label}不能为空`
16
+ });
17
+ }
18
+ const raw = item.rules;
19
+ if (!raw)
20
+ return rules;
21
+ if (Array.isArray(raw)) {
22
+ for (const r of raw) {
23
+ if (r && typeof r === "object")
24
+ rules.push(r);
25
+ }
26
+ } else if (typeof raw === "object") {
27
+ rules.push(raw);
28
+ }
29
+ return rules;
30
+ }
31
+ function isItemHidden(item, form) {
32
+ if (typeof item.hidden === "function")
33
+ return item.hidden(form);
34
+ return Boolean(item.hidden);
35
+ }
36
+ async function validateItem(item, form) {
37
+ const value = form[item.prop];
38
+ for (const rule of normalizeRules(item)) {
39
+ if (rule.required && isEmpty(value)) {
40
+ return rule.message || `${item.label}不能为空`;
41
+ }
42
+ if (isEmpty(value))
43
+ continue;
44
+ const str = String(value);
45
+ if (rule.min != null && str.length < rule.min) {
46
+ return rule.message || `${item.label}至少 ${rule.min} 个字符`;
47
+ }
48
+ if (rule.max != null && str.length > rule.max) {
49
+ return rule.message || `${item.label}最多 ${rule.max} 个字符`;
50
+ }
51
+ if (rule.pattern && !rule.pattern.test(str)) {
52
+ return rule.message || `${item.label}格式不正确`;
53
+ }
54
+ if (rule.validator) {
55
+ const r = await rule.validator(value, form);
56
+ if (r !== true)
57
+ return r || `${item.label}校验失败`;
58
+ }
59
+ }
60
+ return null;
61
+ }
62
+ export async function validateFormItems(items, form) {
63
+ for (const item of items) {
64
+ if (isItemHidden(item, form))
65
+ continue;
66
+ const err = await validateItem(item, form);
67
+ if (err)
68
+ return err;
69
+ }
70
+ return null;
71
+ }
72
+ export async function validateFormFields(items, form) {
73
+ const errors = {};
74
+ for (const item of items) {
75
+ if (isItemHidden(item, form))
76
+ continue;
77
+ const err = await validateItem(item, form);
78
+ if (err)
79
+ errors[item.prop] = err;
80
+ }
81
+ return errors;
82
+ }
83
+ export function applySetRules(items) {
84
+ return items.map((it) => {
85
+ if (!it.required || it.rules)
86
+ return it;
87
+ return {
88
+ ...it,
89
+ rules: [{ required: true, message: `${it.label}不能为空` }]
90
+ };
91
+ });
92
+ }
@@ -1 +1,14 @@
1
- (function(_0x2b2430,_0x4baa11){const _0x4834f9=_0x5059,_0x8f9391=_0x2b2430();while(!![]){try{const _0x33fbf4=-parseInt(_0x4834f9(0xbd))/0x1+parseInt(_0x4834f9(0xb7))/0x2+-parseInt(_0x4834f9(0xbf))/0x3+parseInt(_0x4834f9(0xb9))/0x4+-parseInt(_0x4834f9(0xba))/0x5+-parseInt(_0x4834f9(0xb8))/0x6+parseInt(_0x4834f9(0xbb))/0x7;if(_0x33fbf4===_0x4baa11)break;else _0x8f9391['push'](_0x8f9391['shift']());}catch(_0x130386){_0x8f9391['push'](_0x8f9391['shift']());}}}(_0x1af8,0x1cdd5));import{useUserStore}from'../stores/user';function _0x1af8(){const _0xb7cb57=['odu1nZiWywHss1P0','mJK0odGWnKHsD3nrzG','DMfSDwu','mtm3mdeYCuXQsenc','zgLZCgXHEq','mJK0ntm0vw1ov1fQ','BM9Uzq','mty4odm0v2P3Bu9P','ntmZnZm2ug9Ss3Hf','ndmXmZC2y095D2Lo'];_0x1af8=function(){return _0xb7cb57;};return _0x1af8();}function _0x5059(_0x118dec,_0x3f938e){_0x118dec=_0x118dec-0xb6;const _0x1af8ec=_0x1af8();let _0x505977=_0x1af8ec[_0x118dec];if(_0x5059['jaxMjP']===undefined){var _0x1e97a4=function(_0x2813f8){const _0x3f1bd3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfcca18='',_0x4ef715='';for(let _0xfbab03=0x0,_0x44ff12,_0x4ca66c,_0x90a1d8=0x0;_0x4ca66c=_0x2813f8['charAt'](_0x90a1d8++);~_0x4ca66c&&(_0x44ff12=_0xfbab03%0x4?_0x44ff12*0x40+_0x4ca66c:_0x4ca66c,_0xfbab03++%0x4)?_0xfcca18+=String['fromCharCode'](0xff&_0x44ff12>>(-0x2*_0xfbab03&0x6)):0x0){_0x4ca66c=_0x3f1bd3['indexOf'](_0x4ca66c);}for(let _0x18ca31=0x0,_0x3ab4fd=_0xfcca18['length'];_0x18ca31<_0x3ab4fd;_0x18ca31++){_0x4ef715+='%'+('00'+_0xfcca18['charCodeAt'](_0x18ca31)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ef715);};_0x5059['OWoXpc']=_0x1e97a4,_0x5059['XpdXcD']={},_0x5059['jaxMjP']=!![];}const _0x475f5e=_0x1af8ec[0x0],_0x121d83=_0x118dec+_0x475f5e,_0x343b10=_0x5059['XpdXcD'][_0x121d83];return!_0x343b10?(_0x505977=_0x5059['OWoXpc'](_0x505977),_0x5059['XpdXcD'][_0x121d83]=_0x505977):_0x505977=_0x343b10,_0x505977;}export const vPerm={'mounted'(_0xfcca18,_0x4ef715){const _0x58fb12=_0x5059;apply(_0xfcca18,_0x4ef715[_0x58fb12(0xbc)]);},'updated'(_0xfbab03,_0x44ff12){apply(_0xfbab03,_0x44ff12['value']);}};function apply(_0x4ca66c,_0x90a1d8){const _0x2076e4=_0x5059,_0x18ca31=useUserStore(),_0x3ab4fd=_0x18ca31['hasPerm'](_0x90a1d8);_0x4ca66c['style'][_0x2076e4(0xbe)]=_0x3ab4fd?'':_0x2076e4(0xb6);}
1
+ import { useUserStore } from "../stores/user";
2
+ export const vPerm = {
3
+ mounted(el, binding) {
4
+ apply(el, binding.value);
5
+ },
6
+ updated(el, binding) {
7
+ apply(el, binding.value);
8
+ }
9
+ };
10
+ function apply(el, value) {
11
+ const user = useUserStore();
12
+ const ok = user.hasPerm(value);
13
+ el.style.display = ok ? "" : "none";
14
+ }
@@ -1 +1,63 @@
1
- function _0x505e(){const _0x198f11=['5lIk5lYG5AsX6lsLicG','AgfZ','mtCWmZeYmhf5yvDSDW','mZi0nZm4B0zgy2Pt','nJq2mJLtC2fSwgO','B3bLBG','DxbSB2fKvxjS','ChvIBgLJrg9TywLU','C3rYAw5NAwz5','CMvZCg9UC2vuzxH0','ChjLDMLLD1vYBa','Ag9ZDa','zxjYB3i','zw50CMLLCW','B25SB2fK','C3rHDhvZ','C2XPy2u','nta0CeDPwNby','yxbWzw5K','DxjS','C2vUza','yxbWl2jHC2u','5lIk5lYG5zYW5z2a5PEG5Pwi','5lIk5lYG572r57UC6zsz6k+V','mJaWzhfzB0XM','ChjLDMLLDW','A2v5','Dg90ywW','mtvStfHWzLC','B25LCNjVCG','BMfTzq','mte3ndu2mdjiuKLfqu8','mtm1otbdtKPZBfi','zMLSzq','B25WCM9NCMvZCW','ota0ntGYrgTNywD2','mtKXndq0u2HnD25c','zMXVB3i','BgvUz3rOq29TChv0ywjSzq','mK1VwLLiyq','ue9tva'];_0x505e=function(){return _0x198f11;};return _0x505e();}const _0x3bb4f7=_0x33ae;(function(_0x5a6926,_0x135d17){const _0x443f71=_0x33ae,_0x37cac9=_0x5a6926();while(!![]){try{const _0x56d2e4=parseInt(_0x443f71(0x1c6))/0x1*(-parseInt(_0x443f71(0x1c1))/0x2)+parseInt(_0x443f71(0x1b6))/0x3*(-parseInt(_0x443f71(0x1be))/0x4)+parseInt(_0x443f71(0x1ba))/0x5*(-parseInt(_0x443f71(0x1ab))/0x6)+-parseInt(_0x443f71(0x1bd))/0x7+parseInt(_0x443f71(0x1c5))/0x8+-parseInt(_0x443f71(0x1c7))/0x9*(parseInt(_0x443f71(0x1b2))/0xa)+parseInt(_0x443f71(0x1b9))/0xb;if(_0x56d2e4===_0x135d17)break;else _0x37cac9['push'](_0x37cac9['shift']());}catch(_0x2ef468){_0x37cac9['push'](_0x37cac9['shift']());}}}(_0x505e,0x349af));import{toast}from'vue-sonner';import{request}from'../api/client';import{extname,filename,pathJoin,uploadUid}from'../lib/upload';const UPLOAD_PATH='/admin/base/comm/upload',SIGN_SKIP=new Set(['url',_0x3bb4f7(0x1ce),_0x3bb4f7(0x1c9),_0x3bb4f7(0x1ca),'previewUrl',_0x3bb4f7(0x1b3)]);export function useUpload(){async function _0x541a01(_0x1fab90,_0x191b27={}){const _0x5340e5=_0x33ae,{prefixPath:prefixPath=_0x5340e5(0x1af),onProgress:_0x766542}=_0x191b27,_0x5be0c2=uploadUid(),_0x398a51=extname(_0x1fab90['name']),_0x172eb8=filename(_0x1fab90[_0x5340e5(0x1b8)])+'_'+_0x5be0c2+(_0x398a51?'.'+_0x398a51:''),_0xc2b890=pathJoin(prefixPath,_0x172eb8),_0x18506a=await request(UPLOAD_PATH,{'method':_0x5340e5(0x1c2),'body':JSON[_0x5340e5(0x1cb)]({})}),_0x3f6ceb=String(_0x18506a[_0x5340e5(0x1ce)]||_0x18506a[_0x5340e5(0x1ad)]||_0x18506a[_0x5340e5(0x1c9)]||'');if(!_0x3f6ceb)throw new Error(_0x5340e5(0x1b0));const _0x25eb14=new FormData();_0x25eb14[_0x5340e5(0x1ac)](_0x5340e5(0x1b4),_0xc2b890);for(const [_0x358727,_0x4664da]of Object[_0x5340e5(0x1d0)](_0x18506a)){if(SIGN_SKIP[_0x5340e5(0x1c4)](_0x358727)||_0x4664da==null||_0x25eb14[_0x5340e5(0x1c4)](_0x358727))continue;_0x25eb14[_0x5340e5(0x1ac)](_0x358727,String(_0x4664da));}_0x25eb14[_0x5340e5(0x1ac)](_0x5340e5(0x1bb),_0x1fab90),await xhrUpload(_0x3f6ceb,_0x25eb14,_0x766542);const _0x2ae8d5=String(_0x18506a['publicDomain']||_0x18506a[_0x5340e5(0x1cd)]||_0x3f6ceb);return{'url':pathJoin(_0x2ae8d5,_0xc2b890),'key':_0xc2b890,'fileId':_0x5be0c2};}return{'toUpload':_0x541a01};}function _0x33ae(_0x42fbf4,_0x2513f0){_0x42fbf4=_0x42fbf4-0x1a9;const _0x505e56=_0x505e();let _0x33aed9=_0x505e56[_0x42fbf4];if(_0x33ae['SVRSQR']===undefined){var _0x3569ac=function(_0x33144f){const _0x181350='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x541a01='',_0x1fab90='';for(let _0x191b27=0x0,_0x766542,_0x5be0c2,_0x398a51=0x0;_0x5be0c2=_0x33144f['charAt'](_0x398a51++);~_0x5be0c2&&(_0x766542=_0x191b27%0x4?_0x766542*0x40+_0x5be0c2:_0x5be0c2,_0x191b27++%0x4)?_0x541a01+=String['fromCharCode'](0xff&_0x766542>>(-0x2*_0x191b27&0x6)):0x0){_0x5be0c2=_0x181350['indexOf'](_0x5be0c2);}for(let _0x172eb8=0x0,_0xc2b890=_0x541a01['length'];_0x172eb8<_0xc2b890;_0x172eb8++){_0x1fab90+='%'+('00'+_0x541a01['charCodeAt'](_0x172eb8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1fab90);};_0x33ae['CdCRIi']=_0x3569ac,_0x33ae['WIGZBB']={},_0x33ae['SVRSQR']=!![];}const _0x10f119=_0x505e56[0x0],_0x3fca91=_0x42fbf4+_0x10f119,_0x5e443b=_0x33ae['WIGZBB'][_0x3fca91];return!_0x5e443b?(_0x33aed9=_0x33ae['CdCRIi'](_0x33aed9),_0x33ae['WIGZBB'][_0x3fca91]=_0x33aed9):_0x33aed9=_0x5e443b,_0x33aed9;}function xhrUpload(_0x36b447,_0x3c7cd5,_0x4cfdbb){return new Promise((_0x4a7a45,_0x1763c9)=>{const _0x564212=_0x33ae,_0x2875e1=new XMLHttpRequest();_0x2875e1[_0x564212(0x1c8)](_0x564212(0x1c2),_0x36b447),_0x2875e1['upload'][_0x564212(0x1bc)]=_0x4b1c4c=>{const _0x7e65b6=_0x564212;if(!_0x4b1c4c[_0x7e65b6(0x1c0)])return;_0x4cfdbb?.(Math['min'](0x64,Math[_0x7e65b6(0x1bf)](_0x4b1c4c['loaded']/_0x4b1c4c[_0x7e65b6(0x1b5)]*0x64)));},_0x2875e1[_0x564212(0x1d1)]=()=>{const _0x1108a4=_0x564212;if(_0x2875e1['status']<0xc8||_0x2875e1[_0x1108a4(0x1a9)]>=0x12c){const _0xe84c76=_0x2875e1[_0x1108a4(0x1cc)]||_0x1108a4(0x1c3)+_0x2875e1[_0x1108a4(0x1a9)]+')';toast[_0x1108a4(0x1cf)](_0xe84c76[_0x1108a4(0x1aa)](0x0,0xc8)),_0x1763c9(new Error(_0xe84c76));return;}_0x4cfdbb?.(0x64),_0x4a7a45();},_0x2875e1[_0x564212(0x1b7)]=()=>_0x1763c9(new Error(_0x564212(0x1b1))),_0x2875e1[_0x564212(0x1ae)](_0x3c7cd5);});}
1
+ import { toast } from "vue-sonner";
2
+ import { request } from "../api/client";
3
+ import { extname, filename, pathJoin, uploadUid } from "../lib/upload";
4
+ const UPLOAD_PATH = "/admin/base/comm/upload";
5
+ const SIGN_SKIP = new Set([
6
+ "url",
7
+ "host",
8
+ "uploadUrl",
9
+ "publicDomain",
10
+ "previewUrl",
11
+ "preview"
12
+ ]);
13
+ export function useUpload() {
14
+ async function toUpload(file, opts = {}) {
15
+ const { prefixPath = "app/base", onProgress } = opts;
16
+ const fileId = uploadUid();
17
+ const ext = extname(file.name);
18
+ const name = `${filename(file.name)}_${fileId}${ext ? `.${ext}` : ""}`;
19
+ const key = pathJoin(prefixPath, name);
20
+ const sign = await request(UPLOAD_PATH, {
21
+ method: "POST",
22
+ body: JSON.stringify({})
23
+ });
24
+ const host = String(sign.host || sign.url || sign.uploadUrl || "");
25
+ if (!host)
26
+ throw new Error("上传地址无效");
27
+ const fd = new FormData;
28
+ fd.append("key", key);
29
+ for (const [k, v] of Object.entries(sign)) {
30
+ if (SIGN_SKIP.has(k) || v == null || fd.has(k))
31
+ continue;
32
+ fd.append(k, String(v));
33
+ }
34
+ fd.append("file", file);
35
+ await xhrUpload(host, fd, onProgress);
36
+ const preview = String(sign.publicDomain || sign.previewUrl || host);
37
+ return { url: pathJoin(preview, key), key, fileId };
38
+ }
39
+ return { toUpload };
40
+ }
41
+ function xhrUpload(url, body, onProgress) {
42
+ return new Promise((resolve, reject) => {
43
+ const xhr = new XMLHttpRequest;
44
+ xhr.open("POST", url);
45
+ xhr.upload.onprogress = (e) => {
46
+ if (!e.lengthComputable)
47
+ return;
48
+ onProgress?.(Math.min(100, Math.floor(e.loaded / e.total * 100)));
49
+ };
50
+ xhr.onload = () => {
51
+ if (xhr.status < 200 || xhr.status >= 300) {
52
+ const msg = xhr.responseText || `上传失败 (${xhr.status})`;
53
+ toast.error(msg.slice(0, 200));
54
+ reject(new Error(msg));
55
+ return;
56
+ }
57
+ onProgress?.(100);
58
+ resolve();
59
+ };
60
+ xhr.onerror = () => reject(new Error("上传网络错误"));
61
+ xhr.send(body);
62
+ });
63
+ }
@@ -1 +1,24 @@
1
- function _0x3540(_0x86d263,_0x508e4e){_0x86d263=_0x86d263-0x1d4;const _0x329cb4=_0x329c();let _0x35403d=_0x329cb4[_0x86d263];if(_0x3540['jawGKP']===undefined){var _0x2e7527=function(_0x1e00c2){const _0x20f9e9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f6616='',_0x5f5163='';for(let _0x214a1e=0x0,_0x36aa62,_0xef61c5,_0xa2fabb=0x0;_0xef61c5=_0x1e00c2['charAt'](_0xa2fabb++);~_0xef61c5&&(_0x36aa62=_0x214a1e%0x4?_0x36aa62*0x40+_0xef61c5:_0xef61c5,_0x214a1e++%0x4)?_0x4f6616+=String['fromCharCode'](0xff&_0x36aa62>>(-0x2*_0x214a1e&0x6)):0x0){_0xef61c5=_0x20f9e9['indexOf'](_0xef61c5);}for(let _0x55c2aa=0x0,_0x17216f=_0x4f6616['length'];_0x55c2aa<_0x17216f;_0x55c2aa++){_0x5f5163+='%'+('00'+_0x4f6616['charCodeAt'](_0x55c2aa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f5163);};_0x3540['DKAkrb']=_0x2e7527,_0x3540['WXhhTd']={},_0x3540['jawGKP']=!![];}const _0x4f51e0=_0x329cb4[0x0],_0x4ee5ed=_0x86d263+_0x4f51e0,_0x50262f=_0x3540['WXhhTd'][_0x4ee5ed];return!_0x50262f?(_0x35403d=_0x3540['DKAkrb'](_0x35403d),_0x3540['WXhhTd'][_0x4ee5ed]=_0x35403d):_0x35403d=_0x50262f,_0x35403d;}(function(_0x19d189,_0x4f51ef){const _0x162980=_0x3540,_0x6183dc=_0x19d189();while(!![]){try{const _0x3c6725=-parseInt(_0x162980(0x1df))/0x1+parseInt(_0x162980(0x1d4))/0x2+-parseInt(_0x162980(0x1e2))/0x3*(parseInt(_0x162980(0x1da))/0x4)+parseInt(_0x162980(0x1e1))/0x5*(-parseInt(_0x162980(0x1d7))/0x6)+parseInt(_0x162980(0x1e3))/0x7*(parseInt(_0x162980(0x1dd))/0x8)+parseInt(_0x162980(0x1d5))/0x9*(parseInt(_0x162980(0x1dc))/0xa)+parseInt(_0x162980(0x1de))/0xb;if(_0x3c6725===_0x4f51ef)break;else _0x6183dc['push'](_0x6183dc['shift']());}catch(_0x5018a3){_0x6183dc['push'](_0x6183dc['shift']());}}}(_0x329c,0xde010));function _0x329c(){const _0x134446=['zg9JDw1LBNrfBgvTzw50','nZGZmezWrMDpAa','mtGXnJHWwfHjyLa','mtyXnZyXotnqCKfOyxm','otm2nZmXBhzgBvnR','zNvSBa','mtqYmtv2tw5ss2m','ovD4qML0DG','mtG5vhPZt2fy','mtq1nZe3mMLPCu9VvG','mJGYnKjOr21zAq','Dg9mB3DLCKnHC2u','nZGWwuPfvvfQ','Bwf0y2G','DgvZDa','mZG3ntCYwxHLCgTg'];_0x329c=function(){return _0x134446;};return _0x329c();}export function getBrowser(){const _0x5e04e9=_0x3540,{clientHeight:_0x4f6616,clientWidth:_0x5f5163}=document[_0x5e04e9(0x1db)],_0x214a1e=navigator['userAgent'][_0x5e04e9(0x1d6)]();let _0x36aa62=(_0x214a1e[_0x5e04e9(0x1d8)](/firefox|chrome|safari|opera/g)||['other'])[0x0];if((_0x214a1e[_0x5e04e9(0x1d8)](/msie|trident/g)||[])[0x0])_0x36aa62='msie';let _0xef61c5=_0x5e04e9(0x1e0);if(_0x5f5163<0x300)_0xef61c5='xs';else{if(_0x5f5163<0x3e0)_0xef61c5='sm';else{if(_0x5f5163<0x4b0)_0xef61c5='md';else{if(_0x5f5163<0x780)_0xef61c5='xl';}}}const _0xa2fabb=!/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i[_0x5e04e9(0x1d9)](_0x214a1e);return{'height':_0x4f6616,'width':_0x5f5163,'type':_0x36aa62,'screen':_0xef61c5,'isMini':_0xef61c5==='xs'||!_0xa2fabb};}
1
+ export function getBrowser() {
2
+ const { clientHeight: height, clientWidth: width } = document.documentElement;
3
+ const ua = navigator.userAgent.toLowerCase();
4
+ let type = (ua.match(/firefox|chrome|safari|opera/g) || ["other"])[0];
5
+ if ((ua.match(/msie|trident/g) || [])[0])
6
+ type = "msie";
7
+ let screen = "full";
8
+ if (width < 768)
9
+ screen = "xs";
10
+ else if (width < 992)
11
+ screen = "sm";
12
+ else if (width < 1200)
13
+ screen = "md";
14
+ else if (width < 1920)
15
+ screen = "xl";
16
+ const isPC = !/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua);
17
+ return {
18
+ height,
19
+ width,
20
+ type,
21
+ screen,
22
+ isMini: screen === "xs" || !isPC
23
+ };
24
+ }
@@ -1 +1,5 @@
1
- function _0x1cd9(){var _0x120702=['mZq5nZy4mLz5qNLnyq','mJqWmdq3me9UqwX2Eq','mZeWmZK0n0nMuMz2wq','mty1mZy1nMrYt2j0vq','mZaZmta4ANLcsLvl','mtq2mZy5n3nHu1j6Ca','mJu5ntKXqwPZz090'];_0x1cd9=function(){return _0x120702;};return _0x1cd9();}(function(_0x4be439,_0x5d5cf9){var _0x315d2a=_0x5486,_0x1c62c3=_0x4be439();while(!![]){try{var _0x3620ee=parseInt(_0x315d2a(0xc8))/0x1+-parseInt(_0x315d2a(0xc6))/0x2+parseInt(_0x315d2a(0xc7))/0x3+parseInt(_0x315d2a(0xc5))/0x4+parseInt(_0x315d2a(0xca))/0x5+-parseInt(_0x315d2a(0xc9))/0x6+-parseInt(_0x315d2a(0xcb))/0x7;if(_0x3620ee===_0x5d5cf9)break;else _0x1c62c3['push'](_0x1c62c3['shift']());}catch(_0x5741ce){_0x1c62c3['push'](_0x1c62c3['shift']());}}}(_0x1cd9,0x710e4));import{clsx}from'clsx';import{twMerge}from'tailwind-merge';function _0x5486(_0x4d66ba,_0x23736b){_0x4d66ba=_0x4d66ba-0xc5;var _0x1cd960=_0x1cd9();var _0x548688=_0x1cd960[_0x4d66ba];if(_0x5486['sBBzPT']===undefined){var _0x297329=function(_0x283e59){var _0x4a837a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4d6502='',_0x267a86='';for(var _0x3d0d69=0x0,_0x27e2e8,_0x48ce4c,_0x44f8a7=0x0;_0x48ce4c=_0x283e59['charAt'](_0x44f8a7++);~_0x48ce4c&&(_0x27e2e8=_0x3d0d69%0x4?_0x27e2e8*0x40+_0x48ce4c:_0x48ce4c,_0x3d0d69++%0x4)?_0x4d6502+=String['fromCharCode'](0xff&_0x27e2e8>>(-0x2*_0x3d0d69&0x6)):0x0){_0x48ce4c=_0x4a837a['indexOf'](_0x48ce4c);}for(var _0x48676e=0x0,_0x11ad91=_0x4d6502['length'];_0x48676e<_0x11ad91;_0x48676e++){_0x267a86+='%'+('00'+_0x4d6502['charCodeAt'](_0x48676e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x267a86);};_0x5486['RaPpcs']=_0x297329,_0x5486['NKnUDw']={},_0x5486['sBBzPT']=!![];}var _0x4df3a1=_0x1cd960[0x0],_0x2a39d8=_0x4d66ba+_0x4df3a1,_0x2d13e6=_0x5486['NKnUDw'][_0x2a39d8];return!_0x2d13e6?(_0x548688=_0x5486['RaPpcs'](_0x548688),_0x5486['NKnUDw'][_0x2a39d8]=_0x548688):_0x548688=_0x2d13e6,_0x548688;}export function cn(..._0x4d6502){return twMerge(clsx(_0x4d6502));}
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }