{ "version": 3, "sources": ["timeline_controller-1cf04e9f.js"], "sourcesContent": ["import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n breakpoint: Number\n }\n \n static targets = [ \"steps\", \"columnsContainer\", \"loadingIndicator\" ]\n static classes = [ \"vertical\", \"columns\", \"hidden\" ]\n \n connect() {\n this.belowThreshold = false\n this.checkWidthAndAdjustIfNecessary()\n this.hideProgressBarAndUnhideColumnsContainer()\n }\n \n checkWidthAndAdjustIfNecessary() {\n // TODO: Fix this so that it uses its outer div.\n const newWidth = window.innerWidth\n const nowBelowThreshold = (newWidth < this.breakpointValue)\n \n if (this.belowThreshold != nowBelowThreshold) {\n this.belowThreshold = nowBelowThreshold\n \n if (nowBelowThreshold) {\n this.verticalize()\n } else {\n this.unverticalize()\n }\n }\n }\n \n verticalize() {\n this.columnsContainerTarget.classList.add(this.columnsClass)\n \n for (const stepsTarget of this.stepsTargets) {\n stepsTarget.classList.add(this.verticalClass)\n }\n }\n \n unverticalize() {\n this.columnsContainerTarget.classList.remove(this.columnsClass)\n \n for (const stepsTarget of this.stepsTargets) {\n stepsTarget.classList.remove(this.verticalClass)\n }\n }\n \n hideProgressBarAndUnhideColumnsContainer() {\n this.loadingIndicatorTarget.classList.add(this.hiddenClass)\n this.columnsContainerTarget.classList.remove(this.hiddenClass)\n }\n}\n"], "mappings": "wKAAA,gDAEA,qBAAO,SAAsB,EAAW,CAQtC,SAAU,CACR,KAAK,eAAiB,GACtB,KAAK,+BAA+B,EACpC,KAAK,yCAAyC,CAChD,CAEA,gCAAiC,CAG/B,KAAM,GAAqB,AADV,OAAO,WACc,KAAK,gBAE3C,AAAI,KAAK,gBAAkB,GACzB,MAAK,eAAiB,EAEtB,AAAI,EACF,KAAK,YAAY,EAEjB,KAAK,cAAc,EAGzB,CAEA,aAAc,CACZ,KAAK,uBAAuB,UAAU,IAAI,KAAK,YAAY,EAE3D,SAAW,KAAe,MAAK,aAC7B,EAAY,UAAU,IAAI,KAAK,aAAa,CAEhD,CAEA,eAAgB,CACd,KAAK,uBAAuB,UAAU,OAAO,KAAK,YAAY,EAE9D,SAAW,KAAe,MAAK,aAC7B,EAAY,UAAU,OAAO,KAAK,aAAa,CAEnD,CAEA,0CAA2C,CACzC,KAAK,uBAAuB,UAAU,IAAI,KAAK,WAAW,EAC1D,KAAK,uBAAuB,UAAU,OAAO,KAAK,WAAW,CAC/D,CACF,CAjDS,EADT,EACS,SAAS,CACd,WAAY,MACd,GAEO,EALT,EAKS,UAAU,CAAE,QAAS,mBAAoB,kBAAmB,GAC5D,EANT,EAMS,UAAU,CAAE,WAAY,UAAW,QAAS", "names": [] }