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(_0x17b035,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x58a704=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x17b035>=minFiles&&_0x17b035<=_0x58a704;}export function shouldAutoCollapseDiff(_0x36c5b6,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x36c5b6>=threshold;}export function getNextRenderedCount({renderedCount:_0x493120,totalFiles:_0x480f5a,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x493120+chunkSize,_0x480f5a);}export function renderedCountForTarget({renderedCount:_0x4a1500,targetIndex:_0x413bfe,totalFiles:_0x1be18b,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x4a60de=_0x4a1500;while(_0x4a60de<=_0x413bfe&&_0x4a60de<_0x1be18b){_0x4a60de=getNextRenderedCount({'renderedCount':_0x4a60de,'totalFiles':_0x1be18b,'chunkSize':chunkSize});}return _0x4a60de;}export function getLazyLoadMoreText({filesLength:_0x514ade,renderedCount:_0x1131c8,chunkSize:_0x35e2f6}){const _0x1325ea=Math['max'](0x0,_0x514ade-_0x1131c8),_0xcc6a79=Math['min'](_0x35e2f6,_0x1325ea);return'Load\x20'+_0xcc6a79['toLocaleString']()+'\x20more\x20files\x20('+_0x1131c8['toLocaleString']()+'\x20/\x20'+_0x514ade['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x388e4d){return _0x388e4d?.['newPath']||_0x388e4d?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x469b09,collapsed:_0x4f6c70,storageKeyPrefix:_0x3344dc,getStorageKey:_0x45151c}){const _0x3c03a0=[];for(const _0x4a968a of _0x469b09||[]){const _0x41f434=getFileNameFromDiffFile(_0x4a968a);if(!_0x41f434)continue;_0x3c03a0['push']({'key':_0x45151c(_0x3344dc,_0x41f434),'value':String(_0x4f6c70),'fileName':_0x41f434});}return _0x3c03a0;}