<!DOCTYPE html>
<html lang="en">
<?php if (isset($component)) { $__componentOriginal0f509fab02c45445826003a1e50db506 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal0f509fab02c45445826003a1e50db506 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.head','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('head'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal0f509fab02c45445826003a1e50db506)): ?>
<?php $attributes = $__attributesOriginal0f509fab02c45445826003a1e50db506; ?>
<?php unset($__attributesOriginal0f509fab02c45445826003a1e50db506); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal0f509fab02c45445826003a1e50db506)): ?>
<?php $component = $__componentOriginal0f509fab02c45445826003a1e50db506; ?>
<?php unset($__componentOriginal0f509fab02c45445826003a1e50db506); ?>
<?php endif; ?>
<?php echo $__env->yieldContent('styles'); ?>

<body class="custom-cursor">

    <div class="custom-cursor__cursor"></div>
    <div class="custom-cursor__cursor-two"></div>

    <?php if (isset($component)) { $__componentOriginald5d051f243b37508d39f8ce3d92a5684 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald5d051f243b37508d39f8ce3d92a5684 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.loader','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('loader'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald5d051f243b37508d39f8ce3d92a5684)): ?>
<?php $attributes = $__attributesOriginald5d051f243b37508d39f8ce3d92a5684; ?>
<?php unset($__attributesOriginald5d051f243b37508d39f8ce3d92a5684); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald5d051f243b37508d39f8ce3d92a5684)): ?>
<?php $component = $__componentOriginald5d051f243b37508d39f8ce3d92a5684; ?>
<?php unset($__componentOriginald5d051f243b37508d39f8ce3d92a5684); ?>
<?php endif; ?>
    <?php if(!request()->routeIs('admin.dashboard')): ?>
        <?php if (isset($component)) { $__componentOriginal2e9ac7b2f9ab9718fd42768ba6642408 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal2e9ac7b2f9ab9718fd42768ba6642408 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.chat_popup','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('chat_popup'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal2e9ac7b2f9ab9718fd42768ba6642408)): ?>
<?php $attributes = $__attributesOriginal2e9ac7b2f9ab9718fd42768ba6642408; ?>
<?php unset($__attributesOriginal2e9ac7b2f9ab9718fd42768ba6642408); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2e9ac7b2f9ab9718fd42768ba6642408)): ?>
<?php $component = $__componentOriginal2e9ac7b2f9ab9718fd42768ba6642408; ?>
<?php unset($__componentOriginal2e9ac7b2f9ab9718fd42768ba6642408); ?>
<?php endif; ?>
    <?php endif; ?>
    <?php if (isset($component)) { $__componentOriginal16e3a1439541cd695f724c739842f6e4 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal16e3a1439541cd695f724c739842f6e4 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.side_content','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('side_content'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal16e3a1439541cd695f724c739842f6e4)): ?>
<?php $attributes = $__attributesOriginal16e3a1439541cd695f724c739842f6e4; ?>
<?php unset($__attributesOriginal16e3a1439541cd695f724c739842f6e4); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal16e3a1439541cd695f724c739842f6e4)): ?>
<?php $component = $__componentOriginal16e3a1439541cd695f724c739842f6e4; ?>
<?php unset($__componentOriginal16e3a1439541cd695f724c739842f6e4); ?>
<?php endif; ?>

    <div class="page-wrapper">
        
        <?php if(!request()->routeIs('admin.dashboard')): ?>
            <?php if (isset($component)) { $__componentOriginal18afae5728615d848e6f0da51e156561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal18afae5728615d848e6f0da51e156561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stricky_header','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stricky_header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal18afae5728615d848e6f0da51e156561)): ?>
<?php $attributes = $__attributesOriginal18afae5728615d848e6f0da51e156561; ?>
<?php unset($__attributesOriginal18afae5728615d848e6f0da51e156561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal18afae5728615d848e6f0da51e156561)): ?>
<?php $component = $__componentOriginal18afae5728615d848e6f0da51e156561; ?>
<?php unset($__componentOriginal18afae5728615d848e6f0da51e156561); ?>
<?php endif; ?>
        <?php endif; ?>

        <?php echo $__env->yieldContent('content'); ?>

        <?php if (isset($component)) { $__componentOriginalb460bc2a269663cbd4fe7c9dd27b8dcb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb460bc2a269663cbd4fe7c9dd27b8dcb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.mobile_nav','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('mobile_nav'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb460bc2a269663cbd4fe7c9dd27b8dcb)): ?>
