{"id":2330,"date":"2026-11-26T16:34:39","date_gmt":"2026-11-26T14:34:39","guid":{"rendered":"https:\/\/greengabrovo.com\/?page_id=2330"},"modified":"2026-11-26T16:35:14","modified_gmt":"2026-11-26T14:35:14","slug":"snow","status":"publish","type":"page","link":"https:\/\/greengabrovo.com\/en\/danni\/snow\/","title":{"rendered":"Snow cover"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2330\" class=\"elementor elementor-2330\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7624cf6 e-flex e-con-boxed e-con e-parent\" data-id=\"7624cf6\" 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-c97fc7c elementor-widget elementor-widget-html\" data-id=\"c97fc7c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!--\n  GREEN GABROVO \u00b7 SNOW PAGE (\u201e\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430\")\n\n  What this is: the whole snow-depth page (current depth, scale, last 24 hours, last 7 days),\n  built like \/danni\/radiation\/ and the other data pages, so they look and behave the same.\n\n  How to use it: in wp-admin create a NEW page \"\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430\" under \"\u0414\u0430\u043d\u043d\u0438\" with the\n  slug \"snow\" (so the address is \/danni\/snow\/), open it with Elementor, add ONE \"HTML\" widget\n  and paste this whole file into it. Publish. Nothing in the code needs to be changed.\n  The English page \/en\/danni\/snow\/ 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\/snow\/. \u041d\u0438\u0449\u043e \u043d\u0435 \u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u043d\u044f.\n\n  The data comes from https:\/\/api.greengabrovo.com (the snow endpoints must be deployed there\n  first). Another sensor can be opened with #<sensor id> at the end of the address, like the\n  other data pages. The lora.gabrovo.bg token is NOT here and must never be: it stays on the API server.\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-snow-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-snow-live,#gg-snow-live *{box-sizing:border-box;margin:0;padding:0;min-width:0}\n#gg-snow-live [hidden]{display:none!important}\n#gg-snow-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-snow-live button,#gg-snow-live select,#gg-snow-live table{font:inherit}\n#gg-snow-live button{border:0;background:none;color:inherit;cursor:pointer;text-transform:none;letter-spacing:inherit;border-radius:0}\n#gg-snow-live svg{max-width:100%}\n#gg-snow-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-snow-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-snow-live .crumbs a{color:var(--muted)}\n#gg-snow-live .crumbs a:hover{color:var(--green-800)}\n#gg-snow-live .crumbs .sep{opacity:.55}\n#gg-snow-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-snow-live .row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:20px;align-items:stretch;width:100%}\n#gg-snow-live .card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid rgba(18,43,29,.05)}\n#gg-snow-live .col-stack{display:flex;flex-direction:column;gap:20px}\n#gg-snow-live #gs-history,#gg-snow-live #gs-days{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-snow-live .hero{margin-top:16px}\n#gg-snow-live .hero-card{padding:28px 32px;display:flex;flex-direction:column}\n#gg-snow-live .eyebrow{font-size:.75rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--brand)}\n#gg-snow-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-snow-live .loc-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}\n#gg-snow-live .loc-select{position:relative;display:inline-flex;align-items:center;max-width:100%}\n#gg-snow-live .loc-select svg.pin{position:absolute;left:14px;pointer-events:none;color:var(--green-800)}\n#gg-snow-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-snow-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-snow-live .loc-select.single:after{display:none}\n#gg-snow-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-snow-live .updated{font-size:.8rem;color:var(--muted);font-weight:600}\n#gg-snow-live .updated b{color:var(--text);font-weight:800}\n\n#gg-snow-live .hero-main{display:flex;align-items:center;gap:24px;margin-top:26px;flex-wrap:wrap}\n#gg-snow-live .hero-main>div:first-child{flex:1 1 220px}\n#gg-snow-live .hero-figure{display:flex;align-items:baseline;gap:10px}\n#gg-snow-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-snow-live .hero-figure .of{font-size:1.15rem;color:var(--muted);font-weight:700}\n#gg-snow-live .idx-name{display:block;font-size:.95rem;line-height:1.5;color:var(--text);font-weight:400;margin-top:6px}\n#gg-snow-live .gauge-wrap{flex:0 1 190px;width:190px}\n#gg-snow-live .gauge-wrap svg{display:block;width:100%;height:auto}\n#gg-snow-live .hero-status{flex:1 1 220px;min-width:0}\n#gg-snow-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-snow-live .level-pill .dot{width:10px;height:10px;border-radius:50%;flex:none;background:#b7c1ba}\n#gg-snow-live .recommend{margin-top:12px;font-size:.95rem;line-height:1.55;color:var(--text);max-width:420px}\n#gg-snow-live .recommend:empty{display:none}\n#gg-snow-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-snow-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-snow-live .status-note.bad{--note:var(--bad);background:var(--bad-soft)}\n#gg-snow-live .status-note.muted{--note:#5f6d64;background:#eef1ef}\n#gg-snow-live .hero-foot{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap}\n#gg-snow-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-snow-live .chip-nav:hover,#gg-snow-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-snow-live .side-card{padding:24px;display:flex;flex-direction:column}\n#gg-snow-live .side-card h3,#gg-snow-live .chart-card h3,#gg-snow-live .fact-card h3{font-family:inherit;font-size:1.02rem;line-height:1.3;color:var(--green-900);font-weight:900}\n#gg-snow-live .c-sub{font-size:.78rem;color:var(--muted);font-weight:600;margin-top:2px;line-height:1.4}\n#gg-snow-live .scale-list{list-style:none;display:flex;flex-direction:column;gap:4px;margin:14px 0 0}\n#gg-snow-live .scale-list li{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;font-size:.85rem;font-weight:700;color:var(--text);line-height:1.3}\n#gg-snow-live .scale-list li i{width:10px;height:10px;border-radius:50%;flex:none}\n#gg-snow-live .scale-list li .rng{margin-left:auto;color:var(--muted);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}\n#gg-snow-live .scale-list li.on{font-weight:900}\n#gg-snow-live .scale-list li.on .rng{color:inherit}\n#gg-snow-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-snow-live .scale-list li.empty{color:var(--muted);font-weight:600}\n#gg-snow-live .stat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:auto;padding-top:16px}\n#gg-snow-live .stat{background:var(--page);border:1px solid var(--hairline);border-radius:var(--radius-sm);padding:12px 14px}\n#gg-snow-live .stat .s-lab{display:block;font-size:.72rem;font-weight:800;color:var(--muted)}\n#gg-snow-live .stat .s-val{display:flex;align-items:center;gap:7px;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-snow-live .stat .s-val.txt{font-size:.86rem}\n#gg-snow-live .stat .s-val i{width:9px;height:9px;border-radius:50%;flex:none}\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-snow-live .chart-card{padding:24px 26px;display:flex;flex-direction:column}\n#gg-snow-live .chart-card .c-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;margin-bottom:6px}\n#gg-snow-live .chart-card .c-head>div:first-child{flex:1 1 180px}\n#gg-snow-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-snow-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-snow-live .view-toggle button:hover{background:transparent;color:var(--green-900)}\n#gg-snow-live .view-toggle button.on{background:#fff;color:var(--green-900);box-shadow:var(--shadow)}\n#gg-snow-live .legend{display:flex;gap:8px 16px;flex-wrap:wrap;margin:8px 0 14px}\n#gg-snow-live .legend span{display:inline-flex;align-items:center;gap:7px;font-size:.78rem;font-weight:700;color:var(--text)}\n#gg-snow-live .legend i{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}\n#gg-snow-live .chart-holder{position:relative;width:100%}\n#gg-snow-live .chart-holder svg{display:block;width:100%;height:auto;overflow:visible}\n#gg-snow-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-snow-live .tbl-scroll{width:100%;max-height:300px;overflow:auto;border:1px solid var(--hairline);border-radius:12px;padding:0 4px}\n#gg-snow-live table.data-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:.8rem;margin:8px 0 0}\n#gg-snow-live table.data-table th,#gg-snow-live table.data-table td{border:0;background:none;vertical-align:middle;line-height:1.45}\n#gg-snow-live table.data-table th{text-align:left;color:var(--muted);font-weight:800;padding:6px 8px;border-bottom:1px solid var(--hairline)}\n#gg-snow-live table.data-table td{padding:5px 8px;border-bottom:1px solid var(--grid);font-variant-numeric:tabular-nums;color:var(--text)}\n#gg-snow-live table.data-table tr:hover>td{background:none}\n#gg-snow-live table.data-table .lvl-chip{display:inline-flex;align-items:center;gap:6px;font-weight:700}\n#gg-snow-live table.data-table .lvl-chip i{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}\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-snow-live .fact-card{padding:20px 22px;background:linear-gradient(135deg,#f6fbf7 0%,#ffffff 60%)}\n#gg-snow-live .fact-card .f-head{display:flex;align-items:center;gap:10px}\n#gg-snow-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-snow-live .fact-card h3{flex:1}\n#gg-snow-live .fact-text{font-size:.88rem;line-height:1.6;color:var(--text);margin-top:10px}\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-snow-live #gs-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:240px}\n#gg-snow-live #gs-tip .t-val{font-size:.95rem;font-weight:900}\n#gg-snow-live #gs-tip .t-lab{opacity:.75;font-weight:600}\n#gg-snow-live #gs-tip .t-lvl{display:flex;align-items:center;gap:6px;margin-top:2px}\n#gg-snow-live #gs-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-snow-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-snow-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-snow-live .src-strip .lnk{margin-left:auto;color:var(--green-800);font-weight:800;white-space:normal}\n#gg-snow-live .src-strip .lnk:hover{text-decoration:underline}\n\n@media(max-width:1100px){\n  #gg-snow-live .row{grid-template-columns:minmax(0,1fr)}\n}\n@media(max-width:650px){\n  #gg-snow-live .hero-card{padding:24px 20px}\n  #gg-snow-live .chart-card,#gg-snow-live .side-card{padding:20px}\n  #gg-snow-live .fact-card{padding:18px}\n  #gg-snow-live .loc-row{align-items:stretch}\n  #gg-snow-live .loc-select{display:flex;width:100%}\n  #gg-snow-live .loc-select select{width:100%;min-width:0}\n  #gg-snow-live .hero-main{gap:20px}\n  #gg-snow-live .hero-status{flex:1 1 100%;width:100%}\n  #gg-snow-live .hero-figure .val{font-size:clamp(2.8rem,15vw,4.4rem)}\n  #gg-snow-live .gauge-wrap{width:min(190px,100%)}\n  #gg-snow-live .chart-card .c-head{flex-direction:column;align-items:stretch}\n  #gg-snow-live .chart-card .c-head>div:first-child{flex-basis:auto}\n  #gg-snow-live .view-toggle{margin-left:0;align-self:flex-start}\n  #gg-snow-live .src-strip{align-items:flex-start}\n  #gg-snow-live .src-strip .lnk{width:100%;margin-left:0}\n}\n@media(max-width:380px){\n  #gg-snow-live .hero-card,#gg-snow-live .chart-card,#gg-snow-live .side-card{padding:18px 16px}\n  #gg-snow-live .fact-card{padding:16px}\n  #gg-snow-live .hero-main{gap:16px}\n  #gg-snow-live .hero-foot{gap:7px}\n  #gg-snow-live .chip-nav{padding:6px 10px}\n  #gg-snow-live .stat-row{grid-template-columns:minmax(0,1fr)}\n}\n\n\/* \u2500\u2500 Elementor page integration (same as the other data pages) \u2500\u2500 *\/\nbody:has(#gg-snow-live){background:#f5f8f4;--page-title-display:none}\nbody:has(#gg-snow-live) .e-con:has(#gg-snow-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-snow-live) .elementor-widget-html:has(#gg-snow-live){width:100%;max-width:100%;min-width:0}\n#gg-snow-live{width:100%!important;max-width:none!important;margin:0!important;padding:0 0 48px!important}\n<\/style>\n<div id=\"gg-snow-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\">\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430<\/span><span class=\"sep\">\u203a<\/span>\n    <span class=\"here\" id=\"gs-crumb-station\">\u2013<\/span>\n  <\/div>\n\n  <!-- \u2500\u2500 HERO: current depth + scale \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\">\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430<\/h1>\n      <div class=\"loc-row\">\n        <label class=\"loc-select\" id=\"gs-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=\"gs-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=\"gs-updated\">\u2013<\/b><\/span>\n      <\/div>\n\n      <div class=\"hero-main\">\n        <div>\n          <div class=\"hero-figure\">\n            <span class=\"val\" id=\"gs-val\">\u2013<\/span>\n            <span class=\"of\" id=\"gs-unit\">cm<\/span>\n          <\/div>\n          <span class=\"idx-name\" data-t=\"idxName\">\u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430<\/span>\n        <\/div>\n        <div class=\"gauge-wrap\"><svg id=\"gs-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=\"gs-pill\"><span class=\"dot\"><\/span><span id=\"gs-level\">\u2013<\/span><\/span>\n          <p class=\"recommend\" id=\"gs-reco\"><\/p>\n          <p class=\"status-note\" id=\"gs-note\" role=\"status\" hidden><\/p>\n        <\/div>\n      <\/div>\n\n      <div class=\"hero-foot\">\n        <button type=\"button\" class=\"chip-nav\" data-go=\"gs-history\" data-t=\"chip24\">\u0421\u043d\u044f\u0433 \u2014 24 \u0447.<\/button>\n        <button type=\"button\" class=\"chip-nav\" data-go=\"gs-days\" data-t=\"chip7\">\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 7 \u0434\u043d\u0438<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"card side-card\">\n      <h3 data-t=\"scaleTitle\">\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430<\/h3>\n      <div class=\"c-sub\" data-t=\"scaleSub\">\u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438<\/div>\n      <ul class=\"scale-list\" id=\"gs-scale\"><\/ul>\n      <div class=\"stat-row\">\n        <div class=\"stat\"><span class=\"s-lab\" data-t=\"change\">\u041f\u0440\u043e\u043c\u044f\u043d\u0430 \u0437\u0430 24 \u0447.<\/span><span class=\"s-val\" id=\"gs-change\">\u2014<\/span><\/div>\n        <div class=\"stat\"><span class=\"s-lab\" data-t=\"sensor\">\u0421\u0435\u043d\u0437\u043e\u0440<\/span><span class=\"s-val txt\" id=\"gs-status\">\u2014<\/span><\/div>\n      <\/div>\n    <\/div>\n  <\/section>\n\n  <!-- \u2500\u2500 Last 24 hours + last 7 days \u2500\u2500 -->\n  <section class=\"row\" id=\"gs-history\" style=\"margin-top:20px\">\n    <div class=\"card chart-card\">\n      <div class=\"c-head\">\n        <div>\n          <h3 data-t=\"h24\">\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \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\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u0435 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438<\/div>\n        <\/div>\n        <div class=\"view-toggle\">\n          <button type=\"button\" class=\"on\" id=\"gs-btn-chart\" aria-pressed=\"true\" data-t=\"chart\">\u0413\u0440\u0430\u0444\u0438\u043a\u0430<\/button>\n          <button type=\"button\" id=\"gs-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=\"gs-legend\"><\/div>\n      <div class=\"chart-holder\" id=\"gs-chart24\"><\/div>\n      <div class=\"tbl-scroll\" id=\"gs-table-wrap\" hidden>\n        <table class=\"data-table\" id=\"gs-table\"><\/table>\n      <\/div>\n    <\/div>\n\n    <div class=\"col-stack\">\n      <div class=\"card chart-card\" id=\"gs-days\">\n        <div class=\"c-head\">\n          <div>\n            <h3 data-t=\"h7\">\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 7 \u0434\u043d\u0438<\/h3>\n            <div class=\"c-sub\" data-t=\"sub7\">\u0421\u0442\u044a\u043b\u0431\u044a\u0442 \u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044a\u0442 \u0437\u0430 \u0434\u0435\u043d\u044f, \u0431\u044f\u043b\u0430\u0442\u0430 \u0447\u0435\u0440\u0442\u0430 \u2014 \u0441\u0440\u0435\u0434\u043d\u0430\u0442\u0430 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442<\/div>\n          <\/div>\n        <\/div>\n        <div class=\"chart-holder\" id=\"gs-chart7\"><\/div>\n      <\/div>\n\n      <div class=\"card fact-card\">\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=\"about\">\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0435 \u0438\u0437\u0433\u043b\u0430\u0434\u0435\u043d\u0430 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 10 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u043d\u0437\u043e\u0440\u0430 (\u0431\u0435\u0437 \u043d\u0430\u0439-\u0432\u0438\u0441\u043e\u043a\u043e\u0442\u043e \u0438 \u043d\u0430\u0439-\u043d\u0438\u0441\u043a\u043e\u0442\u043e). \u041a\u0430\u043b\u0438\u0431\u0440\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0441\u0435\u043d\u0437\u043e\u0440\u0430 \u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u0430 \u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438\u0442\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0430\u0442 \u043a\u043e\u0440\u0438\u0433\u0438\u0440\u0430\u043d\u0438.<\/p>\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=\"gs-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 = '00000001';                  \/\/ sensor shown when the address has no #token\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-snow-live');\n  if (!root || root.getAttribute('data-gs-ready')) return;\n  root.setAttribute('data-gs-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:'Snow cover', eyebrow:'Real-time data',\n    selectAria:'Monitoring-point selector', updated:'Last updated:',\n    idxName:'Snow depth', gaugeAria:'Snow depth scale',\n    chip24:'Snow \u2014 24 h', chip7:'Last 7 days',\n    scaleTitle:'Snow cover scale', scaleSub:'Depth in centimetres', now:'now',\n    change:'24 h change', sensor:'Sensor',\n    h24:'Snow cover \u2014 last 24 hours', sub24:'Hourly averages in centimetres',\n    chart:'Chart', table:'Table', aria24:'24-hour snow depth bar chart',\n    h7:'Last 7 days', sub7:'The bar is the daily maximum, the white line the daily average', aria7:'Daily maximum snow depth bar chart',\n    aboutTitle:'About the measurement',\n    about:'The value is smoothed over the sensor\u2019s last 10 measurements (the highest and the lowest are left out). The sensor calibration is preliminary and the values may be corrected.',\n    src:'Data is updated every minute \u00b7 Sources: Gabrovo Municipality, Senstate', more:'Useful information \u2192',\n    colHour:'Time', 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    today:'Today', max:'max', avg:'avg', min:'min', from:'from',\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 sensor has not reported in the last 6 hours.', never:'The sensor has not reported any data yet.',\n    statusOk:'Normal operation', statusOffline:'Not reporting',\n    aboveHint:'The value is shown but may be inaccurate.',\n    faultHint:'The value is hidden until the sensor reports a valid measurement.',\n    error:'The snow data cannot be loaded right now. The page will try again in a minute.',\n    updatedErr:'error while loading data', noSensor:'No snow sensor is available.'\n  } : {\n    crumbHome:'\u0414\u0430\u043d\u043d\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438', title:'\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430', 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:'\u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430', gaugeAria:'\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0434\u0435\u0431\u0435\u043b\u0438\u043d\u0430\u0442\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430',\n    chip24:'\u0421\u043d\u044f\u0433 \u2014 24 \u0447.', chip7:'\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 7 \u0434\u043d\u0438',\n    scaleTitle:'\u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430', scaleSub:'\u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438', now:'\u0441\u0435\u0433\u0430',\n    change:'\u041f\u0440\u043e\u043c\u044f\u043d\u0430 \u0437\u0430 24 \u0447.', sensor:'\u0421\u0435\u043d\u0437\u043e\u0440',\n    h24:'\u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 24 \u0447\u0430\u0441\u0430', sub24:'\u0421\u0440\u0435\u0434\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u0435 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438',\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 \u0434\u0435\u0431\u0435\u043b\u0438\u043d\u0430\u0442\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u0437\u0430 24 \u0447\u0430\u0441\u0430',\n    h7:'\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 7 \u0434\u043d\u0438', sub7:'\u0421\u0442\u044a\u043b\u0431\u044a\u0442 \u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044a\u0442 \u0437\u0430 \u0434\u0435\u043d\u044f, \u0431\u044f\u043b\u0430\u0442\u0430 \u0447\u0435\u0440\u0442\u0430 \u2014 \u0441\u0440\u0435\u0434\u043d\u0430\u0442\u0430 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442', aria7:'\u0411\u0430\u0440\u043e\u0432\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0434\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u043f\u043e \u0434\u043d\u0438',\n    aboutTitle:'\u0417\u0430 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435\u0442\u043e',\n    about:'\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0435 \u0438\u0437\u0433\u043b\u0430\u0434\u0435\u043d\u0430 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 10 \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u043d\u0437\u043e\u0440\u0430 (\u0431\u0435\u0437 \u043d\u0430\u0439-\u0432\u0438\u0441\u043e\u043a\u043e\u0442\u043e \u0438 \u043d\u0430\u0439-\u043d\u0438\u0441\u043a\u043e\u0442\u043e). \u041a\u0430\u043b\u0438\u0431\u0440\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0441\u0435\u043d\u0437\u043e\u0440\u0430 \u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u0430 \u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438\u0442\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0430\u0442 \u043a\u043e\u0440\u0438\u0433\u0438\u0440\u0430\u043d\u0438.',\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', 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    today:'\u0414\u043d\u0435\u0441', max:'\u043c\u0430\u043a\u0441.', avg:'\u0441\u0440.', min:'\u043c\u0438\u043d.', from:'\u043e\u0442',\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\u0435\u043d\u0437\u043e\u0440\u044a\u0442 \u043d\u0435 \u0435 \u043f\u043e\u0434\u0430\u0432\u0430\u043b \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\u0435\u043d\u0437\u043e\u0440\u044a\u0442 \u0432\u0441\u0435 \u043e\u0449\u0435 \u043d\u0435 \u0435 \u043f\u043e\u0434\u0430\u0432\u0430\u043b \u0434\u0430\u043d\u043d\u0438.',\n    statusOk:'\u041d\u043e\u0440\u043c\u0430\u043b\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430', statusOffline:'\u041d\u0435 \u043f\u043e\u0434\u0430\u0432\u0430 \u0434\u0430\u043d\u043d\u0438',\n    aboveHint:'\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430, \u043d\u043e \u043c\u043e\u0436\u0435 \u0434\u0430 \u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u0430.',\n    faultHint:'\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u043d\u0435 \u0441\u0435 \u043f\u043e\u043a\u0430\u0437\u0432\u0430, \u0434\u043e\u043a\u0430\u0442\u043e \u0441\u0435\u043d\u0437\u043e\u0440\u044a\u0442 \u043d\u0435 \u043f\u043e\u0434\u0430\u0434\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0432\u0430\u043d\u0435.',\n    error:'\u0414\u0430\u043d\u043d\u0438\u0442\u0435 \u0437\u0430 \u0441\u043d\u0435\u0433\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\u0435\u043d \u0441\u0435\u043d\u0437\u043e\u0440 \u0437\u0430 \u0441\u043d\u044f\u0433.'\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\n  \/* \u2500\u2500 Formatting (times are shown in Bulgarian time, like the daily buckets of the API) \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 wdFmt = new Intl.DateTimeFormat(LOCALE, {timeZone:'UTC', weekday:'short'});\n  const wdLongFmt = new Intl.DateTimeFormat(LOCALE, {timeZone:'UTC', weekday:'long'});\n  const cap = s => s ? s.charAt(0).toUpperCase() + s.slice(1) : s;\n  const weekday = (key, long) => cap((long ? wdLongFmt : wdFmt).format(new Date(key + 'T12:00:00Z'))).replace(\/\\.$\/, '');\n  const dayMonth = key => key.slice(8, 10) + '.' + key.slice(5, 7);\n  const signed = v => !isNum(v) ? '\u2014' : (v > 0 ? '+' : v < 0 ? '\u2212' : '\u00b1') + nf1.format(Math.abs(v)) + ' cm';\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  const normLevels = s => (s && Array.isArray(s.levels) ? s.levels : [])\n    .filter(l => l && isNum(l.min))\n    .map(l => ({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  const levelOf = (v, levels) => levels.length && isNum(v) ? levels[levelIndexOf(v, levels)] : null;\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\n  \/* \u2500\u2500 Tooltip \u2500\u2500 *\/\n  const tip = byId('gs-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  function niceScale(max){\n    const target = Math.max(2, max * 1.25), steps = [0.5, 1, 2, 5, 10, 20, 25, 50, 100, 200, 500];\n    let step = steps[steps.length - 1];\n    for (const s of steps) { if (target \/ s <= 5) { step = s; break; } }\n    return {ymax:Math.ceil(target \/ step - 1e-9) * step, step:step};\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Semicircle gauge: 5 equal segments (the scale is not linear in cm) \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  function renderGauge(val, levels){\n    const svg = byId('gs-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) {\n      const li = levelIndexOf(val, levels), L = levels[li];\n      const span = L.max != null ? L.max - L.min : Math.max(L.min, 1);\n      const f = (li + Math.min(1, Math.max(0, (val - L.min) \/ span))) \/ 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 = {y:cy + 14, 'font-size':10, 'font-weight':800, fill:'#7d8b81'};\n    svgText(svg, cx - R - 6, cy + 14, '0', lab);\n    if (levels.length) svgText(svg, cx + R + 8, cy + 14, '>' + fmtN(levels[levels.length - 1].min) + ' cm', Object.assign({'text-anchor':'end'}, lab));\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Bar chart \u2014 last 24 hours, one bar per hour \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  function renderChart24(history, levels){\n    const box = byId('gs-chart24'); box.textContent = '';\n    const HOUR = 3600e3, end = Math.floor(Date.now() \/ HOUR) * HOUR, start = end - 24 * HOUR;\n    const byHour = new Map();\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.value); });\n    const slots = [];\n    for (let t = start; t <= end; t += HOUR) slots.push({t:t, v:byHour.has(t) ? byHour.get(t) : null});\n    const vals = slots.filter(s => s.v != null).map(s => s.v);\n    if (!vals.length) { box.appendChild(emptyNote(T.noHistory)); return; }\n\n    const W = Math.max(280, Math.round(box.clientWidth || 720)), narrow = W < 560;\n    const H = narrow ? 220 : Math.round(Math.min(310, Math.max(260, W * .38)));\n    const pl = narrow ? 36 : 44, pr = 8, pt = 14, pb = 30, iw = W - pl - pr, ih = H - pt - pb, base = pt + ih;\n    const sc = niceScale(Math.max.apply(null, vals)), ymax = sc.ymax;\n    const y = v => pt + ih * (1 - Math.min(v, 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 += sc.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    \/* level boundaries that fall inside the scale *\/\n    const thr = levels.filter(L => L.min > 0 && L.min < ymax);\n    thr.forEach(L => svgEl('line', {x1:pl, x2:W - pr, y1:y(L.min), y2:y(L.min), stroke:L.color, 'stroke-width':1.2, 'stroke-dasharray':'5 4', opacity:.8}, svg));\n\n    const slot = iw \/ slots.length, bw = Math.max(3, Math.min(22, slot - 4)), every = slot * 3 >= 40 ? 3 : 6;\n    slots.forEach((s, i) => {\n      const x0 = pl + slot * i, p = sofia(s.t);\n      if (s.v != null) {\n        const L = levelOf(s.v, levels), top = Math.min(y(s.v), base - 2);\n        const bar = svgEl('path', {d:barPath(x0 + (slot - bw) \/ 2, top, bw, base), fill:L ? L.color : '#4a9fd8'}, svg);\n        const hit = svgEl('rect', {x:x0, y:pt, width:slot, height:ih, fill:'transparent'}, svg);\n        const lines = [['t-val', fmt1(s.v) + ' cm'], ['t-lab', T.hourRange(p.hour)]];\n        if (L) lines.push(['t-lvl', L.text, L.color]);\n        bindTip(hit, lines, bar);\n      }\n      if (Number(p.hour) % every === 0) svgText(svg, x0 + slot \/ 2, H - 10, T.hourAxis(p.hour), Object.assign({'text-anchor':'middle'}, axis));\n    });\n    \/* boundary labels on a white backing so they stay readable over the bars *\/\n    thr.forEach(L => {\n      const t = svgText(svg, W - pr - 4, y(L.min) - 7, L.text + ' \u00b7 ' + T.from + ' ' + fmtN(L.min) + ' cm',\n        {'text-anchor':'end', 'font-size':9, 'font-weight':800, fill:ink(L.color), 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 - 5, y:b.y - 1.5, width:b.width + 10, height:b.height + 3, rx:5, fill:'#fff', opacity:.94}), t);\n    });\n  }\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Last 7 days: bar = daily maximum, white line = daily average \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\n  function renderDays(daily, levels){\n    const box = byId('gs-chart7'); box.textContent = '';\n    const days = (daily || []).filter(d => d && \/^\\d{4}-\\d{2}-\\d{2}$\/.test(String(d.date)));\n    const maxes = days.filter(d => isNum(d.max)).map(d => d.max);\n    if (!maxes.length) { box.appendChild(emptyNote(T.noHistory)); return; }\n\n    const W = Math.max(260, Math.round(box.clientWidth || 420)), H = 220, pl = 4, pr = 4, pt = 24, pb = 46, iw = W - pl - pr, ih = H - pt - pb, base = pt + ih;\n    const ymax = Math.max(2, Math.max.apply(null, maxes)) * 1.04;   \/\/ no axis here: the bars carry their own value labels\n    const y = v => pt + ih * (1 - Math.min(v, ymax) \/ ymax);\n    const svg = svgEl('svg', {viewBox:'0 0 ' + W + ' ' + H, width:W, height:H, role:'img', 'aria-label':T.aria7}, box);\n    svgEl('line', {x1:pl, x2:W - pr, y1:base, y2:base, stroke:'#c9d3c9', 'stroke-width':1}, svg);\n    const slot = iw \/ days.length, bw = Math.min(40, slot * .58), today = dayKey(Date.now());\n\n    days.forEach((d, i) => {\n      const cx = pl + slot * (i + .5), isToday = d.date === today;\n      if (isNum(d.max)) {\n        const L = levelOf(d.max, levels), top = Math.min(y(d.max), base - 2);\n        const bar = svgEl('path', {d:barPath(cx - bw \/ 2, top, bw, base), fill:L ? L.color : '#4a9fd8'}, svg);\n        if (isNum(d.avg) && base - top > 12) {\n          const ya = Math.max(top + 5, Math.min(base - 3, y(d.avg)));\n          svgEl('line', {x1:cx - bw \/ 2 + 5, x2:cx + bw \/ 2 - 5, y1:ya, y2:ya, stroke:'#fff', 'stroke-width':2.5, 'stroke-linecap':'round'}, svg);\n        }\n        svgText(svg, cx, top - 7, fmt1(d.max), {'text-anchor':'middle', 'font-size':11, 'font-weight':800, fill:'#103a28'});\n        const hit = svgEl('rect', {x:pl + slot * i, y:pt - 20, width:slot, height:ih + 20, fill:'transparent'}, svg);\n        const lines = [['t-val', T.max + ' ' + fmt1(d.max) + ' cm'], ['t-lab', weekday(d.date, true) + ', ' + dayMonth(d.date)],\n          ['t-lab', T.avg + ' ' + fmt1(d.avg) + ' \u00b7 ' + T.min + ' ' + fmt1(d.min) + ' cm']];\n        if (L) lines.push(['t-lvl', L.text, L.color]);\n        bindTip(hit, lines, bar);\n      } else {\n        svgText(svg, cx, base - 7, '\u2014', {'text-anchor':'middle', 'font-size':11, 'font-weight':800, fill:'#b7c1ba'});\n      }\n      svgText(svg, cx, H - 24, isToday ? T.today : weekday(d.date), {'text-anchor':'middle', 'font-size':11.5, 'font-weight':800, fill:isToday ? '#175338' : '#3d5246'});\n      svgText(svg, cx, H - 9, dayMonth(d.date), {'text-anchor':'middle', 'font-size':10.5, 'font-weight':700, fill:'#7d8b81'});\n    });\n  }\n\n  function renderLegend(levels){\n    const lg = byId('gs-legend'); lg.textContent = '';\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  }\n\n  function renderTable(history, levels){\n    const tb = byId('gs-table'); tb.textContent = '';\n    const hr = tb.createTHead().insertRow();\n    [T.colHour, 'cm', 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 = (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 = 3; 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      r.insertCell().textContent = fmt1(p.value);\n      const c = r.insertCell(), L = levelOf(p.value, levels);\n      if (L) { const chip = document.createElement('span'), i = document.createElement('i'); chip.className = 'lvl-chip';\n        i.style.background = L.color; 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){\n    const ul = byId('gs-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 ? fmtN(L.min) + '\u2013' + fmtN(L.max) + ' cm' : '\u2265 ' + fmtN(L.min) + ' cm';\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 setPill(text, color){\n    const pill = byId('gs-pill');\n    pill.style.background = color ? soft(color) : ''; pill.style.color = color ? ink(color) : '';\n    pill.querySelector('.dot').style.background = color || '';\n    byId('gs-level').textContent = text;\n  }\n  function setNote(text, cls){ const n = byId('gs-note'); n.className = 'status-note' + (cls ? ' ' + cls : ''); n.textContent = text || ''; n.hidden = !text; }\n  function setStatus(text, color){ const el = byId('gs-status'); el.textContent = '';\n    if (color) { const i = document.createElement('i'); i.style.background = color; el.appendChild(i); }\n    el.appendChild(document.createTextNode(text)); }\n  const sentence = (a, b) => String(a || '').replace(\/[.\\s]+$\/, '') + '. ' + b;\n\n  \/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Sensor selector (hidden chevron when there is only one sensor) \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('gs-station'), loc = byId('gs-loc');\n    roster = [{token:st.token, name:st.name}].concat((data.stations || [])\n      .filter(o => o && o.token && o.token !== st.token).map(o => ({token: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){\n    const s = data && data.station && data.station.snow, levels = normLevels(s);\n    renderChart24(s ? s.history : [], levels);\n    renderDays(s ? s.daily : [], levels);\n  }\n\n  function render(data){\n    const st = data.station, s = st.snow || null, levels = normLevels(s);\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('gs-crumb-station').textContent = st.name || '\u2014';\n    byId('gs-updated').textContent = (s && s.measuredAt ? fmtDateTime(s.measuredAt) : '\u2014') + (st.active ? '' : T.offlineTag);\n\n    \/* never show a number for a faulty sensor (the API sends null then; this guards against a stray 0) *\/\n    const val = s && st.active && s.sensorStatus !== 'fault' && isNum(s.value) ? s.value : null;\n    byId('gs-val').textContent = fmt1(val);\n    byId('gs-unit').textContent = (s && s.unit) || 'cm';\n    renderGauge(val, levels);\n\n    const hasLevel = val != null && !!s.levelText;\n    if (hasLevel) setPill(s.levelText, safeColor(s.color));\n    else setPill(!s || !st.active ? T.noCurrent : T.noValue, null);\n    byId('gs-reco').textContent = hasLevel ? (s.recommendation || '') : '';\n\n    \/* \"below\" is the sensor's normal no-snow state: no warning. Only \"above\" and \"fault\" get one. *\/\n    if (!s) setNote(T.never, 'muted');\n    else if (!st.active) setNote(T.offline, '');\n    else if (s.sensorStatus === 'fault') setNote(sentence(s.sensorStatusText, T.faultHint), 'bad');\n    else if (s.sensorStatus === 'above') setNote(sentence(s.sensorStatusText, T.aboveHint), '');\n    else setNote('', '');\n\n    let activeIdx = -1;\n    if (val != null && levels.length) activeIdx = isNum(s.level) && s.level >= 1 && s.level <= levels.length ? s.level - 1 : levelIndexOf(val, levels);\n    renderScale(levels, activeIdx);\n    byId('gs-change').textContent = val != null ? signed(s.change24h) : '\u2014';\n    if (!s) setStatus(T.noData, '#b7c1ba');\n    else if (!st.active) setStatus(T.statusOffline, '#b7c1ba');\n    else if (s.sensorStatus === 'fault') setStatus(s.sensorStatusText || T.noValue, '#b32b52');\n    else if (s.sensorStatus === 'above') setStatus(s.sensorStatusText || T.statusOk, '#a97300');\n    else setStatus(T.statusOk, '#2e8f4a');\n\n    renderLegend(levels);\n    renderCharts(data);\n    renderTable(s ? s.history : [], levels);\n  }\n\n  function setLoading(){ byId('gs-val').textContent = '\u2026'; byId('gs-updated').textContent = T.loading; }\n\n  function showError(noSensor){\n    lastData = null;\n    byId('gs-val').textContent = '\u2014';\n    byId('gs-updated').textContent = T.updatedErr;\n    setPill(T.noData, null);\n    byId('gs-reco').textContent = '';\n    setNote(noSensor ? T.noSensor : T.error, 'bad');\n    renderGauge(null, []); renderScale([], -1);\n    byId('gs-change').textContent = '\u2014'; setStatus('\u2014', null);\n    byId('gs-legend').textContent = '';\n    byId('gs-chart24').textContent = ''; byId('gs-chart24').appendChild(emptyNote(T.noData));\n    byId('gs-chart7').textContent = ''; byId('gs-chart7').appendChild(emptyNote(T.noData));\n    renderTable([], []);\n    if (!roster.length) { byId('gs-loc').hidden = true; byId('gs-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\/snow?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 sensor, 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 + '\/snow?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 snow sensor'); 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 sensor whose load failed with nothing on screen; the minute timer retries it\n     (also when the very first load fails, before any sensor 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 snow]', 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('gs-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 sensor 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('gs-btn-chart').classList.toggle('on', !table); byId('gs-btn-chart').setAttribute('aria-pressed', String(!table));\n    byId('gs-btn-table').classList.toggle('on', table); byId('gs-btn-table').setAttribute('aria-pressed', String(table));\n    byId('gs-chart24').hidden = table; byId('gs-table-wrap').hidden = !table;\n    if (!table && lastData) renderCharts(lastData);\n  }\n  byId('gs-btn-chart').addEventListener('click', () => setView(false));\n  byId('gs-btn-table').addEventListener('click', () => setView(true));\n\n  \/* Charts are drawn at their 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);\n        if (w > 0 && Math.abs((widths.get(en.target) || 0) - w) > 2) { widths.set(en.target, w); changed = true; } });\n      if (changed) redraw();\n    });\n    ro.observe(byId('gs-chart24')); ro.observe(byId('gs-chart7'));\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 \u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430\u203a \u2013 \u0414\u0430\u043d\u043d\u0438 \u0432 \u0440\u0435\u0430\u043b\u043d\u043e \u0432\u0440\u0435\u043c\u0435 \u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0435: \u2013 \u2013 cm \u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u2013 \u0421\u043d\u044f\u0433 \u2014 24 \u0447. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0442\u0435 7 \u0434\u043d\u0438 \u0421\u043a\u0430\u043b\u0430 \u043d\u0430 \u0441\u043d\u0435\u0436\u043d\u0430\u0442\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438 \u041f\u0440\u043e\u043c\u044f\u043d\u0430 \u0437\u0430 24 \u0447.\u2014 \u0421\u0435\u043d\u0437\u043e\u0440\u2014 \u0421\u043d\u0435\u0436\u043d\u0430 \u043f\u043e\u043a\u0440\u0438\u0432\u043a\u0430 \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438 24 \u0447\u0430\u0441\u0430 \u0421\u0440\u0435\u0434\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u0435 \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0438 \u0413\u0440\u0430\u0444\u0438\u043a\u0430 \u0422\u0430\u0431\u043b\u0438\u0446\u0430 [&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-2330","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2330","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=2330"}],"version-history":[{"count":3,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2330\/revisions"}],"predecessor-version":[{"id":2333,"href":"https:\/\/greengabrovo.com\/en\/wp-json\/wp\/v2\/pages\/2330\/revisions\/2333"}],"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=2330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}