PageSourceSearch

https://atmosphere.community/_astro/HappeningNow.astro_astro_type_script_index_0_lang.Dt9G4u7T.js

js atmosphere.community collected 2026-10-06 13:13:26 UTC 2,333 bytes, 1 lines download raw bytes

1import{f as v,r as u,b as d,c as m}from"./event-time.BCQjMqYU.js";function g(){document.querySelectorAll("[data-localize-time]").forEach(n=>{const o=n.getAttribute("datetime");o&&(n.textContent=v(new Date(o)))})}function w(){const n=Date.now();document.querySelectorAll(".now-card").forEach(o=>{const a=o.dataset.eventStartsAt,t=o.dataset.eventEndsAt,e=o.querySelector("[data-relative]");if(!a||!t||!e)return;const i=new Date(a).getTime(),s=new Date(t).getTime(),r=e.dataset.relativeMode;if(r)if(r==="live")e.textContent=d(s-n);else{const c=i-n;if(c<=0){e.dataset.relativeMode="live",e.textContent=d(s-n);return}e.textContent=m(c)}})}function l(n,o,a){n.classList.toggle("now-card--live",o==="live"),n.classList.toggle("now-card--soon",o==="soon");const t=n.querySelector("[data-status-live-icon]"),e=n.querySelector("[data-status-soon-icon]"),i=n.querySelector("[data-status-label]"),s=n.querySelector("[data-relative]");t?.toggleAttribute("hidden",o!=="live"),e?.toggleAttribute("hidden",o==="live"),i&&(i.textContent=a),s&&(s.dataset.relativeMode=o)}function f(){const n=new Date,o=new Map(Array.from(document.querySelectorAll("[data-now-section]")).map(t=>[t.dataset.nowSection,t])),a={now:[],today:[],week:[]};document.querySelectorAll(".now-card[data-now-pinned]").forEach(t=>{const e=u(t,n);e&&(e.state==="live"?l(t,"live","Live"):e.state!=="past"&&l(t,"soon",t.dataset.nowLabel??"Going"))}),document.querySelectorAll(".now-card:not([data-now-pinned])").forEach(t=>{const e=u(t,n);!e||e.state==="past"||(e.state==="live"?(a.now.push(t),l(t,"live","Live")):e.state==="today"?(a.today.push(t),l(t,"soon",t.dataset.nowLabel??"Today")):e.state==="week"&&(a.week.push(t),l(t,"soon",t.dataset.nowLabel??"This week")))}),a.now.sort((t,e)=>new Date(t.dataset.eventEndsAt??0).getTime()-new Date(e.dataset.eventEndsAt??0).getTime()),a.today.sort((t,e)=>new Date(t.dataset.eventStartsAt??0).getTime()-new Date(e.dataset.eventStartsAt??0).getTime()),a.week.sort((t,e)=>new Date(t.dataset.eventStartsAt??0).getTime()-new Date(e.dataset.eventStartsAt??0).getTime());for(const[t,e]of o){if(!t||!(t in a))continue;const i=e.querySelector("[data-now-cards]"),s=e.querySelector("[data-now-empty]"),r=a[t]??[];!i||!s||(r.forEach(c=>i.insertBefore(c,s)),s.toggleAttribute("hidden",r.length>0))}}g();f();w();setInterval(w,3e4);setInterval(f,3e4);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.