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(_0xe73dc1){const _0x360a3a=_0xe73dc1['split']('/')['pop']();for(const _0xf5ab25 of IBMI_KNOWN_EXTENSIONS){if(_0xf5ab25['includes']('.')&&_0xf5ab25!=='.'+_0x360a3a['split']('.')['pop']()){if(_0x360a3a['toLowerCase']()['endsWith'](_0xf5ab25))return _0xf5ab25;}}const _0x2343f0=_0x360a3a['lastIndexOf']('.');return _0x2343f0>=0x0?_0x360a3a['substring'](_0x2343f0)['toLowerCase']():'';}export function getMemberName(_0x500148){const _0x1f6280=_0x500148['split']('/')['pop'](),_0x3222a3=getIbmiExtension(_0x500148);return _0x3222a3?_0x1f6280['substring'](0x0,_0x1f6280['length']-_0x3222a3['length']):_0x1f6280;}export function getSourceFileName(_0x3b67ce){const _0x3d01b0=_0x3b67ce['split']('/');return _0x3d01b0['length']>=0x2?_0x3d01b0[_0x3d01b0['length']-0x2]:'';}export function validateIbmiFile(_0x12d8c4){const _0x12dc28=_0x12d8c4['split']('/')['pop'](),_0x192655=_0x12dc28['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x192655))return{'valid':![],'reason':'\x22'+_0x12dc28+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x393e54=_0x192655['lastIndexOf']('.');if(_0x393e54>=0x0){const _0x191d65=_0x192655['substring'](_0x393e54);if(INELIGIBLE_EXTENSIONS['has'](_0x191d65))return{'valid':![],'reason':'\x22'+_0x191d65+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x2e7514=getSourceFileName(_0x12d8c4),_0x5bda9c=getMemberName(_0x12d8c4);if(_0x2e7514['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x2e7514+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x5bda9c['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x5bda9c+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x7dd963=getIbmiExtension(_0x12d8c4);if(_0x7dd963){const _0x543660=_0x7dd963['startsWith']('.')?_0x7dd963['substring'](0x1):_0x7dd963;if(_0x543660['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x7dd963+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x59a56b){const _0x27eeae=getIbmiExtension(_0x59a56b);return IBMI_KNOWN_EXTENSIONS['has'](_0x27eeae);}