1 line
29 KiB
JSON
1 line
29 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { debounce, capitalize } from '@mui/material/utils';\nimport { useGridVisibleRows } from '../../utils/useGridVisibleRows';\nimport { useGridApiMethod } from '../../utils/useGridApiMethod';\nimport { useGridSelector } from '../../utils/useGridSelector';\nimport { gridDensityRowHeightSelector, gridDensityFactorSelector } from '../density/densitySelector';\nimport { gridFilterStateSelector } from '../filter/gridFilterSelector';\nimport { gridPaginationSelector } from '../pagination/gridPaginationSelector';\nimport { gridSortingStateSelector } from '../sorting/gridSortingSelector';\nimport { useGridRegisterPipeApplier } from '../../core/pipeProcessing';\nimport { gridPinnedRowsSelector } from './gridRowsSelector';\nexport const rowsMetaStateInitializer = state => _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight: 0,\n positions: []\n }\n});\n/**\n * @requires useGridPageSize (method)\n * @requires useGridPage (method)\n */\n\nexport const useGridRowsMeta = (apiRef, props) => {\n const {\n getRowHeight: getRowHeightProp,\n getRowSpacing,\n getEstimatedRowHeight\n } = props;\n const rowsHeightLookup = React.useRef({}); // Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js\n\n const lastMeasuredRowIndex = React.useRef(-1);\n const hasRowWithAutoHeight = React.useRef(false);\n const rowHeightFromDensity = useGridSelector(apiRef, gridDensityRowHeightSelector);\n const filterState = useGridSelector(apiRef, gridFilterStateSelector);\n const paginationState = useGridSelector(apiRef, gridPaginationSelector);\n const sortingState = useGridSelector(apiRef, gridSortingStateSelector);\n const currentPage = useGridVisibleRows(apiRef, props);\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const hydrateRowsMeta = React.useCallback(() => {\n var _pinnedRows$top, _pinnedRows$bottom;\n hasRowWithAutoHeight.current = false;\n const densityFactor = gridDensityFactorSelector(apiRef.current.state, apiRef.current.instanceId);\n const calculateRowProcessedSizes = row => {\n if (!rowsHeightLookup.current[row.id]) {\n rowsHeightLookup.current[row.id] = {\n sizes: {\n baseCenter: rowHeightFromDensity\n },\n isResized: false,\n autoHeight: false,\n needsFirstMeasurement: true // Assume all rows will need to be measured by default\n };\n }\n const {\n isResized,\n needsFirstMeasurement,\n sizes\n } = rowsHeightLookup.current[row.id];\n let baseRowHeight = rowHeightFromDensity;\n const existingBaseRowHeight = sizes.baseCenter;\n if (isResized) {\n // Do not recalculate resized row height and use the value from the lookup\n baseRowHeight = existingBaseRowHeight;\n } else if (getRowHeightProp) {\n const rowHeightFromUser = getRowHeightProp(_extends({}, row, {\n densityFactor\n }));\n if (rowHeightFromUser === 'auto') {\n if (needsFirstMeasurement) {\n const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(_extends({}, row, {\n densityFactor\n })) : rowHeightFromDensity; // If the row was not measured yet use the estimated row height\n\n baseRowHeight = estimatedRowHeight != null ? estimatedRowHeight : rowHeightFromDensity;\n } else {\n baseRowHeight = existingBaseRowHeight;\n }\n hasRowWithAutoHeight.current = true;\n rowsHeightLookup.current[row.id].autoHeight = true;\n } else {\n // Default back to base rowHeight if getRowHeight returns null or undefined.\n baseRowHeight = rowHeightFromUser != null ? rowHeightFromUser : rowHeightFromDensity;\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n rowsHeightLookup.current[row.id].autoHeight = false;\n }\n } else {\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n }\n const existingBaseSizes = Object.entries(sizes).reduce((acc, [key, size]) => {\n if (/^base[A-Z]/.test(key)) {\n acc[key] = size;\n }\n return acc;\n }, {}); // We use an object to make simple to check if a height is already added or not\n\n const initialHeights = _extends({}, existingBaseSizes, {\n baseCenter: baseRowHeight\n });\n if (getRowSpacing) {\n var _spacing$top, _spacing$bottom;\n const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);\n const spacing = getRowSpacing(_extends({}, row, {\n isFirstVisible: indexRelativeToCurrentPage === 0,\n isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,\n indexRelativeToCurrentPage\n }));\n initialHeights.spacingTop = (_spacing$top = spacing.top) != null ? _spacing$top : 0;\n initialHeights.spacingBottom = (_spacing$bottom = spacing.bottom) != null ? _spacing$bottom : 0;\n }\n const processedSizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);\n rowsHeightLookup.current[row.id].sizes = processedSizes;\n return processedSizes;\n };\n const positions = [];\n const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {\n positions.push(acc);\n let maximumBaseSize = 0;\n let otherSizes = 0;\n const processedSizes = calculateRowProcessedSizes(row);\n Object.entries(processedSizes).forEach(([size, value]) => {\n if (/^base[A-Z]/.test(size)) {\n maximumBaseSize = value > maximumBaseSize ? value : maximumBaseSize;\n } else {\n otherSizes += value;\n }\n });\n return acc + maximumBaseSize + otherSizes;\n }, 0);\n pinnedRows == null ? void 0 : (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n pinnedRows == null ? void 0 : (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n apiRef.current.setState(state => {\n return _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight,\n positions\n }\n });\n });\n if (!hasRowWithAutoHeight.current) {\n // No row has height=auto, so all rows are already measured\n lastMeasuredRowIndex.current = Infinity;\n }\n apiRef.current.forceUpdate();\n }, [apiRef, currentPage.rows, rowHeightFromDensity, getRowHeightProp, getRowSpacing, getEstimatedRowHeight, pinnedRows]);\n const getRowHeight = React.useCallback(rowId => {\n const height = rowsHeightLookup.current[rowId];\n return height ? height.sizes.baseCenter : rowHeightFromDensity;\n }, [rowHeightFromDensity]);\n const getRowInternalSizes = rowId => {\n var _rowsHeightLookup$cur;\n return (_rowsHeightLookup$cur = rowsHeightLookup.current[rowId]) == null ? void 0 : _rowsHeightLookup$cur.sizes;\n };\n const setRowHeight = React.useCallback((id, height) => {\n rowsHeightLookup.current[id].sizes.baseCenter = height;\n rowsHeightLookup.current[id].isResized = true;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n hydrateRowsMeta();\n }, [hydrateRowsMeta]);\n const debouncedHydrateRowsMeta = React.useMemo(() => debounce(hydrateRowsMeta), [hydrateRowsMeta]);\n const storeMeasuredRowHeight = React.useCallback((id, height, position) => {\n if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {\n return;\n } // Only trigger hydration if the value is different, otherwise we trigger a loop\n\n const needsHydration = rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] !== height;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] = height;\n if (needsHydration) {\n debouncedHydrateRowsMeta();\n }\n }, [debouncedHydrateRowsMeta]);\n const rowHasAutoHeight = React.useCallback(id => {\n var _rowsHeightLookup$cur2;\n return ((_rowsHeightLookup$cur2 = rowsHeightLookup.current[id]) == null ? void 0 : _rowsHeightLookup$cur2.autoHeight) || false;\n }, []);\n const getLastMeasuredRowIndex = React.useCallback(() => {\n return lastMeasuredRowIndex.current;\n }, []);\n const setLastMeasuredRowIndex = React.useCallback(index => {\n if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {\n lastMeasuredRowIndex.current = index;\n }\n }, []);\n const resetRowHeights = React.useCallback(() => {\n rowsHeightLookup.current = {};\n hydrateRowsMeta();\n }, [hydrateRowsMeta]); // The effect is used to build the rows meta data - currentPageTotalHeight and positions.\n // Because of variable row height this is needed for the virtualization\n\n React.useEffect(() => {\n hydrateRowsMeta();\n }, [rowHeightFromDensity, filterState, paginationState, sortingState, hydrateRowsMeta]);\n useGridRegisterPipeApplier(apiRef, 'rowHeight', hydrateRowsMeta);\n const rowsMetaApi = {\n unstable_getLastMeasuredRowIndex: getLastMeasuredRowIndex,\n unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,\n unstable_rowHasAutoHeight: rowHasAutoHeight,\n unstable_getRowHeight: getRowHeight,\n unstable_getRowInternalSizes: getRowInternalSizes,\n unstable_setRowHeight: setRowHeight,\n unstable_storeRowHeightMeasurement: storeMeasuredRowHeight,\n resetRowHeights\n };\n useGridApiMethod(apiRef, rowsMetaApi, 'GridRowsMetaApi');\n};","map":{"version":3,"names":["_extends","React","debounce","capitalize","useGridVisibleRows","useGridApiMethod","useGridSelector","gridDensityRowHeightSelector","gridDensityFactorSelector","gridFilterStateSelector","gridPaginationSelector","gridSortingStateSelector","useGridRegisterPipeApplier","gridPinnedRowsSelector","rowsMetaStateInitializer","state","rowsMeta","currentPageTotalHeight","positions","useGridRowsMeta","apiRef","props","getRowHeight","getRowHeightProp","getRowSpacing","getEstimatedRowHeight","rowsHeightLookup","useRef","lastMeasuredRowIndex","hasRowWithAutoHeight","rowHeightFromDensity","filterState","paginationState","sortingState","currentPage","pinnedRows","hydrateRowsMeta","useCallback","_pinnedRows$top","_pinnedRows$bottom","current","densityFactor","instanceId","calculateRowProcessedSizes","row","id","sizes","baseCenter","isResized","autoHeight","needsFirstMeasurement","baseRowHeight","existingBaseRowHeight","rowHeightFromUser","estimatedRowHeight","existingBaseSizes","Object","entries","reduce","acc","key","size","test","initialHeights","_spacing$top","_spacing$bottom","indexRelativeToCurrentPage","getRowIndexRelativeToVisibleRows","spacing","isFirstVisible","isLastVisible","rows","length","spacingTop","top","spacingBottom","bottom","processedSizes","unstable_applyPipeProcessors","push","maximumBaseSize","otherSizes","forEach","value","setState","Infinity","forceUpdate","rowId","height","getRowInternalSizes","_rowsHeightLookup$cur","setRowHeight","debouncedHydrateRowsMeta","useMemo","storeMeasuredRowHeight","position","needsHydration","rowHasAutoHeight","_rowsHeightLookup$cur2","getLastMeasuredRowIndex","setLastMeasuredRowIndex","index","resetRowHeights","useEffect","rowsMetaApi","unstable_getLastMeasuredRowIndex","unstable_setLastMeasuredRowIndex","unstable_rowHasAutoHeight","unstable_getRowHeight","unstable_getRowInternalSizes","unstable_setRowHeight","unstable_storeRowHeightMeasurement"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsMeta.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { debounce, capitalize } from '@mui/material/utils';\nimport { useGridVisibleRows } from '../../utils/useGridVisibleRows';\nimport { useGridApiMethod } from '../../utils/useGridApiMethod';\nimport { useGridSelector } from '../../utils/useGridSelector';\nimport { gridDensityRowHeightSelector, gridDensityFactorSelector } from '../density/densitySelector';\nimport { gridFilterStateSelector } from '../filter/gridFilterSelector';\nimport { gridPaginationSelector } from '../pagination/gridPaginationSelector';\nimport { gridSortingStateSelector } from '../sorting/gridSortingSelector';\nimport { useGridRegisterPipeApplier } from '../../core/pipeProcessing';\nimport { gridPinnedRowsSelector } from './gridRowsSelector';\nexport const rowsMetaStateInitializer = state => _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight: 0,\n positions: []\n }\n});\n/**\n * @requires useGridPageSize (method)\n * @requires useGridPage (method)\n */\n\nexport const useGridRowsMeta = (apiRef, props) => {\n const {\n getRowHeight: getRowHeightProp,\n getRowSpacing,\n getEstimatedRowHeight\n } = props;\n const rowsHeightLookup = React.useRef({}); // Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js\n\n const lastMeasuredRowIndex = React.useRef(-1);\n const hasRowWithAutoHeight = React.useRef(false);\n const rowHeightFromDensity = useGridSelector(apiRef, gridDensityRowHeightSelector);\n const filterState = useGridSelector(apiRef, gridFilterStateSelector);\n const paginationState = useGridSelector(apiRef, gridPaginationSelector);\n const sortingState = useGridSelector(apiRef, gridSortingStateSelector);\n const currentPage = useGridVisibleRows(apiRef, props);\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const hydrateRowsMeta = React.useCallback(() => {\n var _pinnedRows$top, _pinnedRows$bottom;\n\n hasRowWithAutoHeight.current = false;\n const densityFactor = gridDensityFactorSelector(apiRef.current.state, apiRef.current.instanceId);\n\n const calculateRowProcessedSizes = row => {\n if (!rowsHeightLookup.current[row.id]) {\n rowsHeightLookup.current[row.id] = {\n sizes: {\n baseCenter: rowHeightFromDensity\n },\n isResized: false,\n autoHeight: false,\n needsFirstMeasurement: true // Assume all rows will need to be measured by default\n\n };\n }\n\n const {\n isResized,\n needsFirstMeasurement,\n sizes\n } = rowsHeightLookup.current[row.id];\n let baseRowHeight = rowHeightFromDensity;\n const existingBaseRowHeight = sizes.baseCenter;\n\n if (isResized) {\n // Do not recalculate resized row height and use the value from the lookup\n baseRowHeight = existingBaseRowHeight;\n } else if (getRowHeightProp) {\n const rowHeightFromUser = getRowHeightProp(_extends({}, row, {\n densityFactor\n }));\n\n if (rowHeightFromUser === 'auto') {\n if (needsFirstMeasurement) {\n const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(_extends({}, row, {\n densityFactor\n })) : rowHeightFromDensity; // If the row was not measured yet use the estimated row height\n\n baseRowHeight = estimatedRowHeight != null ? estimatedRowHeight : rowHeightFromDensity;\n } else {\n baseRowHeight = existingBaseRowHeight;\n }\n\n hasRowWithAutoHeight.current = true;\n rowsHeightLookup.current[row.id].autoHeight = true;\n } else {\n // Default back to base rowHeight if getRowHeight returns null or undefined.\n baseRowHeight = rowHeightFromUser != null ? rowHeightFromUser : rowHeightFromDensity;\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n rowsHeightLookup.current[row.id].autoHeight = false;\n }\n } else {\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n }\n\n const existingBaseSizes = Object.entries(sizes).reduce((acc, [key, size]) => {\n if (/^base[A-Z]/.test(key)) {\n acc[key] = size;\n }\n\n return acc;\n }, {}); // We use an object to make simple to check if a height is already added or not\n\n const initialHeights = _extends({}, existingBaseSizes, {\n baseCenter: baseRowHeight\n });\n\n if (getRowSpacing) {\n var _spacing$top, _spacing$bottom;\n\n const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);\n const spacing = getRowSpacing(_extends({}, row, {\n isFirstVisible: indexRelativeToCurrentPage === 0,\n isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,\n indexRelativeToCurrentPage\n }));\n initialHeights.spacingTop = (_spacing$top = spacing.top) != null ? _spacing$top : 0;\n initialHeights.spacingBottom = (_spacing$bottom = spacing.bottom) != null ? _spacing$bottom : 0;\n }\n\n const processedSizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);\n rowsHeightLookup.current[row.id].sizes = processedSizes;\n return processedSizes;\n };\n\n const positions = [];\n const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {\n positions.push(acc);\n let maximumBaseSize = 0;\n let otherSizes = 0;\n const processedSizes = calculateRowProcessedSizes(row);\n Object.entries(processedSizes).forEach(([size, value]) => {\n if (/^base[A-Z]/.test(size)) {\n maximumBaseSize = value > maximumBaseSize ? value : maximumBaseSize;\n } else {\n otherSizes += value;\n }\n });\n return acc + maximumBaseSize + otherSizes;\n }, 0);\n pinnedRows == null ? void 0 : (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n pinnedRows == null ? void 0 : (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n apiRef.current.setState(state => {\n return _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight,\n positions\n }\n });\n });\n\n if (!hasRowWithAutoHeight.current) {\n // No row has height=auto, so all rows are already measured\n lastMeasuredRowIndex.current = Infinity;\n }\n\n apiRef.current.forceUpdate();\n }, [apiRef, currentPage.rows, rowHeightFromDensity, getRowHeightProp, getRowSpacing, getEstimatedRowHeight, pinnedRows]);\n const getRowHeight = React.useCallback(rowId => {\n const height = rowsHeightLookup.current[rowId];\n return height ? height.sizes.baseCenter : rowHeightFromDensity;\n }, [rowHeightFromDensity]);\n\n const getRowInternalSizes = rowId => {\n var _rowsHeightLookup$cur;\n\n return (_rowsHeightLookup$cur = rowsHeightLookup.current[rowId]) == null ? void 0 : _rowsHeightLookup$cur.sizes;\n };\n\n const setRowHeight = React.useCallback((id, height) => {\n rowsHeightLookup.current[id].sizes.baseCenter = height;\n rowsHeightLookup.current[id].isResized = true;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n hydrateRowsMeta();\n }, [hydrateRowsMeta]);\n const debouncedHydrateRowsMeta = React.useMemo(() => debounce(hydrateRowsMeta), [hydrateRowsMeta]);\n const storeMeasuredRowHeight = React.useCallback((id, height, position) => {\n if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {\n return;\n } // Only trigger hydration if the value is different, otherwise we trigger a loop\n\n\n const needsHydration = rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] !== height;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] = height;\n\n if (needsHydration) {\n debouncedHydrateRowsMeta();\n }\n }, [debouncedHydrateRowsMeta]);\n const rowHasAutoHeight = React.useCallback(id => {\n var _rowsHeightLookup$cur2;\n\n return ((_rowsHeightLookup$cur2 = rowsHeightLookup.current[id]) == null ? void 0 : _rowsHeightLookup$cur2.autoHeight) || false;\n }, []);\n const getLastMeasuredRowIndex = React.useCallback(() => {\n return lastMeasuredRowIndex.current;\n }, []);\n const setLastMeasuredRowIndex = React.useCallback(index => {\n if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {\n lastMeasuredRowIndex.current = index;\n }\n }, []);\n const resetRowHeights = React.useCallback(() => {\n rowsHeightLookup.current = {};\n hydrateRowsMeta();\n }, [hydrateRowsMeta]); // The effect is used to build the rows meta data - currentPageTotalHeight and positions.\n // Because of variable row height this is needed for the virtualization\n\n React.useEffect(() => {\n hydrateRowsMeta();\n }, [rowHeightFromDensity, filterState, paginationState, sortingState, hydrateRowsMeta]);\n useGridRegisterPipeApplier(apiRef, 'rowHeight', hydrateRowsMeta);\n const rowsMetaApi = {\n unstable_getLastMeasuredRowIndex: getLastMeasuredRowIndex,\n unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,\n unstable_rowHasAutoHeight: rowHasAutoHeight,\n unstable_getRowHeight: getRowHeight,\n unstable_getRowInternalSizes: getRowInternalSizes,\n unstable_setRowHeight: setRowHeight,\n unstable_storeRowHeightMeasurement: storeMeasuredRowHeight,\n resetRowHeights\n };\n useGridApiMethod(apiRef, rowsMetaApi, 'GridRowsMetaApi');\n};"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,qBAAqB;AAC1D,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,4BAA4B,EAAEC,yBAAyB,QAAQ,4BAA4B;AACpG,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,sBAAsB,QAAQ,sCAAsC;AAC7E,SAASC,wBAAwB,QAAQ,gCAAgC;AACzE,SAASC,0BAA0B,QAAQ,2BAA2B;AACtE,SAASC,sBAAsB,QAAQ,oBAAoB;AAC3D,OAAO,MAAMC,wBAAwB,GAAGC,KAAK,IAAIf,QAAQ,CAAC,CAAC,CAAC,EAAEe,KAAK,EAAE;EACnEC,QAAQ,EAAE;IACRC,sBAAsB,EAAE,CAAC;IACzBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AACF;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,eAAe,GAAGA,CAACC,MAAM,EAAEC,KAAK,KAAK;EAChD,MAAM;IACJC,YAAY,EAAEC,gBAAgB;IAC9BC,aAAa;IACbC;EACF,CAAC,GAAGJ,KAAK;EACT,MAAMK,gBAAgB,GAAGzB,KAAK,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