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(_0x3c24da,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x436e13=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x3c24da>=minFiles&&_0x3c24da<=_0x436e13;}export function shouldAutoCollapseDiff(_0x197cd5,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x197cd5>=threshold;}export function getNextRenderedCount({renderedCount:_0x14e8c0,totalFiles:_0x50d26d,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x14e8c0+chunkSize,_0x50d26d);}export function renderedCountForTarget({renderedCount:_0x57c90c,targetIndex:_0x634679,totalFiles:_0x539cf1,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x5fd3d0=_0x57c90c;while(_0x5fd3d0<=_0x634679&&_0x5fd3d0<_0x539cf1){_0x5fd3d0=getNextRenderedCount({'renderedCount':_0x5fd3d0,'totalFiles':_0x539cf1,'chunkSize':chunkSize});}return _0x5fd3d0;}export function getLazyLoadMoreText({filesLength:_0x9f7e30,renderedCount:_0x1abb81,chunkSize:_0x10a890}){const _0x4a285e=Math['max'](0x0,_0x9f7e30-_0x1abb81),_0x29de28=Math['min'](_0x10a890,_0x4a285e);return'Load\x20'+_0x29de28['toLocaleString']()+'\x20more\x20files\x20('+_0x1abb81['toLocaleString']()+'\x20/\x20'+_0x9f7e30['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x32c792){return _0x32c792?.['newPath']||_0x32c792?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x14aa66,collapsed:_0x40771d,storageKeyPrefix:_0x744c5b,getStorageKey:_0x2426af}){const _0x3ec426=[];for(const _0x15a432 of _0x14aa66||[]){const _0x3990d8=getFileNameFromDiffFile(_0x15a432);if(!_0x3990d8)continue;_0x3ec426['push']({'key':_0x2426af(_0x744c5b,_0x3990d8),'value':String(_0x40771d),'fileName':_0x3990d8});}return _0x3ec426;}