getHost(), ['127.0.0.1', 'localhost', '::1', 'hn.loc'], true) && is_file($marker) && trim(file_get_contents($marker)) === $origin) { $socket = @fsockopen('127.0.0.1', 5184, $error, $message, 0.1); if ($socket) { fclose($socket); return ['scripts' => ['/__hn_vite/@vite/client', '/__hn_vite/main.js'], 'styles' => []]; } } $manifest = base_path('theme/EZ/assets/.vite/manifest.json'); if (!is_file($manifest)) { throw new RuntimeException('EZ assets missing: run npm ci && npm run build:hn in frontends/.'); } $entries = json_decode(file_get_contents($manifest), true, flags: JSON_THROW_ON_ERROR); $entry = $entries['index.html']; return ['scripts' => ['/theme/EZ/assets/'.$entry['file']], 'styles' => array_map(fn ($file) => '/theme/EZ/assets/'.$file, $entry['css'] ?? [])]; } }