Skip to content

Web 4418#82

Merged
remdub merged 2 commits intomainfrom
WEB-4418
May 7, 2026
Merged

Web 4418#82
remdub merged 2 commits intomainfrom
WEB-4418

Conversation

@remdub
Copy link
Copy Markdown
Member

@remdub remdub commented May 7, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Search results now filter to display only published contacts, events, and news items.
  • Bug Fixes

    • Fixed crashes when accessing missing or unpublished items in search results and directory views.
    • Resolved procedure view crashes when required tokens are unavailable.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds published-state filtering to search result components across the SmartWeb platform. Source components for contacts, events, and news are updated to append review_state=published to their API queries, preventing unpublished items from appearing in search results. The changes include bundled webcomponent updates, a new event components chunk, and dev configuration adjustments for integrity token computation.

Changes

Search Published State Filtering

Layer / File(s) Summary
Feature Documentation
CHANGES.rst
Changelog entries document three related changes: WEB-4418 filtering by published state, IndexError fix for missing/unpublished direct_access items, and WEB-4414 ProcedureViewlet crash fix.
Search Result Filters
src/imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx, src/imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx, src/imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx
Source components add review_state=published query parameter to API requests and extend @search URLs with additional parameters (_core, b_size, metadata_fields).
Event Components Bundle
src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js
New webpack chunk introduces compiled React event experience components: date filtering, event filter menu, event detail view with metadata rendering, paginated event list with map integration, and map marker helpers.
Search & Filter Updates
src/imio/smartweb/core/webcomponents/build/js/533.smartweb-webcomponents-compiled.js, src/imio/smartweb/core/webcomponents/build/js/592.smartweb-webcomponents-compiled.js, src/imio/smartweb/core/webcomponents/build/js/864.smartweb-webcomponents-compiled.js, src/imio/smartweb/core/webcomponents/build/js/942.smartweb-webcomponents-compiled.js
Updated chunks: 864 adds published-state filter to directory search, 533 refactors filter UI wiring and listing composition, 942 updates style helper signatures and async request hooks, 592 renders event results with pagination.
Build Configuration
src/imio/smartweb/core/webcomponents/webpack.config.js, src/imio/smartweb/core/webcomponents/build/js/914.smartweb-webcomponents-compiled.js.LICENSE.txt
Webpack dev server devMiddleware.writeToDisk enabled for integrity token computation; Moment Timezone dependency version updated from 0.6.0 to 0.6.2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • IMIO/imio.smartweb.core#75: Both PRs modify search query construction to include review_state filtering and adjust how news/events/directory API queries are built.

Poem

🐰 Hop along through search results so bright,
Published items dance in filtered light!
No unpublished surprises to find,
A cleaner search experience, thoughtfully designed!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Web 4418' is vague and generic, referencing only a ticket number without describing the actual changes made in the pull request. Consider using a more descriptive title that summarizes the main change, such as 'Filter search results by published state for contacts, events, and news' or 'Add review_state=published filter to search components'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch WEB-4418

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx (1)

19-29: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

b_size=100 still makes larger result sets incomplete.

This component treats response.items.length as the total and only paginates on the client, so the new fixed batch size turns into a hard ceiling. On directories with more than 100 published contacts, the extra entries become unreachable and the count in the header is wrong. Please switch this flow to server-side batching, or keep fetching until the backend is exhausted instead of hard-capping the search response.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx`
around lines 19 - 29, The current ContactResult.jsx build of the search request
hard-caps results with params.b_size=100 and treats response.items.length as
total, which drops contacts beyond the first batch; change the fetch logic to
perform server-side batching by adding and incrementing the b_start param (or
equivalent server pagination token) and repeatedly requesting until the backend
returns no more items (or until fetched count matches response.total if
provided), rather than relying on response.items.length as the full total;
update the request construction around the baseURL/params block (where b_size
and props.urlParams are set) and the component logic that uses
response.items.length so it accumulates items across pages and uses
response.total or the empty-page sentinel to stop fetching.
src/imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx (1)

17-24: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Whitelist the forwarded query params.

Appending review_state=published in the URL is not enough while this request still forwards props.urlParams wholesale. A crafted URL that includes SearchableText plus another backend key like review_state, _core, or b_start will send both values, so the published-only filter is no longer guaranteed. Build params from an explicit allowlist here, and apply the same change to the other search components updated in this PR.

🔒 Proposed fix
+    const requestParams = Object.fromEntries(
+        Object.entries({
+            SearchableText: props.urlParams?.SearchableText,
+            iam: props.urlParams?.iam,
+            topics: props.urlParams?.topics,
+        }).filter(([, value]) => value !== undefined && value !== null && value !== ""),
+    );
+
     const { response, error, isLoading } = useAxios(
         {
             method: "get",
             url: "",
             baseURL: props.url + "/@search?&_core=events&b_size=100&review_state=published", //props.queryUrl*/,
             headers: {
                 Accept: "application/json",
             },
-            params:
-                props.urlParams.SearchableText || props.urlParams.iam || props.urlParams.topics
-                    ? props.urlParams
-                    : {},
+            params: requestParams,
         },
         [props]
     );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx`
