import{a0 as c}from"./index-20f16f2f.js";function g(o,l,d,f){const r=new c;for(let e of o)r.add(e.startTime,e.endTime,{type:"event",content:e});for(let e of l)r.add(e.startTime,e.endTime,{type:"availableHour"});const m={type:"marker"};r.add(d,f,m);let t=r.get(),a;for(a=0;!t[a].items.has(m);++a);const i=a;for(a=i;a<t.length&&t[a].items.has(m);++a);const p=a;return t=t.slice(i,p),t=t.map(e=>({startTime:e.start,endTime:e.end,events:Array.from(e.items)})),t=t.map(({startTime:e,endTime:T,events:s})=>({startTime:e,endTime:T,available:s.some(n=>n.type==="availableHour"),events:s.filter(n=>n.type==="event").map(n=>n.content)})),t}export{g};
