PageSourceSearch

https://www.downstairscomedy.shop/assets/waterline/controllers/for…b8ecae68d96af4c10d0b0c45be18934b451a07b4.js

js downstairscomedy.shop collected 2026-10-06 14:03:03 UTC 1,944 bytes, 1 lines download raw bytes

1import{Controller}from"@hotwired/stimulus";import debounce from"lodash.debounce";export default class extends Controller{static targets=["invalidFeedback"];static values={scrollAlign:{type:String,default:"start"},autosubmitDelay:{type:Number,default:500},ignore:{type:Boolean,default:!1}};initialize(){this.autosubmit=debounce(this.autosubmit,this.autosubmitDelayValue).bind(this),this.liveValidate=this.liveValidate.bind(this)}connect(){this.element.addEventListener("input",this.liveValidate,!0),this.element.addEventListener("change",this.liveValidate,!0)}disconnect(){this.element.removeEventListener("input",this.liveValidate,!0),this.element.removeEventListener("change",this.liveValidate,!0),this.autosubmit.cancel?.()}validate(e){if(this.ignoreValue)return;if(!e.submitter)return void this.refreshInvalidFeedback();if(this.element.checkValidity())return void this.refreshInvalidFeedback();e.preventDefault(),this.element.classList.add("was-validated"),this.refreshInvalidFeedback();const t=this.element.querySelector(":invalid");t&&(t.scrollIntoView({behavior:"smooth",block:this.scrollAlignValue}),t.focus({preventScroll:!0}))}autosubmit(e){const t=e?.target;t?.matches?.(":invalid")&&document.activeElement===t?this.deferredField=t:this.submit()}submit(){this.element.closest("[inert]")||"true"!==this.element.getAttribute("aria-busy")&&this.element.requestSubmit()}liveValidate(e){const t=e.target;t.willValidate&&t.matches("input, select, textarea")&&(t.classList.toggle("is-valid",t.checkValidity()),t.classList.toggle("is-invalid",!t.checkValidity()),this.refreshInvalidFeedback(),"change"===e.type&&t===this.deferredField&&(this.deferredField=null,this.autosubmit.cancel?.(),this.submit()))}refreshInvalidFeedback(){this.invalidFeedbackTargets.forEach((e=>{const t=e.getAttribute("for");if(!t)return;const i=CSS.escape(t),s=this.element.querySelector(`[name="${i}"]:invalid, #${i}:invalid`);e.classList.toggle("d-block",!!s)}))}}

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.