{"version":3,"file":"character_limit_controller-CvZjUFp8.js","sources":["../../../app/javascript/controllers/character_limit_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { limit: Number }\n static targets = [ \"input\", \"counter\" ]\n\n connect() {\n this.updateCounter()\n }\n\n updateCounter() {\n this.inputTarget.value = this.inputTarget.value.substring(0, this.limitValue)\n this.counterTarget.textContent = this.limitValue - this.inputTarget.value.length\n }\n}\n"],"names":["character_limit_controller","Controller","__publicField"],"mappings":"4MAEe,MAAKA,UAASC,CAAW,CAItC,SAAU,CACR,KAAK,cAAa,CACtB,CAEE,eAAgB,CACd,KAAK,YAAY,MAAQ,KAAK,YAAY,MAAM,UAAU,EAAG,KAAK,UAAU,EAC5E,KAAK,cAAc,YAAc,KAAK,WAAa,KAAK,YAAY,MAAM,MAC9E,CACA,CAXEC,EADkBF,EACX,SAAS,CAAE,MAAO,MAAM,GAC/BE,EAFkBF,EAEX,UAAU,CAAE,QAAS,SAAS"}