around lines 17 - 24, The component EventsResult.jsx currently forwards
props.urlParams wholesale into the axios params, allowing a client to override
backend-only keys; change the params construction to build an explicit allowlist
(e.g., only include SearchableText, iam, topics or whatever safe keys your API
expects) and copy values from props.urlParams into a new object that is sent as
params (do not merge in review_state, _core, b_start, etc.), update the code
that sets params in the axios/request config used by EventsResult (and apply the
identical allowlist approach to the other search components modified in this PR)
so only approved query keys are forwarded to the backend.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js`:
- Line 1: The map container style builds an invalid CSS calc string
(height:"calc(100vh-"+F.height+K) in the le component; compute the total offset
as a number (e.g. total = F.height + K) and set the style to a valid expression
such as "calc(100vh - Xpx)" where X is total, and ensure any top value uses
pixel units if needed; update the style object used when rendering the map (the
object referencing F.height and K in le that sets top and height) to construct a
correct CSS string (or numeric pixel value) before rebuilding the bundle.
- Line 1: The compiled bundle contains several anchors with target="_blank" and
no rel attribute; update the source JSX to add rel="noopener noreferrer" to
every external/new-tab anchor (e.g. the edit links and
social/ticket/event/propose links rendered in components R, Z, le and any other
places that create <a href=... target="_blank">) and then rebuild to regenerate
this compiled file so ESLint reports no warnings.
- Line 1: The recurrence control is rendered as an anchor with role="button" (in
the component/function Z where you create the element with className
"recurence-schedul" and onClick:()=>{C(!0)}), which is not keyboard-accessible;
change that element to a real <button type="button"> (or at minimum add tabIndex
and key handlers), remove the role="button" on the anchor, bind aria-expanded to
the D state (aria-expanded={D}) and keep the onClick handler (or toggle C) so
keyboard users can activate it; locate the "recurence-schedul" element in the Z
component and replace it accordingly and rebuild.

---

Outside diff comments:
In
`@src/imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx`:
- Around line 19-29: The current ContactResult.jsx build of the search request
hard-caps results with params.b_size=100 and treats response.items.length as
total, which drops contacts beyond the first batch; change the fetch logic to
perform server-side batching by adding and incrementing the b_start param (or
equivalent server pagination token) and repeatedly requesting until the backend
returns no more items (or until fetched count matches response.total if
provided), rather than relying on response.items.length as the full total;
update the request construction around the baseURL/params block (where b_size
and props.urlParams are set) and the component logic that uses
response.items.length so it accumulates items across pages and uses
response.total or the empty-page sentinel to stop fetching.

In
`@src/imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx`:
- Around line 17-24: The component EventsResult.jsx currently forwards
props.urlParams wholesale into the axios params, allowing a client to override
backend-only keys; change the params construction to build an explicit allowlist
(e.g., only include SearchableText, iam, topics or whatever safe keys your API
expects) and copy values from props.urlParams into a new object that is sent as
params (do not merge in review_state, _core, b_start, etc.), update the code
that sets params in the axios/request config used by EventsResult (and apply the
identical allowlist approach to the other search components modified in this PR)
so only approved query keys are forwarded to the backend.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a84ec720-e802-470c-9511-4225523c0dfc

📥 Commits

Reviewing files that changed from the base of the PR and between 9247b33 and a9a6e23.

📒 Files selected for processing (23)
  • CHANGES.rst
  • src/imio/smartweb/core/webcomponents/build/css/887.smartweb-webcomponents-compiled.css
  • src/imio/smartweb/core/webcomponents/build/js/115.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/115.smartweb-webcomponents-compiled.js.LICENSE.txt
  • src/imio/smartweb/core/webcomponents/build/js/24.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/39.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/533.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/592.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/623.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/78.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/864.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/914.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/914.smartweb-webcomponents-compiled.js.LICENSE.txt
  • src/imio/smartweb/core/webcomponents/build/js/939.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/942.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js
  • src/imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx
  • src/imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx
  • src/imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx
  • src/imio/smartweb/core/webcomponents/webpack.config.js
💤 Files with no reviewable changes (1)
  • src/imio/smartweb/core/webcomponents/build/js/592.smartweb-webcomponents-compiled.js

@@ -0,0 +1 @@
"use strict";(self.webpackChunkimio_smartweb_core_webcomponents=self.webpackChunkimio_smartweb_core_webcomponents||[]).push([[887],{14541(e,t,a){a.d(t,{A:()=>r});a(25602);const r=a.p+"assets/pin-react-active.07d154037a15be5525b823fdc626cf29.svg"},62678(e,t,a){a.d(t,{A:()=>r});a(25602);const r=a.p+"assets/pin-react.fda934b5daf26dd4da2a71a7e7e44431.svg"},75954(e,t,a){a.r(t),a.d(t,{default:()=>ne});var r=a(25602),n=a(8174),l=a(41665),c=a(64651),o=a(3347),i=a(86110),s=a(83198),m=a(54368),u=a.n(m),d=(a(55369),a(60711)),p=a.n(d),f=a(2494),v=a(24286),h=a(96745),g=a(42090),E=a(31540),y=a(64478);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,l,c,o=[],i=!0,s=!1;try{if(l=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=l.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}const x={fr:h.fr,nl:g.nl,de:E.de,en:y.b};const N=function(e){let t=e.language,a=e.setDates;const n=b((0,r.useState)([null,null]),2),l=n[0],c=n[1],o=b(l,2),i=o[0],m=o[1],d=b((0,r.useState)(r.createElement(s.HT,{text:"Quand"})),2),h=d[0],g=d[1],E=b((0,r.useState)(),2),y=E[0],w=E[1],N=p()().format("YYYY-MM-DD"),A={all:r.createElement(s.HT,{text:"Toutes les dates"}),today:r.createElement(s.HT,{text:"Aujourd'hui"}),tomorrow:r.createElement(s.HT,{text:"Demain"}),thisWeekEnd:r.createElement(s.HT,{text:"Ce week-end"}),thisWeek:r.createElement(s.HT,{text:"Cette semaine"}),thisMonth:r.createElement(s.HT,{text:"Ce mois-ci"}),custom:r.createElement(s.HT,{text:"Personnalisé (Du ... au ...)"})};return(0,r.useState)(()=>{w(x[t])},[]),r.createElement(r.Fragment,null,r.createElement("div",{className:"period-filter"},r.createElement(f.A,{className:"period-filter-toggler",onSelect:e=>{switch(e){case"all":a({"event_dates.query":[N]}),g(A.all);break;case"today":a({"event_dates.query":[N,N]}),g(A.today);break;case"tomorrow":const e=p()().add(1,"days").format("YYYY-MM-DD");a({"event_dates.query":[e,e]}),g(A.tomorrow);break;case"thisWeekEnd":const t=p()().endOf("week").format("YYYY-MM-DD"),r=p()().endOf("week").add(1,"days").format("YYYY-MM-DD");a({"event_dates.query":[t,r]}),g(A.thisWeekEnd);break;case"thisWeek":const n=p()().endOf("week").add(1,"days").format("YYYY-MM-DD");a({"event_dates.query":[N,n]}),g(A.thisWeek);break;case"thisMonth":const l=p()().endOf("month").format("YYYY-MM-DD");a({"event_dates.query":[N,l]}),g(A.thisMonth)}},title:h},r.createElement(v.A.Item,{eventKey:"all"},A.all),r.createElement(v.A.Item,{eventKey:"today"},A.today),r.createElement(v.A.Item,{eventKey:"tomorrow"},A.tomorrow),r.createElement(v.A.Item,{eventKey:"thisWeekEnd"},A.thisWeekEnd),r.createElement(v.A.Item,{eventKey:"thisWeek"},A.thisWeek),r.createElement(v.A.Item,{eventKey:"thisMonth"},A.thisMonth),r.createElement("div",{className:"perdiod-filter-range"},y&&r.createElement(s.rk,null,e=>{let t=e.translate;e.language;return r.createElement(u(),{dateFormat:"dd/MM/yyyy",placeholderText:t({text:"Personnalisé (Du ... au ...)"}),selectsRange:!0,startDate:i,endDate:m,minDate:(new Date).setDate((new Date).getDate()+1),onChange:e=>{c(e),(null!==e[0]&&null!==e[1]||null==e[0]&&null==e[1])&&(e=>{c(e);const t=e.filter(e=>null!==e).map(e=>p()(e).format("YYYY-MM-DD"));a({"event_dates.query":t}),e.every(e=>null===e)?g(A.all):g(A.custom)})(e)},isClearable:!0,locale:y})})))))};var A=a(72668);const O=[{label:"Petit enfant",value:"i8gf49541q"},{label:"Petit enfant » 1 an",value:"tdtpdh546x"},{label:"Petit enfant » 2 ans",value:"19hb3u884v"},{label:"Petit enfant » 3 ans",value:"cl7oi9xaig"},{label:"Enfant",value:"omg40jn2yl"},{label:"Enfant » 4 ans",value:"a04ryxt74a"},{label:"Enfant » 5 ans",value:"2u0ugvi72u"},{label:"Enfant » 6 ans",value:"8btkbsp9ei"},{label:"Enfant » 7 ans",value:"gp881gyhmy"},{label:"Enfant » 8 ans",value:"me9vnw7vnk"},{label:"Enfant » 9 ans",value:"11ps76le1h"},{label:"Enfant » 10 ans",value:"rf2m1fbrot"},{label:"Enfant » 11 ans",value:"79qhii8mnf"},{label:"Adolescent",value:"ah0rbc2qr4"},{label:"Adolescent » 12 ans",value:"x6rmmxao6i"},{label:"Adolescent » 13 ans",value:"1pn83a9xkw"},{label:"Adolescent » 14 ans",value:"b8skpvhfka"},{label:"Adolescent » 15 ans",value:"snvxin8j4j"},{label:"Adolescent » 16 ans",value:"v4ty7v0hab"},{label:"Adolescent » 17 ans",value:"1x1ii6jxhu"},{label:"Adulte",value:"5lfbjyeea0"},{label:"Plus de 60 ans",value:"58cuuquwed"},{label:"Tout public",value:"ry275hefdy"}];var _=a(94274),S=a(68473),k=a(88562);const H=["event_dates.range"];function M(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function j(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,r)}return a}function D(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(Object(a),!0).forEach(function(t){C(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function C(e,t,a){return(t=P(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function P(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,l,c,o=[],i=!0,s=!1;try{if(l=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=l.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}const T=function(e){let t=(0,l.Zp)();const a=I((0,r.useState)(e.activeFilter),2),n=a[0],c=a[1],m=I((0,r.useState)(null),2),u=m[0],d=m[1],f=I((0,r.useState)(null),2),v=f[0],h=f[1],g=I((0,r.useState)([]),2),E=g[0],y=g[1],b=I((0,r.useState)(null),2),w=b[0],x=b[1],j=(0,i.A)({method:"get",url:"",baseURL:e.url,headers:{Accept:"application/json"},params:n,paramsSerializer:{indexes:null}}),C=j.response;j.error,j.isLoading,(0,r.useEffect)(()=>{if(null!==C){const e=C.topics&&C.topics.map(e=>({value:e.token,label:e.title})),t=C.category&&C.category.map(e=>({value:e.token,label:e.title,queryString:"category"})),a=C.local_category&&C.local_category.map(e=>({value:e.token,label:e.title,queryString:"local_category"}));d(e),h(t),y(a)}},[C]);const Y=[{label:r.createElement(s.HT,{text:"Catégories spécifiques"}),options:E},{label:r.createElement(s.HT,{text:"Catégories"}),options:v}],T=(0,r.useCallback)(e=>{let t=e.target,a=t.name,r=t.value;r.length>2?c(e=>D(D({},e),{},{[a]:r}),[]):c(e=>{const t=D({},e);t[a];return M(t,[a].map(P))})}),U=(0,r.useCallback)((e,t)=>{const a=t.name;e?c(t=>D(D({},t),{},{[a]:e.value}),[]):c(e=>{const t=D({},e);t[a];return M(t,[a].map(P))})}),q=(0,r.useCallback)((e,t)=>{e?c(t=>D(D({},t),{},{[e.queryString]:e.value}),[]):c(e=>{const a=D({},e),r=t.removedValues[0].queryString;a[r];return M(a,[r].map(P))})}),z=(0,r.useRef)(!0);(0,r.useEffect)(()=>{z.current?z.current=!1:(t({pathname:"./",search:A.A.stringify(n)}),e.onChange(n))},[n]);let L=u&&u.filter(t=>t.value===e.activeFilter.topics),B=v&&v.filter(t=>t.value===e.activeFilter.category),V=O&&O.filter(t=>t.value===e.activeFilter.topics),F=_.c&&_.c.filter(t=>t.value===e.activeFilter.topics);return(0,r.useEffect)(()=>{w&&c(e=>{if(w["event_dates.query"].length>1){w["event_dates.range"];const t=M(w,H),a="min:max";return D(D(D({},e),t),{},{"event_dates.range":a})}return w["event_dates.query"].every(e=>null===e)?D(D({},e),{},{"event_dates.query":[p()().format("YYYY-MM-DD")],"event_dates.range":"min"}):D(D(D({},e),w),{},{"event_dates.range":"min"})})},[w]),r.createElement(r.Fragment,null,r.createElement("div",{className:"react-filters-menu"},r.createElement("div",{className:"react-filters-container"},r.createElement("form",{className:"r-filter r-filter-search",onSubmit:function(t){t.preventDefault(),e.onChange(n)}},r.createElement("div",{className:"relative"},r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement("label",{className:"sr-only",for:"event-search"},t({text:"Rechercher dans l'agenda"}))}),r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement("input",{className:"input-custom-class",id:"event-search",name:"SearchableText",type:"search",value:n.SearchableText,onChange:T,placeholder:t({text:"Recherche"})})}),r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"#9f9f9f",strokeWidth:"4","aria-hidden":"true",display:"block",overflow:"visible",style:{height:16,width:16},viewBox:"0 0 32 32"},r.createElement("path",{d:"M13 24a11 11 0 1 0 0-22 11 11 0 0 0 0 22zm8-3 9 9"})))),r.createElement("button",{className:"more-filter-btn collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapseOne","aria-expanded":"false","aria-controls":"collapseOne"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",style:{height:16,width:16},fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",display:"block",overflow:"visible"},r.createElement("path",{d:"M7 16H3m26 0H15M29 6h-4m-8 0H3m26 20h-4M7 16a4 4 0 108 0 4 4 0 00-8 0zM17 6a4 4 0 108 0 4 4 0 00-8 0zm0 20a4 4 0 108 0 4 4 0 00-8 0zm0 0H3"}))),r.createElement("div",{className:"react-sep-menu"}),"False"===e.onlyPastEvents&&r.createElement("div",{className:"r-filter schedul-Filter"},r.createElement(N,{language:e.language,setDates:x})),r.createElement("div",{className:"react-sep-menu"}),r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement("div",{className:"r-filter top-filter facilities-Filter"},r.createElement(o.Ay,{styles:S.E,name:"category",className:"select-custom-no-border library-facilities",isClearable:!0,components:{ClearIndicator:k.A},onChange:q,options:0===E.length?v&&v:Y,placeholder:t({text:"Quoi"}),value:B&&B[0]}))}))),r.createElement("div",{id:"collapseOne",className:"accordion-collapse collapse more-filter-container ","aria-labelledby":"headingOne","data-bs-parent":"#accordionExample"},r.createElement("div",{className:"accordion-body"},r.createElement("div",{className:"r-filter collapse-filter topics-Filter"},r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement(o.Ay,{styles:S.o,name:"topics",className:"library-topics",isClearable:!0,components:{ClearIndicator:k.A},onChange:U,options:u&&u,placeholder:t({text:"Thématiques"}),value:L&&L[0]})})),r.createElement("div",{className:"r-filter collapse-filter public-target-Filter"},r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement(o.Ay,{styles:S.o,name:"taxonomy_event_public",className:"library-topics",isClearable:!0,components:{ClearIndicator:k.A},onChange:U,options:O&&O,placeholder:t({text:"Public cible"}),value:V&&V[0]})})),r.createElement("div",{className:"r-filter collapse-filter iam-Filter"},r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement(o.Ay,{styles:S.o,name:"iam",className:"library-topics",isClearable:!0,components:{ClearIndicator:k.A},onChange:U,options:_.c&&_.c,placeholder:t({text:"Profil"}),value:F&&F[0]})})))))};var U=a(18874),q=a(4769),z=a.n(q),L=a(8872);a(1053);const B=["u"];function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,l,c,o=[],i=!0,s=!1;try{if(l=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=l.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}const Z=e=>{let t=e.queryUrl,a=e.onChange,n=e.onlyPastEvents,c=e.contextAuthenticatedUser,o=(0,l.Zp)();const m=Object.assign({UID:A.A.parse((0,U.A)().toString()).u,fullobjects:1,"event_dates.query":z()().format("YYYY-MM-DD"),"event_dates.range":"True"===n?"max":"min"}),u=(m.u,function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(m,B)),d=V((0,r.useState)(u),2),p=d[0],f=d[1],v=V((0,r.useState)({}),2),h=v[0],g=v[1],E=V((0,r.useState)([]),2),y=E[0],b=E[1],w=V((0,r.useState)(),2),x=w[0],N=w[1],O=V((0,r.useState)(),2),_=O[0],S=O[1],k=V((0,r.useState)(),2),H=k[0],M=k[1],j=V((0,r.useState)(!1),2),D=j[0],C=j[1],P=(0,r.useRef)(),I=(0,i.A)({method:"get",url:"",baseURL:t,headers:{Accept:"application/json"},params:p},[]),Y=I.response,T=(I.error,I.isLoading);function q(){o(".."),a(null)}(0,r.useEffect)(()=>{f(u)},[A.A.parse((0,U.A)().toString()).u]),(0,r.useEffect)(()=>{null!==Y&&(g(Y.items[0]),Y.items.length>1?Y.items.map((e,t)=>{z().tz(e.start,"Europe/Brussels").isSameOrAfter(z().tz("Europe/Brussels"))&&b(t=>[...t,e.start])}):b(null)),window.scrollTo({top:0,left:0,behavior:"instant"})},[Y]),(0,r.useEffect)(()=>{h.items&&h.items.length>0&&(N(h.items.filter(e=>"File"===e["@type"])),S(h.items.filter(e=>"Image"===e["@type"])))},[h]),(0,r.useEffect)(()=>{if(h.image_affiche_scale){const e=new Image;e.src=h.image_affiche_scale,e.onload=()=>{M(e)}}},[h]),(0,r.useEffect)(()=>{if(!h||!h.title)return;document.title=h.title;const e=(null==H?void 0:H.width)||"",t=(null==H?void 0:H.height)||"";[{name:"description"},{property:"og:title"},{property:"og:description"},{property:"og:url"},{property:"og:type"},{property:"og:image"},{property:"og:image:type"},{property:"og:image:alt"},{property:"og:image:width"},{property:"og:image:height"}].forEach(e=>{let t=e.name,a=e.property;const r=t?'meta[name="'.concat(t,'"]'):'meta[property="'.concat(a,'"]'),n=document.head.querySelector(r);n&&document.head.removeChild(n)});const a=[{name:"description",content:[h.subtitle,h.description].filter(Boolean).join(" - ")},{property:"og:title",content:h.title},{property:"og:description",content:[h.subtitle,h.description].filter(Boolean).join(" - ")},{property:"og:url",content:"undefined"!=typeof window?window.location.href:""},{property:"og:type",content:"event"}];h.image_affiche_scale&&(a.push({property:"og:image",content:h.image_affiche_scale}),e&&t&&(a.push({property:"og:image:width",content:e}),a.push({property:"og:image:height",content:t}))),a.forEach(e=>{let t=e.name,a=e.property,r=e.content;const n=document.createElement("meta");t&&n.setAttribute("name",t),a&&n.setAttribute("property",a),n.setAttribute("content",r),document.head.appendChild(n)})},[h,H]),(0,r.useEffect)(()=>{const e=e=>{P.current&&!P.current.contains(e.target)&&G()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),z().locale("be");const F=z().tz(h.start,"Europe/Brussels").format("DD-MM-YYYY"),Z=z().tz(h.end,"Europe/Brussels").format("DD-MM-YYYY"),R=z().tz(h.start,"Europe/Brussels").format("LT"),W=z().tz(h.end,"Europe/Brussels").format("LT"),K=z()(),$=y&&y.filter(e=>z()(e).isAfter(K));let J="https://www.google.com/maps/dir/?api=1&destination="+h.street+"+"+h.number+"+"+h.complement+"+"+h.zipcode+"+"+h.city;J=J.replaceAll("+null","");let Q=[h.number,h.street,h.complement,h.zipcode,h.city].filter(Boolean).join(" ");const G=()=>{C(!1)},X=e=>{let t=e.text;return r.createElement("span",null,r.createElement(s.HT,{text:t})," ")},ee=e=>{let t=e.time,a=e.className,n=void 0===a?"r-time":a;return r.createElement("div",{className:n},t)},te=e=>{let t=e.startHours,a=e.endHours;return r.createElement(r.Fragment,null,r.createElement("span",null,r.createElement(s.HT,{text:"de"})," "),r.createElement(ee,{time:t,className:"r-time-hours"}),r.createElement("span",null," ",r.createElement(s.HT,{text:"à"})," "),r.createElement(ee,{time:a,className:"r-time-hours"}))},ae=()=>h.whole_day?r.createElement("div",{className:"r-content-date-start"},r.createElement(X,{text:"Le"}),r.createElement(ee,{time:F})):r.createElement("div",{className:"r-content-date-one-day"},r.createElement("div",{className:"r-content-date-start"},r.createElement(X,{text:"Le"}),r.createElement(ee,{time:F}),r.createElement("span",null," ",r.createElement(s.HT,{text:"à"})," "),r.createElement(ee,{time:R,className:"r-time-hours"}))),re=()=>F!==Z?r.createElement("div",{className:"r-content-date-du-au"},r.createElement("div",{className:"r-content-date-start"},r.createElement("span",null,"Du "),r.createElement(ee,{time:F})),r.createElement("div",{className:"r-content-date-end"},r.createElement("span",null," au "),r.createElement(ee,{time:Z})),h.whole_day?"":r.createElement("div",{className:"r-content-date-start-hours"},r.createElement(te,{startHours:R,endHours:W}))):r.createElement("div",{className:"r-content-date-one-day"},r.createElement("div",{className:"r-content-date-start"},r.createElement(X,{text:"Le"}),r.createElement(ee,{time:F})),h.whole_day?"":r.createElement("div",{className:"r-content-date-start-hours"},r.createElement(te,{startHours:R,endHours:W})));return T?r.createElement("div",{className:"lds-roller-container"},r.createElement(s.HT,{text:"Chargement..."}),r.createElement("div",{className:"lds-roller"},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))):r.createElement("div",{className:"envent-content r-content"},r.createElement(s.rk,null,e=>{let t=e.translate;return r.createElement("button",{type:"button",onClick:q,"aria-label":t({text:"Retour à la liste"}),title:t({text:"Retour à la liste"}),className:"r-back-button"},r.createElement("i",{class:"bi bi-arrow-left-short"}))}),"False"===c?r.createElement("a",{href:h["@id"],target:"_blank",title:"Editer la fiche",className:"edit-rest-elements edit-rest-elements-content"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-pencil-square",viewBox:"0 0 16 16"},r.createElement("path",{d:"M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"}),r.createElement("path",{"fill-rule":"evenodd",d:"M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"}))):"",r.createElement("article",null,r.createElement("header",{className:"r-content-header"},r.createElement("h2",{className:"r-content-title"},h.title),h.local_category?r.createElement("span",{className:"r-content-title-cat"},h.local_category.title):"",h.category?r.createElement("span",{className:"r-content-title-cat"},h.category.title):"",r.createElement("span",null)),r.createElement("figure",null,r.createElement("div",{className:"r-content-img",style:{backgroundImage:h.image_affiche_scale?"url("+h.image_affiche_scale+")":""}})),r.createElement("span",{className:"news-info-title"},r.createElement(s.HT,{text:"Infos pratiques"})),r.createElement("div",{className:"r-content-news-info"},r.createElement("div",{className:"r-content-news-info-container"},r.createElement("div",{className:"r-content-news-info-schedul"},r.createElement("div",{className:"icon-baseline"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMinYMin",viewBox:"0 0 19.41 19.41"},r.createElement("path",{d:"M16.09,2.74H14.35V.85a.44.44,0,0,0-.43-.44H12.47A.44.44,0,0,0,12,.85V2.74H7.38V.85A.44.44,0,0,0,7,.41H5.5a.44.44,0,0,0-.44.44V2.74H3.32A1.74,1.74,0,0,0,1.58,4.48V17.26A1.74,1.74,0,0,0,3.32,19H16.09a1.74,1.74,0,0,0,1.75-1.74V4.48A1.74,1.74,0,0,0,16.09,2.74Zm-.21,14.52H3.54A.22.22,0,0,1,3.32,17h0V6.22H16.09V17a.21.21,0,0,1-.21.22Z"}))),r.createElement("div",{ref:P,className:"dpinlb"},!y&&r.createElement("div",{className:"r-content-news-info--date"},h.open_end?r.createElement("div",null,ae()):re()),y&&r.createElement("a",{onClick:()=>{C(!0)},className:"recurence-schedul",role:"button","aria-expanded":"false"},r.createElement("p",null,h.open_end?r.createElement("div",{className:"r-content-news-recurrence-date"},ae()):re(),r.createElement("span",{className:"recurence-schedul-more"},r.createElement(s.HT,{text:"Prochaines dates"}),r.createElement("i",{className:"bi bi-arrow-down-short"}))),r.createElement("div",{className:D?"recurence-modal-display":"recurence-modal-hide"},r.createElement("ul",null,$.map((e,t)=>r.createElement("li",{key:t},z().tz(e,"Europe/Brussels").format("DD-MM-YYYY")))))))),r.createElement("div",{className:"r-content-news-info-aera"},h.street?r.createElement("div",{className:"icon-baseline"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.41 19.41"},r.createElement("path",{d:"M9,18.34C3.9,10.94,3,10.18,3,7.45a6.75,6.75,0,0,1,13.49,0c0,2.73-.94,3.49-6,10.89a.85.85,0,0,1-1.17.22A.77.77,0,0,1,9,18.34Zm.7-8.07A2.82,2.82,0,1,0,6.89,7.45a2.83,2.83,0,0,0,2.82,2.82Z"}))):"",r.createElement("div",{className:"dpinlb"},r.createElement("div",{className:"r-content-news-info--itinirary"},h.street?r.createElement("a",{href:J,target:"_blank"},r.createElement("span",null,Q)):""),!0===h.reduced_mobility_facilities?r.createElement("div",{className:"r-content-news-info--reduced"},r.createElement("span",null,r.createElement(s.HT,{text:"Accessible aux PMR"}))):"",!0===h.free_entry?r.createElement("div",{className:"r-content-news-info--entry"},r.createElement("span",null,r.createElement(s.HT,{text:"Gratuit"}))):"")),(h.contact_name||h.contact_phone||h.contact_email)&&r.createElement("div",{className:"r-content-news-info-contact"},r.createElement("div",{className:"dpinlb"},r.createElement("div",{className:"r-content-news-info--name"},r.createElement("span",null,h.contact_name)),r.createElement("div",{className:"r-content-news-info--phone"},r.createElement("span",null,r.createElement("a",{href:"tel:".concat(h.contact_phone)},h.contact_phone))),r.createElement("div",{className:"r-content-news-info--email"},r.createElement("a",{href:"mailto:".concat(h.contact_email)},h.contact_email)))),null===h.event_url&&null===h.online_participation&&null===h.video_url?"":r.createElement("div",{className:"r-content-news-info-link"},r.createElement("div",{className:"icon-baseline"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.41 19.41"},r.createElement("path",{d:"M16.36,2.22H3.06a1.3,1.3,0,0,0-1.3,1.3h0v9a1.3,1.3,0,0,0,1.3,1.3H7.52v1.74h-.7a.8.8,0,0,0,0,1.6h5.79a.8.8,0,0,0,0-1.6h-.7V13.85h4.45a1.31,1.31,0,0,0,1.3-1.3v-9A1.3,1.3,0,0,0,16.36,2.22Zm-1.9,10.83a.37.37,0,1,1,.36-.37h0a.36.36,0,0,1-.36.36Zm1.6.08a.45.45,0,1,1,.44-.45h0a.44.44,0,0,1-.44.45h0Zm.53-1.35H2.82V3.52a.23.23,0,0,1,.23-.23H16.36a.23.23,0,0,1,.23.23h0v8.27Z"}))),r.createElement("div",{className:"dpinlb"},null===h.event_url?"":r.createElement("div",{className:"r-content-news-info-event_link"},r.createElement("a",{href:h.event_url},r.createElement(s.HT,{text:"Lien de l'événement"}))),null===h.online_participation?"":r.createElement("div",{className:"r-content-news-info--online_participation"},r.createElement("a",{href:h.online_participation},r.createElement(s.HT,{text:"Participation en ligne"}))),null===h.video_url?"":r.createElement("div",{className:"r-content-news-info--video"},r.createElement("a",{href:h.video_url},r.createElement(s.HT,{text:"Lien vers la vidéo"}))))),null===h.facebook&&null===h.instagram&&null===h.twitter?"":r.createElement("div",{className:"r-content-news-info-social"},r.createElement("ul",null,h.facebook?r.createElement("li",null,r.createElement("a",{href:h.facebook,target:"_blank"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"800",width:"1200",viewBox:"-204.79995 -341.33325 1774.9329 2047.9995"},r.createElement("path",{d:"M1365.333 682.667C1365.333 305.64 1059.693 0 682.667 0 305.64 0 0 305.64 0 682.667c0 340.738 249.641 623.16 576 674.373V880H402.667V682.667H576v-150.4c0-171.094 101.917-265.6 257.853-265.6 74.69 0 152.814 13.333 152.814 13.333v168h-86.083c-84.804 0-111.25 52.623-111.25 106.61v128.057h189.333L948.4 880H789.333v477.04c326.359-51.213 576-333.635 576-674.373",fill:"#100f0d"}),r.createElement("path",{d:"M948.4 880l30.267-197.333H789.333V554.609C789.333 500.623 815.78 448 900.584 448h86.083V280s-78.124-13.333-152.814-13.333c-155.936 0-257.853 94.506-257.853 265.6v150.4H402.667V880H576v477.04a687.805 687.805 0 00106.667 8.293c36.288 0 71.91-2.84 106.666-8.293V880H948.4",fill:"#fff"})))):"",h.instagram?r.createElement("li",null,r.createElement("a",{href:h.instagram,target:"_blank"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"800",width:"1200",viewBox:"-100.7682 -167.947 873.3244 1007.682"},r.createElement("g",{fill:"#100f0d"},r.createElement("path",{d:"M335.895 0c-91.224 0-102.663.387-138.49 2.021-35.752 1.631-60.169 7.31-81.535 15.612-22.088 8.584-40.82 20.07-59.493 38.743-18.674 18.673-30.16 37.407-38.743 59.495C9.33 137.236 3.653 161.653 2.02 197.405.386 233.232 0 244.671 0 335.895c0 91.222.386 102.661 2.02 138.488 1.633 35.752 7.31 60.169 15.614 81.534 8.584 22.088 20.07 40.82 38.743 59.495 18.674 18.673 37.405 30.159 59.493 38.743 21.366 8.302 45.783 13.98 81.535 15.612 35.827 1.634 47.266 2.021 138.49 2.021 91.222 0 102.661-.387 138.488-2.021 35.752-1.631 60.169-7.31 81.534-15.612 22.088-8.584 40.82-20.07 59.495-38.743 18.673-18.675 30.159-37.407 38.743-59.495 8.302-21.365 13.981-45.782 15.612-81.534 1.634-35.827 2.021-47.266 2.021-138.488 0-91.224-.387-102.663-2.021-138.49-1.631-35.752-7.31-60.169-15.612-81.534-8.584-22.088-20.07-40.822-38.743-59.495-18.675-18.673-37.407-30.159-59.495-38.743-21.365-8.302-45.782-13.981-81.534-15.612C438.556.387 427.117 0 335.895 0zm0 60.521c89.686 0 100.31.343 135.729 1.959 32.75 1.493 50.535 6.965 62.37 11.565 15.68 6.094 26.869 13.372 38.622 25.126 11.755 11.754 19.033 22.944 25.127 38.622 4.6 11.836 10.072 29.622 11.565 62.371 1.616 35.419 1.959 46.043 1.959 135.73 0 89.687-.343 100.311-1.959 135.73-1.493 32.75-6.965 50.535-11.565 62.37-6.094 15.68-13.372 26.869-25.127 38.622-11.753 11.755-22.943 19.033-38.621 25.127-11.836 4.6-29.622 10.072-62.371 11.565-35.413 1.616-46.036 1.959-135.73 1.959-89.694 0-100.315-.343-135.73-1.96-32.75-1.492-50.535-6.964-62.37-11.564-15.68-6.094-26.869-13.372-38.622-25.127-11.754-11.753-19.033-22.943-25.127-38.621-4.6-11.836-10.071-29.622-11.565-62.371-1.616-35.419-1.959-46.043-1.959-135.73 0-89.687.343-100.311 1.959-135.73 1.494-32.75 6.965-50.535 11.565-62.37 6.094-15.68 13.373-26.869 25.126-38.622 11.754-11.755 22.944-19.033 38.622-25.127 11.836-4.6 29.622-10.072 62.371-11.565 35.419-1.616 46.043-1.959 135.73-1.959"}),r.createElement("path",{d:"M335.895 447.859c-61.838 0-111.966-50.128-111.966-111.964 0-61.838 50.128-111.966 111.966-111.966 61.836 0 111.964 50.128 111.964 111.966 0 61.836-50.128 111.964-111.964 111.964zm0-284.451c-95.263 0-172.487 77.224-172.487 172.487 0 95.261 77.224 172.485 172.487 172.485 95.261 0 172.485-77.224 172.485-172.485 0-95.263-77.224-172.487-172.485-172.487m219.608-6.815c0 22.262-18.047 40.307-40.308 40.307-22.26 0-40.307-18.045-40.307-40.307 0-22.261 18.047-40.308 40.307-40.308 22.261 0 40.308 18.047 40.308 40.308"}))))):"",h.twitter?r.createElement("li",null,r.createElement("a",{href:h.twitter,target:"_blank"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"800",width:"1200",viewBox:"-44.7006 -60.54775 387.4052 363.2865"},r.createElement("path",{fill:"#000",d:"M93.719 242.19c112.46 0 173.96-93.168 173.96-173.96 0-2.646-.054-5.28-.173-7.903a124.338 124.338 0 0030.498-31.66c-10.955 4.87-22.744 8.148-35.11 9.626 12.622-7.57 22.313-19.543 26.885-33.817a122.62 122.62 0 01-38.824 14.841C239.798 7.433 223.915 0 206.326 0c-33.764 0-61.144 27.381-61.144 61.132 0 4.798.537 9.465 1.586 13.941-50.815-2.557-95.874-26.886-126.03-63.88a60.977 60.977 0 00-8.279 30.73c0 21.212 10.794 39.938 27.208 50.893a60.685 60.685 0 01-27.69-7.647c-.009.257-.009.507-.009.781 0 29.61 21.075 54.332 49.051 59.934a61.218 61.218 0 01-16.122 2.152 60.84 60.84 0 01-11.491-1.103c7.784 24.293 30.355 41.971 57.115 42.465-20.926 16.402-47.287 26.171-75.937 26.171-4.929 0-9.798-.28-14.584-.846 27.059 17.344 59.189 27.464 93.722 27.464"})))):""))),r.createElement("div",{className:"r-content-news-info-action"},h.ticket_url?r.createElement("div",{className:"r-content-booking"},r.createElement("a",{href:h.ticket_url},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.41 19.41"},r.createElement("circle",{cx:"13.03",cy:"14.61",r:"0.63",fill:"fill:#fff"}),r.createElement("circle",{cx:"11.59",cy:"6.52",r:"0.63",fill:"fill:#fff"}),r.createElement("path",{d:"M17.11,11.47h.62V7.71h-1.6a1.25,1.25,0,0,1-1.25-1.25,1.27,1.27,0,0,1,.67-1.12l.54-.28-1.6-3.39-12.8,6h0v3.76h.63a1.26,1.26,0,0,1,0,2.51H1.68v3.76H17.73V14h-.62a1.26,1.26,0,1,1,0-2.51Zm-6.9-6.4a.63.63,0,0,0,1.14-.53l2.54-1.2.58,1.23A2.52,2.52,0,0,0,14,7.71H4.63Zm6.27,10.08v1.34H13.66a.63.63,0,1,0-1.26,0H2.93V15.16a2.51,2.51,0,0,0,0-4.86V9H12.4a.63.63,0,0,0,1.26,0h2.82V10.3a2.51,2.51,0,0,0,0,4.86Z",fill:"fill:#fff"}),r.createElement("circle",{cx:"13.03",cy:"10.85",r:"0.63",fill:"fill:#fff"}),r.createElement("circle",{cx:"13.03",cy:"12.73",r:"0.63",fill:"fill:#fff"})),r.createElement(s.HT,{text:"Billetterie"}))):"")),r.createElement("div",{className:"r-content-description"},r.createElement(L.oz,null,h.description)),r.createElement("div",{className:"r-content-text",dangerouslySetInnerHTML:{__html:h.text&&h.text.data}}),x&&r.createElement("div",{className:"r-content-files"},x.map((e,t)=>r.createElement("div",{key:t,className:"r-content-file"},r.createElement("a",{href:e.targetUrl,className:"r-content-file-link",rel:"nofollow"},r.createElement("div",{className:"r-content-file-title"},e.title,r.createElement("span",{className:"r-content-file-title-size"},Number(e.file.size/1e3).toFixed(2)," KB")),r.createElement("span",{className:"r-content-file-icon"},r.createElement("svg",{width:"21",height:"21",viewBox:"0 0 24 24",fill:"none",stroke:"#8899a4","stroke-width":"2","stroke-linecap":"square","stroke-linejoin":"arcs"},r.createElement("path",{d:"M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"}))," "))))),_&&r.createElement("div",{className:"r-content-gallery"},r.createElement("div",{className:"spotlight-group flexbin r-content-gallery"},_.map((e,t)=>r.createElement("a",{key:t,"data-title":e.title,"data-description":e.description,className:"spotlight",href:e.image_full_scale},r.createElement("img",{src:e.image_preview_scale,alt:""}))))),h.topics&&h.topics.length>0&&r.createElement("div",{className:"r-content-topics"},h.topics.map((e,t)=>r.createElement("a",{key:t},r.createElement("span",null,e.title))))))},R=e=>{let t=e.item,a=e.showCategoriesOrTopics,n=e.contextAuthenticatedUser;z().locale("be");const l=t.title&&t.title,c=z().tz(t.start,"Europe/Brussels").format("DD-MM-YYYY"),o=z().tz(t.end,"Europe/Brussels").format("DD-MM-YYYY");return r.createElement(r.Fragment,null,"False"===n?r.createElement("a",{href:t["@id"],target:"_blank",title:"Editer la fiche",className:"edit-rest-elements"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-pencil-square",viewBox:"0 0 16 16"},r.createElement("path",{d:"M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"}),r.createElement("path",{"fill-rule":"evenodd",d:"M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"}))):"",r.createElement("div",{className:"r-list-item"},r.createElement("div",{className:t.image_vignette_scale?"r-item-img":"r-item-img r-item-img-placeholder",style:{backgroundImage:t.image_vignette_scale?"url("+t.image_vignette_scale+")":""}}),r.createElement("div",{className:"r-item-text"},c&&r.createElement("span",{className:"r-item-date"},t.open_end||c===o?c:r.createElement(r.Fragment,null,c," ",r.createElement(s.HT,{text:"au"})," ",o)),r.createElement("span",{className:"r-item-title"},l),"topic"===a?t.topics&&t.topics[0]&&r.createElement("span",{className:"r-item-categorie"},t.topics[0].title):"category"===a?t.local_category?r.createElement("span",{className:"r-item-categorie"},t.local_category.title):t.category&&r.createElement("span",{className:"r-item-categorie"},t.category.title):"")))};var W=a(75681),K=a.n(W);const $=e=>{let t=e.itemsArray,a=e.onChange,l=e.onHover,o=e.showCategoriesOrTopics,i=e.contextAuthenticatedUser;const s=(0,r.useContext)(c.z),m=s.scrollPos,u=s.updateScrollPos;function d(e){l(e)}return(0,r.useEffect)(()=>{window.scrollTo({top:m,left:0,behavior:"instant"})},[t]),(0,r.useEffect)(()=>{[{name:"description"},{property:"og:title"},{property:"og:description"},{property:"og:url"},{property:"og:type"},{property:"og:image"},{property:"og:image:type"},{property:"og:image:alt"},{property:"og:image:width"},{property:"og:image:height"}].forEach(e=>{let t=e.name,a=e.property;const r=t?'meta[name="'.concat(t,'"]'):'meta[property="'.concat(a,'"]'),n=document.head.querySelector(r);n&&document.head.removeChild(n)});[{name:"description",content:"Agenda"},{property:"og:title",content:"Agenda"},{property:"og:description",content:"Agenda"},{property:"og:url",content:"undefined"!=typeof window?window.location.href:""},{property:"og:type",content:"website"}].forEach(e=>{let t=e.name,a=e.property,r=e.content;const n=t?'meta[name="'.concat(t,'"]'):'meta[property="'.concat(a,'"]');let l=document.head.querySelector(n);l||(l=document.createElement("meta"),t&&l.setAttribute("name",t),a&&l.setAttribute("property",a),document.head.appendChild(l)),l.setAttribute("content",r)})},[]),r.createElement(r.Fragment,null,r.createElement("ul",{className:"r-result-list event-result-list"},t.map((e,t)=>r.createElement("li",{key:t,className:"r-list-item-group",onMouseEnter:()=>d(e.UID),onMouseLeave:()=>d(null),onClick:()=>{return t=e.UID,a(t),void u(window.scrollY);var t}},r.createElement(n.N_,{className:"r-list-item-link",style:{textDecoration:"none"},to:{pathname:"/"+K()(e.title).replace(/[^a-zA-Z ]/g,"").replace(/\s/g,"-").toLowerCase(),search:"?u=".concat(e.UID),state:{idItem:e.UID}}}),r.createElement(R,{item:e,showCategoriesOrTopics:o,key:e.created,contextAuthenticatedUser:i})))))};var J=a(97378),Q=a(48743);const G=["u"];function X(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,r)}return a}function ee(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?X(Object(a),!0).forEach(function(t){te(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):X(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function te(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,l,c,o=[],i=!0,s=!1;try{if(l=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=l.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return re(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function ne(e){const t=ae((0,r.useState)(0),2),a=t[0],l=t[1];return r.createElement(n.Kd,{basename:e.viewPath},r.createElement(s.Kq,{language:e.currentLanguage,translation:Q.A},r.createElement(c.z.Provider,{value:{scrollPos:a,updateScrollPos:e=>{l(e)}}},r.createElement(le,{queryFilterUrl:e.queryFilterUrl,queryUrl:e.queryUrl,proposeUrl:e.proposeUrl,batchSize:e.batchSize,displayMap:e.displayMap,onlyPastEvents:e.onlyPastEvents,language:e.currentLanguage,showCategoriesOrTopics:e.showCategoriesOrTopics,contextAuthenticatedUser:e.contextAuthenticatedUser}))))}function le(e){const t=Object.assign({b_start:0,"event_dates.query":[p()().format("YYYY-MM-DD")],"event_dates.range":"True"===e.onlyPastEvents?"max":"min"},A.A.parse((0,U.A)().toString())),a=(t.u,function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(t,G)),n=(0,r.useContext)(c.z),o=(n.scrollPos,n.updateScrollPos),m=ae((0,r.useState)(null),2),u=m[0],d=m[1],f=ae((0,r.useState)([]),2),v=f[0],h=f[1],g=ae((0,r.useState)(null),2),E=g[0],y=g[1],b=ae((0,r.useState)(null),2),w=b[0],x=b[1],N=ae((0,r.useState)(a),2),O=N[0],_=N[1],S=ae((0,r.useState)(0),2),k=S[0],H=S[1],M=ae((0,r.useState)(!1),2),j=M[0],D=M[1],C="True"===e.displayMap,P=(0,i.A)({method:"get",url:"",baseURL:e.queryUrl,headers:{Accept:"application/json"},params:O,paramsSerializer:{indexes:null},load:j},[]),I=P.response,Y=(P.error,P.isLoading),q=P.isMore;(0,r.useEffect)(()=>{null!==I&&(d(q?e=>[...e,...I.items]:I.items),h(I.items_total))},[I]);const z=e=>{y(e)},L=e=>{x(e)};(0,r.useEffect)(()=>{_(e=>ee(ee({},e),{},{b_start:k}))},[k]);const B=(0,r.useRef)(),V=ae(r.useState({height:0}),2),F=V[0],R=V[1],W=ae((0,r.useState)(0),2),K=W[0],Q=W[1];let X,te;(0,r.useEffect)(()=>{R({height:B.current.clientHeight}),Q(B.current.offsetTop)},[B]),u&&u.length>0?(X=r.createElement($,{onChange:z,itemsArray:u,onHover:L,showCategoriesOrTopics:e.showCategoriesOrTopics,contextAuthenticatedUser:e.contextAuthenticatedUser}),te=r.createElement(J.A,{headerHeight:F.height+K,clickId:E,hoverId:w,items:u,queryUrl:e.queryUrl})):Y||(X=r.createElement("p",{role:"status","aria-live":"polite"},r.createElement(s.HT,{text:"Aucun événement n'a été trouvé"})));const re=r.createElement("div",{className:"lds-roller-container"},r.createElement(s.HT,{text:"Chargement..."}),r.createElement("div",{className:"lds-roller"},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null)));return r.createElement("div",{className:"ref ".concat(C?"view-map":"no-map")},r.createElement("div",{className:"r-result-filter-container",ref:B,style:{top:K}},r.createElement("div",{id:"r-result-filter",className:"r-result-filter container annuaire-result-filter"},r.createElement(T,{url:e.queryFilterUrl,activeFilter:O,onChange:e=>{D(!1),H(()=>0),_(e),window.scrollTo(0,0)},language:e.language,onlyPastEvents:e.onlyPastEvents}),r.createElement("div",{className:"r-result-numbers-and-add-container"},v>0?r.createElement("p",{role:"status","aria-live":"polite",className:"r-results-numbers","aria-label":"".concat(v,v>1?" événements trouvés":" événement trouvé")},r.createElement("span",{"aria-hidden":"true"},v),r.createElement(s.HT,{text:v>1?"événements trouvés":"événement trouvé"})):r.createElement("p",{role:"status","aria-live":"polite",className:"r-results-numbers"},r.createElement(s.HT,{text:"Aucun résultat"})),e.proposeUrl&&r.createElement("div",{className:"r-add-event"},r.createElement("a",{target:"_blank",href:e.proposeUrl},r.createElement(s.HT,{text:"Proposer un événement"}),r.createElement("div",{className:"r-add-event-icon"},r.createElement("svg",{"data-name":"Calque 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 668.26 676.14"},r.createElement("path",{d:"M162.9 51.83h304.7c-1.03-10.91-1.97-24.53-1.03-35.5.99-11.58 10.86-20.92 21.97-13.91 1.52.96 6.04 6.64 6.04 7.95v41.46h96.41c17.66 0 37.58 21.03 38.34 38.59l.15 330.53c64.12 72.13 46.53 184.36-36.31 233.47-75.97 45.03-172.33 17.55-214.13-59.16-3.7-.39-7.11.99-10.77 1.09-107.79 2.79-215.98-2.19-323.81-.04-23.59-1.48-41.85-16.37-44.42-40.43V92.25c-.86-17.33 20.73-40.42 37.5-40.42h98.4V10.37c0-4.74 8.82-10.3 13.49-10.3s13.49 5.56 13.49 10.3v41.46ZM135.93 78.8H42.52c-1.85 0-7.83 3.01-9.52 4.47-1.81 1.55-5.97 8.02-5.97 10.02v70.43h574.44V92.29c0-5.05-9.56-13.49-14.49-13.49h-92.41v42.46c0 .36-3.72 4.88-4.48 5.51-10.2 8.49-22.25.77-23.48-11.51-1.08-10.75.17-24.22.74-35l-1.26-1.45H162.9v41.46c0 7.08-11.03 10.55-17.26 9.26-3.19-.66-9.72-6.23-9.72-9.26V78.81Zm465.54 111.89H27.03v364.14c0 3.51 9.3 13.49 12.49 13.49H366.2c.09 0 2.2 2.45 1.48-.48-.85-3.46-2.9-7.53-3.68-11.31C339.69 439.65 444.15 343.54 558.51 376c15.31 4.35 29.93 11.48 42.96 20.48v-205.8Zm-92.11 206.1c-101.67 3.96-158.34 120.93-95.1 202.4 61.94 79.8 185.04 60.07 219.2-34.35 30.3-83.75-35.93-171.5-124.1-168.06Z"}),r.createElement("path",{d:"M125.7 391.75c8.2-1.12 36.31-1.31 43.21 2.24 4.23 2.17 7.43 7.25 8.01 11.97 1.03 8.47.83 29.33.01 38.03-.55 5.9-3.6 11.52-9.48 13.5-5.74 1.92-34.71 1.64-42.05.99-6.3-.56-11.32-3.28-13.49-9.48-1.64-4.67-1.8-39.01-.89-44.94 1.09-7.08 8.1-11.4 14.68-12.29ZM125.47 269.22c8.01-1.33 34.99-1.74 41.96 1.37 5.91 2.63 8.74 7.04 9.47 13.51.95 8.47.9 28.46.05 37.02-.61 6.11-3.52 11.39-9.5 13.48-5.4 1.89-34.95 1.62-42.05.99-6.3-.56-11.32-3.28-13.49-9.48-1.65-4.7-1.77-39.02-.72-44.77 1.37-7.53 7.35-10.97 14.28-12.12ZM240.17 395.84c1.14-1.03 2.71-1.76 4.13-2.36 7.13-2.98 31.5-2.79 40.02-2.03 7.6.68 15.47 5.26 16.47 13.5 1.07 8.86.9 30.97.03 40.03-.74 7.63-5.97 12.63-13.53 13.44-8.95.96-29 .92-38.02.05-6.71-.65-12.62-5.56-13.46-12.52-1.1-9.15-.84-30.59-.02-40.02.32-3.67 1.58-7.58 4.38-10.1ZM249.56 268.86c7.35-1.15 35.4-1.11 41.75 1.73 3.79 1.69 7.16 4.42 8.51 8.47 1.88 5.61 1.69 35.87 1 43.06-.56 5.75-3.95 10.54-9.49 12.49-5.17 1.81-35.3 1.67-42.01.95s-12.66-5.45-13.51-12.47c-.92-7.69-1.05-35.52.26-42.74 1.07-5.88 7.83-10.6 13.49-11.48ZM528.54 509.38h56.44c5.87 0 11.61 8.82 11.58 14.49-.02 4.58-6.21 13.48-10.58 13.48h-57.44v54.45c0 2.01-3.75 9.07-5.47 10.51-7.92 6.68-22.5.53-22.5-9.51v-55.45h-57.44c-1.37 0-6.91-4.49-7.94-6.04-4.48-6.74-2.95-15.54 4.1-19.78.66-.4 4.58-2.15 4.84-2.15h56.44v-55.45c0-1.11 3.57-7.51 4.75-8.51 6.23-5.29 17.03-3.45 21.09 3.65.4.69 2.13 5.5 2.13 5.86v54.45Z"})))))))),r.createElement(l.BV,null,r.createElement(l.qh,{exact:!0,path:"/",element:r.createElement("div",{className:"r-wrapper container r-annuaire-wrapper"},r.createElement("div",{className:"r-result r-annuaire-result"},r.createElement("div",null,null!==u?X:re),r.createElement("div",{className:"r-load-more"},v-e.batchSize>k?r.createElement("div",null,r.createElement("span",{className:"no-more-result"},Y?re:""),r.createElement("button",{onClick:()=>{o(window.scrollY),H(t=>t+parseInt(e.batchSize)),D(!0)},className:"btn-grad"},Y?r.createElement(s.HT,{text:"Chargement..."}):r.createElement(s.HT,{text:"Plus de résultats"}))):r.createElement("span",{className:"no-more-result"},Y?re:""))),C&&r.createElement("div",{className:"r-map annuaire-map",style:{top:F.height+K,height:"calc(100vh-"+F.height+K}},te))}),r.createElement(l.qh,{path:"/:name",element:r.createElement("div",{className:"r-wrapper container r-annuaire-wrapper"},r.createElement("div",{className:"r-result r-annuaire-result"},r.createElement(Z,{queryUrl:e.queryUrl,onChange:z,onlyPastEvents:e.onlyPastEvents,contextAuthenticatedUser:e.contextAuthenticatedUser})),C&&r.createElement("div",{className:"r-map annuaire-map",style:{top:F.height+K,height:"calc(100vh-"+F.height+K}},te))})))}},94274(e,t,a){a.d(t,{c:()=>r});const r=[{label:"Commerçant",value:"merchant"},{label:"Demandeur d'emploi",value:"job_seeker"},{label:"En situation de handicap",value:"disabled_person"},{label:"Jeune",value:"young"},{label:"Journaliste",value:"journalist"},{label:"Nouvel arrivant",value:"newcomer"},{label:"Organisateur d'événement",value:"event_planner"},{label:"Parent",value:"parent"},{label:"Senior",value:"elder"},{label:"Touriste",value:"tourist"}]},88562(e,t,a){a.d(t,{A:()=>i});var r=a(25602),n=a(83198),l=a(59843);const c=["ref"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},o.apply(null,arguments)}const i=e=>{const t=e.children,a=void 0===t?l.c.ClearIndicator(e):t,i=e.innerProps,s=i.ref,m=function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(i,c);return r.createElement(n.rk,null,e=>{let t=e.translate;return r.createElement("div",o({},m,{ref:s,tabIndex:0,role:"button","aria-label":t({text:"Effacer la sélection"}),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m.onMouseDown(e))}}),a)})}},97378(e,t,a){a.d(t,{A:()=>x});var r=a(25602),n=a(28009),l=a(69780),c=a(77059),o=a(60055),i=a(16545),s=a(18874),m=a(97284),u=a.n(m),d=a(62678),p=a(14541),f=a(8174),v=a(75681),h=a.n(v),g=a(72668);const E=["u"];function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,l,c,o=[],i=!0,s=!1;try{if(l=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=l.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function w(e){let t=e.activeItem,a=e.arrayOfLatLngs;const r=(0,n.ko)();if(t){const e=[];e.push(t.geolocation.latitude),e.push(t.geolocation.longitude),r.setView(e,15)}else{let e=new(u().LatLngBounds)(a);r.fitBounds(e)}return null}const x=function(e){const t=y((0,r.useState)(null),2),a=t[0],n=t[1],m=y((0,r.useState)([]),2),v=m[0],b=m[1],x=y((0,r.useState)(null),2),N=x[0],A=x[1],O=Object.assign({UID:g.A.parse((0,s.A)().toString()).u}),_=(O.u,function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(O,E));(0,r.useEffect)(()=>{const t=e.items.filter(e=>e.geolocation.latitude&&50.4989185!==e.geolocation.latitude&&4.7184485!==e.geolocation.longitude);b(t)},[e]);const S=e=>new(u().Icon)({iconUrl:e,iconSize:[29,37]}),k=t=>t===e.clickId||t===e.hoverId?999:1;(0,r.useEffect)(()=>{var e=v&&v.filter(e=>e.UID===_.UID);n(e[0])},[v]),(0,r.useEffect)(()=>{if(v.length>0){let e=[];v.map((t,a)=>{let r=t.geolocation.latitude,n=t.geolocation.longitude;e.push([r,n])}),A(e)}},[v]);const H=v.map((t,a)=>{return r.createElement(c.p,{key:a,icon:(n=t.UID,n===_.UID||n===e.hoverId?S(p.A):S(d.A)),zIndexOffset:k(t.UID),position:[t.geolocation?t.geolocation.latitude:"",t.geolocation?t.geolocation.longitude:""],eventHandlers:{mouseover:e=>{}}},r.createElement(o.z,{closeButton:!1},r.createElement(f.N_,{className:"r-map-popup",style:{textDecoration:"none"},to:{pathname:"/"+h()(t.title).replace(/[^a-zA-Z ]/g,"").replace(/\s/g,"-").toLowerCase(),search:"?u=".concat(t.UID),state:{idItem:t.UID}}},r.createElement("span",{className:"r-map-popup-title"},t.title),r.createElement("p",{className:"r-map-popup-category"},t.category&&t.category.title))));var n});return r.createElement("div",null,r.createElement(l.W,{style:{height:"calc(100vh - ".concat(e.headerHeight,"px)"),minHeight:"600px"},center:[50.85034,4.35171],zoom:15},r.createElement(i.e,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),null!=N?r.createElement(w,{activeItem:a,activeItemUID:_.UID,arrayOfLatLngs:N&&N}):"",v&&H))}}}]); No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix malformed map height CSS expression (invalid calc(...)).

At Line 1, the map style builds height:"calc(100vh-"+F.height+K, which yields an invalid CSS value (missing unit separation/closing format). This can break map sizing.

Use a valid expression like height: \calc(100vh - ${F.height + K}px)`` in the source component, then rebuild the bundle.

🧰 Tools
🪛 Biome (2.4.14)

[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js`
at line 1, The map container style builds an invalid CSS calc string
(height:"calc(100vh-"+F.height+K) in the le component; compute the total offset
as a number (e.g. total = F.height + K) and set the style to a valid expression
such as "calc(100vh - Xpx)" where X is total, and ensure any top value uses
pixel units if needed; update the style object used when rendering the map (the
object referencing F.height and K in le that sets top and height) to construct a
correct CSS string (or numeric pixel value) before rebuilding the bundle.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add rel="noopener noreferrer" to external links opened in a new tab.

