@stack('head') {{-- Image cropper assets — must be in the layout head (not inside the x-image-cropper component) because page-level uses of the cropper render those styles inside #main, which the SPA navigation later wipes via innerHTML swap. The layout-level modals (upload, sports-match) would then render their cropper overlays unstyled. --}} @yield('extra_styles') {{-- Device fingerprint: computes a stable per-device hash on first visit, caches it in localStorage + the `_fp` cookie so the server can dedupe guests across IP/VPN/country changes. Loaded async — never blocks paint. --}} @include('layouts.partials.header') @if(session('impersonator_id'))
Impersonating {{ Auth::user()->name }} — you are acting as this user
@csrf
@endif
@include('layouts.partials.sidebar')
@yield('content')
@auth @include('layouts.partials.upload-modal') @include('layouts.partials.edit-video-modal') @include('layouts.partials.sports-match-modal') @endauth @include('layouts.partials.add-to-playlist-modal') @auth @endauth
{{-- Page-specific scripts come from each view's @section('scripts'). Wrapped in a marker element so the SPA navigator can swap & re-run them — without this, SPA nav into a page whose JS defines functions like switchTab() leaves those functions undefined, and any onclick handler that calls them silently fails. --}}
@yield('scripts')
{{-- ═══════════════════════════════════════════════════════════ ADMIN ERROR CATCHER — only rendered for super_admins ═══════════════════════════════════════════════════════════ --}} @auth @if(Auth::user()->isSuperAdmin())
@endif @endauth {{-- Profile-visit tracking: any link with data-profile-visit-url fires a beacon on click --}}