{literal}
    <style>
        /* 6.5.0 will show good, but 7.1 will be smaller */
        /*#root * {*/
        /*    font-size:12px !important;*/
        /*}*/
        /* Override Sugar nv-chart definition */
        .nv-chart{
            height:auto !important;
            width:auto !important;
            min-width:50px !important;
            min-height:5px !important;
        }

        /* TODO Remove .leaflet-container fix, don't know why it is needed*/
        /* Fixing leaflet */
        .leaflet-container {
            height: auto;
            min-height:100px;
            width: auto;
            margin: 0 auto;
        }
        /* Fixing leaflet-dvf svg, because of sugar nv.d3.css file */
        .leaflet-container svg {
            width: auto;
            height:auto;
            max-height:none;
        }

        /* override for conflicting nvd3 and recharts legend styles */
        .recharts-wrapper svg {
            max-height: inherit;
        }

        #gauge svg {
            max-height: inherit;
        }

        .recharts-default-legend .recharts-legend-item svg {
            width: 14px;
            height: 14px;
        }

        .filter-value-input input[type=text] {
            height: auto;
        }

        .none-list-style li {
            list-style: none;
        }

        .ui-widget-content.slick-row {
            margin-left:0;
        }

        .react-grid-layout .nvd3-svg {
            height: 100%;
        }
    </style>
{/literal}

{if $ERROR_MESSAGE}
<div>
    {$ERROR_MESSAGE} <br />
    <a href="{$ERROR_RETURN_URL}">Return to report list</a>
</div>
{else}
<!-- React goes here -->
<div id="ar-dashboard-app">Loading dashboard...</div>

<script src="modules/{$moduleName}/assets/js/dashboard/dashboardApp.min.js"></script>
<script>
    var __APP_INITIAL_STATE = {$__APP_INITIAL_STATE};
    window.ARDashboardApp("ar-dashboard-app", __APP_INITIAL_STATE);
</script>
{/if}

{* Fix for slimScroll.min.js:12 Uncaught TypeError: c.draggable is not a function *}
{if !version_compare($VTIGER_VERSION, '7.0.0', '>=')}
<script src="libraries/jquery/jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script>
{/if}