export function mergeIbmiFileSelections({syncRelativeFiles:syncRelativeFiles=[],syncAbsolutePaths:syncAbsolutePaths=[],puiRelativeFiles:puiRelativeFiles=[],puiAbsolutePaths:puiAbsolutePaths=[]}={}){const _0x44ec83=puiAbsolutePaths['map']((_0x227239,_0x375294)=>_0x227239??puiRelativeFiles[_0x375294]??''),_0x244cb7=new Set(_0x44ec83['filter'](Boolean)),_0x577f83=syncRelativeFiles['map']((_0x262a0d,_0x2cc06d)=>({'file':_0x262a0d,'absolutePath':syncAbsolutePaths[_0x2cc06d]??_0x262a0d}))['filter'](_0xff0069=>!_0xff0069['absolutePath']||!_0x244cb7['has'](_0xff0069['absolutePath'])),_0x120392=_0x577f83['map'](_0x47c615=>_0x47c615['file']),_0x18a599=_0x577f83['map'](_0x1ec947=>_0x1ec947['absolutePath']),_0x20a63c=[...puiRelativeFiles];return{'syncRelativeFiles':_0x120392,'syncAbsolutePaths':_0x18a599,'puiRelativeFiles':_0x20a63c,'puiAbsolutePaths':_0x44ec83,'allFiles':[..._0x120392,..._0x20a63c],'puiFileSet':new Set(_0x20a63c)};}export function splitIbmiFileSelections({selectedFiles:selectedFiles=[],syncRelativeFiles:syncRelativeFiles=[],syncAbsolutePaths:syncAbsolutePaths=[],puiRelativeFiles:puiRelativeFiles=[],puiAbsolutePaths:puiAbsolutePaths=[]}={}){const _0x293f6f=new Map(syncRelativeFiles['map']((_0x3caf38,_0x511cf7)=>[_0x3caf38,syncAbsolutePaths[_0x511cf7]??_0x3caf38])),_0xd325=new Map(puiRelativeFiles['map']((_0x5eea7e,_0x85476f)=>[_0x5eea7e,puiAbsolutePaths[_0x85476f]??_0x5eea7e])),_0x27317b=[],_0x2d78f2=[],_0x348dd5=[],_0x4654cc=[];for(const _0x1756c7 of selectedFiles){_0x293f6f['has'](_0x1756c7)&&(_0x27317b['push'](_0x1756c7),_0x348dd5['push'](_0x293f6f['get'](_0x1756c7))),_0xd325['has'](_0x1756c7)&&(_0x2d78f2['push'](_0x1756c7),_0x4654cc['push'](_0xd325['get'](_0x1756c7)));}return{'selectedSyncFiles':_0x27317b,'selectedPuiFiles':_0x2d78f2,'syncFiles':_0x348dd5,'puiFiles':_0x4654cc};}export function getIbmiCredentialRequirement({selectedFiles:selectedFiles=[],syncRelativeFiles:syncRelativeFiles=[],syncAbsolutePaths:syncAbsolutePaths=[],puiRelativeFiles:puiRelativeFiles=[],puiAbsolutePaths:puiAbsolutePaths=[],syncCredentials:syncCredentials='connection',deployCredentials:deployCredentials='prompt'}={}){const _0x562fd8=splitIbmiFileSelections({'selectedFiles':selectedFiles,'syncRelativeFiles':syncRelativeFiles,'syncAbsolutePaths':syncAbsolutePaths,'puiRelativeFiles':puiRelativeFiles,'puiAbsolutePaths':puiAbsolutePaths}),_0x66f1e1=_0x562fd8['selectedSyncFiles']['length']>0x0&&syncCredentials==='prompt',_0x567379=_0x562fd8['selectedPuiFiles']['length']>0x0&&deployCredentials==='prompt';return{..._0x562fd8,'syncNeedsCredentials':_0x66f1e1,'deployNeedsCredentials':_0x567379,'needsCredentials':_0x66f1e1||_0x567379};}export function hasPendingIbmiOperations({syncAvailable:syncAvailable=![],synced:synced=![],puiDeployAvailable:puiDeployAvailable=![],puiDeployed:puiDeployed=![],allowResync:allowResync=![],allowRedeploy:allowRedeploy=![]}={}){return syncAvailable&&(allowResync||!synced)||puiDeployAvailable&&(allowRedeploy||!puiDeployed);}