export const DEFAULT_LAZY_RENDER_MIN_FILES=0xc8;export const DEFAULT_LAZY_RENDER_MAX_FILES=0x3e7;export const DEFAULT_LAZY_RENDER_CHUNK_SIZE=0x28;export const DEFAULT_AUTO_COLLAPSE_MIN_FILES=0xc8;export function getLazyRenderUpperBound({maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){if(!Number['isFinite'](serverMaxFiles))return maxFiles;return Math['min'](maxFiles,serverMaxFiles);}export function shouldUseLazyRendering(_0x45f13c,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x136503=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x45f13c>=minFiles&&_0x45f13c<=_0x136503;}export function shouldAutoCollapseDiff(_0x3eb236,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x3eb236>=threshold;}export function getNextRenderedCount({renderedCount:_0x403757,totalFiles:_0x370dbb,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x403757+chunkSize,_0x370dbb);}export function renderedCountForTarget({renderedCount:_0x214058,targetIndex:_0x279e0b,totalFiles:_0x32fa79,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x552da6=_0x214058;while(_0x552da6<=_0x279e0b&&_0x552da6<_0x32fa79){_0x552da6=getNextRenderedCount({'renderedCount':_0x552da6,'totalFiles':_0x32fa79,'chunkSize':chunkSize});}return _0x552da6;}export function getLazyLoadMoreText({filesLength:_0x5d626a,renderedCount:_0x5d5fc5,chunkSize:_0x5b32a0}){const _0x4087b6=Math['max'](0x0,_0x5d626a-_0x5d5fc5),_0x4e5e61=Math['min'](_0x5b32a0,_0x4087b6);return'Load\x20'+_0x4e5e61['toLocaleString']()+'\x20more\x20files\x20('+_0x5d5fc5['toLocaleString']()+'\x20/\x20'+_0x5d626a['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x619ff0){return _0x619ff0?.['newPath']||_0x619ff0?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x400d41,collapsed:_0x5f2907,storageKeyPrefix:_0x45ce64,getStorageKey:_0x2fedeb}){const _0x50b80c=[];for(const _0x17b9dc of _0x400d41||[]){const _0x121baa=getFileNameFromDiffFile(_0x17b9dc);if(!_0x121baa)continue;_0x50b80c['push']({'key':_0x2fedeb(_0x45ce64,_0x121baa),'value':String(_0x5f2907),'fileName':_0x121baa});}return _0x50b80c;}