PageSourceSearch

https://proxy.useonward.com/assets/controllers/premium_settings_controller-c7214852.js

js useonward.com collected 2026-09-30 18:54:29 UTC 892 bytes, 21 lines download raw bytes

1import { Controller } from "@hotwired/stimulus";
2
3export default class extends Controller {
4  static targets = ["customerInsuranceInput", "merchantInsuranceInput", "returnsInput", "trackInput", "customerTotal", "merchantTotal"];
5
6  connect() {
7    this.renderTotals();
8  }
9
10  renderTotals() {
11    const customerInsurance = parseFloat(this.customerInsuranceInputTarget.value) || 0;
12
13    const merchantInsuranceValue = this.merchantInsuranceInputTarget.value;
14    const merchantInsurance = merchantInsuranceValue === "" ? customerInsurance : parseFloat(merchantInsuranceValue) || 0;
15    const returns = parseFloat(this.returnsInputTarget.value) || 0;
16    const track = parseFloat(this.trackInputTarget.value) || 0;
17
18    this.customerTotalTarget.textContent = `${customerInsurance + returns + track}%`;
19    this.merchantTotalTarget.textContent = `${merchantInsurance + returns + track}%`;
20  }
21}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.