<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
    <title>PLMar LMS</title>

    <!-- Google Fonts — loaded here (not via CSS @import) so Vite/Rolldown
         doesn't get confused about @import ordering in index.css. Preconnect
         reduces the round-trip latency before the font file starts loading. -->
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Newsreader:ital,wght@0,400;0,500;0,600;1,400&display=swap" />
    <!-- Algeria font — used for the PLMar plotting-form masthead in the printed
         Faculty Loading form. Falls back to Cambria/serif if the network fetch fails. -->
    <link rel="preconnect" href="https://fonts.cdnfonts.com" crossorigin />
    <link rel="stylesheet" href="https://fonts.cdnfonts.com/css/algeria" />

    <!-- PWA Manifest -->
    <link rel="manifest" href="/manifest.json" />
    <meta name="theme-color" content="#1a3a7a" />

    <!-- PWA capable (modern + iOS/Safari) -->
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="apple-mobile-web-app-title" content="PNLEPrep" />
    <link rel="apple-touch-icon" href="/icon-192.svg" />

    <!-- SEO / share preview -->

    <!-- Open Graph — link previews on Facebook, Messenger, Viber, etc. -->
    <meta property="og:type" content="website" />
    <meta property="og:title" content="PNLEPrep — PLMar Nursing LMS" />
    <meta property="og:description" content="Pamantasan ng Lungsod ng Marikina — College of Nursing learning management system. Courses, quizzes, grades, and PNLE prep." />
    <meta property="og:image" content="/icon-512.svg" />
    <meta property="og:url" content="https://pnleprep.com" />
    <meta property="og:site_name" content="PNLEPrep" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="PNLEPrep — PLMar Nursing LMS" />
    <meta name="twitter:description" content="Courses, quizzes, grades, and PNLE exam preparation for PLMar College of Nursing." />
    <meta name="description" content="Prepare for the Philippine Nursing Licensure Exam with PNLEPrep." />
    <script type="module" crossorigin src="/assets/index-B82kaSgP.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/style-D6zI-B9O.css">
  </head>
  <body>
    <div id="root"></div>
    <script>
      // SIMS, Clinicals, Journals, and Faculty are intentionally network-first
      // portals rather than PWAs. Remove any worker inherited from an older
      // deployment before loading their JavaScript; an old worker can otherwise
      // retain an obsolete portal bundle after Cloudflare has deployed a fix.
      (function () {
        var host = location.hostname.toLowerCase();
        var subApp = host === "clinicals.pnleprep.com" || host === "sims.pnleprep.com" || host === "journals.pnleprep.com" || host === "faculty.pnleprep.com" || location.pathname.indexOf("/clinicals") === 0 || location.pathname.indexOf("/sims") === 0 || location.pathname.indexOf("/journals") === 0 || location.pathname.indexOf("/faculty") === 0;
        var recoveryKey = subApp ? "pnle-subapp-recovery-2026-07-27-2" : "pnle-root-chunk-recovery-v5";
        var recover = function () {
          if (sessionStorage.getItem(recoveryKey)) {
            var root = document.getElementById("root");
            if (root && !root.textContent.trim()) root.innerHTML = '<div style="min-height:100vh;display:grid;place-items:center;padding:24px;background:#f4f7f8;font-family:system-ui;color:#17324d"><div style="max-width:480px;text-align:center"><h1 style="font-size:24px">Portal files are still updating</h1><p style="line-height:1.6;color:#617083">The hosting service did not publish every application file. Please redeploy the complete <b>dist</b> folder, then refresh.</p><button onclick="location.reload()" style="border:0;border-radius:10px;background:#173f79;color:white;padding:11px 18px;font-weight:700">Try again</button></div></div>';
            return;
          }
          sessionStorage.setItem(recoveryKey, "1");
          Promise.all([
            navigator.serviceWorker ? navigator.serviceWorker.getRegistrations().then(function (rows) { return Promise.all(rows.map(function (row) { return row.unregister(); })); }) : Promise.resolve(),
            window.caches ? caches.keys().then(function (keys) { return Promise.all(keys.map(function (key) { return caches.delete(key); })); }) : Promise.resolve()
          ]).finally(function () { location.reload(); });
        };
        window.addEventListener("error", function (event) {
          var message = String(event.message || "");
          var failedModule = event.target && event.target.tagName === "SCRIPT" && event.target.type === "module";
          if (failedModule || message.indexOf("Unexpected token '<'") !== -1 || message.indexOf("module script") !== -1) recover();
        }, true);
        window.addEventListener("unhandledrejection", function (event) {
          var message = String(event.reason && (event.reason.message || event.reason) || "");
          if (message.indexOf("dynamically imported module") !== -1 || message.indexOf("Failed to fetch") !== -1 || message.indexOf("module script") !== -1 || message.indexOf("Load failed") !== -1) recover();
        });
        if (subApp && navigator.serviceWorker && navigator.serviceWorker.controller && !sessionStorage.getItem(recoveryKey)) recover();
      })();
    </script>
  </body>
</html>
