<commit_before>{ defer, extend, before, isEqual } = require 'underscore'
Backbone = require 'backbone'
{ AUCTION, CURRENT_USER } = require('sharify').data
Form = require '../../../../components/form/index.coffee'
openMultiPageModal = require '../../../../components/multi_page_modal/index.coffee'
openBuyersPremiumModal = require './components/buyers_premium/index.coffee'
AuthModalView = require '../../../../components/auth_modal/view.coffee'
inquire = require '../../lib/inquire.coffee'
acquire = require '../../lib/acquire.coffee'
helpers = require './helpers.coffee'
metaphysics = require '../../../../../lib/metaphysics.coffee'
template = -> require('./templates/index.jade') arguments...

LOT_STANDING_MAX_POLLS = 10
LOT_STANDING_POLL_INTERVAL = 1000

module.exports = class ArtworkAuctionView extends Backbone.View
  className: 'artwork-auction'

  events:
    'click .js-artwork-auction-buyers-premium': 'openBuyersPremium'
    'click .js-artwork-auction-bid-button': 'submit'
    'click .js-artwork-auction-help-modal': 'openHelpModal'
    'click .js-artwork-auction-ask-specialist': 'inquire'
    'click .js-artwork-auction-buy-now': 'acquire'
    'change .js-artwork-auction-max-bid': 'setMaxBid'

  initialize: ({ @data }) -> #
    @delayedUpdateBidLabel LOT_STANDING_MAX_POLLS

  openBuyersPremium: (e) ->
    e.preventDefault()

    openBuyersPremiumModal AUCTION.id

  parseBid: (amount = '') ->
    [dollars, cents] = String amount
      .split '.'

    dollars = dollars.replace /\D/g,''

    (parseInt(dollars) * 100) + parseInt(cents or 0)<commit_msg>dont delay first call for update<commit_after>{ defer, extend, before, isEqual } = require 'underscore'
Backbone = require 'backbone'
{ AUCTION, CURRENT_USER } = require('sharify').data
Form = require '../../../../components/form/index.coffee'
openMultiPageModal = require '../../../../components/multi_page_modal/index.coffee'
openBuyersPremiumModal = require './components/buyers_premium/index.coffee'
AuthModalView = require '../../../../components/auth_modal/view.coffee'
inquire = require '../../lib/inquire.coffee'
acquire = require '../../lib/acquire.coffee'
helpers = require './helpers.coffee'
metaphysics = require '../../../../../lib/metaphysics.coffee'
template = -> require('./templates/index.jade') arguments...

LOT_STANDING_MAX_POLLS = 10
LOT_STANDING_POLL_INTERVAL = 1000

module.exports = class ArtworkAuctionView extends Backbone.View
  className: 'artwork-auction'

  events:
    'click .js-artwork-auction-buyers-premium': 'openBuyersPremium'
    'click .js-artwork-auction-bid-button': 'submit'
    'click .js-artwork-auction-help-modal': 'openHelpModal'
    'click .js-artwork-auction-ask-specialist': 'inquire'
    'click .js-artwork-auction-buy-now': 'acquire'
    'change .js-artwork-auction-max-bid': 'setMaxBid'

  initialize: ({ @data }) -> #
    @updateBidLabel LOT_STANDING_MAX_POLLS

  openBuyersPremium: (e) ->
    e.preventDefault()

    openBuyersPremiumModal AUCTION.id

  parseBid: (amount = '') ->
    [dollars, cents] = String amount
      .split '.'

    dollars = dollars.replace /\D/g,''

    (parseInt(dollars) * 100) + parseInt(cents or 0)
{'fraction_non_alphanumeric': 0.1699429296131896, 'fraction_numerical': 0.0063411540900443885, 'mean_word_length': 3.639705882352941, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2362730', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1051, 'n_words': 192}