PageSourceSearch

https://cloud.mysteryscience.com/raw/upload/assets/controllers/qua…2770781741765d864a8ff37d8ebd7da0dedbea9c.js

js mysteryscience.com collected 2026-10-01 11:32:05 UTC 598 bytes, 1 lines download raw bytes

1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["input","total","error","submit"];connect(){this.update()}update(){if(!this.hasTotalTarget)return;const t=this.sum();this.totalTarget.value=t,this.setError(t<=0),this.setSubmitDisabled(t<=0)}sum(){return this.inputTargets.reduce((t,s)=>t+(parseInt(s.value,10)||0),0)}validateOnSubmit(t){!this.hasTotalTarget||this.sum()>0||t.preventDefault()}setError(t){this.hasErrorTarget&&this.errorTarget.classList.toggle("has-error",t)}setSubmitDisabled(t){this.hasSubmitTarget&&(this.submitTarget.disabled=t)}}

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.