@things-factory/operato-tools 6.1.85 → 6.1.87

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,4 +1,4 @@
1
- const a0_0x71eaab=a0_0x4f39;(function(_0xfdc47c,_0x5ca128){const _0x55c1a7=a0_0x4f39,_0x47bfef=_0xfdc47c();while(!![]){try{const _0x430d53=parseInt(_0x55c1a7(0x14a))/0x1*(parseInt(_0x55c1a7(0x166))/0x2)+parseInt(_0x55c1a7(0x15b))/0x3+-parseInt(_0x55c1a7(0x14b))/0x4*(-parseInt(_0x55c1a7(0x16f))/0x5)+parseInt(_0x55c1a7(0x151))/0x6*(-parseInt(_0x55c1a7(0x16d))/0x7)+-parseInt(_0x55c1a7(0x16e))/0x8*(-parseInt(_0x55c1a7(0x167))/0x9)+-parseInt(_0x55c1a7(0x165))/0xa*(parseInt(_0x55c1a7(0x15f))/0xb)+-parseInt(_0x55c1a7(0x173))/0xc;if(_0x430d53===_0x5ca128)break;else _0x47bfef['push'](_0x47bfef['shift']());}catch(_0x28f90c){_0x47bfef['push'](_0x47bfef['shift']());}}}(a0_0x3774,0x62f78));import{html}from'lit-element';function a0_0x4f39(_0x40be19,_0x154fbc){const _0x37742e=a0_0x3774();return a0_0x4f39=function(_0x4f3930,_0x585a83){_0x4f3930=_0x4f3930-0x147;let _0x497cbc=_0x37742e[_0x4f3930];return _0x497cbc;},a0_0x4f39(_0x40be19,_0x154fbc);}import{MetaApi}from'@things-factory/meta-ui/client/utils/meta-api';import{TermsUtil}from'@things-factory/meta-ui/client/utils/terms-util';function a0_0x3774(){const _0xf8522f=['parent_id','deleteRow','setTabConfigTabValues','tagname','routing','1408254OiynpO','rank','icon','getGristSelectableConfig','tLabel','string','integer','map','push','params','1814847KMkcHG','tabTabGridConfig','tab','fetch','22wDANEp','viewTabData','location','bind','fetchTabTabHandler','right','3560590Icdmuv','26GVaMec','117zlEcxc','getTabConfigTabValues','menu','param_field','sortRecordByRank','tabTabGrist','21uUPxGi','483680GUiVvq','35795DHgjMV','setTabConfigTabConfig','page_location','getGristGuttersConfig','5840556CYemNt','#tab-tab-grid','display','left','parent_field','renderTabConfigTab','name','getElementValueById','41933TeiNnv','208IHLDDX'];a0_0x3774=function(){return _0xf8522f;};return a0_0x3774();}export const TabConfigTabMixin=_0x43c0c2=>class extends _0x43c0c2{[a0_0x71eaab(0x14e)](_0x664040){const _0x4be0bd=a0_0x71eaab;let _0x377db0=_0x664040?.[_0x4be0bd(0x158)]((_0x4cecbf,_0xbfd3e6)=>{const _0x5f5811=_0x4be0bd;let _0x5c5421=_0xbfd3e6+0x1,_0x5dc561={};return _0x5dc561[_0x5f5811(0x152)]=0xa*_0x5c5421,_0x5dc561['id']=_0x5c5421,_0x5dc561['name']=_0x4cecbf['name'],_0x5dc561[_0x5f5811(0x175)]=_0x4cecbf[_0x5f5811(0x175)],_0x5dc561[_0x5f5811(0x14f)]=_0x4cecbf[_0x5f5811(0x14f)],_0x5dc561['icon']=_0x4cecbf[_0x5f5811(0x153)],_0x5dc561[_0x5f5811(0x161)]=_0x4cecbf[_0x5f5811(0x161)],_0x5dc561[_0x5f5811(0x177)]=_0x4cecbf[_0x5f5811(0x177)],_0x5dc561[_0x5f5811(0x16a)]=_0x4cecbf[_0x5f5811(0x16a)],_0x5dc561[_0x5f5811(0x169)]=_0x4cecbf[_0x5f5811(0x169)],_0x5dc561;});this[_0x4be0bd(0x160)]=_0x377db0||[],this[_0x4be0bd(0x16c)]?.[_0x4be0bd(0x15e)]();}[a0_0x71eaab(0x168)](){const _0x2e34e0=a0_0x71eaab;let _0x13a24a={'tab':[]},_0x217814=this[_0x2e34e0(0x149)]('tab-tab-grid');return this[_0x2e34e0(0x16b)](_0x217814)?.['forEach'](_0x2cffd6=>{const _0xeca7bb=_0x2e34e0;var {name:_0x44b0d5,display:_0x49807f,tagname:_0x44b1ce,location:_0x3ce56b,parent_field:_0x25bc6d,param_field:_0x5e6337,menu:_0x2fa235,icon:_0x19a897}=_0x2cffd6;_0x44b0d5&&_0x44b1ce&&_0x3ce56b&&_0x2fa235&&(_0x49807f||(_0x49807f=_0x44b0d5),_0x25bc6d||(_0x25bc6d='id'),_0x5e6337||(_0x5e6337=_0xeca7bb(0x16a)),_0x13a24a[_0xeca7bb(0x15d)][_0xeca7bb(0x159)]({'name':_0x44b0d5,'display':_0x49807f,'tagname':_0x44b1ce,'location':_0x3ce56b,'parent_field':_0x25bc6d,'param_field':_0x5e6337,'menu':_0x2fa235,'icon':_0x19a897}));}),_0x13a24a;}[a0_0x71eaab(0x147)](){const _0x340076=a0_0x71eaab;return html`
2
- <ox-grist auto-fetch id="tab-tab-grid" .config=${this[_0x340076(0x15c)]} .mode='GRID'
3
- .fetchHandler=${this[_0x340076(0x163)][_0x340076(0x162)](this)}>
4
- </ox-grist>`;}get[a0_0x71eaab(0x16c)](){const _0x3cf18f=a0_0x71eaab;return this['shadowRoot']['querySelector'](_0x3cf18f(0x174));}async[a0_0x71eaab(0x163)](){const _0x3b0ac1=a0_0x71eaab;return{'total':0x0,'records':this[_0x3b0ac1(0x160)]||[]};}async[a0_0x71eaab(0x170)](){const _0x138c05=a0_0x71eaab;this[_0x138c05(0x15c)]={'rows':MetaApi[_0x138c05(0x154)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x138c05(0x152),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi[_0x138c05(0x172)](!0x1,!0x1),{'type':'gutter','gutterName':'button','icon':'delete','handlers':{'click':(_0x25813d,_0x1312b4,_0x2f24b2,_0x2ee20b,_0x2cc57a)=>{const _0x13cd20=_0x138c05;_0x2ee20b['id']&&this[_0x13cd20(0x14d)](this[_0x13cd20(0x16c)],_0x2ee20b);}}},{'type':_0x138c05(0x156),'name':'id','hidden':!0x0},{'type':_0x138c05(0x157),'name':'rank','header':TermsUtil['tLabel']('rank'),'sortable':!0x1,'width':0x32,'record':{'align':_0x138c05(0x164),'editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':_0x138c05(0x148),'header':TermsUtil[_0x138c05(0x155)]('name'),'sortable':!0x1,'width':0x6e,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':_0x138c05(0x175),'header':TermsUtil[_0x138c05(0x155)](_0x138c05(0x175)),'sortable':!0x1,'width':0x6e,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':'icon','header':TermsUtil['tLabel']('icon'),'sortable':!0x0,'width':0x55,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x138c05(0x169),'header':TermsUtil[_0x138c05(0x155)](_0x138c05(0x150)),'sortable':!0x1,'width':0x96,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':_0x138c05(0x14f),'header':TermsUtil[_0x138c05(0x155)]('tag'),'sortable':!0x1,'width':0x96,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':'location','header':TermsUtil['tLabel'](_0x138c05(0x171)),'sortable':!0x1,'width':0x145,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x138c05(0x177),'header':TermsUtil[_0x138c05(0x155)](_0x138c05(0x14c)),'sortable':!0x1,'width':0x64,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':_0x138c05(0x156),'name':_0x138c05(0x16a),'header':TermsUtil[_0x138c05(0x155)](_0x138c05(0x15a)),'sortable':!0x1,'width':0x5a,'record':{'align':_0x138c05(0x176),'editable':!0x0,'mandatory':!0x0}}]};}};
1
+ const a0_0x4378d8=a0_0x552f;function a0_0x3606(){const _0x383c13=['integer','151356SvKicn','string','left','right','bind','tag','#tab-tab-grid','routing','28157SKqpaL','tagname','5423MPaCas','108024oRuuTK','266103juNbWK','parent_field','button','param_field','299362Byjkpn','display','getGristGuttersConfig','fetchTabTabHandler','3517356RPQejT','forEach','delete','deleteRow','setTabConfigTabConfig','location','page_location','tab','getElementValueById','sortRecordByRank','4417110gTmiGD','menu','470FMuKHV','getGristSelectableConfig','tLabel','icon','viewTabData','tabTabGrist','5kFfeNm','name','setTabConfigTabValues','rank','map','tab-tab-grid','336mPUZFB','tabTabGridConfig','4vKafqg','parent_id','querySelector'];a0_0x3606=function(){return _0x383c13;};return a0_0x3606();}function a0_0x552f(_0x481340,_0x1eca2f){const _0x3606f0=a0_0x3606();return a0_0x552f=function(_0x552f82,_0x38eab4){_0x552f82=_0x552f82-0x120;let _0x244fc4=_0x3606f0[_0x552f82];return _0x244fc4;},a0_0x552f(_0x481340,_0x1eca2f);}(function(_0x36a61a,_0x1e443d){const _0x774c78=a0_0x552f,_0x34b51d=_0x36a61a();while(!![]){try{const _0x1a19b4=parseInt(_0x774c78(0x146))/0x1+-parseInt(_0x774c78(0x120))/0x2+-parseInt(_0x774c78(0x12a))/0x3*(-parseInt(_0x774c78(0x13a))/0x4)+-parseInt(_0x774c78(0x132))/0x5*(parseInt(_0x774c78(0x13e))/0x6)+-parseInt(_0x774c78(0x14e))/0x7*(parseInt(_0x774c78(0x138))/0x8)+-parseInt(_0x774c78(0x14a))/0x9*(parseInt(_0x774c78(0x12c))/0xa)+parseInt(_0x774c78(0x148))/0xb*(parseInt(_0x774c78(0x149))/0xc);if(_0x1a19b4===_0x1e443d)break;else _0x34b51d['push'](_0x34b51d['shift']());}catch(_0x1bf6ed){_0x34b51d['push'](_0x34b51d['shift']());}}}(a0_0x3606,0xec854));import{html}from'lit-element';import{MetaApi}from'@things-factory/meta-ui/client/utils/meta-api';import{TermsUtil}from'@things-factory/meta-ui/client/utils/terms-util';export const TabConfigTabMixin=_0x255535=>class extends _0x255535{[a0_0x4378d8(0x134)](_0x4b25c9){const _0xa1433d=a0_0x4378d8;let _0x22941c=_0x4b25c9?.[_0xa1433d(0x136)]((_0x28e412,_0x2247d7)=>{const _0x41c836=_0xa1433d;let _0x14854f=_0x2247d7+0x1,_0x43561c={};return _0x43561c[_0x41c836(0x135)]=0xa*_0x14854f,_0x43561c['id']=_0x14854f,_0x43561c[_0x41c836(0x133)]=_0x28e412['name'],_0x43561c[_0x41c836(0x14f)]=_0x28e412[_0x41c836(0x14f)],_0x43561c[_0x41c836(0x147)]=_0x28e412[_0x41c836(0x147)],_0x43561c[_0x41c836(0x12f)]=_0x28e412[_0x41c836(0x12f)],_0x43561c['location']=_0x28e412[_0x41c836(0x125)],_0x43561c[_0x41c836(0x14b)]=_0x28e412[_0x41c836(0x14b)],_0x43561c[_0x41c836(0x14d)]=_0x28e412[_0x41c836(0x14d)],_0x43561c[_0x41c836(0x12b)]=_0x28e412[_0x41c836(0x12b)],_0x43561c;});this[_0xa1433d(0x130)]=_0x22941c||[],this[_0xa1433d(0x131)]?.['fetch']();}['getTabConfigTabValues'](){const _0x57d7bb=a0_0x4378d8;let _0x18e32d={'tab':[]},_0xb8dde0=this[_0x57d7bb(0x128)](_0x57d7bb(0x137));return this[_0x57d7bb(0x129)](_0xb8dde0)?.[_0x57d7bb(0x121)](_0x2dfd37=>{const _0x234dbc=_0x57d7bb;var {name:_0x16332d,display:_0x40b11b,tagname:_0x4d26fa,location:_0xc303b9,parent_field:_0x143bc6,param_field:_0x515959,menu:_0x490683,icon:_0x43f7ce}=_0x2dfd37;_0x16332d&&_0x4d26fa&&_0xc303b9&&_0x490683&&(_0x40b11b||(_0x40b11b=_0x16332d),_0x143bc6||(_0x143bc6='id'),_0x515959||(_0x515959='param_field'),_0x18e32d[_0x234dbc(0x127)]['push']({'name':_0x16332d,'display':_0x40b11b,'tagname':_0x4d26fa,'location':_0xc303b9,'parent_field':_0x143bc6,'param_field':_0x515959,'menu':_0x490683,'icon':_0x43f7ce}));}),_0x18e32d;}['renderTabConfigTab'](){const _0x30671b=a0_0x4378d8;return html`
2
+ <ox-grist auto-fetch id="tab-tab-grid" .config=${this['tabTabGridConfig']} .mode='GRID'
3
+ .fetchHandler=${this[_0x30671b(0x151)][_0x30671b(0x142)](this)}>
4
+ </ox-grist>`;}get[a0_0x4378d8(0x131)](){const _0x402883=a0_0x4378d8;return this['shadowRoot'][_0x402883(0x13c)](_0x402883(0x144));}async[a0_0x4378d8(0x151)](){const _0x25f81c=a0_0x4378d8;return{'total':0x0,'records':this[_0x25f81c(0x130)]||[]};}async[a0_0x4378d8(0x124)](){const _0x42e9a1=a0_0x4378d8;this[_0x42e9a1(0x139)]={'rows':MetaApi[_0x42e9a1(0x12d)](!0x0),'pagination':{'infinite':!0x0},'sorters':[{'name':_0x42e9a1(0x135),'desc':!0x1}],'appendable':!0x0,'columns':[...MetaApi[_0x42e9a1(0x150)](!0x1,!0x1),{'type':'gutter','gutterName':_0x42e9a1(0x14c),'icon':_0x42e9a1(0x122),'handlers':{'click':(_0x4d6315,_0x28c0fe,_0x3a3ea6,_0x2f05a9,_0x59e008)=>{const _0x747f4f=_0x42e9a1;_0x2f05a9['id']&&this[_0x747f4f(0x123)](this[_0x747f4f(0x131)],_0x2f05a9);}}},{'type':'string','name':'id','hidden':!0x0},{'type':_0x42e9a1(0x13d),'name':'rank','header':TermsUtil[_0x42e9a1(0x12e)]('rank'),'sortable':!0x1,'width':0x32,'record':{'align':_0x42e9a1(0x141),'editable':!0x0,'mandatory':!0x0}},{'type':_0x42e9a1(0x13f),'name':_0x42e9a1(0x133),'header':TermsUtil[_0x42e9a1(0x12e)]('name'),'sortable':!0x1,'width':0x6e,'record':{'align':_0x42e9a1(0x140),'editable':!0x0,'mandatory':!0x0}},{'type':_0x42e9a1(0x13f),'name':_0x42e9a1(0x14f),'header':TermsUtil[_0x42e9a1(0x12e)](_0x42e9a1(0x14f)),'sortable':!0x1,'width':0x6e,'record':{'align':_0x42e9a1(0x140),'editable':!0x0,'mandatory':!0x0}},{'type':_0x42e9a1(0x13f),'name':_0x42e9a1(0x12f),'header':TermsUtil[_0x42e9a1(0x12e)]('icon'),'sortable':!0x0,'width':0x55,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x42e9a1(0x12b),'header':TermsUtil[_0x42e9a1(0x12e)](_0x42e9a1(0x145)),'sortable':!0x1,'width':0x96,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x42e9a1(0x147),'header':TermsUtil[_0x42e9a1(0x12e)](_0x42e9a1(0x143)),'sortable':!0x1,'width':0x96,'record':{'align':_0x42e9a1(0x140),'editable':!0x0,'mandatory':!0x0}},{'type':_0x42e9a1(0x13f),'name':_0x42e9a1(0x125),'header':TermsUtil[_0x42e9a1(0x12e)](_0x42e9a1(0x126)),'sortable':!0x1,'width':0x145,'record':{'align':'left','editable':!0x0,'mandatory':!0x0}},{'type':'string','name':_0x42e9a1(0x14b),'header':TermsUtil[_0x42e9a1(0x12e)](_0x42e9a1(0x13b)),'sortable':!0x1,'width':0x64,'record':{'align':_0x42e9a1(0x140),'editable':!0x0,'mandatory':!0x0}},{'type':'string','name':'param_field','header':TermsUtil[_0x42e9a1(0x12e)]('params'),'sortable':!0x1,'width':0x5a,'record':{'align':_0x42e9a1(0x140),'editable':!0x0,'mandatory':!0x0}}]};}};
@@ -1,4 +1,4 @@
1
- var a0_0x443e99=a0_0x5927;(function(_0x3da14a,_0x29ed68){var _0xc8e277=a0_0x5927,_0xaedaee=_0x3da14a();while(!![]){try{var _0x20275a=-parseInt(_0xc8e277(0xbb))/0x1+-parseInt(_0xc8e277(0xb8))/0x2+parseInt(_0xc8e277(0xb9))/0x3+parseInt(_0xc8e277(0xba))/0x4+-parseInt(_0xc8e277(0xb0))/0x5+parseInt(_0xc8e277(0xb6))/0x6*(-parseInt(_0xc8e277(0xb7))/0x7)+parseInt(_0xc8e277(0xb2))/0x8;if(_0x20275a===_0x29ed68)break;else _0xaedaee['push'](_0xaedaee['shift']());}catch(_0x1d1ca6){_0xaedaee['push'](_0xaedaee['shift']());}}}(a0_0x234c,0x82296));import{html,css}from'lit-element';function a0_0x234c(){var _0x271b37=['tText','24906904AMsysi','operato-tools-main','tool\x20start\x20msg','styles','4714266TNUczi','7lzYsXK','2099600aSHKkF','2005248rQZWKF','284792IQrHEl','888672xNFYiq','context','2978260YVpVqJ'];a0_0x234c=function(){return _0x271b37;};return a0_0x234c();}import{connect}from'pwa-helpers/connect-mixin.js';function a0_0x5927(_0x5fd1c6,_0x4472be){var _0x234ca7=a0_0x234c();return a0_0x5927=function(_0x592786,_0x596af4){_0x592786=_0x592786-0xb0;var _0x1e7ea0=_0x234ca7[_0x592786];return _0x1e7ea0;},a0_0x5927(_0x5fd1c6,_0x4472be);}import{store,PageView}from'@things-factory/shell';import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get[a0_0x443e99(0xb5)](){return[css`
1
+ var a0_0x297013=a0_0x456c;(function(_0x39d8c7,_0x2f30a6){var _0x34cbec=a0_0x456c,_0x21972f=_0x39d8c7();while(!![]){try{var _0x2f79a9=parseInt(_0x34cbec(0x11f))/0x1*(parseInt(_0x34cbec(0x12c))/0x2)+parseInt(_0x34cbec(0x123))/0x3+-parseInt(_0x34cbec(0x124))/0x4*(-parseInt(_0x34cbec(0x12d))/0x5)+parseInt(_0x34cbec(0x128))/0x6+-parseInt(_0x34cbec(0x129))/0x7+parseInt(_0x34cbec(0x122))/0x8+parseInt(_0x34cbec(0x12a))/0x9*(-parseInt(_0x34cbec(0x125))/0xa);if(_0x2f79a9===_0x2f30a6)break;else _0x21972f['push'](_0x21972f['shift']());}catch(_0x52f20c){_0x21972f['push'](_0x21972f['shift']());}}}(a0_0x381b,0x291eb));import{html,css}from'lit-element';import{connect}from'pwa-helpers/connect-mixin.js';import{store,PageView}from'@things-factory/shell';function a0_0x456c(_0x333cd2,_0x525fbb){var _0x381b1a=a0_0x381b();return a0_0x456c=function(_0x456c7a,_0x458d56){_0x456c7a=_0x456c7a-0x11f;var _0x5841c7=_0x381b1a[_0x456c7a];return _0x5841c7;},a0_0x456c(_0x333cd2,_0x525fbb);}function a0_0x381b(){var _0x289774=['19512TitJBJ','customElements','79850ohDFFS','264785vqduGb','operato-tools-main','5gdFTDp','context','define','2434112pBwOTZ','312417fsTYco','4ytoSWE','1490tqmkEd','Operato\x20Tools','tool\x20start\x20msg','172542rJMRmd','1387981Okpgej'];a0_0x381b=function(){return _0x289774;};return a0_0x381b();}import{TermsUtil}from'@things-factory/meta-ui';class OperatoToolsMain extends connect(store)(PageView){static get['styles'](){return[css`
2
2
  :host {
3
3
  display: block;
4
4
  background-color: var(--main-section-background-color);
@@ -41,11 +41,11 @@ var a0_0x443e99=a0_0x5927;(function(_0x3da14a,_0x29ed68){var _0xc8e277=a0_0x5927
41
41
  display: none;
42
42
  }
43
43
  }
44
- `];}get[a0_0x443e99(0xbc)](){return{'title':'Operato\x20Tools','actions':[]};}['render'](){var _0x1503ae=a0_0x443e99;return html`
44
+ `];}get[a0_0x297013(0x120)](){var _0x288e46=a0_0x297013;return{'title':_0x288e46(0x126),'actions':[]};}['render'](){var _0x33dd1f=a0_0x297013;return html`
45
45
  <h2>Operato Tools</h2>
46
46
  <p page-description>
47
- ${TermsUtil[_0x1503ae(0xb1)](_0x1503ae(0xb4))}
47
+ ${TermsUtil['tText'](_0x33dd1f(0x127))}
48
48
  </p>
49
49
 
50
50
  <img src="/assets/images/operato-tools.png" />
51
- `;}}window['customElements']['define'](a0_0x443e99(0xb3),OperatoToolsMain);
51
+ `;}}window[a0_0x297013(0x12b)][a0_0x297013(0x121)](a0_0x297013(0x12e),OperatoToolsMain);
@@ -1 +1 @@
1
- const a0_0x3fdf69=a0_0xda06;(function(_0x2a1eca,_0x3859d0){const _0x4f5107=a0_0xda06,_0x5bb62f=_0x2a1eca();while(!![]){try{const _0x56f995=parseInt(_0x4f5107(0x17a))/0x1+parseInt(_0x4f5107(0x180))/0x2+-parseInt(_0x4f5107(0x17f))/0x3+parseInt(_0x4f5107(0x178))/0x4+parseInt(_0x4f5107(0x17c))/0x5*(parseInt(_0x4f5107(0x17b))/0x6)+parseInt(_0x4f5107(0x174))/0x7*(parseInt(_0x4f5107(0x179))/0x8)+-parseInt(_0x4f5107(0x181))/0x9;if(_0x56f995===_0x3859d0)break;else _0x5bb62f['push'](_0x5bb62f['shift']());}catch(_0x45bf21){_0x5bb62f['push'](_0x5bb62f['shift']());}}}(a0_0x3b53,0xed337));import a0_0x5de706 from'graphql-tag';import{i18next}from'@operato/i18n';import{store}from'@operato/shell';function a0_0x3b53(){const _0x2f5d91=['21015837XwkdDT','type','7AnJyOS','studioPermission','data','dispatch','114132JjCZqT','11562040GqQDwK','1782006xZkORI','18cCfYfk','828950uWOkFF','errors','UPDATE_OPERATO_TOOLS_PERMISSION','2277105SZQeuW','625078CqIOuD'];a0_0x3b53=function(){return _0x2f5d91;};return a0_0x3b53();}import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':'ABC','studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x3fdf69(0x17e);((async()=>{const _0x4cf058=a0_0x3fdf69;var _0x2cd2b8=await client['query']({'query':a0_0x5de706`{studioPermission}`});let _0x4d8fbd=!0x1;_0x2cd2b8[_0x4cf058(0x17d)]||(_0x4d8fbd=_0x2cd2b8[_0x4cf058(0x176)][_0x4cf058(0x175)]),store[_0x4cf058(0x177)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0x4d8fbd}});})());function a0_0xda06(_0x4a37d7,_0x4a4a9d){const _0x3b5332=a0_0x3b53();return a0_0xda06=function(_0xda065a,_0x438172){_0xda065a=_0xda065a-0x173;let _0x306373=_0x3b5332[_0xda065a];return _0x306373;},a0_0xda06(_0x4a37d7,_0x4a4a9d);}const operatoTools=(_0x2f1a46=INITIAL_STATE,_0x38f989)=>{const _0x1f801d=a0_0x3fdf69;switch(_0x38f989[_0x1f801d(0x173)]){case UPDATE_OPERATO_TOOLS:return{..._0x2f1a46};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x38f989['state']};default:return _0x2f1a46;}};export default operatoTools;
1
+ const a0_0x27e0f5=a0_0x100d;function a0_0x37ed(){const _0x6cd24e=['814818mCWaoo','2576375GCPwtM','1618rSJsuc','1239210cavdmL','245CuDukJ','12816882lwKDou','2236608wqHXGA','138OPgedQ','query','UPDATE_OPERATO_TOOLS_PERMISSION','state','ABC','data','53080kTEZtZ','dispatch','type'];a0_0x37ed=function(){return _0x6cd24e;};return a0_0x37ed();}(function(_0x5e40de,_0x394aaf){const _0x46e4ba=a0_0x100d,_0x298b49=_0x5e40de();while(!![]){try{const _0x2eaba1=parseInt(_0x46e4ba(0x1a4))/0x1*(-parseInt(_0x46e4ba(0x1a9))/0x2)+parseInt(_0x46e4ba(0x1a5))/0x3+-parseInt(_0x46e4ba(0x1a8))/0x4+-parseInt(_0x46e4ba(0x1a3))/0x5+-parseInt(_0x46e4ba(0x1a2))/0x6+-parseInt(_0x46e4ba(0x1a6))/0x7*(parseInt(_0x46e4ba(0x1af))/0x8)+parseInt(_0x46e4ba(0x1a7))/0x9;if(_0x2eaba1===_0x394aaf)break;else _0x298b49['push'](_0x298b49['shift']());}catch(_0x5a3b5a){_0x298b49['push'](_0x298b49['shift']());}}}(a0_0x37ed,0x451bf));import a0_0x325703 from'graphql-tag';import{i18next}from'@operato/i18n';function a0_0x100d(_0x3ddef4,_0x1873ca){const _0x37edbe=a0_0x37ed();return a0_0x100d=function(_0x100de1,_0x5d631e){_0x100de1=_0x100de1-0x1a2;let _0x39e777=_0x37edbe[_0x100de1];return _0x39e777;},a0_0x100d(_0x3ddef4,_0x1873ca);}import{store}from'@operato/shell';import{client,gqlContext}from'@operato/graphql';import{UPDATE_OPERATO_TOOLS}from'../actions/main';const INITIAL_STATE={'operatoTools':a0_0x27e0f5(0x1ad),'studioPermission':!0x1};export const UPDATE_OPERATO_TOOLS_PERMISSION=a0_0x27e0f5(0x1ab);((async()=>{const _0x2037c9=a0_0x27e0f5;var _0x259d63=await client[_0x2037c9(0x1aa)]({'query':a0_0x325703`{studioPermission}`});let _0xda47bc=!0x1;_0x259d63['errors']||(_0xda47bc=_0x259d63[_0x2037c9(0x1ae)]['studioPermission']),store[_0x2037c9(0x1b0)]({'type':UPDATE_OPERATO_TOOLS_PERMISSION,'state':{'studioPermission':_0xda47bc}});})());const operatoTools=(_0x36f368=INITIAL_STATE,_0x285832)=>{const _0x409c12=a0_0x27e0f5;switch(_0x285832[_0x409c12(0x1b1)]){case UPDATE_OPERATO_TOOLS:return{..._0x36f368};case UPDATE_OPERATO_TOOLS_PERMISSION:return{...INITIAL_STATE,..._0x285832[_0x409c12(0x1ac)]};default:return _0x36f368;}};export default operatoTools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-tools",
3
- "version": "6.1.85",
3
+ "version": "6.1.87",
4
4
  "main": "server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -29,12 +29,12 @@
29
29
  "docker:run": "docker run -it -p 4000:3000 hatiolab/operato-tools:latest"
30
30
  },
31
31
  "dependencies": {
32
- "@things-factory/meta-ui": "^6.1.84",
32
+ "@things-factory/meta-ui": "^6.1.87",
33
33
  "@things-factory/operato-license-checker": "^3.1.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@things-factory/builder": "^6.1.85",
37
37
  "@things-factory/meta-ui": "^6.0.0-alpha.6"
38
38
  },
39
- "gitHead": "5ebda26d71b4181008aea1b2eb8cd9169928e55d"
39
+ "gitHead": "7bd2bd5ae49b9a2d60383bdb0022bc0227fd094e"
40
40
  }
@@ -1 +1 @@
1
- 'use strict';function a0_0x5c67(_0x54492f,_0x45d626){var _0x328eea=a0_0x328e();return a0_0x5c67=function(_0x5c67a1,_0x140b2d){_0x5c67a1=_0x5c67a1-0x167;var _0x41b829=_0x328eea[_0x5c67a1];return _0x41b829;},a0_0x5c67(_0x54492f,_0x45d626);}var a0_0x417d3f=a0_0x5c67;function a0_0x328e(){var _0x5b91e3=['8288VKgfiS','2917476bomlIb','543448HKuBKN','52690wFvNWA','126ucEgnB','70714prSkgK','90xVZJke','__esModule','1033140KlosbK','error.page\x20count\x20over\x20license\x20limit','7723050RzlMFH','OVER_LIMIT','3560twdZqX','315DIyRHF','error.invalid\x20license\x20key'];a0_0x328e=function(){return _0x5b91e3;};return a0_0x328e();}(function(_0x14e973,_0x24c3ec){var _0x400b29=a0_0x5c67,_0x4999c3=_0x14e973();while(!![]){try{var _0x6ca0c0=parseInt(_0x400b29(0x16d))/0x1+parseInt(_0x400b29(0x16a))/0x2*(parseInt(_0x400b29(0x16b))/0x3)+parseInt(_0x400b29(0x174))/0x4*(parseInt(_0x400b29(0x172))/0x5)+parseInt(_0x400b29(0x16f))/0x6+parseInt(_0x400b29(0x169))/0x7*(-parseInt(_0x400b29(0x167))/0x8)+parseInt(_0x400b29(0x175))/0x9+parseInt(_0x400b29(0x171))/0xa*(-parseInt(_0x400b29(0x168))/0xb);if(_0x6ca0c0===_0x24c3ec)break;else _0x4999c3['push'](_0x4999c3['shift']());}catch(_0x4d2a64){_0x4999c3['push'](_0x4999c3['shift']());}}}(a0_0x328e,0xdd9cf));Object['defineProperty'](exports,a0_0x417d3f(0x16c),{'value':!0x0}),exports['OVER_LIMIT']=exports['INVALID_LICENSE']=void 0x0,exports['INVALID_LICENSE']=a0_0x417d3f(0x173),exports[a0_0x417d3f(0x170)]=a0_0x417d3f(0x16e);
1
+ 'use strict';var a0_0x387f04=a0_0x57c3;function a0_0xa4b2(){var _0x34fbf2=['OVER_LIMIT','error.invalid\x20license\x20key','63wRzFBt','1770312csOyrE','6iaSzYp','765632jdEaCd','__esModule','2588lFRvKu','defineProperty','2645375xEuBia','3091354vBcYxt','INVALID_LICENSE','4wesSzd','909aZOjbj','1634020FcevRG','22cMWZkj','70002TrnMdM'];a0_0xa4b2=function(){return _0x34fbf2;};return a0_0xa4b2();}function a0_0x57c3(_0x61c5ee,_0x3c26b7){var _0xa4b2fb=a0_0xa4b2();return a0_0x57c3=function(_0x57c3b3,_0x5a759e){_0x57c3b3=_0x57c3b3-0x14b;var _0x11e3e2=_0xa4b2fb[_0x57c3b3];return _0x11e3e2;},a0_0x57c3(_0x61c5ee,_0x3c26b7);}(function(_0x5c5737,_0x34becf){var _0x3e8d4c=a0_0x57c3,_0x34dd3e=_0x5c5737();while(!![]){try{var _0x586bb7=parseInt(_0x3e8d4c(0x14e))/0x1*(-parseInt(_0x3e8d4c(0x15b))/0x2)+parseInt(_0x3e8d4c(0x14b))/0x3*(-parseInt(_0x3e8d4c(0x156))/0x4)+-parseInt(_0x3e8d4c(0x158))/0x5+parseInt(_0x3e8d4c(0x153))/0x6*(parseInt(_0x3e8d4c(0x159))/0x7)+-parseInt(_0x3e8d4c(0x154))/0x8*(-parseInt(_0x3e8d4c(0x151))/0x9)+-parseInt(_0x3e8d4c(0x14c))/0xa+parseInt(_0x3e8d4c(0x14d))/0xb*(parseInt(_0x3e8d4c(0x152))/0xc);if(_0x586bb7===_0x34becf)break;else _0x34dd3e['push'](_0x34dd3e['shift']());}catch(_0x322edf){_0x34dd3e['push'](_0x34dd3e['shift']());}}}(a0_0xa4b2,0x5c4e0));Object[a0_0x387f04(0x157)](exports,a0_0x387f04(0x155),{'value':!0x0}),exports[a0_0x387f04(0x14f)]=exports[a0_0x387f04(0x15a)]=void 0x0,exports[a0_0x387f04(0x15a)]=a0_0x387f04(0x150),exports['OVER_LIMIT']='error.page\x20count\x20over\x20license\x20limit';
@@ -1 +1 @@
1
- 'use strict';const a0_0xd25192=a0_0x11b0;(function(_0x215f26,_0x220b54){const _0x14cf18=a0_0x11b0,_0xb9e759=_0x215f26();while(!![]){try{const _0x4a95ca=-parseInt(_0x14cf18(0x1d0))/0x1*(parseInt(_0x14cf18(0x1da))/0x2)+-parseInt(_0x14cf18(0x1dd))/0x3+parseInt(_0x14cf18(0x1de))/0x4*(parseInt(_0x14cf18(0x1cc))/0x5)+-parseInt(_0x14cf18(0x1d4))/0x6*(-parseInt(_0x14cf18(0x1d8))/0x7)+-parseInt(_0x14cf18(0x1d5))/0x8*(parseInt(_0x14cf18(0x1d7))/0x9)+-parseInt(_0x14cf18(0x1d2))/0xa*(parseInt(_0x14cf18(0x1d3))/0xb)+parseInt(_0x14cf18(0x1ce))/0xc;if(_0x4a95ca===_0x220b54)break;else _0xb9e759['push'](_0xb9e759['shift']());}catch(_0x594ffd){_0xb9e759['push'](_0xb9e759['shift']());}}}(a0_0x1ea8,0x5d256));function a0_0x1ea8(){const _0xfd950e=['42378rScSvT','88OMTnBZ','../constants/error-code','450153wssSfD','203NSYQXk','tslib','2TlhMpJ','LicenseError','ERROR_CODES','666213NcdmKq','2832304UhGUtS','errorCode','5vXgUcP','detail','8947452oaEOOp','name','389362ObyHfP','defineProperty','20JUSrXq','634579XkZFkD'];a0_0x1ea8=function(){return _0xfd950e;};return a0_0x1ea8();}function a0_0x11b0(_0x2d7463,_0x58fe35){const _0x1ea877=a0_0x1ea8();return a0_0x11b0=function(_0x11b04a,_0x5cf22a){_0x11b04a=_0x11b04a-0x1cc;let _0xbc856d=_0x1ea877[_0x11b04a];return _0xbc856d;},a0_0x11b0(_0x2d7463,_0x58fe35);}Object[a0_0xd25192(0x1d1)](exports,'__esModule',{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0xd25192(0x1d9)),ERROR_CODES=tslib_1['__importStar'](require(a0_0xd25192(0x1d6)));class LicenseError extends Error{static get[a0_0xd25192(0x1dc)](){return Object['assign']({},ERROR_CODES);}constructor({errorCode:_0x3f3707,detail:_0xaae050}){const _0x41d5ce=a0_0xd25192;super(_0x3f3707),this[_0x41d5ce(0x1cf)]='license-error',this[_0x41d5ce(0x1df)]=_0x3f3707,this[_0x41d5ce(0x1cd)]=_0xaae050;}}exports[a0_0xd25192(0x1db)]=LicenseError;
1
+ 'use strict';function a0_0x41c8(){const _0x44b2b3=['649445zjALzG','6WLfcVd','tslib','errorCode','detail','8lTdPXU','3HAtuQB','LicenseError','../constants/error-code','__esModule','4897915wDEnuU','6454611gGLbOo','2419532pieKjf','13447704GIkpBr','ERROR_CODES','10kFRPBH','assign','7065051gROCmQ','license-error','444362HVFYVd'];a0_0x41c8=function(){return _0x44b2b3;};return a0_0x41c8();}const a0_0x4daccf=a0_0x19f4;(function(_0x332d50,_0x4122a7){const _0x1ce482=a0_0x19f4,_0x5b1b81=_0x332d50();while(!![]){try{const _0x2d276b=parseInt(_0x1ce482(0x7d))/0x1*(parseInt(_0x1ce482(0x83))/0x2)+-parseInt(_0x1ce482(0x84))/0x3*(parseInt(_0x1ce482(0x8a))/0x4)+-parseInt(_0x1ce482(0x7e))/0x5*(-parseInt(_0x1ce482(0x7f))/0x6)+parseInt(_0x1ce482(0x7b))/0x7+-parseInt(_0x1ce482(0x8b))/0x8+-parseInt(_0x1ce482(0x89))/0x9*(-parseInt(_0x1ce482(0x79))/0xa)+-parseInt(_0x1ce482(0x88))/0xb;if(_0x2d276b===_0x4122a7)break;else _0x5b1b81['push'](_0x5b1b81['shift']());}catch(_0x3fabda){_0x5b1b81['push'](_0x5b1b81['shift']());}}}(a0_0x41c8,0xdc62a));Object['defineProperty'](exports,a0_0x4daccf(0x87),{'value':!0x0}),exports['LicenseError']=void 0x0;const tslib_1=require(a0_0x4daccf(0x80)),ERROR_CODES=tslib_1['__importStar'](require(a0_0x4daccf(0x86)));class LicenseError extends Error{static get[a0_0x4daccf(0x8c)](){const _0x1b3e2a=a0_0x4daccf;return Object[_0x1b3e2a(0x7a)]({},ERROR_CODES);}constructor({errorCode:_0x4cb3e2,detail:_0x1d6547}){const _0x57303a=a0_0x4daccf;super(_0x4cb3e2),this['name']=_0x57303a(0x7c),this[_0x57303a(0x81)]=_0x4cb3e2,this[_0x57303a(0x82)]=_0x1d6547;}}function a0_0x19f4(_0x3af6d2,_0x3115e4){const _0x41c89e=a0_0x41c8();return a0_0x19f4=function(_0x19f42f,_0x3eace1){_0x19f42f=_0x19f42f-0x79;let _0x1a2a5f=_0x41c89e[_0x19f42f];return _0x1a2a5f;},a0_0x19f4(_0x3af6d2,_0x3115e4);}exports[a0_0x4daccf(0x85)]=LicenseError;
package/server/routes.js CHANGED
@@ -1 +1 @@
1
- function a0_0x5ad0(){const _0x3418f8=['bootstrap-module-global-public-route','bootstrap-module-domain-private-route','11661824pUozkB','bootstrap-module-global-private-route','3ylKzQB','379997ZmYENC','bootstrap-module-domain-public-route','63gFnEzn','debug','things-factory:operato-tools:routes','4496524SJOUSY','6819015DhBEMD','30597192EABLLU','168036SQyeNP','2156210GnKgxC'];a0_0x5ad0=function(){return _0x3418f8;};return a0_0x5ad0();}const a0_0x50eb3f=a0_0x2a73;function a0_0x2a73(_0x54c8b0,_0x10fa03){const _0x5ad0d8=a0_0x5ad0();return a0_0x2a73=function(_0x2a7338,_0x564b67){_0x2a7338=_0x2a7338-0xb1;let _0x1472de=_0x5ad0d8[_0x2a7338];return _0x1472de;},a0_0x2a73(_0x54c8b0,_0x10fa03);}(function(_0x4f0760,_0xf81ae4){const _0x1f0eb3=a0_0x2a73,_0x581a4c=_0x4f0760();while(!![]){try{const _0x37747b=parseInt(_0x1f0eb3(0xb1))/0x1+-parseInt(_0x1f0eb3(0xba))/0x2+parseInt(_0x1f0eb3(0xbf))/0x3*(parseInt(_0x1f0eb3(0xb6))/0x4)+-parseInt(_0x1f0eb3(0xb7))/0x5+parseInt(_0x1f0eb3(0xb9))/0x6*(-parseInt(_0x1f0eb3(0xb3))/0x7)+-parseInt(_0x1f0eb3(0xbd))/0x8+parseInt(_0x1f0eb3(0xb8))/0x9;if(_0x37747b===_0xf81ae4)break;else _0x581a4c['push'](_0x581a4c['shift']());}catch(_0x48d3f1){_0x581a4c['push'](_0x581a4c['shift']());}}}(a0_0x5ad0,0xb79fe));const debug=require(a0_0x50eb3f(0xb4))(a0_0x50eb3f(0xb5));process['on'](a0_0x50eb3f(0xbb),(_0x18a265,_0x53a7c4)=>{}),process['on'](a0_0x50eb3f(0xbe),(_0x51e79c,_0x4e0736)=>{}),process['on'](a0_0x50eb3f(0xb2),(_0x15a624,_0x38ec2d)=>{}),process['on'](a0_0x50eb3f(0xbc),(_0x561883,_0x2218fe)=>{});
1
+ const a0_0xb6eb0f=a0_0x1e9a;function a0_0x1e9a(_0x58e8e7,_0x276e5a){const _0x31e323=a0_0x31e3();return a0_0x1e9a=function(_0x1e9adc,_0x687c0c){_0x1e9adc=_0x1e9adc-0xd2;let _0x444df1=_0x31e323[_0x1e9adc];return _0x444df1;},a0_0x1e9a(_0x58e8e7,_0x276e5a);}(function(_0x55399e,_0x46bbe4){const _0x5a6365=a0_0x1e9a,_0x4be716=_0x55399e();while(!![]){try{const _0x934a18=-parseInt(_0x5a6365(0xdd))/0x1*(parseInt(_0x5a6365(0xdf))/0x2)+parseInt(_0x5a6365(0xd9))/0x3+-parseInt(_0x5a6365(0xd6))/0x4+parseInt(_0x5a6365(0xde))/0x5*(-parseInt(_0x5a6365(0xd7))/0x6)+-parseInt(_0x5a6365(0xd3))/0x7+-parseInt(_0x5a6365(0xdc))/0x8+parseInt(_0x5a6365(0xd2))/0x9;if(_0x934a18===_0x46bbe4)break;else _0x4be716['push'](_0x4be716['shift']());}catch(_0x1d5cd9){_0x4be716['push'](_0x4be716['shift']());}}}(a0_0x31e3,0xd436b));const debug=require('debug')(a0_0xb6eb0f(0xd8));process['on'](a0_0xb6eb0f(0xda),(_0x577968,_0x2639fe)=>{}),process['on'](a0_0xb6eb0f(0xd5),(_0x1ddac3,_0x1f5004)=>{}),process['on'](a0_0xb6eb0f(0xdb),(_0x7ddaec,_0x4cc638)=>{}),process['on'](a0_0xb6eb0f(0xd4),(_0x5a3455,_0x2bc8a4)=>{});function a0_0x31e3(){const _0x3f60b2=['6054oaVsUJ','things-factory:operato-tools:routes','3753024tfnmnA','bootstrap-module-global-public-route','bootstrap-module-domain-public-route','6368712rFHKkE','1ngemcU','2770iJWldY','3383020niXTfp','37934325hhqadI','5722577XCLNAY','bootstrap-module-domain-private-route','bootstrap-module-global-private-route','2930440FjHBQW'];a0_0x31e3=function(){return _0x3f60b2;};return a0_0x31e3();}
@@ -1 +1 @@
1
- 'use strict';const a0_0x4b6842=a0_0x53b6;(function(_0x57dcca,_0x58b881){const _0x53639c=a0_0x53b6,_0x5151ff=_0x57dcca();while(!![]){try{const _0x4e6c7c=-parseInt(_0x53639c(0x20c))/0x1*(parseInt(_0x53639c(0x1b4))/0x2)+-parseInt(_0x53639c(0x1be))/0x3+parseInt(_0x53639c(0x1bd))/0x4+parseInt(_0x53639c(0x1fb))/0x5*(parseInt(_0x53639c(0x1f5))/0x6)+parseInt(_0x53639c(0x1d4))/0x7*(parseInt(_0x53639c(0x1d1))/0x8)+-parseInt(_0x53639c(0x1fe))/0x9+parseInt(_0x53639c(0x1f4))/0xa;if(_0x4e6c7c===_0x58b881)break;else _0x5151ff['push'](_0x5151ff['shift']());}catch(_0xd8f4d2){_0x5151ff['push'](_0x5151ff['shift']());}}}(a0_0x2682,0xc2033));function a0_0x2682(){const _0x31d511=['Directive','__esModule',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','map','updatedAt','\x22,\x22desc\x22:','refType','gridRank','design:returntype','sortRank','searchOper','final','dataProp','lodash','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','updater_id','aes-256-ofb',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','@things-factory/menu-base','find','\x27\x20or\x20id\x20=\x20\x27','crypto','7118jQSnZq','toString','type-graphql','refName','Mutation','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','parent_menu_id','@transaction','\x20,\x22editable\x22:\x20','4916348RuGreX','1803792BmtBwH','searchRank','{\x22name\x22:\x22','sort','getRepository','scenario','query',',\x22mandatory\x22:\x20','left','\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}','created_at','\x22,\x22header\x22:\x20\x22','@things-factory/resource-base','default','name','replace','pluralize','design:type','select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27','10417296XRCBPb','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','menuType','7MVEMYB','tslib','__metadata','updated_at','design:paramtypes','enc','update','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','Entity','{\x22name\x22:\x20\x22','\x22,\x22name\x22:\x20\x22','hidden','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','\x22,\x22width\x22:','save','assign','createSortCols','category','checkStudioTemplateIsOverLimit','\x20,\x22exportable\x22:\x20true','__importDefault','aes256','createCipheriv','push','findOne','COPY','defineProperty','routing','join','length','randomBytes','3820660QTQGYe','330bxmkwX','rank','OperatoToolCreateMenu','stringify','aes-256-ctr','createMenuData','95585eWOSwC','aes-256-cfb','substring','9602217SKLgNY','__decorate','reverseSort','meta-grist-page','parent','./../tool-secret/tool-permission','createGridColumns','\x22,\x22hidden\x22:','prototype','EntityColumn','string','creator_id','__param','Ctx','422ChQbnw',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','aes-256-cfb1','aes-256-ecb','Arg','@things-factory/meta-ui/client/pages/meta-grist-page','filter','{\x22type\x22:\x20\x22','updater','toolCreateMenu','aes-256-cfb8','Menu','aes-256-cbc','hex','hiddenFlag','Operato\x20Tool\x20Create\x20Menu'];a0_0x2682=function(){return _0x31d511;};return a0_0x2682();}function a0_0x53b6(_0x28abe9,_0x43c432){const _0x26826a=a0_0x2682();return a0_0x53b6=function(_0x53b697,_0x5c30da){_0x53b697=_0x53b697-0x194;let _0x1f9453=_0x26826a[_0x53b697];return _0x1f9453;},a0_0x53b6(_0x28abe9,_0x43c432);}Object[a0_0x4b6842(0x1ef)](exports,a0_0x4b6842(0x19f),{'value':!0x0}),exports[a0_0x4b6842(0x1f7)]=void 0x0;const tslib_1=require(a0_0x4b6842(0x1d5)),type_graphql_1=require(a0_0x4b6842(0x1b6)),resource_base_1=require(a0_0x4b6842(0x1ca)),menu_base_1=require(a0_0x4b6842(0x1b0)),tool_permission_1=require(a0_0x4b6842(0x203)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x4b6842(0x1ab)),{plural:plural}=require(a0_0x4b6842(0x1ce)),crypto_1=tslib_1[a0_0x4b6842(0x1e9)](require(a0_0x4b6842(0x1b3)));let OperatoToolCreateMenu=class{async[a0_0x4b6842(0x197)](_0x215386,_0x47a029,_0x4a5ea7){const _0x39cf43=a0_0x4b6842,{domain:_0x5aa7dd,user:_0xd50829,tx:_0x5717aa}=_0x4a5ea7['state'];await(0x0,tool_permission_1[_0x39cf43(0x1e7)])('',_0x4a5ea7);const _0x47eb84=await _0x5717aa[_0x39cf43(0x1c2)](resource_base_1[_0x39cf43(0x1dc)])[_0x39cf43(0x1ed)]({'where':{'domain':{'id':_0x5aa7dd['id']},'id':_0x215386}}),_0x7c612c=await _0x5717aa[_0x39cf43(0x1c2)](resource_base_1[_0x39cf43(0x207)])[_0x39cf43(0x1b1)]({'where':{'domain':{'id':_0x5aa7dd['id']},'entity':{'id':_0x47eb84['id']}}});let {name:_0x31a8b4=''}=_0x47eb84||{},_0xbc1eef=kebabCase(_0x31a8b4),_0x3c44c1=modelTemplate[_0x39cf43(0x1cd)](/{{pascalCase name}}/g,startCase(camelCase(_0x31a8b4))['replace'](/ /g,''))[_0x39cf43(0x1cd)](/{{camelCase name}}/g,camelCase(_0x31a8b4))[_0x39cf43(0x1cd)](/{{snakeCase name}}/g,snakeCase(_0x31a8b4))[_0x39cf43(0x1cd)](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x31a8b4)))['replace'](/ /g,''))[_0x39cf43(0x1cd)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x31a8b4)))[_0x39cf43(0x1cd)](/{{name}}/g,_0x31a8b4),_0x5b5911='';'JSON'==_0x47eb84[_0x39cf43(0x1aa)]?_0x5b5911='\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20':_0x39cf43(0x1ee)==_0x47eb84['dataProp']&&(_0x5b5911=_0x39cf43(0x1e1)),_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{HistoryButton}}/g,_0x5b5911);let _0x4ae15b=this[_0x39cf43(0x1e5)](_0x7c612c);_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{SortColumns}}/g,_0x4ae15b[_0x39cf43(0x1f1)](','));let _0x175014=this['createSearchCols'](_0x7c612c);_0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{SearchColumns}}/g,_0x175014[_0x39cf43(0x1f1)](','));let _0x115fdd=this[_0x39cf43(0x204)](_0x7c612c);return _0x3c44c1=_0x3c44c1[_0x39cf43(0x1cd)](/{{GridColumns}}/g,_0x115fdd[_0x39cf43(0x1f1)](',')),_0x3c44c1=this[_0x39cf43(0x1d9)](_0x3c44c1),await this['createMenuData'](_0x5717aa,_0x5aa7dd,_0xd50829,_0x47a029,_0xbc1eef,_0x3c44c1),!0x0;}[a0_0x4b6842(0x204)](_0x377309){const _0x3aacf7=a0_0x4b6842;return _0x377309['filter'](_0x47fceb=>'id'!=_0x47fceb['name']&&_0x47fceb[_0x3aacf7(0x1a5)]>0x0)[_0x3aacf7(0x1c1)](function(_0x8bc2cb,_0x1e495c){const _0x1d94f4=_0x3aacf7;return _0x8bc2cb[_0x1d94f4(0x1a5)]-_0x1e495c[_0x1d94f4(0x1a5)];})[_0x3aacf7(0x1a1)](_0x344ae9=>{const _0x5e9ea4=_0x3aacf7;let {gridEditor:_0x4cd72c='string',name:_0x48ecd5,term:_0x1d0697,gridWidth:_0x3c4ace=0x0,gridAlign:_0x50ac8a='left',nullable:_0x5074f1=!0x1}=_0x344ae9;if(null==_0x4cd72c&&(_0x4cd72c='string'),null==_0x50ac8a&&(_0x50ac8a=_0x5e9ea4(0x1c6)),'updater_id'==_0x48ecd5||_0x5e9ea4(0x209)==_0x48ecd5)return _0x48ecd5=_0x5e9ea4(0x1ad)==_0x48ecd5?_0x5e9ea4(0x196):'creator',_0x5e9ea4(0x1db)+_0x48ecd5+_0x5e9ea4(0x1c9)+_0x48ecd5+_0x5e9ea4(0x1c7);if('updated_at'==_0x48ecd5||_0x5e9ea4(0x1c8)==_0x48ecd5)return _0x5e9ea4(0x1d2)+(_0x5e9ea4(0x1d7)==_0x48ecd5?_0x5e9ea4(0x1a2):'createdAt')+_0x5e9ea4(0x1c9)+_0x48ecd5+_0x5e9ea4(0x1e0);let _0x5919ee='readonly'!=_0x4cd72c&&_0x5e9ea4(0x1df)!=_0x4cd72c,_0x152bd9=_0x5e9ea4(0x1df)==_0x4cd72c;0x1!=_0x152bd9&&0x0!=_0x5919ee||(_0x4cd72c=_0x5e9ea4(0x208));let _0x158c10=_0x5e9ea4(0x195)+_0x4cd72c+_0x5e9ea4(0x1de)+camelCase(_0x48ecd5)+_0x5e9ea4(0x1c9)+_0x1d0697+_0x5e9ea4(0x205)+_0x152bd9+_0x5e9ea4(0x1bc)+_0x5919ee+_0x5e9ea4(0x1c5)+!_0x5074f1+_0x5e9ea4(0x1a0)+_0x50ac8a+_0x5e9ea4(0x1e2)+_0x3c4ace+_0x5e9ea4(0x1e8);return'code'==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22'+_0x344ae9['refName']+'\x22}'),_0x5e9ea4(0x1c3)==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=_0x5e9ea4(0x1af)+_0x344ae9[_0x5e9ea4(0x1b7)]+'\x22}'),'entity'==_0x344ae9[_0x5e9ea4(0x1a4)]&&(_0x158c10+=_0x5e9ea4(0x20d)+camelCase(plural(_0x344ae9[_0x5e9ea4(0x1b7)]))+_0x5e9ea4(0x1ac)),_0x158c10+='}',_0x158c10;});}['createSearchCols'](_0x1b1d51){const _0x9d9b80=a0_0x4b6842;return _0x1b1d51[_0x9d9b80(0x194)](_0x48a7c0=>_0x48a7c0[_0x9d9b80(0x1bf)]>0x0)[_0x9d9b80(0x1c1)](function(_0x20edff,_0x382a90){const _0xcf7125=_0x9d9b80;return _0x20edff[_0xcf7125(0x1bf)]-_0x382a90['searchRank'];})[_0x9d9b80(0x1a1)](_0x2b6516=>{const _0x4f9456=_0x9d9b80;let _0x1e37de=_0x2b6516[_0x4f9456(0x1a8)];return _0x4f9456(0x194)==_0x1e37de?'\x22'+camelCase(_0x2b6516['name'])+'\x22':(_0x1e37de||(_0x1e37de='eq'),_0x4f9456(0x1dd)+camelCase(_0x2b6516['name'])+'\x22,\x22operator\x22:\x20\x22'+_0x1e37de+'\x22}');});}['createSortCols'](_0x233d8d){const _0x1bfb62=a0_0x4b6842;return _0x233d8d['filter'](_0x205943=>_0x205943[_0x1bfb62(0x1a7)]>0x0)[_0x1bfb62(0x1c1)](function(_0x36649b,_0x2cfbbc){const _0x5eb9a6=_0x1bfb62;return _0x36649b[_0x5eb9a6(0x1a7)]-_0x2cfbbc[_0x5eb9a6(0x1a7)];})['map'](_0x2bfd73=>_0x1bfb62(0x1c0)+camelCase(_0x2bfd73[_0x1bfb62(0x1cc)])+_0x1bfb62(0x1a3)+_0x2bfd73[_0x1bfb62(0x200)]+'}');}async[a0_0x4b6842(0x1fa)](_0x4536af,_0x39e7b7,_0x3aee1d,_0x111781,_0xc9e88b,_0x1f5455){const _0xe7da9=a0_0x4b6842;let _0x583837=await _0x4536af[_0xe7da9(0x1c2)](menu_base_1['Menu'])[_0xe7da9(0x1ed)]({'where':{'domain':{'id':_0x39e7b7['id']},'id':_0x111781}}),_0x1482d5=(await _0x4536af[_0xe7da9(0x1c2)](menu_base_1[_0xe7da9(0x199)])[_0xe7da9(0x1c4)](_0xe7da9(0x1d0)+_0x111781+_0xe7da9(0x1b2)+_0x111781+'\x27'))[0x0][_0xe7da9(0x1f6)]+0xa,_0x5aa9b=new menu_base_1[(_0xe7da9(0x199))]();_0x5aa9b[_0xe7da9(0x1cc)]=_0xc9e88b,_0x5aa9b[_0xe7da9(0x1d3)]='SCREEN',_0x5aa9b[_0xe7da9(0x1e6)]=_0xe7da9(0x201),_0x5aa9b[_0xe7da9(0x1f6)]=_0x1482d5,_0x5aa9b[_0xe7da9(0x19c)]=!0x1,_0x5aa9b[_0xe7da9(0x1f0)]=_0xc9e88b,_0x5aa9b['template']=_0x1f5455,_0x5aa9b['resourceUrl']=_0xe7da9(0x211),_0x5aa9b[_0xe7da9(0x202)]=_0x583837,await _0x4536af['getRepository'](menu_base_1[_0xe7da9(0x199)])[_0xe7da9(0x1e3)](Object['assign'](Object[_0xe7da9(0x1e4)]({},_0x5aa9b),{'domain':_0x39e7b7,'creator':_0x3aee1d,'updater':_0x3aee1d}));}[a0_0x4b6842(0x1d9)](_0x9213ee){const _0x48a65c=a0_0x4b6842;let _0x134025=JSON[_0x48a65c(0x1f8)](_0x9213ee)['split'](/(.{100})/)[_0x48a65c(0x194)](_0x2cd974=>_0x2cd974),_0x5310a3=[_0x48a65c(0x20f),_0x48a65c(0x19a),_0x48a65c(0x1fc),_0x48a65c(0x198),_0x48a65c(0x20e),_0x48a65c(0x1ae),_0x48a65c(0x1f9),_0x48a65c(0x1ea)],_0x5465c5=crypto_1[_0x48a65c(0x1cb)][_0x48a65c(0x1f3)](0x20)[_0x48a65c(0x1b5)]('hex'),_0x219c00=Buffer['from'](_0x5465c5,_0x48a65c(0x19b)),_0x4f461c=_0x5465c5[_0x48a65c(0x1fd)](0x0,0x10),_0x3a3e55=['',_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c,_0x4f461c],_0x2bc50d=0x0,_0x2d8f0b=[];_0x2d8f0b[_0x48a65c(0x1ec)](_0x5465c5);for(var _0x3f46f7=0x0;_0x3f46f7<_0x134025[_0x48a65c(0x1f2)];_0x3f46f7++,_0x2bc50d++){_0x2bc50d==_0x5310a3[_0x48a65c(0x1f2)]&&(_0x2bc50d=0x0);let _0x416930=crypto_1[_0x48a65c(0x1cb)][_0x48a65c(0x1eb)](_0x5310a3[_0x2bc50d],_0x219c00,_0x3a3e55[_0x2bc50d]),_0x312016=_0x416930[_0x48a65c(0x1da)](_0x134025[_0x3f46f7],'utf8',_0x48a65c(0x19b));_0x312016+=_0x416930[_0x48a65c(0x1a9)](_0x48a65c(0x19b)),_0x2d8f0b[_0x48a65c(0x1ec)](_0x312016);}return _0x2d8f0b[_0x48a65c(0x1f1)]('h1z0q9i9x7q6');}};tslib_1[a0_0x4b6842(0x1ff)]([(0x0,type_graphql_1[a0_0x4b6842(0x19e)])(a0_0x4b6842(0x1bb)),(0x0,type_graphql_1[a0_0x4b6842(0x1b8)])(_0x171718=>Boolean,{'description':a0_0x4b6842(0x19d)}),tslib_1[a0_0x4b6842(0x20a)](0x0,(0x0,type_graphql_1[a0_0x4b6842(0x210)])('id')),tslib_1[a0_0x4b6842(0x20a)](0x1,(0x0,type_graphql_1[a0_0x4b6842(0x210)])(a0_0x4b6842(0x1ba))),tslib_1[a0_0x4b6842(0x20a)](0x2,(0x0,type_graphql_1[a0_0x4b6842(0x20b)])()),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1cf),Function),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1d8),[String,String,Object]),tslib_1[a0_0x4b6842(0x1d6)](a0_0x4b6842(0x1a6),Promise)],OperatoToolCreateMenu[a0_0x4b6842(0x206)],a0_0x4b6842(0x197),null),OperatoToolCreateMenu=tslib_1[a0_0x4b6842(0x1ff)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateMenu),exports[a0_0x4b6842(0x1f7)]=OperatoToolCreateMenu;const modelTemplate=a0_0x4b6842(0x1b9);
1
+ 'use strict';function a0_0x2987(){const _0x22edcc=['updated_at','readonly','SCREEN','map','createMenuData','Directive','design:returntype','prototype','string','design:paramtypes','700511pSuYjl','enc',',\x22sortable\x22:true\x20,\x22align\x22:\x20\x22','assign','resourceUrl','default','findOne','4xknbkE',',\x22select_opt\x22:{\x22type\x22:\x20\x22entity\x22,\x22args\x22:\x20{\x22queryName\x22:\x20\x22','gridRank','defineProperty','__esModule','3031704yYnxYx','\x20,\x22editable\x22:\x20','category','pluralize','./../tool-secret/tool-permission','searchOper','aes-256-cfb','8697070FKgWmM','@things-factory/resource-base','Resolver','aes-256-cfb1','\x27\x20or\x20id\x20=\x20\x27','final','2598306nsBghI','toolCreateMenu','dataProp','__decorate','\x22,\x22name\x22:\x20\x22','length','push','JSON','createSortCols','rank','refType','crypto','sort','hidden','parent','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_json\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','reverseSort','stringify','@transaction','replace','searchRank','{\x22name\x22:\x20\x22','\x22,\x22operator\x22:\x20\x22','updater_id','createdAt','EntityColumn','tslib','Ctx','\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22basic\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22label\x22:\x20\x22data_history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22icon\x22:\x20\x22history\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22logic\x22:\x20\x22history_copy\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20','sortRank','hiddenFlag','name','creator_id','4806144OgPkKN','find','@things-factory/menu-base','96dIwQtX','736699IYpesP','Entity','meta-grist-page','filter','createSearchCols','toString','__metadata','split','updater','OperatoToolCreateMenu','__param','created_at','getRepository','query','{\x22type\x22:\x20\x22object\x22,\x22name\x22:\x20\x22','Arg','aes256','join','entity','scenario','updatedAt','left','creator','{\x22type\x22:\x20\x22','save','\x22,\x22header\x22:\x20\x22','\x20,\x22exportable\x22:\x20true','{\x22type\x22:\x20\x22datetime\x22,\x22name\x22:\x20\x22','Mutation','code','refName',',\x22select_opt\x22:{\x22type\x22:\x22scenario\x22,\x22name\x22:\x22','aes-256-cfb8','randomBytes',',\x22mandatory\x22:\x20','\x22,\x22hidden\x22:','\x22,\x22width\x22:','\x22,\x22codeField\x22:\x20\x22id\x22,\x22dispField\x22:\x20\x22name\x22}}','from','parent_menu_id',',\x22select_opt\x22:{\x22type\x22:\x22code\x22,\x22name\x22:\x22','2865132YrtswJ','\x0a{\x0a\x20\x20\x22menu\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22title\x22:\x20\x22{{name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x22desc\x22:\x20\x22\x22\x0a\x20\x20},\x0a\x20\x20\x22gql\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x22query\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22list_func\x22:\x20\x22{{pluralCamelCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22find_one_func\x22:\x22{{camelCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22mutation\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22updateMultiple{{pascalCase\x20name}}\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22{{pascalCase\x20name}}Patch\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22delete\x22:{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22func\x22:\x22delete{{pluralPascalCase\x20name}}\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22button\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22export\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22add\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22delete\x22\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x22save\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20],\x0a\x20\x20\x22grid_column\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22type\x22:\x20\x22string\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22name\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22header\x22:\x20\x22id\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22hidden\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22editable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mandatory\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sortable\x22:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22align\x22:\x20\x22left\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22width\x22:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22exportable\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20},\x0a{{GridColumns}}\x0a\x20\x20],\x0a\x20\x20\x22grid\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22button\x22:[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{HistoryButton}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22option\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22mobile_mode\x22:\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22desk_mode\x22:\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22use_row_checker\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22pages\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2020,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2050,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20100,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20300\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22view_mode\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22GRID\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22LIST\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22CARD\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22sorters\x22:\x20[\x0a{{SortColumns}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20]\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x22row\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22multiple_select\x22:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22click\x22:\x20\x22select-row-toggle\x22\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20},\x0a\x20\x20\x22search\x22:\x20[\x0a{{SearchColumns}}\x0a\x20\x20]\x0a}\x0a','routing','\x22,\x22width\x22:\x20160,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22}','Operato\x20Tool\x20Create\x20Menu','Menu','lodash','template','hex'];a0_0x2987=function(){return _0x22edcc;};return a0_0x2987();}const a0_0x216125=a0_0x2a4a;(function(_0x1efe24,_0x40cb25){const _0x41778f=a0_0x2a4a,_0x14f17f=_0x1efe24();while(!![]){try{const _0x31bfb3=parseInt(_0x41778f(0x188))/0x1+parseInt(_0x41778f(0x1b1))/0x2+-parseInt(_0x41778f(0x1dd))/0x3+parseInt(_0x41778f(0x1cb))/0x4*(-parseInt(_0x41778f(0x1d7))/0x5)+parseInt(_0x41778f(0x187))/0x6*(parseInt(_0x41778f(0x1c4))/0x7)+-parseInt(_0x41778f(0x184))/0x8+parseInt(_0x41778f(0x1d0))/0x9;if(_0x31bfb3===_0x40cb25)break;else _0x14f17f['push'](_0x14f17f['shift']());}catch(_0x3ec380){_0x14f17f['push'](_0x14f17f['shift']());}}}(a0_0x2987,0xdbf8d));function a0_0x2a4a(_0x230237,_0x27257e){const _0x298714=a0_0x2987();return a0_0x2a4a=function(_0x2a4a5d,_0x2ba45d){_0x2a4a5d=_0x2a4a5d-0x17b;let _0x32e0b9=_0x298714[_0x2a4a5d];return _0x32e0b9;},a0_0x2a4a(_0x230237,_0x27257e);}Object[a0_0x216125(0x1ce)](exports,a0_0x216125(0x1cf),{'value':!0x0}),exports[a0_0x216125(0x191)]=void 0x0;const tslib_1=require(a0_0x216125(0x17d)),type_graphql_1=require('type-graphql'),resource_base_1=require(a0_0x216125(0x1d8)),menu_base_1=require(a0_0x216125(0x186)),tool_permission_1=require(a0_0x216125(0x1d4)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x216125(0x1b7)),{plural:plural}=require(a0_0x216125(0x1d3)),crypto_1=tslib_1['__importDefault'](require(a0_0x216125(0x1e8)));let OperatoToolCreateMenu=class{async[a0_0x216125(0x1de)](_0x37c634,_0x4d6cc2,_0x187254){const _0x760c25=a0_0x216125,{domain:_0x4257f3,user:_0x224b71,tx:_0x29fb46}=_0x187254['state'];await(0x0,tool_permission_1['checkStudioTemplateIsOverLimit'])('',_0x187254);const _0x17f8a6=await _0x29fb46[_0x760c25(0x194)](resource_base_1[_0x760c25(0x189)])[_0x760c25(0x1ca)]({'where':{'domain':{'id':_0x4257f3['id']},'id':_0x37c634}}),_0x3dcf10=await _0x29fb46[_0x760c25(0x194)](resource_base_1[_0x760c25(0x17c)])[_0x760c25(0x185)]({'where':{'domain':{'id':_0x4257f3['id']},'entity':{'id':_0x17f8a6['id']}}});let {name:_0x2cd117=''}=_0x17f8a6||{},_0x3ddca9=kebabCase(_0x2cd117),_0x36ad90=modelTemplate[_0x760c25(0x1f0)](/{{pascalCase name}}/g,startCase(camelCase(_0x2cd117))[_0x760c25(0x1f0)](/ /g,''))[_0x760c25(0x1f0)](/{{camelCase name}}/g,camelCase(_0x2cd117))[_0x760c25(0x1f0)](/{{snakeCase name}}/g,snakeCase(_0x2cd117))['replace'](/{{pluralPascalCase name}}/g,startCase(camelCase(plural(_0x2cd117)))[_0x760c25(0x1f0)](/ /g,''))[_0x760c25(0x1f0)](/{{pluralCamelCase name}}/g,camelCase(plural(_0x2cd117)))[_0x760c25(0x1f0)](/{{name}}/g,_0x2cd117),_0x379c97='';_0x760c25(0x1e4)==_0x17f8a6[_0x760c25(0x1df)]?_0x379c97=_0x760c25(0x1ec):'COPY'==_0x17f8a6[_0x760c25(0x1df)]&&(_0x379c97=_0x760c25(0x17f)),_0x36ad90=_0x36ad90[_0x760c25(0x1f0)](/{{HistoryButton}}/g,_0x379c97);let _0x40c216=this[_0x760c25(0x1e5)](_0x3dcf10);_0x36ad90=_0x36ad90[_0x760c25(0x1f0)](/{{SortColumns}}/g,_0x40c216['join'](','));let _0x4763b9=this['createSearchCols'](_0x3dcf10);_0x36ad90=_0x36ad90[_0x760c25(0x1f0)](/{{SearchColumns}}/g,_0x4763b9[_0x760c25(0x199)](','));let _0x5d713f=this['createGridColumns'](_0x3dcf10);return _0x36ad90=_0x36ad90[_0x760c25(0x1f0)](/{{GridColumns}}/g,_0x5d713f[_0x760c25(0x199)](',')),_0x36ad90=this['enc'](_0x36ad90),await this[_0x760c25(0x1be)](_0x29fb46,_0x4257f3,_0x224b71,_0x4d6cc2,_0x3ddca9,_0x36ad90),!0x0;}['createGridColumns'](_0x5bf218){const _0x40c7b2=a0_0x216125;return _0x5bf218[_0x40c7b2(0x18b)](_0x3e6efb=>'id'!=_0x3e6efb[_0x40c7b2(0x182)]&&_0x3e6efb[_0x40c7b2(0x1cd)]>0x0)[_0x40c7b2(0x1e9)](function(_0x132088,_0x4104d0){const _0x462299=_0x40c7b2;return _0x132088['gridRank']-_0x4104d0[_0x462299(0x1cd)];})[_0x40c7b2(0x1bd)](_0x3b89ac=>{const _0x984a76=_0x40c7b2;let {gridEditor:_0x3496c1=_0x984a76(0x1c2),name:_0x5c3a26,term:_0x16ac01,gridWidth:_0x3674d2=0x0,gridAlign:_0x2422e5=_0x984a76(0x19d),nullable:_0x4afb6b=!0x1}=_0x3b89ac;if(null==_0x3496c1&&(_0x3496c1='string'),null==_0x2422e5&&(_0x2422e5='left'),_0x984a76(0x1f4)==_0x5c3a26||_0x984a76(0x183)==_0x5c3a26)return _0x5c3a26=_0x984a76(0x1f4)==_0x5c3a26?_0x984a76(0x190):_0x984a76(0x19e),_0x984a76(0x196)+_0x5c3a26+'\x22,\x22header\x22:\x20\x22'+_0x5c3a26+'\x22,\x22width\x22:\x20100,\x22editable\x22:false,\x20\x22align\x22:\x20\x22center\x22,\x22object_opt\x22:{\x22queryName\x22:\x22users\x22}}';if(_0x984a76(0x1ba)==_0x5c3a26||_0x984a76(0x193)==_0x5c3a26)return _0x984a76(0x1a3)+(_0x984a76(0x1ba)==_0x5c3a26?_0x984a76(0x19c):_0x984a76(0x17b))+_0x984a76(0x1a1)+_0x5c3a26+_0x984a76(0x1b4);let _0xbc9641=_0x984a76(0x1bb)!=_0x3496c1&&_0x984a76(0x1ea)!=_0x3496c1,_0x4b7250=_0x984a76(0x1ea)==_0x3496c1;0x1!=_0x4b7250&&0x0!=_0xbc9641||(_0x3496c1='string');let _0x309dde=_0x984a76(0x19f)+_0x3496c1+_0x984a76(0x1e1)+camelCase(_0x5c3a26)+_0x984a76(0x1a1)+_0x16ac01+_0x984a76(0x1ab)+_0x4b7250+_0x984a76(0x1d1)+_0xbc9641+_0x984a76(0x1aa)+!_0x4afb6b+_0x984a76(0x1c6)+_0x2422e5+_0x984a76(0x1ac)+_0x3674d2+_0x984a76(0x1a2);return _0x984a76(0x1a5)==_0x3b89ac[_0x984a76(0x1e7)]&&(_0x309dde+=_0x984a76(0x1b0)+_0x3b89ac['refName']+'\x22}'),_0x984a76(0x19b)==_0x3b89ac[_0x984a76(0x1e7)]&&(_0x309dde+=_0x984a76(0x1a7)+_0x3b89ac[_0x984a76(0x1a6)]+'\x22}'),_0x984a76(0x19a)==_0x3b89ac['refType']&&(_0x309dde+=_0x984a76(0x1cc)+camelCase(plural(_0x3b89ac[_0x984a76(0x1a6)]))+_0x984a76(0x1ad)),_0x309dde+='}',_0x309dde;});}[a0_0x216125(0x18c)](_0x25b996){const _0x3819b1=a0_0x216125;return _0x25b996[_0x3819b1(0x18b)](_0x1907e7=>_0x1907e7[_0x3819b1(0x1f1)]>0x0)['sort'](function(_0xcb986d,_0x1d7dd5){return _0xcb986d['searchRank']-_0x1d7dd5['searchRank'];})[_0x3819b1(0x1bd)](_0x4437d8=>{const _0x241675=_0x3819b1;let _0x5be93d=_0x4437d8[_0x241675(0x1d5)];return'filter'==_0x5be93d?'\x22'+camelCase(_0x4437d8[_0x241675(0x182)])+'\x22':(_0x5be93d||(_0x5be93d='eq'),_0x241675(0x1f2)+camelCase(_0x4437d8[_0x241675(0x182)])+_0x241675(0x1f3)+_0x5be93d+'\x22}');});}['createSortCols'](_0x19dad6){const _0xee0ca1=a0_0x216125;return _0x19dad6['filter'](_0x3cf995=>_0x3cf995[_0xee0ca1(0x180)]>0x0)['sort'](function(_0x25b8a2,_0x2215ce){const _0xc702ac=_0xee0ca1;return _0x25b8a2[_0xc702ac(0x180)]-_0x2215ce[_0xc702ac(0x180)];})[_0xee0ca1(0x1bd)](_0x521547=>'{\x22name\x22:\x22'+camelCase(_0x521547[_0xee0ca1(0x182)])+'\x22,\x22desc\x22:'+_0x521547[_0xee0ca1(0x1ed)]+'}');}async[a0_0x216125(0x1be)](_0x32dbcc,_0x3ce761,_0xbacca9,_0x4c563e,_0x25895b,_0x8a6234){const _0x1d9e7d=a0_0x216125;let _0xf4aa2c=await _0x32dbcc[_0x1d9e7d(0x194)](menu_base_1[_0x1d9e7d(0x1b6)])[_0x1d9e7d(0x1ca)]({'where':{'domain':{'id':_0x3ce761['id']},'id':_0x4c563e}}),_0x25c8b2=(await _0x32dbcc[_0x1d9e7d(0x194)](menu_base_1[_0x1d9e7d(0x1b6)])[_0x1d9e7d(0x195)]('select\x20coalesce(max(rank),0)\x20as\x20rank\x20from\x20menus\x20where\x20parent_id\x20=\x20\x27'+_0x4c563e+_0x1d9e7d(0x1db)+_0x4c563e+'\x27'))[0x0]['rank']+0xa,_0x394de8=new menu_base_1[(_0x1d9e7d(0x1b6))]();_0x394de8[_0x1d9e7d(0x182)]=_0x25895b,_0x394de8['menuType']=_0x1d9e7d(0x1bc),_0x394de8[_0x1d9e7d(0x1d2)]=_0x1d9e7d(0x18a),_0x394de8[_0x1d9e7d(0x1e6)]=_0x25c8b2,_0x394de8[_0x1d9e7d(0x181)]=!0x1,_0x394de8[_0x1d9e7d(0x1b3)]=_0x25895b,_0x394de8[_0x1d9e7d(0x1b8)]=_0x8a6234,_0x394de8[_0x1d9e7d(0x1c8)]='@things-factory/meta-ui/client/pages/meta-grist-page',_0x394de8[_0x1d9e7d(0x1eb)]=_0xf4aa2c,await _0x32dbcc['getRepository'](menu_base_1[_0x1d9e7d(0x1b6)])[_0x1d9e7d(0x1a0)](Object['assign'](Object[_0x1d9e7d(0x1c7)]({},_0x394de8),{'domain':_0x3ce761,'creator':_0xbacca9,'updater':_0xbacca9}));}[a0_0x216125(0x1c5)](_0x1bf3dc){const _0x429751=a0_0x216125;let _0x1323aa=JSON[_0x429751(0x1ee)](_0x1bf3dc)[_0x429751(0x18f)](/(.{100})/)['filter'](_0x4bff24=>_0x4bff24),_0x26abff=['aes-256-ecb','aes-256-cbc',_0x429751(0x1d6),_0x429751(0x1a8),_0x429751(0x1da),'aes-256-ofb','aes-256-ctr',_0x429751(0x198)],_0x544bb0=crypto_1[_0x429751(0x1c9)][_0x429751(0x1a9)](0x20)[_0x429751(0x18d)](_0x429751(0x1b9)),_0x2f8f84=Buffer[_0x429751(0x1ae)](_0x544bb0,_0x429751(0x1b9)),_0x41cb72=_0x544bb0['substring'](0x0,0x10),_0x6d061d=['',_0x41cb72,_0x41cb72,_0x41cb72,_0x41cb72,_0x41cb72,_0x41cb72,_0x41cb72],_0x467071=0x0,_0x2207a2=[];_0x2207a2['push'](_0x544bb0);for(var _0x4fac29=0x0;_0x4fac29<_0x1323aa[_0x429751(0x1e2)];_0x4fac29++,_0x467071++){_0x467071==_0x26abff[_0x429751(0x1e2)]&&(_0x467071=0x0);let _0x3ff8b0=crypto_1['default']['createCipheriv'](_0x26abff[_0x467071],_0x2f8f84,_0x6d061d[_0x467071]),_0x25c14f=_0x3ff8b0['update'](_0x1323aa[_0x4fac29],'utf8',_0x429751(0x1b9));_0x25c14f+=_0x3ff8b0[_0x429751(0x1dc)]('hex'),_0x2207a2[_0x429751(0x1e3)](_0x25c14f);}return _0x2207a2['join']('h1z0q9i9x7q6');}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x216125(0x1bf)])(a0_0x216125(0x1ef)),(0x0,type_graphql_1[a0_0x216125(0x1a4)])(_0x59747a=>Boolean,{'description':a0_0x216125(0x1b5)}),tslib_1[a0_0x216125(0x192)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x216125(0x197)])(a0_0x216125(0x1af))),tslib_1['__param'](0x2,(0x0,type_graphql_1[a0_0x216125(0x17e)])()),tslib_1[a0_0x216125(0x18e)]('design:type',Function),tslib_1['__metadata'](a0_0x216125(0x1c3),[String,String,Object]),tslib_1[a0_0x216125(0x18e)](a0_0x216125(0x1c0),Promise)],OperatoToolCreateMenu[a0_0x216125(0x1c1)],a0_0x216125(0x1de),null),OperatoToolCreateMenu=tslib_1[a0_0x216125(0x1e0)]([(0x0,type_graphql_1[a0_0x216125(0x1d9)])()],OperatoToolCreateMenu),exports[a0_0x216125(0x191)]=OperatoToolCreateMenu;const modelTemplate=a0_0x216125(0x1b2);
@@ -1 +1 @@
1
- 'use strict';const a0_0x26432e=a0_0x204a;(function(_0x5ee31f,_0x364f50){const _0x188680=a0_0x204a,_0x1c7947=_0x5ee31f();while(!![]){try{const _0x26233d=-parseInt(_0x188680(0x1a2))/0x1*(parseInt(_0x188680(0x17d))/0x2)+parseInt(_0x188680(0x17f))/0x3*(parseInt(_0x188680(0x1d1))/0x4)+-parseInt(_0x188680(0x1e2))/0x5+-parseInt(_0x188680(0x157))/0x6*(-parseInt(_0x188680(0x162))/0x7)+-parseInt(_0x188680(0x19e))/0x8+parseInt(_0x188680(0x154))/0x9*(parseInt(_0x188680(0x16d))/0xa)+-parseInt(_0x188680(0x169))/0xb;if(_0x26233d===_0x364f50)break;else _0x1c7947['push'](_0x1c7947['shift']());}catch(_0xd2e2b8){_0x1c7947['push'](_0x1c7947['shift']());}}}(a0_0x21a9,0xd3c56));function a0_0x204a(_0x290630,_0xfa4321){const _0x21a9c1=a0_0x21a9();return a0_0x204a=function(_0x204a4f,_0x395d51){_0x204a4f=_0x204a4f-0x14e;let _0x3b3cfb=_0x21a9c1[_0x204a4f];return _0x3b3cfb;},a0_0x204a(_0x290630,_0xfa4321);}Object[a0_0x26432e(0x1cd)](exports,a0_0x26432e(0x167),{'value':!0x0}),exports[a0_0x26432e(0x1c4)]=void 0x0;const tslib_1=require(a0_0x26432e(0x1cc)),type_graphql_1=require(a0_0x26432e(0x16f)),shell_1=require(a0_0x26432e(0x1ba)),resource_base_1=require(a0_0x26432e(0x182)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x26432e(0x15b)),{plural:plural}=require(a0_0x26432e(0x1a6)),fs=require('fs');function a0_0x21a9(){const _0x28f153=['creator','uniqRank','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','__esModule','pascalCaseName','1512148OYJGRL','existsPath','Date','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','104230eklefv','design:paramtypes','type-graphql','writeFile','Resolvers,\x20subscribers\x20as\x20','decimal','creator_id','Ctx','filter','findOne','prototype','long','\x20})','createDir','-mutation.ts','__param','82DOBAVg','\x20{\x20nullable:\x20','38442vFiknw','type\x20=>','createServicePath','@things-factory/resource-base','updater_id','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','getProjectRootPath','domain_id','nullable','EntitySubscribers\x20}\x20from\x20\x27./','\x0a\x20\x20','EntitySubscribers,','Resolver','createTypeText','Arg','Resolvers\x20}\x20from\x20\x27./','name','__decorate','writeFileSync','includes','JSON','double','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a','length','colType','/packages','createEntityText','createHistoryServiceFiles','-history\x27','Float','8636152BFWEol','Operato\x20Tool\x20Create\x20Service','getRepository','camelCaseName','24379OyJBRT','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','tableName','dataProp','pluralize','__metadata','index.ts','push','rank','domain','toolCreateService','getColTxtType','replaceNamesMap','createServiceFiles','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','export\x20*\x20from\x20\x27./','createHistoryEntityText','sort','Entity','/event-subscriber.ts','.ts','state','-history-query.ts','@things-factory/shell','/server','Entities,\x20resolvers\x20as\x20','Entities,','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','...','created_at','COPY','Query','getFieldType','OperatoToolCreateService','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','-history.ts','/index.ts','\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a','createNoHistoryServiceFiels','string','mkdirSync','tslib','defineProperty','find','Int','integer','524BuLUzF','timestamp\x20without\x20time\x20zone','character\x20varying','design:type','PWD','-type.ts','existsSync','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','join','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','bigint','import\x20{\x20entities\x20as\x20','readFileSync','number','@Field(','packages','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','1292570JPsVBm','Resolvers,','columnToEntityColumn','utf8','\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a','/server/service/','env','replace','datetime','1161tMFdaZ','updated_at','float','66hOxCKi','colSize','indexOf','{{camelCase\x20name}}.','lodash','-history-type.ts','EntityColumn','-query.ts','design:returntype','double\x20precision','\x27,\x20type:\x20\x27','203161MoAlsk','map'];a0_0x21a9=function(){return _0x28f153;};return a0_0x21a9();}let OperatoToolCreateService=class{async[a0_0x26432e(0x1ac)](_0xcdd6b5,_0x8e0280){const _0x303e8d=a0_0x26432e,{domain:_0x3026e6}=_0x8e0280[_0x303e8d(0x1b8)],_0x544f60=await(0x0,shell_1[_0x303e8d(0x1a0)])(resource_base_1[_0x303e8d(0x1b5)])[_0x303e8d(0x176)]({'where':{'id':_0xcdd6b5}}),_0x47d7b8=await(0x0,shell_1[_0x303e8d(0x1a0)])(resource_base_1[_0x303e8d(0x15d)])[_0x303e8d(0x1ce)]({'where':{'domain':{'id':_0x3026e6['id']},'entity':{'id':_0x544f60['id']}}});let {name:_0x47fd62='',bundle:_0x2b5a66=''}=_0x544f60||{},_0x7c6340=this[_0x303e8d(0x185)](),_0x219088=kebabCase(_0x47fd62);return await this['createServicePath'](_0x7c6340,_0x2b5a66,_0x219088),await this[_0x303e8d(0x1af)](_0x7c6340,_0x2b5a66,_0x47fd62,_0x219088,_0x544f60,_0x47d7b8),!0x0;}async[a0_0x26432e(0x1af)](_0x4455bb,_0x4d67fe,_0x4d01cf,_0xa18a40,_0x4b05be,_0x520bbd){const _0x1e22bf=a0_0x26432e;let _0xb4bce7={'name':_0xa18a40,'tableName':_0x4b05be[_0x1e22bf(0x1a4)],'pascalCaseName':startCase(camelCase(_0x4d01cf))['replace'](/ /g,''),'camelCaseName':camelCase(_0x4d01cf),'snakeCaseName':snakeCase(_0x4d01cf),'pluralPascalCaseName':startCase(camelCase(plural(_0x4d01cf)))[_0x1e22bf(0x152)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x4d01cf))},_0x5527a1=_0x4455bb+'/packages/'+_0x4d67fe+_0x1e22bf(0x150);[_0x1e22bf(0x193),_0x1e22bf(0x1c1)][_0x1e22bf(0x192)](_0x4b05be[_0x1e22bf(0x1a5)])?await this[_0x1e22bf(0x19b)](_0x5527a1,_0xa18a40,_0x4b05be,_0x520bbd,_0xb4bce7):await this[_0x1e22bf(0x1c9)](_0x5527a1,_0xa18a40,_0x4b05be,_0x520bbd,_0xb4bce7);}async[a0_0x26432e(0x19b)](_0x37c0aa,_0x54fe49,_0x2ea87f,_0xf5ade4,_0x2a2876){const _0x5b2ce9=a0_0x26432e;await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1c7)),serviceHistoryIndex,_0x2a2876);let _0x1ece3e=this['createEntityText'](_0x2ea87f,_0xf5ade4);await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1b7)),_0x1ece3e,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x15e)),serviceQuery,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+'-mutation.ts'),serviceMutation,_0x2a2876);let _0x3c0e64=this['createTypeText'](_0xf5ade4);await this['writeFile'](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1d6)),_0x3c0e64,_0x2a2876);let _0x417383=this[_0x5b2ce9(0x1b3)](_0x2ea87f,_0xf5ade4);await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1c6)),_0x417383,_0x2a2876);let _0x457282='';_0x5b2ce9(0x193)==_0x2ea87f[_0x5b2ce9(0x1a5)]?(_0x457282=_0x5b2ce9(0x166),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1b6)),serviceEntitySubscriber,_0x2a2876)):_0x457282='';let _0x42b437=serviceEntitySubscriber[_0x5b2ce9(0x152)](/{{entityToJson}}/g,_0x457282);await this['writeFile'](_0x37c0aa+(_0x54fe49+_0x5b2ce9(0x1b6)),_0x42b437,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x1b9)),serviceHistoryQuery,_0x2a2876),await this[_0x5b2ce9(0x170)](_0x37c0aa+(_0x54fe49+'/'+_0x54fe49+_0x5b2ce9(0x15c)),sereviceHistoryType,_0x2a2876);let _0x28d00c=_0x37c0aa+_0x5b2ce9(0x1a8);0x0==await this[_0x5b2ce9(0x16a)](_0x28d00c)&&await this['writeFile'](_0x28d00c,allIndex,_0x2a2876);let _0x3e13d1=await fs['readFileSync'](_0x28d00c,_0x5b2ce9(0x14e));_0x3e13d1[_0x5b2ce9(0x159)]('export\x20*\x20from\x20\x27./'+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+'-history\x27')<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5b2ce9(0x1be)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+_0x5b2ce9(0x19c))),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1b2)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876['name']+'\x27')<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x5b2ce9(0x1be)+_0x2a2876[_0x5b2ce9(0x18f)]+'/'+_0x2a2876[_0x5b2ce9(0x18f)]+'\x27')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1dc)+_0x2a2876[_0x5b2ce9(0x168)]+'Entities,\x20resolvers\x20as\x20'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x171)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x188)+_0x2a2876['name']+'\x27')<0x0&&(_0x3e13d1=_0x3e13d1['replace'](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x5b2ce9(0x195)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bc)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x171)+_0x2a2876['pascalCaseName']+_0x5b2ce9(0x188)+_0x2a2876[_0x5b2ce9(0x18f)]+'\x27')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1bf)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bd))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1bd))),_0x3e13d1['indexOf']('...'+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x1e3))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* RESOLVER CLASSES \*\//,_0x5b2ce9(0x16c)+_0x2a2876[_0x5b2ce9(0x168)]+'Resolvers,')),_0x3e13d1[_0x5b2ce9(0x159)](_0x5b2ce9(0x1bf)+_0x2a2876[_0x5b2ce9(0x168)]+_0x5b2ce9(0x18a))<0x0&&(_0x3e13d1=_0x3e13d1[_0x5b2ce9(0x152)](/\/\* SUBSCRIBERS \*\//,_0x5b2ce9(0x1c5)+_0x2a2876['pascalCaseName']+'EntitySubscribers,')),await this[_0x5b2ce9(0x170)](_0x28d00c,_0x3e13d1,_0x2a2876);}async[a0_0x26432e(0x1c9)](_0x3ea037,_0x3fbd28,_0x26786c,_0x356346,_0x57b677){const _0x15d480=a0_0x26432e;await this['writeFile'](_0x3ea037+(_0x3fbd28+_0x15d480(0x1c7)),serviceIndex,_0x57b677),await this['writeFile'](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x15e)),serviceQuery,_0x57b677),await this['writeFile'](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x17b)),serviceMutation,_0x57b677);let _0x4c3a63=this[_0x15d480(0x19a)](_0x26786c,_0x356346);await this[_0x15d480(0x170)](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x1b7)),_0x4c3a63,_0x57b677);let _0xa96f3a=this['createTypeText'](_0x356346);await this[_0x15d480(0x170)](_0x3ea037+(_0x3fbd28+'/'+_0x3fbd28+_0x15d480(0x1d6)),_0xa96f3a,_0x57b677);let _0x52b7c3=_0x3ea037+_0x15d480(0x1a8);0x0==await this['existsPath'](_0x52b7c3)&&await this[_0x15d480(0x170)](_0x52b7c3,allIndex,_0x57b677);let _0x5a1ca2=await fs[_0x15d480(0x1dd)](_0x52b7c3,'utf8');_0x5a1ca2['indexOf'](_0x15d480(0x1b2)+_0x57b677['name']+'/'+_0x57b677[_0x15d480(0x18f)]+'\x27')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* EXPORT ENTITY TYPES \*\//,_0x15d480(0x1be)+_0x57b677[_0x15d480(0x18f)]+'/'+_0x57b677[_0x15d480(0x18f)]+'\x27')),_0x5a1ca2[_0x15d480(0x159)](_0x15d480(0x1dc)+_0x57b677['pascalCaseName']+_0x15d480(0x1bc)+_0x57b677[_0x15d480(0x168)]+_0x15d480(0x18e)+_0x57b677[_0x15d480(0x18f)]+'\x27')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x15d480(0x195)+_0x57b677['pascalCaseName']+_0x15d480(0x1bc)+_0x57b677[_0x15d480(0x168)]+'Resolvers\x20}\x20from\x20\x27./'+_0x57b677[_0x15d480(0x18f)]+'\x27')),_0x5a1ca2['indexOf']('...'+_0x57b677[_0x15d480(0x168)]+_0x15d480(0x1bd))<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* ENTITIES \*\//,'/*\x20ENTITIES\x20*/\x0a\x09...'+_0x57b677[_0x15d480(0x168)]+'Entities,')),_0x5a1ca2[_0x15d480(0x159)]('...'+_0x57b677['pascalCaseName']+'Resolvers,')<0x0&&(_0x5a1ca2=_0x5a1ca2[_0x15d480(0x152)](/\/\* RESOLVER CLASSES \*\//,_0x15d480(0x16c)+_0x57b677[_0x15d480(0x168)]+'Resolvers,')),await this['writeFile'](_0x52b7c3,_0x5a1ca2,_0x57b677);}[a0_0x26432e(0x18c)](_0x48cf29){const _0x51fb3f=a0_0x26432e;let _0x55d48f=sereviceType,_0x562ddc=_0x48cf29['map'](_0x5909ca=>{const _0x33ab21=a0_0x204a;if('id'==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x186)==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x1c0)==_0x5909ca[_0x33ab21(0x18f)])return'';if('updated_at'==_0x5909ca[_0x33ab21(0x18f)])return'';if(_0x33ab21(0x173)==_0x5909ca['name'])return'';if(_0x33ab21(0x183)==_0x5909ca[_0x33ab21(0x18f)])return'';let _0x2e9eb6=this['getFieldType'](_0x5909ca),_0x2e29c2=this[_0x33ab21(0x1ad)](_0x5909ca),_0x393de9=camelCase(_0x5909ca[_0x33ab21(0x18f)]);return'\x20\x20'+(_0x33ab21(0x1df)+(0x0==_0x2e9eb6['length']?'':_0x33ab21(0x180)+_0x2e9eb6+',')+_0x33ab21(0x17e)+_0x5909ca[_0x33ab21(0x187)]+_0x33ab21(0x179))+_0x33ab21(0x189)+(''+_0x393de9+(_0x5909ca[_0x33ab21(0x187)]?'?':'')+':\x20'+_0x2e29c2)+'\x0a';});_0x55d48f=_0x55d48f['replace'](/{{newTypeColumns}}/g,_0x562ddc[_0x51fb3f(0x1d9)]('\x0a'));let _0x304cbf=_0x48cf29['map'](_0x49f0fe=>{const _0x882e15=_0x51fb3f;if('id'==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x186)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x1c0)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x155)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x173)==_0x49f0fe[_0x882e15(0x18f)])return'';if(_0x882e15(0x183)==_0x49f0fe[_0x882e15(0x18f)])return'';let _0x4ae6e4=this[_0x882e15(0x1c3)](_0x49f0fe),_0x2429e0=this['getColTxtType'](_0x49f0fe);_0x49f0fe[_0x882e15(0x187)]=!0x0;let _0x4182c8=camelCase(_0x49f0fe['name']);return'\x20\x20'+(_0x882e15(0x1df)+(0x0==_0x4ae6e4['length']?'':'type\x20=>'+_0x4ae6e4+',')+_0x882e15(0x17e)+_0x49f0fe['nullable']+_0x882e15(0x179))+'\x0a\x20\x20'+(''+_0x4182c8+(_0x49f0fe['nullable']?'?':'')+':\x20'+_0x2429e0)+'\x0a';});return _0x55d48f=_0x55d48f[_0x51fb3f(0x152)](/{{patchTypeColumns}}/g,_0x304cbf[_0x51fb3f(0x1d9)]('\x0a')),_0x55d48f;}[a0_0x26432e(0x19a)](_0x5f05e0,_0x151d94){const _0x3bf81b=a0_0x26432e;let _0x98e40c=serviceEntity,_0x3c7e27=_0x151d94[_0x3bf81b(0x1b4)](function(_0x497abd,_0x20acc3){const _0x579586=_0x3bf81b;return _0x497abd['rank']-_0x20acc3[_0x579586(0x1aa)];})[_0x3bf81b(0x163)](_0x2aca81=>this['columnToEntityColumn'](_0x2aca81));[_0x3bf81b(0x1c1),'JSON'][_0x3bf81b(0x192)](_0x5f05e0[_0x3bf81b(0x1a5)])&&_0x3c7e27[_0x3bf81b(0x1a9)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x98e40c=_0x98e40c['replace'](/{{entityColumns}}/g,_0x3c7e27['join']('\x0a'));let _0x23e22e='',_0x5a9eeb=_0x151d94[_0x3bf81b(0x175)](_0x3eb3d0=>_0x3eb3d0[_0x3bf81b(0x165)]&&_0x3eb3d0[_0x3bf81b(0x165)]>0x0)[_0x3bf81b(0x1b4)](function(_0x4d7f1e,_0x387f8d){const _0x511b78=_0x3bf81b;return _0x4d7f1e['uniqRank']-_0x387f8d[_0x511b78(0x165)];});if(_0x5a9eeb['length']>0x0){_0x23e22e='@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})';let _0x2ec2fd=_0x5a9eeb[_0x3bf81b(0x163)](_0x23cc8e=>{const _0x80f47c=_0x3bf81b;let _0x5f6fc4=_0x23cc8e[_0x80f47c(0x18f)];return _0x80f47c(0x186)==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4=_0x80f47c(0x1ab)),_0x80f47c(0x173)==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4=_0x80f47c(0x164)),'updater_id'==_0x23cc8e[_0x80f47c(0x18f)]&&(_0x5f6fc4='updater'),_0x80f47c(0x15a)+camelCase(_0x5f6fc4);});_0x23e22e=_0x23e22e[_0x3bf81b(0x152)](/{{indexColumns}}/g,_0x2ec2fd[_0x3bf81b(0x1d9)](','));}return _0x98e40c=_0x98e40c['replace'](/{{indexAnn}}/g,_0x23e22e),_0x98e40c;}[a0_0x26432e(0x1b3)](_0x30240b,_0x216589){const _0x5dcde2=a0_0x26432e;let _0x163739='JSON'==_0x30240b[_0x5dcde2(0x1a5)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5783eb=_0x216589[_0x5dcde2(0x1b4)](function(_0x5c0661,_0x2f9dc2){const _0x135cc8=_0x5dcde2;return _0x5c0661[_0x135cc8(0x1aa)]-_0x2f9dc2['rank'];})['map'](_0x4c9e52=>this[_0x5dcde2(0x1e4)](_0x4c9e52));return _0x163739=_0x163739[_0x5dcde2(0x152)](/{{entityColumns}}/g,_0x5783eb['join']('\x0a')),_0x163739;}[a0_0x26432e(0x1e4)](_0x415377){const _0x29de95=a0_0x26432e;if('id'==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x186)==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x1c0)==_0x415377[_0x29de95(0x18f)])return'';if('updated_at'==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x173)==_0x415377[_0x29de95(0x18f)])return'';if(_0x29de95(0x183)==_0x415377[_0x29de95(0x18f)])return'';let _0x261569=_0x415377['colType'];_0x29de95(0x194)==_0x415377[_0x29de95(0x198)]&&(_0x261569=_0x29de95(0x160)),'long'==_0x415377['colType']&&(_0x261569=_0x29de95(0x1db)),_0x29de95(0x1ca)==_0x415377[_0x29de95(0x198)]&&(_0x261569=_0x29de95(0x1d3)),_0x29de95(0x153)==_0x415377['colType']&&(_0x261569=_0x29de95(0x1d2));let _0x48413d='';'string'==_0x415377['colType']&&(_0x48413d=_0x415377[_0x29de95(0x158)]);let _0xb08cec=this[_0x29de95(0x1c3)](_0x415377),_0x2b4680=this['getColTxtType'](_0x415377),_0x211838=camelCase(_0x415377[_0x29de95(0x18f)]);return'\x20\x20'+('@Column({name:\x27'+_0x415377[_0x29de95(0x18f)]+_0x29de95(0x161)+_0x261569+'\x27,\x20nullable:\x20'+_0x415377[_0x29de95(0x187)]+'\x20'+(0x0==_0x48413d[_0x29de95(0x197)]?'':',length:'+_0x48413d)+'\x20})')+'\x0a\x20\x20'+(_0x29de95(0x1df)+(0x0==_0xb08cec['length']?'':_0x29de95(0x180)+_0xb08cec+',')+_0x29de95(0x17e)+_0x415377[_0x29de95(0x187)]+_0x29de95(0x179))+_0x29de95(0x189)+(''+_0x211838+(_0x415377[_0x29de95(0x187)]?'?':'')+':\x20'+_0x2b4680)+'\x0a';}[a0_0x26432e(0x1c3)](_0x57fae7){const _0x1b36f0=a0_0x26432e;let _0x16a1ec='';return'double'==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec=_0x1b36f0(0x19d)),_0x1b36f0(0x156)==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec=_0x1b36f0(0x19d)),_0x1b36f0(0x178)==_0x57fae7['colType']&&(_0x16a1ec=_0x1b36f0(0x1cf)),'integer'==_0x57fae7[_0x1b36f0(0x198)]&&(_0x16a1ec='Int'),_0x16a1ec;}[a0_0x26432e(0x1ad)](_0x3348c3){const _0x439176=a0_0x26432e;let _0x5191e2=_0x3348c3[_0x439176(0x198)];return _0x439176(0x172)==_0x3348c3[_0x439176(0x198)]&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x194)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1de)),'float'==_0x3348c3[_0x439176(0x198)]&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x1d0)==_0x3348c3['colType']&&(_0x5191e2='number'),_0x439176(0x178)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1de)),_0x439176(0x153)==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x16b)),'date'==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x16b)),'text'==_0x3348c3['colType']&&(_0x5191e2=_0x439176(0x1ca)),_0x5191e2;}async[a0_0x26432e(0x170)](_0x2ddf73,_0x289802,_0x35e0eb){const _0x88f289=a0_0x26432e;await fs[_0x88f289(0x191)](_0x2ddf73,this[_0x88f289(0x1ae)](_0x289802,_0x35e0eb),_0x88f289(0x14e));}[a0_0x26432e(0x1ae)](_0x2a0d0c,_0x29b777){const _0x2471e6=a0_0x26432e;return _0x2a0d0c[_0x2471e6(0x152)](/{{pascalCase name}}/g,_0x29b777[_0x2471e6(0x168)])[_0x2471e6(0x152)](/{{camelCase name}}/g,_0x29b777[_0x2471e6(0x1a1)])[_0x2471e6(0x152)](/{{snakeCase name}}/g,_0x29b777['snakeCaseName'])[_0x2471e6(0x152)](/{{pluralPascalCase name}}/g,_0x29b777['pluralPascalCaseName'])[_0x2471e6(0x152)](/{{pluralCamelCase name}}/g,_0x29b777['pluralCamelCaseName'])[_0x2471e6(0x152)](/{{tableName}}/g,_0x29b777[_0x2471e6(0x1a4)])[_0x2471e6(0x152)](/{{name}}/g,_0x29b777[_0x2471e6(0x18f)]);}async[a0_0x26432e(0x181)](_0x2a205d,_0x28dcfa,_0x94a86c){const _0x11a67e=a0_0x26432e;let _0x14b90e=_0x2a205d+_0x11a67e(0x199);await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e=_0x14b90e+'/'+_0x28dcfa,await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e+=_0x11a67e(0x1bb),await this[_0x11a67e(0x17a)](_0x14b90e),_0x14b90e+='/service',await this['createDir'](_0x14b90e),_0x14b90e=_0x14b90e+'/'+_0x94a86c,await this[_0x11a67e(0x17a)](_0x14b90e);}['getProjectRootPath'](){const _0x19bd7d=a0_0x26432e;let _0x5cd4fb=process[_0x19bd7d(0x151)][_0x19bd7d(0x1d5)]['split']('/'),_0x26e16e=[];for(let _0x40e571=0x0;_0x40e571<_0x5cd4fb['length']&&_0x19bd7d(0x1e0)!=_0x5cd4fb[_0x40e571];_0x40e571++)_0x26e16e[_0x19bd7d(0x1a9)](_0x5cd4fb[_0x40e571]);return _0x26e16e['join']('/');}async[a0_0x26432e(0x17a)](_0x1f8344){const _0x203333=a0_0x26432e;0x0==await this[_0x203333(0x16a)](_0x1f8344)&&fs[_0x203333(0x1cb)](_0x1f8344);}async[a0_0x26432e(0x16a)](_0x489f16){const _0x5b8bba=a0_0x26432e;return await fs[_0x5b8bba(0x1d7)](_0x489f16);}};tslib_1[a0_0x26432e(0x190)]([(0x0,type_graphql_1[a0_0x26432e(0x1c2)])(_0x3af5a0=>Boolean,{'description':a0_0x26432e(0x19f)}),tslib_1['__param'](0x0,(0x0,type_graphql_1[a0_0x26432e(0x18d)])('id')),tslib_1[a0_0x26432e(0x17c)](0x1,(0x0,type_graphql_1[a0_0x26432e(0x174)])()),tslib_1['__metadata'](a0_0x26432e(0x1d4),Function),tslib_1[a0_0x26432e(0x1a7)](a0_0x26432e(0x16e),[String,Object]),tslib_1[a0_0x26432e(0x1a7)](a0_0x26432e(0x15f),Promise)],OperatoToolCreateService[a0_0x26432e(0x177)],a0_0x26432e(0x1ac),null),OperatoToolCreateService=tslib_1[a0_0x26432e(0x190)]([(0x0,type_graphql_1[a0_0x26432e(0x18b)])()],OperatoToolCreateService),exports[a0_0x26432e(0x1c4)]=OperatoToolCreateService;const allIndex=a0_0x26432e(0x1e1),serviceIndex=a0_0x26432e(0x1b0),serviceHistoryIndex='\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a',serviceQuery='\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a',serviceHistoryQuery=a0_0x26432e(0x1da),serviceMutation=a0_0x26432e(0x14f),sereviceType=a0_0x26432e(0x1c8),sereviceHistoryType=a0_0x26432e(0x184),serviceEntity=a0_0x26432e(0x1a3),serviceEntityHistCopy=a0_0x26432e(0x1b1),serviceEntityHistJson=a0_0x26432e(0x1d8),serviceEntitySubscriber=a0_0x26432e(0x196);
1
+ 'use strict';const a0_0x3828b3=a0_0x447a;(function(_0x5d8891,_0x2168e9){const _0x1af890=a0_0x447a,_0x13a2a3=_0x5d8891();while(!![]){try{const _0x3a0427=parseInt(_0x1af890(0x196))/0x1+-parseInt(_0x1af890(0x1c0))/0x2+parseInt(_0x1af890(0x174))/0x3*(-parseInt(_0x1af890(0x169))/0x4)+-parseInt(_0x1af890(0x1bc))/0x5*(parseInt(_0x1af890(0x1d1))/0x6)+parseInt(_0x1af890(0x1a3))/0x7*(-parseInt(_0x1af890(0x1a1))/0x8)+-parseInt(_0x1af890(0x179))/0x9+parseInt(_0x1af890(0x1ee))/0xa;if(_0x3a0427===_0x2168e9)break;else _0x13a2a3['push'](_0x13a2a3['shift']());}catch(_0x4085dd){_0x13a2a3['push'](_0x13a2a3['shift']());}}}(a0_0x1717,0xaad3f));function a0_0x1717(){const _0x467628=['type\x20=>','camelCaseName','creator_id','lodash','utf8','double','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}}]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}Mutation]\x0a','import\x20{\x20entities\x20as\x20','export\x20*\x20from\x20\x27./','__decorate','/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./','createServicePath','/server/service/','createDir','__metadata','writeFile','@Field(','Float','getProjectRootPath','Entities,','-mutation.ts','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}List\x20}\x20from\x20\x27./{{name}}-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Query\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}List,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20{{pluralCamelCase\x20name}}(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}List>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20convertedParams\x20=\x20convertListParams(params,\x20domain.id)\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}:\x20{{pascalCase\x20name}}):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}.creatorId})\x0a\x20\x20}\x0a}\x0a','Entity','existsSync','/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x09\x09...','creator','1219852sKKNNY','.ts','\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Query\x20}\x20from\x20\x27./{{name}}-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryQuery\x20}\x20from\x20\x27./{{name}}-history-query\x27\x0aimport\x20{\x20{{pascalCase\x20name}}Mutation\x20}\x20from\x20\x27./{{name}}-mutation\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20}\x20from\x20\x27./event-subscriber\x27\x0a\x0aexport\x20const\x20entities\x20=\x20[{{pascalCase\x20name}},\x20{{pascalCase\x20name}}History]\x0aexport\x20const\x20resolvers\x20=\x20[{{pascalCase\x20name}}Query,\x20{{pascalCase\x20name}}HistoryQuery,\x20{{pascalCase\x20name}}Mutation]\x0aexport\x20const\x20subscribers\x20=\x20[{{pascalCase\x20name}}HistoryEntitySubscriber]\x0a\x0a','pluralCamelCaseName','double\x20precision','tableName','OperatoToolCreateService','__param','map','@Column({name:\x27','/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0aimport\x20{\x20entities\x20as\x20','160OCgthz','uniqRank','172403RVvFha','defineProperty','@things-factory/resource-base','name','getFieldType','createEntityText','getRepository','findOne','rank','/service','-history\x27','snakeCaseName','/*\x20ENTITIES\x20*/\x0a\x09...','indexOf','EntitySubscribers\x20}\x20from\x20\x27./','type-graphql','colSize','datetime','-query.ts','find','pluralize','number','Resolvers,','long','/index.ts','29255nyJfaE','JSON','\x27,\x20type:\x20\x27','integer','593186rINvoq','string','Entities,\x20resolvers\x20as\x20','@Index(\x27ix_{{snakeCase\x20name}}_0\x27,\x20({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20[{{indexColumns}}],\x20{\x20unique:\x20true\x20})','nullable','dataProp','COPY','replaceNamesMap','createHistoryServiceFiles','filter','getColTxtType','\x0a\x20\x20public\x20createHistoryEntity(manager,\x20entity)\x20{\x0a\x20\x20\x20\x20let\x20history\x20=\x20manager.create(this.historyEntity,\x20entity);\x0a\x20\x20\x20\x20history.historyJson\x20=\x20JSON.stringify(entity);\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','existsPath','timestamp\x20without\x20time\x20zone','tslib','push','/server','930pKBAMc','columnToEntityColumn','{{camelCase\x20name}}.','pascalCaseName','readFileSync','Query','updater','Ctx','__esModule','float','bigint','-type.ts','EntityColumn','updater_id','Int','mkdirSync','createTypeText','pluralPascalCaseName','/packages','\x0a\x20\x20','createNoHistoryServiceFiels','createHistoryEntityText','domain_id','...','join','design:returntype','-history-query.ts','sort','\x20{\x20nullable:\x20','29766530dUdVbs','character\x20varying','decimal',',length:','\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a','Resolvers,\x20subscribers\x20as\x20','colType','/*\x20SUBSCRIBERS\x20*/\x0a\x09\x09...','length','\x20})','toolCreateService','EntitySubscribers,','replace','text','date','updated_at','Date','/event-subscriber.ts','env','317256cuayIQ','-history.ts','design:type','domain','created_at','state','/packages/','Operato\x20Tool\x20Create\x20Service','packages','split','\x0a/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0a\x0a/*\x20IMPORT\x20ENTITIES\x20AND\x20RESOLVERS\x20*/\x0a\x0aexport\x20const\x20entities\x20=\x20[\x20\x20\x0a\x20\x20/*\x20ENTITIES\x20*/\x0a]\x20\x0a\x0a\x0aexport\x20const\x20schema\x20=\x20{\x0a\x20\x20resolverClasses:\x20[\x0a\x20\x20\x20\x20/*\x20RESOLVER\x20CLASSES\x20*/\x0a\x20\x20]\x20\x0a}\x0a\x0aexport\x20const\x20subscribers\x20=\x20[\x0a\x20\x20/*\x20SUBSCRIBERS\x20*/\x0a]\x0a','24zAJhLN','createServiceFiles','PWD','prototype','Resolvers\x20}\x20from\x20\x27./','10495836raHsRz','\x0aimport\x20{\x20Resolver,\x20Query,\x20FieldResolver,\x20Root,\x20Args,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20Domain,\x20ListParam,\x20convertListParams,\x20getRepository,\x20getQueryBuilderFromListParams\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20{{pascalCase\x20name}}HistoryList\x20}\x20from\x20\x27./{{name}}-history-type\x27\x0a\x0a@Resolver({{pascalCase\x20name}}History)\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryQuery\x20{\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}History,\x20{\x20description:\x20\x27To\x20fetch\x20a\x20{{pascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}History(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}History>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20return\x20await\x20getRepository({{pascalCase\x20name}}History).findOne({\x0a\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20}\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Query(returns\x20=>\x20{{pascalCase\x20name}}HistoryList,\x20{\x20description:\x20\x27To\x20fetch\x20multiple\x20{{pluralPascalCase\x20name}}History\x27\x20})\x0a\x20\x20async\x20{{camelCase\x20name}}Histories(@Args()\x20params:\x20ListParam,\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}HistoryList>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20queryBuilder\x20=\x20getQueryBuilderFromListParams({\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20params,\x0a\x20\x20\x20\x20\x20\x20repository:\x20await\x20getRepository({{pascalCase\x20name}}History)\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20const\x20[items,\x20total]\x20=\x20await\x20queryBuilder.getManyAndCount()\x0a\x0a\x20\x20\x20\x20return\x20{\x20items,\x20total\x20}\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20Domain)\x0a\x20\x20async\x20domain(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<Domain>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(Domain).findOneBy({id:{{camelCase\x20name}}History.domainId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20updater(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.updaterId})\x0a\x20\x20}\x0a\x0a\x20\x20@FieldResolver(type\x20=>\x20User)\x0a\x20\x20async\x20creator(@Root()\x20{{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History):\x20Promise<User>\x20{\x0a\x20\x20\x20\x20return\x20await\x20getRepository(User).findOneBy({id:{{camelCase\x20name}}History.creatorId})\x0a\x20\x20}\x0a}\x0a','index.ts'];a0_0x1717=function(){return _0x467628;};return a0_0x1717();}function a0_0x447a(_0xcf2804,_0x3d834f){const _0x171789=a0_0x1717();return a0_0x447a=function(_0x447a98,_0x25715f){_0x447a98=_0x447a98-0x164;let _0x1db4f5=_0x171789[_0x447a98];return _0x1db4f5;},a0_0x447a(_0xcf2804,_0x3d834f);}Object[a0_0x3828b3(0x1a4)](exports,a0_0x3828b3(0x1d9),{'value':!0x0}),exports[a0_0x3828b3(0x19c)]=void 0x0;const tslib_1=require(a0_0x3828b3(0x1ce)),type_graphql_1=require(a0_0x3828b3(0x1b2)),shell_1=require('@things-factory/shell'),resource_base_1=require(a0_0x3828b3(0x1a5)),{camelCase:camelCase,startCase:startCase,snakeCase:snakeCase,kebabCase:kebabCase}=require(a0_0x3828b3(0x17f)),{plural:plural}=require(a0_0x3828b3(0x1b7)),fs=require('fs');let OperatoToolCreateService=class{async['toolCreateService'](_0x9c5f4e,_0x1130cd){const _0x12f107=a0_0x3828b3,{domain:_0x4f0090}=_0x1130cd[_0x12f107(0x16e)],_0x37b9ad=await(0x0,shell_1[_0x12f107(0x1a9)])(resource_base_1[_0x12f107(0x192)])[_0x12f107(0x1aa)]({'where':{'id':_0x9c5f4e}}),_0x3e8b81=await(0x0,shell_1[_0x12f107(0x1a9)])(resource_base_1[_0x12f107(0x1dd)])[_0x12f107(0x1b6)]({'where':{'domain':{'id':_0x4f0090['id']},'entity':{'id':_0x37b9ad['id']}}});let {name:_0x392244='',bundle:_0x2351fa=''}=_0x37b9ad||{},_0x16f519=this[_0x12f107(0x18e)](),_0x4b4c06=kebabCase(_0x392244);return await this[_0x12f107(0x187)](_0x16f519,_0x2351fa,_0x4b4c06),await this[_0x12f107(0x175)](_0x16f519,_0x2351fa,_0x392244,_0x4b4c06,_0x37b9ad,_0x3e8b81),!0x0;}async[a0_0x3828b3(0x175)](_0x4fe04c,_0x1d034b,_0x528b15,_0x487af6,_0x1f8560,_0x1daa28){const _0xa2cce6=a0_0x3828b3;let _0x3136b8={'name':_0x487af6,'tableName':_0x1f8560[_0xa2cce6(0x19b)],'pascalCaseName':startCase(camelCase(_0x528b15))[_0xa2cce6(0x1fa)](/ /g,''),'camelCaseName':camelCase(_0x528b15),'snakeCaseName':snakeCase(_0x528b15),'pluralPascalCaseName':startCase(camelCase(plural(_0x528b15)))[_0xa2cce6(0x1fa)](/ /g,''),'pluralCamelCaseName':camelCase(plural(_0x528b15))},_0x1f25ad=_0x4fe04c+_0xa2cce6(0x16f)+_0x1d034b+_0xa2cce6(0x188);[_0xa2cce6(0x1bd),_0xa2cce6(0x1c6)]['includes'](_0x1f8560['dataProp'])?await this[_0xa2cce6(0x1c8)](_0x1f25ad,_0x487af6,_0x1f8560,_0x1daa28,_0x3136b8):await this['createNoHistoryServiceFiels'](_0x1f25ad,_0x487af6,_0x1f8560,_0x1daa28,_0x3136b8);}async[a0_0x3828b3(0x1c8)](_0x586b5c,_0x26c7e2,_0xeb36ab,_0x5119da,_0x212e3f){const _0x20bd3f=a0_0x3828b3;await this['writeFile'](_0x586b5c+(_0x26c7e2+'/index.ts'),serviceHistoryIndex,_0x212e3f);let _0x41991e=this[_0x20bd3f(0x1a8)](_0xeb36ab,_0x5119da);await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+_0x20bd3f(0x197)),_0x41991e,_0x212e3f),await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+'-query.ts'),serviceQuery,_0x212e3f),await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+_0x20bd3f(0x190)),serviceMutation,_0x212e3f);let _0xab054a=this[_0x20bd3f(0x1e1)](_0x5119da);await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+_0x20bd3f(0x1dc)),_0xab054a,_0x212e3f);let _0x1f1dbe=this[_0x20bd3f(0x1e6)](_0xeb36ab,_0x5119da);await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+_0x20bd3f(0x16a)),_0x1f1dbe,_0x212e3f);let _0x2dff1f='';_0x20bd3f(0x1bd)==_0xeb36ab[_0x20bd3f(0x1c5)]?(_0x2dff1f=_0x20bd3f(0x1cb),await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+_0x20bd3f(0x167)),serviceEntitySubscriber,_0x212e3f)):_0x2dff1f='';let _0x22ff10=serviceEntitySubscriber[_0x20bd3f(0x1fa)](/{{entityToJson}}/g,_0x2dff1f);await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+_0x20bd3f(0x167)),_0x22ff10,_0x212e3f),await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+_0x20bd3f(0x1eb)),serviceHistoryQuery,_0x212e3f),await this[_0x20bd3f(0x18b)](_0x586b5c+(_0x26c7e2+'/'+_0x26c7e2+'-history-type.ts'),sereviceHistoryType,_0x212e3f);let _0x1c3a79=_0x586b5c+_0x20bd3f(0x17b);0x0==await this['existsPath'](_0x1c3a79)&&await this[_0x20bd3f(0x18b)](_0x1c3a79,allIndex,_0x212e3f);let _0x4d8319=await fs['readFileSync'](_0x1c3a79,'utf8');_0x4d8319[_0x20bd3f(0x1b0)]('export\x20*\x20from\x20\x27./'+_0x212e3f[_0x20bd3f(0x1a6)]+'/'+_0x212e3f[_0x20bd3f(0x1a6)]+_0x20bd3f(0x1ad))<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* EXPORT ENTITY TYPES \*\//,_0x20bd3f(0x186)+_0x212e3f['name']+'/'+_0x212e3f[_0x20bd3f(0x1a6)]+'-history\x27')),_0x4d8319[_0x20bd3f(0x1b0)](_0x20bd3f(0x184)+_0x212e3f[_0x20bd3f(0x1a6)]+'/'+_0x212e3f[_0x20bd3f(0x1a6)]+'\x27')<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* EXPORT ENTITY TYPES \*\//,_0x20bd3f(0x186)+_0x212e3f[_0x20bd3f(0x1a6)]+'/'+_0x212e3f['name']+'\x27')),_0x4d8319[_0x20bd3f(0x1b0)]('import\x20{\x20entities\x20as\x20'+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1c2)+_0x212e3f['pascalCaseName']+_0x20bd3f(0x1f3)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1b1)+_0x212e3f[_0x20bd3f(0x1a6)]+'\x27')<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x20bd3f(0x1a0)+_0x212e3f[_0x20bd3f(0x1d4)]+'Entities,\x20resolvers\x20as\x20'+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1f3)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1b1)+_0x212e3f['name']+'\x27')),_0x4d8319['indexOf'](_0x20bd3f(0x1e8)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x18f))<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* ENTITIES \*\//,_0x20bd3f(0x1af)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x18f))),_0x4d8319[_0x20bd3f(0x1b0)]('...'+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1b9))<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* RESOLVER CLASSES \*\//,_0x20bd3f(0x194)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1b9))),_0x4d8319[_0x20bd3f(0x1b0)](_0x20bd3f(0x1e8)+_0x212e3f['pascalCaseName']+_0x20bd3f(0x1f9))<0x0&&(_0x4d8319=_0x4d8319[_0x20bd3f(0x1fa)](/\/\* SUBSCRIBERS \*\//,_0x20bd3f(0x1f5)+_0x212e3f[_0x20bd3f(0x1d4)]+_0x20bd3f(0x1f9))),await this[_0x20bd3f(0x18b)](_0x1c3a79,_0x4d8319,_0x212e3f);}async[a0_0x3828b3(0x1e5)](_0x4e2916,_0xae243,_0x5809f8,_0x4189b4,_0x96973b){const _0x57f6c4=a0_0x3828b3;await this[_0x57f6c4(0x18b)](_0x4e2916+(_0xae243+_0x57f6c4(0x1bb)),serviceIndex,_0x96973b),await this['writeFile'](_0x4e2916+(_0xae243+'/'+_0xae243+_0x57f6c4(0x1b5)),serviceQuery,_0x96973b),await this[_0x57f6c4(0x18b)](_0x4e2916+(_0xae243+'/'+_0xae243+'-mutation.ts'),serviceMutation,_0x96973b);let _0x91d2db=this[_0x57f6c4(0x1a8)](_0x5809f8,_0x4189b4);await this['writeFile'](_0x4e2916+(_0xae243+'/'+_0xae243+_0x57f6c4(0x197)),_0x91d2db,_0x96973b);let _0x29d203=this['createTypeText'](_0x4189b4);await this[_0x57f6c4(0x18b)](_0x4e2916+(_0xae243+'/'+_0xae243+_0x57f6c4(0x1dc)),_0x29d203,_0x96973b);let _0x1204a9=_0x4e2916+'index.ts';0x0==await this[_0x57f6c4(0x1cc)](_0x1204a9)&&await this[_0x57f6c4(0x18b)](_0x1204a9,allIndex,_0x96973b);let _0x2938fe=await fs[_0x57f6c4(0x1d5)](_0x1204a9,_0x57f6c4(0x180));_0x2938fe[_0x57f6c4(0x1b0)](_0x57f6c4(0x184)+_0x96973b[_0x57f6c4(0x1a6)]+'/'+_0x96973b[_0x57f6c4(0x1a6)]+'\x27')<0x0&&(_0x2938fe=_0x2938fe[_0x57f6c4(0x1fa)](/\/\* EXPORT ENTITY TYPES \*\//,'/*\x20EXPORT\x20ENTITY\x20TYPES\x20*/\x0aexport\x20*\x20from\x20\x27./'+_0x96973b[_0x57f6c4(0x1a6)]+'/'+_0x96973b[_0x57f6c4(0x1a6)]+'\x27')),_0x2938fe['indexOf'](_0x57f6c4(0x183)+_0x96973b['pascalCaseName']+_0x57f6c4(0x1c2)+_0x96973b[_0x57f6c4(0x1d4)]+_0x57f6c4(0x178)+_0x96973b[_0x57f6c4(0x1a6)]+'\x27')<0x0&&(_0x2938fe=_0x2938fe[_0x57f6c4(0x1fa)](/\/\* IMPORT ENTITIES AND RESOLVERS \*\//,_0x57f6c4(0x1a0)+_0x96973b[_0x57f6c4(0x1d4)]+_0x57f6c4(0x1c2)+_0x96973b[_0x57f6c4(0x1d4)]+_0x57f6c4(0x178)+_0x96973b['name']+'\x27')),_0x2938fe[_0x57f6c4(0x1b0)](_0x57f6c4(0x1e8)+_0x96973b[_0x57f6c4(0x1d4)]+'Entities,')<0x0&&(_0x2938fe=_0x2938fe[_0x57f6c4(0x1fa)](/\/\* ENTITIES \*\//,_0x57f6c4(0x1af)+_0x96973b['pascalCaseName']+_0x57f6c4(0x18f))),_0x2938fe[_0x57f6c4(0x1b0)](_0x57f6c4(0x1e8)+_0x96973b[_0x57f6c4(0x1d4)]+'Resolvers,')<0x0&&(_0x2938fe=_0x2938fe['replace'](/\/\* RESOLVER CLASSES \*\//,_0x57f6c4(0x194)+_0x96973b[_0x57f6c4(0x1d4)]+_0x57f6c4(0x1b9))),await this[_0x57f6c4(0x18b)](_0x1204a9,_0x2938fe,_0x96973b);}['createTypeText'](_0x5474c2){const _0x5ae844=a0_0x3828b3;let _0x13e156=sereviceType,_0x4b977b=_0x5474c2[_0x5ae844(0x19e)](_0x475f51=>{const _0x2c0bbb=_0x5ae844;if('id'==_0x475f51[_0x2c0bbb(0x1a6)])return'';if(_0x2c0bbb(0x1e7)==_0x475f51[_0x2c0bbb(0x1a6)])return'';if(_0x2c0bbb(0x16d)==_0x475f51[_0x2c0bbb(0x1a6)])return'';if(_0x2c0bbb(0x165)==_0x475f51['name'])return'';if(_0x2c0bbb(0x17e)==_0x475f51[_0x2c0bbb(0x1a6)])return'';if(_0x2c0bbb(0x1de)==_0x475f51[_0x2c0bbb(0x1a6)])return'';let _0xaa6a82=this[_0x2c0bbb(0x1a7)](_0x475f51),_0x1871a0=this[_0x2c0bbb(0x1ca)](_0x475f51),_0x2ad7ed=camelCase(_0x475f51['name']);return'\x20\x20'+(_0x2c0bbb(0x18c)+(0x0==_0xaa6a82[_0x2c0bbb(0x1f6)]?'':_0x2c0bbb(0x17c)+_0xaa6a82+',')+_0x2c0bbb(0x1ed)+_0x475f51['nullable']+_0x2c0bbb(0x1f7))+_0x2c0bbb(0x1e4)+(''+_0x2ad7ed+(_0x475f51['nullable']?'?':'')+':\x20'+_0x1871a0)+'\x0a';});_0x13e156=_0x13e156[_0x5ae844(0x1fa)](/{{newTypeColumns}}/g,_0x4b977b[_0x5ae844(0x1e9)]('\x0a'));let _0x10ac27=_0x5474c2[_0x5ae844(0x19e)](_0x30ad05=>{const _0x119588=_0x5ae844;if('id'==_0x30ad05[_0x119588(0x1a6)])return'';if(_0x119588(0x1e7)==_0x30ad05[_0x119588(0x1a6)])return'';if(_0x119588(0x16d)==_0x30ad05[_0x119588(0x1a6)])return'';if('updated_at'==_0x30ad05[_0x119588(0x1a6)])return'';if(_0x119588(0x17e)==_0x30ad05['name'])return'';if(_0x119588(0x1de)==_0x30ad05[_0x119588(0x1a6)])return'';let _0x347cf3=this['getFieldType'](_0x30ad05),_0x4975ce=this[_0x119588(0x1ca)](_0x30ad05);_0x30ad05[_0x119588(0x1c4)]=!0x0;let _0x187786=camelCase(_0x30ad05['name']);return'\x20\x20'+(_0x119588(0x18c)+(0x0==_0x347cf3['length']?'':_0x119588(0x17c)+_0x347cf3+',')+_0x119588(0x1ed)+_0x30ad05['nullable']+_0x119588(0x1f7))+'\x0a\x20\x20'+(''+_0x187786+(_0x30ad05[_0x119588(0x1c4)]?'?':'')+':\x20'+_0x4975ce)+'\x0a';});return _0x13e156=_0x13e156[_0x5ae844(0x1fa)](/{{patchTypeColumns}}/g,_0x10ac27[_0x5ae844(0x1e9)]('\x0a')),_0x13e156;}[a0_0x3828b3(0x1a8)](_0x252a98,_0x2d510f){const _0x2072d8=a0_0x3828b3;let _0x116e4b=serviceEntity,_0x4a4248=_0x2d510f[_0x2072d8(0x1ec)](function(_0x1c8b67,_0x26d9a7){const _0x2fbfe5=_0x2072d8;return _0x1c8b67[_0x2fbfe5(0x1ab)]-_0x26d9a7['rank'];})['map'](_0x3444f6=>this[_0x2072d8(0x1d2)](_0x3444f6));[_0x2072d8(0x1c6),_0x2072d8(0x1bd)]['includes'](_0x252a98[_0x2072d8(0x1c5)])&&_0x4a4248[_0x2072d8(0x1cf)]('\x0a\x20\x20@VersionColumn({\x20default:\x201\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201'),_0x116e4b=_0x116e4b[_0x2072d8(0x1fa)](/{{entityColumns}}/g,_0x4a4248[_0x2072d8(0x1e9)]('\x0a'));let _0x126429='',_0xa07e85=_0x2d510f[_0x2072d8(0x1c9)](_0xa89126=>_0xa89126[_0x2072d8(0x1a2)]&&_0xa89126[_0x2072d8(0x1a2)]>0x0)[_0x2072d8(0x1ec)](function(_0x3915cd,_0x1537fa){return _0x3915cd['uniqRank']-_0x1537fa['uniqRank'];});if(_0xa07e85['length']>0x0){_0x126429=_0x2072d8(0x1c3);let _0x108d00=_0xa07e85[_0x2072d8(0x19e)](_0x363b61=>{const _0x324f4d=_0x2072d8;let _0x2ff862=_0x363b61[_0x324f4d(0x1a6)];return _0x324f4d(0x1e7)==_0x363b61[_0x324f4d(0x1a6)]&&(_0x2ff862=_0x324f4d(0x16c)),_0x324f4d(0x17e)==_0x363b61[_0x324f4d(0x1a6)]&&(_0x2ff862=_0x324f4d(0x195)),_0x324f4d(0x1de)==_0x363b61[_0x324f4d(0x1a6)]&&(_0x2ff862=_0x324f4d(0x1d7)),_0x324f4d(0x1d3)+camelCase(_0x2ff862);});_0x126429=_0x126429[_0x2072d8(0x1fa)](/{{indexColumns}}/g,_0x108d00[_0x2072d8(0x1e9)](','));}return _0x116e4b=_0x116e4b[_0x2072d8(0x1fa)](/{{indexAnn}}/g,_0x126429),_0x116e4b;}['createHistoryEntityText'](_0x3f1689,_0xcd0149){const _0x33454f=a0_0x3828b3;let _0x3ed01f=_0x33454f(0x1bd)==_0x3f1689[_0x33454f(0x1c5)]?serviceEntityHistJson:serviceEntityHistCopy,_0x5ba808=_0xcd0149[_0x33454f(0x1ec)](function(_0x5db667,_0x45575f){const _0x2a4d6b=_0x33454f;return _0x5db667[_0x2a4d6b(0x1ab)]-_0x45575f[_0x2a4d6b(0x1ab)];})[_0x33454f(0x19e)](_0x16bd01=>this['columnToEntityColumn'](_0x16bd01));return _0x3ed01f=_0x3ed01f['replace'](/{{entityColumns}}/g,_0x5ba808[_0x33454f(0x1e9)]('\x0a')),_0x3ed01f;}[a0_0x3828b3(0x1d2)](_0x47a092){const _0x27a194=a0_0x3828b3;if('id'==_0x47a092[_0x27a194(0x1a6)])return'';if(_0x27a194(0x1e7)==_0x47a092['name'])return'';if('created_at'==_0x47a092[_0x27a194(0x1a6)])return'';if(_0x27a194(0x165)==_0x47a092['name'])return'';if(_0x27a194(0x17e)==_0x47a092[_0x27a194(0x1a6)])return'';if(_0x27a194(0x1de)==_0x47a092[_0x27a194(0x1a6)])return'';let _0x2955b6=_0x47a092['colType'];_0x27a194(0x181)==_0x47a092[_0x27a194(0x1f4)]&&(_0x2955b6=_0x27a194(0x19a)),_0x27a194(0x1ba)==_0x47a092['colType']&&(_0x2955b6=_0x27a194(0x1db)),_0x27a194(0x1c1)==_0x47a092['colType']&&(_0x2955b6=_0x27a194(0x1ef)),_0x27a194(0x1b4)==_0x47a092[_0x27a194(0x1f4)]&&(_0x2955b6=_0x27a194(0x1cd));let _0x5229f0='';_0x27a194(0x1c1)==_0x47a092[_0x27a194(0x1f4)]&&(_0x5229f0=_0x47a092[_0x27a194(0x1b3)]);let _0x2301eb=this[_0x27a194(0x1a7)](_0x47a092),_0x45b00f=this[_0x27a194(0x1ca)](_0x47a092),_0x3ea1ae=camelCase(_0x47a092[_0x27a194(0x1a6)]);return'\x20\x20'+(_0x27a194(0x19f)+_0x47a092[_0x27a194(0x1a6)]+_0x27a194(0x1be)+_0x2955b6+'\x27,\x20nullable:\x20'+_0x47a092[_0x27a194(0x1c4)]+'\x20'+(0x0==_0x5229f0[_0x27a194(0x1f6)]?'':_0x27a194(0x1f1)+_0x5229f0)+_0x27a194(0x1f7))+_0x27a194(0x1e4)+(_0x27a194(0x18c)+(0x0==_0x2301eb['length']?'':_0x27a194(0x17c)+_0x2301eb+',')+_0x27a194(0x1ed)+_0x47a092[_0x27a194(0x1c4)]+_0x27a194(0x1f7))+'\x0a\x20\x20'+(''+_0x3ea1ae+(_0x47a092[_0x27a194(0x1c4)]?'?':'')+':\x20'+_0x45b00f)+'\x0a';}[a0_0x3828b3(0x1a7)](_0x1141f9){const _0x680de0=a0_0x3828b3;let _0x5afb38='';return _0x680de0(0x181)==_0x1141f9[_0x680de0(0x1f4)]&&(_0x5afb38='Float'),_0x680de0(0x1da)==_0x1141f9[_0x680de0(0x1f4)]&&(_0x5afb38=_0x680de0(0x18d)),'long'==_0x1141f9[_0x680de0(0x1f4)]&&(_0x5afb38=_0x680de0(0x1df)),_0x680de0(0x1bf)==_0x1141f9['colType']&&(_0x5afb38=_0x680de0(0x1df)),_0x5afb38;}[a0_0x3828b3(0x1ca)](_0x392420){const _0x2a7412=a0_0x3828b3;let _0x550eb7=_0x392420[_0x2a7412(0x1f4)];return _0x2a7412(0x1f0)==_0x392420['colType']&&(_0x550eb7=_0x2a7412(0x1b8)),_0x2a7412(0x181)==_0x392420[_0x2a7412(0x1f4)]&&(_0x550eb7='number'),_0x2a7412(0x1da)==_0x392420['colType']&&(_0x550eb7=_0x2a7412(0x1b8)),'integer'==_0x392420[_0x2a7412(0x1f4)]&&(_0x550eb7='number'),_0x2a7412(0x1ba)==_0x392420[_0x2a7412(0x1f4)]&&(_0x550eb7=_0x2a7412(0x1b8)),_0x2a7412(0x1b4)==_0x392420['colType']&&(_0x550eb7=_0x2a7412(0x166)),_0x2a7412(0x164)==_0x392420[_0x2a7412(0x1f4)]&&(_0x550eb7=_0x2a7412(0x166)),_0x2a7412(0x1fb)==_0x392420[_0x2a7412(0x1f4)]&&(_0x550eb7=_0x2a7412(0x1c1)),_0x550eb7;}async[a0_0x3828b3(0x18b)](_0x24b851,_0x3f9a67,_0x235bf7){const _0x2e34e5=a0_0x3828b3;await fs['writeFileSync'](_0x24b851,this[_0x2e34e5(0x1c7)](_0x3f9a67,_0x235bf7),_0x2e34e5(0x180));}[a0_0x3828b3(0x1c7)](_0x445df6,_0x1bad55){const _0x5b4adc=a0_0x3828b3;return _0x445df6[_0x5b4adc(0x1fa)](/{{pascalCase name}}/g,_0x1bad55['pascalCaseName'])['replace'](/{{camelCase name}}/g,_0x1bad55[_0x5b4adc(0x17d)])['replace'](/{{snakeCase name}}/g,_0x1bad55[_0x5b4adc(0x1ae)])[_0x5b4adc(0x1fa)](/{{pluralPascalCase name}}/g,_0x1bad55[_0x5b4adc(0x1e2)])[_0x5b4adc(0x1fa)](/{{pluralCamelCase name}}/g,_0x1bad55[_0x5b4adc(0x199)])[_0x5b4adc(0x1fa)](/{{tableName}}/g,_0x1bad55[_0x5b4adc(0x19b)])[_0x5b4adc(0x1fa)](/{{name}}/g,_0x1bad55['name']);}async[a0_0x3828b3(0x187)](_0x224adb,_0x1cd82b,_0x84d498){const _0x5a0811=a0_0x3828b3;let _0xdde37b=_0x224adb+_0x5a0811(0x1e3);await this[_0x5a0811(0x189)](_0xdde37b),_0xdde37b=_0xdde37b+'/'+_0x1cd82b,await this[_0x5a0811(0x189)](_0xdde37b),_0xdde37b+=_0x5a0811(0x1d0),await this[_0x5a0811(0x189)](_0xdde37b),_0xdde37b+=_0x5a0811(0x1ac),await this['createDir'](_0xdde37b),_0xdde37b=_0xdde37b+'/'+_0x84d498,await this[_0x5a0811(0x189)](_0xdde37b);}[a0_0x3828b3(0x18e)](){const _0x4e7804=a0_0x3828b3;let _0xe167da=process[_0x4e7804(0x168)][_0x4e7804(0x176)][_0x4e7804(0x172)]('/'),_0xe97cbc=[];for(let _0x15dc98=0x0;_0x15dc98<_0xe167da[_0x4e7804(0x1f6)]&&_0x4e7804(0x171)!=_0xe167da[_0x15dc98];_0x15dc98++)_0xe97cbc[_0x4e7804(0x1cf)](_0xe167da[_0x15dc98]);return _0xe97cbc[_0x4e7804(0x1e9)]('/');}async['createDir'](_0x720567){const _0x28e919=a0_0x3828b3;0x0==await this['existsPath'](_0x720567)&&fs[_0x28e919(0x1e0)](_0x720567);}async[a0_0x3828b3(0x1cc)](_0x2f0866){const _0x528c97=a0_0x3828b3;return await fs[_0x528c97(0x193)](_0x2f0866);}};tslib_1['__decorate']([(0x0,type_graphql_1[a0_0x3828b3(0x1d6)])(_0x12b994=>Boolean,{'description':a0_0x3828b3(0x170)}),tslib_1[a0_0x3828b3(0x19d)](0x0,(0x0,type_graphql_1['Arg'])('id')),tslib_1['__param'](0x1,(0x0,type_graphql_1[a0_0x3828b3(0x1d8)])()),tslib_1['__metadata'](a0_0x3828b3(0x16b),Function),tslib_1[a0_0x3828b3(0x18a)]('design:paramtypes',[String,Object]),tslib_1['__metadata'](a0_0x3828b3(0x1ea),Promise)],OperatoToolCreateService[a0_0x3828b3(0x177)],a0_0x3828b3(0x1f8),null),OperatoToolCreateService=tslib_1[a0_0x3828b3(0x185)]([(0x0,type_graphql_1['Resolver'])()],OperatoToolCreateService),exports['OperatoToolCreateService']=OperatoToolCreateService;const allIndex=a0_0x3828b3(0x173),serviceIndex=a0_0x3828b3(0x182),serviceHistoryIndex=a0_0x3828b3(0x198),serviceQuery=a0_0x3828b3(0x191),serviceHistoryQuery=a0_0x3828b3(0x17a),serviceMutation='\x0aimport\x20{\x20Resolver,\x20Mutation,\x20Arg,\x20Ctx,\x20Directive\x20}\x20from\x20\x27type-graphql\x27\x0aimport\x20{\x20In\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20New{{pascalCase\x20name}},\x20{{pascalCase\x20name}}Patch\x20}\x20from\x20\x27./{{name}}-type\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@Resolver({{pascalCase\x20name}})\x0aexport\x20class\x20{{pascalCase\x20name}}Mutation\x20{\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20create\x20new\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20create{{pascalCase\x20name}}(@Arg(\x27{{camelCase\x20name}}\x27)\x20{{camelCase\x20name}}:\x20New{{pascalCase\x20name}},\x20@Ctx()\x20context:\x20any):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20return\x20await\x20tx.getRepository({{pascalCase\x20name}}).save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20{{pascalCase\x20name}},\x20{\x20description:\x20\x27To\x20modify\x20{{pascalCase\x20name}}\x20information\x27\x20})\x0a\x20\x20async\x20update{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27id\x27)\x20id:\x20string,\x0a\x20\x20\x20\x20@Arg(\x27patch\x27)\x20patch:\x20{{pascalCase\x20name}}Patch,\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20const\x20repository\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20repository.findOne(\x0a\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20)\x0a\x0a\x20\x20\x20\x20return\x20await\x20repository.save({\x0a\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20...patch,\x0a\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20})\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20[{{pascalCase\x20name}}],\x20{\x20description:\x20\x22To\x20modify\x20multiple\x20{{pluralPascalCase\x20name}}\x27\x20information\x22\x20})\x0a\x20\x20async\x20updateMultiple{{pascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27patches\x27,\x20type\x20=>\x20[{{pascalCase\x20name}}Patch])\x20patches:\x20{{pascalCase\x20name}}Patch[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<{{pascalCase\x20name}}[]>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20user,\x20tx\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20results\x20=\x20[]\x0a\x20\x20\x20\x20const\x20_createRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27+\x27)\x0a\x20\x20\x20\x20const\x20_updateRecords\x20=\x20patches.filter((patch:\x20any)\x20=>\x20patch.cuFlag.toUpperCase()\x20===\x20\x27M\x27)\x0a\x20\x20\x20\x20const\x20{{camelCase\x20name}}Repo\x20=\x20tx.getRepository({{pascalCase\x20name}})\x0a\x0a\x20\x20\x20\x20if\x20(_createRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_createRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20newRecord\x20=\x20_createRecords[i]\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...newRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20domain,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20creator:\x20user,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27+\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(_updateRecords.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20_updateRecords.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20updRecord\x20=\x20_updateRecords[i]\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20{{camelCase\x20name}}\x20=\x20await\x20{{camelCase\x20name}}Repo.findOne({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20where:\x20{\x20domain:\x20{\x20id:\x20domain.id\x20},\x20id:updRecord.id\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20relations:\x20[\x27domain\x27,\x20\x27updater\x27,\x20\x27creator\x27]\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20result\x20=\x20await\x20{{camelCase\x20name}}Repo.save({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...{{camelCase\x20name}},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20...updRecord,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updater:\x20user\x0a\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20results.push({\x20...result,\x20cuFlag:\x20\x27M\x27\x20})\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20return\x20results\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20{{pascalCase\x20name}}\x27\x20})\x0a\x20\x20async\x20delete{{pascalCase\x20name}}(@Arg(\x27id\x27)\x20id:\x20string,\x20@Ctx()\x20context:\x20any):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove({\x20domain,\x20id,\x20updater:user\x20})\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a\x0a\x20\x20@Directive(\x27@transaction\x27)\x0a\x20\x20@Mutation(returns\x20=>\x20Boolean,\x20{\x20description:\x20\x27To\x20delete\x20multiple\x20{{camelCase\x20name}}s\x27\x20})\x0a\x20\x20async\x20delete{{pluralPascalCase\x20name}}(\x0a\x20\x20\x20\x20@Arg(\x27ids\x27,\x20type\x20=>\x20[String])\x20ids:\x20string[],\x0a\x20\x20\x20\x20@Ctx()\x20context:\x20any\x0a\x20\x20):\x20Promise<boolean>\x20{\x0a\x20\x20\x20\x20const\x20{\x20domain,\x20tx,\x20user\x20}\x20=\x20context.state\x0a\x0a\x20\x20\x20\x20let\x20delEntitis\x20=\x20ids.map(id=>{\x0a\x20\x20\x20\x20\x20\x20return\x20{domain,id,updater:user}\x0a\x20\x20\x20\x20})\x0a\x0a\x20\x20\x20\x20await\x20tx.getRepository({{pascalCase\x20name}}).remove(delEntitis)\x0a\x0a\x20\x20\x20\x20return\x20true\x0a\x20\x20}\x0a}\x0a',sereviceType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@InputType()\x0aexport\x20class\x20New{{pascalCase\x20name}}\x20{\x0a{{newTypeColumns}}\x0a}\x0a\x0a@InputType()\x0aexport\x20class\x20{{pascalCase\x20name}}Patch\x20{\x0a\x20\x20@Field(type\x20=>\x20ID,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20id?:\x20string\x0a\x0a{{patchTypeColumns}}\x0a\x0a\x20\x20@Field()\x0a\x20\x20cuFlag:\x20string\x0a}\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}List\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}])\x0a\x20\x20items:\x20{{pascalCase\x20name}}[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',sereviceHistoryType='\x0aimport\x20{\x20ObjectType,\x20Field,\x20InputType,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0a\x0a@ObjectType()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryList\x20{\x0a\x20\x20@Field(type\x20=>\x20[{{pascalCase\x20name}}History])\x0a\x20\x20items:\x20{{pascalCase\x20name}}History[]\x0a\x0a\x20\x20@Field(type\x20=>\x20Int)\x0a\x20\x20total:\x20number\x0a}\x0a',serviceEntity='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20Domain\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0a@Entity(\x27{{tableName}}\x27)\x0a{{indexAnn}}\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}\x20{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a{{entityColumns}}\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}:\x20{{pascalCase\x20name}})\x20=>\x20{{camelCase\x20name}}.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntityHistCopy=a0_0x3828b3(0x1f2),serviceEntityHistJson='\x0aimport\x20{\x0a\x20\x20CreateDateColumn,\x0a\x20\x20UpdateDateColumn,\x0a\x20\x20Entity,\x0a\x20\x20Index,\x0a\x20\x20Column,\x0a\x20\x20RelationId,\x0a\x20\x20ManyToOne,\x0a\x20\x20PrimaryGeneratedColumn,\x0a\x20\x20VersionColumn\x0a}\x20from\x20\x27typeorm\x27\x0a\x0aimport\x20{\x0a\x20\x20HistoryActionColumn,\x0a\x20\x20HistoryActionType,\x0a\x20\x20HistoryEntityInterface,\x0a\x20\x20HistoryOriginalIdColumn\x0a}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20ObjectType,\x20Field,\x20Int,\x20ID,\x20Float,\x20registerEnumType\x20}\x20from\x20\x27type-graphql\x27\x0a\x0aimport\x20{\x20config\x20}\x20from\x20\x27@things-factory/env\x27\x0aimport\x20{\x20Domain,\x20ScalarObject\x20}\x20from\x20\x27@things-factory/shell\x27\x0aimport\x20{\x20User\x20}\x20from\x20\x27@things-factory/auth-base\x27\x0a\x0aconst\x20ORMCONFIG\x20=\x20config.get(\x27ormconfig\x27,\x20{})\x0aconst\x20DATABASE_TYPE\x20=\x20ORMCONFIG.type\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0a\x0a@Entity(\x27{{tableName}}_histories\x27)\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_0\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId,{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_1\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_2\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId\x20],\x20{\x20unique:\x20false\x20})\x0a@Index(\x27ix_{{snakeCase\x20name}}_histories_3\x27,\x20({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20[{{camelCase\x20name}}History.domain,\x20{{camelCase\x20name}}History.originalId,\x20{{camelCase\x20name}}History.dataRevisionNo],\x20{\x20unique:\x20true\x20})\x0a@ObjectType({\x20description:\x20\x27Entity\x20for\x20{{pascalCase\x20name}}History\x27\x20})\x0aexport\x20class\x20{{pascalCase\x20name}}History\x20\x20implements\x20HistoryEntityInterface<{{pascalCase\x20name}}>{\x0a\x20\x20@PrimaryGeneratedColumn(\x27uuid\x27)\x0a\x20\x20@Field(type\x20=>\x20ID)\x0a\x20\x20readonly\x20id:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20Domain,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20domain:\x20Domain\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.domain)\x0a\x20\x20domainId:\x20string\x0a\x0a\x20\x20@HistoryOriginalIdColumn({type:\x20\x27character\x20varying\x27,\x20nullable:\x20false\x20,length:40})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20originalId!:\x20string\x0a\x0a\x20\x20@HistoryActionColumn({\x0a\x20\x20\x20\x20nullable:\x20false,\x0a\x20\x20\x20\x20type:\x0a\x20\x20\x20\x20\x20\x20DATABASE_TYPE\x20==\x20\x27postgres\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mysql\x27\x20||\x20DATABASE_TYPE\x20==\x20\x27mariadb\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27enum\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20DATABASE_TYPE\x20==\x20\x27oracle\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20\x27varchar2\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x27smallint\x27,\x0a\x20\x20\x20\x20enum:\x20HistoryActionType\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20public\x20dataRevisionAction!:\x20HistoryActionType\x0a\x0a\x0a\x20\x20@Column({\x20default:\x201,\x20nullable:\x20false\x20})\x0a\x20\x20@Field({\x20nullable:\x20false\x20})\x0a\x20\x20dataRevisionNo?:\x20number\x20=\x201\x0a\x0a\x20\x20@Column(\x27simple-json\x27,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20@Field(type\x20=>\x20ScalarObject,\x20{\x20nullable:\x20true\x20})\x0a\x20\x20historyJson?:\x20any\x0a\x0a\x20\x20@CreateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20createdAt?:\x20Date\x0a\x0a\x20\x20@UpdateDateColumn()\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updatedAt?:\x20Date\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20creator?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.creator)\x0a\x20\x20creatorId?:\x20string\x0a\x0a\x20\x20@ManyToOne(type\x20=>\x20User,\x20{\x0a\x20\x20\x20\x20createForeignKeyConstraints:\x20false,\x0a\x20\x20\x20\x20nullable:\x20true\x0a\x20\x20})\x0a\x20\x20@Field({\x20nullable:\x20true\x20})\x0a\x20\x20updater?:\x20User\x0a\x0a\x20\x20@RelationId(({{camelCase\x20name}}History:\x20{{pascalCase\x20name}}History)\x20=>\x20{{camelCase\x20name}}History.updater)\x0a\x20\x20updaterId?:\x20string\x0a}\x0a',serviceEntitySubscriber='\x0aimport\x20{\x20EventSubscriber\x20}\x20from\x20\x27typeorm\x27\x0aimport\x20{\x20HistoryEntitySubscriber\x20}\x20from\x20\x27@operato/typeorm-history\x27\x0a\x0aimport\x20{\x20{{pascalCase\x20name}}\x20}\x20from\x20\x27./{{name}}\x27\x0aimport\x20{\x20{{pascalCase\x20name}}History\x20}\x20from\x20\x27./{{name}}-history\x27\x0aimport\x20{\x20getRepository\x20}\x20from\x20\x27@things-factory/shell\x27\x0a\x0a@EventSubscriber()\x0aexport\x20class\x20{{pascalCase\x20name}}HistoryEntitySubscriber\x20extends\x20HistoryEntitySubscriber<{{pascalCase\x20name}},{{pascalCase\x20name}}History>\x20{\x0a\x20\x20public\x20get\x20entity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}\x0a\x20\x20}\x0a\x0a\x20\x20public\x20get\x20historyEntity()\x20{\x0a\x20\x20\x20\x20return\x20{{pascalCase\x20name}}History\x0a\x20\x20}\x0a\x0a\x20\x20{{entityToJson}}\x0a\x0a\x20\x20async\x20beforeRemoveHistory(history:{{pascalCase\x20name}}History,entity:{{pascalCase\x20name}}){\x0a\x20\x20\x20\x20let\x20repo\x20=\x20getRepository({{pascalCase\x20name}}History);\x0a\x20\x20\x20\x20const\x20revNo\x20=\x20await\x20repo.createQueryBuilder()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select(\x27max(data_revision_no)\x27,\x20\x27rev_no\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.where(\x27domain_id\x20=\x20:domainId\x27,\x20{\x20domainId:\x20entity.domain.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.andWhere(\x27original_id\x20=\x20:originalId\x27,\x20{\x20originalId:\x20entity.id\x20})\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.getRawOne()\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20history.dataRevisionNo\x20=\x20revNo\x20?\x20revNo.rev_no\x20+\x201\x20:\x201;\x0a\x20\x20\x20\x20return\x20history;\x0a\x20\x20}\x0a}\x0a';
@@ -1 +1 @@
1
- 'use strict';const a0_0x4daaec=a0_0x1ae6;(function(_0x50f7e7,_0xcab79b){const _0x4f33c6=a0_0x1ae6,_0x34b1b0=_0x50f7e7();while(!![]){try{const _0x381fe6=-parseInt(_0x4f33c6(0x1c4))/0x1*(-parseInt(_0x4f33c6(0x1c2))/0x2)+parseInt(_0x4f33c6(0x1aa))/0x3+parseInt(_0x4f33c6(0x1bc))/0x4+parseInt(_0x4f33c6(0x1a1))/0x5+-parseInt(_0x4f33c6(0x1bf))/0x6*(parseInt(_0x4f33c6(0x1c3))/0x7)+parseInt(_0x4f33c6(0x1a5))/0x8*(-parseInt(_0x4f33c6(0x1a4))/0x9)+parseInt(_0x4f33c6(0x1b7))/0xa*(parseInt(_0x4f33c6(0x1a8))/0xb);if(_0x381fe6===_0xcab79b)break;else _0x34b1b0['push'](_0x34b1b0['shift']());}catch(_0x32b317){_0x34b1b0['push'](_0x34b1b0['shift']());}}}(a0_0x2abc,0x1bf7d));function a0_0x1ae6(_0x25ca34,_0x3f261b){const _0x2abcb7=a0_0x2abc();return a0_0x1ae6=function(_0x1ae6ef,_0x4c6853){_0x1ae6ef=_0x1ae6ef-0x1a0;let _0x2c089b=_0x2abcb7[_0x1ae6ef];return _0x2c089b;},a0_0x1ae6(_0x25ca34,_0x3f261b);}Object[a0_0x4daaec(0x1a6)](exports,'__esModule',{'value':!0x0}),exports[a0_0x4daaec(0x1ac)]=exports[a0_0x4daaec(0x1a2)]=void 0x0;const operato_license_checker_1=require('@things-factory/operato-license-checker'),shell_1=require(a0_0x4daaec(0x1a7)),menu_base_1=require(a0_0x4daaec(0x1a3)),license_error_1=require(a0_0x4daaec(0x1bd));async function checkStudioPermission(){const _0x3d8e01=a0_0x4daaec;let _0x2db444=((0x0,operato_license_checker_1['getPermission'])(_0x3d8e01(0x1be))||',')['split'](',')[_0x3d8e01(0x1af)](_0xbe8296=>_0xbe8296['trim']()),_0x49df5d=!0x1;return _0x2db444[_0x3d8e01(0x1b3)](_0x1d2c4c=>{const _0x5aa0a6=_0x3d8e01;_0x1d2c4c[_0x5aa0a6(0x1ab)](_0x5aa0a6(0x1c1))&&(_0x49df5d=!0x0);}),_0x49df5d;}function a0_0x2abc(){const _0x15d088=['Studio','51528KTPtEw','456302QDTOrF','3ZoMUgO','OVER_LIMIT','491875cAXhFo','checkStudioPermission','@things-factory/menu-base','112311kkVTlX','88RnICiY','defineProperty','@things-factory/shell','232463nSydRc','getCount','611907vvBIUa','includes','checkStudioTemplateIsOverLimit','LicenseError','where','map','Menu','id\x20!=\x20:id','checkTarget','forEach','ERROR_CODES','createQueryBuilder','getRepository','10LBjQIh','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','manager','menu','select','186460XUuhRr','../../errors/license-error','Permissions\x20For\x20Tailor\x20Tool','18rehfTA','from'];a0_0x2abc=function(){return _0x15d088;};return a0_0x2abc();}async function checkStudioTemplateIsOverLimit(_0xa8ec17,_0x1f2497){const _0x5d9024=a0_0x4daaec;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x5d9024(0x1ad))]({'errorCode':_0x1f2497['t'](license_error_1[_0x5d9024(0x1ad)]['ERROR_CODES']['INVALID_LICENSE'])});var _0x3a840e=0x0;if(_0x3a840e=_0xa8ec17&&''!=_0xa8ec17?await(0x0,shell_1[_0x5d9024(0x1b6)])(menu_base_1[_0x5d9024(0x1b0)])[_0x5d9024(0x1b9)]['createQueryBuilder']()[_0x5d9024(0x1bb)](_0x5d9024(0x1ba))[_0x5d9024(0x1c0)](menu_base_1['Menu'],_0x5d9024(0x1ba))[_0x5d9024(0x1ae)](_0x5d9024(0x1b1),{'id':_0xa8ec17})['andWhere'](_0x5d9024(0x1b8))[_0x5d9024(0x1a9)]()+0x1:await(0x0,shell_1[_0x5d9024(0x1b6)])(menu_base_1[_0x5d9024(0x1b0)])[_0x5d9024(0x1b9)][_0x5d9024(0x1b5)]()[_0x5d9024(0x1bb)](_0x5d9024(0x1ba))[_0x5d9024(0x1c0)](menu_base_1[_0x5d9024(0x1b0)],'menu')['where'](_0x5d9024(0x1b8))[_0x5d9024(0x1a9)]()+0x1,!(0x0,operato_license_checker_1[_0x5d9024(0x1b2)])(_0x3a840e))throw new license_error_1['LicenseError']({'errorCode':_0x1f2497['t'](license_error_1[_0x5d9024(0x1ad)][_0x5d9024(0x1b4)][_0x5d9024(0x1a0)])});return!0x0;}exports[a0_0x4daaec(0x1a2)]=checkStudioPermission,exports['checkStudioTemplateIsOverLimit']=checkStudioTemplateIsOverLimit;
1
+ 'use strict';const a0_0x32779e=a0_0x90a4;function a0_0x90a4(_0x2ac9b3,_0x3ac110){const _0x3d47c2=a0_0x3d47();return a0_0x90a4=function(_0x90a480,_0x13760e){_0x90a480=_0x90a480-0x9f;let _0x2f5e19=_0x3d47c2[_0x90a480];return _0x2f5e19;},a0_0x90a4(_0x2ac9b3,_0x3ac110);}(function(_0x1e088e,_0x1c1e0d){const _0x1b06e7=a0_0x90a4,_0x250ed9=_0x1e088e();while(!![]){try{const _0x18c0de=parseInt(_0x1b06e7(0xc5))/0x1*(parseInt(_0x1b06e7(0xad))/0x2)+-parseInt(_0x1b06e7(0xc3))/0x3*(-parseInt(_0x1b06e7(0xbd))/0x4)+parseInt(_0x1b06e7(0xbc))/0x5+-parseInt(_0x1b06e7(0xb7))/0x6+-parseInt(_0x1b06e7(0xc2))/0x7+parseInt(_0x1b06e7(0xab))/0x8*(parseInt(_0x1b06e7(0xc4))/0x9)+parseInt(_0x1b06e7(0xb5))/0xa;if(_0x18c0de===_0x1c1e0d)break;else _0x250ed9['push'](_0x250ed9['shift']());}catch(_0xc9d2fd){_0x250ed9['push'](_0x250ed9['shift']());}}}(a0_0x3d47,0xe61cb));Object[a0_0x32779e(0xb2)](exports,a0_0x32779e(0xbf),{'value':!0x0}),exports[a0_0x32779e(0xb4)]=exports[a0_0x32779e(0xb9)]=void 0x0;const operato_license_checker_1=require(a0_0x32779e(0xb1)),shell_1=require('@things-factory/shell'),menu_base_1=require('@things-factory/menu-base'),license_error_1=require(a0_0x32779e(0xbb));async function checkStudioPermission(){const _0x340d31=a0_0x32779e;let _0x5d18c8=((0x0,operato_license_checker_1[_0x340d31(0xaa)])(_0x340d31(0xa6))||',')[_0x340d31(0xbe)](',')[_0x340d31(0xae)](_0x3b39c6=>_0x3b39c6[_0x340d31(0xaf)]()),_0x520008=!0x1;return _0x5d18c8[_0x340d31(0xac)](_0x1727d2=>{const _0x2aefb6=_0x340d31;_0x1727d2[_0x2aefb6(0xb8)]('Studio')&&(_0x520008=!0x0);}),_0x520008;}async function checkStudioTemplateIsOverLimit(_0x42d4ef,_0x2ce5cf){const _0x2bcb00=a0_0x32779e;if(0x0==await checkStudioPermission())throw new license_error_1[(_0x2bcb00(0xb3))]({'errorCode':_0x2ce5cf['t'](license_error_1[_0x2bcb00(0xb3)][_0x2bcb00(0xb0)][_0x2bcb00(0xb6)])});var _0x1e69ba=0x0;if(_0x1e69ba=_0x42d4ef&&''!=_0x42d4ef?await(0x0,shell_1[_0x2bcb00(0xa5)])(menu_base_1[_0x2bcb00(0xa4)])['manager']['createQueryBuilder']()[_0x2bcb00(0xa1)](_0x2bcb00(0xa0))['from'](menu_base_1[_0x2bcb00(0xa4)],_0x2bcb00(0xa0))[_0x2bcb00(0x9f)]('id\x20!=\x20:id',{'id':_0x42d4ef})[_0x2bcb00(0xba)](_0x2bcb00(0xc0))['getCount']()+0x1:await(0x0,shell_1[_0x2bcb00(0xa5)])(menu_base_1[_0x2bcb00(0xa4)])[_0x2bcb00(0xa3)][_0x2bcb00(0xa7)]()[_0x2bcb00(0xa1)](_0x2bcb00(0xa0))[_0x2bcb00(0xa8)](menu_base_1['Menu'],'menu')[_0x2bcb00(0x9f)](_0x2bcb00(0xc0))[_0x2bcb00(0xa2)]()+0x1,!(0x0,operato_license_checker_1[_0x2bcb00(0xc1)])(_0x1e69ba))throw new license_error_1['LicenseError']({'errorCode':_0x2ce5cf['t'](license_error_1[_0x2bcb00(0xb3)][_0x2bcb00(0xb0)][_0x2bcb00(0xa9)])});return!0x0;}exports['checkStudioPermission']=checkStudioPermission,exports[a0_0x32779e(0xb4)]=checkStudioTemplateIsOverLimit;function a0_0x3d47(){const _0x235917=['map','trim','ERROR_CODES','@things-factory/operato-license-checker','defineProperty','LicenseError','checkStudioTemplateIsOverLimit','2680200EzqznY','INVALID_LICENSE','9323910lIBrkD','includes','checkStudioPermission','andWhere','../../errors/license-error','6977250jyIqWq','20508ZloCLa','split','__esModule','(template\x20is\x20not\x20null\x20and\x20template\x20!=\x20\x27\x27\x20)','checkTarget','8575623STCBSZ','6njrpUO','5823hvCVkI','5umTwJA','where','menu','select','getCount','manager','Menu','getRepository','Permissions\x20For\x20Tailor\x20Tool','createQueryBuilder','from','OVER_LIMIT','getPermission','21936XwbUBg','forEach','109526QtJUdA'];a0_0x3d47=function(){return _0x235917;};return a0_0x3d47();}