'use strict';const _0x206726=_0x2ad3;function _0x4a62(){const _0x55e053=['对话聊天','/market','/pay','Chat','663260lZSWdr','Mind','3735783yIvmlB','@nestjs/typeorm','6HGULtb','menuPlatform','icon-park-outline:mindmap-map','delete','BAD_REQUEST','InjectRepository','/user-center','UserCenter','./menu.entity','思维导图','1742856ZFUQnn','HttpStatus','MenuService','ri:account-pin-box-line','缺失必要参数!','应用广场','Repository','426748xgcstP','4ougQDm','__metadata','/share','menuIframeUrl','/draw','597010bqJjZB','推广计划','findOne','操作菜单失败!','Market','menuListFront','__decorate','会员中心','icon-park-outline:shopping','ri:landscape-line','typeorm','Draw','onModuleInit','defineProperty','initMenu','基础绘画','Pay','setMenu','update','affected','queryMenu','MenuEntity','Injectable','/app-store','decorate','ant-design:appstore-outlined','uiw:share','updateIcon','902688teiFDl','AppStore','9yLQeFo','isSystem','27190910cTCxZa','visibleMenu','find','专业绘画','ASC','menuEntity','eos-icons:typing','length','/midjourney','Midjourney'];_0x4a62=function(){return _0x55e053;};return _0x4a62();}(function(_0x530990,_0x1741ea){const _0x5bd4c6=_0x2ad3,_0x222126=_0x530990();while(!![]){try{const _0x47dc03=parseInt(_0x5bd4c6(0x121))/0x1*(-parseInt(_0x5bd4c6(0x126))/0x2)+-parseInt(_0x5bd4c6(0x10d))/0x3+parseInt(_0x5bd4c6(0x119))/0x4+-parseInt(_0x5bd4c6(0x10b))/0x5*(parseInt(_0x5bd4c6(0x10f))/0x6)+-parseInt(_0x5bd4c6(0x120))/0x7+parseInt(_0x5bd4c6(0x142))/0x8+parseInt(_0x5bd4c6(0x144))/0x9*(parseInt(_0x5bd4c6(0x146))/0xa);if(_0x47dc03===_0x1741ea)break;else _0x222126['push'](_0x222126['shift']());}catch(_0x47a2cf){_0x222126['push'](_0x222126['shift']());}}}(_0x4a62,0x9af78));function _0x2ad3(_0x3c9193,_0x102a74){const _0x4a6298=_0x4a62();return _0x2ad3=function(_0x2ad3e3,_0x4588d6){_0x2ad3e3=_0x2ad3e3-0x10b;let _0x7f622d=_0x4a6298[_0x2ad3e3];return _0x7f622d;},_0x2ad3(_0x3c9193,_0x102a74);}var __decorate=this&&this[_0x206726(0x12c)]||function(_0xe67db9,_0x34727e,_0x393936,_0xf7409a){const _0x5c38a2=_0x206726;var _0x444183=arguments[_0x5c38a2(0x14d)],_0x154d4b=_0x444183<0x3?_0x34727e:_0xf7409a===null?_0xf7409a=Object['getOwnPropertyDescriptor'](_0x34727e,_0x393936):_0xf7409a,_0x43a25d;if(typeof Reflect==='object'&&typeof Reflect['decorate']==='function')_0x154d4b=Reflect[_0x5c38a2(0x13e)](_0xe67db9,_0x34727e,_0x393936,_0xf7409a);else{for(var _0x4ca41c=_0xe67db9[_0x5c38a2(0x14d)]-0x1;_0x4ca41c>=0x0;_0x4ca41c--)if(_0x43a25d=_0xe67db9[_0x4ca41c])_0x154d4b=(_0x444183<0x3?_0x43a25d(_0x154d4b):_0x444183>0x3?_0x43a25d(_0x34727e,_0x393936,_0x154d4b):_0x43a25d(_0x34727e,_0x393936))||_0x154d4b;}return _0x444183>0x3&&_0x154d4b&&Object[_0x5c38a2(0x133)](_0x34727e,_0x393936,_0x154d4b),_0x154d4b;},__metadata=this&&this[_0x206726(0x122)]||function(_0x5496d8,_0x1744bf){if(typeof Reflect==='object'&&typeof Reflect['metadata']==='function')return Reflect['metadata'](_0x5496d8,_0x1744bf);},__param=this&&this['__param']||function(_0x7deb70,_0x2a08e2){return function(_0x250fee,_0x4e031e){_0x2a08e2(_0x250fee,_0x4e031e,_0x7deb70);};};Object[_0x206726(0x133)](exports,'__esModule',{'value':!![]}),exports[_0x206726(0x11b)]=void 0x0;const common_1=require('@nestjs/common'),typeorm_1=require(_0x206726(0x10e)),typeorm_2=require(_0x206726(0x130)),menu_entity_1=require(_0x206726(0x117));let MenuService=class MenuService{constructor(_0x1d6302){const _0x3a42c9=_0x206726;this[_0x3a42c9(0x14b)]=_0x1d6302;}async[_0x206726(0x132)](){const _0x242d08=_0x206726;await this[_0x242d08(0x134)]();}async[_0x206726(0x134)](){const _0x5ae67c=_0x206726,_0x43ad0c=await this[_0x5ae67c(0x14b)]['count']();if(_0x43ad0c>0x0)return;const _0x56fb8e=[{'menuTipText':_0x5ae67c(0x150),'menuIcon':_0x5ae67c(0x14c),'menuName':_0x5ae67c(0x153),'menuPath':'/chat','menuType':0x0,'menuPlatform':0x1,'order':0x64},{'menuTipText':_0x5ae67c(0x11e),'menuIcon':'ant-design:appstore-outlined','menuName':_0x5ae67c(0x143),'menuPath':_0x5ae67c(0x13d),'menuType':0x0,'menuPlatform':0x1,'order':0xc8},{'menuTipText':_0x5ae67c(0x149),'menuIcon':_0x5ae67c(0x12f),'menuName':'Midjourney','menuPath':_0x5ae67c(0x14e),'menuType':0x0,'menuPlatform':0x1,'order':0x12c},{'menuTipText':'绘画广场','menuIcon':'solar:album-line-duotone','menuName':_0x5ae67c(0x12a),'menuPath':_0x5ae67c(0x151),'menuType':0x0,'menuPlatform':0x1,'order':0x190},{'menuTipText':_0x5ae67c(0x135),'menuIcon':'fluent:draw-image-24-regular','menuName':_0x5ae67c(0x131),'menuPath':_0x5ae67c(0x125),'menuType':0x0,'menuPlatform':0x1,'order':0x1f4},{'menuTipText':_0x5ae67c(0x118),'menuIcon':_0x5ae67c(0x111),'menuName':_0x5ae67c(0x10c),'menuPath':'/mind','menuType':0x0,'menuPlatform':0x1,'order':0x258},{'menuTipText':_0x5ae67c(0x12d),'menuIcon':_0x5ae67c(0x12e),'menuName':_0x5ae67c(0x136),'menuPath':_0x5ae67c(0x152),'menuType':0x0,'menuPlatform':0x1,'order':0x2bc},{'menuTipText':_0x5ae67c(0x127),'menuIcon':_0x5ae67c(0x140),'menuName':'Share','menuPath':_0x5ae67c(0x123),'menuType':0x0,'menuPlatform':0x1,'order':0x320}],_0x54b161=[{'menuTipText':_0x5ae67c(0x150),'menuIcon':_0x5ae67c(0x14c),'menuName':'Chat','menuPath':'/chat','menuType':0x0,'menuPlatform':0x0,'order':0x64},{'menuTipText':_0x5ae67c(0x11e),'menuIcon':_0x5ae67c(0x13f),'menuName':_0x5ae67c(0x143),'menuPath':_0x5ae67c(0x13d),'menuType':0x0,'menuPlatform':0x0,'order':0xc8},{'menuTipText':_0x5ae67c(0x149),'menuIcon':'ri:landscape-line','menuName':_0x5ae67c(0x14f),'menuPath':_0x5ae67c(0x14e),'menuType':0x0,'menuPlatform':0x0,'order':0x12c},{'menuTipText':_0x5ae67c(0x118),'menuIcon':_0x5ae67c(0x111),'menuName':_0x5ae67c(0x10c),'menuPath':'/mind','menuType':0x0,'menuPlatform':0x0,'order':0x190},{'menuTipText':'个人中心','menuIcon':_0x5ae67c(0x11c),'menuName':_0x5ae67c(0x116),'menuPath':_0x5ae67c(0x115),'menuType':0x0,'menuPlatform':0x0,'order':0x1f4}],_0xe084cb=[..._0x56fb8e,..._0x54b161];await this['menuEntity']['save'](_0xe084cb);}async[_0x206726(0x13a)](_0x2b2775){const _0xcff323=_0x206726,{menuPlatform:_0x3cb5d2}=_0x2b2775,_0x41e71f={};return _0x3cb5d2&&(_0x41e71f[_0xcff323(0x110)]=_0x3cb5d2),await this[_0xcff323(0x14b)]['find']({'where':_0x41e71f,'order':{'order':_0xcff323(0x14a)}});}async[_0x206726(0x12b)](_0xb19207){const _0x22f219=_0x206726,{menuPlatform:_0x10d56c}=_0xb19207,_0x321d7c={'isShow':!![]};return _0x10d56c&&(_0x321d7c[_0x22f219(0x110)]=_0x10d56c),await this[_0x22f219(0x14b)][_0x22f219(0x148)]({'where':_0x321d7c,'order':{'order':_0x22f219(0x14a)}});}async[_0x206726(0x147)](_0x1c0272){const _0x1c2504=_0x206726,{id:_0x2cf530}=_0x1c0272;if(!_0x2cf530)return;const _0x23e88f=await this[_0x1c2504(0x14b)][_0x1c2504(0x128)]({'where':{'id':_0x2cf530}});if(!_0x23e88f)return;const {isShow:_0x20dddc}=_0x23e88f,_0x25091d=await this[_0x1c2504(0x14b)][_0x1c2504(0x138)]({'id':_0x2cf530},{'isShow':!_0x20dddc});return _0x25091d[_0x1c2504(0x139)]>0x0;}async[_0x206726(0x137)](_0x1d64e1){const _0x502cd9=_0x206726,{id:_0x2b4ed2}=_0x1d64e1;_0x1d64e1['isSystem']?_0x1d64e1['menuPath']='':_0x1d64e1[_0x502cd9(0x124)]='';delete _0x1d64e1[_0x502cd9(0x145)];try{if(_0x2b4ed2){const _0x349526=await this[_0x502cd9(0x14b)][_0x502cd9(0x138)]({'id':_0x2b4ed2},_0x1d64e1);return _0x349526[_0x502cd9(0x139)]>0x0;}else{const _0x16f014=await this[_0x502cd9(0x14b)]['save'](_0x1d64e1);return _0x16f014;}}catch(_0x2c6640){throw new common_1['HttpException'](_0x502cd9(0x129),common_1[_0x502cd9(0x11a)]['BAD_REQUEST']);}}async['delMenu'](_0x4fb1f5){const _0x28fb33=_0x206726,{id:_0x90a019}=_0x4fb1f5;if(!_0x90a019)throw new common_1['HttpException'](_0x28fb33(0x11d),common_1[_0x28fb33(0x11a)][_0x28fb33(0x113)]);const _0x1af795=await this[_0x28fb33(0x14b)][_0x28fb33(0x112)]({'id':_0x90a019});return _0x1af795;}async[_0x206726(0x141)](_0x2cb3f8){const _0x1bd9a9=_0x206726,{id:_0x5c3dbb,menuIcon:_0x27c921,menuTipText:_0x46b406,order:_0x430a6d}=_0x2cb3f8;if(!_0x5c3dbb||!_0x27c921||!_0x46b406||!_0x430a6d)throw new common_1['HttpException'](_0x1bd9a9(0x11d),common_1['HttpStatus']['BAD_REQUEST']);const _0x7f9e1a=await this['menuEntity'][_0x1bd9a9(0x138)]({'id':_0x5c3dbb},{'menuIcon':_0x27c921,'menuTipText':_0x46b406,'order':_0x430a6d});return _0x7f9e1a[_0x1bd9a9(0x139)]>0x0;}};MenuService=__decorate([(0x0,common_1[_0x206726(0x13c)])(),__param(0x0,(0x0,typeorm_1[_0x206726(0x114)])(menu_entity_1[_0x206726(0x13b)])),__metadata('design:paramtypes',[typeorm_2[_0x206726(0x11f)]])],MenuService),exports[_0x206726(0x11b)]=MenuService;