const _0x447a47=_0x315c;(function(_0x3752ae,_0x19db82){const _0x32032d=_0x315c,_0x166af3=_0x3752ae();while(!![]){try{const _0x441aa1=-parseInt(_0x32032d(0x13b))/0x1+parseInt(_0x32032d(0x149))/0x2+parseInt(_0x32032d(0x142))/0x3+-parseInt(_0x32032d(0x136))/0x4*(-parseInt(_0x32032d(0x134))/0x5)+parseInt(_0x32032d(0x137))/0x6+-parseInt(_0x32032d(0x140))/0x7+-parseInt(_0x32032d(0x13c))/0x8*(parseInt(_0x32032d(0x145))/0x9);if(_0x441aa1===_0x19db82)break;else _0x166af3['push'](_0x166af3['shift']());}catch(_0x3efbef){_0x166af3['push'](_0x166af3['shift']());}}}(_0x953d,0x6d539));const express=require(_0x447a47(0x13a)),router=express['Router'](),{verifierUtilisation,genererMessageErreur}=require('../commun/verificationUtilisation');function _0x315c(_0x23112e,_0x5787d4){_0x23112e=_0x23112e-0x134;const _0x953dc8=_0x953d();let _0x315cf1=_0x953dc8[_0x23112e];return _0x315cf1;}function _0x953d(){const _0x388afc=['DELETE\x20FROM\x20famille_fournisseur\x20WHERE\x20IDfamille_fournisseur\x20=\x20\x27','famille_fournisseur','express','298225csjbRG','8hpWiJH','send','estUtilise','json','1257158JCPTrA','/supprimerFamille_fournisseur/:db/:id','513711FIaTUY','recordset','post','8715537nNMrFN','/enregistrerFamille_fournisseur/:db/:id','status','Suppression\x20avec\x20succès','253048iqunok','45zZhxcQ','params','348860wSMjjk','4867902XAqnLA'];_0x953d=function(){return _0x388afc;};return _0x953d();}router['post']('/famille_fournisseur/:db',verifyToken,Context,async(_0xd046fd,_0x3e93c7)=>{const _0xeae3c=_0x447a47;let _0x1af183;try{_0x1af183='\x0a\x20\x20\x20\x20SELECT\x20IDfamille_fournisseur\x20ndoc,\x20IDfamille_fournisseur,\x20libelle\x0a\x20\x20\x20\x20FROM\x20famille_fournisseur\x0a\x20\x20\x20\x20order\x20by\x20IDfamille_fournisseur;\x20\x20\x0a\x20\x20\x20\x20';const _0x467bc5=await executeQuery(_0xd046fd[_0xeae3c(0x135)]['db'],_0x1af183);_0x3e93c7[_0xeae3c(0x13f)](_0x467bc5[_0xeae3c(0x143)]);}catch(_0x44a79a){traiterErreur(_0x1af183,_0x44a79a,_0x3e93c7,__filename,_0xd046fd[_0xeae3c(0x135)]['db']);}}),router['post']('/unfamille_fournisseur/:db/:id',verifyToken,Context,async(_0xe0bada,_0x4e57e2)=>{const _0x46b264=_0x447a47;let _0x3c9bb3;try{_0x3c9bb3='\x0a\x20\x20\x20\x20\x20\x20SELECT\x20*\x0a\x20\x20\x20\x20\x20\x20FROM\x20famille_fournisseur\x0a\x20\x20\x20\x20\x20\x20WHERE\x20IDfamille_fournisseur\x20=\x20\x27'+_0xe0bada['params']['id']+'\x27';const _0x1887bf=await executeQuery(_0xe0bada[_0x46b264(0x135)]['db'],_0x3c9bb3);_0x4e57e2['json'](_0x1887bf[_0x46b264(0x143)][0x0]);}catch(_0x5f41f1){traiterErreur(_0x3c9bb3,_0x5f41f1,_0x4e57e2,__filename,_0xe0bada['params']['db']);}}),router['post']('/AjouterEtRenvoyerFamille_fournisseur/:db',verifyToken,Context,async(_0x1bee70,_0x9fc118)=>{const _0x23f3a1=_0x447a47;let _0x393f3b;try{_0x393f3b='\x0a\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20famille_fournisseur\x20(IDfamille_fournisseur)\x0a\x20\x20\x20\x20\x20\x20SELECT\x20ISNULL(MAX(IDfamille_fournisseur),\x200)\x20+\x201\x20FROM\x20famille_fournisseur;\x0a\x20\x20\x20\x20\x20\x20SELECT\x20TOP\x201\x20*\x0a\x20\x20\x20\x20\x20\x20FROM\x20famille_fournisseur\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20IDfamille_fournisseur\x20DESC';const _0x23f7d2=await executeQuery(_0x1bee70[_0x23f3a1(0x135)]['db'],_0x393f3b);_0x9fc118[_0x23f3a1(0x147)](0xc9)[_0x23f3a1(0x13f)](_0x23f7d2[_0x23f3a1(0x143)][0x0]);}catch(_0x2d64ef){traiterErreur(_0x393f3b,_0x2d64ef,_0x9fc118,__filename,_0x1bee70['params']['db']);}}),router[_0x447a47(0x144)](_0x447a47(0x146),verifyToken,Context,async(_0x1176dd,_0x1f102b)=>{const _0x1adb2d=_0x447a47;let _0xa7db76,_0x59c9a2={..._0x1176dd['body']};try{_0xa7db76=construireRequeteMiseAJour('famille_fournisseur',_0x59c9a2,'IDfamille_fournisseur\x20=\x20\x27'+_0x1176dd['params']['id']+'\x27','IDfamille_fournisseur');const _0x32c59f=await executeQuery(_0x1176dd[_0x1adb2d(0x135)]['db'],_0xa7db76);_0x1f102b['status'](0xc9)['json']({'message':'Mise\x20à\x20jour\x20avec\x20succès'});}catch(_0x55d67b){traiterErreur(_0xa7db76,_0x55d67b,_0x1f102b,__filename,_0x1176dd['params']['db']);}}),router['post'](_0x447a47(0x141),verifyToken,Context,async(_0x359aec,_0x1de001)=>{const _0x1e97de=_0x447a47;let _0x32665c;try{const _0x2c5db8=_0x359aec[_0x1e97de(0x135)]['id'],_0x9eba2a=await verifierUtilisation(_0x359aec[_0x1e97de(0x135)]['db'],'famille_fournisseur',_0x2c5db8);if(_0x9eba2a[_0x1e97de(0x13e)])return _0x1de001['status'](0x190)[_0x1e97de(0x13f)]({'message':genererMessageErreur(_0x1e97de(0x139),_0x9eba2a['utilisations'])});_0x32665c=_0x1e97de(0x138)+_0x2c5db8+'\x27',await executeQuery(_0x359aec['params']['db'],_0x32665c),_0x1de001[_0x1e97de(0x147)](0xc8)[_0x1e97de(0x13d)](_0x1e97de(0x148));}catch(_0x1bc741){traiterErreur(_0x32665c,_0x1bc741,_0x1de001,__filename,_0x359aec['params']['db']);}}),module['exports']=router;