import { Mitre } from '../objects/rule' ; export const formatMitreAttackDescription = ( mitre ) => { return mitre . map ( ( threat ) => threat . tactic + threat . techniques . map ( ( technique ) => { return technique . name + technique . subtechniques . join ( '' ) ; } ) . join ( '' ) ) . join ( '' ) ; } ; export const elementsOverlap = ( $element1 , $element2 ) => { const rectA = $element1 [ 0 ] . getBoundingClientRect ( ) ; const rectB = $element2 [ 0 ] . getBoundingClientRect ( ) ; if ( rectA . right < rectB . left || rectB . right < rectA . left ) { return false ; } else if ( rectA . bottom < rectB . top || rectB . bottom < rectA . top ) { return false ; } else { return true ; } } ;