<?php $attributes = $__attributesOriginalb460bc2a269663cbd4fe7c9dd27b8dcb; ?>
<?php unset($__attributesOriginalb460bc2a269663cbd4fe7c9dd27b8dcb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb460bc2a269663cbd4fe7c9dd27b8dcb)): ?>
<?php $component = $__componentOriginalb460bc2a269663cbd4fe7c9dd27b8dcb; ?>
<?php unset($__componentOriginalb460bc2a269663cbd4fe7c9dd27b8dcb); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginalb42b45f81751c2a218cc2a9ca7d9a74e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb42b45f81751c2a218cc2a9ca7d9a74e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.search_popup','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('search_popup'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb42b45f81751c2a218cc2a9ca7d9a74e)): ?>
<?php $attributes = $__attributesOriginalb42b45f81751c2a218cc2a9ca7d9a74e; ?>
<?php unset($__attributesOriginalb42b45f81751c2a218cc2a9ca7d9a74e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb42b45f81751c2a218cc2a9ca7d9a74e)): ?>
<?php $component = $__componentOriginalb42b45f81751c2a218cc2a9ca7d9a74e; ?>
<?php unset($__componentOriginalb42b45f81751c2a218cc2a9ca7d9a74e); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginal353111513b4b01fae821880cae2cb7a2 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal353111513b4b01fae821880cae2cb7a2 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.scroll_to_top','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('scroll_to_top'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal353111513b4b01fae821880cae2cb7a2)): ?>
<?php $attributes = $__attributesOriginal353111513b4b01fae821880cae2cb7a2; ?>
<?php unset($__attributesOriginal353111513b4b01fae821880cae2cb7a2); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal353111513b4b01fae821880cae2cb7a2)): ?>
<?php $component = $__componentOriginal353111513b4b01fae821880cae2cb7a2; ?>
<?php unset($__componentOriginal353111513b4b01fae821880cae2cb7a2); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginal23a21c0d0f80992980c57ef2802ca540 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal23a21c0d0f80992980c57ef2802ca540 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.scripts','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('scripts'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal23a21c0d0f80992980c57ef2802ca540)): ?>
<?php $attributes = $__attributesOriginal23a21c0d0f80992980c57ef2802ca540; ?>
<?php unset($__attributesOriginal23a21c0d0f80992980c57ef2802ca540); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal23a21c0d0f80992980c57ef2802ca540)): ?>
<?php $component = $__componentOriginal23a21c0d0f80992980c57ef2802ca540; ?>
<?php unset($__componentOriginal23a21c0d0f80992980c57ef2802ca540); ?>
<?php endif; ?>

    <!-- <pre style="background:#f8fafc;color:#222;font-size:13px;padding:8px 12px;margin:12px 0 0 0;max-width:600px;overflow:auto;">
    user: <?php echo e(json_encode(session('auth.user'))); ?>

    token: <?php echo e(json_encode(session('auth.token'))); ?>

    </pre> -->


        <script>
            // Simpan data user dan token dari session Laravel ke localStorage (jika ada)
            (function() {
                const user = <?php echo json_encode(session('auth.user'), 15, 512) ?>;
                const accessToken = <?php echo json_encode(session('auth.token'), 15, 512) ?>;
                const refreshToken = <?php echo json_encode(session('auth.refresh_token'), 15, 512) ?>;
                if (user && accessToken) {
                    localStorage.setItem('user', JSON.stringify(user));
                    localStorage.setItem('accessToken', accessToken);
                    if (refreshToken) localStorage.setItem('refreshToken', refreshToken);
                }
            })();

            // Fungsi global untuk penanganan session expired di semua halaman admin
            if (typeof window.handleSessionExpired !== 'function') {
                window.handleSessionExpired = function() {
                    if (window.sessionExpiredHandled) return;
                    window.sessionExpiredHandled = true;
                    alert('Session Anda telah habis. Silakan login ulang.');
                    window.location.href = '/login';
                };
            }
            // Helper global untuk deteksi session expired dari response fetch/api
            window.isSessionExpiredResponse = async function(response) {
                if (!response) return false;
                if (response.status === 401) return true;
                if (response.status === 403) {
                    // Cek pesan error jika ada
                    try {
                        const data = await response.clone().json();
                        if (data && data.message && data.message.toLowerCase().includes('token')) {
                            return true;
                        }
                    } catch (e) {}
                }
                return false;
            };
        </script>

</body>

</html>
<?php /**PATH D:\laravel\krs-jawa3-template\daerah\resources\views/layouts/layoutadmin.blade.php ENDPATH**/ ?>