{"id":2348,"date":"2026-11-27T01:56:07","date_gmt":"2026-11-26T23:56:07","guid":{"rendered":"https:\/\/greengabrovo.com\/?page_id=2348"},"modified":"2026-11-27T01:56:50","modified_gmt":"2026-11-26T23:56:50","slug":"noise","status":"publish","type":"page","link":"https:\/\/greengabrovo.com\/en\/danni\/noise\/","title":{"rendered":"Background noise"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2348\" class=\"elementor elementor-2348\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-269c497 e-flex e-con-boxed e-con e-parent\" data-id=\"269c497\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f9ed6fe elementor-widget elementor-widget-html\" data-id=\"f9ed6fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!--\n  GREEN GABROVO \u00b7 NOISE PAGE (\u201e\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c\")\n\n  What this is: the whole environmental-noise page (current level in dB(A), the scale for the\n  current day\/evening\/night period, the zone's limit values, the last 24 hours, recent alarms),\n  built like \/danni\/radiation\/ and \/danni\/snow\/, so all data pages look and behave the same.\n\n  How to use it: in wp-admin create a NEW page \"\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c\" under \"\u0414\u0430\u043d\u043d\u0438\" with the slug \"noise\"\n  (so the address is \/danni\/noise\/), open it with Elementor, add ONE \"HTML\" widget and paste\n  this whole file into it. Publish. Nothing in the code needs to be changed.\n  The English page \/en\/danni\/noise\/ appears by itself (TranslatePress): the widget switches to\n  English on its own and takes the English texts from the API.\n\n  BG: \u041f\u043e\u0441\u0442\u0430\u0432\u0438 \u0446\u0435\u043b\u0438\u044f \u0444\u0430\u0439\u043b \u0432 \u0435\u0434\u0438\u043d HTML widget \u043d\u0430 \u043d\u043e\u0432\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \/danni\/noise\/. \u041d\u0438\u0449\u043e \u043d\u0435 \u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u043d\u044f.\n\n  Before publishing: the noise endpoints and the noise config must be live on\n  https:\/\/api.greengabrovo.com (deploy\/appsettings-noise.md), and the corrected info tab\n  (deploy\/widgets\/danni-hub.html) should be pasted at the same time, because this page links to\n  \/danni\/#noise for the explanation of the scale. Another station can be opened with\n  #<device token> at the end of the address, like the other data pages.\n  The level texts, colours, limits and periods all come from the API (its config), not from here.\n\n  After publishing, add the page to the menus, the same way as for snow (deploy\/widget-snow.md,\n  step 3). Add \"\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c\" (EN \"Environmental noise\") -> https:\/\/greengabrovo.com\/danni\/noise\/\n  wherever \"\u0424\u043e\u043d\u043e\u0432\u0430 \u0440\u0430\u0434\u0438\u0430\u0446\u0438\u044f\" is listed:\n    - Desktop menu: the \"\u0414\u0430\u043d\u043d\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\" dropdown (Elementor header template 1455, icon-list\n      widget c8b6968).\n    - Footer: the list of data pages (Elementor footer template 1437, icon-list widget 002833b).\n    - Mobile menu: Snippets -> snippet #26. Copy the radiation line exactly and change only the\n      name and the link (a typo in a PHP snippet can break the site; check the site right after).\n  Back up each list first, as was done for snow (deploy\/backups\/*-before-snow.json are the\n  pre-snow copies; save new \"-before-noise\" copies). Without this step the page is reachable\n  only from the home-page box and the \/danni\/#noise tab.\n-->\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Nunito:wght@400;600;700;800;900&amp;display=swap\" rel=\"stylesheet\">\n<style>\n#gg-noise-live{\n  --green-950:#0b2e1f;\n  --green-900:#103a28;\n  --green-800:#175338;\n  --brand:#2e8f4a;\n  --brand-soft:#e7f3e9;\n  --page:#f5f8f4;\n  --card:#ffffff;\n  --ink:#122b1d;\n  --text:#3d5246;\n  --muted:#7d8b81;\n  --hairline:#e4eae2;\n  --grid:#edf1ea;\n  --warn:#8a5d00; --warn-soft:#fbf1dc;\n  --bad:#b32b52;  --bad-soft:#f8e3ea;\n  --radius:20px;\n  --radius-sm:14px;\n  --shadow:0 1px 2px rgba(18,43,29,.04), 0 8px 24px rgba(18,43,29,.06);\n  font-size:16px;\n}\n#gg-noise-live,#gg-noise-live *{box-sizing:border-box;margin:0;padding:0;min-width:0}\n#gg-noise-live [hidden]{display:none!important}\n#gg-noise-live{\n  font-family:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;\n  background:var(--page);color:var(--text);\n  -webkit-font-smoothing:antialiased;\n  overflow-wrap:normal;word-break:normal;hyphens:none;\n}\n#gg-noise-live button,#gg-noise-live select,#gg-noise-live table{font:inherit}\n#gg-noise-live button{border:0;background:none;color:inherit;cursor:pointer;text-transform:none;letter-spacing:inherit;border-radius:0}\n#gg-noise-live svg{max-width:100%}\n#gg-noise-live a{text-decoration:none}\n\n\/* \u2500\u2500 Breadcrumb \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live .crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:.82rem;color:var(--muted);padding:24px 0 4px;font-weight:600}\n#gg-noise-live .crumbs a{color:var(--muted)}\n#gg-noise-live .crumbs a:hover{color:var(--green-800)}\n#gg-noise-live .crumbs .sep{opacity:.55}\n#gg-noise-live .crumbs .here{color:var(--green-900);font-weight:800}\n\n\/* \u2500\u2500 Layout rows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live .row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:20px;align-items:stretch;width:100%}\n#gg-noise-live .card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid rgba(18,43,29,.05)}\n#gg-noise-live .col-stack{display:flex;flex-direction:column;gap:20px}\n#gg-noise-live #gn-history,#gg-noise-live #gn-alarms,#gg-noise-live #gn-about{scroll-margin-top:110px}\n\n\/* \u2500\u2500 Hero \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live .hero{margin-top:16px}\n#gg-noise-live .hero-card{padding:28px 32px;display:flex;flex-direction:column}\n#gg-noise-live .eyebrow{font-size:.75rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--brand)}\n#gg-noise-live h1.page-title{font-family:inherit;font-size:1.9rem;line-height:1.2;color:var(--green-900);font-weight:900;margin:2px 0 14px}\n#gg-noise-live .loc-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}\n#gg-noise-live .loc-select{position:relative;display:inline-flex;align-items:center;max-width:100%}\n#gg-noise-live .loc-select svg.pin{position:absolute;left:14px;pointer-events:none;color:var(--green-800)}\n#gg-noise-live .loc-select select{\n  appearance:none;-webkit-appearance:none;width:auto;max-width:100%;height:auto;\n  font:inherit;font-weight:800;color:var(--green-900);line-height:1.4;\n  border:1.5px solid var(--green-800);border-radius:999px;\n  padding:10px 42px 10px 40px;background:#fff;min-width:250px;cursor:pointer;box-shadow:none;\n}\n#gg-noise-live .loc-select:after{content:'';position:absolute;right:16px;width:9px;height:9px;border-right:2px solid var(--green-800);border-bottom:2px solid var(--green-800);transform:rotate(45deg) translateY(-2px);pointer-events:none}\n#gg-noise-live .loc-select.single:after{display:none}\n#gg-noise-live .loc-select.single select{min-width:0;padding-right:20px;cursor:default;opacity:1;color:var(--green-900);-webkit-text-fill-color:var(--green-900)}\n#gg-noise-live .updated{font-size:.8rem;color:var(--muted);font-weight:600}\n#gg-noise-live .updated b{color:var(--text);font-weight:800}\n\n#gg-noise-live .hero-main{display:flex;align-items:center;gap:24px;margin-top:26px;flex-wrap:wrap}\n#gg-noise-live .hero-main>div:first-child{flex:1 1 220px}\n#gg-noise-live .hero-figure{display:flex;align-items:baseline;gap:10px}\n#gg-noise-live .hero-figure .val{font-size:4.4rem;line-height:1;font-weight:900;color:var(--green-950);font-variant-numeric:tabular-nums}\n#gg-noise-live .hero-figure .of{font-size:1.15rem;color:var(--muted);font-weight:700}\n#gg-noise-live .idx-name{display:block;font-size:.95rem;line-height:1.5;color:var(--text);font-weight:400;margin-top:6px}\n#gg-noise-live .gauge-wrap{flex:0 1 190px;width:190px}\n#gg-noise-live .gauge-wrap svg{display:block;width:100%;height:auto}\n#gg-noise-live .hero-status{flex:1 1 220px;min-width:0}\n#gg-noise-live .level-pill{display:inline-flex;align-items:center;gap:9px;border-radius:999px;padding:9px 18px;font-weight:900;font-size:.95rem;max-width:100%;background:#eef1ef;color:#68766d}\n#gg-noise-live .level-pill .dot{width:10px;height:10px;border-radius:50%;flex:none;background:#b7c1ba}\n#gg-noise-live .recommend{margin-top:12px;font-size:.95rem;line-height:1.55;color:var(--text);max-width:420px}\n#gg-noise-live .recommend:empty{display:none}\n#gg-noise-live .status-note{--note:var(--warn);display:flex;gap:9px;align-items:flex-start;margin-top:12px;max-width:420px;padding:10px 13px;border-radius:12px;font-size:.84rem;line-height:1.45;font-weight:700;background:var(--warn-soft);color:var(--note)}\n#gg-noise-live .status-note:before{content:'!';flex:none;width:18px;height:18px;border-radius:50%;background:var(--note);color:#fff;display:grid;place-items:center;font-size:.72rem;font-weight:900;line-height:18px;text-align:center;margin-top:1px}\n#gg-noise-live .status-note.bad{--note:var(--bad);background:var(--bad-soft)}\n#gg-noise-live .status-note.muted{--note:#5f6d64;background:#eef1ef}\n\/* the current day\/evening\/night period and its limit *\/\n#gg-noise-live .period-row{margin-top:22px}\n#gg-noise-live .period-tag{display:inline-flex;align-items:center;gap:8px;max-width:100%;background:var(--page);border:1px solid var(--hairline);border-radius:12px;padding:8px 13px;font-size:.86rem;font-weight:700;line-height:1.4;color:var(--green-900)}\n#gg-noise-live .period-tag svg{flex:none;color:var(--green-800)}\n#gg-noise-live .hero-foot{display:flex;gap:10px;margin-top:auto;padding-top:16px;flex-wrap:wrap}\n#gg-noise-live .chip-nav{display:inline-flex;align-items:center;gap:7px;background:var(--page);border:1px solid var(--hairline);border-radius:999px;padding:7px 14px;font-size:.8rem;font-weight:800;color:var(--green-900);line-height:1.3}\n#gg-noise-live .chip-nav:hover,#gg-noise-live .chip-nav:focus-visible{background:var(--brand-soft);border-color:var(--brand);color:var(--green-900)}\n\n\/* \u2500\u2500 Scale card (where the other pages have the map) \u2500\u2500 *\/\n#gg-noise-live .side-card{padding:24px;display:flex;flex-direction:column}\n#gg-noise-live .side-card h3,#gg-noise-live .chart-card h3,#gg-noise-live .fact-card h3,#gg-noise-live .alarm-card h3{font-family:inherit;font-size:1.02rem;line-height:1.3;color:var(--green-900);font-weight:900}\n#gg-noise-live .c-sub{font-size:.78rem;color:var(--muted);font-weight:600;margin-top:2px;line-height:1.4}\n#gg-noise-live .scale-list{list-style:none;display:flex;flex-direction:column;gap:3px;margin:12px 0 0}\n#gg-noise-live .scale-list li{display:flex;align-items:center;gap:10px;padding:7px 12px;border-radius:12px;font-size:.85rem;font-weight:700;color:var(--text);line-height:1.3}\n#gg-noise-live .scale-list li i{width:10px;height:10px;border-radius:50%;flex:none}\n#gg-noise-live .scale-list li .rng{margin-left:auto;color:var(--muted);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}\n#gg-noise-live .scale-list li.on{font-weight:900}\n#gg-noise-live .scale-list li.on .rng{color:inherit}\n#gg-noise-live .scale-list li .now{flex:none;font-size:.64rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:#fff}\n#gg-noise-live .scale-list li.empty{color:var(--muted);font-weight:600}\n#gg-noise-live .side-foot{display:flex;flex-direction:column;gap:10px;margin-top:auto;padding-top:16px}\n#gg-noise-live .stat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}\n#gg-noise-live .stat{background:var(--page);border:1px solid var(--hairline);border-radius:var(--radius-sm);padding:12px 14px}\n#gg-noise-live .s-lab{display:block;font-size:.72rem;font-weight:800;color:var(--muted);line-height:1.35}\n#gg-noise-live .stat .s-val{display:flex;align-items:baseline;gap:5px;margin-top:3px;font-size:1.05rem;font-weight:900;color:var(--green-950);line-height:1.3;font-variant-numeric:tabular-nums}\n#gg-noise-live .stat .s-val small{font-size:.72rem;font-weight:800;color:var(--muted)}\n#gg-noise-live .limits{background:var(--page);border:1px solid var(--hairline);border-radius:var(--radius-sm);padding:12px 14px}\n#gg-noise-live .limits .zone{display:block;font-size:.8rem;font-weight:700;color:var(--text);line-height:1.4;margin-top:2px}\n#gg-noise-live .lim-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:14px}\n#gg-noise-live .lim{position:relative;background:#fff;border:1px solid var(--hairline);border-radius:10px;padding:8px 8px 7px;text-align:center;line-height:1.25}\n#gg-noise-live .lim .l-now{position:absolute;left:50%;top:0;transform:translate(-50%,-55%);background:var(--brand);color:#fff;border-radius:999px;padding:1px 7px;font-size:.6rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;line-height:1.5;white-space:nowrap}\n#gg-noise-live .lim .l-name{display:block;font-size:.72rem;font-weight:800;color:var(--muted)}\n#gg-noise-live .lim .l-val{display:block;font-size:1.05rem;font-weight:900;color:var(--green-950);font-variant-numeric:tabular-nums;margin-top:2px}\n#gg-noise-live .lim .l-rng{display:block;font-size:.68rem;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;margin-top:2px;white-space:nowrap}\n#gg-noise-live .lim.on{border-color:var(--brand);background:var(--brand-soft)}\n#gg-noise-live .lim.on .l-name{color:var(--green-800)}\n\n\/* \u2500\u2500 Chart cards \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live .chart-card{padding:24px 26px;display:flex;flex-direction:column}\n#gg-noise-live .chart-card .c-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;margin-bottom:6px}\n#gg-noise-live .chart-card .c-head>div:first-child{flex:1 1 180px}\n#gg-noise-live .view-toggle{margin-left:auto;display:inline-flex;flex-wrap:wrap;max-width:100%;background:var(--page);border:1px solid var(--hairline);border-radius:999px;padding:3px}\n#gg-noise-live .view-toggle button{background:transparent;font-weight:800;font-size:.75rem;color:var(--muted);padding:5px 13px;border-radius:999px;white-space:nowrap;line-height:1.4}\n#gg-noise-live .view-toggle button:hover{background:transparent;color:var(--green-900)}\n#gg-noise-live .view-toggle button.on{background:#fff;color:var(--green-900);box-shadow:var(--shadow)}\n#gg-noise-live .legend{display:flex;gap:8px 16px;flex-wrap:wrap;margin:8px 0 14px}\n#gg-noise-live .legend span{display:inline-flex;align-items:center;gap:7px;font-size:.78rem;font-weight:700;color:var(--text)}\n#gg-noise-live .legend i{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}\n#gg-noise-live .legend i.ln{width:18px;height:0;border-radius:0;border-top:2px dashed var(--bad);background:none!important}\n#gg-noise-live .legend svg{flex:none;display:block}\n#gg-noise-live .chart-holder{position:relative;width:100%}\n#gg-noise-live .chart-holder svg{display:block;width:100%;height:auto;overflow:visible}\n#gg-noise-live .chart-empty{display:flex;align-items:center;justify-content:center;text-align:center;min-height:180px;padding:24px;border:1px dashed var(--hairline);border-radius:var(--radius-sm);color:var(--muted);font-size:.86rem;font-weight:700;line-height:1.5}\n#gg-noise-live .tbl-scroll{width:100%;max-height:420px;overflow:auto;border:1px solid var(--hairline);border-radius:12px;padding:0 4px}\n#gg-noise-live table.data-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:.8rem;margin:8px 0 0}\n#gg-noise-live table.data-table th,#gg-noise-live table.data-table td{border:0;background:none;vertical-align:middle;line-height:1.45}\n#gg-noise-live table.data-table th{text-align:left;color:var(--muted);font-weight:800;padding:6px 8px;border-bottom:1px solid var(--hairline);white-space:nowrap}\n#gg-noise-live table.data-table td{padding:5px 8px;border-bottom:1px solid var(--grid);font-variant-numeric:tabular-nums;color:var(--text)}\n#gg-noise-live table.data-table tr:hover>td{background:none}\n#gg-noise-live table.data-table td.over{color:var(--bad);font-weight:800}\n#gg-noise-live table.data-table .lvl-chip{display:inline-flex;align-items:center;gap:6px;font-weight:700}\n#gg-noise-live table.data-table .lvl-chip i{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}\n\n\/* \u2500\u2500 Alarms (same look as \/danni\/radiation\/) \u2500\u2500 *\/\n#gg-noise-live .alarm-card{padding:24px;display:flex;flex-direction:column}\n#gg-noise-live .alarm-card .c-sub{margin:2px 0 14px}\n#gg-noise-live .alarm-list{display:flex;flex-direction:column;gap:12px}\n#gg-noise-live .alarm{display:flex;gap:13px;padding:13px 14px;border:1px solid var(--hairline);border-radius:var(--radius-sm);background:#fdfefd}\n#gg-noise-live .alarm .a-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;flex:none;background:#eef1ef;color:#68766d}\n#gg-noise-live .alarm .a-ico.on{background:var(--bad-soft);color:var(--bad)}\n#gg-noise-live .alarm .a-body{min-width:0}\n#gg-noise-live .alarm .a-title{font-weight:800;color:var(--ink);font-size:.88rem;line-height:1.4}\n#gg-noise-live .alarm .a-badge{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;background:var(--bad-soft);color:var(--bad);font-size:.68rem;font-weight:900;line-height:1.2;vertical-align:1px}\n#gg-noise-live .alarm .a-meta{font-size:.78rem;color:var(--muted);font-weight:600;margin-top:3px;line-height:1.45}\n#gg-noise-live .alarm-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:26px 10px;color:var(--muted)}\n#gg-noise-live .alarm-empty .ok-ring{width:52px;height:52px;border-radius:50%;background:var(--brand-soft);display:grid;place-items:center;color:var(--brand)}\n#gg-noise-live .alarm-empty p{font-size:.85rem;font-weight:700;max-width:220px;line-height:1.5;margin:0}\n\n\/* \u2500\u2500 \"About the measurement\" card (same look as \"\u0417\u043d\u0430\u0435\u0442\u0435 \u043b\u0438, \u0447\u0435\u2026\") \u2500\u2500 *\/\n#gg-noise-live .fact-card{padding:20px 22px;background:linear-gradient(135deg,#f6fbf7 0%,#ffffff 60%)}\n#gg-noise-live .fact-card .f-head{display:flex;align-items:center;gap:10px}\n#gg-noise-live .fact-card .f-ico{width:34px;height:34px;border-radius:10px;background:var(--brand-soft);display:grid;place-items:center;color:var(--green-800);flex:none}\n#gg-noise-live .fact-card h3{flex:1}\n#gg-noise-live .fact-text{font-size:.88rem;line-height:1.6;color:var(--text);margin-top:10px}\n#gg-noise-live .f-link{display:inline-block;margin-top:10px;font-size:.83rem;font-weight:800;color:var(--green-800)}\n#gg-noise-live .f-link:hover{text-decoration:underline}\n\n\/* \u2500\u2500 Tooltip \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live #gn-tip{position:fixed;left:0;top:0;pointer-events:none;background:var(--green-950);color:#fff;border-radius:10px;padding:8px 12px;font-size:.76rem;font-weight:700;line-height:1.45;box-shadow:0 6px 20px rgba(0,0,0,.25);opacity:0;transition:opacity .12s;z-index:9999;max-width:250px}\n#gg-noise-live #gn-tip .t-val{font-size:.95rem;font-weight:900}\n#gg-noise-live #gn-tip .t-lab{opacity:.75;font-weight:600}\n#gg-noise-live #gn-tip .t-lvl{display:flex;align-items:center;gap:6px;margin-top:2px}\n#gg-noise-live #gn-tip .t-lvl i{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}\n\n\/* \u2500\u2500 Footer strip \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n#gg-noise-live .src-strip{margin:36px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#fff;border:1px solid var(--hairline);border-radius:var(--radius);padding:16px 24px;font-size:.83rem;font-weight:700;color:var(--text)}\n#gg-noise-live .src-strip .s-dot{width:30px;height:30px;border-radius:50%;background:var(--brand-soft);display:grid;place-items:center;color:var(--green-800);flex:none}\n#gg-noise-live .src-strip .lnk{margin-left:auto;color:var(--green-800);font-weight:800;white-space:normal}\n#gg-noise-live .src-strip .lnk:hover{text-decoration:underline}\n\n@media(max-width:1100px){\n  #gg-noise-live .row{grid-template-columns:minmax(0,1fr)}\n}\n@media(max-width:650px){\n  #gg-noise-live .hero-card{padding:24px 20px}\n  #gg-noise-live .chart-card,#gg-noise-live .side-card,#gg-noise-live .alarm-card{padding:20px}\n  #gg-noise-live .fact-card{padding:18px}\n  #gg-noise-live .loc-row{align-items:stretch}\n  #gg-noise-live .loc-select{display:flex;width:100%}\n  #gg-noise-live .loc-select select{width:100%;min-width:0}\n  #gg-noise-live .hero-main{gap:20px}\n  #gg-noise-live .hero-status{flex:1 1 100%;width:100%}\n  #gg-noise-live .hero-figure .val{font-size:clamp(2.8rem,15vw,4.4rem)}\n  #gg-noise-live .gauge-wrap{width:min(190px,100%)}\n  #gg-noise-live .chart-card .c-head{flex-direction:column;align-items:stretch}\n  #gg-noise-live .chart-card .c-head>div:first-child{flex-basis:auto}\n  #gg-noise-live .view-toggle{margin-left:0;align-self:flex-start}\n  #gg-noise-live .src-strip{align-items:flex-start}\n  #gg-noise-live .src-strip .lnk{width:100%;margin-left:0}\n}\n@media(max-width:380px){\n  #gg-noise-live .hero-card,#gg-noise-live .chart-card,#gg-noise-live .side-card,#gg-noise-live .alarm-card{padding:18px 16px}\n  #gg-noise-live .fact-card{padding:16px}\n  #gg-noise-live .hero-main{gap:16px}\n  #gg-noise-live .hero-foot{gap:7px}\n  #gg-noise-live .chip-nav{padding:6px 10px}\n  #gg-noise-live .stat-row{grid-template-columns:minmax(0,1fr)}\n  #gg-noise-live .lim{padding:7px 4px}\n}\n\n\/* \u2500\u2500 Elementor page integration (same as the other data pages) \u2500\u2500 *\/\nbody:has(#gg-noise-live){background:#f5f8f4;--page-title-display:none}\nbody:has(#gg-noise-live) .e-con:has(#gg-noise-live){\n  --content-width:min(100%,1600px);\n  --padding-top:0px;\n  --padding-bottom:0px;\n  --padding-left:clamp(24px,3vw,48px);\n  --padding-right:clamp(24px,3vw,48px);\n  padding-left:clamp(24px,3vw,48px)!important;\n  padding-right:clamp(24px,3vw,48px)!important;\n}\nbody:has(#gg-noise-live) .elementor-widget-html:has(#gg-noise-live){width:100%;max-width:100%;min-width:0}\n#gg-noise-live{width:100%!important;max-width:none!important;margin:0!important;padding:0 0 48px!important}\n<\/style>\n<div id=\"gg-noise-live\" class=\"gg-live-widget\" lang=\"bg\" data-no-translation data-no-dynamic-translation>\n  <div class=\"crumbs\">\n    <a href=\"\/danni\/\" data-hub data-t=\"crumbHome\">\u0414\u0430\u043d\u043d\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438<\/a><span class=\"sep\">\u203a<\/span>\n    <span data-t=\"title\">\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c<\/span><span class=\"sep\">\u203a<\/span>\n    <span class=\"here\" id=\"gn-crumb-station\">\u2013<\/span>\n  <\/div>\n\n  <!-- \u2500\u2500 HERO: current level + scale for the current period \u2500\u2500 -->\n  <section class=\"row hero\">\n    <div class=\"card hero-card\">\n      <span class=\"eyebrow\" data-t=\"eyebrow\">\u0414\u0430\u043d\u043d\u0438 \u0432 \u0440\u0435\u0430\u043b\u043d\u043e \u0432\u0440\u0435\u043c\u0435<\/span>\n      <h1 class=\"page-title\" data-t=\"title\">\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c<\/h1>\n      <div class=\"loc-row\">\n        <label class=\"loc-select\" id=\"gn-loc\">\n          <svg class=\"pin\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M12 21s-7-5.5-7-11a7 7 0 1 1 14 0c0 5.5-7 11-7 11Z\" stroke=\"currentColor\" stroke-width=\"1.8\"\/><circle cx=\"12\" cy=\"10\" r=\"2.6\" stroke=\"currentColor\" stroke-width=\"1.8\"\/><\/svg>\n          <select id=\"gn-station\" data-t-aria=\"selectAria\" aria-label=\"\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u0442\u043e\u0447\u043a\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\"><\/select>\n        <\/label>\n        <span class=\"updated\"><span data-t=\"updated\">\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0435:<\/span> <b id=\"gn-updated\">\u2013<\/b><\/span>\n      <\/div>\n\n      <div class=\"hero-main\">\n        <div>\n          <div class=\"hero-figure\">\n            <span class=\"val\" id=\"gn-val\">\u2013<\/span>\n            <span class=\"of\" id=\"gn-unit\">dB(A)<\/span>\n          <\/div>\n          <span class=\"idx-name\" data-t=\"idxName\">\u0421\u0440\u0435\u0434\u043d\u043e \u043d\u0438\u0432\u043e \u043d\u0430 \u0448\u0443\u043c\u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430<\/span>\n        <\/div>\n        <div class=\"gauge-wrap\"><svg id=\"gn-gauge\" viewBox=\"0 0 190 120\" role=\"img\" data-t-aria=\"gaugeAria\" aria-label=\"\u0421\u043a\u0430\u043b\u0430\"><\/svg><\/div>\n        <div class=\"hero-status\">\n          <span class=\"level-pill\" id=\"gn-pill\"><span class=\"dot\"><\/span><span id=\"gn-level\">\u2013<\/span><\/span>\n          <p class=\"recommend\" id=\"gn-reco\"><\/p>\n          <p class=\"status-note\" id=\"gn-note\" role=\"status\" hidden><\/p>\n        <\/div>\n      <\/div>\n\n      <div class=\"period-row\" id=\"gn-period\" hidden>\n        <span class=\"period-tag\"><svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"8.5\" stroke=\"currentColor\" stroke-width=\"1.9\"\/><path d=\"M12 7.5V12l3 2\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span id=\"gn-period-text\"><\/span><\/span>\n      <\/div>\n\n      <div class=\"hero-foot\">\n        <button type=\"button\" class=\"chip-nav\" data-go=\"gn-history\" data-t=\"chip24\">\u0428\u0443\u043c \u2014 24 \u0447.<\/button>\n        <button type=\"button\" class=\"chip-nav\" data-go=\"gn-alarms\" data-t=\"chipAlarms\" id=\"gn-chip-alarms\" hidden>\u0410\u043b\u0430\u0440\u043c\u0438<\/button>\n        <button type=\"button\" class=\"chip-nav\" data-go=\"gn-about\" data-t=\"chipAbout\">\u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"card side-card\">\n      <h3 data-t=\"scaleTitle\">\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0448\u0443\u043c\u0430<\/h3>\n      <div class=\"c-sub\" id=\"gn-scale-sub\" data-t=\"scaleSub\">\u041d\u0438\u0432\u0430 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434, dB(A)<\/div>\n      <ul class=\"scale-list\" id=\"gn-scale\"><\/ul>\n      <div class=\"side-foot\">\n        <div class=\"stat-row\">\n          <div class=\"stat\"><span class=\"s-lab\" data-t=\"statMax\">\u041c\u0430\u043a\u0441. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430<\/span><span class=\"s-val\" id=\"gn-max\">\u2014<\/span><\/div>\n          <div class=\"stat\"><span class=\"s-lab\" data-t=\"statMin\">\u041c\u0438\u043d. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430<\/span><span class=\"s-val\" id=\"gn-min\">\u2014<\/span><\/div>\n        <\/div>\n        <div class=\"limits\" id=\"gn-limits-box\" hidden>\n          <span class=\"s-lab\" data-t=\"limitsTitle\">\u0413\u0440\u0430\u043d\u0438\u0447\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0437\u043e\u043d\u0430\u0442\u0430, dB(A)<\/span>\n          <span class=\"zone\" id=\"gn-zone\"><\/span>\n          <div class=\"lim-grid\" id=\"gn-limits\"><\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/section>\n\n  <!-- \u2500\u2500 Last 24 hours + alarms + about \u2500\u2500 -->\n  <section class=\"row\" id=\"gn-history\" style=\"margin-top:20px\">\n    <div class=\"card chart-card\">\n      <div class=\"c-head\">\n        <div>\n          <h3 data-t=\"h24\">\u0428\u0443\u043c \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 24 \u0447\u0430\u0441\u0430<\/h3>\n          <div class=\"c-sub\" data-t=\"sub24\">\u0421\u0440\u0435\u0434\u043d\u043e \u043d\u0438\u0432\u043e \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u0435 \u0432 dB(A)<\/div>\n        <\/div>\n        <div class=\"view-toggle\">\n          <button type=\"button\" class=\"on\" id=\"gn-btn-chart\" aria-pressed=\"true\" data-t=\"chart\">\u0413\u0440\u0430\u0444\u0438\u043a\u0430<\/button>\n          <button type=\"button\" id=\"gn-btn-table\" aria-pressed=\"false\" data-t=\"table\">\u0422\u0430\u0431\u043b\u0438\u0446\u0430<\/button>\n        <\/div>\n      <\/div>\n      <div class=\"legend\" id=\"gn-legend\"><\/div>\n      <div class=\"chart-holder\" id=\"gn-chart24\"><\/div>\n      <div class=\"tbl-scroll\" id=\"gn-table-wrap\" hidden>\n        <table class=\"data-table\" id=\"gn-table\"><\/table>\n      <\/div>\n    <\/div>\n\n    <div class=\"col-stack\">\n      <div class=\"card alarm-card\" id=\"gn-alarms\" hidden>\n        <h3 data-t=\"alarmsTitle\">\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 \u0430\u043b\u0430\u0440\u043c\u0438<\/h3>\n        <div class=\"c-sub\" data-t=\"alarmsSub\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044f \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u0438\u0448\u0435\u043d\u0438 \u043f\u0440\u0430\u0433\u043e\u0432\u0435<\/div>\n        <div class=\"alarm-list\" id=\"gn-alarm-list\"><\/div>\n      <\/div>\n\n      <div class=\"card fact-card\" id=\"gn-about\">\n        <div class=\"f-head\">\n          <span class=\"f-ico\"><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"2\"\/><path d=\"M12 11v6\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\"\/><circle cx=\"12\" cy=\"7.6\" r=\"1.3\" fill=\"currentColor\"\/><\/svg><\/span>\n          <h3 data-t=\"aboutTitle\">\u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e<\/h3>\n        <\/div>\n        <p class=\"fact-text\" data-t=\"about1\">\u0428\u0443\u043c\u044a\u0442 \u0441\u0435 \u0438\u0437\u043c\u0435\u0440\u0432\u0430 \u0432 dB(A) \u2014 \u0434\u0435\u0446\u0438\u0431\u0435\u043b\u0438, \u043f\u0440\u0435\u0442\u0435\u0433\u043b\u0435\u043d\u0438 \u043f\u043e \u043a\u0440\u0438\u0432\u0430 \u201e\u0410\u201c \u0441\u043f\u043e\u0440\u0435\u0434 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u043d\u043e\u0441\u0442\u0442\u0430 \u043d\u0430 \u0447\u043e\u0432\u0435\u0448\u043a\u043e\u0442\u043e \u0443\u0445\u043e. \u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0435 \u0441\u0440\u0435\u0434\u043d\u043e\u0442\u043e \u043d\u0438\u0432\u043e \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430; \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044a\u0442 \u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u044a\u0442 \u0441\u0430 \u043d\u0430\u0439-\u0432\u0438\u0441\u043e\u043a\u043e\u0442\u043e \u0438 \u043d\u0430\u0439-\u043d\u0438\u0441\u043a\u043e\u0442\u043e \u043d\u0438\u0432\u043e \u0432 \u0441\u044a\u0449\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430, \u0430 \u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0442\u0430 \u2014 \u0437\u0430 \u0446\u0435\u043b\u0438\u044f \u0447\u0430\u0441.<\/p>\n        <p class=\"fact-text\" data-t=\"about2\">\u0413\u0440\u0430\u043d\u0438\u0447\u043d\u0438\u0442\u0435 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0441\u0430 \u043f\u043e \u041d\u0430\u0440\u0435\u0434\u0431\u0430 \u2116 6 \u043e\u0442 2006 \u0433. \u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0437\u043e\u043d\u0430\u0442\u0430 \u0438 \u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430 \u0434\u0435\u043d\u043e\u043d\u043e\u0449\u0438\u0435\u0442\u043e. \u0426\u0432\u0435\u0442\u044a\u0442 \u043f\u043e\u043a\u0430\u0437\u0432\u0430 \u043a\u043e\u043b\u043a\u043e \u0431\u043b\u0438\u0437\u043e \u0435 \u0448\u0443\u043c\u044a\u0442 \u0434\u043e \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430: \u0447\u0435\u0440\u0432\u0435\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0432\u0430, \u0447\u0435 \u0442\u044f \u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0430\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u0435\u0432\u0438\u0448\u0435\u043d\u0430. \u0421\u043a\u0430\u043b\u0430\u0442\u0430 \u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u0430 \u0438 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0430.<\/p>\n        <a class=\"f-link\" href=\"\/danni\/#noise\" id=\"gn-info-link\" data-t=\"aboutLink\">\u041f\u043e\u0432\u0435\u0447\u0435 \u0437\u0430 \u0448\u0443\u043c\u0430 \u0438 \u043d\u043e\u0440\u043c\u0438\u0442\u0435 \u2192<\/a>\n      <\/div>\n    <\/div>\n  <\/section>\n\n  <div class=\"src-strip\">\n    <span class=\"s-dot\"><svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M21 12a9 9 0 1 1-2.6-6.3M21 4v5h-5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><\/span>\n    <span data-t=\"src\">\u0414\u0430\u043d\u043d\u0438\u0442\u0435 \u0441\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u0442 \u0432\u0441\u044f\u043a\u0430 \u043c\u0438\u043d\u0443\u0442\u0430 \u00b7 \u0418\u0437\u0442\u043e\u0447\u043d\u0438\u0446\u0438: \u041e\u0431\u0449\u0438\u043d\u0430 \u0413\u0430\u0431\u0440\u043e\u0432\u043e, Senstate<\/span>\n    <a class=\"lnk\" href=\"\/danni\/\" data-hub data-t=\"more\">\u041f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u2192<\/a>\n  <\/div>\n  <div id=\"gn-tip\" aria-hidden=\"true\"><\/div>\n<\/div>\n<script>\n(function(){\n'use strict';\n\/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 \u041d\u0410\u0421\u0422\u0420\u041e\u0419\u041a\u0418 \/ SETTINGS \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\nvar API_BASE = 'https:\/\/api.greengabrovo.com';   \/\/ same API as the other data pages\nvar BOOTSTRAP_TOKEN = 'L7GwrSfm8XerThrB3LigeaXc';  \/\/ station shown when the address has no #token (\u043f\u043b. \u0412\u044a\u0437\u0440\u0430\u0436\u0434\u0430\u043d\u0435)\n\/* Local preview only (tools\/Preview replaces the marker below with its own address).\n   On the real site it stays as it is and API_BASE above is used. Leave it alone. *\/\nvar PREVIEW_API = 'https:\/\/API-HOST';\nif (PREVIEW_API.indexOf('\/\/API-HOST') === -1) API_BASE = PREVIEW_API.replace(\/\\\/+$\/, '');\n\nfunction boot(){\n  const root = document.getElementById('gg-noise-live');\n  if (!root || root.getAttribute('data-gn-ready')) return;\n  root.setAttribute('data-gn-ready', '1');\n\n  \/* Language: \/en\/ in the address (TranslatePress), like the other data pages; <html lang> as a fallback. *\/\n  const EN = \/(^|\\\/)en(\\\/|$)\/.test(location.pathname) || \/^en\\b\/i.test(document.documentElement.lang || '');\n  const LANG = EN ? 'en' : 'bg';\n  const LOCALE = EN ? 'en-GB' : 'bg-BG';\n  const TZ = 'Europe\/Sofia';\n\n  const T = EN ? {\n    crumbHome:'Data and maps', title:'Environmental noise', eyebrow:'Real-time data',\n    selectAria:'Monitoring-point selector', updated:'Last updated:',\n    idxName:'Average noise level over the last minute', gaugeAria:'Noise scale for the current period',\n    chip24:'Noise \u2014 24 h', chipAlarms:'Alarms', chipAbout:'About the measurement',\n    scaleTitle:'Noise scale', scaleSub:'Levels for the current period, dB(A)',\n    scaleSubFor:p => 'Levels for the ' + p.toLowerCase() + ' period, dB(A)', now:'now',\n    statMax:'Max in the minute', statMin:'Min in the minute',\n    limitsTitle:'Zone limit values, dB(A)',\n    periods:{day:'Day', evening:'Evening', night:'Night'},\n    periodNow:(name, range, limit) => 'Now: ' + name + (range ? ' (' + range + ')' : '') + ' \u00b7 limit\u00a0' + limit + '\u00a0dB(A)',\n    h24:'Noise \u2014 last 24 hours', sub24:'Hourly average level in dB(A)',\n    chart:'Chart', table:'Table', aria24:'24-hour noise level bar chart',\n    legendLimit:'Limit for the period', legendRange:'Min\u2013max in the hour',\n    limitWord:'limit', overLimit:'At or above the limit',\n    alarmsTitle:'Latest alarms', alarmsSub:'Automatic notifications when thresholds are exceeded',\n    noAlarms:'No alarms have been recorded in the last 90 days.',\n    alarm:'Alarm', alarmNoise:'Noise alarm', active:'Active', atThreshold:'at threshold',\n    aboutTitle:'About the measurement',\n    about1:'Noise is measured in dB(A): decibels weighted by the \u201cA\u201d curve to match the sensitivity of the human ear. The value is the average level over the last minute; the maximum and minimum are the highest and lowest levels within that minute, and in the chart within the whole hour.',\n    about2:'The limit values come from Ordinance No. 6 of 2006 and depend on the zone and on the time of day. The colour shows how close the noise is to the limit: red means the limit is reached or exceeded. The scale is provisional and may be refined.',\n    aboutLink:'More about noise and the limits \u2192',\n    src:'Data is updated every minute \u00b7 Sources: Gabrovo Municipality, Senstate', more:'Useful information \u2192',\n    colHour:'Time', colRange:'Min\u2013max', colLimit:'Limit', colLevel:'Level',\n    hourAxis:h => h + ' h', hourRange:h => h + ':00 \u2013 ' + h + ':59',\n    dateTime:(d, m, y, H, M) => d + '.' + m + '.' + y + ', ' + H + ':' + M,\n    max:'max', min:'min',\n    loading:'loading\u2026', offlineTag:' \u00b7 offline', noData:'No data',\n    noHistory:'No measurements for this period yet.', noValue:'No valid measurement', noCurrent:'No current data',\n    offline:'The station has not reported in the last 6 hours.', never:'The station has not reported any data yet.',\n    error:'The noise data cannot be loaded right now. The page will try again in a minute.',\n    updatedErr:'error while loading data', noSensor:'No noise station is available.'\n  } : {\n    crumbHome:'\u0414\u0430\u043d\u043d\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438', title:'\u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c', eyebrow:'\u0414\u0430\u043d\u043d\u0438 \u0432 \u0440\u0435\u0430\u043b\u043d\u043e \u0432\u0440\u0435\u043c\u0435',\n    selectAria:'\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u0442\u043e\u0447\u043a\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435', updated:'\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0435:',\n    idxName:'\u0421\u0440\u0435\u0434\u043d\u043e \u043d\u0438\u0432\u043e \u043d\u0430 \u0448\u0443\u043c\u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430', gaugeAria:'\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0448\u0443\u043c\u0430 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434',\n    chip24:'\u0428\u0443\u043c \u2014 24 \u0447.', chipAlarms:'\u0410\u043b\u0430\u0440\u043c\u0438', chipAbout:'\u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e',\n    scaleTitle:'\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0448\u0443\u043c\u0430', scaleSub:'\u041d\u0438\u0432\u0430 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434, dB(A)',\n    scaleSubFor:p => '\u041d\u0438\u0432\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u201e' + p + '\u201c, dB(A)', now:'\u0441\u0435\u0433\u0430',\n    statMax:'\u041c\u0430\u043a\u0441. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430', statMin:'\u041c\u0438\u043d. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430',\n    limitsTitle:'\u0413\u0440\u0430\u043d\u0438\u0447\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0437\u043e\u043d\u0430\u0442\u0430, dB(A)',\n    periods:{day:'\u0414\u0435\u043d', evening:'\u0412\u0435\u0447\u0435\u0440', night:'\u041d\u043e\u0449'},\n    periodNow:(name, range, limit) => '\u0421\u0435\u0433\u0430: ' + name + (range ? ' (' + range + ')' : '') + ' \u00b7 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u00a0' + limit + '\u00a0dB(A)',\n    h24:'\u0428\u0443\u043c \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 24 \u0447\u0430\u0441\u0430', sub24:'\u0421\u0440\u0435\u0434\u043d\u043e \u043d\u0438\u0432\u043e \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u0435 \u0432 dB(A)',\n    chart:'\u0413\u0440\u0430\u0444\u0438\u043a\u0430', table:'\u0422\u0430\u0431\u043b\u0438\u0446\u0430', aria24:'\u0411\u0430\u0440\u043e\u0432\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043d\u0438\u0432\u043e\u0442\u043e \u043d\u0430 \u0448\u0443\u043c\u0430 \u0437\u0430 24 \u0447\u0430\u0441\u0430',\n    legendLimit:'\u0413\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430', legendRange:'\u041c\u0438\u043d.\u2013\u043c\u0430\u043a\u0441. \u0437\u0430 \u0447\u0430\u0441\u0430',\n    limitWord:'\u0433\u0440\u0430\u043d\u0438\u0446\u0430', overLimit:'\u041d\u0430 \u0438\u043b\u0438 \u043d\u0430\u0434 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430',\n    alarmsTitle:'\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 \u0430\u043b\u0430\u0440\u043c\u0438', alarmsSub:'\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044f \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u0438\u0448\u0435\u043d\u0438 \u043f\u0440\u0430\u0433\u043e\u0432\u0435',\n    noAlarms:'\u041d\u044f\u043c\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0430\u043d\u0438 \u0430\u043b\u0430\u0440\u043c\u0438 \u043f\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 90 \u0434\u043d\u0438.',\n    alarm:'\u0410\u043b\u0430\u0440\u043c\u0430', alarmNoise:'\u0410\u043b\u0430\u0440\u043c\u0430 \u0437\u0430 \u0448\u0443\u043c', active:'\u0410\u043a\u0442\u0438\u0432\u043d\u0430', atThreshold:'\u043f\u0440\u0438 \u043f\u0440\u0430\u0433',\n    aboutTitle:'\u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e',\n    about1:'\u0428\u0443\u043c\u044a\u0442 \u0441\u0435 \u0438\u0437\u043c\u0435\u0440\u0432\u0430 \u0432 dB(A) \u2014 \u0434\u0435\u0446\u0438\u0431\u0435\u043b\u0438, \u043f\u0440\u0435\u0442\u0435\u0433\u043b\u0435\u043d\u0438 \u043f\u043e \u043a\u0440\u0438\u0432\u0430 \u201e\u0410\u201c \u0441\u043f\u043e\u0440\u0435\u0434 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u043d\u043e\u0441\u0442\u0442\u0430 \u043d\u0430 \u0447\u043e\u0432\u0435\u0448\u043a\u043e\u0442\u043e \u0443\u0445\u043e. \u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0435 \u0441\u0440\u0435\u0434\u043d\u043e\u0442\u043e \u043d\u0438\u0432\u043e \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430; \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044a\u0442 \u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u044a\u0442 \u0441\u0430 \u043d\u0430\u0439-\u0432\u0438\u0441\u043e\u043a\u043e\u0442\u043e \u0438 \u043d\u0430\u0439-\u043d\u0438\u0441\u043a\u043e\u0442\u043e \u043d\u0438\u0432\u043e \u0432 \u0441\u044a\u0449\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430, \u0430 \u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0442\u0430 \u2014 \u0437\u0430 \u0446\u0435\u043b\u0438\u044f \u0447\u0430\u0441.',\n    about2:'\u0413\u0440\u0430\u043d\u0438\u0447\u043d\u0438\u0442\u0435 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0441\u0430 \u043f\u043e \u041d\u0430\u0440\u0435\u0434\u0431\u0430 \u2116 6 \u043e\u0442 2006 \u0433. \u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0437\u043e\u043d\u0430\u0442\u0430 \u0438 \u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430 \u0434\u0435\u043d\u043e\u043d\u043e\u0449\u0438\u0435\u0442\u043e. \u0426\u0432\u0435\u0442\u044a\u0442 \u043f\u043e\u043a\u0430\u0437\u0432\u0430 \u043a\u043e\u043b\u043a\u043e \u0431\u043b\u0438\u0437\u043e \u0435 \u0448\u0443\u043c\u044a\u0442 \u0434\u043e \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430: \u0447\u0435\u0440\u0432\u0435\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0432\u0430, \u0447\u0435 \u0442\u044f \u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0430\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u0435\u0432\u0438\u0448\u0435\u043d\u0430. \u0421\u043a\u0430\u043b\u0430\u0442\u0430 \u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u0430 \u0438 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0430.',\n    aboutLink:'\u041f\u043e\u0432\u0435\u0447\u0435 \u0437\u0430 \u0448\u0443\u043c\u0430 \u0438 \u043d\u043e\u0440\u043c\u0438\u0442\u0435 \u2192',\n    src:'\u0414\u0430\u043d\u043d\u0438\u0442\u0435 \u0441\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u0442 \u0432\u0441\u044f\u043a\u0430 \u043c\u0438\u043d\u0443\u0442\u0430 \u00b7 \u0418\u0437\u0442\u043e\u0447\u043d\u0438\u0446\u0438: \u041e\u0431\u0449\u0438\u043d\u0430 \u0413\u0430\u0431\u0440\u043e\u0432\u043e, Senstate', more:'\u041f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u2192',\n    colHour:'\u0427\u0430\u0441', colRange:'\u041c\u0438\u043d.\u2013\u043c\u0430\u043a\u0441.', colLimit:'\u0413\u0440\u0430\u043d\u0438\u0446\u0430', colLevel:'\u041d\u0438\u0432\u043e',\n    hourAxis:h => h + ' \u0447.', hourRange:h => h + ':00 \u2013 ' + h + ':59 \u0447.',\n    dateTime:(d, m, y, H, M) => d + '.' + m + '.' + y + ' \u0433., ' + H + ':' + M + ' \u0447.',\n    max:'\u043c\u0430\u043a\u0441.', min:'\u043c\u0438\u043d.',\n    loading:'\u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435\u2026', offlineTag:' \u00b7 \u043e\u0444\u043b\u0430\u0439\u043d', noData:'\u041d\u044f\u043c\u0430 \u0434\u0430\u043d\u043d\u0438',\n    noHistory:'\u0412\u0441\u0435 \u043e\u0449\u0435 \u043d\u044f\u043c\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0438\u044f \u0437\u0430 \u0442\u043e\u0437\u0438 \u043f\u0435\u0440\u0438\u043e\u0434.', noValue:'\u041d\u044f\u043c\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435', noCurrent:'\u041d\u044f\u043c\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u043d\u0438 \u0434\u0430\u043d\u043d\u0438',\n    offline:'\u0421\u0442\u0430\u043d\u0446\u0438\u044f\u0442\u0430 \u043d\u0435 \u0435 \u043f\u043e\u0434\u0430\u0432\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u0438 \u043f\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 6 \u0447\u0430\u0441\u0430.', never:'\u0421\u0442\u0430\u043d\u0446\u0438\u044f\u0442\u0430 \u0432\u0441\u0435 \u043e\u0449\u0435 \u043d\u0435 \u0435 \u043f\u043e\u0434\u0430\u0432\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u0438.',\n    error:'\u0414\u0430\u043d\u043d\u0438\u0442\u0435 \u0437\u0430 \u0448\u0443\u043c\u0430 \u043d\u0435 \u043c\u043e\u0433\u0430\u0442 \u0434\u0430 \u0431\u044a\u0434\u0430\u0442 \u0437\u0430\u0440\u0435\u0434\u0435\u043d\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0430. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430 \u0449\u0435 \u043e\u043f\u0438\u0442\u0430 \u043e\u0442\u043d\u043e\u0432\u043e \u0441\u043b\u0435\u0434 \u043c\u0438\u043d\u0443\u0442\u0430.',\n    updatedErr:'\u0433\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u0438\u0442\u0435', noSensor:'\u041d\u044f\u043c\u0430 \u043d\u0430\u043b\u0438\u0447\u043d\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0437\u0430 \u0448\u0443\u043c.'\n  };\n\n  const byId = id => document.getElementById(id);\n  const NS = 'http:\/\/www.w3.org\/2000\/svg';\n  const svgEl = (tag, attrs, parent) => { const n = document.createElementNS(NS, tag);\n    for (const k in attrs) n.setAttribute(k, attrs[k]); if (parent) parent.appendChild(n); return n; };\n  const svgText = (parent, x, y, text, attrs) => { const t = svgEl('text', Object.assign({x:x, y:y}, attrs), parent); t.textContent = text; return t; };\n  const isNum = v => typeof v === 'number' && isFinite(v);\n  const HOUR = 3600e3;\n\n  \/* \u2500\u2500 Formatting (times are shown in Bulgarian time, like the periods of the scale) \u2500\u2500 *\/\n  const nf1 = new Intl.NumberFormat(LOCALE, {minimumFractionDigits:1, maximumFractionDigits:1});\n  const nfN = new Intl.NumberFormat(LOCALE, {maximumFractionDigits:1});\n  const fmt1 = v => isNum(v) ? nf1.format(v) : '\u2014';\n  const fmtN = v => isNum(v) ? nfN.format(v) : '\u2014';\n  const partsFmt = new Intl.DateTimeFormat('en-GB', {timeZone:TZ, year:'numeric', month:'2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit', hourCycle:'h23'});\n  const sofia = t => { const o = {}; partsFmt.formatToParts(new Date(t)).forEach(p => { o[p.type] = p.value; });\n    if (o.hour === '24') o.hour = '00'; return o; };\n  const dayKey = t => { const p = sofia(t); return p.year + '-' + p.month + '-' + p.day; };\n  const fmtDateTime = iso => { const t = Date.parse(iso); if (isNaN(t)) return '\u2014'; const p = sofia(t); return T.dateTime(p.day, p.month, p.year, p.hour, p.minute); };\n  const alarmFmt = new Intl.DateTimeFormat(LOCALE, {timeZone:TZ, day:'2-digit', month:'2-digit', hour:'2-digit', minute:'2-digit', hour12:false});\n  const fmtAlarmTime = iso => { const t = Date.parse(iso); return isNaN(t) ? '' : alarmFmt.format(new Date(t)); };\n\n  \/* \u2500\u2500 Colours: the level colours come from the API; soft\/ink tints for the pill like the other pages \u2500\u2500 *\/\n  const safeColor = c => \/^#[0-9a-f]{6}$\/i.test(c || '') ? c : '#7d8b81';\n  const mix = (hex, w, t) => { const c = parseInt(hex.slice(1), 16), r = c >> 16, g = (c >> 8) & 255, b = c & 255;\n    const m = v => Math.round(v + (w - v) * t); return 'rgb(' + m(r) + ',' + m(g) + ',' + m(b) + ')'; };\n  const soft = hex => mix(hex, 255, .84), ink = hex => mix(hex, 0, .42);\n\n  \/* The bands of the CURRENT period (the API computes them from the period's limit). *\/\n  const normLevels = n => (n && Array.isArray(n.levels) ? n.levels : [])\n    .filter(l => l && isNum(l.min))\n    .map((l, i) => ({level:isNum(l.level) ? l.level : i + 1, min:l.min, max:isNum(l.max) ? l.max : null, color:safeColor(l.color), text:String(l.text || '')}))\n    .sort((a, b) => a.min - b.min);\n  const levelIndexOf = (v, levels) => { let idx = 0; for (let i = 0; i < levels.length; i++) if (v >= levels[i].min) idx = i; return idx; };\n  \/* Level names and colours are the same in every period (only the dB bounds move), so an hour of\n     another period is named through its level number. *\/\n  const levelByNum = (num, levels) => levels.find(L => L.level === num) || null;\n  const hourColor = (p, levels) => \/^#[0-9a-f]{6}$\/i.test(p.color || '') ? p.color : (levelByNum(p.level, levels) || {color:'#7d8b81'}).color;\n\n  \/* \u2500\u2500 Day \/ evening \/ night. The current period's range comes from the API; the start of the other\n     periods is read from the hours where the history changes period (default 07\/19\/23). \u2500\u2500 *\/\n  const PERIODS = ['day', 'evening', 'night'];\n  const nextPeriod = p => PERIODS[(PERIODS.indexOf(p) + 1) % PERIODS.length];\n  const isPeriod = p => PERIODS.indexOf(p) !== -1;\n  function periodStarts(n){\n    const st = {day:'07:00', evening:'19:00', night:'23:00'};\n    const pts = ((n && n.history) || []).filter(p => p && isPeriod(p.period) && !isNaN(Date.parse(p.time)))\n      .sort((a, b) => Date.parse(a.time) - Date.parse(b.time));\n    for (let i = 1; i < pts.length; i++) {\n      const a = pts[i - 1], b = pts[i], tb = Date.parse(b.time);\n      if (a.period !== b.period && tb - Date.parse(a.time) === HOUR) st[b.period] = sofia(tb).hour + ':00';\n    }\n    const m = \/^\\s*(\\d{1,2}:\\d{2})\\s*[\u2013\u2014-]\\s*(\\d{1,2}:\\d{2})\\s*$\/.exec((n && n.periodRange) || '');\n    if (m && n && isPeriod(n.period)) { st[n.period] = m[1].padStart(5, '0'); st[nextPeriod(n.period)] = m[2].padStart(5, '0'); }\n    return st;\n  }\n  const toMin = s => { const m = \/^(\\d{1,2}):(\\d{2})$\/.exec(s || ''); return m ? Number(m[1]) * 60 + Number(m[2]) : 0; };\n  function periodAt(t, starts){\n    const p = sofia(t), m = Number(p.hour) * 60 + Number(p.minute);\n    for (const k of PERIODS) {\n      const s = toMin(starts[k]), e = toMin(starts[nextPeriod(k)]);\n      if (s < e ? (m >= s && m < e) : (m >= s || m < e)) return k;\n    }\n    return 'day';\n  }\n\n  \/* \u2500\u2500 Static texts and language-aware links \u2500\u2500 *\/\n  root.setAttribute('lang', LANG);\n  root.querySelectorAll('[data-t]').forEach(n => { const v = T[n.getAttribute('data-t')]; if (typeof v === 'string') n.textContent = v; });\n  root.querySelectorAll('[data-t-aria]').forEach(n => { const v = T[n.getAttribute('data-t-aria')]; if (typeof v === 'string') n.setAttribute('aria-label', v); });\n  root.querySelectorAll('[data-hub]').forEach(a => a.setAttribute('href', EN ? '\/en\/danni\/' : '\/danni\/'));\n  byId('gn-info-link').setAttribute('href', EN ? '\/en\/danni\/#noise' : '\/danni\/#noise');\n\n  \/* \u2500\u2500 Tooltip \u2500\u2500 *\/\n  const tip = byId('gn-tip');\n  function showTip(lines, x, y){\n    tip.textContent = '';\n    lines.forEach(l => { const d = document.createElement('div'); d.className = l[0];\n      if (l[2]) { const i = document.createElement('i'); i.style.background = l[2]; d.appendChild(i); }\n      d.appendChild(document.createTextNode(l[1])); tip.appendChild(d); });\n    tip.style.opacity = 1;\n    const w = tip.offsetWidth, h = tip.offsetHeight;\n    tip.style.left = Math.min(Math.max(8, x - w \/ 2), window.innerWidth - w - 8) + 'px';\n    tip.style.top = (y - h - 14 < 8 ? y + 18 : y - h - 14) + 'px';\n  }\n  function hideTip(){ tip.style.opacity = 0; }\n  function bindTip(target, lines, bar){\n    target.style.cursor = 'pointer';\n    const show = e => { if (bar) bar.style.opacity = .75; showTip(lines, e.clientX, e.clientY); };\n    target.addEventListener('pointermove', show);\n    target.addEventListener('pointerdown', show);\n    target.addEventListener('pointerleave', () => { if (bar) bar.style.opacity = ''; hideTip(); });\n  }\n  window.addEventListener('scroll', hideTip, {passive:true});\n\n  const emptyNote = text => { const d = document.createElement('div'); d.className = 'chart-empty'; d.textContent = text; return d; };\n  const barPath = (x, top, w, base) => { const r = Math.max(0, Math.min(4, w \/ 2, base - top));\n    return 'M' + x + ' ' + base + 'V' + (top + r) + 'Q' + x + ' ' + top + ' ' + (x + r) + ' ' + top + 'H' + (x + w - r) +\n      'Q' + (x + w) + ' ' + top + ' ' + (x + w) + ' ' + (top + r) + 'V' + base + 'Z'; };\n  const unitOf = n => (n && n.unit) || 'dB(A)';\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Semicircle gauge: the 5 bands of the current period, equal segments \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  function renderGauge(val, levels, activeIdx, unit){\n    const svg = byId('gn-gauge'); svg.textContent = '';\n    const cx = 95, cy = 104, R = 78, W = 13, gap = .012, n = levels.length || 5;\n    const a = f => Math.PI * (1 - f);\n    const arc = (f1, f2) => { const s = a(f1), e = a(f2);\n      return 'M ' + (cx + R * Math.cos(s)) + ' ' + (cy - R * Math.sin(s)) + ' A ' + R + ' ' + R + ' 0 0 1 ' + (cx + R * Math.cos(e)) + ' ' + (cy - R * Math.sin(e)); };\n    for (let i = 0; i < n; i++) {\n      const f1 = i \/ n + (i ? gap : 0), f2 = (i + 1) \/ n - (i < n - 1 ? gap : 0);\n      svgEl('path', {d:arc(f1, f2), stroke:levels[i] ? levels[i].color : '#e4eae2', 'stroke-width':W, fill:'none', 'stroke-linecap':'round', opacity:.92}, svg);\n    }\n    if (isNum(val) && levels.length && activeIdx >= 0) {\n      const L = levels[activeIdx];\n      const span = L.max != null ? L.max - L.min : 10;   \/\/ the open top band: 10 dB above its start fill it\n      const f = (activeIdx + Math.min(1, Math.max(0, (val - L.min) \/ Math.max(span, 1)))) \/ n, ang = a(f);\n      svgEl('circle', {cx:cx + R * Math.cos(ang), cy:cy - R * Math.sin(ang), r:9, fill:'#fff', stroke:L.color, 'stroke-width':4}, svg);\n    }\n    const lab = {'font-size':10, 'font-weight':800, fill:'#7d8b81'};\n    if (levels.length) {\n      svgText(svg, cx - R - 6, cy + 14, fmtN(levels[0].min), lab);\n      svgText(svg, cx + R + 8, cy + 14, '\u2265' + fmtN(levels[levels.length - 1].min) + ' ' + unit, Object.assign({'text-anchor':'end'}, lab));\n    }\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Bar chart \u2014 last 24 hours: bar = hourly average (coloured by that hour's own\n     level), line = min\u2013max of the hour, dashed step line = the limit of each hour's period \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  function renderChart24(n){\n    const box = byId('gn-chart24'); box.textContent = '';\n    const levels = normLevels(n), unit = unitOf(n), starts = periodStarts(n);\n    const limits = (n && n.limits) || {};\n    const end = Math.floor(Date.now() \/ HOUR) * HOUR, start = end - 24 * HOUR;\n    const byHour = new Map();\n    ((n && n.history) || []).forEach(p => { if (!p || !isNum(p.value)) return; const t = Date.parse(p.time); if (!isNaN(t)) byHour.set(Math.floor(t \/ HOUR) * HOUR, p); });\n    const slots = [];\n    for (let t = start; t <= end; t += HOUR) {\n      const p = byHour.get(t) || null, per = p && isPeriod(p.period) ? p.period : periodAt(t, starts);\n      const lim = p && isNum(p.limit) ? p.limit : (isNum(limits[per]) ? limits[per] : null);\n      slots.push({t:t, p:p, period:per, limit:lim});\n    }\n    const withData = slots.filter(s => s.p);\n    if (!withData.length) { box.appendChild(emptyNote(T.noHistory)); return; }\n\n    const W = Math.max(280, Math.round(box.clientWidth || 720)), narrow = W < 560;\n    let H = narrow ? 240 : Math.round(Math.min(340, Math.max(280, W * .4)));\n    \/* side by side with the alarms\/about column: grow into the height that column gives the card *\/\n    const card = box.closest('.chart-card'), stack = card && card.parentElement ? card.parentElement.querySelector('.col-stack') : null;\n    if (!narrow && stack && Math.abs(stack.getBoundingClientRect().top - card.getBoundingClientRect().top) < 2) {\n      const avail = stack.getBoundingClientRect().bottom - box.getBoundingClientRect().top - (parseFloat(getComputedStyle(card).paddingBottom) || 0);\n      if (avail > H) H = Math.round(Math.min(avail, 480));\n    }\n    const pl = narrow ? 30 : 40, pr = 8, pt = 16, pb = 30, iw = W - pl - pr, ih = H - pt - pb, base = pt + ih;\n    let top = 0;\n    slots.forEach(s => { if (s.p) top = Math.max(top, s.p.value, isNum(s.p.max) ? s.p.max : 0); if (isNum(s.limit)) top = Math.max(top, s.limit); });\n    const step = narrow ? 20 : 10, ymax = Math.max(step * 3, Math.ceil((top + 3) \/ step) * step);\n    const y = v => pt + ih * (1 - Math.min(Math.max(v, 0), ymax) \/ ymax);\n    const svg = svgEl('svg', {viewBox:'0 0 ' + W + ' ' + H, width:W, height:H, role:'img', 'aria-label':T.aria24}, box);\n    const axis = {'font-size':10, 'font-weight':700, fill:'#7d8b81'};\n\n    for (let v = 0, i = 0; v <= ymax + 1e-9; v += step, i++) {\n      svgEl('line', {x1:pl, x2:W - pr, y1:y(v), y2:y(v), stroke:i === 0 ? '#c9d3c9' : '#edf1ea', 'stroke-width':1}, svg);\n      svgText(svg, pl - 7, y(v) + 3.5, fmtN(v), Object.assign({'text-anchor':'end'}, axis));\n    }\n\n    const slot = iw \/ slots.length, bw = Math.max(3, Math.min(22, slot - 4)), every = slot * 3 >= 40 ? 3 : 6, cap = Math.max(2, Math.min(5, bw * .3));\n    slots.forEach((s, i) => {\n      const x0 = pl + slot * i, cx = x0 + slot \/ 2, q = sofia(s.t);\n      if (s.p) {\n        const p = s.p, color = hourColor(p, levels), barTop = Math.min(y(p.value), base - 2);\n        const bar = svgEl('path', {d:barPath(x0 + (slot - bw) \/ 2, barTop, bw, base), fill:color}, svg);\n        \/* min\u2013max: dark above the bar (up to the max), white inside it (down to the min) *\/\n        if (isNum(p.max) && p.max > p.value) {\n          svgEl('line', {x1:cx, x2:cx, y1:y(p.max), y2:barTop, stroke:'#0b2e1f', 'stroke-width':1.4, opacity:.55}, svg);\n          svgEl('line', {x1:cx - cap, x2:cx + cap, y1:y(p.max), y2:y(p.max), stroke:'#0b2e1f', 'stroke-width':1.4, opacity:.55, 'stroke-linecap':'round'}, svg);\n        }\n        if (isNum(p.min) && p.min < p.value && y(p.min) - barTop > 3) {\n          svgEl('line', {x1:cx, x2:cx, y1:barTop + 2, y2:y(p.min), stroke:'#fff', 'stroke-width':1.4, opacity:.85}, svg);\n          svgEl('line', {x1:cx - cap, x2:cx + cap, y1:y(p.min), y2:y(p.min), stroke:'#fff', 'stroke-width':1.6, opacity:.9, 'stroke-linecap':'round'}, svg);\n        }\n        const hit = svgEl('rect', {x:x0, y:pt, width:slot, height:ih, fill:'transparent'}, svg);\n        const L = levelByNum(p.level, levels);\n        const lines = [['t-val', fmt1(p.value) + ' ' + unit],\n          ['t-lab', (dayKey(s.t) === dayKey(Date.now()) ? '' : q.day + '.' + q.month + ', ') + T.hourRange(q.hour)]];\n        if (isNum(p.min) || isNum(p.max)) lines.push(['t-lab', T.min + ' ' + fmt1(p.min) + ' \u00b7 ' + T.max + ' ' + fmt1(p.max) + ' ' + unit]);\n        if (isNum(s.limit)) lines.push(['t-lab', T.periods[s.period] + ' \u00b7 ' + T.limitWord + ' ' + fmtN(s.limit) + ' ' + unit]);\n        if (L) lines.push(['t-lvl', L.text, color]);\n        if (p.exceedsLimit === true) lines.push(['t-lvl', T.overLimit]);\n        bindTip(hit, lines, bar);\n      }\n      if (Number(q.hour) % every === 0) svgText(svg, cx, H - 10, T.hourAxis(q.hour), Object.assign({'text-anchor':'middle'}, axis));\n    });\n\n    \/* the limit as a step line that follows the period of each hour *\/\n    const red = levels.length ? levels[levels.length - 1].color : '#b32b52';\n    const runs = [];\n    slots.forEach((s, i) => {\n      const last = runs[runs.length - 1];\n      if (!isNum(s.limit)) return;\n      if (last && last.i1 === i - 1 && last.limit === s.limit && last.period === s.period) last.i1 = i;\n      else runs.push({i0:i, i1:i, limit:s.limit, period:s.period});\n    });\n    let d = '';\n    runs.forEach((r, k) => {\n      const x1 = pl + slot * r.i0, x2 = pl + slot * (r.i1 + 1), yy = y(r.limit), prev = runs[k - 1];\n      d += (prev && prev.i1 === r.i0 - 1 ? 'L' : 'M') + x1 + ' ' + yy + 'H' + x2;\n    });\n    if (d) svgEl('path', {d:d, fill:'none', stroke:red, 'stroke-width':1.8, 'stroke-dasharray':'6 4', 'stroke-linejoin':'round'}, svg);\n    runs.forEach(r => {\n      const w = slot * (r.i1 - r.i0 + 1), text = w >= 92 ? T.periods[r.period] + ' \u00b7 ' + fmtN(r.limit) : (w >= 24 ? fmtN(r.limit) : '');\n      if (!text) return;\n      const t = svgText(svg, pl + slot * r.i0 + 5, y(r.limit) - 7, text,\n        {'font-size':9.5, 'font-weight':800, fill:ink(red), stroke:'#fff', 'stroke-width':3, 'paint-order':'stroke', 'stroke-linejoin':'round'});\n      let b = null; try { b = t.getBBox(); } catch (e) { b = null; }\n      if (b && b.width) svg.insertBefore(svgEl('rect', {x:b.x - 4, y:b.y - 1.5, width:b.width + 8, height:b.height + 3, rx:5, fill:'#fff', opacity:.94}), t);\n    });\n  }\n\n  function renderLegend(n){\n    const lg = byId('gn-legend'); lg.textContent = '';\n    const levels = normLevels(n), hist = (n && n.history) || [];\n    if (!levels.length) return;\n    levels.forEach(L => { const s = document.createElement('span'), i = document.createElement('i');\n      i.style.background = L.color; s.appendChild(i); s.appendChild(document.createTextNode(L.text)); lg.appendChild(s); });\n    const lim = document.createElement('span'), li = document.createElement('i'); li.className = 'ln';\n    li.style.borderTopColor = levels[levels.length - 1].color;\n    lim.appendChild(li); lim.appendChild(document.createTextNode(T.legendLimit)); lg.appendChild(lim);\n    if (hist.some(p => p && (isNum(p.max) || isNum(p.min)))) {\n      const s = document.createElement('span'), g = svgEl('svg', {width:10, height:14, viewBox:'0 0 10 14', 'aria-hidden':'true'});\n      svgEl('path', {d:'M2 1.5H8M5 1.5V12.5M2 12.5H8', stroke:'#0b2e1f', 'stroke-width':1.5, opacity:.6, fill:'none', 'stroke-linecap':'round'}, g);\n      s.appendChild(g); s.appendChild(document.createTextNode(T.legendRange)); lg.appendChild(s);\n    }\n  }\n\n  function renderTable(n){\n    const tb = byId('gn-table'); tb.textContent = '';\n    const levels = normLevels(n), unit = unitOf(n);\n    const hr = tb.createTHead().insertRow();\n    [T.colHour, unit, T.colRange, T.colLimit, T.colLevel].forEach(h => { const th = document.createElement('th'); th.textContent = h; hr.appendChild(th); });\n    const body = tb.createTBody(), today = dayKey(Date.now());\n    const rows = ((n && n.history) || []).filter(p => p && !isNaN(Date.parse(p.time))).sort((a, b) => Date.parse(b.time) - Date.parse(a.time));\n    if (!rows.length) { const c = body.insertRow().insertCell(); c.colSpan = 5; c.textContent = T.noHistory; return; }\n    rows.forEach(p => {\n      const t = Date.parse(p.time), q = sofia(t), r = body.insertRow();\n      r.insertCell().textContent = (dayKey(t) === today ? '' : q.day + '.' + q.month + ', ') + q.hour + ':00';\n      const v = r.insertCell(); v.textContent = fmt1(p.value); if (p.exceedsLimit === true) v.className = 'over';\n      r.insertCell().textContent = isNum(p.min) || isNum(p.max) ? fmt1(p.min) + '\u2013' + fmt1(p.max) : '\u2014';\n      r.insertCell().textContent = isNum(p.limit) ? fmtN(p.limit) + (isPeriod(p.period) ? ' \u00b7 ' + T.periods[p.period] : '') : '\u2014';\n      const c = r.insertCell(), L = levelByNum(p.level, levels);\n      if (L && isNum(p.value)) { const chip = document.createElement('span'), i = document.createElement('i'); chip.className = 'lvl-chip';\n        i.style.background = hourColor(p, levels); chip.appendChild(i); chip.appendChild(document.createTextNode(L.text)); c.appendChild(chip); }\n      else c.textContent = '\u2014';\n    });\n  }\n\n  function renderScale(levels, activeIdx, unit){\n    const ul = byId('gn-scale'); ul.textContent = '';\n    if (!levels.length) { const li = document.createElement('li'); li.className = 'empty'; li.textContent = T.noData; ul.appendChild(li); return; }\n    levels.forEach((L, i) => {\n      const li = document.createElement('li'), dot = document.createElement('i'), name = document.createElement('span'), rng = document.createElement('span');\n      dot.style.background = L.color; name.textContent = L.text; rng.className = 'rng';\n      rng.textContent = L.max == null ? '\u2265 ' + fmtN(L.min) : (L.min <= 0 && i === 0 ? '< ' + fmtN(L.max) : fmtN(L.min) + '\u2013' + fmtN(L.max));\n      li.appendChild(dot); li.appendChild(name);\n      if (i === activeIdx) {\n        li.className = 'on'; li.style.background = soft(L.color); li.style.color = ink(L.color);\n        const now = document.createElement('span'); now.className = 'now'; now.textContent = T.now; li.appendChild(now);\n      }\n      li.appendChild(rng); ul.appendChild(li);\n    });\n  }\n\n  function setStat(id, v, unit){ const el = byId(id); el.textContent = '';\n    if (!isNum(v)) { el.textContent = '\u2014'; return; }\n    el.appendChild(document.createTextNode(fmt1(v))); const s = document.createElement('small'); s.textContent = unit; el.appendChild(s); }\n\n  function renderLimits(n){\n    const box = byId('gn-limits-box'), grid = byId('gn-limits'); grid.textContent = '';\n    const lim = n && n.limits;\n    if (!lim || !PERIODS.some(p => isNum(lim[p]))) { box.hidden = true; return; }\n    box.hidden = false;\n    byId('gn-zone').textContent = (n.zone || '');\n    byId('gn-zone').hidden = !n.zone;\n    const starts = periodStarts(n);\n    PERIODS.forEach(p => {\n      const d = document.createElement('div'), nm = document.createElement('span'), v = document.createElement('span'), rg = document.createElement('span');\n      d.className = 'lim' + (p === n.period ? ' on' : '');\n      nm.className = 'l-name'; nm.textContent = T.periods[p];\n      v.className = 'l-val'; v.textContent = fmtN(lim[p]);\n      rg.className = 'l-rng'; rg.textContent = starts[p] + '\u2013' + starts[nextPeriod(p)];\n      if (p === n.period) { const now = document.createElement('span'); now.className = 'l-now'; now.textContent = T.now; d.appendChild(now); d.setAttribute('aria-current', 'true'); }\n      d.appendChild(nm); d.appendChild(v); d.appendChild(rg); grid.appendChild(d);\n    });\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Alarms (API AlarmDto[], latest first, like \/danni\/radiation\/) \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  \/* The title is the alarm's name on the Senstate platform, written in Bulgarian. On the English page a\n     \"\u0428\u0443\u043c \u043d\u0430\u0434 60 dB(A)\" style name is translated, any other Bulgarian name becomes \"Noise alarm\"\n     (the value and the threshold are shown under it anyway). *\/\n  function alarmTitle(raw){\n    const t = String(raw == null ? '' : raw).trim();\n    if (!t) return T.alarm;\n    if (!EN || !\/[\\u0400-\\u04FF]\/.test(t)) return t;\n    const m = \/^(\u043d\u043e\u0449\u0435\u043d\\s+|\u0434\u043d\u0435\u0432\u0435\u043d\\s+|\u0432\u0435\u0447\u0435\u0440\u0435\u043d\\s+)?\u0448\u0443\u043c\\s+(?:\u043d\u0430\u0434|>)\\s*(\\d+(?:[.,]\\d+)?)\\s*dB\\s*\\(?A\\)?$\/i.exec(t);\n    if (m) { const k = (m[1] || '').trim().toLowerCase();\n      return (k === '\u043d\u043e\u0449\u0435\u043d' ? 'Night noise' : k === '\u0434\u043d\u0435\u0432\u0435\u043d' ? 'Daytime noise' : k === '\u0432\u0435\u0447\u0435\u0440\u0435\u043d' ? 'Evening noise' : 'Noise') + ' above ' + m[2].replace(',', '.') + ' dB(A)'; }\n    return T.alarmNoise;\n  }\n  function renderAlarms(alarms){\n    const list = byId('gn-alarm-list'); list.textContent = '';\n    \/* null = not known (data could not be loaded): no card, rather than a wrong \"no alarms\" *\/\n    const known = Array.isArray(alarms);\n    const rows = known ? alarms.filter(a => a && typeof a === 'object').slice(0, 3) : [];\n    \/* otherwise the card is always shown, like on the radiation page: with no alarms it says so *\/\n    byId('gn-alarms').hidden = !known; byId('gn-chip-alarms').hidden = !known;\n    if (!known) return;\n    if (!rows.length) {\n      const d = document.createElement('div'); d.className = 'alarm-empty';\n      const ring = document.createElement('span'); ring.className = 'ok-ring';\n      const g = svgEl('svg', {width:24, height:24, viewBox:'0 0 24 24', fill:'none', 'aria-hidden':'true'}, ring);\n      svgEl('path', {d:'M5 13l4 4L19 7', stroke:'currentColor', 'stroke-width':2.4, 'stroke-linecap':'round', 'stroke-linejoin':'round'}, g);\n      const p = document.createElement('p'); p.textContent = T.noAlarms;\n      d.appendChild(ring); d.appendChild(p); list.appendChild(d);\n      return;\n    }\n    const seen = new Set();\n    rows.forEach((a, index) => {\n      const ruleId = a.id != null ? String(a.id) : 'missing-' + index;\n      const showActive = a.active === true && !seen.has(ruleId); seen.add(ruleId);\n      const unit = String(a.thresholdUnit || '').trim(), u = unit ? ' ' + unit : '';\n      const measurement = isNum(a.value) && isNum(a.threshold) ? fmtN(a.value) + u + ' ' + T.atThreshold + ' ' + fmtN(a.threshold) + u : '';\n      const meta = [measurement, fmtAlarmTime(a.triggeredAt)].filter(Boolean).join(' \u00b7 ');\n      const el = document.createElement('div'); el.className = 'alarm';\n      const ico = document.createElement('span'); ico.className = 'a-ico' + (showActive ? ' on' : '');\n      const g = svgEl('svg', {width:19, height:19, viewBox:'0 0 24 24', fill:'none', 'aria-hidden':'true'}, ico);\n      svgEl('path', {d:'M12 4a5.5 5.5 0 0 0-5.5 5.5c0 4-1.6 5.4-2.5 6.2h16c-.9-.8-2.5-2.2-2.5-6.2A5.5 5.5 0 0 0 12 4Z', stroke:'currentColor', 'stroke-width':1.8, 'stroke-linejoin':'round'}, g);\n      svgEl('path', {d:'M10 19a2 2 0 0 0 4 0', stroke:'currentColor', 'stroke-width':1.8, 'stroke-linecap':'round'}, g);\n      const body = document.createElement('div'); body.className = 'a-body';\n      const title = document.createElement('div'); title.className = 'a-title'; title.textContent = alarmTitle(a.title);\n      if (showActive) { const b = document.createElement('span'); b.className = 'a-badge'; b.textContent = T.active; title.appendChild(document.createTextNode(' ')); title.appendChild(b); }\n      body.appendChild(title);\n      if (meta) { const m = document.createElement('div'); m.className = 'a-meta'; m.textContent = meta; body.appendChild(m); }\n      el.appendChild(ico); el.appendChild(body); list.appendChild(el);\n    });\n  }\n\n  function setPill(text, color){\n    const pill = byId('gn-pill');\n    pill.style.background = color ? soft(color) : ''; pill.style.color = color ? ink(color) : '';\n    pill.querySelector('.dot').style.background = color || '';\n    byId('gn-level').textContent = text;\n  }\n  function setNote(text, cls){ const n = byId('gn-note'); n.className = 'status-note' + (cls ? ' ' + cls : ''); n.textContent = text || ''; n.hidden = !text; }\n  function setPeriod(n){\n    const box = byId('gn-period');\n    if (!n || !isNum(n.limit) || !(n.periodText || isPeriod(n.period))) { box.hidden = true; return; }\n    byId('gn-period-text').textContent = T.periodNow(String(n.periodText || T.periods[n.period]), String(n.periodRange || ''), fmtN(n.limit));\n    box.hidden = false;\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Station selector (hidden chevron when there is only one station) \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  let roster = [];\n  function renderRoster(data){\n    const st = data.station, sel = byId('gn-station'), loc = byId('gn-loc');\n    roster = [{token:st.token, name:st.name}].concat((Array.isArray(data.stations) ? data.stations : [])\n      .filter(o => o && o.token && o.token !== st.token).map(o => ({token:String(o.token), name:o.name})));\n    roster.sort((a, b) => String(a.name).localeCompare(String(b.name), LOCALE));\n    sel.textContent = '';\n    roster.forEach(o => { const op = document.createElement('option'); op.value = o.token; op.textContent = o.name || o.token; sel.appendChild(op); });\n    sel.value = st.token;\n    const single = roster.length < 2; sel.disabled = single; loc.classList.toggle('single', single); loc.hidden = false;\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Main render \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  let lastData = null;\n  function renderCharts(data){ renderChart24(data && data.station ? data.station.noise : null); }\n\n  function render(data){\n    const st = data.station, n = st.noise && typeof st.noise === 'object' ? st.noise : null;\n    const levels = normLevels(n), unit = unitOf(n);\n    lastData = data; currentToken = st.token;\n    if (tokenFromUrl() !== st.token) { try { history.replaceState(history.state, '', '#' + encodeURIComponent(st.token)); } catch (e) { \/* ignore *\/ } }\n    renderRoster(data);\n    byId('gn-crumb-station').textContent = st.name || '\u2014';\n    byId('gn-updated').textContent = (n && n.measuredAt ? fmtDateTime(n.measuredAt) : '\u2014') + (st.active ? '' : T.offlineTag);\n\n    const val = n && st.active && isNum(n.value) ? n.value : null;\n    byId('gn-val').textContent = fmt1(val);\n    byId('gn-unit').textContent = unit;\n\n    let activeIdx = -1;\n    if (val != null && levels.length) {\n      const byNum = isNum(n.level) ? levels.findIndex(L => L.level === n.level) : -1;\n      activeIdx = byNum >= 0 ? byNum : levelIndexOf(val, levels);\n    }\n    renderGauge(val, levels, activeIdx, unit);\n\n    const hasLevel = val != null && !!n.levelText;\n    if (hasLevel) setPill(String(n.levelText), safeColor(n.color || (levels[activeIdx] || {}).color));\n    else setPill(!n ? T.noData : (!st.active ? T.noCurrent : T.noValue), null);\n    byId('gn-reco').textContent = hasLevel ? String(n.recommendation || '') : '';\n\n    if (!n) setNote(T.never, 'muted');\n    else if (!st.active) setNote(T.offline, '');\n    else if (val != null && n.exceedsLimit === true) setNote(String(n.exceedText || T.overLimit).replace(\/(\\d) (?=dB)\/g, '$1\u00a0'), 'bad');\n    else setNote('', '');\n    setPeriod(n);\n\n    const sub = byId('gn-scale-sub');\n    sub.textContent = n && isPeriod(n.period) ? T.scaleSubFor(T.periods[n.period]) : T.scaleSub;\n    renderScale(levels, activeIdx, unit);\n    setStat('gn-max', val != null ? n.max : null, unit);\n    setStat('gn-min', val != null ? n.min : null, unit);\n    renderLimits(n);\n\n    renderAlarms(st.alarms);\n    renderLegend(n);\n    renderCharts(data);\n    renderTable(n);\n  }\n\n  function setLoading(){ byId('gn-val').textContent = '\u2026'; byId('gn-updated').textContent = T.loading; }\n\n  function showError(noSensor){\n    lastData = null;\n    byId('gn-val').textContent = '\u2014';\n    byId('gn-updated').textContent = T.updatedErr;\n    setPill(T.noData, null);\n    byId('gn-reco').textContent = '';\n    setNote(noSensor ? T.noSensor : T.error, 'bad');\n    setPeriod(null);\n    renderGauge(null, [], -1, 'dB(A)'); renderScale([], -1, 'dB(A)');\n    byId('gn-scale-sub').textContent = T.scaleSub;\n    setStat('gn-max', null); setStat('gn-min', null); renderLimits(null);\n    byId('gn-legend').textContent = '';\n    byId('gn-chart24').textContent = ''; byId('gn-chart24').appendChild(emptyNote(T.noData));\n    renderTable(null); renderAlarms(null);\n    if (!roster.length) { byId('gn-loc').hidden = true; byId('gn-crumb-station').textContent = '\u2014'; }\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Loading \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  \/* A request that hangs is given up after 30 s (otherwise the page would say \"loading\u2026\" forever). *\/\n  async function getJSON(url){\n    const ctl = typeof AbortController === 'function' ? new AbortController() : null;\n    const tm = ctl ? setTimeout(() => ctl.abort(), 30e3) : 0;\n    try {\n      const r = await fetch(url, ctl ? {headers:{Accept:'application\/json'}, signal:ctl.signal} : {headers:{Accept:'application\/json'}});\n      if (!r.ok) { const e = new Error('HTTP ' + r.status + ' ' + url); e.status = r.status; throw e; }\n      return await r.json();\n    } finally { clearTimeout(tm); }\n  }\n  const detailUrl = t => API_BASE + '\/detaileddata\/noise?token=' + encodeURIComponent(t) + '&lang=' + LANG;\n  const isMissing = e => !!e && (e.status === 404 || e.status === 400);\n\n  \/* An unknown token falls back to the default station, then to the first online one (like the other pages). *\/\n  async function fetchDetail(token){\n    try { return await getJSON(detailUrl(token)); }\n    catch (e) {\n      if (!isMissing(e)) throw e;\n      if (token !== BOOTSTRAP_TOKEN) {\n        try { return await getJSON(detailUrl(BOOTSTRAP_TOKEN)); } catch (e2) { if (!isMissing(e2)) throw e2; }\n      }\n      const list = await getJSON(API_BASE + '\/noise?lang=' + LANG);\n      const first = Array.isArray(list) && list.length && list[0] ? list[0].deviceToken : null;\n      if (!first || first === token || first === BOOTSTRAP_TOKEN) { const n = new Error('no noise station'); n.noSensor = true; throw n; }\n      return getJSON(detailUrl(first));\n    }\n  }\n\n  function tokenFromUrl(){\n    let t = '';\n    try { t = decodeURIComponent((location.hash || '').replace(\/^#\/, '')); } catch (e) { t = ''; }\n    if (!t) { try { t = new URLSearchParams(location.search).get('token') || ''; } catch (e) { t = ''; } }\n    t = t.trim();\n    return \/^[A-Za-z0-9_-]{1,64}$\/.test(t) ? t : null;\n  }\n\n  \/* retryToken: the station whose load failed with nothing on screen; the minute timer retries it\n     (also when the very first load fails, before any station was shown). *\/\n  let currentToken = null, retryToken = null, seq = 0, busy = false, lastLoad = 0;\n  async function load(token, quiet){\n    const my = ++seq;\n    if (!quiet) { busy = true; setLoading(); }\n    try {\n      const data = await fetchDetail(token);\n      if (my !== seq || !root.isConnected) return;\n      if (!data || !data.station || !data.station.token) throw new Error('unexpected response');\n      lastLoad = Date.now(); retryToken = null;\n      render(data);\n    } catch (err) {\n      if (my !== seq) return;\n      console.warn('[Green Gabrovo \u00b7 noise]', err);\n      if (quiet && lastData) return;   \/\/ a failed background refresh keeps the last good data\n      retryToken = token;\n      showError(!!(err && err.noSensor));\n    } finally {\n      if (my === seq) busy = false;\n    }\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Wiring \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  byId('gn-station').addEventListener('change', e => {\n    const t = e.target.value;\n    try { history.replaceState(history.state, '', '#' + encodeURIComponent(t)); } catch (err) { \/* ignore *\/ }\n    load(t, false);\n  });\n  window.addEventListener('hashchange', () => {\n    if (!root.isConnected) return;\n    const t = tokenFromUrl();\n    \/* react only to station tokens, not to other in-page anchors (e.g. the theme's \"skip to content\") *\/\n    if (t && t !== currentToken && (!roster.length || roster.some(o => o.token === t))) load(t, false);\n  });\n  root.querySelectorAll('[data-go]').forEach(b => b.addEventListener('click', () => {\n    const target = byId(b.getAttribute('data-go'));\n    if (target) target.scrollIntoView({behavior:'smooth', block:'start'});\n  }));\n  function setView(table){\n    byId('gn-btn-chart').classList.toggle('on', !table); byId('gn-btn-chart').setAttribute('aria-pressed', String(!table));\n    byId('gn-btn-table').classList.toggle('on', table); byId('gn-btn-table').setAttribute('aria-pressed', String(table));\n    byId('gn-chart24').hidden = table; byId('gn-table-wrap').hidden = !table;\n    if (!table && lastData) renderCharts(lastData);\n  }\n  byId('gn-btn-chart').addEventListener('click', () => setView(false));\n  byId('gn-btn-table').addEventListener('click', () => setView(true));\n\n  \/* The chart is drawn at its real width (readable axis text on phones): redraw when it changes. *\/\n  let rt = 0;\n  const redraw = () => { clearTimeout(rt); rt = setTimeout(() => { if (lastData && root.isConnected) renderCharts(lastData); }, 120); };\n  if ('ResizeObserver' in window) {\n    const widths = new WeakMap();\n    const ro = new ResizeObserver(entries => {\n      let changed = false;\n      entries.forEach(en => { const w = Math.round(en.contentRect.width), h = Math.round(en.contentRect.height),\n          key = en.target.id === 'gn-chart24' ? w : w * 10000 + h;   \/\/ the chart: its width; the side cards: their size\n        if (w > 0 && Math.abs((widths.get(en.target) || 0) - key) > 2) { widths.set(en.target, key); changed = true; } });\n      if (changed) redraw();\n    });\n    ro.observe(byId('gn-chart24')); ro.observe(byId('gn-about')); ro.observe(byId('gn-alarms'));\n  } else {\n    let lastW = window.innerWidth;\n    window.addEventListener('resize', () => { if (window.innerWidth !== lastW) { lastW = window.innerWidth; redraw(); } });\n  }\n\n  \/* Refresh every minute while the tab is visible. *\/\n  const timer = setInterval(() => {\n    if (!root.isConnected) { clearInterval(timer); return; }\n    const t = retryToken || currentToken;\n    if (document.visibilityState === 'visible' && t && !busy) load(t, true);\n  }, 60e3);\n  document.addEventListener('visibilitychange', () => {\n    const t = retryToken || currentToken;\n    if (root.isConnected && document.visibilityState === 'visible' && t && !busy && Date.now() - lastLoad > 60e3) load(t, true);\n  });\n\n  load(tokenFromUrl() || BOOTSTRAP_TOKEN, false);\n}\n\nif (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', boot);\nelse boot();\n})();\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u203a \u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c\u203a \u2013 \u0414\u0430\u043d\u043d\u0438 \u0432 \u0440\u0435\u0430\u043b\u043d\u043e \u0432\u0440\u0435\u043c\u0435 \u0424\u043e\u043d\u043e\u0432 \u0448\u0443\u043c \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0435: \u2013 \u2013 dB(A) \u0421\u0440\u0435\u0434\u043d\u043e \u043d\u0438\u0432\u043e \u043d\u0430 \u0448\u0443\u043c\u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043c\u0438\u043d\u0443\u0442\u0430 \u2013 \u0428\u0443\u043c \u2014 24 \u0447. \u0410\u043b\u0430\u0440\u043c\u0438 \u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e \u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0448\u0443\u043c\u0430 \u041d\u0438\u0432\u0430 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434, dB(A) \u041c\u0430\u043a\u0441. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430\u2014 \u041c\u0438\u043d. \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0430\u0442\u0430\u2014 \u0413\u0440\u0430\u043d\u0438\u0447\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0437\u043e\u043d\u0430\u0442\u0430, dB(A) \u0428\u0443\u043c \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 24 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":821,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2348","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/comments?post=2348"}],"version-history":[{"count":3,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2348\/revisions"}],"predecessor-version":[{"id":2351,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2348\/revisions\/2351"}],"up":[{"embeddable":true,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/821"}],"wp:attachment":[{"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/media?parent=2348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}