{"version":3,"file":"govuk-frontend-component.mjs","sources":["../../src/govuk/govuk-frontend-component.mjs"],"sourcesContent":["import { isSupported } from './common/index.mjs'\nimport { SupportError } from './errors/index.mjs'\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @internal\n * @abstract\n */\nexport class GOVUKFrontendComponent {\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n */\n constructor() {\n this.checkSupport()\n }\n\n /**\n * Validates whether GOV.UK Frontend is supported\n *\n * @private\n * @throws {SupportError} when GOV.UK Frontend is not supported\n */\n checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n"],"names":["GOVUKFrontendComponent","constructor","checkSupport","isSupported","SupportError"],"mappings":";;;AAWO,MAAMA,sBAAsB,CAAC;AAMlCC,EAAAA,WAAWA,GAAG;IACZ,IAAI,CAACC,YAAY,EAAE,CAAA;AACrB,GAAA;AAQAA,EAAAA,YAAYA,GAAG;AACb,IAAA,IAAI,CAACC,WAAW,EAAE,EAAE;MAClB,MAAM,IAAIC,YAAY,EAAE,CAAA;AAC1B,KAAA;AACF,GAAA;AACF;;;;"}