export class OpenSearchDashboardsURL { public readonly path : string ; public readonly appName : string ; public readonly appPath : string ; constructor ( path ) { const match = path . match ( /^.*\/app\/([^\/#]+)(.+)$/ ) ; if ( ! match ) { throw new Error ( 'Unexpected URL path.' ) ; } const [ , appName , appPath ] = match ; if ( ! appName || ! appPath ) { throw new Error ( 'Could not parse URL path.' ) ; } this . path = path ; this . appName = appName ; this . appPath = appPath ; } }