@tmf_ciclica/ciclicastorybook 1.1.23 → 1.1.25

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.
@@ -0,0 +1,2525 @@
1
+ import { jsxs as m, jsx as r, Fragment as qe } from "react/jsx-runtime";
2
+ import Z, { useState as B, useEffect as F, useMemo as te, useLayoutEffect as Ee, useRef as me } from "react";
3
+ import e from "prop-types";
4
+ import { useTranslation as k, Trans as ge } from "react-i18next";
5
+ import { motion as Ce } from "framer-motion";
6
+ import { create as Ke } from "zustand";
7
+ import * as ye from "d3";
8
+ import Ze from "mapbox-gl";
9
+ import { useSelector as de, useDispatch as Te } from "react-redux";
10
+ import Ue, { Source as He, Layer as Ge, NavigationControl as Ye, Popup as We } from "react-map-gl/mapbox";
11
+ import ie from "maplibre-gl";
12
+ import { Protocol as Xe } from "pmtiles";
13
+ import Je, { Source as Qe, Layer as et, NavigationControl as tt, Popup as nt } from "react-map-gl/maplibre";
14
+ import { createSlice as Me } from "@reduxjs/toolkit";
15
+ import it from "@mui/material/Slider";
16
+ import { createTheme as ot, Box as st } from "@mui/material";
17
+ import { ThemeProvider as rt } from "@emotion/react";
18
+ import { NavLink as at } from "react-router-dom";
19
+ const lt = "_ambitSelector_tqnnf_2", ct = "_header_tqnnf_11", dt = "_nameDateContainer_tqnnf_21", pt = "_ambitName_tqnnf_37", ut = "_ambitDate_tqnnf_51", ht = "_buttonsContainer_tqnnf_65", q = {
20
+ ambitSelector: lt,
21
+ header: ct,
22
+ nameDateContainer: dt,
23
+ ambitName: pt,
24
+ ambitDate: ut,
25
+ buttonsContainer: ht
26
+ }, mt = "_ambitItem_1ueih_2", gt = "_ambitNameDate_1ueih_16", Ct = "_ambitName_1ueih_16", bt = "_ambitDate_1ueih_35", ft = "_ambitButtons_1ueih_38", H = {
27
+ ambitItem: mt,
28
+ ambitNameDate: gt,
29
+ ambitName: Ct,
30
+ ambitDate: bt,
31
+ ambitButtons: ft
32
+ }, yt = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Eliminar'%3e%3ccircle%20id='Ellipse%20220'%20cx='15.5106'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M20.8581%2010.5548H17.5491V10.4015C17.5491%209.17493%2016.6257%208.255%2015.4714%208.255C14.3171%208.255%2013.3167%209.17493%2013.3167%2010.4015V10.5548H10.0846C9.69985%2010.5548%209.46899%2010.7848%209.46899%2011.1681C9.46899%2011.5514%209.69985%2011.7814%2010.0846%2011.7814H10.2385V21.2106C10.2385%2022.3605%2011.162%2023.3571%2012.3932%2023.3571H18.5495C19.7038%2023.3571%2020.7042%2022.4372%2020.7042%2021.2106V11.7047H20.9351C21.2429%2011.7047%2021.5507%2011.4747%2021.5507%2011.0914C21.5507%2010.7081%2021.1659%2010.5548%2020.8581%2010.5548ZM14.471%2010.4015C14.471%209.86488%2014.9327%209.40491%2015.4714%209.40491C16.01%209.40491%2016.3948%209.86488%2016.3948%2010.4015V10.5548H14.471V10.4015ZM16.3948%2018.8342V15.0011C16.3948%2014.6178%2016.6257%2014.3878%2017.0104%2014.3878C17.3952%2014.3878%2017.6261%2014.6178%2017.6261%2015.0011V18.8342C17.6261%2019.1408%2017.3952%2019.4474%2017.0104%2019.4474C16.6257%2019.4474%2016.3948%2019.1408%2016.3948%2018.8342ZM13.3167%2018.8342V15.0011C13.3167%2014.6178%2013.5475%2014.3878%2013.9323%2014.3878C14.3171%2014.3878%2014.5479%2014.6178%2014.5479%2015.0011V18.8342C14.5479%2019.1408%2014.3171%2019.4474%2013.9323%2019.4474C13.5475%2019.4474%2013.3167%2019.1408%2013.3167%2018.8342Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e", vt = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209259'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.3062'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203973'%3e%3cg%20id='Rectangle%20495'%3e%3cmask%20id='path-2-inside-1_4451_10560'%20fill='white'%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'/%3e%3c/mask%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'%20stroke='%23605B56'%20stroke-width='3'%20mask='url(%23path-2-inside-1_4451_10560)'/%3e%3c/g%3e%3cg%20id='Group%203972'%3e%3crect%20id='Rectangle%20496'%20x='7.2041'%20y='10.9042'%20width='12.8'%20height='12.8'%20rx='1'%20fill='%23605B56'/%3e%3cpath%20id='+'%20d='M16.3785%2018.0509H14.3838V20.0776H12.9331V18.0509H10.9385V16.6749H12.9331V14.6376H14.3838V16.6749H16.3785V18.0509Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", _t = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209260'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M8.20744%208.70422C7.34769%208.70422%206.88873%209.71735%207.45568%2010.3637L13.3518%2017.085C13.5118%2017.2675%2013.6%2017.5018%2013.6%2017.7445V23.2443C13.6%2023.6283%2013.8199%2023.9783%2014.1658%2024.1451L15.9658%2025.0128C16.6297%2025.3329%2017.4%2024.8491%2017.4%2024.112V17.7445C17.4%2017.5018%2017.4882%2017.2675%2017.6482%2017.085L23.5443%2010.3637C24.1113%209.71735%2023.6523%208.70422%2022.7926%208.70422H8.20744Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e", xt = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206725'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.7148'%20r='14.3521'%20stroke='%23605B56'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cg%20id='Group%206724'%3e%3cpath%20id='Vector'%20d='M17.4114%2023.3302C17.4114%2024.5419%2016.4269%2027.4724%2015.2126%2027.4724C13.9982%2027.4724%2013.0137%2024.5419%2013.0137%2023.3302C13.0137%2022.7483%2013.2453%2022.1902%2013.6577%2021.7787C14.0701%2021.3673%2014.6294%2021.1361%2015.2126%2021.1361C15.7957%2021.1361%2016.355%2021.3673%2016.7674%2021.7787C17.1798%2022.1902%2017.4114%2022.7483%2017.4114%2023.3302Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union'%20d='M15.2919%2020.6088H11.2899L11.289%2020.6078C10.6273%2020.7718%209.36856%2021.3396%209.39931%2023.2845C9.39931%2023.2845%207.41254%2021.7976%208.17372%2019.0179L8.25575%2018.7445C8.59675%2017.7118%209.66004%2016.7306%2010.7714%2016.2435C10.7337%2012.8666%2011.5045%208.19644%2015.2919%204.724V20.6088ZM10.6835%2017.4164C10.5323%2017.5091%2010.3819%2017.6125%2010.2372%2017.7279C9.77215%2018.099%209.43634%2018.5195%209.26747%2018.8988L9.20595%2019.058C8.95666%2019.8145%208.9632%2020.4347%209.07607%2020.9291C9.34144%2020.5645%209.66233%2020.2832%209.9999%2020.0746C10.2365%2019.9284%2010.4715%2019.8251%2010.6835%2019.7494V17.4164Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union_2'%20d='M15.293%204.724C19.0931%208.20817%2019.8548%2012.8981%2019.8115%2016.2777C20.8629%2016.7859%2021.8411%2017.7218%2022.165%2018.7045C23.1398%2021.6599%2021.0225%2023.2445%2021.0225%2023.2445C21.051%2021.4361%2019.9648%2020.8184%2019.2803%2020.6088H15.293V4.724ZM19.7676%2017.3949C19.7586%2017.5313%2019.7493%2017.6646%2019.7383%2017.7943V19.7094C19.9502%2019.7851%2020.1854%2019.8884%2020.4219%2020.0345C20.7595%2020.2432%2021.0794%2020.5253%2021.3447%2020.89C21.4466%2020.444%2021.4627%2019.8956%2021.2812%2019.2367L21.2148%2019.0179C21.0772%2018.6004%2020.7157%2018.1118%2020.1846%2017.6879C20.0493%2017.58%2019.9088%2017.4829%2019.7676%2017.3949Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cg%20id='Vector_2'%3e%3cpath%20d='M12.541%208.28445C12.541%208.28445%2014.8218%209.81829%2018.0434%208.28445C18.0434%208.28445%2016.9978%206.03912%2015.2919%204.61267C15.2919%204.61267%2013.7894%205.92343%2012.541%208.28445Z'%20fill='%23FDFDFD'/%3e%3cpath%20d='M15.3057%205.29626C15.9532%205.9116%2016.4918%206.63792%2016.8867%207.2533C17.0801%207.55466%2017.2355%207.82605%2017.3516%208.03748C16.0573%208.54342%2014.966%208.52427%2014.1807%208.36951C13.781%208.29074%2013.4584%208.17533%2013.2266%208.07556C13.7607%207.14513%2014.32%206.40895%2014.7646%205.88806C14.9759%205.64056%2015.1621%205.44302%2015.3057%205.29626Z'%20stroke='%23605B56'%20stroke-opacity='0.5'/%3e%3c/g%3e%3cpath%20id='Vector_3'%20d='M17.6984%2012.9862C17.6985%2013.4539%2017.5596%2013.9111%2017.2993%2014.3001C17.039%2014.689%2016.669%2014.9922%2016.236%2015.1712C15.803%2015.3503%2015.3265%2015.3972%2014.8668%2015.3061C14.4071%2015.2149%2013.9848%2014.9898%2013.6533%2014.6591C13.3218%2014.3285%2013.0961%2013.9072%2013.0046%2013.4485C12.9131%2012.9898%2012.96%2012.5143%2013.1393%2012.0822C13.3186%2011.6501%2013.6224%2011.2808%2014.0121%2011.021C14.4018%2010.7611%2014.86%2010.6224%2015.3287%2010.6224C15.957%2010.6224%2016.5597%2010.8715%2017.004%2011.3147C17.4484%2011.758%2017.6982%2012.3593%2017.6984%2012.9862Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_4'%20d='M17.1358%2013.0038C17.1358%2013.36%2017.0299%2013.7083%2016.8316%2014.0045C16.6332%2014.3007%2016.3513%2014.5316%2016.0214%2014.6679C15.6916%2014.8042%2015.3286%2014.8399%2014.9784%2014.7704C14.6282%2014.7009%2014.3066%2014.5294%2014.0541%2014.2774C13.8017%2014.0255%2013.6297%2013.7046%2013.5601%2013.3552C13.4904%2013.0058%2013.5262%2012.6436%2013.6628%2012.3145C13.7994%2011.9853%2014.0308%2011.704%2014.3277%2011.5061C14.6245%2011.3082%2014.9736%2011.2025%2015.3306%2011.2025C15.8094%2011.2025%2016.2685%2011.3923%2016.6071%2011.7301C16.9456%2012.0679%2017.1358%2012.526%2017.1358%2013.0038Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_5'%20d='M16.7061%2013.2093C16.6508%2013.2093%2016.5978%2013.1874%2016.5588%2013.1485C16.5197%2013.1095%2016.4978%2013.0566%2016.4978%2013.0015C16.4974%2012.7236%2016.3866%2012.4572%2016.1897%2012.2607C15.9928%2012.0642%2015.7258%2011.9537%2015.4473%2011.9533C15.4175%2011.9582%2015.3869%2011.9566%2015.3578%2011.9485C15.3287%2011.9405%2015.3017%2011.9262%2015.2786%2011.9067C15.2556%2011.8872%2015.237%2011.8629%2015.2244%2011.8356C15.2117%2011.8082%2015.2051%2011.7784%2015.2051%2011.7482C15.2051%2011.7181%2015.2117%2011.6883%2015.2244%2011.6609C15.237%2011.6336%2015.2556%2011.6093%2015.2786%2011.5898C15.3017%2011.5703%2015.3287%2011.556%2015.3578%2011.5479C15.3869%2011.5399%2015.4175%2011.5383%2015.4473%2011.5432C15.8348%2011.5435%2016.2063%2011.6973%2016.4803%2011.9707C16.7543%2012.2441%2016.9084%2012.6148%2016.9088%2013.0015C16.9088%2013.0557%2016.8876%2013.1077%2016.8498%2013.1465C16.8119%2013.1854%2016.7603%2013.2079%2016.7061%2013.2093Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_6'%20d='M16.8082%2013.6607C16.8082%2013.7106%2016.7934%2013.7594%2016.7656%2013.8008C16.7378%2013.8423%2016.6984%2013.8746%2016.6522%2013.8937C16.606%2013.9128%2016.5552%2013.9178%2016.5062%2013.9081C16.4571%2013.8983%2016.4121%2013.8743%2016.3768%2013.8391C16.3414%2013.8038%2016.3173%2013.7589%2016.3076%2013.7099C16.2978%2013.661%2016.3028%2013.6103%2016.322%2013.5642C16.3411%2013.5182%2016.3735%2013.4788%2016.4151%2013.4511C16.4566%2013.4234%2016.5055%2013.4086%2016.5555%2013.4086C16.6225%2013.4086%2016.6868%2013.4351%2016.7342%2013.4824C16.7816%2013.5297%2016.8082%2013.5939%2016.8082%2013.6607Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_7'%20d='M15.6008%2016.0612C15.5633%2016.0097%2015.5141%2015.9677%2015.4573%2015.9388C15.4005%2015.9099%2015.3376%2015.8949%2015.2738%2015.8949H15.1898C15.126%2015.8948%2015.0631%2015.9099%2015.0062%2015.9388C14.9494%2015.9677%2014.9002%2016.0096%2014.8627%2016.0612C14.8627%2016.0612%2013.6074%2017.4973%2014.1816%2021.0915C14.4989%2023.0777%2015.2314%2023.6694%2015.2314%2023.6694C15.2314%2023.6694%2015.9639%2023.0777%2016.2819%2021.0915C16.8561%2017.4973%2015.6008%2016.0612%2015.6008%2016.0612Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_8'%20d='M15.1468%2015.8949C15.083%2015.8948%2015.0201%2015.9099%2014.9632%2015.9388C14.9064%2015.9677%2014.8572%2016.0096%2014.8198%2016.0612C14.8198%2016.0612%2013.5645%2017.4973%2014.1387%2021.0915C14.456%2023.0777%2015.1884%2023.6694%2015.1884%2023.6694V15.8949H15.1468Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", wt = "data:image/svg+xml,%3csvg%20width='26'%20height='14'%20viewBox='0%200%2026%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205138'%3e%3cpath%20id='Vector'%20d='M12.95%200.408447C7.659%200.408447%202.84899%202.77185%200.0832465%206.72621C-0.0277488%206.88808%20-0.0277488%207.09621%200.0832465%207.25807C2.84439%2011.2125%207.65437%2013.5712%2012.95%2013.5712C18.2456%2013.5712%2023.0556%2011.2125%2025.8168%207.25807C25.9278%207.0962%2025.9278%206.88807%2025.8168%206.72621C23.051%202.77184%2018.241%200.408447%2012.95%200.408447ZM12.95%2011.2217C10.619%2011.2217%208.71812%209.32083%208.71812%206.98984C8.71812%204.65885%2010.619%202.75796%2012.95%202.75796C15.281%202.75796%2017.1819%204.65883%2017.1819%206.98984C17.1819%209.32085%2015.281%2011.2217%2012.95%2011.2217Z'%20fill='%23B32F5D'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%2010.2966C14.7777%2010.2966%2016.2583%208.81607%2016.2583%206.98974C16.2583%205.1634%2014.7777%203.68286%2012.9514%203.68286C11.1251%203.68286%209.64453%205.1634%209.64453%206.98974C9.64453%208.81607%2011.1251%2010.2966%2012.9514%2010.2966Z'%20fill='%23B32F5D'/%3e%3c/g%3e%3c/svg%3e", kt = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205207'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e", Fe = ({
33
+ ambit: i,
34
+ onClickCopy: d,
35
+ onClickDelete: s,
36
+ onClickFilters: n,
37
+ onClickAmbit: t,
38
+ isActive: o,
39
+ activeColor: l,
40
+ fontColor: a,
41
+ moreInfo: c
42
+ }) => {
43
+ const { name: p, date: u, id: h, isBeingProcessed: g } = i;
44
+ return /* @__PURE__ */ m(
45
+ "div",
46
+ {
47
+ className: H.ambitItem,
48
+ style: { borderBottom: `1px solid ${a}` },
49
+ children: [
50
+ /* @__PURE__ */ m("div", { className: H.ambitNameDate, onClick: () => t(h), children: [
51
+ /* @__PURE__ */ m("div", { className: H.ambitName, children: [
52
+ /* @__PURE__ */ r(
53
+ "img",
54
+ {
55
+ style: { marginRight: 9 },
56
+ src: o ? wt : kt
57
+ }
58
+ ),
59
+ /* @__PURE__ */ r("span", { style: { color: o ? l : a }, children: p })
60
+ ] }),
61
+ /* @__PURE__ */ r("div", { className: H.ambitDate, children: new Date(u).toLocaleDateString() })
62
+ ] }),
63
+ /* @__PURE__ */ m("div", { className: H.ambitButtons, children: [
64
+ g && /* @__PURE__ */ r("img", { src: xt }),
65
+ /* @__PURE__ */ r("button", { onClick: () => n(h), children: /* @__PURE__ */ r("img", { src: _t }) }),
66
+ /* @__PURE__ */ r("button", { onClick: () => d(h), children: /* @__PURE__ */ r("img", { src: vt }) }),
67
+ /* @__PURE__ */ r("button", { onClick: () => s(h), children: /* @__PURE__ */ r("img", { src: yt }) })
68
+ ] })
69
+ ]
70
+ }
71
+ );
72
+ };
73
+ Fe.propTypes = {
74
+ ambit: e.shape({
75
+ name: e.string.isRequired,
76
+ date: e.string.isRequired,
77
+ id: e.string.isRequired,
78
+ isBeingProcessed: e.bool
79
+ }).isRequired,
80
+ onClickCopy: e.func.isRequired,
81
+ onClickDelete: e.func.isRequired,
82
+ onClickFilters: e.func.isRequired,
83
+ onClickAmbit: e.func.isRequired,
84
+ isBeingProcessed: e.bool,
85
+ isActive: e.bool,
86
+ activeColor: e.string,
87
+ fontColor: e.string,
88
+ moreInfo: e.object
89
+ // Optional, can be used for additional info
90
+ };
91
+ const ve = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Nt = ({
92
+ ambitList: i,
93
+ activeAmbitId: d,
94
+ fontColor: s = "#605B56",
95
+ activeColor: n,
96
+ nameLabel: t,
97
+ dateLabel: o,
98
+ onClickCopy: l = (u) => console.log(`Copy ambit: ${u}`),
99
+ onCLickDelete: a = (u) => console.log(`Delete ambit: ${u}`),
100
+ onClickFilters: c = (u) => console.log(`Filters clicked: ${u}`),
101
+ onClickAmbit: p = (u) => console.log(`OnCLickAmbit: ${u}`)
102
+ }) => {
103
+ const { t: u } = k(), [h, g] = B(i);
104
+ F(() => {
105
+ i && g(i);
106
+ }, [i]);
107
+ const C = (b) => {
108
+ if (h && h.length > 0) {
109
+ let f = [...h];
110
+ f.sort((v, y) => v[b].localeCompare(y[b])), g(f);
111
+ }
112
+ };
113
+ return /* @__PURE__ */ m("div", { className: q.ambitSelector, style: { color: s }, children: [
114
+ /* @__PURE__ */ m(
115
+ "div",
116
+ {
117
+ className: q.header,
118
+ style: { borderBottom: `1px solid ${s}` },
119
+ children: [
120
+ /* @__PURE__ */ m("div", { className: q.nameDateContainer, children: [
121
+ /* @__PURE__ */ r("div", { className: q.ambitName, children: /* @__PURE__ */ m("button", { onClick: () => C("name"), children: [
122
+ /* @__PURE__ */ r("span", { children: u(t) }),
123
+ /* @__PURE__ */ r("img", { src: ve })
124
+ ] }) }),
125
+ /* @__PURE__ */ r("div", { className: q.ambitDate, children: /* @__PURE__ */ m("button", { onClick: () => C("date"), children: [
126
+ /* @__PURE__ */ r("span", { children: u(o) }),
127
+ /* @__PURE__ */ r("img", { src: ve })
128
+ ] }) })
129
+ ] }),
130
+ /* @__PURE__ */ r("div", { className: q.buttonsContainer })
131
+ ]
132
+ }
133
+ ),
134
+ h && h.length > 0 && h.map((b) => /* @__PURE__ */ r(
135
+ Fe,
136
+ {
137
+ isActive: d == b.id,
138
+ ambit: b,
139
+ fontColor: s,
140
+ activeColor: n,
141
+ onClickCopy: l,
142
+ onClickDelete: a,
143
+ onClickFilters: c,
144
+ onClickAmbit: p
145
+ },
146
+ `ambitKey${b.id}`
147
+ ))
148
+ ] });
149
+ };
150
+ Nt.propTypes = {
151
+ ambitList: e.arrayOf(
152
+ e.shape({
153
+ name: e.string.isRequired,
154
+ date: e.string.isRequired,
155
+ id: e.string.isRequired
156
+ })
157
+ ).isRequired,
158
+ activeAmbitId: e.string,
159
+ fontColor: e.string,
160
+ activeColor: e.string,
161
+ onClickCopy: e.func.isRequired,
162
+ onCLickDelete: e.func.isRequired,
163
+ onClickFilters: e.func.isRequired,
164
+ onClickAmbit: e.func.isRequired,
165
+ nameLabel: e.string,
166
+ dateLabel: e.string
167
+ };
168
+ const St = "_buttonsContainer_1audx_2", Tt = "_vertical_1audx_6", Mt = "_horizontal_1audx_9", Ft = "_button_1audx_2", Lt = "_active_1audx_25", Dt = "_buttonName_1audx_28", R = {
169
+ buttonsContainer: St,
170
+ vertical: Tt,
171
+ horizontal: Mt,
172
+ button: Ft,
173
+ active: Lt,
174
+ buttonName: Dt
175
+ }, Bt = "_left_19lnt_3", $t = "_top_19lnt_33", Ot = "_bottom_19lnt_66", At = "_right_19lnt_97", It = {
176
+ left: Bt,
177
+ top: $t,
178
+ bottom: Ot,
179
+ right: At
180
+ }, Le = ({ text: i, position: d, styleCustom: s = null }) => {
181
+ const { t: n } = k();
182
+ return /* @__PURE__ */ r("div", { className: `tooltip ${It[d]}`, style: s, children: n(i) });
183
+ };
184
+ Le.propTypes = {
185
+ text: e.string.isRequired,
186
+ position: e.oneOf(["top", "bottom", "left", "right"]).isRequired,
187
+ styleCustom: e.object
188
+ };
189
+ const Rt = ({
190
+ buttons: i = [],
191
+ orientation: d = "horizontal",
192
+ showName: s = !0,
193
+ namePosition: n = "right",
194
+ useTooltip: t = !1,
195
+ tooltipPosition: o = "top"
196
+ }) => {
197
+ const { t: l } = k();
198
+ return /* @__PURE__ */ r(
199
+ "div",
200
+ {
201
+ className: `${R.buttonsContainer} ${d === "vertical" && R.vertical}
202
+ ${d === "horizontal" && R.horizontal}`,
203
+ children: i.map((a, c) => {
204
+ const {
205
+ icon: p,
206
+ activeIcon: u,
207
+ isActive: h,
208
+ name: g,
209
+ onClick: C
210
+ } = a, b = /* @__PURE__ */ m(qe, { children: [
211
+ s && n === "left" && /* @__PURE__ */ r("span", { className: R.buttonName, children: l(g) }),
212
+ /* @__PURE__ */ r("img", { src: h ? u : p, alt: l(g) }),
213
+ s && n === "right" && /* @__PURE__ */ r("span", { className: R.buttonName, children: l(g) })
214
+ ] });
215
+ return /* @__PURE__ */ m("div", { className: "tooltip-parent", children: [
216
+ /* @__PURE__ */ r(
217
+ "button",
218
+ {
219
+ onClick: C,
220
+ className: `${R.button}
221
+ ${h && R.active}`,
222
+ children: b
223
+ }
224
+ ),
225
+ t && /* @__PURE__ */ r(Le, { text: g, position: o })
226
+ ] }, c);
227
+ })
228
+ }
229
+ );
230
+ };
231
+ Rt.propTypes = {
232
+ buttons: e.arrayOf(
233
+ e.shape({
234
+ icon: e.node.isRequired,
235
+ activeIcon: e.node,
236
+ isActive: e.bool,
237
+ name: e.string,
238
+ // key de i18n
239
+ onClick: e.func
240
+ })
241
+ ).isRequired,
242
+ orientation: e.oneOf(["horizontal", "vertical"]),
243
+ showName: e.bool,
244
+ namePosition: e.oneOf(["left", "right"]),
245
+ useTooltip: e.bool,
246
+ tooltipPosition: e.oneOf(["top", "bottom", "left", "right"])
247
+ };
248
+ const Vt = "_indicatorsCategory_1cu33_2", jt = "_title_1cu33_5", oe = {
249
+ indicatorsCategory: Vt,
250
+ title: jt
251
+ }, z = ({
252
+ isOpen: i,
253
+ onClick: d,
254
+ children: s,
255
+ color: n,
256
+ activeColor: t = "#F8A925",
257
+ title: o = "Title",
258
+ //Change the height only if the title is more than one line or you change title fontSize, otherwise should be 53px
259
+ height: l = 53,
260
+ //Adjust height if you change fontSize
261
+ titleFontStyles: a,
262
+ showBottomBar: c = !0,
263
+ titleMarginChildren: p = 25
264
+ }) => {
265
+ const { t: u } = k();
266
+ return /* @__PURE__ */ m(
267
+ Ce.div,
268
+ {
269
+ className: oe.indicatorsCategory,
270
+ initial: { height: `${l}px` },
271
+ animate: { height: i ? "auto" : `${l}px` },
272
+ transition: { duration: 0.4 },
273
+ style: {
274
+ backgroundColor: "white",
275
+ borderBottom: i && c ? `1px solid ${t}` : "0px",
276
+ marginBottom: i ? "20px" : "0px"
277
+ },
278
+ children: [
279
+ /* @__PURE__ */ m(
280
+ "h2",
281
+ {
282
+ style: {
283
+ ...a,
284
+ marginBottom: p || "auto"
285
+ },
286
+ className: `${oe.title}`,
287
+ onClick: d,
288
+ children: [
289
+ /* @__PURE__ */ r("span", { style: { color: i ? t : n }, children: i ? "-" : "+" }),
290
+ /* @__PURE__ */ r("span", { style: { marginLeft: 12, color: i ? t : n }, children: u(o) })
291
+ ]
292
+ }
293
+ ),
294
+ /* @__PURE__ */ r("div", { className: oe.content, children: s })
295
+ ]
296
+ }
297
+ );
298
+ };
299
+ z.propTypes = {
300
+ isOpen: e.bool,
301
+ onClick: e.func,
302
+ children: e.node,
303
+ color: e.string,
304
+ activeColor: e.string,
305
+ title: e.string,
306
+ height: e.number,
307
+ showBottomBar: e.bool,
308
+ titleFontStyles: e.object
309
+ };
310
+ const ao = () => /* @__PURE__ */ r("div", { children: "EditAmbit" }), zt = "data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201L13.9996%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M14%201L1.00044%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e", Pt = "_AppliedFiltersContainer_s8ooe_2", qt = "_AppliedFilterContent_s8ooe_10", _e = {
311
+ AppliedFiltersContainer: Pt,
312
+ AppliedFilterContent: qt
313
+ }, T = Ke((i) => ({
314
+ activeCategory: "",
315
+ activeSubCategory: "",
316
+ selectedIndicator: "",
317
+ tematicalFiltersSelected: [],
318
+ fontColor: "#605B56",
319
+ inputsColor: "#605B56"
320
+ })), De = ({ title: i, onClick: d, isOpen: s = !0, textColor: n = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o }) => {
321
+ const { t: l } = k(), { tematicalFiltersSelected: a } = T((p) => p), c = (p) => {
322
+ T.setState((u) => ({
323
+ tematicalFiltersSelected: u.tematicalFiltersSelected.filter(
324
+ (h) => h.code !== p
325
+ )
326
+ }));
327
+ };
328
+ return /* @__PURE__ */ r(
329
+ z,
330
+ {
331
+ isOpen: s,
332
+ onClick: d,
333
+ title: i ? l(i) : "Applied Filters",
334
+ activeColor: o,
335
+ children: /* @__PURE__ */ r("div", { className: _e.AppliedFiltersContainer, children: a == null ? void 0 : a.map((p, u) => /* @__PURE__ */ m("div", { className: _e.AppliedFilterContent, style: { color: n, background: t }, children: [
336
+ l(p.name),
337
+ /* @__PURE__ */ r("img", { src: zt, alt: "CloseIcon", onClick: () => c(p.code), style: { cursor: "pointer" } })
338
+ ] }, u)) })
339
+ }
340
+ );
341
+ };
342
+ De.propTypes = {
343
+ isOpen: e.bool,
344
+ onClick: e.func,
345
+ title: e.string,
346
+ textColor: e.string,
347
+ backgroundColor: e.string,
348
+ indicators: e.arrayOf(
349
+ e.shape({
350
+ title: e.string.isRequired,
351
+ Codename: e.string.isRequired
352
+ })
353
+ ),
354
+ activeColor: e.string
355
+ };
356
+ const Be = ({ title: i, onClick: d, isOpen: s = !0, textColor: n = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o }) => {
357
+ const { t: l } = k(), { tematicalFiltersSelected: a } = T((c) => c);
358
+ return /* @__PURE__ */ r(
359
+ z,
360
+ {
361
+ isOpen: s,
362
+ onClick: d,
363
+ title: i ? l(i) : "Geographical Filters",
364
+ activeColor: o,
365
+ children: "A"
366
+ }
367
+ );
368
+ };
369
+ Be.propTypes = {
370
+ isOpen: e.bool,
371
+ onClick: e.func,
372
+ title: e.string,
373
+ textColor: e.string,
374
+ backgroundColor: e.string,
375
+ activeColor: e.string
376
+ };
377
+ const Et = "_checkboxContainer_zld97_2", Kt = {
378
+ checkboxContainer: Et
379
+ }, $e = ({
380
+ onClick: i,
381
+ containerStyles: d,
382
+ color: s = "#605B56",
383
+ indicator: n,
384
+ value: t
385
+ }) => {
386
+ const { t: o } = k(), { title: l } = n || {}, { fontColor: a, inputsColor: c } = T((p) => p);
387
+ return /* @__PURE__ */ m(
388
+ "div",
389
+ {
390
+ style: { ...d, color: s },
391
+ role: "checkbox",
392
+ className: Kt.checkboxContainer,
393
+ onClick: i,
394
+ children: [
395
+ /* @__PURE__ */ r(
396
+ "input",
397
+ {
398
+ type: "checkbox",
399
+ checked: typeof t == "boolean" ? t : !0,
400
+ value: t,
401
+ readOnly: !0,
402
+ style: {
403
+ border: `1.5px solid ${t ? c : a}`,
404
+ backgroundColor: t ? c : "white"
405
+ }
406
+ }
407
+ ),
408
+ /* @__PURE__ */ r("span", { className: "checkmark", children: o(l) })
409
+ ]
410
+ }
411
+ );
412
+ };
413
+ $e.propTypes = {
414
+ onClick: e.func,
415
+ value: e.bool,
416
+ containerStyles: e.object,
417
+ color: e.string,
418
+ indicator: e.shape({
419
+ title: e.string,
420
+ codename: e.array
421
+ }),
422
+ checkedColor: e.string
423
+ };
424
+ function pe(i, d) {
425
+ return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, n) {
426
+ return s.__proto__ = n, s;
427
+ }, pe(i, d);
428
+ }
429
+ function Zt(i, d) {
430
+ i.prototype = Object.create(d.prototype), i.prototype.constructor = i, pe(i, d);
431
+ }
432
+ function se(i) {
433
+ return i && i.stopPropagation && i.stopPropagation(), i && i.preventDefault && i.preventDefault(), !1;
434
+ }
435
+ function re(i) {
436
+ return i == null ? [] : Array.isArray(i) ? i.slice() : [i];
437
+ }
438
+ function W(i) {
439
+ return i !== null && i.length === 1 ? i[0] : i.slice();
440
+ }
441
+ function X(i) {
442
+ Object.keys(i).forEach((d) => {
443
+ typeof document < "u" && document.addEventListener(d, i[d], !1);
444
+ });
445
+ }
446
+ function V(i, d) {
447
+ return ue(function(s, n) {
448
+ let t = s;
449
+ return t <= n.min && (t = n.min), t >= n.max && (t = n.max), t;
450
+ }(i, d), d);
451
+ }
452
+ function ue(i, d) {
453
+ const s = (i - d.min) % d.step;
454
+ let n = i - s;
455
+ return 2 * Math.abs(s) >= d.step && (n += s > 0 ? d.step : -d.step), parseFloat(n.toFixed(5));
456
+ }
457
+ let he = function(i) {
458
+ function d(n) {
459
+ var t;
460
+ (t = i.call(this, n) || this).onKeyUp = () => {
461
+ t.onEnd();
462
+ }, t.onMouseUp = () => {
463
+ t.onEnd(t.getMouseEventMap());
464
+ }, t.onTouchEnd = (a) => {
465
+ a.preventDefault(), t.onEnd(t.getTouchEventMap());
466
+ }, t.onBlur = () => {
467
+ t.setState({ index: -1 }, t.onEnd(t.getKeyDownEventMap()));
468
+ }, t.onMouseMove = (a) => {
469
+ t.setState({ pending: !0 });
470
+ const c = t.getMousePosition(a), p = t.getDiffPosition(c[0]), u = t.getValueFromPosition(p);
471
+ t.move(u);
472
+ }, t.onTouchMove = (a) => {
473
+ if (a.touches.length > 1) return;
474
+ t.setState({ pending: !0 });
475
+ const c = t.getTouchPosition(a);
476
+ if (t.isScrolling === void 0) {
477
+ const h = c[0] - t.startPosition[0], g = c[1] - t.startPosition[1];
478
+ t.isScrolling = Math.abs(g) > Math.abs(h);
479
+ }
480
+ if (t.isScrolling) return void t.setState({ index: -1 });
481
+ const p = t.getDiffPosition(c[0]), u = t.getValueFromPosition(p);
482
+ t.move(u);
483
+ }, t.onKeyDown = (a) => {
484
+ if (!(a.ctrlKey || a.shiftKey || a.altKey || a.metaKey)) switch (t.setState({ pending: !0 }), a.key) {
485
+ case "ArrowLeft":
486
+ case "ArrowDown":
487
+ case "Left":
488
+ case "Down":
489
+ a.preventDefault(), t.moveDownByStep();
490
+ break;
491
+ case "ArrowRight":
492
+ case "ArrowUp":
493
+ case "Right":
494
+ case "Up":
495
+ a.preventDefault(), t.moveUpByStep();
496
+ break;
497
+ case "Home":
498
+ a.preventDefault(), t.move(t.props.min);
499
+ break;
500
+ case "End":
501
+ a.preventDefault(), t.move(t.props.max);
502
+ break;
503
+ case "PageDown":
504
+ a.preventDefault(), t.moveDownByStep(t.props.pageFn(t.props.step));
505
+ break;
506
+ case "PageUp":
507
+ a.preventDefault(), t.moveUpByStep(t.props.pageFn(t.props.step));
508
+ }
509
+ }, t.onSliderMouseDown = (a) => {
510
+ if (!t.props.disabled && a.button !== 2) {
511
+ if (t.setState({ pending: !0 }), !t.props.snapDragDisabled) {
512
+ const c = t.getMousePosition(a);
513
+ t.forceValueFromPosition(c[0], (p) => {
514
+ t.start(p, c[0]), X(t.getMouseEventMap());
515
+ });
516
+ }
517
+ se(a);
518
+ }
519
+ }, t.onSliderClick = (a) => {
520
+ if (!t.props.disabled && t.props.onSliderClick && !t.hasMoved) {
521
+ const c = t.getMousePosition(a), p = V(t.calcValue(t.calcOffsetFromPosition(c[0])), t.props);
522
+ t.props.onSliderClick(p);
523
+ }
524
+ }, t.createOnKeyDown = (a) => (c) => {
525
+ t.props.disabled || (t.start(a), X(t.getKeyDownEventMap()), se(c));
526
+ }, t.createOnMouseDown = (a) => (c) => {
527
+ if (t.props.disabled || c.button === 2) return;
528
+ t.setState({ pending: !0 });
529
+ const p = t.getMousePosition(c);
530
+ t.start(a, p[0]), X(t.getMouseEventMap()), se(c);
531
+ }, t.createOnTouchStart = (a) => (c) => {
532
+ if (t.props.disabled || c.touches.length > 1) return;
533
+ t.setState({ pending: !0 });
534
+ const p = t.getTouchPosition(c);
535
+ t.startPosition = p, t.isScrolling = void 0, t.start(a, p[0]), X(t.getTouchEventMap()), function(u) {
536
+ u.stopPropagation && u.stopPropagation();
537
+ }(c);
538
+ }, t.handleResize = () => {
539
+ const a = window.setTimeout(() => {
540
+ t.pendingResizeTimeouts.shift(), t.resize();
541
+ }, 0);
542
+ t.pendingResizeTimeouts.push(a);
543
+ }, t.renderThumb = (a, c) => {
544
+ const p = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + c + " " + (t.state.index === c ? t.props.thumbActiveClassName : ""), u = { ref: (g) => {
545
+ t["thumb" + c] = g;
546
+ }, key: t.props.thumbClassName + "-" + c, className: p, style: a, onMouseDown: t.createOnMouseDown(c), onTouchStart: t.createOnTouchStart(c), onFocus: t.createOnKeyDown(c), tabIndex: 0, role: "slider", "aria-orientation": t.props.orientation, "aria-valuenow": t.state.value[c], "aria-valuemin": t.props.min, "aria-valuemax": t.props.max, "aria-label": Array.isArray(t.props.ariaLabel) ? t.props.ariaLabel[c] : t.props.ariaLabel, "aria-labelledby": Array.isArray(t.props.ariaLabelledby) ? t.props.ariaLabelledby[c] : t.props.ariaLabelledby, "aria-disabled": t.props.disabled }, h = { index: c, value: W(t.state.value), valueNow: t.state.value[c] };
547
+ return t.props.ariaValuetext && (u["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(h)), t.props.renderThumb(u, h);
548
+ }, t.renderTrack = (a, c, p) => {
549
+ const u = { key: t.props.trackClassName + "-" + a, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + a, style: t.buildTrackStyle(c, t.state.upperBound - p) }, h = { index: a, value: W(t.state.value) };
550
+ return t.props.renderTrack(u, h);
551
+ };
552
+ let o = re(n.value);
553
+ o.length || (o = re(n.defaultValue)), t.pendingResizeTimeouts = [];
554
+ const l = [];
555
+ for (let a = 0; a < o.length; a += 1) o[a] = V(o[a], n), l.push(a);
556
+ return t.resizeObserver = null, t.resizeElementRef = Z.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: o, zIndices: l }, t;
557
+ }
558
+ Zt(d, i);
559
+ var s = d.prototype;
560
+ return s.componentDidMount = function() {
561
+ typeof window < "u" && (this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.resizeElementRef.current), this.resize());
562
+ }, d.getDerivedStateFromProps = function(n, t) {
563
+ const o = re(n.value);
564
+ return o.length ? t.pending ? null : { value: o.map((l) => V(l, n)) } : null;
565
+ }, s.componentDidUpdate = function() {
566
+ this.state.upperBound === 0 && this.resize();
567
+ }, s.componentWillUnmount = function() {
568
+ this.clearPendingResizeTimeouts(), this.resizeObserver && this.resizeObserver.disconnect();
569
+ }, s.onEnd = function(n) {
570
+ n && function(t) {
571
+ Object.keys(t).forEach((o) => {
572
+ typeof document < "u" && document.removeEventListener(o, t[o], !1);
573
+ });
574
+ }(n), this.hasMoved && this.fireChangeEvent("onAfterChange"), this.setState({ pending: !1 }), this.hasMoved = !1;
575
+ }, s.getValue = function() {
576
+ return W(this.state.value);
577
+ }, s.getClosestIndex = function(n) {
578
+ let t = Number.MAX_VALUE, o = -1;
579
+ const { value: l } = this.state, a = l.length;
580
+ for (let c = 0; c < a; c += 1) {
581
+ const p = this.calcOffset(l[c]), u = Math.abs(n - p);
582
+ u < t && (t = u, o = c);
583
+ }
584
+ return o;
585
+ }, s.getMousePosition = function(n) {
586
+ return [n["page" + this.axisKey()], n["page" + this.orthogonalAxisKey()]];
587
+ }, s.getTouchPosition = function(n) {
588
+ const t = n.touches[0];
589
+ return [t["page" + this.axisKey()], t["page" + this.orthogonalAxisKey()]];
590
+ }, s.getKeyDownEventMap = function() {
591
+ return { keydown: this.onKeyDown, keyup: this.onKeyUp, focusout: this.onBlur };
592
+ }, s.getMouseEventMap = function() {
593
+ return { mousemove: this.onMouseMove, mouseup: this.onMouseUp };
594
+ }, s.getTouchEventMap = function() {
595
+ return { touchmove: this.onTouchMove, touchend: this.onTouchEnd };
596
+ }, s.getValueFromPosition = function(n) {
597
+ const t = n / (this.state.sliderLength - this.state.thumbSize) * (this.props.max - this.props.min);
598
+ return V(this.state.startValue + t, this.props);
599
+ }, s.getDiffPosition = function(n) {
600
+ let t = n - this.state.startPosition;
601
+ return this.props.invert && (t *= -1), t;
602
+ }, s.resize = function() {
603
+ const { slider: n, thumb0: t } = this;
604
+ if (!n || !t) return;
605
+ const o = this.sizeKey(), l = n.getBoundingClientRect(), a = n[o], c = l[this.posMaxKey()], p = l[this.posMinKey()], u = t.getBoundingClientRect()[o.replace("client", "").toLowerCase()], h = a - u, g = Math.abs(c - p);
606
+ this.state.upperBound === h && this.state.sliderLength === g && this.state.thumbSize === u || this.setState({ upperBound: h, sliderLength: g, thumbSize: u });
607
+ }, s.calcOffset = function(n) {
608
+ const t = this.props.max - this.props.min;
609
+ return t === 0 ? 0 : (n - this.props.min) / t * this.state.upperBound;
610
+ }, s.calcValue = function(n) {
611
+ return n / this.state.upperBound * (this.props.max - this.props.min) + this.props.min;
612
+ }, s.calcOffsetFromPosition = function(n) {
613
+ const { slider: t } = this, o = t.getBoundingClientRect(), l = o[this.posMaxKey()], a = o[this.posMinKey()];
614
+ let c = n - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ? l : a));
615
+ return this.props.invert && (c = this.state.sliderLength - c), c -= this.state.thumbSize / 2, c;
616
+ }, s.forceValueFromPosition = function(n, t) {
617
+ const o = this.calcOffsetFromPosition(n), l = this.getClosestIndex(o), a = V(this.calcValue(o), this.props), c = this.state.value.slice();
618
+ c[l] = a;
619
+ for (let p = 0; p < c.length - 1; p += 1) if (c[p + 1] - c[p] < this.props.minDistance) return;
620
+ this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value: c }, () => {
621
+ t(l), this.fireChangeEvent("onChange");
622
+ });
623
+ }, s.clearPendingResizeTimeouts = function() {
624
+ do {
625
+ const n = this.pendingResizeTimeouts.shift();
626
+ clearTimeout(n);
627
+ } while (this.pendingResizeTimeouts.length);
628
+ }, s.start = function(n, t) {
629
+ const o = this["thumb" + n];
630
+ o && o.focus();
631
+ const { zIndices: l } = this.state;
632
+ l.splice(l.indexOf(n), 1), l.push(n), this.setState((a) => ({ startValue: a.value[n], startPosition: t !== void 0 ? t : a.startPosition, index: n, zIndices: l }));
633
+ }, s.moveUpByStep = function(n) {
634
+ n === void 0 && (n = this.props.step);
635
+ const t = this.state.value[this.state.index], o = V(this.props.invert && this.props.orientation === "horizontal" ? t - n : t + n, this.props);
636
+ this.move(Math.min(o, this.props.max));
637
+ }, s.moveDownByStep = function(n) {
638
+ n === void 0 && (n = this.props.step);
639
+ const t = this.state.value[this.state.index], o = V(this.props.invert && this.props.orientation === "horizontal" ? t + n : t - n, this.props);
640
+ this.move(Math.max(o, this.props.min));
641
+ }, s.move = function(n) {
642
+ const t = this.state.value.slice(), { index: o } = this.state, { length: l } = t, a = t[o];
643
+ if (n === a) return;
644
+ this.hasMoved || this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0;
645
+ const { pearling: c, max: p, min: u, minDistance: h } = this.props;
646
+ if (!c) {
647
+ if (o > 0) {
648
+ const g = t[o - 1];
649
+ n < g + h && (n = g + h);
650
+ }
651
+ if (o < l - 1) {
652
+ const g = t[o + 1];
653
+ n > g - h && (n = g - h);
654
+ }
655
+ }
656
+ t[o] = n, c && l > 1 && (n > a ? (this.pushSucceeding(t, h, o), function(g, C, b, f) {
657
+ for (let v = 0; v < g; v += 1) {
658
+ const y = f - v * b;
659
+ C[g - 1 - v] > y && (C[g - 1 - v] = y);
660
+ }
661
+ }(l, t, h, p)) : n < a && (this.pushPreceding(t, h, o), function(g, C, b, f) {
662
+ for (let v = 0; v < g; v += 1) {
663
+ const y = f + v * b;
664
+ C[v] < y && (C[v] = y);
665
+ }
666
+ }(l, t, h, u))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
667
+ }, s.pushSucceeding = function(n, t, o) {
668
+ let l, a;
669
+ for (l = o, a = n[l] + t; n[l + 1] !== null && a > n[l + 1]; l += 1, a = n[l] + t) n[l + 1] = ue(a, this.props);
670
+ }, s.pushPreceding = function(n, t, o) {
671
+ for (let l = o, a = n[l] - t; n[l - 1] !== null && a < n[l - 1]; l -= 1, a = n[l] - t) n[l - 1] = ue(a, this.props);
672
+ }, s.axisKey = function() {
673
+ return this.props.orientation === "vertical" ? "Y" : "X";
674
+ }, s.orthogonalAxisKey = function() {
675
+ return this.props.orientation === "vertical" ? "X" : "Y";
676
+ }, s.posMinKey = function() {
677
+ return this.props.orientation === "vertical" ? this.props.invert ? "bottom" : "top" : this.props.invert ? "right" : "left";
678
+ }, s.posMaxKey = function() {
679
+ return this.props.orientation === "vertical" ? this.props.invert ? "top" : "bottom" : this.props.invert ? "left" : "right";
680
+ }, s.sizeKey = function() {
681
+ return this.props.orientation === "vertical" ? "clientHeight" : "clientWidth";
682
+ }, s.fireChangeEvent = function(n) {
683
+ this.props[n] && this.props[n](W(this.state.value), this.state.index);
684
+ }, s.buildThumbStyle = function(n, t) {
685
+ const o = { position: "absolute", touchAction: "none", willChange: this.state.index >= 0 ? this.posMinKey() : void 0, zIndex: this.state.zIndices.indexOf(t) + 1 };
686
+ return o[this.posMinKey()] = n + "px", o;
687
+ }, s.buildTrackStyle = function(n, t) {
688
+ const o = { position: "absolute", willChange: this.state.index >= 0 ? this.posMinKey() + "," + this.posMaxKey() : void 0 };
689
+ return o[this.posMinKey()] = n, o[this.posMaxKey()] = t, o;
690
+ }, s.buildMarkStyle = function(n) {
691
+ var t;
692
+ return (t = { position: "absolute" })[this.posMinKey()] = n, t;
693
+ }, s.renderThumbs = function(n) {
694
+ const { length: t } = n, o = [];
695
+ for (let a = 0; a < t; a += 1) o[a] = this.buildThumbStyle(n[a], a);
696
+ const l = [];
697
+ for (let a = 0; a < t; a += 1) l[a] = this.renderThumb(o[a], a);
698
+ return l;
699
+ }, s.renderTracks = function(n) {
700
+ const t = [], o = n.length - 1;
701
+ t.push(this.renderTrack(0, 0, n[0]));
702
+ for (let l = 0; l < o; l += 1) t.push(this.renderTrack(l + 1, n[l], n[l + 1]));
703
+ return t.push(this.renderTrack(o + 1, n[o], this.state.upperBound)), t;
704
+ }, s.renderMarks = function() {
705
+ let { marks: n } = this.props;
706
+ const t = this.props.max - this.props.min + 1;
707
+ return typeof n == "boolean" ? n = Array.from({ length: t }).map((o, l) => l) : typeof n == "number" && (n = Array.from({ length: t }).map((o, l) => l).filter((o) => o % n == 0)), n.map(parseFloat).sort((o, l) => o - l).map((o) => {
708
+ const l = this.calcOffset(o), a = { key: o, className: this.props.markClassName, style: this.buildMarkStyle(l) };
709
+ return this.props.renderMark(a);
710
+ });
711
+ }, s.render = function() {
712
+ const n = [], { value: t } = this.state, o = t.length;
713
+ for (let p = 0; p < o; p += 1) n[p] = this.calcOffset(t[p], p);
714
+ const l = this.props.withTracks ? this.renderTracks(n) : null, a = this.renderThumbs(n), c = this.props.marks ? this.renderMarks() : null;
715
+ return Z.createElement("div", { ref: (p) => {
716
+ this.slider = p, this.resizeElementRef.current = p;
717
+ }, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick }, l, a, c);
718
+ }, d;
719
+ }(Z.Component);
720
+ he.displayName = "ReactSlider", he.defaultProps = { min: 0, max: 100, step: 1, pageFn: (i) => 10 * i, minDistance: 0, defaultValue: 0, orientation: "horizontal", className: "slider", thumbClassName: "thumb", thumbActiveClassName: "active", trackClassName: "track", markClassName: "mark", withTracks: !0, pearling: !1, disabled: !1, snapDragDisabled: !1, invert: !1, marks: [], renderThumb: (i) => Z.createElement("div", i), renderTrack: (i) => Z.createElement("div", i), renderMark: (i) => Z.createElement("span", i) };
721
+ var Ut = he;
722
+ const Ht = "_container_15vgv_2", Gt = "_unitLabel_15vgv_9", Yt = "_slider_15vgv_12", Wt = "_thumb_15vgv_18", Xt = "_track_15vgv_27", Jt = "_labels_15vgv_33", E = {
723
+ container: Ht,
724
+ unitLabel: Gt,
725
+ slider: Yt,
726
+ thumb: Wt,
727
+ track: Xt,
728
+ labels: Jt
729
+ }, Oe = ({
730
+ min: i = 0,
731
+ max: d = 100,
732
+ step: s = 1,
733
+ onChange: n,
734
+ width: t = 300,
735
+ unit: o,
736
+ fontColor: l = "#605B56",
737
+ value: a = [i, d]
738
+ }) => {
739
+ const { t: c } = k(), p = (u) => {
740
+ n == null || n({ min: u[0], max: u[1] });
741
+ };
742
+ return /* @__PURE__ */ m(
743
+ "div",
744
+ {
745
+ className: E.container,
746
+ style: { width: `${t}px`, color: `${l}` },
747
+ children: [
748
+ /* @__PURE__ */ r("div", { className: E.unitLabel, children: /* @__PURE__ */ r("span", { children: c(o) }) }),
749
+ /* @__PURE__ */ r(
750
+ Ut,
751
+ {
752
+ className: E.slider,
753
+ thumbClassName: E.thumb,
754
+ trackClassName: E.track,
755
+ min: i,
756
+ max: d,
757
+ step: s,
758
+ value: a,
759
+ onChange: p,
760
+ withTracks: !0,
761
+ pearling: !0,
762
+ minDistance: 1
763
+ }
764
+ ),
765
+ /* @__PURE__ */ m("div", { className: E.labels, children: [
766
+ /* @__PURE__ */ r("span", { children: a[0] }),
767
+ /* @__PURE__ */ r("span", { children: a[1] })
768
+ ] })
769
+ ]
770
+ }
771
+ );
772
+ };
773
+ Oe.propTypes = {
774
+ min: e.number,
775
+ max: e.number,
776
+ step: e.number,
777
+ initialMin: e.number,
778
+ initialMax: e.number,
779
+ onChange: e.func,
780
+ width: e.number,
781
+ unit: e.string,
782
+ fontColor: e.string,
783
+ value: e.arrayOf(e.number)
784
+ };
785
+ const Qt = "_tematicalFiltersInputContainer_1vm1r_2", en = "_inputTypeContainer_1vm1r_2", tn = "_checkboxContainer_1vm1r_28", nn = "_absoluteSliderContainer_1vm1r_37", J = {
786
+ tematicalFiltersInputContainer: Qt,
787
+ inputTypeContainer: en,
788
+ checkboxContainer: tn,
789
+ absoluteSliderContainer: nn
790
+ }, be = ({
791
+ indicator: i,
792
+ //onChangeBothType
793
+ activeColor: d
794
+ }) => {
795
+ const [s, n] = B(), {
796
+ type: t,
797
+ name: o,
798
+ values: l,
799
+ minValue: a,
800
+ maxValue: c,
801
+ unit: p
802
+ } = i || {}, u = te(
803
+ () => t == "cat" || s == "cat",
804
+ [s, t]
805
+ ), h = te(
806
+ () => t == "abs" || s == "abs",
807
+ [s, t]
808
+ ), {
809
+ tematicalFiltersSelected: g,
810
+ selectedIndicator: C,
811
+ fontColor: b,
812
+ inputsColor: f
813
+ } = T((x) => x), v = (x) => {
814
+ if (x) {
815
+ const { min: w, max: _, valueClicked: N, allValues: $ } = x || {}, { code: O, type: ne } = i || {}, U = h ? "abs" : u ? "cat" : "both";
816
+ let A = O[0];
817
+ ne == "both" && (A = U == "cat" ? O[1] : O[0]), U == "cat" ? T.setState((P) => {
818
+ let I = P.tematicalFiltersSelected.find(
819
+ (L) => L.code === A
820
+ );
821
+ if (I) {
822
+ let L = [I.values];
823
+ if (I.values.includes(N)) {
824
+ if (L = I.values.filter(
825
+ (D) => D !== N
826
+ ), L.length < 1)
827
+ return {
828
+ tematicalFiltersSelected: P.tematicalFiltersSelected.filter(
829
+ (D) => D.code !== A
830
+ )
831
+ };
832
+ } else
833
+ L = [...I.values, N];
834
+ return {
835
+ tematicalFiltersSelected: P.tematicalFiltersSelected.map(
836
+ (D) => D.code === A ? { ...D, values: L } : D
837
+ )
838
+ };
839
+ } else {
840
+ console.log("entra aqui: ", $, " ", N);
841
+ let L = $.map((D, Pe) => Pe);
842
+ return {
843
+ tematicalFiltersSelected: [
844
+ ...g,
845
+ {
846
+ type: "cat",
847
+ code: A,
848
+ values: L.filter((D) => D !== N),
849
+ name: i.name
850
+ }
851
+ ]
852
+ };
853
+ }
854
+ }) : U == "abs" && T.setState((P) => {
855
+ let I = P.tematicalFiltersSelected.find(
856
+ (L) => L.code === A
857
+ );
858
+ if (I) {
859
+ let L = { ...I };
860
+ return L.min = w, L.max = _, {
861
+ tematicalFiltersSelected: P.tematicalFiltersSelected.map(
862
+ (D) => D.code === A ? L : D
863
+ )
864
+ };
865
+ } else
866
+ return {
867
+ tematicalFiltersSelected: [
868
+ ...g,
869
+ { type: "abs", code: A, min: w, max: _ }
870
+ ]
871
+ };
872
+ });
873
+ }
874
+ }, y = te(() => {
875
+ const x = {};
876
+ if ((g == null ? void 0 : g.length) > 0)
877
+ for (const w of g)
878
+ w.type === "cat" ? x[w.code] = new Set(w.values) : x[w.code] = [w.min, w.max];
879
+ return x;
880
+ }, [g]);
881
+ return /* @__PURE__ */ r("div", { className: J.tematicalFiltersInputContainer, children: /* @__PURE__ */ m(
882
+ z,
883
+ {
884
+ titleFontStyles: { fontSize: 16, fontWeight: 400 },
885
+ title: o,
886
+ isOpen: C == `id${o}`,
887
+ onClick: () => T.setState(() => ({
888
+ selectedIndicator: C == `id${o}` ? "" : `id${o}`
889
+ })),
890
+ showBottomBar: !1,
891
+ height: 38,
892
+ titleMarginChildren: 14,
893
+ className: "tematicalFiltersInputContainer",
894
+ color: b,
895
+ activeColor: d,
896
+ children: [
897
+ t == "both" && /* @__PURE__ */ m(
898
+ "div",
899
+ {
900
+ className: J.inputTypeContainer,
901
+ style: { color: b },
902
+ children: [
903
+ /* @__PURE__ */ m("label", { children: [
904
+ /* @__PURE__ */ r(
905
+ "input",
906
+ {
907
+ type: "radio",
908
+ name: "tipo",
909
+ value: "abs",
910
+ onChange: () => {
911
+ n("abs");
912
+ },
913
+ style: {
914
+ marginRight: 4,
915
+ backgroundColor: s == "abs" ? f : "white",
916
+ border: `1.5px solid ${s == "abs" ? f : b}`
917
+ }
918
+ }
919
+ ),
920
+ "Absoluto"
921
+ ] }),
922
+ /* @__PURE__ */ m("label", { children: [
923
+ /* @__PURE__ */ r(
924
+ "input",
925
+ {
926
+ type: "radio",
927
+ name: "tipo",
928
+ value: "cat",
929
+ onChange: () => {
930
+ n("cat");
931
+ },
932
+ style: {
933
+ marginRight: 4,
934
+ backgroundColor: s == "cat" ? f : "white",
935
+ border: `1.5px solid ${s == "cat" ? f : b}`
936
+ }
937
+ }
938
+ ),
939
+ "Categórico"
940
+ ] })
941
+ ]
942
+ }
943
+ ),
944
+ u && /* @__PURE__ */ r("div", { className: J.checkboxContainer, children: l.map((x, w) => {
945
+ var _;
946
+ return /* @__PURE__ */ r(
947
+ $e,
948
+ {
949
+ onClick: () => v({ valueClicked: w, allValues: l }),
950
+ indicator: x,
951
+ value: ((_ = y[i.code[t == "both" ? 1 : 0]]) == null ? void 0 : _.has(w)) || !y[i.code[t == "both" ? 1 : 0]]
952
+ },
953
+ `checkbox-${w}`
954
+ );
955
+ }) }),
956
+ h && /* @__PURE__ */ r("div", { className: J.absoluteSliderContainer, children: /* @__PURE__ */ r(
957
+ Oe,
958
+ {
959
+ onChange: v,
960
+ min: a,
961
+ max: c,
962
+ unit: p,
963
+ value: y[i.code[0]]
964
+ }
965
+ ) })
966
+ ]
967
+ }
968
+ ) });
969
+ };
970
+ be.propTypes = {
971
+ indicator: e.shape({
972
+ name: e.string,
973
+ type: e.string,
974
+ code: e.arrayOf(e.string),
975
+ values: e.arrayOf(
976
+ e.shape({
977
+ codename: e.oneOfType(e.array, e.string),
978
+ title: e.string
979
+ })
980
+ )
981
+ }),
982
+ activeColor: e.string
983
+ //onChangeBothType: PropTypes.func,
984
+ };
985
+ const Ae = ({
986
+ subcategory: i,
987
+ fontColor: d,
988
+ activeColor: s
989
+ //onChangeBothType,
990
+ }) => {
991
+ const { activeSubcategory: n } = T((l) => l), { name: t, indicators: o } = i || {};
992
+ return /* @__PURE__ */ r(
993
+ z,
994
+ {
995
+ title: t,
996
+ isOpen: n == `id${t}`,
997
+ onClick: () => {
998
+ T.setState((l) => ({
999
+ activeSubcategory: l.activeSubcategory === `id${t}` ? "" : `id${t}`
1000
+ }));
1001
+ },
1002
+ titleFontStyles: { fontSize: 16, fontWeight: 400 },
1003
+ showBottomBar: !1,
1004
+ titleMarginChildren: 20,
1005
+ height: 49,
1006
+ color: d,
1007
+ activeColor: s,
1008
+ children: o == null ? void 0 : o.map((l, a) => /* @__PURE__ */ r(
1009
+ be,
1010
+ {
1011
+ indicator: l,
1012
+ fontColor: d
1013
+ },
1014
+ `indicatorSub-${a}`
1015
+ ))
1016
+ }
1017
+ );
1018
+ };
1019
+ Ae.propTypes = {
1020
+ subcategory: e.shape({
1021
+ name: e.string,
1022
+ indicators: e.arrayOf(
1023
+ e.shape({
1024
+ name: e.string,
1025
+ value: e.string
1026
+ })
1027
+ )
1028
+ }),
1029
+ activeColor: e.string
1030
+ //onChangeBothType: PropTypes.func,
1031
+ };
1032
+ const Ie = ({
1033
+ category: i,
1034
+ // onChangeBothType,
1035
+ activeColor: d
1036
+ }) => {
1037
+ const { name: s, subcategories: n, indicators: t } = i || {}, { activeCategory: o, fontColor: l } = T((a) => a);
1038
+ return i && /* @__PURE__ */ r(
1039
+ z,
1040
+ {
1041
+ onClick: () => {
1042
+ T.setState((a) => ({
1043
+ activeCategory: o === `id${s}` ? "" : `id${s}`
1044
+ }));
1045
+ },
1046
+ title: s,
1047
+ isOpen: o === `id${s}`,
1048
+ titleFontStyles: { fontSize: 18, fontWeight: "bold" },
1049
+ showBottomBar: !1,
1050
+ color: l,
1051
+ activeColor: d,
1052
+ children: n ? n.map((a, c) => /* @__PURE__ */ r(
1053
+ Ae,
1054
+ {
1055
+ subcategory: a,
1056
+ fontColor: l,
1057
+ activeColor: d
1058
+ },
1059
+ `subcategory-${c}`
1060
+ )) : t && t.map((a, c) => /* @__PURE__ */ r(
1061
+ be,
1062
+ {
1063
+ indicator: a,
1064
+ fontColor: l,
1065
+ activeColor: d
1066
+ },
1067
+ `indicator-${c}`
1068
+ ))
1069
+ }
1070
+ );
1071
+ };
1072
+ Ie.propTypes = {
1073
+ category: e.shape({
1074
+ name: e.string.isRequired,
1075
+ subcategories: e.array,
1076
+ indicators: e.array
1077
+ }),
1078
+ activeColor: e.string
1079
+ //onChangeBothType: PropTypes.func,
1080
+ };
1081
+ const Re = ({
1082
+ indicators: i,
1083
+ isOpen: d = !0,
1084
+ title: s,
1085
+ fontColor: n = "#605B56",
1086
+ //The color of the slider and the checkbox when is checked
1087
+ inputsColor: t = "#605B56",
1088
+ activeColor: o
1089
+ }) => {
1090
+ const { tematicalFiltersSelected: l } = T((c) => c), { t: a } = k();
1091
+ return F(() => {
1092
+ console.log("filtersSelected changed: ", l);
1093
+ }, [l]), F(() => {
1094
+ n && T.setState(() => ({ fontColor: n }));
1095
+ }, [n]), F(() => {
1096
+ t && T.setState(() => ({ inputsColor: t }));
1097
+ }, [t]), /* @__PURE__ */ r(
1098
+ z,
1099
+ {
1100
+ isOpen: d,
1101
+ title: s ? a(s) : "Tematical filters",
1102
+ color: n,
1103
+ activeColor: o,
1104
+ children: i == null ? void 0 : i.map((c, p) => /* @__PURE__ */ r(
1105
+ Ie,
1106
+ {
1107
+ category: c,
1108
+ fontColor: n,
1109
+ activeColor: o
1110
+ },
1111
+ `category-${p}`
1112
+ ))
1113
+ }
1114
+ );
1115
+ };
1116
+ Re.propTypes = {
1117
+ isOpen: e.bool,
1118
+ title: e.string,
1119
+ indicators: e.arrayOf(e.object),
1120
+ fontColor: e.string,
1121
+ onChangeTematicalFilters: e.func,
1122
+ inputsColor: e.string,
1123
+ activeColor: e.string
1124
+ };
1125
+ const on = "_FiltersAmbitContainer_6o4gt_2", sn = "_FiltersAmbitHeader_6o4gt_7", rn = "_FiltersAmbitTitle_6o4gt_15", an = "_FiltersAmbitDescription_6o4gt_22", ln = "_FiltersAmbitDescriptionTitle_6o4gt_33", G = {
1126
+ FiltersAmbitContainer: on,
1127
+ FiltersAmbitHeader: sn,
1128
+ FiltersAmbitTitle: rn,
1129
+ FiltersAmbitDescription: an,
1130
+ FiltersAmbitDescriptionTitle: ln
1131
+ }, cn = ({
1132
+ ambitName: i,
1133
+ ambitDescription: d,
1134
+ defaultFilters: s,
1135
+ indicators: n,
1136
+ activeColor: t,
1137
+ textColor: o,
1138
+ backgroundColor: l,
1139
+ onChangeAppliedFilters: a,
1140
+ saveAmbit: c
1141
+ }) => {
1142
+ const { t: p } = k(), { tematicalFiltersSelected: u } = T((h) => h);
1143
+ return F(() => {
1144
+ s && s.length > 0 && T.setState((h) => ({
1145
+ tematicalFiltersSelected: s
1146
+ }));
1147
+ }, [s]), F(() => {
1148
+ console.log("filtersSelected changed: ", u), a(u);
1149
+ }, [u]), /* @__PURE__ */ m("div", { className: G.FiltersAmbitContainer, children: [
1150
+ /* @__PURE__ */ m("div", { className: G.FiltersAmbitHeader, children: [
1151
+ /* @__PURE__ */ r("div", { className: G.FiltersAmbitTitle, children: i }),
1152
+ /* @__PURE__ */ m("div", { className: G.FiltersAmbitDescription, children: [
1153
+ /* @__PURE__ */ r("div", { className: G.FiltersAmbitDescriptionTitle, children: p("description") }),
1154
+ d
1155
+ ] })
1156
+ ] }),
1157
+ /* @__PURE__ */ r(
1158
+ De,
1159
+ {
1160
+ title: p("applied_filters"),
1161
+ isOpen: !0,
1162
+ textColor: o || "#fff",
1163
+ backgroundColor: l || "#605B5680",
1164
+ activeColor: t
1165
+ }
1166
+ ),
1167
+ /* @__PURE__ */ r(Be, { activeColor: t }),
1168
+ /* @__PURE__ */ r(
1169
+ Re,
1170
+ {
1171
+ indicators: n,
1172
+ inputsColor: t,
1173
+ textColor: o,
1174
+ title: "tematical_filters",
1175
+ activeColor: t
1176
+ }
1177
+ ),
1178
+ /* @__PURE__ */ r("div", { className: "buttonContainer", children: /* @__PURE__ */ r("button", { className: "mainButton", onClick: c, children: p("guardar_ambit") }) })
1179
+ ] });
1180
+ };
1181
+ cn.propTypes = {
1182
+ indicators: e.arrayOf(e.object).isRequired,
1183
+ ambitName: e.string,
1184
+ ambitDescription: e.string,
1185
+ defaultFilters: e.arrayOf(e.object),
1186
+ activeColor: e.string,
1187
+ backgroundColor: e.string,
1188
+ textColor: e.string,
1189
+ onChangeAppliedFilters: e.func,
1190
+ saveAmbit: e.func
1191
+ };
1192
+ const dn = "_barChartContainer_d2f1z_2", pn = {
1193
+ barChartContainer: dn
1194
+ }, Ve = ({
1195
+ data: i,
1196
+ width: d = 700,
1197
+ barHeight: s = 25,
1198
+ gap: n = 23,
1199
+ fontColor: t = "#605B56",
1200
+ verticalPaddign: o = 10,
1201
+ horizontalPaddign: l = 20,
1202
+ leftPadding: a = 200,
1203
+ numberOfDivisions: c = 7,
1204
+ maxValue: p = null
1205
+ }) => {
1206
+ const { t: u } = k(), { xScale: h, ticks: g, height: C } = te(() => {
1207
+ if (i && i.length > 0) {
1208
+ const b = (i == null ? void 0 : i.length) * (s + n) + o * 2, f = ye.max(i, (x) => x.value) || 1, v = ye.scaleLinear().domain([0, p || f]).range([0, d - a]), y = Array.from({ length: c + 1 }, (x, w) => p ? p / c * w : f / c * w);
1209
+ return {
1210
+ xScale: v,
1211
+ ticks: y,
1212
+ height: b,
1213
+ width: d,
1214
+ verticalPaddign: o,
1215
+ horizontalPaddign: l
1216
+ };
1217
+ } else
1218
+ return { xScale: null, ticks: [], height: 0 };
1219
+ }, [
1220
+ i,
1221
+ d,
1222
+ c,
1223
+ s,
1224
+ n,
1225
+ l,
1226
+ o,
1227
+ p
1228
+ ]);
1229
+ return /* @__PURE__ */ r("div", { className: pn.barChartContainer, children: /* @__PURE__ */ r("svg", { width: d + l * 2, height: C, children: /* @__PURE__ */ m("g", { transform: `translate(0,${n})`, children: [
1230
+ /* @__PURE__ */ r("g", { transform: `translate(${a + l}, 0)`, children: g.map((b, f) => {
1231
+ const v = h(b);
1232
+ return /* @__PURE__ */ m("g", { transform: `translate(${v}, 0)`, children: [
1233
+ /* @__PURE__ */ r(
1234
+ "line",
1235
+ {
1236
+ y1: 0,
1237
+ y2: C - n * 2,
1238
+ stroke: "#ccc"
1239
+ }
1240
+ ),
1241
+ /* @__PURE__ */ r(
1242
+ "text",
1243
+ {
1244
+ y: C - n,
1245
+ textAnchor: "middle",
1246
+ fontSize: 10,
1247
+ fill: t,
1248
+ children: parseInt(b)
1249
+ }
1250
+ )
1251
+ ] }, f);
1252
+ }) }),
1253
+ i && i.length > 0 && (i == null ? void 0 : i.map((b, f) => {
1254
+ const v = h(b.value), y = f * (s + n);
1255
+ return /* @__PURE__ */ m(
1256
+ "g",
1257
+ {
1258
+ transform: `translate(${a + l}, ${y})`,
1259
+ children: [
1260
+ /* @__PURE__ */ r(
1261
+ "text",
1262
+ {
1263
+ x: -24,
1264
+ y: s / 2 + 5,
1265
+ textAnchor: "end",
1266
+ fill: t,
1267
+ children: u(b.title)
1268
+ }
1269
+ ),
1270
+ /* @__PURE__ */ r(
1271
+ "rect",
1272
+ {
1273
+ width: v,
1274
+ height: s,
1275
+ fill: b.color,
1276
+ rx: 0
1277
+ }
1278
+ )
1279
+ ]
1280
+ },
1281
+ f
1282
+ );
1283
+ }))
1284
+ ] }) }) });
1285
+ };
1286
+ Ve.propTypes = {
1287
+ data: e.arrayOf(
1288
+ e.shape({
1289
+ title: e.string,
1290
+ value: e.number,
1291
+ color: e.string
1292
+ })
1293
+ ),
1294
+ width: e.number,
1295
+ barHeight: e.number,
1296
+ gap: e.number,
1297
+ verticalPaddign: e.number,
1298
+ horizontalPaddign: e.number,
1299
+ numberOfDivisions: e.number,
1300
+ fontColor: e.string
1301
+ };
1302
+ const un = "_graphicContainer_c9zrg_2", hn = "_titleContainer_c9zrg_14", xe = {
1303
+ graphicContainer: un,
1304
+ titleContainer: hn
1305
+ }, mn = ({
1306
+ data: i,
1307
+ graphWidth: d = 700,
1308
+ containerStyle: s,
1309
+ borderColor: n = "#605B56",
1310
+ title: t = "Graphic Title",
1311
+ fontColor: o = "#605B56",
1312
+ maxValue: l = null,
1313
+ numberOfDivisions: a = 7,
1314
+ leftPadding: c = 200
1315
+ }) => {
1316
+ const { t: p } = k();
1317
+ return /* @__PURE__ */ m(
1318
+ "div",
1319
+ {
1320
+ className: xe.graphicContainer,
1321
+ style: {
1322
+ ...s || {},
1323
+ border: `1.5px solid ${n}`
1324
+ },
1325
+ children: [
1326
+ /* @__PURE__ */ r("div", { className: xe.titleContainer, children: /* @__PURE__ */ r("h2", { children: p(t) }) }),
1327
+ /* @__PURE__ */ r(
1328
+ Ve,
1329
+ {
1330
+ data: i,
1331
+ width: d,
1332
+ fontColor: o,
1333
+ maxValue: l,
1334
+ numberOfDivisions: a,
1335
+ leftPadding: c
1336
+ }
1337
+ )
1338
+ ]
1339
+ }
1340
+ );
1341
+ };
1342
+ mn.propTypes = {
1343
+ data: e.arrayOf(
1344
+ e.shape({
1345
+ color: e.string.isRequired,
1346
+ value: e.number.isRequired,
1347
+ title: e.string.isRequired
1348
+ })
1349
+ ),
1350
+ borderColor: e.string,
1351
+ title: e.string,
1352
+ graphWidth: e.number,
1353
+ containerStyle: e.object,
1354
+ fontColor: e.string,
1355
+ maxValue: e.number,
1356
+ numberOfDivisions: e.number,
1357
+ leftPadding: e.number
1358
+ };
1359
+ const gn = "_indicatorsCategory_1cu33_2", Cn = "_title_1cu33_5", bn = "_list_1cu33_11", ae = {
1360
+ indicatorsCategory: gn,
1361
+ title: Cn,
1362
+ list: bn
1363
+ }, fn = "_indicatorContainer_lw8gx_2", yn = "_indicatorNameContainer_lw8gx_11", vn = "_dot_lw8gx_20", _n = "_indicatorName_lw8gx_11", xn = "_switchExternalContainer_lw8gx_31", wn = "_switchType_lw8gx_40", kn = "_switchTypeOptions_lw8gx_44", Nn = "_optionContainer_lw8gx_55", Sn = "_customRadious_lw8gx_65", Tn = "_optionText_lw8gx_72", S = {
1364
+ indicatorContainer: fn,
1365
+ indicatorNameContainer: yn,
1366
+ dot: vn,
1367
+ indicatorName: _n,
1368
+ switchExternalContainer: xn,
1369
+ switchType: wn,
1370
+ switchTypeOptions: kn,
1371
+ optionContainer: Nn,
1372
+ customRadious: Sn,
1373
+ optionText: Tn
1374
+ }, fe = ({
1375
+ indicator: i,
1376
+ values: d = [],
1377
+ activeColor: s,
1378
+ defaultColor: n = "#92898A",
1379
+ activeIndicator: t,
1380
+ activeIndicatorType: o,
1381
+ onClickIndicator: l,
1382
+ multiple: a = !1,
1383
+ onChangeType: c
1384
+ }) => {
1385
+ const { t: p } = k(), { name: u, type: h } = i, [g, C] = B(!1);
1386
+ F(() => {
1387
+ t && C(
1388
+ a ? t.some(
1389
+ (v) => v.name == String(u)
1390
+ ) : t.name == u
1391
+ );
1392
+ }, [t]);
1393
+ const b = () => /* @__PURE__ */ r("div", { className: S.switchExternalContainer, children: /* @__PURE__ */ r("div", { className: S.switchType, children: /* @__PURE__ */ m("div", { className: S.switchTypeOptions, children: [
1394
+ /* @__PURE__ */ m(
1395
+ "div",
1396
+ {
1397
+ className: S.optionContainer,
1398
+ onClick: () => c("cat"),
1399
+ children: [
1400
+ /* @__PURE__ */ r(
1401
+ "span",
1402
+ {
1403
+ className: `${S.customRadious}`,
1404
+ style: {
1405
+ backgroundColor: o === "cat" ? s : "transparent",
1406
+ borderColor: o === "cat" ? s : n
1407
+ }
1408
+ }
1409
+ ),
1410
+ /* @__PURE__ */ r(
1411
+ "h4",
1412
+ {
1413
+ className: S.optionText,
1414
+ style: {
1415
+ color: o === "cat" ? s : n
1416
+ },
1417
+ children: p("indicators.cat")
1418
+ }
1419
+ )
1420
+ ]
1421
+ }
1422
+ ),
1423
+ /* @__PURE__ */ m(
1424
+ "div",
1425
+ {
1426
+ className: S.optionContainer,
1427
+ onClick: () => c("abs"),
1428
+ children: [
1429
+ /* @__PURE__ */ r(
1430
+ "span",
1431
+ {
1432
+ className: `${S.customRadious}`,
1433
+ style: {
1434
+ backgroundColor: o === "abs" ? s : "transparent",
1435
+ borderColor: o === "abs" ? s : n
1436
+ }
1437
+ }
1438
+ ),
1439
+ /* @__PURE__ */ r(
1440
+ "h4",
1441
+ {
1442
+ className: S.optionText,
1443
+ style: {
1444
+ color: o === "abs" ? s : n
1445
+ },
1446
+ children: p("indicators.abs")
1447
+ }
1448
+ )
1449
+ ]
1450
+ }
1451
+ )
1452
+ ] }) }) }), f = () => /* @__PURE__ */ r("div", { className: S.switchExternalContainer, children: /* @__PURE__ */ r("div", { className: S.switchType, children: /* @__PURE__ */ r("div", { className: S.switchTypeOptions, children: d.map((v, y) => /* @__PURE__ */ m(
1453
+ "div",
1454
+ {
1455
+ className: S.optionContainer,
1456
+ children: [
1457
+ /* @__PURE__ */ r(
1458
+ "span",
1459
+ {
1460
+ className: S.customRadious
1461
+ }
1462
+ ),
1463
+ /* @__PURE__ */ r("h4", { children: p(v.unit) })
1464
+ ]
1465
+ },
1466
+ y
1467
+ )) }) }) });
1468
+ return /* @__PURE__ */ m(
1469
+ "div",
1470
+ {
1471
+ className: S.indicatorContainer,
1472
+ children: [
1473
+ /* @__PURE__ */ m(
1474
+ "div",
1475
+ {
1476
+ className: S.indicatorNameContainer,
1477
+ onClick: () => l({ indicator: i }),
1478
+ children: [
1479
+ /* @__PURE__ */ r(
1480
+ "div",
1481
+ {
1482
+ style: {
1483
+ border: g ? `1px solid ${s}` : `1px solid ${n}`
1484
+ },
1485
+ className: S.dot
1486
+ }
1487
+ ),
1488
+ /* @__PURE__ */ r(
1489
+ "h4",
1490
+ {
1491
+ className: S.indicatorName,
1492
+ style: { color: g ? s : n },
1493
+ children: /* @__PURE__ */ r(ge, { i18nKey: u, components: { sup: /* @__PURE__ */ r("sup", {}) } })
1494
+ }
1495
+ )
1496
+ ]
1497
+ }
1498
+ ),
1499
+ (t == null ? void 0 : t.name) === u && h === "both" && /* @__PURE__ */ r("div", { children: b() }),
1500
+ (t == null ? void 0 : t.name) === u && h === "twoUnits" && /* @__PURE__ */ r("div", { children: f() })
1501
+ ]
1502
+ }
1503
+ );
1504
+ };
1505
+ fe.propTypes = {
1506
+ indicator: e.shape({
1507
+ name: e.string,
1508
+ type: e.string
1509
+ }),
1510
+ values: e.oneOfType([e.bool, e.array]),
1511
+ activeColor: e.string,
1512
+ defaultColor: e.string,
1513
+ activeIndicator: e.oneOfType([e.object, e.array]),
1514
+ multiple: e.bool,
1515
+ onClickIndicator: e.func
1516
+ };
1517
+ const Mn = "_indicatorsSubCategory_1dzsi_2", Fn = "_list_1dzsi_8", we = {
1518
+ indicatorsSubCategory: Mn,
1519
+ list: Fn
1520
+ }, je = ({
1521
+ subcName: i,
1522
+ indicators: d,
1523
+ defaultColor: s,
1524
+ activeColor: n,
1525
+ activeSubCategory: t,
1526
+ onClickSubCategory: o,
1527
+ id: l,
1528
+ activeIndicator: a,
1529
+ onClickIndicator: c,
1530
+ multiple: p,
1531
+ activeIndicatorType: u,
1532
+ onChangeType: h
1533
+ }) => {
1534
+ const { t: g } = k(), [C, b] = B(!1);
1535
+ return F(() => {
1536
+ b(t == l);
1537
+ }, [t, l]), /* @__PURE__ */ m(
1538
+ Ce.div,
1539
+ {
1540
+ className: we.indicatorsSubCategory,
1541
+ initial: { height: "43px" },
1542
+ animate: { height: C ? "auto" : "43px" },
1543
+ transition: { duration: 0.4 },
1544
+ children: [
1545
+ /* @__PURE__ */ r("button", { onClick: () => o(l), children: /* @__PURE__ */ m("h3", { style: { color: C ? n : s }, children: [
1546
+ /* @__PURE__ */ r("span", { style: { color: C ? n : s }, children: C ? "-" : "+" }),
1547
+ /* @__PURE__ */ r(
1548
+ "span",
1549
+ {
1550
+ style: { marginLeft: 12, color: C ? n : s },
1551
+ children: g(i)
1552
+ }
1553
+ )
1554
+ ] }) }),
1555
+ d && /* @__PURE__ */ r("div", { className: we.list, children: d == null ? void 0 : d.map((f, v) => /* @__PURE__ */ r(
1556
+ fe,
1557
+ {
1558
+ indicator: f,
1559
+ defaultColor: s,
1560
+ activeColor: n,
1561
+ activeIndicator: a,
1562
+ onClickIndicator: c,
1563
+ multiple: p,
1564
+ activeIndicatorType: u,
1565
+ onChangeType: h
1566
+ },
1567
+ "indicator" + v
1568
+ )) })
1569
+ ]
1570
+ }
1571
+ );
1572
+ };
1573
+ je.propTypes = {
1574
+ subcName: e.string,
1575
+ indicators: e.array,
1576
+ activeColor: e.string,
1577
+ defaultColor: e.string,
1578
+ activeSubCategory: e.string,
1579
+ id: e.string,
1580
+ activeIndicator: e.oneOfType([e.object, e.array]),
1581
+ multiple: e.bool,
1582
+ onClickSubCategory: e.func,
1583
+ onClickIndicator: e.func
1584
+ };
1585
+ const ze = ({
1586
+ cat: i,
1587
+ id: d,
1588
+ activeColor: s,
1589
+ defaultColor: n,
1590
+ onClickCategory: t,
1591
+ activeCategory: o,
1592
+ activeSubCategory: l,
1593
+ onClickSubCategory: a,
1594
+ activeIndicator: c,
1595
+ onClickIndicator: p,
1596
+ multiple: u,
1597
+ activeIndicatorType: h,
1598
+ onChangeType: g
1599
+ }) => {
1600
+ var v;
1601
+ const { t: C } = k(), [b, f] = B(!1);
1602
+ return F(() => {
1603
+ f(o === d);
1604
+ }, [o, d]), /* @__PURE__ */ m(
1605
+ Ce.div,
1606
+ {
1607
+ className: ae.indicatorsCategory,
1608
+ initial: { height: "53px" },
1609
+ animate: { height: b ? "auto" : "53px" },
1610
+ transition: { duration: 0.4 },
1611
+ style: {
1612
+ backgroundColor: "white",
1613
+ borderBottom: b ? `1px solid ${s}` : "0px",
1614
+ marginBottom: b ? "20px" : "0px"
1615
+ },
1616
+ children: [
1617
+ /* @__PURE__ */ m("h2", { className: `${ae.title}`, onClick: () => t(d), children: [
1618
+ /* @__PURE__ */ r("span", { style: { color: b ? s : n }, children: b ? "-" : "+" }),
1619
+ /* @__PURE__ */ r(
1620
+ "span",
1621
+ {
1622
+ style: { marginLeft: 12, color: b ? s : n },
1623
+ children: C(i.name)
1624
+ }
1625
+ )
1626
+ ] }),
1627
+ i.subcategories ? i.subcategories.map(
1628
+ ({ name: y, subcategory: x, indicators: w }, _) => /* @__PURE__ */ r(
1629
+ je,
1630
+ {
1631
+ id: x,
1632
+ activeSubCategory: l,
1633
+ subcName: y,
1634
+ onClickSubCategory: a,
1635
+ activeIndicator: c,
1636
+ onClickIndicator: p,
1637
+ multiple: u,
1638
+ activeColor: s,
1639
+ defaultColor: n,
1640
+ indicators: w,
1641
+ activeIndicatorType: h,
1642
+ onChangeType: g
1643
+ },
1644
+ `subcKey ${_}`
1645
+ )
1646
+ ) : /* @__PURE__ */ r("div", { className: ae.list, children: (v = i.indicators) == null ? void 0 : v.map((y, x) => /* @__PURE__ */ r(
1647
+ fe,
1648
+ {
1649
+ indicator: y,
1650
+ values: y.type == "twoUnits" && y.values,
1651
+ activeColor: s,
1652
+ defaultColor: n,
1653
+ activeIndicator: c,
1654
+ onClickIndicator: p,
1655
+ multiple: u,
1656
+ activeIndicatorType: h,
1657
+ onChangeType: g
1658
+ },
1659
+ `indicator${x}`
1660
+ )) })
1661
+ ]
1662
+ }
1663
+ );
1664
+ };
1665
+ ze.propTypes = {
1666
+ cat: e.object,
1667
+ id: e.string,
1668
+ onChange: e.func,
1669
+ onClickCategory: e.func,
1670
+ activeCategory: e.string,
1671
+ activeSubCategory: e.string,
1672
+ onClickSubCategory: e.func,
1673
+ onClickIndicator: e.func,
1674
+ activeIndicator: e.oneOfType([e.object, e.array]),
1675
+ multiple: e.bool,
1676
+ activeColor: e.string,
1677
+ defaultColor: e.string
1678
+ };
1679
+ const Ln = "_indicatorsList_fklyu_2", Dn = "_title_fklyu_6", ke = {
1680
+ indicatorsList: Ln,
1681
+ title: Dn
1682
+ }, Bn = ({
1683
+ indicators: i,
1684
+ activeColor: d,
1685
+ defaultColor: s = "#92898A",
1686
+ // Función que se ejecuta al seleccionar un indicador, recibe el o los ikeys como parametro
1687
+ onChange: n,
1688
+ // Selección multiple
1689
+ multiple: t = !1,
1690
+ // Si multiple es true, debe ser un array de strings, sino un string
1691
+ defaultValue: o = null,
1692
+ //si el indicador es tipo "both" cuando se cambia el tipo
1693
+ changeIndType: l,
1694
+ activeIndicatorType: a
1695
+ }) => {
1696
+ const { t: c } = k(), [p, u] = B(), [h, g] = B(), [C, b] = B(), f = (_) => {
1697
+ u(p == _ ? null : _);
1698
+ }, v = (_) => {
1699
+ g(h == _ ? null : _);
1700
+ }, y = ({ indicator: _ }) => {
1701
+ console.log("onClickIndicator: ", _), x(_);
1702
+ }, x = (_) => {
1703
+ if (!t)
1704
+ b(
1705
+ (C == null ? void 0 : C.name) == _.name ? null : _
1706
+ );
1707
+ else {
1708
+ let N = C && C.length > 0 ? [...C] : [];
1709
+ b(
1710
+ N != null && N.some(
1711
+ ($) => $.name == _.name
1712
+ ) ? N.filter(
1713
+ ($) => $.name != String(_.name)
1714
+ ) : [...N, _]
1715
+ ), _.type == "both" && l("cat");
1716
+ }
1717
+ };
1718
+ F(() => {
1719
+ console.log("activeindicator changed to: ", C), n && typeof n == "function" && C && n({ activeIndicator: C });
1720
+ }, [C]), Ee(() => {
1721
+ if (o && !C)
1722
+ if (t && o && Array.isArray(o)) {
1723
+ let _ = C && C.length > 0 ? [...C] : [];
1724
+ b([..._, ...o]), w(o[0].name);
1725
+ } else
1726
+ x(o), w(o.name);
1727
+ }, []);
1728
+ const w = (_) => {
1729
+ const N = i.find(($) => {
1730
+ if ($.subcategories) {
1731
+ let O = $.subcategories.find(
1732
+ (ne) => ne.indicators.find((U) => U.name == _)
1733
+ );
1734
+ if (O)
1735
+ return g(O.subcategory), O;
1736
+ } else
1737
+ return $.indicators.some((O) => O.name == _);
1738
+ });
1739
+ N && u(N.category);
1740
+ };
1741
+ return /* @__PURE__ */ m("div", { className: ke.indicatorsList, children: [
1742
+ /* @__PURE__ */ r("h2", { className: ke.title, style: { color: s }, children: c("indicators.indicators") }),
1743
+ i.map((_, N) => /* @__PURE__ */ r(
1744
+ ze,
1745
+ {
1746
+ id: _.category,
1747
+ cat: _,
1748
+ onClickCategory: f,
1749
+ activeCategory: p,
1750
+ onClickSubCategory: v,
1751
+ activeSubCategory: h,
1752
+ onClickIndicator: y,
1753
+ activeIndicator: C,
1754
+ activeColor: d,
1755
+ defaultColor: s,
1756
+ multiple: t,
1757
+ onChange: n,
1758
+ onChangeType: l,
1759
+ activeIndicatorType: a
1760
+ },
1761
+ `categoryKey${N}`
1762
+ ))
1763
+ ] });
1764
+ };
1765
+ Bn.propTypes = {
1766
+ indicators: e.arrayOf(e.object),
1767
+ activeColor: e.string,
1768
+ defaultColor: e.string,
1769
+ onChange: e.func,
1770
+ changeIndType: e.func,
1771
+ multiple: e.bool,
1772
+ activeIndicator: e.oneOfType([e.object, e.array]),
1773
+ defaultValue: e.oneOfType([e.object, e.array]),
1774
+ activeIndicatorType: e.string
1775
+ };
1776
+ const $n = "_langSelector_1of0g_2", On = "_currentLang_1of0g_7", An = "_arrow_1of0g_19", In = "_prevImg_1of0g_22", Rn = "_langMenu_1of0g_26", K = {
1777
+ langSelector: $n,
1778
+ currentLang: On,
1779
+ arrow: An,
1780
+ prevImg: In,
1781
+ langMenu: Rn
1782
+ }, Vn = ({ langs: i, arrow: d, imgPrev: s }) => {
1783
+ const [n, t] = B(!1), { i18n: o } = k(), l = i.find((c) => c.code == o.language), a = (c) => {
1784
+ o.changeLanguage(c), t(!1);
1785
+ };
1786
+ return /* @__PURE__ */ m("div", { className: K.langSelector, children: [
1787
+ /* @__PURE__ */ m(
1788
+ "div",
1789
+ {
1790
+ className: K.currentLang,
1791
+ onClick: () => {
1792
+ t(!n);
1793
+ },
1794
+ children: [
1795
+ s && /* @__PURE__ */ r("img", { className: K.prevImg, src: s }),
1796
+ l.titleSelected || l.title,
1797
+ /* @__PURE__ */ r("img", { src: d, className: K.arrow })
1798
+ ]
1799
+ }
1800
+ ),
1801
+ n && /* @__PURE__ */ r("div", { className: K.langMenu, children: i.map((c) => /* @__PURE__ */ r(
1802
+ "button",
1803
+ {
1804
+ className: l.code == c.code ? K.active : "",
1805
+ onClick: () => a(c.code),
1806
+ children: c.title
1807
+ },
1808
+ c.code
1809
+ )) })
1810
+ ] });
1811
+ };
1812
+ Vn.propTypes = {
1813
+ langs: e.arrayOf(
1814
+ e.shape({
1815
+ code: e.string,
1816
+ title: e.string,
1817
+ titleSelected: e.string
1818
+ })
1819
+ ),
1820
+ color: e.string,
1821
+ bckColor: e.string,
1822
+ hoverColor: e.string,
1823
+ arrow: e.object,
1824
+ imgPrev: e.object
1825
+ };
1826
+ const jn = "_legendContainer_atg3j_3", zn = "_closeButton_atg3j_18", Pn = "_titleContainer_atg3j_46", qn = "_infoContainer_atg3j_52", En = "_titleLegendList_atg3j_63", Kn = "_legendListContainer_atg3j_70", Zn = "_gridContainer_atg3j_70", Un = "_elementLegendContainer_atg3j_76", Hn = "_colorDot_atg3j_82", Gn = "_absoluteValueContainer_atg3j_88", Yn = "_absoluteValueColor_atg3j_91", Wn = "_absoluteValueText_atg3j_96", Xn = "_moreInfoContainer_atg3j_108", M = {
1827
+ legendContainer: jn,
1828
+ closeButton: zn,
1829
+ titleContainer: Pn,
1830
+ infoContainer: qn,
1831
+ titleLegendList: En,
1832
+ legendListContainer: Kn,
1833
+ gridContainer: Zn,
1834
+ elementLegendContainer: Un,
1835
+ colorDot: Hn,
1836
+ absoluteValueContainer: Gn,
1837
+ absoluteValueColor: Yn,
1838
+ absoluteValueText: Wn,
1839
+ moreInfoContainer: Xn
1840
+ }, Jn = ({
1841
+ //JSON with the styles of the container (optional)
1842
+ containerStyles: i,
1843
+ //Title on top of the legend
1844
+ title: d,
1845
+ //Array to display the info behind the title should have: [{title, value}, ...]
1846
+ infoList: s,
1847
+ //Array to display the items of the legend: [{title, color}, ...]
1848
+ //color should be a string with hexadecimal value
1849
+ legendList: n,
1850
+ //If not passed it will read t("mainUser")
1851
+ legendListTitle: t,
1852
+ //Should be an object with {maxColor, minColor, maxValue, minValue}
1853
+ //If this has is not null or undefined, the legendList values wont be displayed.
1854
+ //It will display only the absolute value indicator.
1855
+ absoluteValue: o,
1856
+ //Function to be called when the button is clicked (optional).
1857
+ //If this is null or undefined the button wont be displayed.
1858
+ onClickMoreInfo: l,
1859
+ //If not passed it will read t("moreInformation")
1860
+ buttonTitle: a,
1861
+ onClickClose: c
1862
+ }) => {
1863
+ const { t: p } = k();
1864
+ return /* @__PURE__ */ m(
1865
+ "div",
1866
+ {
1867
+ style: i ? { ...i } : {},
1868
+ className: `${M.legendContainer}`,
1869
+ children: [
1870
+ /* @__PURE__ */ r("button", { className: M.closeButton, onClick: c }),
1871
+ d && /* @__PURE__ */ r("div", { className: M.titleContainer, children: /* @__PURE__ */ r("h2", { children: d }) }),
1872
+ s && s.length > 0 && /* @__PURE__ */ r("div", { className: M.infoContainer, children: /* @__PURE__ */ r("ul", { children: s.map(({ title: u, value: h }) => /* @__PURE__ */ m("li", { children: [
1873
+ /* @__PURE__ */ r("h3", { className: M.title, children: `${u}:` }),
1874
+ /* @__PURE__ */ m("span", { className: M.value, children: [
1875
+ "  ",
1876
+ h
1877
+ ] })
1878
+ ] }, d)) }) }),
1879
+ /* @__PURE__ */ r("h3", { className: M.titleLegendList, children: t ? /* @__PURE__ */ r(ge, { i18nKey: t, components: { sup: /* @__PURE__ */ r("sup", {}) } }) : p("mainUse") }),
1880
+ /* @__PURE__ */ r("div", { className: M.legendListContainer, children: o ? /* @__PURE__ */ m("div", { className: M.absoluteValueContainer, children: [
1881
+ /* @__PURE__ */ r(
1882
+ "div",
1883
+ {
1884
+ className: M.absoluteValueColor,
1885
+ style: {
1886
+ background: `linear-gradient(to bottom, ${o.maxColor} 0%, ${o.minColor} 100%)`
1887
+ }
1888
+ }
1889
+ ),
1890
+ /* @__PURE__ */ m("div", { className: M.absoluteValueText, children: [
1891
+ /* @__PURE__ */ m("span", { children: [
1892
+ o.maxValue,
1893
+ " ",
1894
+ p(o.unit)
1895
+ ] }),
1896
+ /* @__PURE__ */ m("span", { children: [
1897
+ o.minValue,
1898
+ " ",
1899
+ p(o.unit)
1900
+ ] })
1901
+ ] })
1902
+ ] }) : n && n.length > 0 && /* @__PURE__ */ r("div", { className: M.gridContainer, children: n.map(
1903
+ ({ title: u, color: h }) => /* @__PURE__ */ m("div", { className: M.elementLegendContainer, children: [
1904
+ /* @__PURE__ */ r(
1905
+ "div",
1906
+ {
1907
+ className: M.colorDot,
1908
+ style: { backgroundColor: h }
1909
+ }
1910
+ ),
1911
+ /* @__PURE__ */ m("div", { className: M.titleLegendElement, children: [
1912
+ p(u),
1913
+ " "
1914
+ ] })
1915
+ ] }, d)
1916
+ ) }) }),
1917
+ l && /* @__PURE__ */ r("button", { className: M.moreInfoContainer, onClick: l, children: a || p("moreInformation") })
1918
+ ]
1919
+ }
1920
+ );
1921
+ };
1922
+ Jn.propTypes = {
1923
+ title: e.string,
1924
+ containerStyles: e.object,
1925
+ infoList: e.arrayOf(
1926
+ e.shape({
1927
+ title: e.string.isRequired,
1928
+ value: e.oneOfType([e.string, e.number])
1929
+ })
1930
+ ),
1931
+ legendList: e.arrayOf(
1932
+ e.shape({
1933
+ title: e.string,
1934
+ color: e.string
1935
+ })
1936
+ ),
1937
+ legendListTitle: e.string,
1938
+ absoluteValue: e.shape({
1939
+ maxColor: e.string,
1940
+ minColor: e.string,
1941
+ maxValue: e.number,
1942
+ minValue: e.number
1943
+ }),
1944
+ onClickMoreInfo: e.func,
1945
+ buttonTitle: e.string,
1946
+ onClickClose: e.func
1947
+ };
1948
+ const Qn = "_logo_1ewa6_2", Ne = {
1949
+ logo: Qn
1950
+ }, ei = ({ src: i, alt: d, href: s }) => {
1951
+ const { t: n } = k(), t = /* @__PURE__ */ r("img", { src: i, alt: n(d) });
1952
+ return s ? /* @__PURE__ */ r("div", { className: Ne.logo, children: /* @__PURE__ */ r("a", { href: s, children: t }) }) : /* @__PURE__ */ r("div", { className: Ne.logo, children: t });
1953
+ };
1954
+ ei.propTypes = {
1955
+ src: e.string.isRequired,
1956
+ alt: e.string.isRequired,
1957
+ href: e.string,
1958
+ className: e.string
1959
+ };
1960
+ const ti = "_mapContainer_84pkf_2", ni = {
1961
+ mapContainer: ti
1962
+ };
1963
+ Ze.accessToken = "pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";
1964
+ const ii = ({
1965
+ initialView: i = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
1966
+ maxZoom: d = 17,
1967
+ minZoom: s = 8,
1968
+ mapStyle: n,
1969
+ firstSymbolLayer: t,
1970
+ cssProps: o = "",
1971
+ onClick: l = "",
1972
+ interactiveLayers: a = [],
1973
+ popUp: c = !1,
1974
+ sources: p = [],
1975
+ layers: u = []
1976
+ }) => {
1977
+ const h = me(), [g, C] = B(null), b = de((f) => f.mapState.showTexts);
1978
+ return F(() => {
1979
+ if (h.current) {
1980
+ const f = h.current.getMap();
1981
+ f.getStyle().layers.map((y) => {
1982
+ y.type == "symbol" && y.id != "professionals" && (b ? f.setLayoutProperty(y.id, "visibility", "visible") : f.setLayoutProperty(y.id, "visibility", "none"));
1983
+ });
1984
+ }
1985
+ }, [b]), /* @__PURE__ */ r("div", { className: `${ni.mapContainer}`, style: o, children: /* @__PURE__ */ m(
1986
+ Ue,
1987
+ {
1988
+ initialViewState: i,
1989
+ ref: h,
1990
+ hash: !1,
1991
+ maxZoom: d,
1992
+ minZoom: s,
1993
+ mapStyle: n,
1994
+ onClick: l,
1995
+ interactiveLayerIds: a,
1996
+ children: [
1997
+ p.length && p.map((f, v) => /* @__PURE__ */ r(
1998
+ He,
1999
+ {
2000
+ ...f,
2001
+ children: u.length && u.map((y, x) => {
2002
+ if (y.sourceId == f.id) return /* @__PURE__ */ r(
2003
+ Ge,
2004
+ {
2005
+ ...y.layer,
2006
+ beforeId: t
2007
+ },
2008
+ x
2009
+ );
2010
+ })
2011
+ },
2012
+ v
2013
+ )),
2014
+ /* @__PURE__ */ r(Ye, { position: "bottom-right", visualizePitch: !0 }),
2015
+ c && g && /* @__PURE__ */ r(
2016
+ We,
2017
+ {
2018
+ longitude: c.longitude,
2019
+ latitude: c.latitude,
2020
+ anchor: c.anchor,
2021
+ onClose: () => C(null),
2022
+ children: c.content
2023
+ }
2024
+ )
2025
+ ]
2026
+ }
2027
+ ) });
2028
+ };
2029
+ ii.propTypes = {
2030
+ initialView: e.shape({
2031
+ latitude: e.number.isRequired,
2032
+ longitude: e.number.isRequired,
2033
+ zoom: e.number.isRequired
2034
+ }),
2035
+ mapStyle: e.object,
2036
+ firstSymbolLayer: e.string,
2037
+ cssProps: e.object,
2038
+ style: e.object,
2039
+ maxZoom: e.number,
2040
+ minZoom: e.number,
2041
+ onClick: e.func,
2042
+ interactiveLayers: e.array,
2043
+ popUp: e.shape({
2044
+ latitude: e.number,
2045
+ longitude: e.number,
2046
+ anchor: e.string,
2047
+ content: e.element
2048
+ }),
2049
+ textsUrl: e.string,
2050
+ sources: e.arrayOf(
2051
+ e.shape({
2052
+ id: e.string,
2053
+ type: e.string,
2054
+ url: e.string,
2055
+ //si es type: vector
2056
+ data: e.object
2057
+ //si es type: geojson
2058
+ })
2059
+ ),
2060
+ layers: e.arrayOf(
2061
+ e.shape({
2062
+ sourceId: e.string,
2063
+ layer: e.shape({
2064
+ id: e.string,
2065
+ type: e.string,
2066
+ sourceLayer: e.string,
2067
+ minZoom: e.number,
2068
+ maxZoom: e.number,
2069
+ paint: e.object
2070
+ })
2071
+ })
2072
+ )
2073
+ };
2074
+ const oi = "_mapContainer_b0pyr_3", si = {
2075
+ mapContainer: oi
2076
+ }, ri = "_FeaturePopUp_1gd6w_2", ai = "_title_1gd6w_2", Se = {
2077
+ FeaturePopUp: ri,
2078
+ title: ai
2079
+ }, li = ({ props: i }) => {
2080
+ const { t: d } = k();
2081
+ return /* @__PURE__ */ r("div", { className: Se.FeaturePopUp, children: i.map((s) => /* @__PURE__ */ m("p", { children: [
2082
+ /* @__PURE__ */ m("span", { className: Se.title, children: [
2083
+ /* @__PURE__ */ r(ge, { i18nKey: s.name, components: { sup: /* @__PURE__ */ r("sup", {}) } }),
2084
+ ": "
2085
+ ] }),
2086
+ s.value.toLocaleString("de", { maximumFractionDigits: 2 }),
2087
+ " ",
2088
+ d(s.unit)
2089
+ ] })) });
2090
+ }, ci = ({
2091
+ initialView: i = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
2092
+ maxZoom: d = 17,
2093
+ minZoom: s = 8,
2094
+ mapStyle: n,
2095
+ firstSymbolLayer: t,
2096
+ cssProps: o = {},
2097
+ onClick: l = "",
2098
+ interactiveLayers: a = [],
2099
+ sources: c = [],
2100
+ layers: p = [],
2101
+ filters: u,
2102
+ popUpParams: h,
2103
+ onClosePopUp: g,
2104
+ showTexts: C
2105
+ }) => {
2106
+ console.log(u);
2107
+ const b = me();
2108
+ return F(() => {
2109
+ if (b.current) {
2110
+ const f = b.current.getMap();
2111
+ f.getStyle().layers.map((y) => {
2112
+ y.type == "symbol" && y.id != "professionals" && (C ? f.setLayoutProperty(y.id, "visibility", "visible") : f.setLayoutProperty(y.id, "visibility", "none"));
2113
+ });
2114
+ }
2115
+ }, [C]), F(() => {
2116
+ let f = new Xe();
2117
+ return ie.addProtocol("pmtiles", f.tile), () => {
2118
+ ie.removeProtocol("pmtiles");
2119
+ };
2120
+ }, []), /* @__PURE__ */ r("div", { className: `${si.mapContainer}`, style: o && o, children: /* @__PURE__ */ m(
2121
+ Je,
2122
+ {
2123
+ mapLib: ie,
2124
+ initialViewState: i,
2125
+ ref: b,
2126
+ hash: !1,
2127
+ maxZoom: d,
2128
+ minZoom: s,
2129
+ mapStyle: n,
2130
+ onClick: l,
2131
+ interactiveLayerIds: a,
2132
+ children: [
2133
+ c.length && c.map((f, v) => /* @__PURE__ */ r(
2134
+ Qe,
2135
+ {
2136
+ ...f,
2137
+ children: p.length && p.map((y, x) => {
2138
+ if (y.sourceId == f.id) return /* @__PURE__ */ r(
2139
+ et,
2140
+ {
2141
+ ...y.layer,
2142
+ beforeId: t,
2143
+ filter: u && u
2144
+ },
2145
+ x
2146
+ );
2147
+ })
2148
+ },
2149
+ v
2150
+ )),
2151
+ /* @__PURE__ */ r(tt, { position: "bottom-right", visualizePitch: !0 }),
2152
+ h && /* @__PURE__ */ r(
2153
+ nt,
2154
+ {
2155
+ longitude: h.lng,
2156
+ latitude: h.lat,
2157
+ onClose: g,
2158
+ children: /* @__PURE__ */ r(li, { props: h.props })
2159
+ }
2160
+ )
2161
+ ]
2162
+ }
2163
+ ) });
2164
+ };
2165
+ ci.propTypes = {
2166
+ initialView: e.shape({
2167
+ latitude: e.number.isRequired,
2168
+ longitude: e.number.isRequired,
2169
+ zoom: e.number.isRequired
2170
+ }),
2171
+ mapStyle: e.string,
2172
+ firstSymbolLayer: e.string,
2173
+ cssProps: e.object,
2174
+ style: e.object,
2175
+ maxZoom: e.number,
2176
+ minZoom: e.number,
2177
+ onClick: e.func,
2178
+ interactiveLayers: e.array,
2179
+ popUp: e.bool,
2180
+ sources: e.arrayOf(
2181
+ e.shape({
2182
+ id: e.string,
2183
+ type: e.string,
2184
+ url: e.string,
2185
+ //si es type: vector
2186
+ data: e.object
2187
+ //si es type: geojson
2188
+ })
2189
+ ),
2190
+ layers: e.arrayOf(
2191
+ e.shape({
2192
+ sourceId: e.string,
2193
+ layer: e.shape({
2194
+ id: e.string,
2195
+ type: e.string,
2196
+ sourceLayer: e.string,
2197
+ minZoom: e.number,
2198
+ maxZoom: e.number,
2199
+ paint: e.object
2200
+ })
2201
+ })
2202
+ ),
2203
+ showTexts: e.bool,
2204
+ filters: e.array,
2205
+ popUpParams: e.object,
2206
+ onClosePopUp: e.func
2207
+ };
2208
+ const di = "_sectionBar_1egwc_2", pi = "_leftContent_1egwc_14", ui = "_textContainer_1egwc_20", hi = "_title_1egwc_27", mi = "_subtitle_1egwc_33", gi = "_rightContent_1egwc_38", j = {
2209
+ sectionBar: di,
2210
+ leftContent: pi,
2211
+ textContainer: ui,
2212
+ title: hi,
2213
+ subtitle: mi,
2214
+ rightContent: gi
2215
+ }, lo = ({
2216
+ leftIcon: i,
2217
+ title: d,
2218
+ subtitle: s,
2219
+ rightContent: n,
2220
+ mainColor: t,
2221
+ width: o
2222
+ }) => {
2223
+ const { t: l } = k();
2224
+ return /* @__PURE__ */ m("div", { className: j.sectionBar, style: { width: o && o }, children: [
2225
+ /* @__PURE__ */ m("div", { className: j.leftContent, children: [
2226
+ i && /* @__PURE__ */ r("img", { src: i, alt: "Icono", className: j.icon }),
2227
+ /* @__PURE__ */ m("div", { className: j.textContainer, children: [
2228
+ /* @__PURE__ */ r("div", { className: j.title, children: l(d) }),
2229
+ s && /* @__PURE__ */ r("div", { className: j.subtitle, children: s })
2230
+ ] })
2231
+ ] }),
2232
+ /* @__PURE__ */ r("div", { className: j.rightContent, children: n })
2233
+ ] });
2234
+ }, Ci = Me({
2235
+ name: "mapSlice",
2236
+ initialState: {
2237
+ showTexts: !0,
2238
+ sliderSelectedYear: 2025,
2239
+ activeIndicatorKey: 0,
2240
+ activeIndicatorType: "cat",
2241
+ activeIndicatorUnit: null
2242
+ },
2243
+ reducers: {
2244
+ setShowTexts: (i, d) => {
2245
+ i.showTexts = d.payload;
2246
+ },
2247
+ setYear: (i, d) => {
2248
+ i.sliderSelectedYear = d.payload;
2249
+ },
2250
+ setActiveIndicatorKey: (i, d) => {
2251
+ i.activeIndicatorKey = d.payload;
2252
+ },
2253
+ setActiveIndicatorType: (i, d) => {
2254
+ i.activeIndicatorType = d.payload;
2255
+ },
2256
+ setActiveIndicatorUnit: (i, d) => {
2257
+ i.activeIndicatorUnit = d.payload;
2258
+ }
2259
+ }
2260
+ }), { setShowTexts: co, setYear: le, setActiveIndicatorKey: po, setActiveIndicatorType: uo, setActiveIndicatorUnit: ho } = Ci.actions, bi = "data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20d='M15.2722%2012.6627C15.2722%2011.8929%2016.1055%2011.4118%2016.7722%2011.7967L31.5641%2020.3368C32.2308%2020.7217%2032.2308%2021.684%2031.5641%2022.0689L16.7722%2030.609C16.1055%2030.9939%2015.2722%2030.5128%2015.2722%2029.743L15.2722%2012.6627Z'%20fill='%23605B56'/%3e%3c/svg%3e", fi = "data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3crect%20x='15'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3crect%20x='23'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3c/svg%3e", yi = "_slider_a19yo_2", vi = "_playButton_a19yo_17", _i = "_sliderOpen_a19yo_28", xi = "_sliderResults_a19yo_32", Y = {
2261
+ slider: yi,
2262
+ playButton: vi,
2263
+ sliderOpen: _i,
2264
+ sliderResults: xi
2265
+ }, wi = ({ onResults: i = !1, defaultYear: d = 2025, firstYear: s = 2025, lastYear: n = 2050, zIndex: t = 10, rightBarOpen: o = !1 }) => {
2266
+ const [l, a] = B(d), c = Te(), p = (y, x) => {
2267
+ a(x), c(le(x - 2e3));
2268
+ }, [u, h] = B(!1), g = () => {
2269
+ h(!0);
2270
+ }, C = () => {
2271
+ h(!1);
2272
+ };
2273
+ ((y, x) => {
2274
+ const w = me();
2275
+ F(() => {
2276
+ w.current = y;
2277
+ }, [y]), F(() => {
2278
+ function _() {
2279
+ w.current();
2280
+ }
2281
+ {
2282
+ let N = setInterval(_, x);
2283
+ return () => clearInterval(N);
2284
+ }
2285
+ }, [x]);
2286
+ })(() => {
2287
+ u && (l != 2050 ? (a(l + 1), c(le(l - 2e3 + 1))) : (a(2025), c(le(25))));
2288
+ }, 1e3);
2289
+ const f = ot({
2290
+ palette: {
2291
+ primary: {
2292
+ main: "#605b56"
2293
+ }
2294
+ },
2295
+ components: {
2296
+ MuiSlider: {
2297
+ styleOverrides: {
2298
+ mark: {
2299
+ height: 10,
2300
+ backgroundColor: "#605b56"
2301
+ },
2302
+ valueLabel: {
2303
+ backgroundColor: "transparent",
2304
+ color: "#605b56",
2305
+ padding: 0,
2306
+ top: 3
2307
+ }
2308
+ }
2309
+ }
2310
+ }
2311
+ }), v = [
2312
+ { label: "", value: 2025 },
2313
+ { label: "", value: 2032 },
2314
+ { label: "", value: 2041 },
2315
+ { label: "", value: 2050 }
2316
+ ];
2317
+ return /* @__PURE__ */ r(rt, { theme: f, children: /* @__PURE__ */ m(
2318
+ st,
2319
+ {
2320
+ sx: { width: 400 },
2321
+ className: `${i ? Y.sliderResults : Y.slider} ${o ? Y.sliderOpen : ""}`,
2322
+ style: { zIndex: t },
2323
+ children: [
2324
+ s,
2325
+ /* @__PURE__ */ r(
2326
+ it,
2327
+ {
2328
+ "aria-label": "TimeSlider",
2329
+ value: l,
2330
+ valueLabelDisplay: "on",
2331
+ step: 1,
2332
+ marks: v,
2333
+ min: s,
2334
+ max: n,
2335
+ onChange: p,
2336
+ color: "primary",
2337
+ size: "small"
2338
+ }
2339
+ ),
2340
+ n,
2341
+ !u && /* @__PURE__ */ r("button", { className: Y.playButton, onClick: g, children: /* @__PURE__ */ r("img", { src: bi, alt: "Play" }) }),
2342
+ u && /* @__PURE__ */ r("button", { className: Y.playButton, onClick: C, children: /* @__PURE__ */ r("img", { src: fi, alt: "Pause" }) })
2343
+ ]
2344
+ }
2345
+ ) });
2346
+ };
2347
+ wi.propTypes = {
2348
+ defaultYear: e.number,
2349
+ onResults: e.bool,
2350
+ firstYear: e.number,
2351
+ lastYear: e.number,
2352
+ zIndex: e.number,
2353
+ rightBarOpen: e.bool
2354
+ };
2355
+ const ki = "_TopNavMenuContainer_15agj_2", Ni = "_topNavOptions_15agj_12", Si = "_active_15agj_23", ce = {
2356
+ TopNavMenuContainer: ki,
2357
+ topNavOptions: Ni,
2358
+ active: Si
2359
+ }, Ti = ({
2360
+ options: i = [],
2361
+ cssProps: d = {},
2362
+ containerStyles: s
2363
+ }) => {
2364
+ const { t: n } = k(), t = d.textColor || "inherit", o = d.borderColor || "transparent", l = d.height || "100%";
2365
+ return /* @__PURE__ */ r(
2366
+ "div",
2367
+ {
2368
+ className: ce.TopNavMenuContainer,
2369
+ style: s || {},
2370
+ children: i.map((a, c) => /* @__PURE__ */ r(
2371
+ at,
2372
+ {
2373
+ to: a.url,
2374
+ className: ({ isActive: p }) => `${ce.topNavOptions} ${p ? ce.active : ""}`,
2375
+ style: ({ isActive: p }) => ({
2376
+ color: t,
2377
+ borderColor: p ? o : "transparent",
2378
+ height: `calc(${l} - 10px)`
2379
+ }),
2380
+ children: n(a.name)
2381
+ },
2382
+ c
2383
+ ))
2384
+ }
2385
+ );
2386
+ };
2387
+ Ti.propTypes = {
2388
+ options: e.arrayOf(e.object),
2389
+ cssProps: e.shape({
2390
+ borderColor: e.string.isRequired,
2391
+ textColor: e.string.isRequired
2392
+ // height: PropTypes.string.isRequired,
2393
+ })
2394
+ // activeColor: PropTypes.string,
2395
+ // defaultColor: PropTypes.string
2396
+ };
2397
+ const Mi = Me({
2398
+ name: "userSlice",
2399
+ initialState: {
2400
+ user: {
2401
+ isLoggedIn: !1,
2402
+ username: ""
2403
+ },
2404
+ showLogIn: !1,
2405
+ showUserMenu: !1
2406
+ },
2407
+ reducers: {
2408
+ setShowLogIn: (i, d) => {
2409
+ i.showLogIn = d.payload;
2410
+ },
2411
+ setShowUserMenu: (i, d) => {
2412
+ i.showUserMenu = d.payload;
2413
+ }
2414
+ }
2415
+ }), { setShowLogIn: Fi, setShowUserMenu: Li } = Mi.actions, Di = "_UserMenuTrigger_uglss_2", Bi = {
2416
+ UserMenuTrigger: Di
2417
+ }, $i = ({ cssClass: i, loginLocale: d = "login" }) => {
2418
+ const s = Te(), n = de((a) => a.userState.user.isLoggedIn), t = de((a) => a.userState.user.username), { t: o } = k(), l = () => {
2419
+ s(n ? Fi(!0) : Li(!0));
2420
+ };
2421
+ return /* @__PURE__ */ r("div", { className: `${Bi.UserMenuTrigger} link ${i}`, onClick: l, children: n ? t : o(d) });
2422
+ };
2423
+ $i.propTypes = {
2424
+ onClickLoggedIn: e.func.isRequired,
2425
+ onClickLoggedOut: e.func.isRequired,
2426
+ log: e.bool,
2427
+ name: e.string,
2428
+ cssClass: e.string,
2429
+ loginLocale: e.string
2430
+ };
2431
+ const Oi = "_header_t7qdl_2", Ai = "_leftComponents_t7qdl_12", Ii = "_centerComponents_t7qdl_13", Ri = "_rightComponents_t7qdl_14", Q = {
2432
+ header: Oi,
2433
+ leftComponents: Ai,
2434
+ centerComponents: Ii,
2435
+ rightComponents: Ri
2436
+ }, Vi = ({
2437
+ cssProps: i,
2438
+ leftComponents: d = [],
2439
+ centerComponents: s = [],
2440
+ rightComponents: n = []
2441
+ }) => /* @__PURE__ */ m("div", { className: Q.header, style: i, children: [
2442
+ /* @__PURE__ */ r(
2443
+ "div",
2444
+ {
2445
+ className: Q.leftComponents,
2446
+ style: { height: i.height },
2447
+ children: d.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
2448
+ }
2449
+ ),
2450
+ /* @__PURE__ */ r(
2451
+ "div",
2452
+ {
2453
+ className: Q.centerComponents,
2454
+ style: { height: i.height },
2455
+ children: s.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
2456
+ }
2457
+ ),
2458
+ /* @__PURE__ */ r(
2459
+ "div",
2460
+ {
2461
+ className: Q.rightComponents,
2462
+ style: { height: i.height },
2463
+ children: n.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
2464
+ }
2465
+ )
2466
+ ] });
2467
+ Vi.propTypes = {
2468
+ cssProps: e.shape({
2469
+ backgroundColor: e.string.isRequired,
2470
+ height: e.string.isRequired,
2471
+ borderColor: e.string,
2472
+ textColor: e.string
2473
+ }),
2474
+ leftComponents: e.arrayOf(e.node),
2475
+ centerComponents: e.arrayOf(e.node),
2476
+ rightComponents: e.arrayOf(e.node)
2477
+ };
2478
+ const ji = "_sidebar_1jqo2_2", zi = "_open_1jqo2_16", Pi = "_content_1jqo2_20", qi = "_closeButton_1jqo2_26", ee = {
2479
+ sidebar: ji,
2480
+ open: zi,
2481
+ content: Pi,
2482
+ closeButton: qi
2483
+ }, Ei = ({ width: i = "300px", children: d, showRightBar: s, onCloseBar: n }) => {
2484
+ const t = () => {
2485
+ n();
2486
+ };
2487
+ return /* @__PURE__ */ r(
2488
+ "div",
2489
+ {
2490
+ className: `${ee.sidebar} ${s ? ee.open : ""}`,
2491
+ style: { width: s ? i : 0 },
2492
+ children: s && /* @__PURE__ */ m("div", { className: ee.content, children: [
2493
+ /* @__PURE__ */ r("button", { className: ee.closeButton, onClick: t, children: "×" }),
2494
+ d
2495
+ ] })
2496
+ }
2497
+ );
2498
+ };
2499
+ Ei.propTypes = {
2500
+ width: e.string,
2501
+ children: e.node,
2502
+ showRightBar: e.bool,
2503
+ onCloseBar: e.func
2504
+ };
2505
+ export {
2506
+ Nt as AmbitSelector,
2507
+ Rt as ButtonsList,
2508
+ z as DropdownList,
2509
+ ao as EditAmbit,
2510
+ cn as FiltersAmbit,
2511
+ mn as Graphic,
2512
+ Vi as HeaderSection,
2513
+ Bn as IndicatorsList,
2514
+ Vn as LangSelector,
2515
+ Jn as Legend,
2516
+ ei as LogoApp,
2517
+ ii as MapboxMap,
2518
+ ci as MaplibreMap,
2519
+ Ei as RightSidebar,
2520
+ lo as SectionBar,
2521
+ wi as TimeSlider,
2522
+ Le as Tooltip,
2523
+ Ti as TopNavMenu,
2524
+ $i as UserMenuTrigger
2525
+ };