<commit_before>/**
  Flame.Popover provides a means to display a popup in the context of an existing element in the UI.
*/
Flame.Popover = Flame.Panel.extend({
    classNames: ['flame-popover'],
    childViews: [],
    dimBackground: false,
    arrow: 'arrow', // How to use a string literal in bind-attr?
    handlebars: '<img {{bind-attr class="view.arrowPosition view.arrow"}} {{bind-attr src="view.image"}}>{{view view.contentView}}',
    anchor: null,
    position: null,

    ARROW_UP: Flame.image('arrow_up.png'),
    ARROW_DOWN: Flame.image('arrow_down.png'),
    ARROW_LEFT: Flame.image('arrow_left.png'),
    ARROW_RIGHT: Flame.image('arrow_right.png'),

    _positionArrow: function() {
        var anchor = this.get('anchor');
        var position = this.get('position');
        var arrow = this.$('img.arrow');
        var offset = anchor.offset();
        var arrowOffset;
        if (position & (Flame.POSITION_ABOVE | Flame.POSITION_BELOW)) {
            arrowOffset = offset.left + (anchor.outerWidth() / 2) - (!this.$().css('left') ? 0 : parseInt(this.$().css('left').replace('px', ''), 10)) - 15;
            arrow.css({ left: arrowOffset + 'px' });
            if (position & Flame.POSITION_ABOVE) {
                arrow.css({ top: this.get('layout.height') - 1 + 'px' });
            }
        } else {
            arrowOffset = offset.top + (anchor.outerHeight() / 2) - parseInt(this.$().css('top').replace('px', ''), 10) - 15;
            arrow.css({ top: arrowOffset + 'px' });
            if (position & Flame.POSITION_LEFT) {
                arrow.css({ left: this.get('layout.width') - 1 + 'px' });<commit_msg>Correctly use string in bind-attr.<commit_after>/**
  Flame.Popover provides a means to display a popup in the context of an existing element in the UI.
*/
Flame.Popover = Flame.Panel.extend({
    classNames: ['flame-popover'],
    childViews: [],
    dimBackground: false,
    handlebars: '<img {{bind-attr class="view.arrowPosition :arrow"}} {{bind-attr src="view.image"}}>{{view view.contentView}}',
    anchor: null,
    position: null,

    ARROW_UP: Flame.image('arrow_up.png'),
    ARROW_DOWN: Flame.image('arrow_down.png'),
    ARROW_LEFT: Flame.image('arrow_left.png'),
    ARROW_RIGHT: Flame.image('arrow_right.png'),

    _positionArrow: function() {
        var anchor = this.get('anchor');
        var position = this.get('position');
        var arrow = this.$('img.arrow');
        var offset = anchor.offset();
        var arrowOffset;
        if (position & (Flame.POSITION_ABOVE | Flame.POSITION_BELOW)) {
            arrowOffset = offset.left + (anchor.outerWidth() / 2) - (!this.$().css('left') ? 0 : parseInt(this.$().css('left').replace('px', ''), 10)) - 15;
            arrow.css({ left: arrowOffset + 'px' });
            if (position & Flame.POSITION_ABOVE) {
                arrow.css({ top: this.get('layout.height') - 1 + 'px' });
            }
        } else {
            arrowOffset = offset.top + (anchor.outerHeight() / 2) - parseInt(this.$().css('top').replace('px', ''), 10) - 15;
            arrow.css({ top: arrowOffset + 'px' });
            if (position & Flame.POSITION_LEFT) {
                arrow.css({ left: this.get('layout.width') - 1 + 'px' });
{'fraction_non_alphanumeric': 0.17770897832817337, 'fraction_numerical': 0.00804953560371517, 'mean_word_length': 2.6799544419134396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4762719', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1009, 'n_words': 228}