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(_0x326b18,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x2cb03a=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x326b18>=minFiles&&_0x326b18<=_0x2cb03a;}export function shouldAutoCollapseDiff(_0x2aa3f1,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x2aa3f1>=threshold;}export function getNextRenderedCount({renderedCount:_0x21ba61,totalFiles:_0x493229,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x21ba61+chunkSize,_0x493229);}export function renderedCountForTarget({renderedCount:_0x5b70a5,targetIndex:_0xa8b089,totalFiles:_0x5451da,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x4b6e8d=_0x5b70a5;while(_0x4b6e8d<=_0xa8b089&&_0x4b6e8d<_0x5451da){_0x4b6e8d=getNextRenderedCount({'renderedCount':_0x4b6e8d,'totalFiles':_0x5451da,'chunkSize':chunkSize});}return _0x4b6e8d;}export function getLazyLoadMoreText({filesLength:_0x2050be,renderedCount:_0x35fc2f,chunkSize:_0x13f592}){const _0x56a1ab=Math['max'](0x0,_0x2050be-_0x35fc2f),_0x2c16ad=Math['min'](_0x13f592,_0x56a1ab);return'Load\x20'+_0x2c16ad['toLocaleString']()+'\x20more\x20files\x20('+_0x35fc2f['toLocaleString']()+'\x20/\x20'+_0x2050be['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x1472ce){return _0x1472ce?.['newPath']||_0x1472ce?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x28fc79,collapsed:_0x3680b1,storageKeyPrefix:_0x84b879,getStorageKey:_0x1dd1be}){const _0x1a96a3=[];for(const _0x49a97b of _0x28fc79||[]){const _0x9cbe7b=getFileNameFromDiffFile(_0x49a97b);if(!_0x9cbe7b)continue;_0x1a96a3['push']({'key':_0x1dd1be(_0x84b879,_0x9cbe7b),'value':String(_0x3680b1),'fileName':_0x9cbe7b});}return _0x1a96a3;}