public function onReplaceInsertTags(string $tag)
    {
        $chunks = explode('::', $tag);

        if ('asset' !== $chunks[0]) {
            return false;
        }

        $url = $this->packages->getUrl($chunks[1], $chunks[2] ?? null);

        // Contao paths are relative to the <base> tag, so remove leading slashes
        return ltrim($url, '/');
    }