1import{d as a,u as i,t as m}from"./timezone.BFeNnjAo.js";import"./dayjs.BDSE_uUf.js";a.extend(i);a.extend(m);const d=(o,s)=>({event:null,loading:!0,error:null,init(){o&&s?this.fetchEvent():(this.loading=!1,this.error="Event ID and calendar are required")},formatDate(n,t){const e=a(n),r=a(t);return e.isSame(r,"day")?e.format("MMMM D, YYYY"):e.isSame(r,"month")&&e.isSame(r,"year")?`${e.format("MMMM D")}â${r.format("D, YYYY")}`:e.isSame(r,"year")?`${e.format("MMMM D")}â${r.format("MMMM D, YYYY")}`:`${e.format("MMMM D, YYYY")}â${r.format("MMMM D, YYYY")}`},formatTimeRange(n,t){const e=a(n).format("h:mm A"),r=a(t).format("h:mm A");return e===r?e:`${e} to ${r}`},async fetchEvent(){const n=`https://template.aws.emory.edu/shared-assets/feed/trumba.php?calendar=${encodeURIComponent(s)}&eventid=${encodeURIComponent(o)}`;try{const t=await fetch(n);if(!t.ok)throw new Error(`HTTP error: ${t.status}`);const e=await t.json();Array.isArray(e)&&e.length>0?this.event=e[0]:e&&!Array.isArray(e)&&(this.event=e)}catch(t){this.error=t.message,console.error("Failed to fetch event:",t)}finally{this.loading=!1}}});export{d as default};
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.