1import{Controller}from"@hotwired/stimulus";import{get}from"@rails/request.js";import{AccountSearchable}from"helpers/account_searchable";export default class extends(AccountSearchable(Controller)){static targets=["accountType","accountId","endingYear","input","results"];static values={searchUrl:String,selectUrl:String,accountType:{type:String,default:"School"}};extraSelectParams(){return{ending_year:this.hasEndingYearTarget?this.endingYearTarget.value:""}}afterSelectionCleared(){this.requestSelectUpdate({account_id:""})}refreshDiscounts(){this.hasAccountIdTarget&&this.accountIdTarget.value&&this.requestSelectUpdate({account_id:this.accountIdTarget.value})}requestSelectUpdate(e){const t=new URLSearchParams({account_id:this.hasAccountIdTarget?this.accountIdTarget.value:"",account_type:this.accountTypeValue,ending_year:this.hasEndingYearTarget?this.endingYearTarget.value:"",...e});get(`${this.selectUrlValue}?${t.toString()}`,{responseKind:"turbo-stream"})}}
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.