protected function searchForMinifiedResource(ResourceSettings $settings, string $min = 'min') : string
    {
        if (strpos($settings->filename, ".{$min}.") !== false) {
            return $settings->filename;
        }

        $pathinfo = pathinfo($settings->resourcePath);

        $minResource = "{$pathinfo['filename']}.{$min}.{$pathinfo['extension']}";

        return $this->exists($minResource, $settings->theme) ? $minResource : $settings->filename;
    }