{"version":3,"file":"index-DpdLcUdg.js","sources":["../../node_modules/stimulus-vite-helpers/dist/index.js","../../node_modules/@appsignal/stimulus/dist/esm/index.js","../../app/javascript/entrypoints/controllers/index.js"],"sourcesContent":["// src/index.ts\nvar CONTROLLER_FILENAME_REGEX = /^(?:.*?(?:controllers|components)\\/|\\.?\\.\\/)?(.+)(?:[/_-]controller\\..+?)$/;\nfunction registerControllers(application, controllerModules) {\n application.load(definitionsFromGlob(controllerModules));\n}\nfunction definitionsFromGlob(controllerModules) {\n return Object.entries(controllerModules).map(definitionFromEntry).filter((value) => value);\n}\nfunction definitionFromEntry([name, controllerModule]) {\n var _a;\n const identifier = identifierForGlobKey(name);\n const controllerConstructor = (_a = controllerModule.default) != null ? _a : controllerModule;\n if (identifier && typeof controllerConstructor === \"function\")\n return { identifier, controllerConstructor };\n}\nfunction identifierForGlobKey(key) {\n const logicalName = (key.match(CONTROLLER_FILENAME_REGEX) || [])[1];\n if (logicalName)\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n}\nexport {\n CONTROLLER_FILENAME_REGEX,\n definitionsFromGlob,\n identifierForGlobKey,\n registerControllers\n};\n","export function installErrorHandler(appsignal, application) {\n var prevHandler = application.handleError;\n application.handleError = function (error, message) {\n var span = appsignal.createSpan(function (span) {\n return span.setTags({ framework: \"Stimulus\", message: message }).setError(error);\n });\n appsignal.send(span);\n if (prevHandler && typeof prevHandler === \"function\") {\n prevHandler.apply(this, arguments);\n }\n };\n}\n//# sourceMappingURL=index.js.map","import { Application } from \"@hotwired/stimulus\"\nimport { registerControllers } from 'stimulus-vite-helpers'\nimport { appsignal } from \"../../lib/appsignal\";\nimport { installErrorHandler } from \"@appsignal/stimulus\"\n\nconst application = Application.start()\nconst controllers = import.meta.glob('./**/*_controller.js', { eager: true })\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\n\nregisterControllers(application, controllers)\ninstallErrorHandler(appsignal, application)\n"],"names":["CONTROLLER_FILENAME_REGEX","registerControllers","application","controllerModules","definitionsFromGlob","definitionFromEntry","value","name","controllerModule","_a","identifier","identifierForGlobKey","controllerConstructor","key","logicalName","installErrorHandler","appsignal","prevHandler","error","message","span","Application","controllers","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6"],"mappings":"qpBACA,IAAIA,EAA4B,6EAChC,SAASC,EAAoBC,EAAaC,EAAmB,CAC3DD,EAAY,KAAKE,EAAoBD,CAAiB,CAAC,CACzD,CACA,SAASC,EAAoBD,EAAmB,CAC9C,OAAO,OAAO,QAAQA,CAAiB,EAAE,IAAIE,CAAmB,EAAE,OAAQC,GAAUA,CAAK,CAC3F,CACA,SAASD,EAAoB,CAACE,EAAMC,CAAgB,EAAG,CACrD,IAAIC,EACJ,MAAMC,EAAaC,EAAqBJ,CAAI,EACtCK,GAAyBH,EAAKD,EAAiB,UAAY,KAAOC,EAAKD,EAC7E,GAAIE,GAAc,OAAOE,GAA0B,WACjD,MAAO,CAAE,WAAAF,EAAY,sBAAAE,EACzB,CACA,SAASD,EAAqBE,EAAK,CACjC,MAAMC,GAAeD,EAAI,MAAMb,CAAyB,GAAK,CAAA,GAAI,CAAC,EAClE,GAAIc,EACF,OAAOA,EAAY,QAAQ,KAAM,GAAG,EAAE,QAAQ,MAAO,IAAI,CAC7D,CCnBO,SAASC,EAAoBC,EAAWd,EAAa,CACxD,IAAIe,EAAcf,EAAY,YAC9BA,EAAY,YAAc,SAAUgB,EAAOC,EAAS,CAChD,IAAIC,EAAOJ,EAAU,WAAW,SAAUI,EAAM,CAC5C,OAAOA,EAAK,QAAQ,CAAE,UAAW,WAAY,QAASD,EAAS,EAAE,SAASD,CAAK,CAC3F,CAAS,EACDF,EAAU,KAAKI,CAAI,EACfH,GAAe,OAAOA,GAAgB,YACtCA,EAAY,MAAM,KAAM,SAAS,CAE7C,CACA,CCNA,MAAMf,EAAcmB,EAAY,MAAO,EACjCC,EAAuE,OAAA,OAAA,CAAA,oCAAAC,EAAA,2BAAAC,EAAA,sDAAAC,EAAA,8CAAAC,EAAA,mCAAAC,EAAA,qDAAAC,EAAA,6CAAAC,CAAA,CAAA,EAG7E3B,EAAY,MAAQ,GACpB,OAAO,SAAaA,EAGpBD,EAAoBC,EAAaoB,CAAW,EAC5CP,EAAoBC,EAAWd,CAAW","x_google_ignoreList":[0,1]}