imio.smartweb.core 1.2.11__py3-none-any.whl → 1.2.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imio/smartweb/core/browser/configure.zcml +1 -1
- imio/smartweb/core/browser/dashboards/configure.zcml +0 -2
- imio/smartweb/core/browser/dashboards/plausible.py +4 -4
- imio/smartweb/core/browser/static/smartweb-edit-compiled.js +1 -1
- imio/smartweb/core/browser/static/src/edit.js +5 -0
- imio/smartweb/core/browser/utils.py +4 -30
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/rest/base.py +12 -0
- imio/smartweb/core/contents/rest/configure.zcml +7 -0
- imio/smartweb/core/contents/rest/directory/content.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/directory/view.py +3 -0
- imio/smartweb/core/contents/rest/events/content.py +2 -2
- imio/smartweb/core/contents/rest/events/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/view.py +3 -0
- imio/smartweb/core/contents/rest/news/content.py +2 -2
- imio/smartweb/core/contents/rest/news/view.pt +2 -1
- imio/smartweb/core/contents/rest/news/view.py +3 -0
- imio/smartweb/core/contents/rest/search/endpoint.py +1 -1
- imio/smartweb/core/contents/rest/traversal.py +18 -0
- imio/smartweb/core/contents/rest/view.py +7 -0
- imio/smartweb/core/contents/sections/events/view.py +1 -1
- imio/smartweb/core/contents/sections/news/view.py +1 -1
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/actions.xml +15 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/rest/authentic_sources.py +47 -10
- imio/smartweb/core/rest/configure.zcml +54 -0
- imio/smartweb/core/tests/test_rest.py +120 -0
- imio/smartweb/core/tests/utils.py +15 -0
- imio/smartweb/core/upgrades/configure.zcml +18 -0
- imio/smartweb/core/upgrades/profiles/1051_to_1052/actions.xml +20 -0
- imio/smartweb/core/utils.py +31 -0
- imio/smartweb/core/viewlets/configure.zcml +11 -0
- imio/smartweb/core/viewlets/httpheaders.py +13 -0
- imio/smartweb/core/viewlets/ogp_tag_header.pt +10 -0
- imio/smartweb/core/viewlets/ogptags.py +8 -0
- imio/smartweb/core/webcomponents/build/css/54.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/647.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/js/3.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/323.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/363.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/493.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/54.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js.LICENSE.txt +1 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/package.json +14 -17
- imio/smartweb/core/webcomponents/src/assets/contentIcon/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +85 -84
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -23
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +109 -93
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -7
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +43 -0
- imio/smartweb/core/webcomponents/src/components/Events/{ContactContent/ContactContent.jsx → EventContent/EventContent.jsx} +76 -81
- imio/smartweb/core/webcomponents/src/components/Events/{ContactList/ContactList.jsx → EventList/EventList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +99 -98
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +1 -1
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +23 -25
- imio/smartweb/core/webcomponents/src/components/News/News.scss +3 -5
- imio/smartweb/core/webcomponents/src/components/News/{ContactCard/ContactCard.jsx → NewsCard/NewsCard.jsx} +14 -27
- imio/smartweb/core/webcomponents/src/components/News/{ContactContent/ContactContent.jsx → NewsContent/NewsContent.jsx} +37 -40
- imio/smartweb/core/webcomponents/src/components/News/{ContactList/ContactList.jsx → NewsList/NewsList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +3 -3
- imio/smartweb/core/webcomponents/src/{components/Events/ContactMap/ContactMap.jsx → utils/Map.jsx} +60 -64
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/METADATA +72 -1
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/RECORD +81 -83
- imio/smartweb/core/webcomponents/build/css/267.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/css/779.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/267.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/552.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/565.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/612.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/779.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/pnpm-lock.yaml +0 -7066
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactMap/ContactMap.jsx +0 -156
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/LoaderCss.jsx +0 -7
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Events/ContactCard/ContactCard.jsx +0 -49
- imio/smartweb/core/webcomponents/src/components/Events/ContactMap/ContactMap.scss +0 -0
- imio/smartweb/core/webcomponents/src/components/Events/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.jsx +0 -127
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.scss +0 -4
- imio/smartweb/core/webcomponents/src/components/News/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Search/Skeleton/Skeleton.jsx +0 -20
- /imio/smartweb/core/webcomponents/build/css/{552.smartweb-webcomponents-compiled.css → 363.smartweb-webcomponents-compiled.css} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{552.smartweb-webcomponents-compiled.js.LICENSE.txt → 3.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{612.smartweb-webcomponents-compiled.js.LICENSE.txt → 363.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/src/{components/Annuaire/ContactMap/ContactMap.scss → utils/Map.scss} +0 -0
- /imio.smartweb.core-1.2.11-py3.10-nspkg.pth → /imio.smartweb.core-1.2.19-py3.10-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
+
from base64 import b64encode
|
3
4
|
from freezegun import freeze_time
|
4
5
|
from imio.smartweb.core import config
|
5
6
|
from imio.smartweb.core.contents.rest.base import BaseEndpoint
|
@@ -8,16 +9,20 @@ from imio.smartweb.core.contents.rest.events.endpoint import EventsEndpoint
|
|
8
9
|
from imio.smartweb.core.contents.rest.news.endpoint import NewsEndpoint
|
9
10
|
from imio.smartweb.core.testing import IMIO_SMARTWEB_CORE_ACCEPTANCE_TESTING
|
10
11
|
from imio.smartweb.core.testing import ImioSmartwebTestCase
|
12
|
+
from imio.smartweb.core.tests.utils import FakeResponse
|
11
13
|
from imio.smartweb.core.tests.utils import get_json
|
12
14
|
from plone import api
|
13
15
|
from plone.app.testing import setRoles
|
14
16
|
from plone.app.testing import TEST_USER_ID
|
17
|
+
from plone.app.testing import TEST_USER_PASSWORD
|
15
18
|
from plone.restapi.testing import RelativeSession
|
16
19
|
from unittest.mock import patch
|
17
20
|
from urllib.parse import urlparse
|
18
21
|
from urllib.parse import parse_qs
|
19
22
|
from zope.component import queryMultiAdapter
|
23
|
+
from zope.event import notify
|
20
24
|
from zope.publisher.browser import TestRequest
|
25
|
+
from ZPublisher.pubevents import PubStart
|
21
26
|
|
22
27
|
import json
|
23
28
|
import requests_mock
|
@@ -73,6 +78,21 @@ class SectionsFunctionalTest(ImioSmartwebTestCase):
|
|
73
78
|
def tearDown(self):
|
74
79
|
self.api_session.close()
|
75
80
|
|
81
|
+
def traverse(self, path="/plone", method="GET"):
|
82
|
+
request = self.layer["request"]
|
83
|
+
request.environ["PATH_INFO"] = path
|
84
|
+
request.environ["PATH_TRANSLATED"] = path
|
85
|
+
request.environ["HTTP_ACCEPT"] = "application/json"
|
86
|
+
request.environ["REQUEST_METHOD"] = method
|
87
|
+
request.other["ACTUAL_URL"] = ""
|
88
|
+
request.other["URL"] = ""
|
89
|
+
request.method = method
|
90
|
+
request.form = {}
|
91
|
+
auth = f"{TEST_USER_ID}:{TEST_USER_PASSWORD}"
|
92
|
+
request._auth = "Basic %s" % b64encode(auth.encode("utf8")).decode("utf8")
|
93
|
+
notify(PubStart(request))
|
94
|
+
return request.traverse(path)
|
95
|
+
|
76
96
|
@freeze_time("2021-09-14 8:00:00")
|
77
97
|
def test_convert_cached_image_scales(self):
|
78
98
|
endpoint = BaseEndpoint(self.portal, self.request)
|
@@ -366,3 +386,103 @@ class SectionsFunctionalTest(ImioSmartwebTestCase):
|
|
366
386
|
self.rest_events.display_map = True
|
367
387
|
view = queryMultiAdapter((self.rest_events, self.request), name="view")
|
368
388
|
self.assertIn('display-map="True"', view())
|
389
|
+
|
390
|
+
@patch("imio.smartweb.core.rest.authentic_sources.get_wca_token")
|
391
|
+
@patch("imio.smartweb.core.rest.authentic_sources.requests.request")
|
392
|
+
@patch("imio.smartweb.core.rest.authentic_sources.get_default_view_url")
|
393
|
+
def test_request_forwarder(self, mock_view_url, mock_request, mock_get_wca_token):
|
394
|
+
mock_view_url.return_value = "http://view-url"
|
395
|
+
mock_get_wca_token.return_value = "kamoulox"
|
396
|
+
mock_request.return_value = FakeResponse(
|
397
|
+
status_code=200,
|
398
|
+
headers={"test-header": "True"},
|
399
|
+
)
|
400
|
+
|
401
|
+
# traversal stack
|
402
|
+
service = self.traverse("/plone/@news_request_forwarder/belleville/@search")
|
403
|
+
self.assertListEqual(service.traversal_stack, ["belleville", "@search"])
|
404
|
+
|
405
|
+
# add_smartweb_urls
|
406
|
+
json_data = {}
|
407
|
+
self.assertEqual(service.add_smartweb_urls(json_data), json_data)
|
408
|
+
json_data = {"foo": "bar"}
|
409
|
+
self.assertEqual(service.add_smartweb_urls(json_data), json_data)
|
410
|
+
json_data = {"@id": "http://news/my-news"}
|
411
|
+
self.assertEqual(service.add_smartweb_urls(json_data), json_data)
|
412
|
+
json_data = {"@id": "http://news/my-news", "UID": "12345678"}
|
413
|
+
json_result = service.add_smartweb_urls(json_data)
|
414
|
+
self.assertEqual(
|
415
|
+
json_result["smartweb_url"], "http://view-url/content?u=12345678"
|
416
|
+
)
|
417
|
+
json_data = {"items": []}
|
418
|
+
self.assertEqual(service.add_smartweb_urls(json_data), json_data)
|
419
|
+
json_data = {"items": [{"@id": "http://news/my-news"}]}
|
420
|
+
self.assertEqual(service.add_smartweb_urls(json_data), json_data)
|
421
|
+
json_data = {"items": [{"@id": "http://news/my-news", "UID": "12345678"}]}
|
422
|
+
json_result = service.add_smartweb_urls(json_data)
|
423
|
+
self.assertIn("smartweb_url", json_result["items"][0])
|
424
|
+
self.assertEqual(
|
425
|
+
json_data["items"][0]["smartweb_url"], "http://view-url/content?u=12345678"
|
426
|
+
)
|
427
|
+
|
428
|
+
# add_missing_metadatas
|
429
|
+
params = {}
|
430
|
+
self.assertEqual(
|
431
|
+
service.add_missing_metadatas(params), {"metadata_fields": ["id", "UID"]}
|
432
|
+
)
|
433
|
+
params = {"fullobjects": 1}
|
434
|
+
self.assertEqual(service.add_missing_metadatas(params), params)
|
435
|
+
params = {"metadata_fields": ["other", "UID"]}
|
436
|
+
self.assertEqual(
|
437
|
+
service.add_missing_metadatas(params),
|
438
|
+
{"metadata_fields": ["other", "UID", "id"]},
|
439
|
+
)
|
440
|
+
params = {"metadata_fields": ["other", "id"]}
|
441
|
+
self.assertEqual(
|
442
|
+
service.add_missing_metadatas(params),
|
443
|
+
{"metadata_fields": ["other", "id", "UID"]},
|
444
|
+
)
|
445
|
+
|
446
|
+
# reply
|
447
|
+
response = service.reply()
|
448
|
+
mock_request.assert_called_with(
|
449
|
+
"GET",
|
450
|
+
"http://localhost:8080/Plone/belleville/@search",
|
451
|
+
params={"metadata_fields": ["id", "UID"]},
|
452
|
+
headers={"Accept": "application/json", "Authorization": "kamoulox"},
|
453
|
+
json={},
|
454
|
+
)
|
455
|
+
self.assertEqual(response, {})
|
456
|
+
self.assertEqual(self.request.response.status, 200)
|
457
|
+
self.assertEqual(self.request.response.headers, {"test-header": "True"})
|
458
|
+
|
459
|
+
service = self.traverse(
|
460
|
+
"/plone/@events_request_forwarder/belleville/", method="POST"
|
461
|
+
)
|
462
|
+
service.reply()
|
463
|
+
mock_request.assert_called_with(
|
464
|
+
"POST",
|
465
|
+
"http://localhost:8080/Plone/belleville",
|
466
|
+
params={},
|
467
|
+
headers={"Accept": "application/json", "Authorization": "kamoulox"},
|
468
|
+
json={},
|
469
|
+
)
|
470
|
+
|
471
|
+
mock_request.side_effect = None
|
472
|
+
mock_request.return_value = FakeResponse(status_code=204)
|
473
|
+
service = self.traverse(
|
474
|
+
"/plone/@events_request_forwarder/belleville/", method="PATCH"
|
475
|
+
)
|
476
|
+
response = service.reply()
|
477
|
+
self.assertEqual(response, "")
|
478
|
+
self.assertEqual(self.request.response.status, 204)
|
479
|
+
|
480
|
+
self.assertEqual(
|
481
|
+
self.api_session.get("/@directory_request_forwarder/foo/bar").text, ""
|
482
|
+
)
|
483
|
+
self.assertEqual(
|
484
|
+
self.api_session.get("/@events_request_forwarder/foo/bar").text, ""
|
485
|
+
)
|
486
|
+
self.assertEqual(
|
487
|
+
self.api_session.get("/@news_request_forwarder/foo/bar").text, ""
|
488
|
+
)
|
@@ -94,3 +94,18 @@ def make_named_image(filename="plone.png"):
|
|
94
94
|
with open(path, "rb") as f:
|
95
95
|
image_data = f.read()
|
96
96
|
return {"filename": filename, "data": image_data}
|
97
|
+
|
98
|
+
|
99
|
+
class FakeResponse:
|
100
|
+
status_code = 404
|
101
|
+
headers = {}
|
102
|
+
text = "{}"
|
103
|
+
|
104
|
+
def __init__(self, status_code=None, headers=None):
|
105
|
+
if status_code:
|
106
|
+
self.status_code = status_code
|
107
|
+
if headers:
|
108
|
+
self.headers = headers
|
109
|
+
|
110
|
+
def json(self):
|
111
|
+
return json.loads(self.text)
|
@@ -187,6 +187,14 @@
|
|
187
187
|
provides="Products.GenericSetup.interfaces.EXTENSION"
|
188
188
|
/>
|
189
189
|
|
190
|
+
<genericsetup:registerProfile
|
191
|
+
name="upgrade_1051_to_1052"
|
192
|
+
title="Upgrade common from 1051 to 1052"
|
193
|
+
directory="profiles/1051_to_1052"
|
194
|
+
description="Add new action to navigate to stats (plausible) view"
|
195
|
+
provides="Products.GenericSetup.interfaces.EXTENSION"
|
196
|
+
/>
|
197
|
+
|
190
198
|
<genericsetup:upgradeStep
|
191
199
|
title="Configure first official release"
|
192
200
|
description="Run needed profiles steps and reindex catalog"
|
@@ -711,4 +719,14 @@
|
|
711
719
|
profile="imio.smartweb.core:default"
|
712
720
|
/>
|
713
721
|
|
722
|
+
<genericsetup:upgradeSteps
|
723
|
+
source="1051"
|
724
|
+
destination="1052"
|
725
|
+
profile="imio.smartweb.core:default">
|
726
|
+
<genericsetup:upgradeDepends
|
727
|
+
title="Add new action to navigate to stats (plausible) view"
|
728
|
+
import_profile="imio.smartweb.core.upgrades:upgrade_1051_to_1052"
|
729
|
+
/>
|
730
|
+
</genericsetup:upgradeSteps>
|
731
|
+
|
714
732
|
</configure>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<object name="portal_actions" meta_type="Plone Actions Tool"
|
3
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
4
|
+
|
5
|
+
<object meta_type="CMF Action Category" name="user">
|
6
|
+
<object meta_type="CMF Action" name="dashboard" i18n:domain="plone" remove="True" />
|
7
|
+
<object meta_type="CMF Action" name="statistics" i18n:domain="imio.smartweb">
|
8
|
+
<property name="title" i18n:translate="">Statistics</property>
|
9
|
+
<property name="description" i18n:translate=""/>
|
10
|
+
<property name="url_expr">string:$portal_url/@@stats</property>
|
11
|
+
<property name="icon_expr">string:activity</property>
|
12
|
+
<property name="available_expr">portal/@@utils/is_plausible_set</property>
|
13
|
+
<property name="permissions">
|
14
|
+
<element value="Add portal content"/>
|
15
|
+
</property>
|
16
|
+
<property name="visible">True</property>
|
17
|
+
</object>
|
18
|
+
</object>
|
19
|
+
|
20
|
+
</object>
|
imio/smartweb/core/utils.py
CHANGED
@@ -165,3 +165,34 @@ def get_scale_url(context, request, fieldname, scale_name, orientation=""):
|
|
165
165
|
modified_hash = hash_md5(modification_date)
|
166
166
|
url = f"{brain.getURL()}/@@images/{fieldname}/{scale_name}?cache_key={modified_hash}"
|
167
167
|
return url
|
168
|
+
|
169
|
+
|
170
|
+
def get_plausible_vars():
|
171
|
+
env_plausible_url = os.getenv("SMARTWEB_PLAUSIBLE_URL", "")
|
172
|
+
env_plausible_site = os.getenv("SMARTWEB_PLAUSIBLE_SITE", "")
|
173
|
+
env_plausible_token = os.getenv("SMARTWEB_PLAUSIBLE_TOKEN", "")
|
174
|
+
|
175
|
+
plausible_url = (
|
176
|
+
env_plausible_url
|
177
|
+
if (env_plausible_url and env_plausible_url != "")
|
178
|
+
else api.portal.get_registry_record("smartweb.plausible_url")
|
179
|
+
)
|
180
|
+
plausible_site = (
|
181
|
+
env_plausible_site
|
182
|
+
if (env_plausible_site and env_plausible_site != "")
|
183
|
+
else api.portal.get_registry_record("smartweb.plausible_site")
|
184
|
+
)
|
185
|
+
plausible_token = (
|
186
|
+
env_plausible_token
|
187
|
+
if (env_plausible_token and env_plausible_token != "")
|
188
|
+
else api.portal.get_registry_record("smartweb.plausible_token")
|
189
|
+
)
|
190
|
+
if all([plausible_site, plausible_url, plausible_token]):
|
191
|
+
plausible_vars = {
|
192
|
+
"plausible_url": plausible_url,
|
193
|
+
"plausible_site": plausible_site,
|
194
|
+
"plausible_token": plausible_token,
|
195
|
+
}
|
196
|
+
return plausible_vars
|
197
|
+
else:
|
198
|
+
return None
|
@@ -36,6 +36,17 @@
|
|
36
36
|
permission="zope.Public"
|
37
37
|
/>
|
38
38
|
|
39
|
+
<browser:viewlet
|
40
|
+
name="imio.smartweb.ogp_header"
|
41
|
+
for="*"
|
42
|
+
view="imio.smartweb.core.interfaces.IOgpViewUtils"
|
43
|
+
manager="plone.app.layout.viewlets.interfaces.IHTTPHeaders"
|
44
|
+
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
45
|
+
template="ogp_tag_header.pt"
|
46
|
+
class=".ogptags.OgpTagsViewlet"
|
47
|
+
permission="zope.Public"
|
48
|
+
/>
|
49
|
+
|
39
50
|
<browser:viewlet
|
40
51
|
name="imio.smartweb.header_actions"
|
41
52
|
for="*"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
from plone.app.layout.viewlets.httpheaders import HTTPCachingHeaders
|
4
|
+
|
5
|
+
|
6
|
+
class MyHTTPCachingHeaders(HTTPCachingHeaders):
|
7
|
+
def update(self):
|
8
|
+
super(MyHTTPCachingHeaders, self).update()
|
9
|
+
|
10
|
+
def getHeaders(self):
|
11
|
+
result = super(MyHTTPCachingHeaders, self).getHeaders()
|
12
|
+
result.append(("prefix", "og: http://ogp.me/ns#"))
|
13
|
+
return result
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<meta property="og:title" content="...">
|
2
|
+
<meta property="og:description" content="...">
|
3
|
+
<meta property="og:url" content="...">
|
4
|
+
<meta property="og:site_name" content="...">
|
5
|
+
<meta property="og:image" content="https://example.com/path/to/image.png">
|
6
|
+
<meta property="og:image:type" content="image/png">
|
7
|
+
<meta property="og:image:alt" content="...">
|
8
|
+
<meta property="og:image:width" content="...">
|
9
|
+
<meta property="og:image:height" content="...">
|
10
|
+
<meta property="og:type" content="website"> <!-- "og:type" can be omitted for 'website' (is default), required for other types: http://ogp.me/#types -->
|
@@ -0,0 +1 @@
|
|
1
|
+
.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:300px}.flexbin>*{display:block;flex-grow:1;height:300px;margin:2.5px;position:relative}.flexbin>*>img{height:300px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}@media (max-width:980px){.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:150px}.flexbin>*{display:block;flex-grow:1;height:150px;margin:2.5px;position:relative}.flexbin>*>img{height:150px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}}@media (max-width:400px){.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:100px}.flexbin>*{display:block;flex-grow:1;height:100px;margin:2.5px;position:relative}.flexbin>*>img{height:100px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}}.leaflet-container{height:100vh}.leaflet-popup{padding:0}.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-height:none!important;max-width:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important;padding:0;width:auto}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{-moz-box-sizing:border-box;box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(../assets/layers.416d91365b44e4b4f4777663e6f009f3.png);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(../assets/layers-2x.8f2c4d11474275fbc1614b9098334eae.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(../assets/marker-icon.2b3e1faf89f94a4835397e7a43b4f77d.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;line-height:1.4;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;height:.6669em;vertical-align:baseline!important;width:1em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:hsla(0,0%,100%,.8);border:2px solid #777;border-top:none;-moz-box-sizing:border-box;box-sizing:border-box;line-height:1.1;padding:2px 5px 1px;text-shadow:1px 1px #fff;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{font-size:13px;font-size:1.08333em;line-height:1.3;margin:13px 24px 13px 20px;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;margin-top:-1px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#757575;font:16px/24px Tahoma,Verdana,sans-serif;height:24px;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:24px}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}body,html{max-width:100%;overflow-x:initial!important}.row{margin:0}.breadcrumb,.row{padding:0}body .outer-wrapper>.container{max-width:100%!important;padding:0!important}@media screen and (min-width:1200px){.r-annuaire-wrapper{margin-right:inherit;max-width:100%;padding-left:0;padding-right:0}}#portal-column-content{padding:0!important}.r-result-filter-container{background:#fff;z-index:1}@media screen and (min-width:1200px){.r-result-filter-container{position:-webkit-sticky;position:sticky}}.annuaire-result-filter{padding:0 .75rem}#portal-column-content h1{font-size:0;position:absolute}#viewlet-below-content-description,#viewlet-below-content-title{display:none}header#content-header{background:#fff;position:-webkit-sticky;position:sticky;top:0}article>header{margin-bottom:0}.r-annuaire-result{grid-area:1/1/3/2}.r-map.annuaire-map{grid-area:1/2/2/3;position:-webkit-sticky;position:sticky}.r-results-numbers{margin-bottom:.5rem;width:100%}.r-results-numbers span{font-weight:700}.r-wrapper{display:block}@media screen and (min-width:1200px){.r-wrapper{display:grid;gap:40px;grid-template-columns:minmax(20px,800px) minmax(20px,100%);justify-content:space-between;margin-left:auto;width:calc(558px + 50vw)}}@media screen and (min-width:1400px){.r-wrapper{width:calc(648px + 50vw)}}.r-wrapper .r-result{margin-top:2rem;padding-bottom:2rem}.r-wrapper .r-result-filter{display:flex;gap:20px}.r-wrapper .r-result-filter .r-filter{width:100%}.r-wrapper .r-result-list{padding:0}.r-wrapper .r-result-list .r-list-item-group{list-style:none;margin:1rem 0;position:relative}.r-wrapper .r-result-list .r-list-item-group .r-list-item-link{inset:0!important;position:absolute!important}.r-wrapper .r-result-list .r-list-item-group .r-list-item{display:flex;flex-direction:column;height:100%}@media screen and (min-width:600px){.r-wrapper .r-result-list .r-list-item-group .r-list-item{flex-direction:row}}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-img{background-size:cover;padding-bottom:56%;width:100%}@media screen and (min-width:600px){.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-img{height:149px;padding-bottom:0;width:246px}}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text{flex-grow:1;margin-top:.6rem}@media screen and (min-width:600px){.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text{margin-left:1.5rem;margin-top:0}}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text a{position:relative}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-title{display:block;font-weight:700}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-categorie{display:block}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all{display:flex;gap:10px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all .r-item-adresse{width:36%}@media screen and (max-width:1200px){.r-wrapper .r-map{margin-top:2rem!important}.r-wrapper .r-map .leaflet-container{height:50vh!important}}.r-load-more{margin-bottom:2rem;text-align:center}.r-load-more button{background:#000;border:1px solid transparent;border-radius:10px;border-bottom-left-radius:10px;border-bottom-left-radius:0;color:#fff;display:block;font-size:14px;font-weight:700;margin:0 auto;padding:.4rem 1rem}.r-load-more button:hover{background:rgba(0,0,0,.871)}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-img{border-radius:15px 15px 15px 0}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text{font-size:13px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text:after{background:#ff0;border-radius:50px;content:"";height:50px;width:50px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-title{font-size:18px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-categorie{color:#747474;font-weight:400;margin-bottom:5px;text-transform:uppercase}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all{color:#727272}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all a{color:#000}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all .r-item-adresse .itineraty{margin-top:5px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all .r-item-adresse .itineraty:before{background-size:contain;background:url(../assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg) no-repeat;content:"";display:inline-block;height:15px;vertical-align:middle;width:15px}.r-wrapper .r-result-list .r-list-item-group .r-list-item .r-item-text .r-item-all .r-item-contact{width:100%}.icon-baseline{align-self:center;display:inline-flex;margin-right:.4rem}.icon-baseline svg{height:1em;position:relative;top:.125em;width:1em}.dpinlb{display:inline-block;vertical-align:top}.r-content-img{padding-bottom:60%}.r-content-title{margin:1rem 0}.news-info-title{color:#008fd2;display:block;font-weight:700;margin-bottom:1rem}.r-content-news-info{display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:2rem}@media screen and (min-width:600px){.r-content-news-info-container{-webkit-column-count:2;column-count:2}}.r-content-news-info-container>div{-webkit-column-break-inside:avoid;break-inside:avoid;margin:.6rem 0;padding-right:3rem}.r-content-news-info-container>div svg{width:16px}.r-content-news-info-container .r-content-news-info--date{display:flex}.r-content-news-info-container .r-content-news-info--date .r-content-date-end,.r-content-news-info-container .r-content-news-info--date .r-content-date-start,.r-content-news-info-container .r-content-news-info--date .r-content-date-start-hours{display:flex;flex-wrap:wrap}.r-content-news-info-container .r-content-news-info-social svg{height:30px;width:30px}.r-content-news-info-container .r-content-news-info-social ul{align-items:center;display:flex;margin:0}.r-content-news-info-container .r-content-news-info-social ul li{list-style:none}.r-content-news-info-container .r-content-news-info-social ul li a:hover{opacity:.7}@media screen and (max-width:1000px){.r-content-news-info-action{margin-top:1.1rem}}.r-content-news-info-action a{text-decoration:none}.r-content-news-info-action>div{margin:.6rem 0}.r-content-news-info-action .r-content-booking{margin-top:0}.r-content-news-info-action .r-content-booking a{align-items:center;background:#000;border-radius:10px;border-bottom-left-radius:0;color:#fff;cursor:pointer;display:block;display:flex;font-weight:500;gap:10px;padding:.4rem 1rem;text-decoration:none}.r-content-news-info-action .r-content-booking a svg{fill:#fff;width:22px}.r-content-news-info-action .r-content-booking a:hover{background:#3f3f3f;color:#fff}@media screen and (min-width:600px){.no-map .r-annuaire-wrapper{display:block}.no-map .r-result-list{display:grid;gap:20px;grid-template-columns:1fr 1fr 1fr;max-width:1296px}.no-map .r-list-item-group{transition:all .2s ease}.no-map .r-list-item-group:focus,.no-map .r-list-item-group:hover{-webkit-transform:translateY(-10px)!important;transform:translateY(-10px)!important}.no-map .r-list-item-group .r-list-item{box-shadow:0 8px 26px rgba(0,0,0,.08);flex-direction:column!important}.no-map .r-list-item-group .r-list-item .r-item-img{border-radius:0!important;height:0!important;margin-bottom:.5rem;padding-bottom:60%!important;width:100%!important}.no-map .r-list-item-group .r-list-item .r-item-text{display:grid;grid-template-columns:1fr 1fr;margin-right:1.5rem}.no-map .r-list-item-group .r-list-item .r-item-text:after{display:none}.no-map .r-list-item-group .r-list-item .r-item-text .r-item-categorie{grid-row-start:1}.no-map .r-list-item-group .r-list-item .r-item-text .r-item-title{font-weight:500!important;grid-column-end:3;grid-column-start:1;grid-row-start:2;margin-bottom:2rem;margin-top:1rem}.no-map .r-list-item-group .r-list-item .r-item-text .r-item-date{grid-column-start:2;grid-row-start:1;justify-self:end}}.no-map .r-result.r-annuaire-result{max-width:1296px}.no-map .envent-content{margin:0 auto;max-width:700px}
|
@@ -0,0 +1 @@
|
|
1
|
+
.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:300px}.flexbin>*{display:block;flex-grow:1;height:300px;margin:2.5px;position:relative}.flexbin>*>img{height:300px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}@media (max-width:980px){.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:150px}.flexbin>*{display:block;flex-grow:1;height:150px;margin:2.5px;position:relative}.flexbin>*>img{height:150px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}}@media (max-width:400px){.flexbin{display:flex;flex-wrap:wrap;margin:-2.5px;overflow:hidden}.flexbin:after{content:"";flex-grow:999999999;height:0;min-width:100px}.flexbin>*{display:block;flex-grow:1;height:100px;margin:2.5px;position:relative}.flexbin>*>img{height:100px;max-width:100%;min-width:100%;object-fit:cover;vertical-align:bottom}.flexbin.flexbin-margin{margin:2.5px}}.breadcrumb{padding:0}.r-result-list{list-style:none;margin-top:50px;padding-left:0}#portal-column-content h1{font-size:0;position:absolute}#viewlet-below-content-description,#viewlet-below-content-title{display:none}.r-item-text{display:flex;flex-direction:column;margin:20px 30px;position:relative}.r-item-title{display:block}.r-results-numbers{margin-bottom:.5rem;width:100%}.r-results-numbers span{font-weight:700}.r-content-img{padding-bottom:60%}.new-content{margin:0 auto;max-width:700px}.r-load-more{margin-bottom:2rem;text-align:center}.r-load-more button{background:#000;border:1px solid transparent;border-radius:10px;border-bottom-left-radius:10px;border-bottom-left-radius:0;color:#fff;display:block;font-size:14px;font-weight:700;margin:0 auto;padding:.4rem 1rem}.r-load-more button:hover{background:rgba(0,0,0,.871)}.r-actu-wrapper{position:relative}.r-actu-wrapper:after{content:url(../assets/oeil-big.f32cd1df1274a9593de0c4bd8e344216.svg);display:block;position:absolute;right:0;top:0;-webkit-transform:translateY(-20%);transform:translateY(-20%);width:495px;z-index:-1}.r-actu-wrapper .r-list-item-group{background:#fff;border:1px solid #d1d1d1;border-radius:15px 15px 15px 0;margin:30px auto;max-width:900px}.r-item-title{font-size:18px;font-weight:700}.r-item-description{color:#444;font-size:16px;margin-top:10px}.r-item-img{border-radius:15px 15px 15px 0}.r-actu-wrapper .r-item-img{aspect-ratio:1.6741071429;background-position:top;background-repeat:no-repeat;background-size:cover;width:100%}@media screen and (min-width:775px){.r-actu-wrapper .r-item-img{width:323px}}.r-item-read-more{margin-top:auto}.r-item-arrow-more{align-self:center;background:#f9b331;background:url(../assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg);background-position:50%;background-repeat:no-repeat;background-size:20px;border-radius:50px;flex:0 0 50px;height:50px;margin-left:auto;margin-right:30px;width:50px}.r-list-item-group:hover .r-item-arrow-more{background:url(../assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg),#f9b331;background-position:50%;background-repeat:no-repeat;background-size:20px}@media screen and (max-width:600px){.r-list-item{flex-direction:column}.r-item-read-more{position:relative}}.icon-baseline{align-self:center;display:inline-flex;margin-right:.4rem}.icon-baseline svg{height:1em;position:relative;top:.125em;width:1em}.dpinlb{display:inline-block;vertical-align:top}.r-content-news-info-social svg{height:30px;width:30px}.r-content-news-info-social ul{align-items:center;display:flex;margin:0}.r-content-news-info-social ul li{list-style:none}.r-content-news-info-social ul li a:hover{opacity:.7}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see 3.smartweb-webcomponents-compiled.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkimio_smartweb_core_webcomponents=self.webpackChunkimio_smartweb_core_webcomponents||[]).push([[3],{14844:function(t,e,r){var n=r(78709),o=r(10708);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),u=new N(n||[]);return o(i,"_invoke",{value:I(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",m="executing",g="completed",d={};function b(){}function w(){}function O(){}var S={};f(S,u,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(D([])));E&&E!==r&&n.call(E,u)&&(S=E);var L=O.prototype=b.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,u,c){var l=p(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function I(e,r,n){var o=v;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=O,o(L,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},x(P.prototype),f(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new P(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(L),f(L,s,"Generator"),f(L,u,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function s(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t,e)||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 h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.Z=function(t){var e=f((0,n.useState)(null),2),r=e[0],a=e[1],i=f((0,n.useState)(""),2),c=i[0],h=i[1],p=f((0,n.useState)(!0),2),v=p[0],y=p[1],m=f((0,n.useState)(!1),2),g=m[0],d=m[1],b=new AbortController,w=function(){var t,e=(t=l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(y(!0),e.load?d(!0):d(!1),0!=Object.keys(e.params).length){t.next=7;break}return a(null),t.abrupt("return");case 7:return t.prev=7,t.next=10,o.Z.request(e);case 10:r=t.sent,a(r.data),y(!1),h(null),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(7),h(t.t0);case 19:case"end":return t.stop()}}),t,null,[[7,16]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){s(a,n,o,i,u,"next",t)}function u(t){s(a,n,o,i,u,"throw",t)}i(void 0)}))});return function(t){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){return w(u(u({},t),{},{signal:b.signal})),function(){return b.abort()}}),[t.params]),{response:r,error:c,isLoading:v,isMore:g}}},6489:function(t,e,r){r(78709);var n=r(51031);e.Z=function(){return new URLSearchParams((0,n.TH)().search)}},57493:function(t,e,r){r.d(e,{Z:function(){return S}});var n=r(78709),o=r(38458),a=r(22948),i=r(79221),u=r(35108),c=r(16683),l=r(6489),s=r(48818),f=r.n(s);var h=r.p+"assets/pin-react.fda934b5daf26dd4da2a71a7e7e44431.svg";var p=r.p+"assets/pin-react-active.07d154037a15be5525b823fdc626cf29.svg",v=r(12707),y=r(29924),m=r.n(y),g=["u"];function d(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(t,e)}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function O(t){var e=t.activeItem,r=t.arrayOfLatLngs,n=(0,o.Sx)();if(e){var a=[];a.push(e.geolocation.latitude),a.push(e.geolocation.longitude),n.setView(a,15)}else{var i=new(f().LatLngBounds)(r);n.fitBounds(i)}return null}var S=function(t){var e=b((0,n.useState)(null),2),o=e[0],s=e[1],y=b((0,n.useState)([]),2),w=y[0],S=y[1],j=b((0,n.useState)(null),2),E=j[0],L=j[1],x=r(31296),P=Object.assign({UID:x.parse((0,l.Z)().toString()).u}),I=(P.u,d(P,g));(0,n.useEffect)((function(){var e=t.items.filter((function(t){return t.geolocation.latitude&&50.4989185!==t.geolocation.latitude&&4.7184485!==t.geolocation.longitude}));S(e)}),[t]);var A=function(t){return new(f().Icon)({iconUrl:t,iconSize:[29,37]})},k=function(e){return e===t.clickId||e===t.hoverId?999:1};(0,n.useEffect)((function(){var t=w&&w.filter((function(t){return t.UID===I.UID}));s(t[0])}),[w]),(0,n.useEffect)((function(){if(w.length>0){var t=[];w.map((function(e,r){var n=e.geolocation.latitude,o=e.geolocation.longitude;t.push([n,o])})),L(t)}}),[w]);var _=w.map((function(e){return n.createElement(a.J,{key:e.UID,icon:(r=e.UID,r===I.UID||r===t.hoverId?A(p):A(h)),zIndexOffset:k(e.UID),position:[e.geolocation?e.geolocation.latitude:"",e.geolocation?e.geolocation.longitude:""],eventHandlers:{mouseover:function(t){}}},n.createElement(i.G,{closeButton:!1},n.createElement(v.rU,{className:"r-map-popup",style:{textDecoration:"none"},to:{pathname:m()(e.title.replace(/\s/g,"-").toLowerCase()),search:"?u=".concat(e.UID),state:{idItem:e.UID}}},n.createElement("span",{className:"r-map-popup-title"},e.title),n.createElement("p",{className:"r-map-popup-category"},e.category&&e.category.title))));var r}));return n.createElement("div",null,n.createElement(u.h,{style:{height:"calc(100vh - ".concat(t.headerHeight,"px)"),minHeight:"600px"},center:[50.85034,4.35171],zoom:15},n.createElement(c.I,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),null!=E?n.createElement(O,{activeItem:o,activeItemUID:I.UID,arrayOfLatLngs:E&&E}):"",w&&_))}},38401:function(t,e){e.Z={"Chargement...":{en:"Loading",fr:"Chargement..."},Recherche:{en:"Search",fr:"Recherche"},"Thématiques":{en:"Themes",fr:"Thématiques"},"Catégories":{en:"Categories",fr:"Catégories"},"Facilités":{en:"Facilities",fr:"Facilités"},"Plus de résultats":{en:"More results",fr:"Plus de résultats"},"Aucun résultat":{en:"No result",fr:"Aucun résultat"},Retour:{en:"Return",fr:"Retour"},"Téléchargements":{en:"Downloads",fr:"Téléchargements"},Billetterie:{en:"Ticketing",fr:"Billetterie"},"Lien vers la vidéo":{en:"Link to video",fr:"Lien vers la vidéo"},"Participation en ligne":{en:"Join online",fr:"Participation en ligne"},"Actualités trouvées":{en:" News found",fr:" actualités trouvées"},"Actualité trouvée":{en:" News found",fr:" actualité trouvée"},"Aucune actualité n'a été trouvée":{en:"No news was found",fr:"Aucune actualité n'a été trouvée"},"Proposer une actualité":{en:"Suggest a news",fr:"Proposer une actualité"},"événements trouvés":{en:" events found",fr:" événements trouvés"},"événement trouvé":{en:" event found",fr:" événement trouvé"},"Aucun événement n'a été trouvé":{en:"No events was found",fr:"Aucun événement n'a été trouvé"},"Proposer un événement":{en:"Suggest a event",fr:"Proposer un événement"},"Infos pratiques":{en:"Practical information",fr:"Infos pratiques"},"Accessible aux PMR":{en:"Je sais pas traduire",fr:"Accessible aux PMR"},"Lien de l'événement":{en:"Event link",fr:"Lien de l'événement"},"contacts trouvés":{en:" contact found",fr:" contacts trouvés"},"contact trouvé":{en:" contact found",fr:" contact trouvé"},"Aucun contact n'a été trouvé":{en:"No contact was found",fr:"Aucun contact n'a été trouvé"},"Proposer un contact":{en:"Suggest a contact",fr:"Proposer un contact"}}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 323.smartweb-webcomponents-compiled.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkimio_smartweb_core_webcomponents=self.webpackChunkimio_smartweb_core_webcomponents||[]).push([[323],{73323:function(e,t,r){r.r(t),r.d(t,{default:function(){return D}});var n=r(78709),a=r(12707),o=r(59927),i=r(51031),l=r(31806),c=r.n(l);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var s=["SearchableText"],f=["SearchableText"];function h(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g=function(e){var t=(0,i.k6)(),a=r(31296),l=b((0,n.useState)(e.activeFilter),2),u=l[0],m=l[1],d=b((0,n.useState)({}),2),g=d[0],w=d[1],E=b((0,n.useState)(null),2),S=E[0],O=E[1],j=b((0,n.useState)(null),2),x=j[0],P=j[1];(0,n.useEffect)((function(){var t,r;t=c().request({method:"get",url:"",baseURL:e.url+"/@vocabularies/imio.smartweb.vocabulary.Topics",headers:{Accept:"application/json"}}),r=c().request({method:"get",url:"",baseURL:e.url+"/@vocabularies/imio.smartweb.vocabulary.IAm",headers:{Accept:"application/json"}}),c().all([t,r]).then(c().spread((function(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1];if(null!==e){var r=e.data.items.map((function(e){return{value:e.token,label:e.title}}));O(r)}if(null!==t){var n=t.data.items.map((function(e){return{value:e.token,label:e.title}}));P(n)}}))).catch((function(e){console.error("errors")}))}),[]);var N=(0,n.useCallback)((function(e,t){var r=t.name;e?m((function(t){return p(p({},t),{},y({},r,e.value))}),[]):m((function(e){var t=p({},e);t[r];return h(t,[r].map(v))}))})),A=(0,n.useRef)(!0);(0,n.useEffect)((function(){A.current?A.current=!1:(t.push({pathname:"./",search:a.stringify(u)}),e.onChange(u))}),[u]);var T=S&&S.filter((function(t){return t.value===e.activeFilter.topics})),L=x&&x.filter((function(t){return t.value===e.activeFilter.iam})),_={control:function(e){return p(p({},e),{},{backgroundColor:"white",borderRadius:"0",height:"50px"})},placeholder:function(e){return p(p({},e),{},{color:"000",fontWeight:"bold",fontSize:"12px",textTransform:"uppercase",letterSpacing:"1.2px"})},option:function(e,t){t.data,t.isDisabled,t.isFocused,t.isSelected;return p({},e)}};return n.createElement(n.Fragment,null,n.createElement("div",{className:"col-md-6 py-1 r-search search-bar-filter"},n.createElement("form",{onSubmit:function(e){e.preventDefault(),g.SearchableText?m((function(e){return p(p({},e),{},{SearchableText:g.SearchableText})}),[]):m((function(e){var t=p({},e);t.SearchableText;return h(t,f)}))}},n.createElement("label",null,n.createElement("input",{name:"SearchableText",type:"text",onChange:function(e){w({SearchableText:e.target.value}),e.target.value?m((function(t){return p(p({},t),{},{SearchableText:e.target.value})}),[]):m((function(e){var t=p({},e);t.SearchableText;return h(t,s)}))},value:g.SearchableText,placeholder:"Recherche"})),n.createElement("button",{type:"submit"}))),n.createElement("div",{className:"col-md-3 col-lg-2 py-1 r-search search-select-filter"},n.createElement(o.ZP,{styles:_,name:"iam",className:"r-search-select",isClearable:!0,onChange:N,options:x&&x,placeholder:"Je suis",value:L&&L[0]})),n.createElement("div",{className:"col-md-3 col-lg-2 py-1 r-search search-select-filter"},n.createElement(o.ZP,{styles:_,name:"topics",className:"r-search-select",isClearable:!0,onChange:N,options:S&&S,placeholder:"Thématiques",value:T&&T[0]})))},w=r(14844),E=r(30144),S=r.n(E);function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}(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 j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var x=function(e){var t=O((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,w.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=directory&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-contact"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Contacts"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(S(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var A=function(e){var t=P((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,w.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=news&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-news"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Actualités"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(S(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L(e,t)}(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 L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var _=function(e){var t=T((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,w.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=events&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-events"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Événements"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(S(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I(e,t)}(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 I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e){var t=k((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,w.Z)({method:"get",url:"",baseURL:e.url+"/@search?&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-web"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Infos pratiques"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t["@id"]},n.createElement(S(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))},U=r(6489);function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(e,t)}(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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function D(e){return n.createElement(a.VK,null,n.createElement(R,{queryFilterUrl:e.queryFilterUrl,queryUrl:e.queryUrl,resultOption:JSON.parse(e.resultOption)}))}var R=function(e){var t=r(31296).parse((0,U.Z)().toString()),a={SearchableText:t.SearchableText,iam:t.iam,topics:t.topics},o=q((0,n.useState)(a),2),i=o[0],l=o[1],c=q((0,n.useState)(6),2);c[0],c[1];return n.createElement("div",{className:"ref"},n.createElement("div",{className:"r-search r-search-container"},n.createElement("div",{className:"row r-search-filters"},n.createElement(g,{url:e.queryUrl,activeFilter:i,onChange:function(e){l(e)}})),n.createElement("div",{className:"r-search-result"},n.createElement(C,{urlParams:i,url:e.queryUrl}),e.resultOption.news&&n.createElement(A,{urlParams:i,url:e.queryUrl}),e.resultOption.events&&n.createElement(_,{urlParams:i,url:e.queryUrl}),e.resultOption.directory&&n.createElement(x,{urlParams:i,url:e.queryUrl}))))}},14844:function(e,t,r){var n=r(78709),a=r(31806),o=r.n(a);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),l=new k(n||[]);return a(i,"_invoke",{value:A(e,r,l)}),i}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",y="suspendedYield",v="executing",b="completed",d={};function g(){}function w(){}function E(){}var S={};f(S,l,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(I([])));j&&j!==r&&n.call(j,l)&&(S=j);var x=E.prototype=g.prototype=Object.create(S);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,l,c){var u=m(e[a],e,o);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,l,c)}),(function(e){r("throw",e,l,c)})):t.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function A(t,r,n){var a=p;return function(o,i){if(a===v)throw new Error("Generator is already running");if(a===b){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var l=n.delegate;if(l){var c=T(l,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=m(t,r,n);if("normal"===u.type){if(a=n.done?b:y,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=b,n.method="throw",n.arg=u.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=m(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(i(t)+" is not iterable")}return w.prototype=E,a(x,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},P(N.prototype),f(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},P(x),f(x,u,"Generator"),f(x,l,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return l.type="throw",l.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function f(e,t,r,n,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,a)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(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 m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.Z=function(e){var t=h((0,n.useState)(null),2),r=t[0],a=t[1],i=h((0,n.useState)(""),2),l=i[0],u=i[1],m=h((0,n.useState)(!0),2),p=m[0],y=m[1],v=h((0,n.useState)(!1),2),b=v[0],d=v[1],g=new AbortController,w=function(){var e,t=(e=s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y(!0),t.load?d(!0):d(!1),0!=Object.keys(t.params).length){e.next=7;break}return a(null),e.abrupt("return");case 7:return e.prev=7,e.next=10,o().request(t);case 10:r=e.sent,a(r.data),y(!1),u(null),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(7),u(e.t0);case 19:case"end":return e.stop()}}),e,null,[[7,16]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,l,"next",e)}function l(e){f(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return w(c(c({},e),{},{signal:g.signal})),function(){return g.abort()}}),[e.params]),{response:r,error:l,isLoading:p,isMore:b}}},6489:function(e,t,r){r(78709);var n=r(51031);t.Z=function(){return new URLSearchParams((0,n.TH)().search)}}}]);
|
2
|
+
"use strict";(self.webpackChunkimio_smartweb_core_webcomponents=self.webpackChunkimio_smartweb_core_webcomponents||[]).push([[323],{73323:function(e,t,r){r.r(t),r.d(t,{default:function(){return Z}});var n=r(78709),a=r(12707),o=r(60563),i=r(51031),l=r(10708);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var u=["SearchableText"],s=["SearchableText"];function f(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c(t)?t:String(t)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e){var t=(0,i.k6)(),a=r(31296),c=v((0,n.useState)(e.activeFilter),2),h=c[0],b=c[1],d=v((0,n.useState)({}),2),g=d[0],w=d[1],E=v((0,n.useState)(null),2),S=E[0],O=E[1],j=v((0,n.useState)(null),2),x=j[0],P=j[1];(0,n.useEffect)((function(){var t,r;t=l.Z.request({method:"get",url:"",baseURL:e.url+"/@vocabularies/imio.smartweb.vocabulary.Topics",headers:{Accept:"application/json"}}),r=l.Z.request({method:"get",url:"",baseURL:e.url+"/@vocabularies/imio.smartweb.vocabulary.IAm",headers:{Accept:"application/json"}}),l.Z.all([t,r]).then(l.Z.spread((function(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1];if(null!==e){var r=e.data.items.map((function(e){return{value:e.token,label:e.title}}));O(r)}if(null!==t){var n=t.data.items.map((function(e){return{value:e.token,label:e.title}}));P(n)}}))).catch((function(e){console.error("errors")}))}),[]);var N=(0,n.useCallback)((function(e,t){var r=t.name;e?b((function(t){return m(m({},t),{},p({},r,e.value))}),[]):b((function(e){var t=m({},e);t[r];return f(t,[r].map(y))}))})),A=(0,n.useRef)(!0);(0,n.useEffect)((function(){A.current?A.current=!1:(t.push({pathname:"./",search:a.stringify(h)}),e.onChange(h))}),[h]);var T=S&&S.filter((function(t){return t.value===e.activeFilter.topics})),L=x&&x.filter((function(t){return t.value===e.activeFilter.iam})),_={control:function(e){return m(m({},e),{},{backgroundColor:"white",borderRadius:"0",height:"50px"})},placeholder:function(e){return m(m({},e),{},{color:"000",fontWeight:"bold",fontSize:"12px",textTransform:"uppercase",letterSpacing:"1.2px"})},option:function(e,t){t.data,t.isDisabled,t.isFocused,t.isSelected;return m({},e)}};return n.createElement(n.Fragment,null,n.createElement("div",{className:"col-md-6 py-1 r-search search-bar-filter"},n.createElement("form",{onSubmit:function(e){e.preventDefault(),g.SearchableText?b((function(e){return m(m({},e),{},{SearchableText:g.SearchableText})}),[]):b((function(e){var t=m({},e);t.SearchableText;return f(t,s)}))}},n.createElement("label",null,n.createElement("input",{name:"SearchableText",type:"text",onChange:function(e){w({SearchableText:e.target.value}),e.target.value?b((function(t){return m(m({},t),{},{SearchableText:e.target.value})}),[]):b((function(e){var t=m({},e);t.SearchableText;return f(t,u)}))},value:g.SearchableText,placeholder:"Recherche"})),n.createElement("button",{type:"submit"}))),n.createElement("div",{className:"col-md-3 col-lg-2 py-1 r-search search-select-filter"},n.createElement(o.ZP,{styles:_,name:"iam",className:"r-search-select",isClearable:!0,onChange:N,options:x&&x,placeholder:"Je suis",value:L&&L[0]})),n.createElement("div",{className:"col-md-3 col-lg-2 py-1 r-search search-select-filter"},n.createElement(o.ZP,{styles:_,name:"topics",className:"r-search-select",isClearable:!0,onChange:N,options:S&&S,placeholder:"Thématiques",value:T&&T[0]})))},g=r(14844),w=r(30144),E=r.n(w);function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(e,t)}(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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var j=function(e){var t=S((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,g.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=directory&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-contact"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Contacts"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(E(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(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 P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var N=function(e){var t=x((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,g.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=news&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-news"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Actualités"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(E(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(e,t)}(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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var L=function(e){var t=A((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,g.Z)({method:"get",url:"",baseURL:e.url+"/@search?&_core=events&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-events"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Événements"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t._url},n.createElement("div",{className:"r-search-img"},t.has_leadimage[0]?n.createElement("div",{className:"r-search-img",style:{backgroundImage:"url("+t.image_url+")"}}):n.createElement("div",{className:"r-search-img no-search-item-img"})),n.createElement(E(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))};function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}(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 k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var I=function(e){var t=_((0,n.useState)([]),2),r=t[0],a=t[1],o=(0,g.Z)({method:"get",url:"",baseURL:e.url+"/@search?&b_size=100",headers:{Accept:"application/json"},params:e.urlParams.SearchableText||e.urlParams.iam||e.urlParams.topics?e.urlParams:{}},[e]),i=o.response;o.error,o.isLoading;return(0,n.useEffect)((function(){a(null!==i?i.items:[])}),[i]),n.createElement("div",{className:"search-web"},n.createElement("div",{className:"r-search-header"},n.createElement("h2",{className:"r-search-header-title"},"Infos pratiques"),n.createElement("p",{className:"r-search-header-count"},r?r.length:"0"," résultats")),n.createElement("ul",{className:"r-search-list"},r.map((function(t,r){return n.createElement("li",{key:r,className:"r-search-item"},n.createElement("a",{href:t["@id"]},n.createElement(E(),{highlightClassName:"r-search-highlighter",searchWords:[e.urlParams.SearchableText],textToHighlight:t.title})))}))))},C=r(6489);function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(e,t)}(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 q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Z(e){return n.createElement(a.VK,null,n.createElement(F,{queryFilterUrl:e.queryFilterUrl,queryUrl:e.queryUrl,resultOption:JSON.parse(e.resultOption)}))}var F=function(e){var t=r(31296).parse((0,C.Z)().toString()),a={SearchableText:t.SearchableText,iam:t.iam,topics:t.topics},o=U((0,n.useState)(a),2),i=o[0],l=o[1],c=U((0,n.useState)(6),2);c[0],c[1];return n.createElement("div",{className:"ref"},n.createElement("div",{className:"r-search r-search-container"},n.createElement("div",{className:"row r-search-filters"},n.createElement(d,{url:e.queryUrl,activeFilter:i,onChange:function(e){l(e)}})),n.createElement("div",{className:"r-search-result"},n.createElement(I,{urlParams:i,url:e.queryUrl}),e.resultOption.news&&n.createElement(N,{urlParams:i,url:e.queryUrl}),e.resultOption.events&&n.createElement(L,{urlParams:i,url:e.queryUrl}),e.resultOption.directory&&n.createElement(j,{urlParams:i,url:e.queryUrl}))))}},14844:function(e,t,r){var n=r(78709),a=r(10708);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),l=new k(n||[]);return a(i,"_invoke",{value:A(e,r,l)}),i}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",y="suspendedYield",v="executing",b="completed",d={};function g(){}function w(){}function E(){}var S={};f(S,l,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(I([])));j&&j!==r&&n.call(j,l)&&(S=j);var x=E.prototype=g.prototype=Object.create(S);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,i,l,c){var u=m(e[a],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,l,c)}),(function(e){r("throw",e,l,c)})):t.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function A(t,r,n){var a=p;return function(o,i){if(a===v)throw new Error("Generator is already running");if(a===b){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var l=n.delegate;if(l){var c=T(l,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=m(t,r,n);if("normal"===u.type){if(a=n.done?b:y,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=b,n.method="throw",n.arg=u.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=m(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return w.prototype=E,a(x,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},P(N.prototype),f(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},P(x),f(x,s,"Generator"),f(x,l,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return l.type="throw",l.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function s(e,t,r,n,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,a)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}(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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.Z=function(e){var t=f((0,n.useState)(null),2),r=t[0],o=t[1],i=f((0,n.useState)(""),2),c=i[0],h=i[1],m=f((0,n.useState)(!0),2),p=m[0],y=m[1],v=f((0,n.useState)(!1),2),b=v[0],d=v[1],g=new AbortController,w=function(){var e,t=(e=u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y(!0),t.load?d(!0):d(!1),0!=Object.keys(t.params).length){e.next=7;break}return o(null),e.abrupt("return");case 7:return e.prev=7,e.next=10,a.Z.request(t);case 10:r=e.sent,o(r.data),y(!1),h(null),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(7),h(e.t0);case 19:case"end":return e.stop()}}),e,null,[[7,16]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return w(l(l({},e),{},{signal:g.signal})),function(){return g.abort()}}),[e.params]),{response:r,error:c,isLoading:p,isMore:b}}},6489:function(e,t,r){r(78709);var n=r(51031);t.Z=function(){return new URLSearchParams((0,n.TH)().search)}}}]);
|