{"version":3,"file":"clamp-resize-size.cjs","names":[],"sources":["../../../../src/components/AppShell/use-app-shell-resize/clamp-resize-size.ts"],"sourcesContent":["interface ClampResizeSizeInput {\n  size: number;\n  min: number | undefined;\n  max: number | undefined;\n  viewportMax: number;\n}\n\nexport function clampResizeSize({ size, min, max, viewportMax }: ClampResizeSizeInput) {\n  const upperBound = Math.min(max ?? Number.POSITIVE_INFINITY, viewportMax);\n  const lowerBound = Math.min(min ?? 0, upperBound);\n  return Math.max(lowerBound, Math.min(size, upperBound));\n}\n\nexport function getCollapseState(size: number, collapseThreshold: number | undefined) {\n  if (collapseThreshold === undefined) {\n    return false;\n  }\n\n  return size < collapseThreshold;\n}\n"],"mappings":";;AAOA,SAAgB,gBAAgB,EAAE,MAAM,KAAK,KAAK,eAAqC;CACrF,MAAM,aAAa,KAAK,IAAI,OAAO,OAAO,mBAAmB,WAAW;CAExE,OAAO,KAAK,IADO,KAAK,IAAI,OAAO,GAAG,UACb,GAAG,KAAK,IAAI,MAAM,UAAU,CAAC;AACxD;AAEA,SAAgB,iBAAiB,MAAc,mBAAuC;CACpF,IAAI,sBAAsB,KAAA,GACxB,OAAO;CAGT,OAAO,OAAO;AAChB"}