<commit_before><h1>Host Page for Telephony Widget</h1>

<div id="telephony-widget"
     data-csr_id="<%= params['csr-id'] || 1000 %>"
     data-agent_generate_caller_id="<%= params['agent-generate-caller-id'] || 'true' %>"
     data-agent_default_status="<%= params['agent-default-status'] || 'not_available' %>"
     data-agent_name="<%= params['agent-name'] || "Some Agent" %>"
     data-agent_phone_number=<%= params['agent-number'] || '5555551234' %>
     data-agent_phone_ext="<%= params['agent-ext'] || "10" %>"
     data-agent_sip_number="<%= params['agent-sip-number'] || "333" %>"
     data-agent_call_center_name="<%= params['agent-call-center-name'] || "other_location" %>"
     data-agent_phone_type="<%= params['agent-phone-type'] || "phone" %>"
     data-agent_transferable_agents="<%= (params['agent-transferable-agents'] || []).to_json %>"
     data-csr_type="A">
</div>
<script src="/assets/telephony/widget.js" type="text/javascript"></script>
<br/>
<button id="inbound-call">Next inbound call</button>
<script type="text/javascript">
  $('#inbound-call').click(function () {
    $.ajax({ type: 'DELETE',
             url: '/zestphone/inbound/front',
             data: {
               csr_id: $('#telephony-widget').data('csr_id')
             }
           });
  });
</script>

<div class="events">
  <button class="clear">Clear</button>
  <ul></ul>
</div>

<h3>Sample code showing click to call</h3>
<a href="#" class="call_to" data-call-params="">(310) 123-4567</a><br/><br/>

<script type="text/javascript">
  $('a.call_to').click(function(event) {
    var data = {
      to: $(event.currentTarget).text(),
      loan_id: 1,
      to_id: 2,
      to_type: 'borrower'
    };
    $(this).trigger("telephony:ClickToCall", data);
    to: $(event.currentTarget).text()
    return false;
  });
</script>

<commit_msg>Hide homepage functionality behind debug flag<commit_after><h1>Host Page for Telephony Widget</h1>

<div id="telephony-widget"
     data-csr_id="<%= params['csr-id'] || 1000 %>"
     data-agent_name="<%= params['agent-name'] || "Some Agent" %>"
     data-agent_phone_number="<%= params['agent-number'] || "5555551234" %>"
     data-agent_phone_type="<%= params['agent-phone-type'] || "phone" %>"
     data-csr_type="<%= params['agent-csr-type'] %>"
     data-agent_default_status="<%= params['agent-default-status'] %>"
     data-agent_phone_ext="<%= params['agent-ext'] %>"
     data-agent_call_center_name="<%= params['agent-call-center-name'] %>"
     data-agent_sip_number="<%= params['agent-sip-number'] %>"
     data-agent_transferable_agents="<%= (params['agent-transferable-agents']).to_json %>"
     data-agent_generate_caller_id="<%= params['agent-generate-caller-id'] %>"
>
</div>
<script src="/assets/telephony/widget.js" type="text/javascript"></script>
<br/>
<button id="inbound-call">Next inbound call</button>
<script type="text/javascript">
  $('#inbound-call').click(function () {
    $.ajax({ type: 'DELETE',
             url: '/zestphone/inbound/front',
             data: {
               csr_id: $('#telephony-widget').data('csr_id')
             }
           });
  });
</script>

<% if params['debug'] %>
  <div class="events">
    <button class="clear">Clear</button>
    <ul></ul>
  </div>

  <h3>Sample code showing click to call</h3>
  <a href="#" class="call_to" data-call-params="">(310) 123-4567</a><br/><br/>

  <script type="text/javascript">
    $('a.call_to').click(function(event) {
      var data = {
        to: $(event.currentTarget).text(),
        loan_id: 1,
        to_id: 2,
        to_type: 'borrower'
      };
      $(this).trigger("telephony:ClickToCall", data);
      to: $(event.currentTarget).text()
      return false;
    });
  </script>
<% end %>

{'fraction_non_alphanumeric': 0.21939458880257165, 'fraction_numerical': 0.01741226895258505, 'mean_word_length': 3.6041923551171395, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 76, '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': '3393270', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1296, 'n_words': 197}