export const IBMI_KNOWN_EXTENSIONS=new Set(['.rpgle','.sqlrpgle','.clle','.cl','.clp','.dspf','.pf','.lf','.prtf','.table.sql','.index.sql','.proc.sql','.bnd','.msgf','.bnddir']);const INELIGIBLE_EXTENSIONS=new Set(['.md','.yml','.yaml','.xml','.html','.htm','.css','.js','.ts','.json','.lock','.log','.sh','.bat','.cmd','.mk','.png','.jpg','.jpeg','.gif','.svg','.ico','.zip','.tar','.gz','.pdf']),INELIGIBLE_FILENAMES=new Set(['.gitignore','.gitattributes','.gitmodules','.editorconfig','.prettierrc','.eslintrc','.npmrc','.env','license','makefile','dockerfile','jenkinsfile','.dockerignore']);export function getIbmiExtension(_0x212d25){const _0x151cae=_0x212d25['split']('/')['pop']();for(const _0x29f1f6 of IBMI_KNOWN_EXTENSIONS){if(_0x29f1f6['includes']('.')&&_0x29f1f6!=='.'+_0x151cae['split']('.')['pop']()){if(_0x151cae['toLowerCase']()['endsWith'](_0x29f1f6))return _0x29f1f6;}}const _0x2dcc3c=_0x151cae['lastIndexOf']('.');return _0x2dcc3c>=0x0?_0x151cae['substring'](_0x2dcc3c)['toLowerCase']():'';}export function getMemberName(_0x2275c4){const _0x30ca22=_0x2275c4['split']('/')['pop'](),_0x308c72=getIbmiExtension(_0x2275c4);return _0x308c72?_0x30ca22['substring'](0x0,_0x30ca22['length']-_0x308c72['length']):_0x30ca22;}export function getSourceFileName(_0x29ba5f){const _0x43910f=_0x29ba5f['split']('/');return _0x43910f['length']>=0x2?_0x43910f[_0x43910f['length']-0x2]:'';}export function validateIbmiFile(_0x376149){const _0x16c9ca=_0x376149['split']('/')['pop'](),_0x4002bd=_0x16c9ca['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x4002bd))return{'valid':![],'reason':'\x22'+_0x16c9ca+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x25632b=_0x4002bd['lastIndexOf']('.');if(_0x25632b>=0x0){const _0x33f62c=_0x4002bd['substring'](_0x25632b);if(INELIGIBLE_EXTENSIONS['has'](_0x33f62c))return{'valid':![],'reason':'\x22'+_0x33f62c+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x399e59=getSourceFileName(_0x376149),_0x2a8959=getMemberName(_0x376149);if(_0x399e59['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x399e59+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x2a8959['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x2a8959+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x40171e=getIbmiExtension(_0x376149);if(_0x40171e){const _0x4a4380=_0x40171e['startsWith']('.')?_0x40171e['substring'](0x1):_0x40171e;if(_0x4a4380['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x40171e+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x389d32){const _0x194b8d=getIbmiExtension(_0x389d32);return IBMI_KNOWN_EXTENSIONS['has'](_0x194b8d);}