At Line 1, multiple anchors use target="_blank" without rel. That leaves a reverse-tabnabbing risk and weakens security posture.

Please add rel="noopener noreferrer" in the source JSX for every external/new-tab link and regenerate this compiled file.
As per coding guidelines, ESLint must enforce zero warnings tolerance.

🧰 Tools
🪛 Biome (2.4.14)

[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js`
at line 1, The compiled bundle contains several anchors with target="_blank" and
no rel attribute; update the source JSX to add rel="noopener noreferrer" to
every external/new-tab anchor (e.g. the edit links and
social/ticket/event/propose links rendered in components R, Z, le and any other
places that create <a href=... target="_blank">) and then rebuild to regenerate
this compiled file so ESLint reports no warnings.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Recurrence toggle uses an anchor as a button without keyboard-safe semantics.

At Line 1, the recurrence control is rendered as <a onClick ... role="button"> without proper keyboard handling/tab semantics. This can make the interaction inaccessible for keyboard users.

Switch to a real <button type="button"> (preferred), or add full keyboard support (tabIndex, Enter/Space handling, accurate aria-expanded) in source and rebuild.

🧰 Tools
🪛 Biome (2.4.14)

[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

(lint/correctness/noSwitchDeclarations)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'return'.

(lint/correctness/noUnsafeFinally)


[error] 1-1: Unsafe usage of 'throw'.

(lint/correctness/noUnsafeFinally)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/imio/smartweb/core/webcomponents/build/js/887.smartweb-webcomponents-compiled.js`
at line 1, The recurrence control is rendered as an anchor with role="button"
(in the component/function Z where you create the element with className
"recurence-schedul" and onClick:()=>{C(!0)}), which is not keyboard-accessible;
change that element to a real <button type="button"> (or at minimum add tabIndex
and key handlers), remove the role="button" on the anchor, bind aria-expanded to
the D state (aria-expanded={D}) and keep the onClick handler (or toggle C) so
keyboard users can activate it; locate the "recurence-schedul" element in the Z
component and replace it accordingly and rebuild.

@remdub remdub merged commit 8055a30 into main May 7, 2026
9 checks passed
@remdub remdub deleted the WEB-4418 branch May 7, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant