1import{u as y}from"./HQPdh8CW.js";import{e as $,y as u}from"#entry";function F(t){if(!t)return"";const o=new Date(t),e=new Intl.DateTimeFormat("fr-FR",{weekday:"long",day:"numeric",month:"long",year:"numeric"}).format(o),r=new Intl.DateTimeFormat("fr-FR",{hour:"2-digit",minute:"2-digit",hour12:!1}).format(o),[n,s]=r.split(":"),i=s==="00"?`${n}h`:`${n}h${s}`;return`${e} â ${i}`}function O(t={}){const o=$(()=>{const f=u(t.locale)??"fr-FR",c=u(t.sort)??null,m=u(t.pageSize)??null,l=u(t.populate)??null,p=u(t.filters)??null,a=new URLSearchParams;return a.set("locale",f),c&&a.set("sort[0]",c),typeof m=="number"&&a.set("pagination[pageSize]",String(m)),l&&typeof l=="object"&&h(a,l),p&&typeof p=="object"&&b(a,p),a.toString()}),{data:e,pending:r,error:n,refresh:s}=y(()=>`/api/__strapi__/concerts?${o.value}`,{server:!0,key:()=>`concerts:${o.value}`,watch:[o]},"$qPVcggIhVo");return{concerts:$(()=>{let c=(e.value?.data||[]).map(j).sort(w);if(!!(u(t.upcomingOnly)??!1)){const p=new Date;p.setHours(0,0,0,0),c=c.filter(a=>{const g=d(a);return g?g>=p:!1})}const l=u(t.limit);return typeof l=="number"&&(c=c.slice(0,Math.max(0,l))),c}),pending:r,error:n,refresh:s}}function h(t,o,e="populate"){Object.entries(o).forEach(([r,n])=>{if(n===!0){t.set(`${e}[${r}]`,"true");return}if(n&&typeof n=="object"){const s=Object.entries(n);if(s.length>0&&s.every(([,f])=>f===!0)){const f=s.map(([c])=>c).join(",");t.set(`${e}[${r}][populate]`,f);return}h(t,n,`${e}[${r}][populate]`)}})}function b(t,o,e="filters"){Object.entries(o).forEach(([r,n])=>{if(n!=null){if(typeof n!="object"){t.set(`${e}[${r}]`,String(n));return}Object.entries(n).forEach(([s,i])=>{if(i!=null){if(typeof i!="object"){t.set(`${e}[${r}][${s}]`,String(i));return}b(t,i,`${e}[${r}][${s}]`)}})}})}function j(t){const o=t.attributes||t||{};return{id:t.id,...o}}function w(t,o){const e=d(t),r=d(o);return!e&&!r?0:e?r?e-r:-1:1}function d(t){const o=t?.representation_concert||[];let e=null;return o.forEach(r=>{const n=r?.date_debut_representation;if(!n)return;const s=new Date(n);(!e||s<e)&&(e=s)}),e}export{F as f,O as u};
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.