ar-poncho 2.1.70 → 2.1.72

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.
@@ -10819,7 +10819,7 @@ a.alert.alert-danger i {
10819
10819
  */
10820
10820
  .highlight-box {
10821
10821
  --icon-size: 2rem;
10822
- width: calc(100% - var(--main-shadow-spread-size));
10822
+ width: 100%;
10823
10823
  position: relative;
10824
10824
  background: white;
10825
10825
  border-top: none;
@@ -10913,10 +10913,6 @@ a.alert.alert-danger i {
10913
10913
  color: #555;
10914
10914
  background-color: #fff;
10915
10915
  }
10916
- .highlight-box .btn {
10917
- margin-bottom: 15px;
10918
- margin-top: 15px;
10919
- }
10920
10916
 
10921
10917
  @media (max-width: 768px) {
10922
10918
  .highlight-box {
@@ -11177,6 +11173,18 @@ a.alert.alert-danger i {
11177
11173
  background-color: white;
11178
11174
  }
11179
11175
 
11176
+ /*
11177
+ Fix para evitar el overflow hidden
11178
+ .media tiene un overflow hidden y la hoja de estilos se llama después que
11179
+ poncho.min.css.
11180
+ No se puede modificar el orden de las hojas de estilos, por lo que se hace
11181
+ esta corrección para evitar que el recuadro se corte.
11182
+ */
11183
+ .media:has(> .highlight-box) .highlight-box {
11184
+ width: calc(100% - (var(--main-shadow-spread-size) + 2px));
11185
+ margin-top: 4px;
11186
+ }
11187
+
11180
11188
  .embed-responsive-1by1 {
11181
11189
  padding-bottom: 100%;
11182
11190
  }
@@ -10819,7 +10819,7 @@ a.alert.alert-danger i {
10819
10819
  */
10820
10820
  .highlight-box {
10821
10821
  --icon-size: 2rem;
10822
- width: calc(100% - var(--main-shadow-spread-size));
10822
+ width: 100%;
10823
10823
  position: relative;
10824
10824
  background: white;
10825
10825
  border-top: none;
@@ -10913,10 +10913,6 @@ a.alert.alert-danger i {
10913
10913
  color: #555;
10914
10914
  background-color: #fff;
10915
10915
  }
10916
- .highlight-box .btn {
10917
- margin-bottom: 15px;
10918
- margin-top: 15px;
10919
- }
10920
10916
 
10921
10917
  @media (max-width: 768px) {
10922
10918
  .highlight-box {
@@ -11177,6 +11173,18 @@ a.alert.alert-danger i {
11177
11173
  background-color: white;
11178
11174
  }
11179
11175
 
11176
+ /*
11177
+ Fix para evitar el overflow hidden
11178
+ .media tiene un overflow hidden y la hoja de estilos se llama después que
11179
+ poncho.min.css.
11180
+ No se puede modificar el orden de las hojas de estilos, por lo que se hace
11181
+ esta corrección para evitar que el recuadro se corte.
11182
+ */
11183
+ .media:has(> .highlight-box) .highlight-box {
11184
+ width: calc(100% - (var(--main-shadow-spread-size) + 2px));
11185
+ margin-top: 4px;
11186
+ }
11187
+
11180
11188
  .embed-responsive-1by1 {
11181
11189
  padding-bottom: 100%;
11182
11190
  }
package/dist/js/poncho.js CHANGED
@@ -5900,7 +5900,7 @@ class PonchoMap {
5900
5900
  * Versión poncho
5901
5901
  */
5902
5902
  get version(){
5903
- return "2.2.1";
5903
+ return "2.2.2";
5904
5904
  }
5905
5905
 
5906
5906
 
@@ -11391,7 +11391,7 @@ class PonchoMapSearch {
11391
11391
  this.instance = instance;
11392
11392
  let opts = Object.assign({}, defaults, options);
11393
11393
  this.debounce_delay = opts.debounce_delay;
11394
- this.text = (instance.title ? instance.title : false);
11394
+ this.text = instance.headers.hasOwnProperty(opts.text) ? opts.text : instance.title;
11395
11395
  this.datalist = opts.datalist;
11396
11396
  this.combobox = opts.combobox;
11397
11397
  this.combobox_options = opts.combobox_options;
@@ -1 +1 @@
1
- let ponchoColorDefinitionsList=[{name:"www.argentina.gob.ar",space:"arg",hidden_space:!1,description:"",data:[{scope:"arg",name:"Azul principal",group:"primary",color:{900:"#232D4F",800:"#2C3C5F",700:"#354B6E",600:"#3E5A7E",500:"#5A7290",400:"#7589A3",300:"#91A1B5",200:"#ACB8C8",100:"#C8D0DA",50:"#E3E7ED"},instance:[{name:"Azul",code:"arg-azul",description:"Color principal",scope:"arg",related_color:"900",parent_group:"primary",color:"#232D4F",variant:[{variant:"half",color:"#9296A7",name:"Azul medio tono",code:"arg-azul-half"},{variant:"lighter",color:"#C8D0DA",name:"Azul muy claro",code:"arg-azul-lighter"}],alias:[{code:"arg-azul",exclude:!1},{code:"primary",exclude:!0},{code:"azul",exclude:!0},{code:"azul-marino",exclude:!0},{code:"primary-alt",exclude:!0},{code:"arg-primary",exclude:!0}]},{name:"Azul cobalto",code:"arg-secundario",description:"",scope:"arg",related_color:"600",parent_group:"primary",color:"#3E5A7E",variant:[],alias:[{code:"arg-secundario",exclude:!1},{code:"secondary",exclude:!0},{code:"secundario",exclude:!0}]},{name:"Primary light",code:"arg-primary-light",description:"",scope:"arg",related_color:"50",parent_group:"primary",color:"#E3E7ED",variant:[],alias:[{code:"arg-primary-light",exclude:!1},{code:"primary-light",exclude:!0}]},{name:"Azul acero",code:"arg-info",description:"",scope:"arg",related_color:"500",parent_group:"primary",color:"#5A7290",variant:[{variant:"lighter",color:"#E3E7ED",name:"Azul acero muy claro",code:"arg-info-lighter"}],alias:[{code:"arg-info",exclude:!1},{code:"info",exclude:!0}]}]},{scope:"arg",name:"Verde",group:"verde",color:{50:"#F1F5D7",100:"#DEE8A3",200:"#CCDB6E",300:"#B9CE39",400:"#93B727",500:"#6EA015",600:"#4E8F24",700:"#2E7D33",800:"#27692A",900:"#1F5421"},instance:[{name:"Verde",code:"arg-verde",description:"",scope:"arg",related_color:"700",parent_group:"verde",color:"#2E7D33",variant:[{variant:"light",color:"#6EA015",name:"Verde claro",code:"arg-verde-light"},{variant:"half",color:"#96BE99",name:"Verde medio tono",code:"arg-verde-half"},{variant:"dark",color:"#1F5421",name:"Verde oscuro",code:"arg-verde-dark"}],alias:[{code:"arg-verde",exclude:!1},{code:"success",exclude:!0},{code:"verde",exclude:!0}]},{name:"Verdín",code:"arg-verdin",description:"",scope:"arg",related_color:"500",parent_group:"verde",color:"#6EA015",variant:[{variant:"light",color:"#B9CE39",name:"Verdín claro",code:"arg-verdin-light"},{variant:"dark",color:"#2E7D33",name:"Verdín oscuro",code:"arg-verdin-dark"}],alias:[{code:"arg-verdin",exclude:!1},{code:"verdin",exclude:!0}]},{name:"Lima",code:"arg-lima",description:"",scope:"arg",related_color:"300",parent_group:"verde",color:"#B9CE39",variant:[{variant:"light",color:"#DEE8A3",name:"Lima claro",code:"arg-lima-light"},{variant:"dark",color:"#6EA015",name:"Lima oscuro",code:"arg-lima-dark"}],alias:[{code:"arg-lima",exclude:!1},{code:"limon",exclude:!0},{code:"lima",exclude:!0}]}]},{scope:"arg",name:"Amarillo",group:"amarillo",color:{50:"#FFFAE8",100:"#FFF1C0",200:"#FFE997",300:"#FFE06E",400:"#FFD745",500:"#FFCE1C",600:"#D8AE18",700:"#B18F15",800:"#8A6F12",900:"#634F0E"},instance:[{name:"Maíz",code:"arg-maiz",description:"",scope:"arg",related_color:"500",parent_group:"amarillo",color:"#FFCE1C",variant:[{variant:"light",color:"#FFE997",name:"Maíz claro",code:"arg-maiz-light"},{variant:"dark",color:"#B18F15",name:"Maíz oscuro",code:"arg-maiz-dark"}],alias:[{code:"arg-maiz",exclude:!1},{code:"maiz",exclude:!0}]}]},{scope:"arg",name:"Fucsia",group:"fucsia",color:{50:"#FCDDE6",100:"#F8B6C9",200:"#F48EAB",300:"#F16798",400:"#ED3F85",500:"#EC407A",600:"#D72C6B",700:"#C2185B",800:"#9A144A",900:"#721038"},instance:[{name:"Arándano",code:"arg-arandano",description:"",scope:"arg",related_color:"700",parent_group:"fucsia",color:"#C2185B",variant:[{variant:"light",color:"#EC407A",name:"Arándano claro",code:"arg-arandano-light"},{variant:"dark",color:"#721038",name:"Arándano oscuro",code:"arg-arandano-dark"},{variant:"half",color:"#E18CAD",name:"Arándano medio tono",code:"arg-arandano-half"},{variant:"lighter",color:"#FCDDE6",name:"Arándano muy claro",code:"arg-arandano-lighter"}],alias:[{code:"arg-arandano",exclude:!1},{code:"arandano",exclude:!0}]},{name:"Fucsia",code:"arg-fucsia",description:"",scope:"arg",related_color:"500",parent_group:"fucsia",color:"#EC407A",variant:[{variant:"light",color:"#F16798",name:"Fucsia claro",code:"arg-fucsia-light"},{variant:"dark",color:"#9A144A",name:"Fucsia oscuro",code:"arg-fucsia-dark"}],alias:[{code:"arg-fucsia",exclude:!1},{code:"cereza",exclude:!0},{code:"fucsia",exclude:!0}]},{name:"Rosado",code:"arg-rosado",description:"",scope:"arg",related_color:"200",parent_group:"fucsia",color:"#F48EAB",variant:[{variant:"light",color:"#FCDDE6",name:"Rosado claro",code:"arg-rosado-light"},{variant:"dark",color:"#ED3F85",name:"Rosado oscuro",code:"arg-rosado-dark"},{variant:"half",color:"#FAC7D5",name:"Rosado medio tono",code:"arg-rosado-half"}],alias:[{code:"arg-rosado",exclude:!1}]}]},{scope:"arg",name:"Violeta",group:"violeta",color:{50:"#E9E6F2",100:"#D3CEE5",200:"#BEB5D8",300:"#A89DCB",400:"#9284BE",500:"#8561B2",700:"#6A1B99",800:"#4B0F7A",900:"#2C035C",600:"#773EA5"},instance:[{name:"Lavanda",code:"arg-lavanda",description:"",scope:"arg",related_color:"400",parent_group:"violeta",color:"#9284BE",variant:[],alias:[{code:"arg-lavanda",exclude:!1},{code:"lavanda",exclude:!0}]},{name:"Uva",code:"arg-uva",description:"",scope:"arg",related_color:"700",parent_group:"violeta",color:"#6A1B99",variant:[],alias:[{code:"arg-uva",exclude:!1},{code:"uva",exclude:!0}]}]},{scope:"arg",name:"Negro",group:"negro",color:{50:"#F0F0F0",100:"#E9E9E9",200:"#DDDDDD",300:"#838383",150:"#DEE2E6",75:"#F2F2F2",500:"#555555",600:"#444444",900:"#141414",25:"#FFFFFF"},instance:[{name:"Negro",code:"arg-negro",description:"Elementos básicos",scope:"arg",related_color:"900",parent_group:"negro",color:"#141414",variant:[{variant:"lighter",color:"#F0F0F0",name:"Negro muy claro",code:"arg-negro-lighter"},{variant:"light",color:"#DDDDDD",name:"Gris",code:"arg-negro-light"}],alias:[{code:"arg-negro",exclude:!1},{code:"negro",exclude:!0},{code:"black",exclude:!0},{code:"gray-base",exclude:!0}]},{name:"Default",code:"arg-default",description:"",scope:"arg",related_color:"300",parent_group:"negro",color:"#838383",variant:[],alias:[{code:"arg-default",exclude:!1},{code:"default",exclude:!0}]},{name:"Gray light",code:"arg-gray-light",description:"",scope:"arg",related_color:"200",parent_group:"negro",color:"#DDDDDD",variant:[],alias:[{code:"arg-gray-light",exclude:!1},{code:"gray-light",exclude:!0}]},{name:"Gray hover",code:"arg-gray-hover",description:"",scope:"arg",related_color:"100",parent_group:"negro",color:"#E9E9E9",variant:[],alias:[{code:"arg-gray-hover",exclude:!1},{code:"gray-hover",exclude:!0}]},{name:"Gray hover light",code:"arg-gray-hover-light",description:"",scope:"arg",related_color:"50",parent_group:"negro",color:"#F0F0F0",variant:[],alias:[{code:"arg-gray-hover-light",exclude:!1},{code:"gray-hover-light",exclude:!0}]},{name:"Gris intermedio",code:"arg-gris-intermedio",description:"",scope:"arg",related_color:"500",parent_group:"negro",color:"#555555",variant:[],alias:[{code:"arg-gris-intermedio",exclude:!1},{code:"gray",exclude:!0},{code:"grisintermedio",exclude:!0},{code:"gris-area",exclude:!0},{code:"gris",exclude:!1}]},{name:"Gray dark",code:"arg-gray-dark",description:"",scope:"arg",related_color:"600",parent_group:"negro",color:"#444444",variant:[],alias:[{code:"arg-gray-dark",exclude:!1},{code:"gray-dark",exclude:!0}]},{name:"Gray border",code:"arg-gray-border",description:"",scope:"arg",related_color:"150",parent_group:"negro",color:"#DEE2E6",variant:[],alias:[{code:"arg-gray-border",exclude:!1},{code:"gray-border",exclude:!0}]},{name:"Gris niebla",code:"arg-gris-niebla",description:"",scope:"arg",related_color:"75",parent_group:"negro",color:"#F2F2F2",variant:[],alias:[{code:"arg-gris-niebla",exclude:!1},{code:"gray-lighter",exclude:!0}]},{name:"Gray background",code:"arg-gray-background",description:"",scope:"arg",related_color:"25",parent_group:"negro",color:"#FFFFFF",variant:[],alias:[{code:"arg-gray-background",exclude:!1},{code:"gray-background",exclude:!0}]}]},{scope:"arg",name:"Turquesa",group:"turquesa",color:{50:"#DCF1F0",100:"#C0E5E3",200:"#A4D9D7",300:"#88CECB",400:"#6CC3BE",500:"#50B7B2",600:"#459E99",700:"#3B8681",800:"#306D69",900:"#255450"},instance:[{name:"Palta",code:"arg-palta",description:"",scope:"arg",related_color:"500",parent_group:"turquesa",color:"#50B7B2",variant:[{variant:"half",color:"#A8DBD9",name:"Palta medio tono",code:"arg-palta-half"},{variant:"lighter",color:"#C0E5E3",name:"Palta muy claro",code:"arg-palta-lighter"}],alias:[{code:"arg-palta",exclude:!1},{code:"palta",exclude:!0}]},{name:"Verde azulado",code:"arg-verde-azulado",description:"",scope:"arg",related_color:"700",parent_group:"turquesa",color:"#3B8681",variant:[],alias:[{code:"arg-verde-azulado",exclude:!1},{code:"verde-azulado",exclude:!0},{code:"verdeazulado",exclude:!0}]},{name:"Eucalipto",code:"arg-eucalipto",description:"",scope:"arg",related_color:"800",parent_group:"turquesa",color:"#306D69",variant:[{variant:"lighter",color:"#A4D9D7",name:"Eucalipto muy claro",code:"arg-eucalipto-lighter"},{variant:"dark",color:"#255450",name:"Eucalipto oscuro",code:"arg-eucalipto-dark"}],alias:[{code:"arg-eucalipto",exclude:!1}]}]},{scope:"arg",name:"Azul",group:"azul",color:{50:"#CDEBFA",100:"#9AD7F5",200:"#68C3EF",300:"#35AFEA",400:"#039BE5",500:"#0581C6",600:"#0767A7",700:"#084E87",800:"#0A3468",900:"#0C1A49"},instance:[{name:"Cielo",code:"arg-cielo",description:"",scope:"arg",related_color:"400",parent_group:"azul",color:"#039BE5",variant:[],alias:[{code:"arg-cielo",exclude:!1},{code:"cielo",exclude:!0},{code:"celeste",exclude:!0}]},{name:"Escarapela",code:"arg-escarapela",description:"",scope:"arg",related_color:"200",parent_group:"azul",color:"#68C3EF",variant:[],alias:[{code:"arg-escarapela",exclude:!1},{code:"escarapela",exclude:!0},{code:"celesteargentina",exclude:!0},{code:"celeste-argentina",exclude:!1}]},{name:"Enlace",code:"arg-enlace",description:"Enlace",scope:"arg",related_color:"600",parent_group:"azul",color:"#0767A7",variant:[{variant:"dark",color:"#084E87",name:"Enlace oscuro",code:"arg-enlace-dark"},{variant:"light",color:"#0581C6",name:"Enlace claro",code:"arg-enlace-light"}],alias:[{code:"arg-enlace",exclude:!1}]}]},{scope:"arg",name:"Rojo",group:"rojo",color:{50:"#FCDDDC",100:"#F9BBB9",200:"#F69896",300:"#F27673",400:"#EF5350",500:"#E14543",600:"#D43635",700:"#C62828",800:"#A12222",900:"#7C1C1C"},instance:[{name:"Rojo",code:"arg-rojo",description:"Atención o peligro",scope:"arg",related_color:"700",parent_group:"rojo",color:"#C62828",variant:[{variant:"light",color:"#E14543",name:"Rojo claro",code:"arg-rojo-light"},{variant:"dark",color:"#7C1C1C",name:"Rojo oscuro",code:"arg-rojo-dark"},{variant:"lighter",color:"#FCDDDC",name:"Rojo muy claro",code:"arg-rojo-lighter"}],alias:[{code:"arg-rojo",exclude:!1},{code:"danger",exclude:!0},{code:"rojo",exclude:!0}]},{name:"Tomate",code:"arg-tomate",description:"",scope:"arg",related_color:"400",parent_group:"rojo",color:"#EF5350",variant:[{variant:"light",color:"#F69896",name:"Tomate claro",code:"arg-tomate-light"},{variant:"dark",color:"#C62828",name:"Tomate oscuro",code:"arg-tomate-dark"}],alias:[{code:"arg-tomate",exclude:!1},{code:"complementary",exclude:!0},{code:"tomate",exclude:!0}]}]},{scope:"arg",name:"Naranja",group:"naranja",color:{50:"#FDE7BF",100:"#FBCE80",200:"#F9B640",300:"#F79D00",400:"#F38500",500:"#EF6C00",600:"#CE5701",700:"#AE4203",800:"#8D2D04",900:"#6C1805"},instance:[{name:"Marrón claro",code:"arg-marron-claro",description:"",scope:"arg",related_color:"800",parent_group:"naranja",color:"#8D2D04",variant:[{variant:"light",color:"#CE5701",name:"Marrón claro claro",code:"arg-marron-claro-light"},{variant:"dark",color:"#6C1805",name:"Marrón claro oscuro",code:"arg-marron-claro-dark"}],alias:[{code:"arg-marron-claro",exclude:!1},{code:"marron-claro",exclude:!0}]},{name:"Naranja",code:"arg-naranja",description:"",scope:"arg",related_color:"500",parent_group:"naranja",color:"#EF6C00",variant:[{variant:"light",color:"#EF6C00",name:"Naranja claro",code:"arg-naranja-light"},{variant:"dark",color:"#6C1805",name:"Naranja oscuro",code:"arg-naranja-dark"}],alias:[{code:"arg-naranja",exclude:!1},{code:"naranjaoscuro",exclude:!0},{code:"naranja",exclude:!0}]},{name:"Mandarina",code:"arg-mandarina",description:"",scope:"arg",related_color:"300",parent_group:"naranja",color:"#F79D00",variant:[{variant:"light",color:"#FBCE80",name:"Mandarina claro",code:"arg-mandarina-light"},{variant:"dark",color:"#CE5701",name:"Mandarina oscuro",code:"arg-mandarina-dark"}],alias:[{code:"arg-mandarina",exclude:!1},{code:"mandarina",exclude:!0}]}]},{scope:"arg",name:"Blanco",group:"blanco",color:{150:"#FFFFFF"},instance:[{name:"Blanco",code:"arg-blanco",description:"",scope:"arg",related_color:"150",parent_group:"blanco",color:"#FFFFFF",variant:[],alias:[{code:"arg-blanco",exclude:!1},{code:"white",exclude:!0},{code:"arg-white",exclude:!1}]}]},{scope:"arg",name:"Ocre",group:"ocre",color:{50:"#FAF8ED",100:"#F4F0DB",200:"#EAE1B7",300:"#E9CE8C",400:"#E7BA61",500:"#C98941",600:"#AA5821",700:"#8C2701",800:"#6F2001",900:"#511901"},instance:[{name:"Arena",code:"arg-arena",description:"",scope:"arg",related_color:"200",parent_group:"ocre",color:"#EAE1B7",variant:[{variant:"light",color:"#FAF8ED",name:"Arena claro",code:"arg-arena-light"},{variant:"dark",color:"#E7BA61",name:"Arena oscuro",code:"arg-arena-dark"},{variant:"half",color:"#F5F0DB",name:"Arena medio tono",code:"arg-arena-half"}],alias:[{code:"arg-arena",exclude:!1}]},{name:"Amarillo",code:"arg-amarillo",description:"Foco o alerta",scope:"arg",related_color:"400",parent_group:"ocre",color:"#E7BA61",variant:[{variant:"light",color:"#EAE1B7",name:"Amarillo claro",code:"arg-amarillo-light"},{variant:"dark",color:"#AA5821",name:"Amarillo oscuro",code:"arg-amarillo-dark"},{variant:"half",color:"#F3DDB0",name:"Amarillo medio tono",code:"arg-amarillo-half"}],alias:[{code:"arg-amarillo",exclude:!1},{code:"warning",exclude:!0},{code:"amarillo",exclude:!0},{code:"amarillo-intenso",exclude:!0}]},{name:"Marrón oscuro",code:"arg-marron-oscuro",description:"",scope:"arg",related_color:"900",parent_group:"ocre",color:"#511901",variant:[],alias:[{code:"arg-marron-oscuro",exclude:!1}]}]},{scope:"arg",name:"Morado",group:"morado",color:{150:"#3A3796"},instance:[{name:"Azul morado",code:"arg-azul-morado",description:"",scope:"arg",related_color:"150",parent_group:"morado",color:"#3A3796",variant:[],alias:[{code:"arg-azul-morado",exclude:!1}]}]}]},{name:"MiArgentina",space:"miarg",hidden_space:!1,description:"",data:[{scope:"miarg",name:"Azul MiArgentina",group:"azul",color:{150:"#3526C3"},instance:[{name:"Azul MiArgentina",code:"miarg-azul",description:"Azul principal para aplicaciones MiArgentina",scope:"miarg",related_color:"150",parent_group:"azul",color:"#3526C3",variant:[{variant:"half",color:"#6B66CC",name:"Azul MiArgentina medio tono",code:"miarg-azul-half"}],alias:[{code:"miarg-azul",exclude:!1}]}]},{scope:"miarg",name:"Celeste MiArgentina",group:"celeste",color:{150:"#2CB9EE"},instance:[{name:"Celeste MiArgentina",code:"miarg-celeste",description:"",scope:"miarg",related_color:"150",parent_group:"celeste",color:"#2CB9EE",variant:[],alias:[{code:"miarg-celeste",exclude:!1}]}]},{scope:"miarg",name:"Amarillo claro MiArgentina",group:"amarillo-claro",color:{150:"#ffe9b8"},instance:[{name:"Amarillo claro MiArgentina",code:"miarg-amarillo-claro",description:"",scope:"miarg",related_color:"150",parent_group:"amarillo-claro",color:"#ffe9b8",variant:[],alias:[{code:"miarg-amarillo-claro",exclude:!1}]}]},{scope:"miarg",name:"Rosa claro MiArgentina",group:"rosa-claro",color:{150:"#EECCCF"},instance:[{name:"Rosa claro MiArgentina",code:"miarg-rosa-claro",description:"",scope:"miarg",related_color:"150",parent_group:"rosa-claro",color:"#EECCCF",variant:[],alias:[{code:"miarg-rosa-claro",exclude:!1}]}]},{scope:"miarg",name:"Verde claro MiArgentina",group:"verde-claro",color:{150:"#CFEEDC"},instance:[{name:"Verde claro MiArgentina",code:"miarg-verde-claro",description:"",scope:"miarg",related_color:"150",parent_group:"verde-claro",color:"#CFEEDC",variant:[],alias:[{code:"miarg-verde-claro",exclude:!1}]}]},{scope:"miarg",name:"Azul oscuro MiArgentina",group:"azul-oscuro",color:{150:"#222C50"},instance:[{name:"Azul oscuro MiArgentina",code:"miarg-oscuro",description:"",scope:"miarg",related_color:"150",parent_group:"azul-oscuro",color:"#222C50",variant:[],alias:[{code:"miarg-oscuro",exclude:!1}]}]},{scope:"miarg",name:"Gris MiArgentina",group:"gris",color:{150:"#7E848E"},instance:[{name:"Gris MiArgentina",code:"miarg-gris",description:"",scope:"miarg",related_color:"150",parent_group:"gris",color:"#7E848E",variant:[],alias:[{code:"miarg-gris",exclude:!1}]}]},{scope:"miarg",name:"Celeste claro MiArgentina",group:"celeste-claro",color:{150:"#BEE6F6"},instance:[{name:"Celeste claro MiArgentina",code:"miarg-celeste-claro",description:"",scope:"miarg",related_color:"150",parent_group:"celeste-claro",color:"#BEE6F6",variant:[],alias:[{code:"miarg-celeste-claro",exclude:!1}]}]}]},{name:"Colores de la bandera de la República Argentina",space:"bandera",hidden_space:!1,description:'De acuerdo al <a href="https://www.argentina.gob.ar/normativa/nacional/decreto-1650-2010-175328">Decreto 1650/2010</a>, que establece las medidas, características de la tela, colores y accesorios de la Bandera Argentina.',data:[{scope:"bandera",name:"Amarillo",group:"amarillo",color:{150:"#FCBF49"},instance:[{name:"Amarillo Bandera",code:"bandera-amarillo",description:"Color amarillo oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"amarillo",color:"#FCBF49",variant:[],alias:[{code:"bandera-amarillo",exclude:!1}]}]},{scope:"bandera",name:"Celeste",group:"celeste",color:{150:"#75AADB"},instance:[{name:"Celeste Bandera",code:"bandera-celeste",description:"Color celeste oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"celeste",color:"#75AADB",variant:[],alias:[{code:"bandera-celeste",exclude:!1}]}]},{scope:"bandera",name:"Marrón",group:"marron",color:{150:"#843511"},instance:[{name:"Marrón Bandera",code:"bandera-marron",description:"Color marrón oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"marron",color:"#843511",variant:[],alias:[{code:"bandera-marron",exclude:!1}]}]}]},{name:"Gendarmería Nacional",space:"gna",hidden_space:!1,description:"",data:[{scope:"gna",name:"Verde jade",group:"verde-jade",color:{150:"#006666"},instance:[{name:"Verde oscuro Gendarmería",code:"gna-verde-jade",description:"",scope:"gna",related_color:"150",parent_group:"verde-jade",color:"#006666",variant:[],alias:[{code:"gna-verde-jade",exclude:!1},{code:"verde-jade",exclude:!0},{code:"verdejade",exclude:!0}]}]},{scope:"gna",name:"Verde aloe",group:"verde-aloe",color:{150:"#4FBB73"},instance:[{name:"Verde claro Gendarmería",code:"gna-verde-aloe",description:"",scope:"gna",related_color:"150",parent_group:"verde-aloe",color:"#4FBB73",variant:[],alias:[{code:"gna-verde-aloe",exclude:!1},{code:"verde-aloe",exclude:!0}]}]},{scope:"gna",name:"Verde cemento",group:"verde-cemento",color:{150:"#B4BEBA"},instance:[{name:"Gris Gendarmería",code:"gna-verde-cemento",description:"",scope:"gna",related_color:"150",parent_group:"verde-cemento",color:"#B4BEBA",variant:[],alias:[{code:"gna-verde-cemento",exclude:!1},{code:"verde-cemento",exclude:!0},{code:"verdecemento",exclude:!0}]}]}]}];"undefined"!=typeof exports&&(module.exports={ponchoColorDefinitionsList:ponchoColorDefinitionsList});class Color{constructor(e){this.isValidColorDefinitionList(e)&&(this.definitions=e)}replaceSpecialChars=e=>{if("string"!=typeof e||0===e.trim().length)return"";var t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż",a="aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz";let r=t+t.toUpperCase(),o=a+a.toUpperCase();t=new RegExp(r.split("").join("|"),"g");return e.toString().replace(t,e=>o.charAt(r.indexOf(e)))};isValidColorDefinitionList(e){return Array.isArray(e)&&0<e.length&&e[0].hasOwnProperty("space")}get list(){return this.definitions.flatMap(e=>e.data.flatMap(e=>e.instance.map(e=>e)))||[]}findColor=e=>{if("string"!=typeof e||0===e.trim().length)return[];let t=e.toLowerCase();return[...this.variables.map(([e,t])=>[e,t]),...this.colors].filter(function(e){if(e[0].includes(t))return e}).map(([e,t])=>[e,t])};get variables(){let n=[];return this.list.flatMap(e=>{let{alias:t,color:a,description:r,code:o,variant:i=[],name:s}=e;t.forEach(function(t){n.push([t.code,a,r,o,s]),i.forEach(function(e){t.exclude||n.push([t.code+"-"+e.variant,e.color,"",o,e.name])})})}),n.sort()}get spaces(){return this.definitions.map(e=>e.space).sort()}groupsBySpace=e=>{if("string"!=typeof e)throw new TypeError("groupsBySpace: El argumetno debe ser un string");let t=e.toLocaleLowerCase();e=this.definitions.find(e=>e.space==t)?.data?.map(e=>e.group);return e?e.sort():[]};ponchoColor=(e,t="hex")=>{var a="#999999";if("string"!=typeof e||""===e.trim())return a;let r=this.replaceSpecialChars(e).toLowerCase();var e=this.variables?.find(e=>e[0]===r)||this.colors?.find(e=>e[0]===r),o=e?e[1]:a;switch(t.trim().toLowerCase()){case"rgb":return this.hexToRgb(o);case"hsl":return this.rgbToHsl(...this.hexToRgb(o));default:return o}};get colors(){return this.definitions.map(e=>e.data).flatMap(function(e){return e.flatMap(function(e){let{color:t,group:a,scope:r}=e;return Object.entries(t).map(function(e){var[e,t]=e;return[`${r}-${a}-`+e,t]})})})||[]}colorDefinitions=e=>{if(null!=typeof e&&e.trim()){let t=this.replaceSpecialChars(e).toLowerCase(),a;for(let e=0;e<=this.definitions.length-1;e+=1){var r=this.definitions[e].data;for(let e=0;e<=r.length-1;e+=1){var o=r[e].instance;for(let e=0;e<=o.length-1;e+=1){var{alias:i,variant:s}=o[e];if(i.some(e=>e.code==t)){a=o[e];break}if(s.some(e=>e.code==t)){a=o[e];break}}if(a)break}}return a}};colorGroup=(o,i)=>{if(null!=typeof i&&i?.trim()){let r;for(let a=0;a<=this.definitions.length-1;a+=1){let{data:e,space:t}=this.definitions[a];if(r=e.find(e=>e.group==i&&t==o))break}return r}};colorSpace=t=>{if(null!=typeof t&&t?.trim())return this.definitions.find(e=>e.space==t)};colorByHex=e=>{if(this.isValidHex(e)){var t=[],a=this.cleanHex(e);for(let e=0;e<=this.definitions.length-1;e+=1){var r,o=this.definitions[e].data;for(r of o){var i,s=r.instance;for(i of s){var n=i.color;this.cleanHex(n)==a&&t.push(i)}}}return t}};cleanHex=e=>{let t=e.toString().replace("#","").trim().toUpperCase();return!(t.length<3||6<t.length)&&"#"+(t=3==t.length?Array.from(t).map(e=>e.repeat(2)).join(""):t)};isValidHex=e=>null!=e&&"string"==typeof e&&!!new RegExp(/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/).test(e);rgbToHsl=(e,t,a)=>{var r=e/255,o=t/255,i=a/255,e=Math.max(r,o,i),t=Math.min(r,o,i),s=e-t,a=(e+t)/2*100;let n=0,l=(0!=s&&(n=s/(1-Math.abs(2*a/100-1))*100),0);if(0!=s)switch(e){case r:l=(o-i)/s%6*60;break;case o:l=60*((i-r)/s+2);break;case i:l=60*((r-o)/s+4)}return l<0&&(l+=360),[Math.round(l),n.toFixed(1)+"%",a.toFixed(1)+"%"]};hexToRgb=e=>{if(this.isValidHex(e))return e=(e=this.cleanHex(e)).startsWith("#")?e.slice(1):e,[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]};colorName=(e,a={})=>{if(void 0!==e&&!(e.length<1)&&(e="string"==typeof e?[e]:e).every(e=>"string"==typeof e)){var r,o="object"==typeof a&&a.hasOwnProperty("switchLastConnector")?a.switchLastConnector:{i:"e",o:"u"},i="object"==typeof a&&a.hasOwnProperty("defaultLastConnector")?a.defaultLastConnector:"y",a="object"==typeof a&&a.hasOwnProperty("listConnector")?a.listConnector:", ";let t=t=>{var e=this.variables.find(e=>e[0]==t);return void 0!==e?e[4]:t};return 1===e.length?t(e.join("")):(r=e.length,r=e.pop(r-1),o=o[Array.from(t(r))[0].toLowerCase()]||i,(e.map(e=>t(e)).join(a)+" "+o+" "+t(r)).toLowerCase())}}}"undefined"!=typeof exports&&(module.exports={Color:Color});let illustrationColors=["arg-azul","arg-arena","arg-amarillo","arg-palta","arg-verde","arg-arandano","arg-rosado","miarg-azul"],headersBackground={solid:["bg-arg-azul","bg-arg-rojo","bg-arg-info","bg-arg-eucalipto","bg-arg-palta","bg-arg-arandano","bg-arg-negro-light"],mixed:["bg-mix-azul-info","bg-mix-info-azul","bg-mix-palta-azul","bg-mix-azul-palta"]},colorVariations={high:["arg-azul","arg-eucalipto","arg-verde","arg-naranja","arg-rojo","arg-arandano","arg-uva","arg-cielo","arg-palta","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-negro"],medium:["arg-info","arg-verde-azulado","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-palta","arg-lima","arg-maiz","arg-gris-intermedio"]};var ponchoColor,color;async function fetch_json(e,a={}){let{useCorsProxy:r=!0,corsProxyUrl:o="",credentials:t="same-origin",...i}=a;a=Object.assign({},{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:t,redirect:"follow"},i);try{var s=await fetch(e,a);if(s.ok)return await s.json();throw new Error("HTTP error! status: "+s.status)}catch(t){if(r&&(t.message.includes("CORS")||t.message.includes("Network")||"TypeError"===t.name))try{var n=""+o+encodeURIComponent(e),l={...a,credentials:"omit"},c=await fetch(n,l);if(c.ok)return await c.json();throw new Error("HTTP error! status: "+c.status)}catch(e){throw new Error("Fetch fallido directo y con proxy. Error original: "+t.message)}throw t}}void 0!==Color&&(color=new Color(ponchoColorDefinitionsList),ponchoColor=color.ponchoColor),"undefined"!=typeof exports&&(module.exports={colorVariations:colorVariations,illustrationColors:illustrationColors,headersBackground:headersBackground,color:color});let charMap=new Map([["à","a"],["á","a"],["â","a"],["ä","a"],["æ","a"],["ã","a"],["å","a"],["ā","a"],["ă","a"],["ą","a"],["ç","c"],["ć","c"],["č","c"],["đ","d"],["ď","d"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ē","e"],["ė","e"],["ę","e"],["ě","e"],["ğ","g"],["ǵ","g"],["ḧ","h"],["î","i"],["ï","i"],["í","i"],["ī","i"],["į","i"],["ì","i"],["ı","i"],["İ","I"],["ł","l"],["ḿ","m"],["ñ","n"],["ń","n"],["ǹ","n"],["ň","n"],["ô","o"],["ö","o"],["ò","o"],["ó","o"],["œ","o"],["ø","o"],["ō","o"],["õ","o"],["ő","o"],["ṕ","p"],["ŕ","r"],["ř","r"],["ß","s"],["ś","s"],["š","s"],["ş","s"],["ș","s"],["ť","t"],["ț","t"],["û","u"],["ü","u"],["ù","u"],["ú","u"],["ū","u"],["ǘ","u"],["ů","u"],["ű","u"],["ų","u"],["ẃ","w"],["ẍ","x"],["ÿ","y"],["ý","y"],["ž","z"],["ź","z"],["ż","z"],["À","A"],["Á","A"],["Â","A"],["Ä","A"],["Æ","A"],["Ã","A"],["Å","A"],["Ā","A"],["Ă","A"],["Ą","A"],["Ç","C"],["Ć","C"],["Č","C"],["Đ","D"],["Ď","D"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ē","E"],["Ė","E"],["Ę","E"],["Ě","E"],["Ğ","G"],["Ǵ","G"],["Ḧ","H"],["Î","I"],["Ï","I"],["Í","I"],["Ī","I"],["Į","I"],["Ì","I"],["Ł","L"],["Ḿ","M"],["Ñ","N"],["Ń","N"],["Ǹ","N"],["Ň","N"],["Ô","O"],["Ö","O"],["Ò","O"],["Ó","O"],["Œ","O"],["Ø","O"],["Ō","O"],["Õ","O"],["Ő","O"],["Ṕ","P"],["Ŕ","R"],["Ř","R"],["Ś","S"],["Š","S"],["Ş","S"],["Ș","S"],["Ť","T"],["Ț","T"],["Û","U"],["Ü","U"],["Ù","U"],["Ú","U"],["Ū","U"],["Ǘ","U"],["Ů","U"],["Ű","U"],["Ų","U"],["Ẃ","W"],["Ẍ","X"],["Ÿ","Y"],["Ý","Y"],["Ž","Z"],["Ź","Z"],["Ż","Z"]]),replaceSpecialChars=e=>"string"!=typeof e||0===e.trim().length?"":e.replace(/[^\u0000-\u007F]/g,e=>charMap.get(e)||e),slugifyMap=new Map([...Array.from(charMap.entries()),["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"]]),slugify=e=>"string"!=typeof e||0===e.trim().length?e:e.toLowerCase().replace(/\s+/g,"-").replace(/[^\u0000-\u007F]/g,e=>slugifyMap.get(e)||e).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,""),toTitleCase=(e,t=!0)=>"string"!=typeof e||0===e.trim().length?e:(e=e.trim(),t?e.replace(/\S+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase()):e[0].toUpperCase()+e.slice(1).toLowerCase()),secureHTML=("undefined"!=typeof exports&&(module.exports={slugify:slugify,replaceSpecialChars:replaceSpecialChars,toTitleCase:toTitleCase}),(r,i=[])=>{if("string"!=typeof r||0===r.trim().length)return r;if(Array.isArray(i)){var s=["div","section","article","aside","header","footer","main","nav","figure","figcaption","details","summary","dialog","p","span","br","hr","pre","code","kbd","samp","var","blockquote","cite","q","abbr","address","time","mark","small","s","del","ins","sub","sup","wbr","strong","b","em","i","u","dfn","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","col","colgroup","a","img","picture","source","audio","video","track","button","progress","meter"];let t=["script","iframe","object","embed","applet","meta","link","style","base","form"],o=["on\\w+","formaction","action","srcdoc","eval"],e=((i=i.some(e=>t.includes(e.toLowerCase()))?i.filter(e=>!t.includes(e.toLowerCase())):i).some(e=>"*"===e)&&(i=s),r),a=(e=i.includes("img")||i.includes("*")&&s.includes("img")?e.replace(/(<img\s[^>]*?src\s*=\s*["'])javascript:[^"']*["']/gi,'$1"').replace(/(<img\s[^>]*?src\s*=\s*)javascript:[^\s>]*/gi,'$1""').replace(/(<img\s[^>]*?src\s*=\s*["'])data:(?!image\/)[^"']*["']/gi,'$1"').replace(/(<img\s[^>]*?src\s*=\s*)data:(?!image\/)[^\s>]*/gi,'$1""'):e).toString().replace(/</g,"&lt;").replace(/>/g,"&gt;");return 0<i.length&&(r=i.map(e=>e.toLowerCase()).join("|"),s=new RegExp("&lt;("+r+")(\\s[^>]*?)?&gt;","gi"),i=new RegExp("&lt;/("+r+")&gt;","gi"),a=a.replace(s,(e,t,a)=>{if(!a)return`<${t}>`;let r=a;return o.forEach(e=>{var t=new RegExp(`\\s${e}\\s*=\\s*["'][^"']*["']`,"gi"),t=(r=r.replace(t,""),new RegExp(`\\s${e}\\s*=\\s*[^\\s"'>]+`,"gi"));r=r.replace(t,"")}),`<${t}${r=(r=(r=(r=r.replace(/href\s*=\s*["']javascript:[^"']*["']/gi,'href="#"')).replace(/href\s*=\s*javascript:[^\s>]*/gi,'href="#"')).replace(/href\s*=\s*["']data:[^"']*["']/gi,'href="#"')).replace(/href\s*=\s*data:[^\s>]*/gi,'href="#"')}>`}).replace(i,"</$1>")),a}}),headStyle=("undefined"!=typeof exports&&(module.exports={secureHTML:secureHTML}),(a,r,o)=>{if("string"==typeof a&&""!==a.trim()||(a="argob-custom-css"),"string"==typeof r&&""!=r.trim()){var e=document.getElementById(a);if(null!==e){if(e.textContent.trim()===r.trim())return;e.remove()}document.querySelectorAll("head").forEach(e=>{var t=document.createElement("style");t.setAttribute("rel","stylesheet"),t.id=a,"string"==typeof o&&""!==o.trim()&&t.setAttribute("media",o),t.textContent=r,e.appendChild(t)})}});function copyToClipboard(t,a){var t="string"==typeof t?document.querySelector(t):t;if(t&&t instanceof HTMLElement){let e=t;e&&(t=e.textContent,navigator.clipboard.writeText(t).then(function(){"function"==typeof a&&a(e)},function(){}))}}function flattenNestedObjects(e){return e.map(e=>flattenObject(e,""))}function flattenObject(e,t){var a,r={};for(a in e){var o=e[a],i=t?t+"__"+a:a;"object"==typeof o&&null!==o?Object.assign(r,flattenObject(o,i)):r[i]=o}return r}function ponchoTable(e){return ponchoTableLegacyPatch(),ponchoTableDependant(e)}"undefined"!=typeof exports&&(module.exports={flattenObject:flattenObject,flattenNestedObjects:flattenNestedObjects}),ponchoTableLegacyPatch=()=>{document.querySelectorAll("select[id=ponchoTableFiltro]").forEach(e=>{var e=e.parentElement,t=document.createElement("div");t.id="ponchoTableFiltro",t.classList.add("row"),e.parentElement.appendChild(t),e.remove()})};class PonchoAgenda{DATE_REGEX=/^([1-9]|0[1-9]|[1-2][0-9]|3[0-1])\/([1-9]|0[1-9]|1[0-2])\/([1-9][0-9]{3})$/;constructor(e={}){e.headers=this._refactorHeaders(e),e.headersOrder=this._refactorHeadersOrder(e),this.opts=Object.assign({},this.defaults,e),this.categoryTitleClassList=this.opts.categoryTitleClassList,this.itemContClassList=this.opts.itemContClassList,this.itemClassList=this.opts.itemClassList,this.groupCategory=this.opts.groupCategory,this.dateSeparator=this.opts.dateSeparator,this.startDateId=this.opts.startDateId,this.endDateId=this.opts.endDateId,this.timeId=this.opts.timeId,this.descriptionId=this.opts.descriptionId,this.criteriaOneId=this.opts.criteriaOneId,this.criteriaTwoId=this.opts.criteriaTwoId,this.criteriaThreeId=this.opts.criteriaThreeId}defaults={allowedTags:["strong","span","dl","dt","dd","img","em","button","button","p","div","h3","ul","li","time","a","h1"],criteriaOneId:"destinatarios",criteriaThreeId:"destacado",criteriaTwoId:"url",descriptionId:"descripcion",categoryTitleClassList:["h6","text-secondary"],itemContClassList:["list-unstyled"],itemClassList:["m-b-2"],dateSeparator:"/",filterStatus:{header:"Estado",nextDates:"Próximas",pastDates:"Anteriores"},endDateId:"hasta",groupCategory:"filtro-ministerio",rangeLabel:"Fechas",startDateId:"desde",timeId:"horario"};_refactorHeadersOrder=e=>{if(e.hasOwnProperty("headersOrder")&&0<e.headersOrder.length){var t,a=e.headersOrder;for(t of["range","filtro-status"])e.headersOrder.includes(t)||e.headersOrder.push(t);return a}return[]};_header=e=>this.opts.headers.hasOwnProperty(e)?this.opts.headers[e]:e;_refactorHeaders=e=>{let t=this.defaults.filterStatus.header,a=(e?.filterStatus?.header&&(t=e.filterStatus.header),this.defaults.rangeLabel);return{range:a=e?.rangeLabel?e.rangeLabel:a,...e.headers,"filtro-status":t}};_isMarkdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_markdownOptions=()=>this._isMarkdownEnable()&&this.opts.hasOwnProperty("markdownOptions")&&"object"==typeof this.opts.markdownOptions?this.opts.markdownOptions:{};_markdownConverter=e=>this._isMarkdownEnable()?new showdown.Converter(this._markdownOptions()).makeHtml(e):e;_isPastDate=e=>!!this._isValidDateFormat(e)&&this._dateParser(e).date.getTime()<this._currentDate().date.getTime();_dateTimeFormat=(e,t=!1)=>{var{day:e,month:a,year:r}=e;let o="";return[e,a,r].join(this.dateSeparator)+(o=t?[hours,minutes].join(":"):o)};_currentDate=()=>{var e=new Date,t=e.getFullYear(),a=e.getMonth()+1,e=e.getDate(),e=[this._pad(e),this._pad(a),t].join(this.dateSeparator);return{...this._dateParser(e),format:e}};_pad=(e,t=2)=>e.toString().padStart(t,"0");_dateParser=(e,t="00:00:00")=>{var a,r;if(this._isValidDateFormat(e))return[,e,a,r]=this.DATE_REGEX.exec(e),t=new Date(r+`-${a}-${e} `+t),{day:this._pad(e),month:this._pad(a),year:r,hours:this._pad(t.getHours()),minutes:this._pad(t.getMinutes()),date:t}};_isValidDateFormat=e=>null!==this.DATE_REGEX.exec(e);_groupByFingerprintAndCategory=e=>{var t,a={};for(t of e){var r=t[this.groupCategory],o=t.fingerprint;a[o]||(a[o]={}),a[o][r]||(a[o][r]=[]),a[o][r].push(t)}return a};_refactorEntries=e=>{let d=[];return e.forEach(e=>{var t=e[this.startDateId];let a=e[this.endDateId];a=""===a.trim()?t:a;var{pastDates:r,nextDates:o}=this.opts.filterStatus,r=this._isPastDate(a)?r:o,o=this._dateParser(t),i=this._dateParser(a),s=o.date.getTime(),n=i.date.getTime(),l=[s,n].join("_");let c=this._dateTimeFormat(o);s!=n&&(c=`Del ${this._dateTimeFormat(o)} al `+this._dateTimeFormat(i));s={...e,range:c,"filtro-status":r,fingerprint:l,desde:t,hasta:a};d.push(s)}),d};itemTemplate=(e,t,a,r,o,i)=>{let s=document.createElement("dl"),n;return i?(o=this._dateParser(o,i),(n=document.createElement("time")).setAttribute("datetime",o.date.toISOString()),n.textContent=o.hours+":"+o.minutes+"hs."):(n=document.createElement("span")).textContent="--:--",[["Descripción",this._markdownConverter(e),!0,!0,"description"],[this._header(this.criteriaOneId),this._markdownConverter(t),!1,!0,"criteria-one"],[this._header(this.criteriaThreeId),this._markdownConverter(r),!1,!0,"criteria-three"],[this._header(this.criteriaTwoId),this._markdownConverter(a),!1,!0,"criteria-two"],[this._header(this.timeId),n.outerHTML,!1,!0,"time"]].forEach(e=>{var t,[e,a,r,o,i]=e;a&&((t=document.createElement("dt")).textContent=e,t.classList.add("agenda-item__dt","agenda-item__dt-"+i),r&&t.classList.add("sr-only"),(e=document.createElement("dd")).textContent=a,e.classList.add("agenda-item__dd","agenda-item__dd-"+i),o&&s.appendChild(t),s.appendChild(e))}),this.itemClassList.some(e=>e)&&s.classList.add("agenda-item",...this.itemClassList),s};_groupedEntries=e=>{let i=[];return Object.values(e).forEach(e=>{var o;Object.values(e).forEach(e=>{var t="",a="";let r=document.createElement("div");this.itemContClassList.some(e=>e)&&r.classList.add(...this.itemContClassList),e.forEach(e=>{a!=(o=e)[this.groupCategory]&&(a=o[this.groupCategory],t=document.createElement("p"),this.categoryTitleClassList.some(e=>e))&&(t.classList.add(...this.categoryTitleClassList),t.textContent=a,r.appendChild(t));var t=this.itemTemplate(e.descripcion,e.destinatarios,e.url,e.destacados,e.desde,e.horario);r.appendChild(t)}),t+=r.outerHTML,delete o.fingerprint;e={};e[this.descriptionId]=t,i.push({...o,...e})})}),i};_ponchoTableExists=()=>void 0!==ponchoTable;render=()=>{var e;this.opts.hasOwnProperty("jsonData")&&(e=this._refactorEntries(this.opts.jsonData),e=this._groupByFingerprintAndCategory(e),this.opts.jsonData=this._groupedEntries(e),this._ponchoTableExists())&&ponchoTable(this.opts)}}"undefined"!=typeof exports&&(module.exports=PonchoAgenda);let ponchoTableDependant=p=>{var g,_=[],h=!(!p.hasOwnProperty("wizard")||!p.wizard),l=p.hasOwnProperty("emptyLabel")&&p.emptyLabel?p.emptyLabel:"Todos",f={},o=!(!p.hasOwnProperty("orderFilter")||!p.orderFilter)&&p.orderFilter,a=!p.hasOwnProperty("resetValues")||"boolean"!=typeof p.resetValues||p.resetValues,c={},d=["*"],n=!(!p.hasOwnProperty("pushState")||1!=p.pushState),u=!(!p.hasOwnProperty("copyResults")||1!=p.copyResults),m=!1;(p.hasOwnProperty("urlParams")&&1==p.urlParams||1==u||1==n)&&(m=!0);let e={tables:!0,simpleLineBreaks:!0,extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"]},s=(document.querySelector("#ponchoTable").classList.add("state-loading"),jQuery.fn.DataTable.isDataTable("#ponchoTable")&&jQuery("#ponchoTable").DataTable().destroy(),(e,t)=>e.toString().localeCompare(t.toString(),"es",{numeric:!0})),y=e=>Array.isArray(e)?e.reduce((e,t)=>{var[t,a="asc"]=Array.isArray(t)?t:[t,"asc"],a=a.toLowerCase();return e[["asc","desc"].includes(a)?a:"asc"].push(t),e},{asc:[],desc:[]}):{asc:[],desc:[]},b=(e,t)=>{var a,r;if("string"==typeof t&&Array.isArray(e))return"boolean"==typeof o&&o||({asc:a,desc:r}=y(o),Array.isArray(o)&&a.includes(t))?e.sort(s):r.includes(t)?e.sort(s).reverse():e},v=e=>[...new Set(e)],E=(e=0,t,a,r=!1)=>{var o=document.createElement("option");return o.value=a.toString().trim(),o.dataset.column=e,o.textContent=t.toString().trim(),r&&o.setAttribute("selected","selected"),o},C=(e="")=>e.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x=e=>e<=0?0:e,S=()=>[...document.querySelectorAll("[data-filter]")].map(e=>e.value),w=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter")),q=()=>r().extensions.every(e=>{try{return showdown.extension(e),!0}catch(e){return!1}}),r=()=>p.hasOwnProperty("markdownOptions")&&"object"===p.markdownOptions?p.markdownOptions:e,P=t=>{if("string"==typeof t){if(!w())return t;let e;return q()?(e=new showdown.Converter(r())).makeHtml(t):(e=new showdown.Converter).makeHtml(t)}},z=(e,t,a=!1)=>{let r=a?": "+a:"";r=r.replaceAll("*","");a=document.createElement("a");return a.classList.add("btn","btn-primary","btn-sm","margin-btn"),a.href=t,a.target="_blank",a.innerHTML=`${e}<span class="sr-only">${r} (Abre en una nueva ventana)</span>`,a.setAttribute("rel","noopener noreferrer"),a.outerHTML},H=e=>{var t=e.split("/"),t=new Date(t[2],t[1]-1,t[0]).toISOString().split("T")[0],a=document.createElement("span"),r=(a.style.display="none",a.textContent=t,document.createElement("time"));return r.setAttribute("datetime",t),r.textContent=e,a.outerHTML+r.outerHTML},N=(t,a,r,o)=>[...Array(x(t+1)).keys()].map(e=>a[_[x(t-1)]]==o[x(t-1)]&&a[_[x(t)]]==r||""==o[x(t-1)]).every(e=>e),R=(e,t,a)=>{if(!g?.entries?.length)return[];var e=x(e),r=x(t),o=j(t,f),i=""===a,s=_[e],n=_[r];let l;if(o&&!(l=T(t,f).map(e=>k(e))).length)return[];var c,d=new Set;for(c of g.entries)if(i||c[s]===a){var p=c[n];if(p)if(o){var h,u=k(p);for(h of l)if(u.includes(h)){d.add(p);break}}else d.add(p)}return 0===d.size?[]:b(Array.from(d),n)},k=e=>replaceSpecialChars(e.toLowerCase()),V=(e,t,a)=>{if(!g?.entries?.length)return[];var t=t===_.length?t-1:t,r=S(),o=x(t-1),i=x(t),s=j(t,f),n=_[o],l=_[i],o=_[t];let c;if(s&&!(c=T(t,f).map(e=>k(e))).length)return[];var d,p=new Set;for(d of g.entries)if(d[n]===a&&N(e,d,a,r)){var h=d[l];if(h)if(s){var u,m=k(h);for(u of c)if(m.includes(u)){p.add(h);break}}else p.add(h)}return 0===p.size?[]:b(Array.from(p),o)},t=null,A=()=>t=null===t?Object.keys(f):t,L=e=>"filtro-"+A()[e],j=e=>{e=L(e);return c.hasOwnProperty(e)},T=e=>{e=L(e);return c.hasOwnProperty(e)?c[e]:[]},G=(t,a)=>{var r=A(),i=S(),e=r.length;for(let o=t+1;o<e;o++){let e=V(t,o,a);0===e.length&&(e=R(t,o,a));var s=document.querySelector("#"+r[o]);if(s){let a=document.createDocumentFragment(),r=(a.appendChild(E(o,l,"",!0)),i[o]);e.forEach(e=>{var t;e.trim()&&(t=r===e,a.appendChild(E(o,e,e,t)))}),s.innerHTML="",s.appendChild(a)}}},O=(e,t)=>{t&&(e=document.getElementById(e))&&(e.removeAttribute("class"),t=Array.isArray(t)?t:[t],e.classList.add(...t))},$=()=>window.location.hash.replace("#","")||!1;function F(e,a,r){document.querySelectorAll("#"+e).forEach(t=>{setTimeout(function(){t.value=a;var e=new Event(r);t.dispatchEvent(e)},50)})}function U(){if(a){try{document.querySelectorAll("#poncho-table-reset-form").forEach(e=>e.remove())}catch(e){}var e,t=document.querySelector("#ponchoTable_info");t&&((e=document.createElement("a")).id="poncho-table-reset-form",e.href="#",e.textContent="Restablecer",e.setAttribute("aria-label","Restablecer resultados de la tabla"),e.classList.add("js-pt-reset-form"),e.addEventListener("click",e=>{e.preventDefault();var t,e=_.map(e=>e.replace("filtro-",""));document.querySelectorAll("#ponchoTableSearch").forEach(function(e){F("ponchoTableSearch",e.value="","keyup")});for(t of e)document.querySelectorAll("#"+t).forEach(function(e){e.selectedIndex=0}),F(t,"","change")}),(t=t.parentElement).classList.add("ponchotable-share"),t.appendChild(e))}}function I(){if(m){let r=new URL(window.location.pathname,window.location.origin);var e=[..._.map(e=>e.replace("filtro-","")),"ponchoTableSearch"].map(function(e){var t=document.getElementById(e);return t?[e,t.value]:[]});if(e.some(e=>0<e.length)){if(e.some(e=>0<e[1].length)){if(u){try{document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove())}catch(e){}var t=document.createElement("div"),a=(t.classList.add("dropdown"),t.id="ponchoTableShareButton",document.createElement("button")),o=(a.classList.add("btn","btn-sm","btn-default","dropdown-toggle"),a.setAttribute("type","button"),a.setAttribute("id","share-table-data"),a.setAttribute("data-toggle","dropdown"),a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"),a.textContent="Compartir resultados",document.createElement("span")),o=(o.classList.add("caret"),a.appendChild(document.createTextNode(" ")),a.appendChild(o),document.createElement("div")),i=(o.classList.add("dropdown-menu","p-y-1","p-x-1"),o.setAttribute("aria-labelledby","share-table-data"),document.createElement("p")),s=(i.classList.add("js-sharelink-tag","m-b-0","small"),i.setAttribute("id","foo"),document.createElement("a")),i=(s.setAttribute("href","#"),s.setAttribute("data-toclipboard","foo"),s.classList.add("small","btn","btn-sm","btn-default","m-b-0","m-t-1"),s.textContent="Copiar al portapapeles",o.appendChild(i),o.appendChild(s),t.appendChild(a),t.appendChild(o),document.querySelector("#ponchoTable_info")),s=i.parentElement;s.classList.add("ponchotable-share"),s.appendChild(t),"function"==typeof copyToClipboard&&document.querySelectorAll("[data-toclipboard]").forEach(e=>{let t=e.dataset.toclipboard;e.addEventListener("click",e=>{e.preventDefault(),copyToClipboard("#"+t)})})}}else document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove());e.forEach(e=>{var[e,t]=e,e="ponchoTableSearch"==e?"buscar":e;""!=t.trim()&&r.searchParams.append(e,t)}),document.querySelectorAll(".js-sharelink-tag").forEach(function(e){e.innerHTML="";var t=e.dataset.label,a=document.createElement("a"),t=(a.href=r.href,t||r.href);a.textContent=t,e.appendChild(a)}),document.querySelectorAll(".js-sharelink-text").forEach(function(e){var t=e.dataset.attr;t?e.setAttribute(t,r.href):e.innerHTML=r.href}),a=r.href,n&&window.history.pushState({},"",a)}}}_hideTable=(e=!0)=>{let t=e?"none":"block",a=e?"block":"none";document.querySelectorAll('[data-visible-as-table="true"],#ponchoTable_wrapper').forEach(e=>e.style.display=t),document.querySelectorAll('[data-visible-as-table="false"]').forEach(e=>e.style.display=a)},_responsiveType=function(e){if("string"==typeof e){e=e.toLowerCase();if(["none","column","inline"].includes(e))return e}},_responsiveColumns=function(e){if(Array.isArray(e)&&e.every(e=>"number"==typeof e)){var e=[...new Set(e)],t=e.indexOf(0);-1!==t&&e.splice(t,1);if(!(e.length<1))return e}},_responsiveCols=function(e,t,a="none"){return(e=_responsiveColumns(e))?{className:_responsiveType(a),orderable:"boolean"==typeof t&&t,targets:e}:{}};let Q=()=>{var e,t,a,r=jQuery.fn.DataTable.ext.type.search,r=(r.string=e=>e?"string"==typeof e?replaceSpecialChars(e):e:"",{initComplete:(e,t)=>{h&&_hideTable()},lengthChange:!(r.html=e=>e?"string"==typeof e?replaceSpecialChars(e.replace(/<.*?>/g,"")):e:""),autoWidth:!1,pageLength:p.cantidadItems,columnDefs:[{type:"html-num",targets:p.tipoNumero},{targets:p.ocultarColumnas,visible:!1}],ordering:p.orden,order:[[p.ordenColumna-1,p.ordenTipo]],dom:'<"row"<"col-sm-6"l><"col-sm-6"f>><"row"<"col-sm-12"i>><"row"<"col-sm-12"tr>><"row"<"col-md-offset-3 col-md-6 col-sm-offset-2 col-sm-8"p>>',language:{sProcessing:"Procesando...",sLengthMenu:"Mostrar _MENU_ registros",sZeroRecords:"No se encontraron resultados",sEmptyTable:"Ningún dato disponible en esta tabla",sInfo:"_TOTAL_ resultados",sInfoEmpty:"No hay resultados",sInfoFiltered:"",sInfoPostFix:"",sSearch:"Buscar:",sUrl:"",sInfoThousands:".",sLoadingRecords:"Cargando...",oPaginate:{sFirst:"<<",sLast:">>",sNext:">",sPrevious:"<"},oAria:{sSortAscending:": Activar para ordenar la columna de manera ascendente",sSortDescending:": Activar para ordenar la columna de manera descendente",paginate:{first:"Ir a la primera página",previous:"Ir a la página anterior",next:"Ir a la página siguiente",last:"Ir a la última página"}}}});void 0!==p.columnsWidth&&p.columnsWidth&&(r.columnDefs=r.columnDefs.concat((e=>{if(!Array.isArray(e))return[];let a=/(?<value>[0-9]+)(?<measure>\%|px|em|rem|pt)/;return e.map(e=>{var[e=!1,t=!1]=e;if(a.test(e))return"number"!=typeof t?{width:e}:{width:e,targets:t}}).filter(e=>e)})(p.columnsWidth))),void 0!==p.responsiveDetailsColumns&&0<p.responsiveDetailsColumns.length&&(o=_responsiveCols(p.responsiveDetailsColumns,p.responsiveDetailsOrderable,p.responsiveDetailsType),e=p.responsivePriorities,e=Array.isArray(e)?e.map(e=>{var[e=!1,t=!1]=e;if("number"==typeof e)return"number"!=typeof t?{responsivePriority:e}:{responsivePriority:e,targets:t}}).filter(e=>e):[],r.columnDefs=r.columnDefs.concat(o,e),r.responsive=!0);let n=jQuery("#ponchoTable").DataTable(r),l=(jQuery("#ponchoTableSearch").keyup(function(){n.search(jQuery.fn.DataTable.ext.type.search.string(this.value)).draw(),I()}),jQuery("#ponchoTable_filter").parent().parent().remove(),1<document.querySelectorAll("#ponchoTableFiltro option").length&&(document.querySelector("#ponchoTableFiltroCont").style.display="block"),e=>{e=document.querySelectorAll(e+" option");return Object.values(e).map(e=>e.value).some(e=>e)});if(jQuery("select[data-filter]").change(function(){var e=jQuery(this).find("option:selected").data("column"),t=jQuery(this).find("option:selected").val();G(e,t),n.columns().search("").columns().search("").draw();let i=Object.keys(f),s=S();s.forEach((e,t)=>{a=i[t];var a=Object.keys(g.headers).indexOf("filtro-"+a),r=C(s[t]),o=C(replaceSpecialChars(s[t]));j(t,f)?n.columns(a).search(k(s[t])):n.columns(a).search(s[t]?`^(${r}|${o})$`:"",!0,!1,!0)}),n.draw(),window.addEventListener("popstate",e=>{}),h&&((o,i=0,s="")=>{let n=!1;o.forEach((e,t)=>{var a=l("#"+e);let r="none";a&&s&&t<=i+1?r="block":a&&!s&&t<=i+1&&(document.querySelectorAll("#"+o[i+1]).forEach(e=>e.innerHTML=""),r="block",n=!1),document.querySelectorAll(`[data-filter-name="${e}"]`).forEach(e=>e.style.display=r)}),(n=l("#"+o[i])&&s&&!l("#"+o[i+1])?!0:n)?_hideTable(!1):_hideTable()})(i,e,t),I()}),p.hasOwnProperty("hash")&&p.hash){var o=$();let t=o?decodeURIComponent(o):"";document.querySelectorAll("#ponchoTableSearch").forEach(e=>{e.value=t,n.search(jQuery.fn.DataTable.ext.type.search.string(t)).draw()})}if(m){var i,s=new URLSearchParams(window.location.search);for(i of s.keys()){var c=s.get(i),d=(t=_,a=i,d=void 0,null!==(d=new RegExp("filter(?<index>(?:[1-9][0-9]|[1-9]))","").exec(a))&&void 0!==(t=t.map(e=>e.replace("filtro-",""))[d.groups.index-1])?t:a);if(""==c.trim())return;"buscar"==i?F("ponchoTableSearch",c,"keyup"):F(d,c,"change")}}},M=e=>{var n;(g=e).entries="function"==typeof p.refactorEntries&&null!==p.refactorEntries?p.refactorEntries(g.entries):g.entries,g.headers=(p.hasOwnProperty("headers")&&p.headers?p:g).headers,g.headers=(e=>{if(p.hasOwnProperty("headersOrder")&&0<p.headersOrder.length){var t={};for(i of p.headersOrder)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}return e})(g.headers,p.headersOrder),_=Object.keys(g.headers).filter(e=>e.startsWith("filtro-")),c=p.asFilter?p.asFilter(g.entries):{},f=((o,i)=>{let s={};return i.forEach((t,a)=>{let e=[];e=c.hasOwnProperty(i[a])?c[i[a]]:o.entries.map(e=>e[t]);var r=b(v(e),t);t=t.replace("filtro-",""),s[t]=[],r.forEach(e=>{s[t].push({columna:a,value:e})})}),s})(g,_),O("ponchoTableFiltroCont",p.filterContClassList),O("ponchoTableSearchCont",p.searchContClassList),(s=>{var e=document.querySelector("#ponchoTable thead");e.innerHTML="";let r=document.createElement("tr");Object.keys(s.headers).forEach((e,t)=>{var a=document.createElement("th");a.textContent=s.headers[e],a.setAttribute("scope","col"),r.appendChild(a)}),e.appendChild(r);e=document.querySelector("#ponchoTable caption");e.innerHTML="",e.textContent=p.tituloTabla;let a=document.querySelector("#ponchoTable tbody");a.innerHTML="",s.entries.forEach((i,e)=>{if(Object.values(i).some(e=>String(e).trim())){i="function"==typeof p.customEntry&&null!==p.customEntry?p.customEntry(i):i;let t=a.insertRow();t.id="id_"+e,Object.keys(s.headers).forEach(a=>{let r=i[a];if(a.startsWith("btn-")&&""!=r){let e=!1,t="";var o=a.split("-").slice(-1),o=(s.headers.hasOwnProperty(o)&&(e=i[o],t="-"+o),a.replace("btn-","").replace(t,"").replaceAll("-"," "));r=z(o,r,e)}else a.startsWith("fecha-")&&""!=r&&(r=H(r));o=t.insertCell();o.dataset.title=s.headers[a],""==r&&(o.className="hidden-xs");let e=p.hasOwnProperty("allowedTags")?p.allowedTags:d;a.startsWith("btn-")&&""!=r?e=[...e,"a","span"]:a.startsWith("fecha-")&&""!=r&&(e=[...e,"span","time"]);a=secureHTML(r,e);w()?o.innerHTML=P(a):o.innerHTML=a})}})})(g),n=g,document.querySelectorAll("#ponchoTableFiltro").forEach(e=>e.innerHTML=""),Object.keys(f).forEach((e,t)=>{let a=f[e][0].columna||0;var r=f[e].map(e=>e.value),r=b(r,e),o=document.createElement("div"),i=(p.hasOwnProperty("filterClassList")?(i="string"==typeof p.filterClassList?p.filterClassList.split(" "):p.filterClassList,o.classList.add(...i)):(i=Math.floor(12/Object.keys(f).length),o.classList.add("col-sm-12","col-md-"+i)),o.dataset.index=t,o.dataset.filterName=e,h&&0<t&&(o.style.display="none"),document.createElement("div")),t=(i.className="form-group",document.createElement("label"));t.setAttribute("for",e),t.textContent=n.headers["filtro-"+e];let s=document.createElement("select");s.classList.add("form-control"),s.dataset.filter=1,s.name=e,s.id=e,s.appendChild(E(a,l,"",!0)),r.forEach(e=>{e&&s.appendChild(E(a,e,e,!1))}),i.appendChild(t),i.appendChild(s),o.appendChild(i),document.querySelector("#ponchoTableFiltro").appendChild(o)}),document.querySelector("#ponchoTableSearchCont").style.display="block",document.querySelector("#ponchoTable").classList.remove("state-loading"),Q(),I(),U(),setTimeout(()=>{document.querySelectorAll('[id^="dt-search-"], #ponchoTable_filter').forEach(e=>{e.closest(".row").remove()})},300)},D=e=>{jQuery.getJSON(e,function(e){var t=new GapiSheetData;g=t.json_data(e),M(g)})};if(p.jsonData){var B=Object.fromEntries(Object.keys(p.jsonData[0]).map(e=>[e,e])),B={entries:p.jsonData,headers:B};M(B)}else if(p.jsonUrl)D(p.jsonUrl);else if(p.hojaNombre&&p.idSpread){B=(new GapiSheetData).url(p.hojaNombre,p.idSpread);D(B)}else{if(!p.hojaNumero||!p.idSpread)throw"¡Error! No hay datos suficientes para crear la tabla.";(t=>{let a=new GapiSheetData;var e=["https://sheets.googleapis.com/v4/spreadsheets/",p.idSpread,"/?alt=json&key=",a.gapi_key].join("");jQuery.getJSON(e,function(e){e=e.sheets[t-1].properties.title,e=a.url(e,p.idSpread);D(e)})})(p.hojaNumero)}};var content_popover=document.getElementById("content-popover");function popshow(){content_popover.classList.toggle("hidden")}function pophidde(){content_popover.classList.add("hidden")}var ponchoUbicacion=function(e){var a,r,o,i,s,n,t="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geoprovincias.json",l="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geomunicipios.json",c="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geolocalidades.json",d=jQuery('input[name="submitted['+e.provincia+']"]'),p=jQuery('input[name="submitted['+e.municipio+']"]'),h=jQuery('input[name="submitted['+e.localidad+']"]');function u(e,t,a,r=!1,o=!1,i=!1){var s=jQuery("<select></select>").attr("id",t).attr("name",e).addClass("form-control form-select").prop("required",r);return o&&s.append("<option value=''>Seleccione una opción</option>"),jQuery.each(a,function(e,t){let a="";i==t.nombre&&(a=' selected="selected"');var r=t.label||t.nombre;s.append(`<option value="${t.id}"${a}>${r}</option>`)}),s}function m(e,t){var a=p.prop("required");return d.val()?u("sMunicipios","sMunicipios",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption=!1,p.val()):u("sMunicipios","sMunicipios",[],a,!0,!1)}function g(e,t){var a=h.prop("required");return d.val()?u("sLocalidades","sLocalidades",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption,h.val()):u("sLocalidades","sLocalidades",[],a,!0,!1)}t=e.urlProvincias||t,l=e.urlMunicipios||l,c=e.urlLocalidades||c,jQuery.getJSON(t,function(e){var t;a=[],e.provincias.forEach(function(e,t){a.push(e)}),e=[],e=(t=a).sort(function(e,t){e=e.nombre.toUpperCase(),t=t.nombre.toUpperCase();return e.localeCompare(t)}),t=d.prop("required"),(i=u("sProvincias","sProvincias",e,t,!0,d.val())).on("change",function(e){var t;d.val(""),p.val(""),h.val(""),s.children("option:not(:first)").remove(),n.children("option:not(:first)").remove(),""!=i.val()&&(p.val(s.find(":selected").text()),d.val(i.find(":selected").text()),t=m(r,i.val()).find("option"),s.append(t),s.val(""),t=g(o,i.val()).find("option"),n.append(t),n.val(""))}),d.after(i),jQuery(i).select2()}),jQuery.getJSON(l,function(e){r=e.municipios.map(e=>({...e,label:e.nombre_completo})),(s=m(r,i.val())).on("change",function(e){p.val(""),""!=s.val()&&p.val(s.find(":selected").text())}),p.after(s),jQuery(s).select2()}),jQuery.getJSON(c,function(e){o=(e=>{let a=new Map;return e.localidades.filter(e=>{var t=e.provincia.id,e=e.departamento.nombre+" - "+e.nombre,t=(a.has(t)||a.set(t,new Set),a.get(t));return!t.has(e)&&(t.add(e),!0)}).map(e=>({...e,label:e.departamento.nombre+" - "+e.nombre}))})(e),(n=g(o,i.val())).on("change",function(e){h.val(""),""!=n.val()&&h.val(n.find(":selected").text())}),h.after(n),jQuery(n).select2()}),d.hide(),p.hide(),h.hide()};function ponchoChart(t){var e;function _e(e){var t={Line:"line",Bar:"bar",Pie:"pie",Area:"line","Horizontal Bar":"horizontalBar","Stacked Bar":"bar",Mixed:"mixed",HeatMap:"heatmap",default:""};return t[e]||t.default}function fe(e){var e=e.toString().replace(".",","),t=e.split(","),a=new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(t[0]);return e=1<t.length?a.concat(",",t[1].substr(0,2)):a}function a(e,r){var B,t,a,q,o,i,P,z,H,s,n,N,R,l,c,V,G,$,d,p,U,h,Q,u,W,m,g=[],_=[],f=[],J=[],y=[],b=[],v=[],E=[],C=0,x="",Z=[],S=0,w=[],Y=[],X=0,k=r.posicionLeyendas||"top",A="",A=void 0===r.mostrarLeyendas||r.mostrarLeyendas,L="",L=void 0===r.mostrarTotalStacked||r.mostrarTotalStacked,j=_e(r.tipoGrafico),T=e.values;if(jQuery.each(Object.keys(T[0]),function(e,t){var a;"eje-y"==T[0][e].substr(0,5)?(a=(a=T[0][e].split("-"))[0]+a[1],_.push(a),f.push(e)):"nombre-corto"==T[0][e]&&"heatmap"==j&&(X=e)}),jQuery.each(T,function(i,e){var r;0==i&&jQuery.each(f,function(e,t){var a,r,o=/(?<axis>eje-(x|y(?:[1-9]|[1-9][0-9])))-(?<color>[\w-]*?)(?:-(?<type>linea|barra))?$/.exec(T[i][f[e]]);o&&(a=o.groups.type,r=o.groups.axis.replace("-",""),v[r]=[],J.push(o.groups.color),"mixed"==j)&&(a&&("barra"==a||"linea"==a)?Z.push(a):(0==e&&Z.push("barra"),1==e&&Z.push("linea")))}),1==i&&jQuery.each(f,function(e,t){"pie"==j||"heatmap"==j?g.push(T[i][f[e]]):(b.push(T[i][f[e]]),C+=1)}),1<i&&(r=!1,jQuery.each(f,function(e,t){var a=T[0][f[e]].split("-"),a=a[0]+a[1];"pie"==j?v[a].push(T[i][f[e]]):"heatmap"==j?(0==r&&(b.push(T[i][0]),r=!0,C+=1),e!=X&&v[a].push(T[i][f[e]]),e+2==X&&(void 0===T[i][e+2]?Y.push("*"):Y.push(T[i][e+2]))):(0==r&&(g.push(T[i][0]),r=!0),v[a].push(T[i][f[e]]))}))}),"pie"==j?(B=[],jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&B.push(v[e])}),E=B):1==C&&jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(E=v[e])}),"mixed"==j&&0<(t=r.porcentajesMixed||"").length&&(w=t.split(",")),x=1==r.porcentajes?"line"==j&&1<C?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}},mode:"index",intersect:!1}:"pie"==j?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a+"%"}}}:"Stacked Bar"==r.tipoGrafico?1==L?{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:"line"==j&&1<C?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}},mode:"index",intersect:!1}:"pie"==j?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a}}}:"Stacked Bar"==r.tipoGrafico&&1<C?1==L?{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)}}}:{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}},"pie"==j&&(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),t=g,L=E,H=j,s=y,a=r.idComponenteGrafico,N=k,R=x,n=A,a=document.getElementById(a),new Chart(a,{type:H,data:{labels:t,datasets:[{data:L,borderColor:s,backgroundColor:s,borderWidth:2}]},options:{legend:{display:n,position:N},responsive:!0,tooltips:R}})),1==C&&(a=ponchoColor(J[0]),"Line"==r.tipoGrafico&&(H=g,L=E,s=j,n=a,N=b[0],R=r.ejeYenCero,l=r.idComponenteGrafico,c=k,V=x,G=A,l=document.getElementById(l),new Chart(l,{type:s,data:{labels:H,datasets:[{data:L,borderColor:n,backgroundColor:n,borderWidth:2,lineTension:0,fill:!1,label:N}]},options:{legend:{display:G,position:c},tooltips:V,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:R}}]}}})),"bar"!=j&&"Area"!=r.tipoGrafico||(l=g,L=E,G=j,c=a,V=b[0],q=r.ejeYenCero,o=r.idComponenteGrafico,i=k,P=x,z=A,o=document.getElementById(o),new Chart(o,{type:G,data:{labels:l,datasets:[{data:L,borderColor:c,backgroundColor:c,borderWidth:2,lineTension:0,label:V}]},options:{legend:{display:z,position:i},tooltips:P,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:q}}]}}})),"horizontalBar"==j)&&(o=g,L=E,z=j,i=a,P=b[0],q=r.ejeYenCero,O=r.idComponenteGrafico,oe=k,ie=x,ee=A,O=document.getElementById(O),new Chart(O,{type:z,data:{labels:o,datasets:[{data:L,borderColor:i,backgroundColor:i,borderWidth:2,lineTension:0,label:P}]},options:{legend:{display:ee,position:oe},tooltips:ie,responsive:!0,scales:{xAxes:[{ticks:{beginAtZero:q}}]}}})),1<C)if("heatmap"==j)if(void 0!==r.heatMapColors&&""!=r.heatMapColors&&void 0!==r.heatMapColorsRange&&""!=r.heatMapColorsRange){for(var K=[],O="labelFila",L="labelColumna",ee="labelValor",te=(void 0!==r.datosTooltip&&0<r.datosTooltip.length&&(void 0!==r.datosTooltip[0]&&void 0!==r.datosTooltip[0].labelFila&&(O=r.datosTooltip[0].labelFila),void 0!==r.datosTooltip[1]&&void 0!==r.datosTooltip[1].labelColumna&&(L=r.datosTooltip[1].labelColumna),void 0!==r.datosTooltip[2])&&void 0!==r.datosTooltip[2].labelValor&&(ee=r.datosTooltip[2].labelValor),jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(E=v[e],K.push(E))}),[]),F=0;F<b.length;F++){for(var e=[],ae=0;ae<g.length;ae++){E={x:g[ae],y:parseInt(K[ae][F])};e.push(E)}te.push({name:("*"!=Y[F]?Y:b)[F],data:e})}for(var re=[],F=0;F<r.heatMapColorsRange.length-1;F++){e={from:r.heatMapColorsRange[F],to:r.heatMapColorsRange[F+1],color:ponchoColor(r.heatMapColors[F])};re.push(e)}var oe="",oe=void 0===r.mostrarEjeY||r.mostrarEjeY,ie=te,se=r.idComponenteGrafico,ne=b,le=re,ce=O,de=L,pe=ee,L=r.tituloGrafico,I=oe,he=k,ue=A,se=document.getElementById(se),me=(new ApexCharts(se,{series:ie,chart:{height:650,type:"heatmap"},dataLabels:{enabled:!1},title:{text:L},tooltip:{custom:function({series:e,seriesIndex:t,dataPointIndex:a,w:r}){e=fe(e[t][a]);return'<div class="arrow_box"><span>'+ce+": "+ne[t]+"<br>"+de+": "+r.globals.labels[a]+"<br>"+pe+": "+e+"</span></div>"}},plotOptions:{heatmap:{shadeIntensity:.5,radius:0,useFillColorAsStroke:!1,colorScale:{ranges:le}}},yaxis:{show:I},legend:{show:ue,position:he},responsive:[{breakpoint:1e3,options:{yaxis:{show:!1},legend:{show:ue,position:"top"}}}]}).render(),document.getElementsByClassName("apexcharts-toolbar"));for(let e=0;e<me.length;e++)me[e].style.display="none"}else void 0!==r.heatMapColors&&r.heatMapColors,void 0!==r.heatMapColorsRange&&r.heatMapColorsRange;else{var M=[],D=0,ge=(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),0);jQuery.each(Object.keys(_),function(e,t){var a,e=_[e];v.hasOwnProperty(e)&&(E=v[e],"Line"==r.tipoGrafico?a={label:b[D],data:E,borderColor:y[D],fill:!1,borderWidth:2,lineTension:0,backgroundColor:y[D]}:"Bar"==r.tipoGrafico||"Area"==r.tipoGrafico||"Horizontal Bar"==r.tipoGrafico||"Stacked Bar"==r.tipoGrafico?a={label:b[D],data:E,borderColor:y[D],backgroundColor:y[D],borderWidth:2,lineTension:0}:"Mixed"==r.tipoGrafico&&("barra"==(e=Z[ge])?a={label:b[D],data:E,backgroundColor:y[D],yAxisID:"left-y-axis",type:"bar"}:"linea"==e&&(a={label:b[D],data:E,borderColor:y[D],backgroundColor:y[D],type:"line",yAxisID:"right-y-axis",fill:!1})),M.push(a),D+=1,ge+=1)}),"mixed"==j&&(2==w.length?S=2:1==w.length?"eje-y1"==w[0]?S=0:"eje-y2"==w[0]&&(S=1):S=3),"Stacked Bar"==r.tipoGrafico?(se=g,L=j,le=M,I=r.idComponenteGrafico,he=r.ejeYenCero,ue=k,w=x,W=A,I=document.getElementById(I),new Chart(I,{type:L,data:{labels:se,datasets:le},options:{legend:{display:W,position:ue,labels:{textAlign:"center"}},tooltips:w,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:he},stacked:!0}],xAxes:[{stacked:!0}]}}})):"Mixed"==r.tipoGrafico?(L=g,W="bar",w=M,d=r.idComponenteGrafico,p=r.ejeYenCero,U=k,h=S,S=b[0],Q=b[1],u=A,d=document.getElementById(d),new Chart(d,{type:W,data:{labels:L,datasets:w},options:{legend:{display:u,position:U,labels:{textAlign:"center"}},tooltips:{enabled:!0,mode:"single",callbacks:{label:function(e,t){var a="",r=((2==h||e.datasetIndex==h)&&(a="%"),fe(e.yLabel));return t.datasets[e.datasetIndex].label+": "+r+" "+a}}},responsive:!0,scales:{yAxes:[{id:"left-y-axis",type:"linear",position:"left",ticks:{beginAtZero:p,callback:function(e){return e+(1!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:Q,fontColor:"black"}},{id:"right-y-axis",type:"linear",position:"right",ticks:{beginAtZero:p,callback:function(e){return e+(0!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:S,fontColor:"black"}}]}}})):"Horizontal Bar"==r.tipoGrafico?(d=g,L=j,w=M,u=r.idComponenteGrafico,U=r.ejeYenCero,Q=k,p=x,S=A,u=document.getElementById(u),new Chart(u,{type:L,data:{labels:d,datasets:w},options:{legend:{display:S,position:Q,labels:{textAlign:"center"}},tooltips:p,responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{ticks:{beginAtZero:U}}]}}})):(L=g,w=j,S=M,m=r.idComponenteGrafico,$=r.ejeYenCero,k=k,x=x,A=A,m=document.getElementById(m),new Chart(m,{type:w,data:{labels:L,datasets:S},options:{legend:{display:A,position:k,labels:{textAlign:"center"}},tooltips:x,responsive:!0,maintainAspectRatio:!0,scales:{yAxes:[{ticks:{beginAtZero:$}}]}}}))}""!=r.tituloGrafico&&void 0!==r.tituloGrafico&&(m=r.idTagTituloGrafico,w=r.tituloGrafico,document.getElementById(m))&&(document.getElementById(m).innerHTML=w)}(e=>{var t=!1;return t=(e.idSpread&&e.hojaNombre||e.jsonUrl||e.jsonInput)&&void 0!==e.tipoGrafico&&""!=e.tipoGrafico&&void 0!==e.idComponenteGrafico&&""!=e.idComponenteGrafico&&""!=_e(e.tipoGrafico)?!0:t})(t)?t.jsonInput?a(jQuery.parseJSON(t.jsonInput),t):(e=t.jsonUrl||"https://sheets.googleapis.com/v4/spreadsheets/"+t.idSpread+"/values/"+t.hojaNombre+"?alt=json&key=AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",jQuery.getJSON(e,function(e){a(e,t)})):(void 0!==t.idSpread&&t.idSpread,void 0!==t.hojaNombre&&t.hojaNombre,void 0!==t.tipoGrafico&&t.tipoGrafico,void 0!==t.idComponenteGrafico&&t.idComponenteGrafico,_e(t.tipoGrafico))}let gapi_legacy=e=>{if(!e||!e.values||0===e.values.length)throw new TypeError("Invalid response format");if(!Array.isArray(e.values)||!Array.isArray(e.values[0]))throw new TypeError("Invalid response format: values should be arrays");let i=e.values[0],s=/ |\/|_/gi,n=[];return e.values.forEach((e,t)=>{if(0<t){var a,r={};for(a in i){var o=e.hasOwnProperty(a)?e[a].trim():"";r["gsx$"+i[a].toLowerCase().replace(s,"")]={$t:o}}n.push(r)}}),{feed:{entry:n}}},PM_TRANSLATE=("undefined"!=typeof exports&&(module.exports=gapi_legacy),{es:{cluster_click:"Clic para expandir grupo",cluster_large:"Grupo grande de {{count}} ubicaciones",cluster_medium:"Grupo mediano de {{count}} ubicaciones",cluster_small:"Grupo chico de {{count}} ubicaciones",filter_initial:'Hay {{total_results}} puntos en el mapa. <a href="#" class="{{reset_search}}"aria-label="Restablecer valores del mapa">Restablecer mapa</a>',filter_no_results:"No se encontraron entradas.",filter_select_label:"Seleccione {{header}}",filter_select_legend:"Filtrar por {{header}}",filter_select_all_option_text:"Todos",filter_no_results_by_term:"No encontramos resultados para tu búsqueda.",filter_one_result:"{{total_results}} resultado coincide con tu búsqueda.",filter_reset_values_link:' <a href="#" class="{{reset_search}}"aria-label="Restablecer valores del mapa">Restablecer mapa</a>',filter_results:"{{total_results}} resultados coinciden con tu búsqueda.",filters_aria_label_close_panel:"Cerrar panel de filtros",filters_aria_label_open_close_panel:"Abre o cierra el panel de filtros",filters_aria_label_panel:"Panel de filtros",filters_aria_label_reset:"Restablecer valores del mapa",filters_check_all:"Marcar todos",filters_close_panel_text:"Cerrar panel",filters_has:"Se están usando filtros.",filters_reset:"Restablecer mapa",map_exit:"Salir del mapa",map_fit_bounds:"Ajustar marcadores al mapa",map_full_view:"Ver mapa completo",map_goto_markers:"Ir a los marcadores del mapa",map_help_us:"Ayudá a mejorar el mapa",openmap_aria_label:"Abrir el punto geográfico en un mapa alternativo",openmap_label:"Abrir ubicación en:",search_data:"Hacer una búsqueda",search_placeholder:"Su búsqueda",theme_aria_label_panel:"Herramienta para cambiar de tema visual",theme_change:"Cambiar tema del mapa",theme_description_contrast:"Fondo oscuro con bordes blancos.",theme_description_dark:"Fondo oscuro con bordes blancos de contraste medio.",theme_description_default:"Colores predeterminados del proveedor del mapa.",theme_description_grayscale:"Mapa e interfaz en tonos de gris.",theme_description_relax:"Paleta de colores suaves.",theme_name_contrast:"Alto contraste",theme_name_dark:"Oscuro",theme_name_default:"Original",theme_name_grayscale:"Gris",theme_name_relax:"Relax",theme_open_panel:"Abre el panel de temas",theme_reset:"Restablece el tema del mapa a su configuración original",zoom_aria_label_panel:"Herramientas de zoom",zoom_goto_panel:"Ir a la herramienta de zoom",zoom_in:"Acercar",zoom_out:"Alejar"}});class PonchoMap{constructor(e,t){var a={pan_by:!0,accesible_menu_extras:[{label:"map_help_us",link:"https://www.argentina.gob.ar/sugerencias",target:"_blank"}],allowed_tags:[],anchor_delay:0,map_breakpoint:{large:{lg:{fraction:"3:10",value:992},md:{fraction:"2:7",value:768},sm:{fraction:"1:4",value:576},xl:{fraction:"2:7",value:1200},xs:{fraction:"1:1",value:0},xxl:{fraction:"2:7",value:1400}},default:{lg:{fraction:"4:10",value:992},md:{fraction:"2:6",value:768},sm:{fraction:"1:4",value:576},xl:{fraction:"2:7",value:1200},xs:{fraction:"1:1",value:0},xxl:{fraction:"2:7",value:1400}}},media_breakpoint:{lg:992,md:768,sm:576,xl:1200,xs:0,xxl:1400},content_selector:!1,debug:!1,default_themes:[{aria_label:!1,code:"default",description:"theme_description_default",name:"theme_name_default"},{aria_label:!1,code:"contrast",description:"theme_description_contrast",name:"theme_name_contrast"},{aria_label:!1,code:"dark",description:"theme_description_dark",name:"theme_name_dark"},{aria_label:!1,code:"grayscale",description:"theme_description_grayscale",name:"theme_name_grayscale"},{aria_label:!1,code:"relax",description:"theme_description_relax",name:"theme_name_relax"}],error_reporting:!1,fit_bounds_onevent:!0,fit_bounds_options:{padding:.005,maxZoom:22,animate:!0,duration:.25},hash:!1,header_icons:[],headers:{},id:"id",id_mixing:[],lang:"es",latitud:"latitud",longitud:"longitud",map_align:"center",map_anchor_zoom:16,map_background:"#DDD",map_init_options:{},map_layers:!0,map_layers_default:"osm",map_opacity:1,map_selector:"map",map_style:{},map_view:[-40.44,-63.59],map_zoom:4,markdown_options:{extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"],simpleLineBreaks:!0,tables:!0},marker:"azul",marker_cluster_options:{maxClusterRadius:30,showCoverageOnHover:!1,spiderLegPolylineOptions:{color:"#666666","fill-opacity":.5,opacity:.5,weight:1},spiderfyDistanceMultiplier:.5,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0},min_zoom:2,no_info:!1,open_maps:!1,open_maps_options:{aria_label:"openmap_aria_label",items:[{aria_label:!1,hreflang:"en",label:"Apple maps",lang:"en",link:"https://maps.apple.com/?q={{latitude}},{{longitude}}",platform:"mac",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:!1,label:"Google maps",lang:"en-US",link:"https://www.google.com/maps/search/?api=1&query={{latitude}},{{longitude}}",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:"es",label:'<abbr lang="es" title="Instituto Geográfico Nacional">IGN</abbr> – ArgenMap',lang:"es",link:"https://mapa.ign.gob.ar/?zoom=17&lat={{latitude}}&lng={{longitude}}&layers=argenmap&marker={{latitude}},{{longitude}}",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:"en",label:"Open street maps",lang:"en",link:"https://www.openstreetmap.org/?mlat={{latitude}}&mlon={{longitude}}#map=16/{{latitude}}/{{longitude}}",rel:["alternate"],target:"_blank"}],label:"openmap_label"},render_slider:!0,reset_zoom:!0,scope:"",scroll:!1,slider:!1,slider_selector:".pm-slider",slider_size:!1,summary:!1,template:!1,template_innerhtml:!1,template_markdown:!1,template_structure:{container_classlist:["info-container"],definition_classlist:[],definition_list_classlist:["definition-list"],definition_list_tag:"dl",definition_tag:"dd",term_classlist:["h6","fw-bold","m-b-0","font-sans-serif"],term_tag:"dt",title_classlist:["h4","pm-color-primary","m-t-0"]},theme:"default",theme_map:!1,theme_tool:!0,theme_ui:!1,throw_exceptions:!1,title:!1,tooltip:!1,tooltip_label:!1,tooltip_options:{className:"leaflet-tooltip-own",direction:"auto",offset:[13,-18],opacity:1,permanent:!1,sticky:!1}},r=Object.assign({},a,t),e=(this.pan_by=Boolean(r.pan_by),this.lang=r.lang,this.dictionary=(r?.dictionary&&r.dictionary[this.lang]?r.dictionary:PM_TRANSLATE)[this.lang],this.error_reporting=r.error_reporting,this.throw_exceptions=r.throw_exceptions,this.scope=r.scope,this.render_slider=r.render_slider,this.template=r.template,this.template_structure={...a.template_structure,...t.template_structure},this.debug=r.debug,this.template_innerhtml=r.template_innerhtml,this.template_markdown=r.template_markdown,this.markdown_options=r.markdown_options,this.allowed_tags=r.allowed_tags,this.map_selector=r.map_selector,this.headers=this.setHeaders(r.headers),this.header_icons=r.header_icons,this.hash=r.hash,this.scroll=r.scroll,this.fit_bounds_onevent=r.fit_bounds_onevent,this.fit_bounds_options=r.fit_bounds_options,this.map_view=r.map_view,this.map_init_options=r.map_init_options,this.anchor_delay=r.anchor_delay,this.map_zoom=r.map_zoom,this.min_zoom=r.min_zoom,this.map_anchor_zoom=r.map_anchor_zoom,this.tooltip_options=r.tooltip_options,this.tooltip_label=r.tooltip_label,this.tooltip=r.tooltip,this.marker_cluster_options=r.marker_cluster_options,this.marker_color=r.marker,this._icon_cache=new Map,this._marker_color_type=this._getMarkerColorType(),this.id=r.id,this.id_mixing=r.id_mixing,this.title=r.title,this.map_background=r.map_background,this.theme=r.theme,this.theme_tool=r.theme_tool,this.default_themes=r.default_themes,this.temes_not_visibles=[["transparent","Transparent"]],this.theme_ui=r.theme_ui,this.theme_map=r.theme_map,this.map_opacity=r.map_opacity,this.latitude=r.latitud,this.longitude=r.longitud,this.slider=r.slider,this.slider_size=r.slider_size,this.no_info=r.no_info,this.reset_zoom=r.reset_zoom,this.slider_selector=this._selectorName(r.slider_selector),this.selected_marker,this.scope_selector=`[data-scope="${this.scope}"]`,this.scope_sufix="--"+this.scope,this.content_selector=r.content_selector||".js-content"+this.scope_sufix,this.content_outside=this.content_selector!==".js-content"+this.scope_sufix,this.data=this.formatInput(e),this.geometryTypes=["Point","LineString","Polygon","MultiPoint","MultiLineString"],this.map_layers=r.map_layers,this.map_layers_default=r.map_layers_default,this.featureStyle={stroke:"dodgerblue","stroke-opacity":1,"stroke-width":2,"fill-opacity":.5},this.accesible_menu_search=[],this.accesible_menu_filter=[],this.open_maps=r.open_maps,this.open_maps_options=Object.assign({},a.open_maps_options,t?.open_maps_options),this.media_breakpoint=r.media_breakpoint,this.map_breakpoint=r.map_breakpoint,this.map_breakpoint_fractions=r.map_breakpoint_fractions,this.map_align=r.map_align,this.map_style=r.map_style,this.accesible_menu_extras=r.accesible_menu_extras,this.summary=r.summary,this.geojson,this.ersiURL="https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",this.osmURL="https://mapa-ign.argentina.gob.ar/osm/{z}/{x}/{-y}.png",{ersi:{attributes:{tabindex:-1},hreflang:"es",label:'© <abbr lang="en" title="Environmental Systems Research Institute">Esri</abbr>',lang:"en",link:"https://www.esri.com/es-es/home"},ign:{attributes:{tabindex:-1},hreflang:"es",label:'<abbr lang="es" title="Instituto Geográfico Nacional">IGN</abbr>',lang:"es",link:"https://www.ign.gob.ar/AreaServicios/Argenmap/Introduccion"},leaflet:{attributes:{tabindex:-1},hreflang:"en",label:"Leaflet",lang:"en",link:"https://leafletjs.com/",title:"Biblioteca JavaScript para mapas interactivos"},osm:{attributes:{tabindex:-1},hreflang:"en",label:'<abbr lang="en" title="Open Street Map">OSM</abbr>',lang:"en",link:"https://www.openstreetmap.org/copyright"}}),{leaflet:a,ersi:t,ign:r,osm:e}=e,a=(this.prefix=this.addAnchorElement(a,"html"),this.ersiAttribution="Contribuidores: "+this.addAnchorElement(t,"html"),this.osmAttribution="Contribuidores: "+this.addAnchorElement(r,"html")+", "+this.addAnchorElement(e,"html"),this.layerViewSettings={satelital:{attribution:this.ersiAttribution,label:"Mapa satelital",tilesUrl:this.ersiURL,setVisuals:this._setSatelitalView},osm:{attribution:this.osmAttribution,label:"Mapa",setVisuals:this._setOsmView,tilesUrl:this.osmURL}},"undefined"!=typeof L&&L.hasOwnProperty("map")||this.showAlert({title:"No se encuentra el componenete Leaflet",messages:["Verifique que <strong>Leaflet</strong>, esté incluido en el documento HTML.","Lea las indicaciones para usar el componente leaflet "+`en: ${this.addAnchorElement({hreflang:"en",label:"<em>Quick start</em>",lang:"en",link:"https://leafletjs.com/examples/quick-start/",target:"_blank"},"html")}.`]},"danger",!0),this.layerViewConf="satelital"==this.map_layers_default?this.layerViewSettings[this.map_layers_default]:this.layerViewSettings.osm,this.tileLayer=new L.tileLayer(this.layerViewConf.tilesUrl),{renderer:L.svg(),keyboard:!0,...this.map_init_options,zoomControl:!1});this.map=new L.map(this.map_selector,a),this.map.setView(this.map_view,this.map_zoom),this.map.attributionControl.setPrefix(this.prefix),!1!==this.map_init_options?.zoomControl&&L.control.zoom({position:"topleft",zoomControl:!0,zoomInText:"+",zoomInTitle:this._t("zoom_in"),zoomOutText:"-",zoomOutTitle:this._t("zoom_out")}).addTo(this.map),L.hasOwnProperty("markerClusterGroup")?this.markers=new L.markerClusterGroup({...this.marker_cluster_options,...this.customClusters()}):this.markers=new L.FeatureGroup,this.ponchoLoaderTimeout}get version(){return"2.2.1"}logger={log:()=>{this.debug},error:()=>{this.debug},warn:()=>{this.debug},table:()=>{this.debug},info:()=>{this.debug}};_t=(e,t={})=>this.isEmptyString(e)?(this.logger.warn("_t","Está recibiendo una definición vacía."),e):this.isObject(t)?(e=this.dictionary.hasOwnProperty(e)?this.dictionary[e]:e,this.tplParser(e,t)):void this.logger.warn("_t","tpl requiere un objeto clave/valor.");customClusters=()=>{if(!L?.divIcon)return this.logger.warn("Leaflet divIcon is not available"),null;let r={SMALL:10,MEDIUM:100},o=["leaflet-marker-icon","marker-cluster","leaflet-zoom-animated","leaflet-interactive"],i=(e,t)=>{var t=this._t("cluster_"+t,{count:e}),a=this._t("cluster_click"),r=document.createElement("div"),t=(r.setAttribute("aria-label",t),r.title=a,document.createElement("span"));return t.textContent=e,r.appendChild(t),r};return{iconCreateFunction:e=>{var e=e.getChildCount(),t=(t=e)<r.SMALL?"small":t<r.MEDIUM?"medium":"large",a=[...o,"marker-cluster-"+t];return L.divIcon({html:i(e,t),className:a.join(" "),iconSize:L.point(40,40)})}}};isString(e){return"string"==typeof e}isEmptyString(e){return"string"==typeof e&&0===e.trim().length}isNumber(e){return"number"==typeof e&&isFinite(e)}isObject(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}isEmptyObject(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&0===Object.keys(e).length}tplParser=(e,r)=>{if(this.isString(e))return this.isEmptyString(e)?e:this.isObject(r)?this.isEmptyObject(r)?e:Object.keys(r).reduce(function(e,t){var a;if(r.hasOwnProperty(t))return a=new RegExp("\\{\\{\\s{0,2}"+t+"\\s{0,2}\\}\\}","gm"),e.replace(a,r[t])},e):void 0};_processMatch=(t,a)=>{var{replaceStr:t,key:r,compare:o,elseReturn:i,operator:s}=t.groups;if(a.hasOwnProperty(r)){a=a[r],r=o;let e=!1;return(e="!="===s?String(a)!==String(r):"=="===s?String(a)===String(r):!!a)?t:i}return i};conditionalTemplate=(e,t)=>{var a,r=/\{\%\s?('|`)(?<replaceStr>[^\1]*?)\1 if (?<key>[\w\-\.]+)\s?(?:(?<operator>\!\=|\=\=)\s?('|"|`)(?<compare>.*?)\5) else ('|"|`)(?<elseReturn>.*?)\7\s?\%\}/gm;let o=e;for(;null!==(a=r.exec(e));){a.index===r.lastIndex&&r.lastIndex++;var i=this._processMatch(a,t);o=o.replace(a[0],i)}return o};tpl=(e,t,a=0)=>{var r;return this.isObject(t)||this.logger.error("[tpl]","El segundo parámetro debe ser un objeto"),this.isEmptyObject(t)&&this.logger.error("[tpl]","El segundo parámetro no puede ser un objeto vacío"),this.isString(e)?this.isEmptyString(e)?(this.logger.info("[tpl]","Llegó una cadena de texto vacía"),""):(r=this.conditionalTemplate(e,t),null!=(r=this.tplParser(r,t))?r:e):(this.logger.error("[tpl]","El primer parámetro debe ser un string"),String(e))};_setSliderSize=()=>{var e,t;this.isString(this.slider_size)&&(["large","default","medium"].includes(this.slider_size)||(this.logger.warn(`Invalid slider size: ${this.slider_size}. Defaulting to 'default'.`),this.slider_size="default"),e=document.querySelector(".poncho-map"+this.scope_selector))&&(t="slider-"+this.slider_size,e.classList.contains(t)||(e.classList.remove("slider-large","slider-default","slider-medium"),e.classList.add(t)))};_mapWidth=()=>this.map.getSize().x;_setFraction=e=>{let t;var a=this.isNumber(e)?e:document.getElementById(this.map_selector).offsetWidth;let r=Object.keys(this.media_breakpoint);e=["large","default"].includes(this.slider_size)?this.slider_size:"default",e=this.map_breakpoint[e];if(Object.keys(e).every(e=>r.includes(e))){if(Object.values(e).every(function(e){return"object"==typeof e&&null!==e&&"value"in e&&"fraction"in e})){var o,i=Object.entries(e).sort(([,e],[,t])=>t.value-e.value);for(o of i){var[s,{value:n,fraction:l}]=o;if(this.isNumber(n)&&n<=a){t=l,this.logger.table(i),this.logger.log(s,n,t,a);break}}return t||"1:1"}this.showAlert({title:"La definición de <code>map_breakpoints</code>, tiene errores",messages:["Verifique que para cada entrada existan las claves: `value` y `fraction`."],terminal:e},"warning")}else this.showAlert({title:"Una o muchas claves en: <code>map_breakpoints</code>, no son claves correctas.",messages:["Compruebe que las claves coincidan con alguna de las siguientes: "+r.join(", ")+"."],terminal:e},"danger",!0)};setMapAlignment=(e,t=!1,a=this.map_view)=>{if(["left","right"].includes(e.toLowerCase()))if(t=t||this._setFraction(),/^[0-9]{1,2}\:[0-9]{1,2}$/.test(t)){var[t,r]=t.split(":"),o=t/r;if(1===Number(o)||.5===Number(o))return null;var[o,i]=a,a=Array.isArray(a)?{lat:o,lng:i}:this.map.getCenter(),o=this.map.latLngToContainerPoint(a),i="left"==e?r-t:t,a=document.querySelector(".poncho-map"+this.scope_selector).offsetWidth/r*i,e=o.y,t=L.point(a,e),r=this.map.containerPointToLatLng(t);this.map_view=[r.lat,r.lng],this.map.setView(r)}else this.logger.error("La fracción para posicionar el mapa tiene errores sintácticos.")};addAnchorElement=(e={},t="object")=>{var{id:e,title:a,css:r,label:o=null,aria_label:i,link:s="#",hreflang:n,lang:l,target:c,rel:d,datasets:p={},attributes:h={}}=e;let u=/^[a-z]{2}(-[A-Z]{2})?$/i,m=["_self","_blank","_parent","_top"];var g=["noopener","noreferrer"],_=e=>this.isString(e)&&u.test(e),f=e=>m.includes(e);let y=document.createElement("a");if(y.href=s,o&&(s=f(c)&&"_blank"===c,y.innerHTML=s?o+' <span class="sr-only">(Abre en una nueva pestaña)</span>':o),f(c)&&(y.target=c),Array.isArray(d)&&0<d.length){let t=[...new Set(d.filter(Boolean))];"_blank"===c&&g.forEach(e=>{t.includes(e)||t.push(e)}),y.rel=t.join(" ")}else"_blank"===c&&(y.rel=g.join(" "));return _(l)&&(y.lang=l),_(n)&&(y.hreflang=n),i&&y.setAttribute("aria-label",i),e&&(y.id=e),a&&(y.title=a),Array.isArray(r)&&0<r.length&&0<(s=r.filter(e=>e&&"string"==typeof e)).length&&y.classList.add(...s),Object.entries(h).forEach(([e,t])=>{e&&null!=t&&y.setAttribute(e,String(t))}),Object.entries(p).forEach(([e,t])=>{e&&null!=t&&y.setAttribute("data-"+e,String(t))}),"html"===t?y.outerHTML:y};mapOpacity=(e=!1)=>{e=e||this.map_opacity;this.tileLayer.setOpacity(e)};mapBackgroundColor=(e=!1)=>{var e=e||this.map_background,t=this.scope_selector+" .leaflet-container",t=document.querySelector(t);t&&(t.style.background=e)};_disabledEnableThemes=(e,t="disabled")=>{for(var a of e){a=`${this.scope_selector} [data-theme="${a}"]`;document.querySelectorAll(a).forEach(function(e){"disabled"==t?(e.ariaHidden="true",e.parentElement.style.display="none"):(e.removeAttribute("aria-hidden"),e.parentElement.style.display="initial")})}};_setLayerTheme=(t,a,e)=>{document.querySelectorAll(this.scope_selector).forEach(function(e){e.classList.remove(...t),e.classList.add(a)}),this._disabledEnableThemes(["contrast","dark"],e);e=this.scope_selector+' [data-theme^="layer-"]';document.querySelectorAll(e).forEach(function(e){e.dataset.theme==a?e.ariaCurrent="true":e.ariaCurrent="false"})};_setOsmView=()=>{var{tileLayer:e,map:t,osmURL:a,ersiAttribution:r,osmAttribution:o}=this,t=t.attributionControl;e.setUrl(a),t.removeAttribution(r),t.addAttribution(o),this._setLayerTheme(["layer-satelital"],"layer-osm",!1)};_setSatelitalView=()=>{var{tileLayer:e,map:t,ersiURL:a,osmAttribution:r,ersiAttribution:o}=this,t=t.attributionControl;e.setUrl(a),t.removeAttribution(r),t.addAttribution(o),this._setLayerTheme(["layer-osm","map-contrast","map-dark","ui-contrast","ui-dark"],"layer-satelital","disabled")};_menuTheme=()=>{if(this.theme_tool){document.querySelectorAll("#themes-tool"+this.scope_sufix).forEach(e=>e.remove());let t=document.createElement("div");t.classList.add("pm-list-unstyled","pm-list","pm-tools","js-themes-tool"+this.scope_sufix);var a=document.createElement("div"),r=(a.tabIndex="-1",a.dataset.toggle="true",document.createElement("i")),o=(r.ariaHidden="true",r.classList.add("pmi","pmi-adjust"),document.createElement("button")),i=(o.title=this._t("theme_change"),o.id="themes-tool-button"+this.scope_sufix,o.tabIndex="0",o.classList.add("pm-btn","pm-btn-rounded-circle"),o.ariaHasPopup="true",o.ariaControls="menu",o.role="button",o.ariaLabel=this._t("theme_open_panel"),o.appendChild(r),document.createElement("ul")),r=(i.id="list-themes-tool-button"+this.scope_sufix,i.role="menu",i.ariaLabelledby="themes-tool-button"+this.scope_sufix,i.classList.add("pm-container","pm-list","pm-list-unstyled","pm-p-1","pm-caret","pm-caret-b","pm-toggle","pm-accesible-menu"),{label:"Restablecer",attributes:{role:"menuitem",tabIndex:0},aria_label:this._t("theme_reset"),css:["pm-item-link","js-reset-theme"]}),r=this.addAnchorElement(r);let e=document.createElement("li");e.role="presentation",e.classList.add("pm-item-separator"),e.appendChild(r),i.appendChild(e);var s=this.default_themes.length;for(let t=0;t<=s-1;t++){var{code:n,name:l,aria_label:c,description:d}=this.default_themes[t],c={aria_label:c,css:["js-set-theme","pm-item-link"],attributes:{role:"menuitem",tabIndex:0},datasets:{theme:n}},n=document.createElement("span"),l=(n.textContent=this._t(l),this.addAnchorElement(c));l.appendChild(n),d&&((c=document.createElement("small")).classList.add("d-block","small","sr-only"),c.textContent=this._t(d),(n=document.createElement("span")).textContent=", ",n.className="sr-only",l.appendChild(n),l.appendChild(c));let e=document.createElement("li");e.role="presentation",t==s-1&&this.map_layers&&e.classList.add("pm-item-separator"),e.appendChild(l),i.appendChild(e)}if(this.map_layers)for(var p of Object.keys(this.layerViewSettings)){var h=this.layerViewSettings[p].label,h={label:h,css:["pm-item-link",`js-${p}-layer`],attributes:{role:"menuitem",tabIndex:0},datasets:{theme:"layer-"+p}},p=this.addAnchorElement(h);let e=document.createElement("li");e.role="presentation",e.appendChild(p),i.appendChild(e)}a.appendChild(o),a.appendChild(i),t.appendChild(a),document.querySelectorAll(this.scope_selector).forEach(e=>e.appendChild(t)),document.querySelectorAll(this.scope_selector+" .js-satelital-layer").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),this._setSatelitalView()})),document.querySelectorAll(this.scope_selector+" .js-osm-layer").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),this._setOsmView()})),document.querySelectorAll(this.scope_selector+" .js-reset-theme").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),localStorage.removeItem("mapTheme"),this._removeThemes(),this._setThemes(),this.layerViewConf.setVisuals()})),document.querySelectorAll(this.scope_selector+" .js-set-theme").forEach(t=>t.addEventListener("click",e=>{e.preventDefault();e=t.dataset.theme;this.useTheme(e),localStorage.setItem("mapTheme",e)}))}};_setThemeStyles=(t=!1,e=["ui","map"])=>e.map(function(e){return!!["ui","map"].includes(e)&&e+"-"+t});_removeThemes=(a=["ui","map"])=>{document.querySelectorAll(this.scope_selector).forEach(t=>{[...this.default_themes.map(e=>e.code),...this.temes_not_visibles.map(e=>e[0])].forEach(e=>{t.classList.remove(...this._setThemeStyles(e,a))})}),document.querySelectorAll(this.scope_selector+" .js-set-theme").forEach(e=>e.setAttribute("aria-current","false"))};_setTheme=(t,a)=>{var e=document.querySelectorAll(this.scope_selector);this._removeThemes(a),e.forEach(e=>{e.classList.add(...this._setThemeStyles(t,a))}),document.querySelectorAll(this.scope_selector+` .js-set-theme[data-theme="${t}"]`).forEach(e=>e.setAttribute("aria-current","true"))};useTheme=(e=!1)=>{e=e||this.theme;this._setTheme(e,["ui","map"])};useMapTheme=e=>this._setTheme(e,["map"]);useUiTheme=e=>this._setTheme(e,["ui"]);_setThemes=()=>{localStorage.hasOwnProperty("mapTheme")?this._setTheme(localStorage.getItem("mapTheme"),["ui","map"]):this.theme_ui||this.theme_map?(this.theme_ui&&this._setTheme(this.theme_ui,["ui"]),this.theme_map&&this._setTheme(this.theme_map,["map"])):this.useTheme()};_openOnMaps=(e,t)=>{if("boolean"==typeof this.open_maps&&this.open_maps)if(this.validateCoordinates(e,t)){var a,r=document.createElement("ul"),{items:o=[],label:i,aria_label:s}=(r.classList.add("pm-list-unstyled","pm-pb-1"),this.open_maps_options);for(a of o){var{link:n,platform:l="all"}=a,c=/(?=.*\{\{latitude\}\})(?=.*\{\{longitude\}\}).*/gm;("mac"!==l||navigator.userAgent.includes("Mac"))&&c.test(n)&&(l=this.tplParser(n,{latitude:e,longitude:t}),c={...a,link:l,attributes:{tabIndex:0}},n=this.addAnchorElement(c),(l=document.createElement("li")).appendChild(n),r.appendChild(l))}o=document.createElement("summary"),i=(o.textContent=this._t(i),o.tabIndex=0,o.ariaLabel=this._t(s),document.createElement("details")),s=(i.classList.add("blank"),".js-footer"+this.scope_sufix),s=document.querySelector(s);s.classList.add("pm-open-map"),s&&(s.innerHTML=""),i.appendChild(o),i.appendChild(r),s.appendChild(i)}else this.logger.warn(`Coordenadas inválidas: lat=${e}, lng=`+t)};validateCoordinates(e,t){return null!=e&&null!=t&&""!==e&&""!==t&&(e=this.isString(e)?parseFloat(e):e,t=this.isString(t)?parseFloat(t):t,!(!Number.isFinite(e)||!Number.isFinite(t)))&&-90<=e&&e<=90&&(-180<=t&&t<=180)}_slugify=e=>slugify(e);isGeoJSON=e=>"FeatureCollection"===e?.type;get entries(){return this.data.features}get geoJSON(){return this.featureCollection(this.entries)}formatInput=e=>{e.length<1&&this.showAlert({title:"No se puede visualizar el mapa, el documento está vacío",messages:["Es posible que el documento esté vacío.","Verifique el formato del documento JSON o GeoJSON."]},"warning");let t;return t=this.isGeoJSON(e)?e:(e=this.features(e),this.featureCollection(e)),this._setIdIfNotExists(t)};showAlert=(t,a,r=!1)=>{if(this.isObject(t))if(this.isEmptyObject(t))this.logger.error("No se encontraron las claves: title o messages.");else{["danger","warning","info"].includes(a)||(a="danger");var{scope_sufix:o,scope_selector:i,error_reporting:s,throw_exceptions:n,map_selector:l}=this,c="log-container"+o;let e=document.getElementById(c);e||((e=document.createElement("div")).role="alert",e.id=c,(c=document.querySelector(i+".poncho-map"))?.parentNode&&c.parentNode.insertBefore(e,c)),e.textContent="";var d,p,h,i=document.createElement("div"),c=(i.className=`js-error-message${o} poncho-map--message `+a,document.createElement("h2")),{title:o,messages:a=[],terminal:u=!1}=(c.className="pm-visually-hidden sr-only",c.textContent="Registro de errores en el mapa",t);if(this.isEmptyString(o)||((d=document.createElement("p")).innerHTML=o,i.appendChild(d)),Array.isArray(a)&&0<a.length){var m,o=document.createElement("ul"),g=document.createDocumentFragment();for(m of a){var _=document.createElement("li");_.innerHTML=m,g.appendChild(_)}o.appendChild(g),i.appendChild(o)}if(u&&((d=document.createElement("div")).className="console-message-container",(a=document.createElement("details")).className="caret-small caret-dark",(o=document.createElement("summary")).textContent="Mensaje",(p=document.createElement("div")).className="console",(h=document.createElement("code")).textContent=JSON.stringify(u),p.appendChild(h),a.appendChild(o),a.appendChild(p),d.appendChild(a),i.appendChild(d)),(s||r)&&(e.appendChild(c),e.appendChild(i),n||r))throw document.getElementById(l)?.remove(),new Error(JSON.stringify(t));this.logger.error(JSON.stringify(t))}else this.logger.error("showAlert","Espera un objeto de tipo clave/valor.")};feature=t=>{var e,a;if([this.latitude,this.longitude].every(e=>Object.keys(t).includes(e)))return e=t[this.latitude],a=t[this.longitude],this.validateCoordinates(e,a)||this.showAlert({title:"El documento JSON contiene errores en la definición de latitud y longitud.",messages:["Corrobore que los valores de las claves para <code>latitud</code> "+`(${this.latitude}) y <code>longitud</code> `+`(${this.longitude}), no estén vacíos.`,"Revise que el separador de decimales sea un punto y no una coma.","Verifque que los rangos de latitud y longitud sean correctos."],terminal:t},"warning"),delete t[this.latitude],delete t[this.longitude],{type:"Feature",properties:t,geometry:{type:"Point",coordinates:[a,e]}};this.showAlert({title:"La entrada debe incluir las claves para latitud y longitud.",terminal:t},"warning")};featureCollection=e=>({type:"FeatureCollection",features:e});features=e=>e.map(this.feature);_tooltipLabel=(e,t)=>{if(this.tooltip)if(!this.isObject(e)||this.isEmptyObject(e))this.logger.error("[_tooltipLabel]","El primer parámetro debe ser un objeto y no puede estar vacío");else if(this.isNumber(t)||this.isString(t)){if(!this.isEmptyString(t)){if("function"==typeof this.tooltip_label)try{var a=this.tooltip_label(self,e);return null!=a?String(a):""}catch(e){return this.logger.warn("Error ejecutando función de tooltip:",e),""}return this.isString(this.tooltip_label)&&!this.isEmptyString(this.tooltip_label)?this.tpl(this.tooltip_label,e,["*"]):t}this.logger.error("[_tooltipLabel]","El segundo parametro no puede estar vacío")}else this.logger.error("[_tooltipLabel]","El segundo parámetro solo puede ser una cadena de texto o un número")};_isIdMixing=()=>Array.isArray(this.id_mixing)&&0<this.id_mixing.length||"function"==typeof this.id_mixing;_idMixing=a=>{if(this._isIdMixing()){if(a&&"object"==typeof a&&a.properties&&"object"==typeof a.properties){if("function"==typeof this.id_mixing)try{var e=this.id_mixing(this,a);return Array.isArray(e)?e.join(""):void this.logger.warn("_idMixing: la función debe retornar un array")}catch(e){return void this.logger.error("_idMixing: error ejecutando función personalizada",e)}e=this.id_mixing.map(e=>{var t;return Object.prototype.hasOwnProperty.call(a.properties,e)?null!=(t=a.properties[e])?String(t):"":null!=e?String(e):""});return this._slugify(e.join("-"))}this.logger.warn("_idMixing: entry inválido o sin properties")}};_setIdIfNotExists=t=>{if(t&&Array.isArray(t.features)){var e=t.features[0]?.properties.hasOwnProperty("id"),a=this._isIdMixing();if(a||!e)for(let e=0;e<t.features.length;e++){var r,o,i=t?.features[e];i&&(r=i.properties,a?r.id=this._idMixing(i):(i=e+1,o=r[this.title]?this._slugify(r[this.title]):"",r.id=[i,o].filter(Boolean).join("-")))}}return t};addHash=e=>{this.isEmptyString(e)?this.logger.error("Invalid value provided to update hash"):this.hash&&!this.no_info&&(window.location.hash="#"+e)};entry=t=>{if(this.isNumber(t)||this.isString(t)){if(!this.isString(t)||!this.isEmptyString(t))return this.entries.find(e=>!(!e?.properties||e.properties[this.id]!==t||"n"===e.properties?.["pm-interactive"]));this.logger.error("entry requiere un id no vacío.")}else this.logger.error("entry requiere un número o una cadena de texto.")};searchEntries=(e,t)=>{t=t||this.geoJSON;if(this.isEmptyString(e))return this.logger.info("searchEntries","Término vacío."),t;let a=replaceSpecialChars(e).toUpperCase(),r=new Set([this.title,...this.search_fields]);return t.filter(e=>this.searchEntry(a,e.properties,r))};searchEntry=(t,a,e=[])=>(!t||e.length<1||!![...e].some(function(e){return!!a.hasOwnProperty(e)&&replaceSpecialChars(a[e]).toString().toUpperCase().includes(t)}))&&a;_selectorName=e=>e.replace(/^(\.|\#)/,"");scrollCenter=()=>{var e=document.getElementById(this.map_selector),t=e.getBoundingClientRect(),e=(e.offsetLeft+e.offsetWidth)/2,t=t.top+window.scrollY;window.scrollTo({top:t,left:e,behavior:"smooth"})};_clearContent=()=>document.querySelector(".js-content"+this.scope_sufix).innerHTML="";toggleSlider=()=>{this.no_info||document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.toggle(this.slider_selector+"--in"),e.style.display=this.isSliderOpen()?"block":"none"})};_focusOnFeature=t=>{this.map.eachLayer(e=>{e?.options?.id==t&&(e?._path?e._path.focus():e?._icon&&e._icon.focus())})};_clickToggleSlider=()=>document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(t=>t.addEventListener("click",e=>{this._clearContent(),this.toggleSlider(),this._focusOnFeature(t.dataset.entryId)}));isSliderOpen=()=>{var e=document.querySelectorAll(".js-slider"+this.scope_sufix);return Array.from(e).some(e=>e.classList.contains(this.slider_selector+"--in"))};setContent=a=>{if(!this.no_info){this._focusOnSlider(),this.isSliderOpen()||this.toggleSlider();let t="function"==typeof this.template?this.template(this,a):this.defaultTemplate(this,a);document.querySelectorAll(this.content_selector).forEach(e=>{e.innerHTML=t,e.scrollTo({top:0,left:0,behavior:"auto"})}),document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>{e.dataset.entryId=a[this.id]});var e,r=this.entry(a[this.id]);r?.geometry?.coordinates?([r,e]=r.geometry.coordinates,this._openOnMaps(e,r)):this.logger.warn(`No se pudo obtener las coordenadas para el id "${a[this.id]}".`)}};_focusOnSlider=()=>{if(!this.no_info){var e=".js-slider"+this.scope_sufix;let t=document.querySelector(e);t&&(this.isSliderOpen()?t.focus():t.addEventListener("animationend",e=>{"open"!==e.animationName&&t.focus()},{once:!0}))}};setHeaders=e=>{var t=(this.template_structure?.mixing??[]).reduce((e,t)=>{var a=t.key;return a&&(e[a]=t.header??""),e},{});return{...e,...t}};header=(e,t=!1)=>{if(!this.isEmptyString(e))return e=this.headers.hasOwnProperty(e)?this.headers[e]:e,"upper"===t?e.toUpperCase():"lower"===t?e.toLowerCase():e;this.logger.error("header() debe recibir una clave")};_renderSlider=()=>{var e,t,a,r,o,i,s;this.render_slider&&!this.content_outside&&!this.no_info&&(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>e.remove()),(e=document.createElement("div")).className="pm-backdrop",(t=document.createElement("dialog")).id="slider"+this.scope_sufix,t.classList.add("pm-container","pm-slider","js-slider"+this.scope_sufix),t.style.display="none",t.role="region",t.ariaLive="polite",t.ariaLabel="Panel de información",(a=document.createElement("i")).classList.add("pmi","pmi-close"),a.ariaHidden="true",(r=document.createElement("button")).classList.add("btn","pm-btn-xs","btn-secondary","pm-btn-close","js-close-slider"+this.scope_sufix),r.setAttribute("autofocus","autofocus"),r.title="Cerrar panel",r.tabIndex=0,r.ariaLabel="Cerrar panel de información",o={attributes:{tabIndex:0},id:"js-anchor-slider"+this.scope_sufix,css:["sr-only"]},this.addAnchorElement(o),(o=document.createElement("article")).classList.add("pm-content-container"),(s=document.createElement("div")).classList.add("pm-content","js-content"+this.scope_sufix),s.tabIndex=0,(i=document.createElement("footer")).classList.add("pm-footer","js-footer"+this.scope_sufix),o.appendChild(s),o.appendChild(i),r.appendChild(a),t.appendChild(r),t.appendChild(o),s=document.querySelector(this.scope_selector+".poncho-map"))&&(s.appendChild(e),s.appendChild(t),this._sliderElement=t)};_removeTooltips=()=>{let t=this;this.map.eachLayer(function(e){"tooltipPane"===e.options.pane&&e.removeFrom(t.map)})};_showSlider=e=>{this._removeTooltips(),e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):this.fit_bounds_onevent&&this.map.fitBounds(e.getBounds().pad(.005)),e.fireEvent("click")};_showPopup=e=>{e.hasOwnProperty("_latlng")?this.markers.zoomToShowLayer(e,()=>{e.openPopup()}):(this.map.fitBounds(e.getBounds().pad(.005)),e.openPopup())};removeHash=()=>history.replaceState(null,null," ");hasHash=()=>window.location.hash.replace("#","")||!1;gotoHashedEntry=()=>{var e=this.hasHash();e&&this.gotoEntry(e)};gotoEntry=(t,a=!1,e=!1)=>{let r=this.entry(t),o=!1,i=(e,t,a,r)=>{e.options.hasOwnProperty("id")&&e.options.id==t&&(o=!0,this._setSelectedMarker(t,e),this.hash&&this.addHash(t),r&&e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):r&&e.getBounds&&this.map.fitBounds(e.getBounds().pad(.005)),this.slider?this._showSlider(e,a):this._showPopup(e))};this.markers.eachLayer(e=>i(e,t,r,a)),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&i(e,t,r,a)}),!o&&e&&(e=this.entries.find(e=>e.properties[this.id]==t))&&(this.markersMap([e]),this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider(),this._listeners(),e=Array.from(this.markers.getLayers()).find(e=>e.options&&e.options.id==t))&&(this._setSelectedMarker(t,e),this.hash&&this.addHash(t),a&&e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):a&&e.getBounds&&this.map.fitBounds(e.getBounds().pad(.005)),this.slider?this._showSlider(e,r):this._showPopup(e))};_calcPanOffset=e=>{var t,a,r;return!this._sliderElement||(a=(t=this._sliderElement.offsetWidth+15)+40,(r=this._mapWidth())<this.media_breakpoint.sm)?0:(e=e.latlng||e.target?.getLatLng&&e.target.getLatLng())?(e=this.map.latLngToContainerPoint(e).x,r-a<e?Math.round(e-(r-t)+80):0):(this.logger.warn("_calcPanOffset","No se puede acceder a latlng"),0)};_setClickeable=a=>{a.on("click keypress",e=>{document.querySelectorAll(".marker--active").forEach(e=>e.classList.remove("marker--active"));var t=e.sourceTarget._icon||e.sourceTarget._path,t=(t&&t.classList.add("marker--active"),this.entries.find(e=>e?.properties?.[this.id]===a.options.id)),t=(t&&this.setContent(t.properties),this._calcPanOffset(e));t&&this.pan_by&&e.target._map.panBy([t,0],{animate:!0,duration:.5,easeLinearity:.25})})};isFeature=e=>!!e.hasOwnProperty("feature");_clickeableFeatures=()=>{this.reset_zoom&&this.map.eachLayer(e=>{this.isFeature(e)&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&"n"!=e?.feature?.properties["pm-interactive"]&&this._setClickeable(e)})};_clickeableMarkers=()=>{this.no_info||this.markers.eachLayer(this._setClickeable)};_urlHash=()=>{if(this.hash){let t=e=>{e.on("keypress click",()=>{this.addHash(e.options.id)})};this.markers.eachLayer(t),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&t(e)})}};removeListElement=(e,t)=>{t=e.indexOf(t);return-1<t&&e.splice(t,1),e};_templateTitle=t=>{if(!t.hasOwnProperty(this.title))return!1;var a=this.template_structure,e=!!a.hasOwnProperty("title")&&a.title,r=this.title||!1;if(a.hasOwnProperty("title")&&"boolean"==typeof a.title)return!1;if(!e&&!r)return!1;e=e||r;let o;if(a?.header){let e=a.header;if("function"==typeof a.header&&(e=a.header(this,t)),!this.isString(e)||this.isEmptyString(e))return void this.logger.warn("template_Structure['header'] debe ser una cadena de texto no vacía");var r=this.tpl(e,t),i=document.createElement("div");this.template_innerhtml?i.innerHTML=secureHTML(r,this.allowed_tags):i.innerHTML=this._mdToHtml(r),o=i}else(o=document.createElement("h2")).classList.add(...a.title_classlist),o.textContent=t[e];r=document.createElement("header");return r.className="pm-header",r.appendChild(o),r};_templateList=e=>{if(this.template_structure?.values?.length)return this.template_structure.values;let a=Object.keys(e);if(this.template_structure?.exclude?.length){let t=new Set(this.template_structure.exclude);a=a.filter(e=>!t.has(e))}return a};_mdToHtml=e=>this.template_markdown&&this._markdownEnable()?new showdown.Converter(this.markdown_options).makeHtml(String(e).trim()):e;_markdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_templateMixing=s=>{if(this.template_structure.hasOwnProperty("mixing")&&0<this.template_structure.mixing.length){var e=this.template_structure.mixing;let i={};return e.forEach(e=>{var{values:t,separator:a=", ",key:r,template:o}=e;void 0===r?this.showAlert({title:"Mixing requiere un valor en el atributo «key».",terminal:e},"warning"):this.isString(o)&&!this.isEmptyString(o)?i[r]=this.tpl(o,s):Array.isArray(t)&&0<t.length&&(i[r]=t.map(e=>s.hasOwnProperty(e)?s[e]:"").filter(Boolean).join(a))}),Object.assign({},s,i)}return s};_resolveValue=(e,t=!1,a=!1)=>"function"==typeof e?e(this,t,a):e;_setClassList=e=>{let t=e=>String(e).split(/\s|\,|\#|\./).filter(Boolean);return this.isString(e)?t(e):Array.isArray(e)&&0<e.length?e.flatMap(e=>t(e)):[]};_lead=e=>{if(this.template_structure.hasOwnProperty("lead"))if(this.template_structure.lead.hasOwnProperty("key")){var t,{key:a,css:r="small",style:o=!1}=this.template_structure.lead;if(e.hasOwnProperty(a))return(t=document.createElement("p")).textContent=e[a],(a=this._resolveValue(o,e))&&this._setStyle(t,a),(o=this._setClassList(this._resolveValue(r,e)))&&t.classList.add(...o),t}else this.showAlert({title:"Lead requiere la clave «key»",messages:["En la sección de configuraciones verifique que, dentro de <code>template_structure</code>, la entrada <code>lead</code> contenga la clave <code>key</code>.","Compruebe que la clave esté escrita de forma correcta y que no haya espacios o caracteres inválidos."],terminal:this.template_structure.lead},"warning")};_termIcon=(e,t)=>{var a=this.header_icons.find(e=>e.key===t);if(a){var{css:a=!1,style:r=!1,html:o=!1}=a,o=this._resolveValue(o,e,t),r=this._resolveValue(r,e,t),a=this._setClassList(this._resolveValue(a,e,t));if(Array.isArray(a)&&0<a.length)return(e=document.createElement("i")).setAttribute("aria-hidden","true"),e.classList.add(...a),r&&this._setStyle(e,r),e;if(o)return(a=document.createElement("template")).innerHTML=secureHTML(o,this.allowed_tags),a.content}return!1};defaultTemplate=(e,a)=>{a=this._templateMixing(a);var r,o,i,s=this.template_structure,n=this._templateList(a),t=this._templateTitle(a),l=document.createElement("div"),c=(l.classList.add(...s.container_classlist),document.createElement(s.definition_list_tag));c.classList.add(...s.definition_list_classlist),c.style.fontSize="1rem";for(let t of n)a.hasOwnProperty(t)&&a[t]&&(r=document.createElement(s.term_tag),this.header_icons.find(({key:e})=>e===t)&&r.classList.add("pm-term-icon-helper"),r.classList.add(...s.term_classlist),(o=this._termIcon(a,t))&&(r.appendChild(o),r.insertAdjacentText("beforeend"," ")),r.insertAdjacentText("beforeend",this.header(t)),(o=document.createElement(s.definition_tag)).classList.add(...s.definition_classlist),this.template_markdown?(i=secureHTML(a[t],["*"]),i=this._mdToHtml(this.tpl(i,a)),o.innerHTML=i):this.template_innerhtml?(i=secureHTML(a[t],this.allowed_tags),o.innerHTML=this.tpl(i,a)):o.textContent=a[t],""!=this.header(t)&&c.appendChild(r),c.appendChild(o));n=this._lead(a);return n&&t.prepend(n),t&&l.appendChild(t),l.appendChild(c),l.outerHTML};_getMarkerColorType=()=>this.marker_color&&"boolean"!=typeof this.marker_color?"string"==typeof this.marker_color?"string":"function"==typeof this.marker_color?"function":"none":"none";icon=(e="azul")=>{var t;return this._icon_cache.has(e)?this._icon_cache.get(e):(t=new L.icon({iconUrl:"https://www.argentina.gob.ar/sites/default/files/"+`marcador-${e}.svg`,iconSize:[29,40],iconAnchor:[14,40],popupAnchor:[0,-37]}),this._icon_cache.set(e,t),t)};resetView=()=>this.map.setView(this.map_view,this.map_zoom);fitBounds=e=>{var t,a=this.isObject(this.fit_bounds_options)?this.fit_bounds_options:{};"number"==typeof e&&(a.padding=e);let{padding:r=.005,maxZoom:o=22,animate:i=!0,duration:s=.25}=a;try{return this.geojson?(t=this.geojson.getBounds()).isValid()?("satelital"===this.map_layers_default&&17<o&&(o=17),this.map.fitBounds(t.pad(r),{maxZoom:o,animate:i,duration:s}),!0):(this.logger.warn("fitBounds","No hay bounds válidos para ajustar"),!1):(this.logger.warn("fitBounds","No hay geojson disponible"),!1)}catch(e){return this.logger.error("fitBounds",e),!1}};_resetViewButton=()=>{this.reset_zoom&&(document.querySelectorAll(".js-reset-view"+this.scope_sufix).forEach(e=>e.remove()),document.querySelectorAll(this.scope_selector+" .leaflet-control-zoom-in").forEach(e=>{var t=document.createElement("i"),a=(t.classList.add("pmi","pmi-expand"),t.ariaHidden="true",{link:"#",title:this._t("map_full_view"),attributes:{role:"button",tabIndex:0},aria_label:this._t("map_full_view"),css:["js-reset-view"+this.scope_sufix,"leaflet-control-zoom-reset"]}),a=this.addAnchorElement(a);a.appendChild(t),e.after(a)}))};marker=e=>{switch(this._marker_color_type){case"none":return null;case"string":return this.icon(this.marker_color);case"function":var t=this.marker_color(this,e);return"string"==typeof t?this.icon(t):t;default:return null}};_clearLayers=()=>{this.markers.clearLayers(),this.map.eachLayer(e=>{this.isFeature(e)&&this.map.removeLayer(e)})};markersMap=e=>{this._clearLayers();let s=this.tooltip,n=!this.no_info&&!this.slider;var t="function"==typeof this.template;let l=this.title,c=this.id,d=this.tooltip_options,r=this.featureStyle,p=this,h=t?e=>this.template(this,e):e=>this.defaultTemplate(this,e),a=(e,t,a=!1)=>e.hasOwnProperty(t)?e[t]:a||r[t];this.geojson=new L.geoJson(e,{pointToLayer:function(e,t){var e=e.properties,a=p.marker(e),r=e[l],o=p._tooltipLabel(e,r),i={id:e[c]},a=(a&&(i.icon=a),r&&(i.alt=r),new L.marker(t,i));return p.map.options.minZoom=p.min_zoom,p.markers.addLayer(a),s&&r&&a.bindTooltip(o,d),n&&a.bindPopup(h(e)),p.markers},onEachFeature:function(e,t){var{properties:a,geometry:r}=e,r=r.type,o=a[l],i=p._tooltipLabel(a,o),e=(t.options.id=a[c],e.properties.name=o,"n"===a["pm-interactive"]&&(t.options.interactive=!1),"Point"!==r&&"MultiPoint"!==r);e&&(s&&o&&t.bindTooltip(i,d),n)&&t.bindPopup(h(a))},style:function(e){e=e.properties;return{color:a(e,"stroke-color",a(e,"stroke")),strokeOpacity:a(e,"stroke-opacity"),weight:a(e,"stroke-width"),fillColor:a(e,"stroke"),opacity:a(e,"stroke-opacity"),fillOpacity:a(e,"fill-opacity")}}}),this.geojson.addTo(this.map)};_setSelectedMarker=(e,t)=>{e={entry:this.entry(e),marker:t};return this.selected_marker=e};_selectedMarker=()=>{this.map.eachLayer(t=>{this.isFeature(t)&&t.on("click",e=>{this._setSelectedMarker(t.options.id,t)})})};_hiddenSearchInput=()=>{var e,t=document.querySelector(this.scope_selector+".poncho-map");t?((e=document.createElement("input")).type="hidden",e.name="js-search-input"+this.scope_sufix,e.id="js-search-input"+this.scope_sufix,e.disabled=!0,t.appendChild(e)):this.logger.error(`Contenedor no encontrado: ${this.scope_selector}.poncho-map`)};_setFetureAttributes=()=>{let{title:o,id:i}=this;this.map.eachLayer(e=>{var t,{_path:e,feature:a,_leaflet_id:r}=e;a&&e&&(a=a.properties,t="n"!==a?.["pm-interactive"],Object.assign(e,{"aria-label":a?.[o],tabIndex:"n"===a["pm-interactive"]?-1:0,"data-entry-id":a?.[i],"data-leaflet-id":r,"data-interactive":t?null:"n",role:t?"button":"graphics-symbol"}))})};_accesibleAnchors=()=>{var e=[{selector:this.scope_selector+" .leaflet-map-pane",id:"leaflet-map-pane"+this.scope_sufix,attributes:{tabIndex:0,role:"region"}},{selector:this.scope_selector+" .leaflet-control-zoom",id:"leaflet-control-zoom"+this.scope_sufix,attributes:{"aria-label":this._t("zoom_aria_label_panel"),role:"region",tabIndex:0}},{selector:".js-themes-tool-button"+this.scope_sufix,id:"themes-tool-button"+this.scope_sufix,attributes:{"aria-label":this._t("theme_aria_label_panel"),role:"region",tabIndex:0}}];return e.forEach(e=>{var{selector:e,id:t,attributes:a}=e,r=document.querySelector(e);if(r)for(var o in r.id=t,a)r.setAttribute(o,a[o])}),e};_accesibleMenu=()=>{document.querySelectorAll(this.scope_selector+" .pm-accesible-nav").forEach(e=>e.remove());var e=this._accesibleAnchors();let t=[{label:this._t("map_goto_markers"),link:"#"+e[0].id},{label:this._t("map_fit_bounds"),link:"#",css:["js-fit-bounds"]},{label:this._t("map_full_view"),link:"#",css:["js-reset-view"+this.scope_sufix]}];this.map_init_options.hasOwnProperty("zoomControl")&&!1===this.map_init_options.zoomControl||t.splice(2,0,{label:this._t("zoom_goto_panel"),link:"#"+e[1].id}),this.theme_tool&&t.push({label:this._t("theme_change"),link:"#"+e[2].id,css:["js-themes-tool-button"+this.scope_sufix]});e=[{label:this._t("map_exit"),link:"#accesible-return-nav"+this.scope_sufix}],t=[...t,...this.accesible_menu_filter,...this.accesible_menu_search,...this.accesible_menu_extras,...e],e=document.createElement("i");e.classList.add("pmi","pmi-universal-access","accesible-nav__icon"),e.ariaHidden="true";let a=document.createElement("div"),o=(a.classList.add("pm-accesible-nav","top","pm-list"),a.id="pm-accesible-nav"+this.scope_sufix,a.ariaLabel="Menú para el mapa",a.role="navigation",a.tabIndex=0,document.createElement("ul"));o.role="menu",o.classList.add("pm-list-unstyled"),t.forEach(e=>{var{label:t,css:a=[],aria_label:r}=e,e={...e,label:this._t(t),aria_label:this._t(r),css:[...a,"pm-item-link","pm-accesible"],attributes:{role:"menuitem",tabIndex:0}},t=this.addAnchorElement(e),r=document.createElement("li");r.role="presentation",r.appendChild(t),o.appendChild(r)}),a.appendChild(e),a.appendChild(o);var r={label:"Ir al menú del mapa",link:"#pm-accesible-nav"+this.scope_sufix,id:"accesible-return-nav"+this.scope_sufix,css:["pm-item-link","pm-accesible"],attributes:{tabIndex:0}},r=this.addAnchorElement(r);let i=document.createElement("div");i.classList.add("pm-accesible-nav","bottom"),i.appendChild(e.cloneNode(!0)),i.appendChild(r),document.querySelectorAll(""+this.scope_selector).forEach(e=>{e.insertBefore(a,e.children[0]),e.appendChild(i)}),this.fit()};fit=()=>document.querySelectorAll(this.scope_selector+" .js-fit-bounds").forEach(e=>{e.onclick=e=>{e.preventDefault(),this.fitBounds()}});clearAll=()=>{[".js-filter-container"+this.scope_sufix,".js-slider"+this.scope_sufix].forEach(e=>document.querySelectorAll(e).forEach(e=>e.remove()))};cleanState=()=>history.replaceState(null,null," ");_listeners=()=>{let t=this,e=e=>{e.target.closest(".js-reset-view"+this.scope_sufix)&&(e.preventDefault(),t.cleanState(),t.resetView())},a=e=>{e.target.closest(".js-themes-tool-button"+t.scope_sufix)&&(e.preventDefault(),document.querySelector("#themes-tool-button"+t.scope_sufix).focus({focusVisible:!0,preventScroll:!1}))};document.body.addEventListener("click",e),document.body.addEventListener("click",a),this.removeListeners=()=>{document.body.removeEventListener("click",e),document.body.removeEventListener("click",a)}};_accesibleExtras=()=>{document.querySelectorAll(".js-poncho-map__help").forEach(e=>e.ariaLive="polite")};_addSummary=()=>{if("boolean"!=typeof this.summary&&!this.isEmptyObject(this.summary)&&!this.isEmptyString(this.summary)){let e,t=!1;this.isString(this.summary)?e=this.summary:this.isObject(this.summary)&&this.summary.hasOwnProperty("title")&&(t=!0,e=this.summary.title);var a=".poncho-map"+this.scope_selector,a=document.querySelector(a);if(a){var r="summary_"+this.map_selector,o=a.parentNode,i=(a.ariaLabelledby!==r&&a.setAttribute("aria-labelledby",r),document.querySelector("#"+r)||document.createElement("p"));if(i.textContent=e,i.id=r,i.classList.add("pm-summary"),t){var{style:r,css:s,position:n="top",hidden:l=!1}=this.summary;if(i.classList.add(...this._setClassList(s)),this._setStyle(i,r),l&&(i.className="pm-visually-hidden"),"bottom"==n)return void o.insertBefore(i,a.nextSibling)}o.insertBefore(i,a)}}};_setStyle=(e,t)=>{if(t)if(this.isObject(e)&&e instanceof HTMLElement){var a=/([^;:]+)\s*\:\s*([^;:]+)/;if(!this.isString(t)||this.isEmptyString(t)||t.match(a)){if(!this.isObject(t)||this.isEmptyObject(t)){var r,o={};for(r of t.split(";")){var i,s=a.exec(r);s&&([,s,i]=s.map(e=>e.trim()),o[s]=i)}return Object.assign(e.style,o)}for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}else this.showAlert({title:"La función <code>_setStyle</code>, debe recibir un objeto del tipo clave/valor o una cadena de texto con una sintaxis CSS.",terminal:[typeof t,t]},"danger",!0)}else this.showAlert({title:"La función <code>_setStyle</code>, debe recibir un objeto <code>HTMLElement</code>.",terminal:[typeof e,e]},"danger",!0)};render=()=>{this._addSummary(),this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),this.tileLayer.addTo(this.map),this.markersMap(this.entries),this._selectedMarker(),this.slider&&(this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider()),this._urlHash(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this._setFetureAttributes(),this._accesibleMenu(),this._accesibleExtras(),this._setSliderSize(),this.mapOpacity(),this.mapBackgroundColor(),this._listeners(),this.layerViewConf.setVisuals(),this.setMapAlignment(this.map_align)}}class PonchoMapLoader{constructor(e){e=Object.assign({},{close_delay:500,cover_opacity:1,cover_style:{},debug:!1,scope:"",selector:".poncho-map",timeout:5e4},e);this.scope=e.scope,this.cover_opacity=e.cover_opacity,this.cover_style=e.cover_style,this.timeout=e.timeout,this.scope_sufix="--"+this.scope,this.scope_selector=`[data-scope="${this.scope}"]`,this.ponchoLoaderTimeout=null,this._closeTimeoutId=null,this.selector=e.selector,this.close_delay=e.close_delay,this.debug=e.debug}remove=()=>{this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null);var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix);e&&(e.remove(),this.debug)&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader removed.`)};close=(e=!1)=>{e?this.remove():(this._closeTimeoutId&&clearTimeout(this._closeTimeoutId),this._closeTimeoutId=setTimeout(()=>{var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix);e&&e.remove(),this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null),this._closeTimeoutId=null,this.debug&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader closed.`)},this.close_delay))};load=()=>{this._closeTimeoutId&&(clearTimeout(this._closeTimeoutId),this._closeTimeoutId=null),this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null);var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix),e=(e&&e.remove(),document.querySelector(""+this.selector+this.scope_selector)),t=document.createElement("span"),a=(t.className="loader",document.createElement("div"));a.dataset.scope=this.selector,a.classList.add("poncho-map__loader","js-poncho-map__loader"+this.scope_sufix),Object.assign(a.style,this.cover_style),this.cover_opacity&&(a.style.backgroundColor="color-mix(in srgb, transparent, var(--pm-loader-background) "+100*this.cover_opacity.toString()+"%)"),a.appendChild(t),e.appendChild(a),this.debug&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader started.`),this.ponchoLoaderTimeout=setTimeout(()=>{this.remove()},this.timeout)};loader=(e,t=500)=>{this.load(),setTimeout(()=>{e(),this.remove()},t)}}class PonchoMapFilter extends PonchoMap{constructor(e,t){super(e,t);e=Object.assign({},{filters:[],filters_info:!1,filters_visible:!1,fit_bounds_after_filter:!1,messages:{has_filters:"filters_has",initial:"filter_initial",no_results:"filter_no_results",no_results_by_term:"filter_no_results_by_term",one_result:"filter_one_result",reset:"filter_reset_values_link",results:"filter_results"},search_fields:[]},t);this.filters=e.filters,this.fit_bounds_after_filter=Boolean(e.fit_bounds_after_filter),this.filters_info=Boolean(e.filters_info),this.filters_visible=Boolean(e.filters_visible),this.valid_fields=["checkbox","radio","select"],this.search_fields=e.search_fields,this.messages=e.messages,this.accesible_menu_filter=[{aria_label:"filters_aria_label_reset",css:["js-poncho-map-reset"+this.scope_sufix],label:"filters_reset",link:"#"}],0<this.filters.length&&this.accesible_menu_filter.push({label:"Ir al panel de filtros",link:"#filtrar-busqueda"+this.scope_sufix}),this._fieldsCache=new Map}_helpText=e=>{var t=document.querySelectorAll(this.scope_selector+" .js-poncho-map__help");let r={anchor:"#",filter_class:"js-close-filter"+this.scope_sufix,reset_search:"js-poncho-map-reset"+this.scope_sufix,term:this.inputSearchValue,total_entries:this.entries.length,total_filtered_entries:this.filtered_entries.length,total_results:e.length};t.forEach(e=>{e.innerHTML="";var t=document.createElement("ul"),a=(t.classList.add("m-b-0","list-unstyled"),e=>{var t=document.createElement("li");return t.ariaLive="polite",t.innerHTML=e,t.tabIndex=0,t});r.total_entries===r.total_results?t.appendChild(a(this._t(this.messages.initial,r))):r.total_results<1?t.appendChild(a(this._t(this.messages.no_results_by_term,r)+this._t(this.messages.reset,r))):""===this.inputSearchValue&&r.total_results<1?t.appendChild(a(this._t(this.messages.no_results,r)+this._t(this.messages.reset,r))):1==r.total_results?t.appendChild(a(this._t(this.messages.one_result,r)+this._t(this.messages.reset,r))):1<r.total_results&&t.appendChild(a(this._t(this.messages.results,r)+this._t(this.messages.reset,r))),e.appendChild(t)})};_filterPosition=e=>{e=/^([\w\-]+?)(?:__([0-9]+))(?:__([0-9]+))?$/gm.exec(e);return e?[e[1],e[2]]:null};isFilterOpen=()=>document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.contains("filter--in");toggleFilter=()=>{document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.toggle("filter--in")};_filterContainerHeight=()=>{var e=document.querySelector(".js-filter-container"+this.scope_sufix),t=document.querySelector(".js-close-filter"+this.scope_sufix),a=e.offsetParent.offsetHeight,r=3*this._cssVarComputedDistance(),a=a-e.offsetTop-t.offsetHeight-r,e=document.querySelector(".js-poncho-map-filters"+this.scope_sufix),t=(e.style.maxHeight=a+"px",e.offsetHeight-55),r=document.querySelector(".js-filters"+this.scope_sufix);r.style.height=t+"px",r.style.overflow="auto"};_clickToggleFilter=()=>{var e=".js-close-filter"+this.scope_sufix;return document.querySelectorAll(e).forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.toggleFilter(),this._filterContainerHeight()})})};_setFilter=e=>{let[t,a="checked"]=e;e=this.entries.map(e=>{if(e.properties.hasOwnProperty(t))return e.properties[t]}).filter(Boolean),e=[...new Set(e)].map(e=>[t,e,[e],a]);return e.sort((e,t)=>{e=e[1].toUpperCase(),t=t[1].toUpperCase();return t<e?1:e<t?-1:0}),e};_fieldsToUse=(e,t=null)=>{if(null!==t&&this._fieldsCache.has(t))return this._fieldsCache.get(t);var{type:a="checkbox",fields:r=!1,field:o=!1}=e;r||o||this.showAlert({title:"Filters requiere el uso del atributo <code>field</code> o <code>fields</code>.",terminal:e},"warning"),o&&"radio"===a&&(o[1]=!1);let i=r||this._setFilter(o);return"radio"===a&&!1===r&&(e=i.map(e=>e[1]),i=[[i[0][0],"Todos",e,"checked"],...i]),null!==t&&this._fieldsCache.set(t,i),i};_fields=(e,t)=>{var a=this._fieldsToUse(e),r=this.valid_fields.includes(e.type)?e.type:"checkbox";return"select"===r?this._createSelectField(a,t,"__"):this._createCheckableFields(a,t,r,e.type,"__")};_createSelectField=(e,o,i)=>{let s=document.createElement("select");s.className="pm-form-control";var t=this.filters[o];let a,r;var n=0<e.length?e[0][0]:"",l=["select",n,o].join(i),c=(s.name=[n,o].join(i),s.id=l,a=t?.all_options_text&&this.isString(t.all_options_text)&&!this.isEmptyString(t.all_options_text)?t.all_options_text:this._t("filter_select_all_option_text"),document.createElement("option")),c=(c.textContent=a,c.value="",s.appendChild(c),e.forEach((e,t)=>{var[e,a]=e,r=document.createElement("option"),e=["id",e,o,t].join(i);r.textContent=a,r.id=e,r.value=t,s.appendChild(r)}),document.createElement("label"));c.setAttribute("for",l),r=t?.label&&this.isString(t.label)&&!this.isEmptyString(t.label)?t.label:this._t("filter_select_label",{header:this.header(n,"lower")}),!1===t.show_label&&c.classList.add("pm-visually-hidden"),c.classList.add("m-b-xs"),c.textContent=r;document.createElement("div").classList.add("pm-form-group");e=document.createElement("div");return e.classList.add("m-b-2","m-t-xs"),e.appendChild(c),e.appendChild(s),e};_createCheckableFields=(e,s,n,l,c)=>{let d=document.createElement("div");d.classList.add("field-list","m-b-05"),e.forEach((e,t)=>{var[e,a,,r]=e,o=["id",e,s,t].join(c),i=document.createElement("input"),r=(i.type=n,i.id=o,i.className="form-check-input",i.value=t,i.name=("radio"===l?[e,s]:[e,s,t]).join(c),"checked"===r&&(i.checked=!0),document.createElement("span")),e=(r.dataset.info=[e,s,t].join(c),document.createElement("label")),t=(e.textContent=a,e.className="form-check-label",e.htmlFor=o,e.appendChild(r),document.createElement("div"));t.className="form-check",t.appendChild(i),t.appendChild(e),d.appendChild(t)});e=document.createElement("div");return e.appendChild(d),e};_filterButton=()=>{var e=document.querySelector(".poncho-map"+this.scope_selector),t=document.createElement("i"),a=(t.ariaHidden="true",t.classList.add("pmi","pmi-filter"),document.createElement("button")),r=(a.classList.add("pm-btn","pm-btn-rounded-circle","pm-my-1","js-close-filter"+this.scope_sufix),a.id="filtrar-busqueda"+this.scope_sufix,a.role="button",a.ariaLabel=this._t("filters_aria_label_open_close_panel"),a.title=this._t("filters_aria_label_open_close_panel"),a.ariaControls="poncho-map-filters"+this.scope_sufix,document.createElement("div"));r.classList.add("js-filter-container"+this.scope_sufix,"filter-container"),a.appendChild(t),r.appendChild(a),e.appendChild(r)};_cssVarComputedDistance=()=>{var e=document.querySelector(".poncho-map"),e=getComputedStyle(e).getPropertyValue("--pm-slider-distance");return parseInt(e.toString().replace(/[^0-9]*/gm,""))||0};_controlZoomSize=()=>{var e=document.querySelector(this.scope_selector+" .leaflet-control-zoom");return{controlHeight:e.offsetHeight,controlTop:e.offsetTop}};_filterContainer=()=>{var e=document.createElement("i"),t=(e.classList.add("pmi","pmi-close"),e.ariaHidden="true",document.createElement("button")),a=(t.classList.add("btn","btn-xs","btn-secondary","pm-btn-close","js-close-filter"+this.scope_sufix),t.title="Cerrar panel",t.role="button",t.ariaLabel=this._t("filters_aria_label_close_panel"),document.createElement("div")),r=(a.classList.add("js-filters"+this.scope_sufix,"pm-filters-content"),document.createElement("form"));r.classList.add("js-formulario"+this.scope_sufix);let o=document.createElement("div");o.classList.add("js-poncho-map-filters"+this.scope_sufix,"pm-container","poncho-map-filters","pm-caret","pm-caret-t"),o.role="region",o.ariaLive="polite",o.ariaLabel=this._t("filters_aria_label_panel"),o.id="poncho-map-filters"+this.scope_sufix,this.filters_visible&&o.classList.add("filter--in");var i=this._controlZoomSize();let s=i.controlHeight+i.controlTop+"px";t.appendChild(e),r.appendChild(t),r.appendChild(a),o.appendChild(r),document.querySelectorAll(".js-filter-container"+this.scope_sufix).forEach(e=>{e.style.top=s,e.appendChild(o)})};_checkUncheckButtons=e=>{var t=document.createElement("div"),a=(t.classList.add("select-items","form-check"),document.createElement("input")),r=(a.type="checkbox",a.id="check-all-"+e.field[0],a.classList.add("js-select-all-checkbox","form-check-input"),a.dataset.field=e.field[0],a.checked=!0,document.createElement("label"));return r.classList.add("form-check-label"),r.htmlFor="check-all-"+e.field[0],r.textContent=this._t("filters_check_all"),t.appendChild(a),t.appendChild(r),t};_createFilters=e=>{let a=document.querySelector(".js-filters"+this.scope_sufix);e.forEach((e,t)=>{e=this._createFilterFieldset(e,t);a.appendChild(e)})};_createFilterFieldset=(e,t)=>{var a=document.createElement("fieldset"),r=this._createFilterLegend(e,t),r=(a.appendChild(r),this._shouldShowCheckUncheckButtons(e)&&(r=this._checkUncheckButtons(e),a.appendChild(r)),this._fields(e,t));return a.appendChild(r),a};_createFilterLegend=(e,t)=>{var a=document.createElement("legend"),r=this.isString(e.legend)&&!this.isEmptyString(e.legend);return a.textContent=r?e.legend:this._t("filter_select_legend",{header:this.header(this._typeByGroup(t),"lower")}),!1===e.show_legend?a.classList.add("pm-visually-hidden"):a.classList.add("m-t-0","m-b-05","color-primary","h6","font-sans-serif"),a};_shouldShowCheckUncheckButtons=e=>{var t=e.hasOwnProperty("check_uncheck_all")&&e.check_uncheck_all,e="radio"!==e?.type&&"select"!==e?.type;return t&&e};formFilters=()=>{var e;return this.filters.length<1?[]:(e=document.querySelector(".js-formulario"+this.scope_sufix),e=new FormData(e),Array.from(e).filter(e=>""!==e[1]).map(e=>{var t=this._filterPosition(e[0]);return[parseInt(t[1]),parseInt(e[1]),t[0]]}))};_typeByGroup=t=>{var e;return"number"==typeof t&&(e=this._defaultFiltersConfiguration().find(e=>e[0]===t))?e[2]:void 0};_defaultFiltersConfiguration=()=>this.filters.map((e,a)=>this._fieldsToUse(e,a).map((e,t)=>[a,t,e[0],"undefinded"!=typeof e[3]&&"checked"==e[3]])).flat();usingFilters=()=>{var e=this._defaultFiltersConfiguration().every(e=>{e=document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]);return!e||e.checked}),t=this.filters.every((e,t)=>"select"!==e.type||(e=e.field?e.field[0]:e.fields&&e.fields[0]?e.fields[0][0]:"",!(e=document.querySelector(`#select__${e}__`+t)))||0===e.selectedIndex);return e&&t};_resetFormFilters=()=>{this._defaultFiltersConfiguration().forEach(e=>{var t=document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]);t&&(t.checked=e[3])}),this.filters.forEach((e,t)=>{"select"===e.type&&(e=e.field?e.field[0]:e.fields&&e.fields[0]?e.fields[0][0]:"",e=document.querySelector(`#select__${e}__`+t))&&(e.selectedIndex=0)});var e=this.scope_selector+" .js-select-all-checkbox";document.querySelectorAll(e).forEach(e=>{e=e.dataset.field;this._updateCheckAllState(e)})};get inputSearchValue(){var e=document.querySelector("#js-search-input"+this.scope_sufix).value.trim();return""!==e&&e}_countOccurrences=(e,a,r)=>e.reduce((e,t)=>a.some(e=>t.properties[r].includes(e))?e+1:e,0);totals=()=>this.formFilters().map(e=>{var t=this._fieldsToUse(this.filters[e[0]],e[0])[e[1]];return[t[1],this._countOccurrences(this.filtered_entries,t[2],t[0]),...e]});_totalsInfo=()=>{this.filters_info&&this.totals().forEach(e=>{var[,e,t,a,r]=e,r=this._getFilterInfoElement(r,t,a);r&&((t=this._createCountBadge(e)).appendChild(document.createTextNode(" ")),r.appendChild(document.createTextNode(" ")),r.appendChild(t))})};_getFilterInfoElement=(e,t,a)=>{e=this.scope_selector+" "+`[data-info="${e}__${t}__${a}"]`;return document.querySelector(e)};_createCountBadge=e=>{var t=document.createElement("small"),e=(t.classList.add("badge","fw-medium","bg-arg-gris-intermedio"),t.textContent=e,this._createAccessibleText(e));return t.appendChild(e),t};_createAccessibleText=e=>{var t=document.createElement("span");return t.textContent=" elemento"+(1===e?"":"s"),t.className="pm-visually-hidden",t};_search=(e,t,a)=>{t=this._fieldsToUse(this.filters[t],t)[a],a=t[0];if(e.hasOwnProperty(a)){var r,t=t[2],o=e[a];for(r of t)if(r&&o.includes(r))return!0}return!1};_validateGroup=(e,t,a)=>{if(0===t.length)return"select"===this.filters[a]?.type;for(var r of t)if(this._search(e,r[0],r[1]))return!0;return!1};_validateEntry=(t,a,r)=>{if(!(r<1))for(let e=0;e<r;e++){var o=a.get(e)||[];if(!this._validateGroup(t,o,e))return!1}return!0};_filterData=()=>{var e=this.formFilters();let t=this.filters.length;var a,r=this.inputSearchValue;let o=!this.isEmptyString(r),i=o?replaceSpecialChars(r).toUpperCase():"",s=o?new Set([this.title,...this.search_fields]):null,n=new Map;for(a of e){var l=a[0];n.has(l)||n.set(l,[]),n.get(l).push(a)}r=this.entries.filter(e=>!!this._validateEntry(e.properties,n,t)&&(!o||this.searchEntry(i,e.properties,s)));return this.filtered_entries=r};_filteredData=e=>{e=void 0!==e?e:this._filterData(),this.markersMap(e),this._selectedMarker(),this._helpText(e),this.slider&&(this._renderSlider(),this._clickeableMarkers(),this._clickeableFeatures(),this._clickToggleSlider()),this._urlHash(),this._setFetureAttributes(),this._accesibleMenu(),this.fit_bounds_after_filter&&this.fitBounds()};_setSearchInputValue=e=>{var t="#js-search-input"+this.scope_sufix;t?document.querySelector(t).value=e:this.logger.warn("No se encuentra el input search")};_clearSearchInput=()=>document.querySelectorAll("#js-search-input"+this.scope_sufix).forEach(e=>e.value="");_resetSearch=()=>{document.addEventListener("click",e=>{if(e.target.matches(".js-poncho-map-reset"+this.scope_sufix)){e.preventDefault(),e.stopPropagation(),this.removeHash();try{var t="#js-search-input"+this.scope_sufix,a=document.querySelector(t);if(!a)return;var r="#id-poncho-map-search--"+a.dataset.searchScope,o=document.querySelector(r);o&&(o.value="")}catch(e){this.logger.error(e)}try{this._resetFormFilters()}catch(e){this.logger.error(e)}try{this._filteredData(this.entries)}catch(e){this.logger.error(e)}try{this._clearSearchInput()}catch(e){this.logger.error(e)}try{this.resetView()}catch(e){this.logger.error(e)}}})};filterChange(t){var e;"function"!=typeof t?this.logger.error("filterChange requiere una función de callback."):(e=".js-filters"+(this.scope_sufix||""),document.querySelectorAll(e).forEach(e=>{e.onchange=t}))}_updateCheckAllState=e=>{var t,a=document.querySelector(this.scope_selector+" #check-all-"+e);a&&(e=this.scope_selector+` [id^=id__${e}]`,0!==(e=Array.from(document.querySelectorAll(e))).length)&&(e=(t=e.filter(e=>e.checked)).length===e.length,t=0===t.length,a.checked=e,a.indeterminate=!e&&!t)};checkUncheckFilters=()=>{var e=this.scope_selector+" .js-select-all-checkbox",e=document.querySelectorAll(e),t=(e.forEach(a=>{a.addEventListener("change",()=>{var e=a.dataset.field;let t=a.checked;e=this.scope_selector+` [id^=id__${e}]`;document.querySelectorAll(e).forEach(e=>e.checked=t),a.indeterminate=!1,this._filteredData()})}),this.scope_selector+" [id^=id__]");document.querySelectorAll(t).forEach(t=>{t.addEventListener("change",()=>{var e=t.id.split("__");2<=e.length&&(e=e[1],this._updateCheckAllState(e)),this._filteredData()})}),e.forEach(e=>{e=e.dataset.field;this._updateCheckAllState(e)})};render=()=>{this._addSummary(),this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),0<this.filters.length&&(this._filterButton(),this._filterContainer(),this._createFilters(this.filters)),this.tileLayer.addTo(this.map),this._filteredData(),this.filterChange(e=>{e.preventDefault(),this._filteredData()}),this.checkUncheckFilters(),this._totalsInfo(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this.filters_visible&&this._filterContainerHeight(),this._setSliderSize(),this.mapOpacity(),this.mapBackgroundColor(),this._listeners(),this._accesibleExtras(),this.layerViewConf.setVisuals(),this.setMapAlignment(this.map_align),this._resetSearch(),this._clickToggleFilter()}}class PonchoMapSearch{constructor(e,t){var a={scope:!1,placeholder:"search_placeholder",search_fields:e.search_fields,sort:!0,sort_reverse:!1,sort_key:"text",datalist:!0,combobox:!1,combobox_options:!1,debounce_delay:300},a=(this.instance=e,Object.assign({},a,t));this.debounce_delay=a.debounce_delay,this.text=e.title||!1,this.datalist=a.datalist,this.combobox=a.combobox,this.combobox_options=a.combobox_options,this.placeholder=a.placeholder,this.scope=a.scope,this.scope_sufix="--"+this.scope,this.sort=a.sort,this.sort_reverse=a.sort_reverse,this.search_scope_selector=this.scope?`[data-scope="${this.scope}"]`:"",this.instance.search_fields=a.search_fields,this.instance.accesible_menu_search=[],this.isSearch()&&this.instance.accesible_menu_search.push({label:"search_data",link:"#id-poncho-map-search"+this.scope_sufix}),this.selectors={datalist:[this.search_scope_selector+" .js-porcho-map-search__list",this.search_scope_selector+" .js-poncho-map-search__list"].join(","),searchInput:this.search_scope_selector+" .js-poncho-map-search__input",scope:this.search_scope_selector,resultItem:this.search_scope_selector+" .js-pm-search-result-item",submit:this.search_scope_selector+" .js-poncho-map-search__submit",searchResultContainer:this.search_scope_selector+" .js-pm-search"},this.cachedDataEntries=[],this._cachedElements={input:null,submit:null,filterSearchInput:null,searchContainer:null},this._searchHandlerBound=!1}_comboboxLabel=e=>{var t;return!this.instance.isObject(this.combobox_options)||this.instance.isEmptyObject(this.combobox_options)?null:(t=this.combobox_options?.template,!this.combobox_options.hasOwnProperty("template")||this.instance.isEmptyString(t)?e[this.text]||null:this.instance.tpl(t,e,["*"]))};_cacheDataEntries=()=>{this.combobox&&(this.instance.entries&&0!==this.instance.entries.length?this.cachedDataEntries=this.instance.entries.map(e=>{if(!e.properties)return null;var t=["name",...new Set(this.instance.search_fields)];let a=e.properties;e=t.map(e=>a[e]).filter(e=>null!=e&&""!==e).map(e=>String(e).trim()),t=slugify(e.join(" ")),e=this._comboboxLabel(a);return{...a,results:t,pm_search_option_template:e}}).filter(e=>null!==e):this.cachedDataEntries=[])};isSearch=()=>!!document.querySelector(this.search_scope_selector);sortData=(e,r)=>{e=e.sort((e,t)=>{var a=e=>{this.instance.removeAccents(e).toUpperCase()};return a(e[r]),a(t[r]),a(e[r]),a(t[r]),0});return this.sort_reverse?e.reverse():e};_triggerSearch=()=>{this._cachedElements.input||(this._cachedElements.input=document.querySelector(this.selectors.searchInput));let t=this._cachedElements.input;var e,a;t&&(a="id-poncho-map-search"+this.scope_sufix,t.id!==a&&((e=document.querySelector(`[for="${t.id}"]`))&&e.setAttribute("for",a),t.id=a),this._cachedElements.submit||(this._cachedElements.submit=document.querySelector(this.selectors.submit)),e=this._cachedElements.submit)&&!this._searchHandlerBound&&(a="#js-search-input"+this.instance.scope_sufix,this._cachedElements.filterSearchInput=document.querySelector(a),this._searchHandlerBound=!0,e.addEventListener("click",e=>{e.preventDefault(),this._cachedElements.filterSearchInput&&(this._cachedElements.filterSearchInput.value=t.value,this._renderSearch(t.value))}))};searchTerm=t=>{var e;this.instance.isEmptyString(t)?this.logger.warn("searchTerm","El término de búsqueda no puede estar vacío."):(e="#js-search-input"+this.instance.scope_sufix,document.querySelectorAll(e).forEach(e=>e.value=t),e="#id-poncho-map-search"+this.scope_sufix,document.querySelectorAll(e).forEach(e=>e.value=t),this.instance._resetSearch(),this._renderSearch(t))};_keyup=()=>{var e=document.querySelectorAll(this.selectors.searchInput);let a=document.querySelector("#js-search-input"+this.instance.scope_sufix);if(a){a.dataset.searchScope=this.scope;let t=e=>{a.value=e.value};e.forEach(e=>{e.addEventListener("keyup",()=>t(e)),e.addEventListener("keydown",()=>t(e))})}};_placeHolder=()=>{if(!this.placeholder)return"";document.querySelectorAll(this.selectors.searchInput).forEach(e=>e.placeholder=this.instance._t(this.placeholder))};_renderSearch=e=>{var t;this.instance.isEmptyString(e)?this.logger.error("_renderSearch","El término de búsqueda no puede estar vacío."):(t=this.instance._filterData(),this.instance.markersMap(t),this.instance.slider&&(this.instance._renderSlider(),this.instance._clickeableFeatures(),this.instance._clickeableMarkers(),this.instance._clickToggleSlider()),this.instance.hash&&this.instance._urlHash(),1==t.length?this.instance.gotoEntry(t[0].properties[this.instance.id],!0,!0):""!=e.trim()&&(this.instance.removeHash(),setTimeout(this.instance.fitBounds,this.instance.anchor_delay)),this.instance._helpText(t),this.instance._resetSearch(),this.instance._setFetureAttributes(),this.instance._accesibleMenu())};_addDataListOptions=()=>{if(!this.datalist)return null;var e=document.querySelector(this.selectors.searchInput);if(!e)return null;let t="id-datalist"+this.scope_sufix,a=(e.setAttribute("list",t),document.createDocumentFragment());this.instance.filtered_entries.filter(e=>e.properties&&e.properties[this.text]).forEach(e=>{var t=document.createElement("option");t.value=e.properties[this.text],a.appendChild(t)}),document.querySelectorAll(this.selectors.datalist).forEach(e=>{e.id=t,e.replaceChildren(a.cloneNode(!0))})};_searchRegion=()=>{var e=document.querySelector(this.search_scope_selector);e.setAttribute("role","region"),e.setAttribute("aria-label","Buscador")};findEntries=e=>{let t=slugify(e);return this.cachedDataEntries.filter(e=>e.results.includes(t))};_creatSearchItem=e=>{var t=e.pm_search_option_template,a=document.createElement("li"),r=(a.setAttribute("role","option"),a.classList.add("m-y-0","pm-search-results__option"),e[this.text]),o=window.location.pathname+"#"+e[this.instance.id],i=document.createElement("a");return i.href=o,i.tabIndex=0,i.dataset.name=r,i.classList.add("js-pm-search-result-item","pm-search-results__action"),i.setAttribute("data-entry-id",e[this.instance.id]),t?i.innerHTML=t:i.textContent=r,a.appendChild(i),a};_comboboxWidth=()=>{var e,t,a;return!!this.combobox_options?.display&&(e=new Set(["expanded","fit-content"]),t="fit-content",a=this.combobox_options.display,e.has(a)?"pm-search-results__"+a:(this.instance.logger.warn("_comboboxWidth",`El estilo "${a}" no es válido. Opciones `+`disponibles: ${Array.from(e).join(", ")}. `+`Usando "${t}" por defecto.`),"pm-search-results__"+t))};_closeSearchResults=()=>{var e=this._cachedElements.searchContainer||document.querySelector(this.selectors.searchResultContainer);e&&(e.classList.remove("pm-search-results"),e.replaceChildren())};searcher=()=>{if(this.combobox){let i=Math.min(Math.max(parseInt(this.combobox_options?.max_results,10)||20,5),50),s=this._comboboxWidth();document.querySelectorAll(this.selectors.datalist).forEach(e=>e.remove());let n=this._cachedElements.input||document.querySelector(this.selectors.searchInput);if(n){document.querySelector(this.search_scope_selector).classList.add("pm-search-combobox"),n.setAttribute("autocomplete","off"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-controls","results-list"),n.setAttribute("role","combobox");let o=document.createElement("div"),e=(o.classList.add("js-pm-search"),o.setAttribute("aria-live","polite"),this._cachedElements.searchContainer=o,{current:null}),t=this.debounce_delay;n.parentElement.after(o),n.addEventListener("keyup",()=>{clearTimeout(e.current),e.current=setTimeout(()=>{o.classList.remove("pm-search-results"),s&&o.classList.remove(s),o.replaceChildren();var e=String(n.value);if(e.trim()&&!(e.length<2)){e=this.findEntries(e);if(!(e.length<1)){var t,a=document.createElement("ul"),r=(a.classList.add("pm-search-results__listbox"),a.setAttribute("role","listbox"),document.createDocumentFragment());for(t of e.slice(0,i))r.appendChild(this._creatSearchItem(t));a.appendChild(r),o.classList.add("pm-search-results"),s&&o.classList.add(s),o.appendChild(a)}}},t)}),n.addEventListener("keydown",e=>{"ArrowDown"==e.key&&(e.preventDefault(),e=o.querySelector(this.selectors.resultItem))&&e.focus()}),o.addEventListener("keydown",e=>{var t,a=e.target;"ArrowDown"==e.key&&(e.preventDefault(),a.matches(this.selectors.resultItem))&&(t=a.closest("li").nextElementSibling)&&(t=t.querySelector(this.selectors.resultItem))&&t.focus(),"ArrowUp"==e.key&&(e.preventDefault(),a.matches(this.selectors.resultItem))&&((t=a.closest("li").previousElementSibling)?(t=t.querySelector(this.selectors.resultItem))&&t.focus():n.focus()),"Tab"!=e.key||!a.matches(this.selectors.resultItem)||a.closest("li").nextElementSibling||e.shiftKey||this._closeSearchResults(),"Escape"==e.key&&(this._closeSearchResults(),n.value="",n.focus())}),window.addEventListener("click",e=>{var t,a=e.target.closest(this.selectors.resultItem);a?(e.preventDefault(),t=a.dataset.entryId,a=a.dataset.name,this.instance._setSearchInputValue(a),n.value=a,this._closeSearchResults(),this.instance.gotoEntry(t,!0,!0)):n.contains(e.target)||o.contains(e.target)||this._closeSearchResults()})}}};render=()=>{this._placeHolder(),this._triggerSearch(),this._addDataListOptions(),this.instance.filterChange(e=>{e.preventDefault(),this.instance._filteredData(),this._addDataListOptions()}),this._searchRegion(),this._keyup(),this.instance._accesibleMenu(),this._cacheDataEntries(),this.searcher()}}function ponchoMapTplSearch(e){var t,a,r,o,i,s;return e&&"object"==typeof e&&({figure:e="",title:s,text:a,separator:t=", "}=e,s)&&"string"==typeof s&&Array.isArray(a)?(a=a.filter(e=>e&&"string"==typeof e),(r=document.createElement("div")).classList.add("pm-search-result-option"),e&&"string"==typeof e&&((o=document.createElement("figure")).classList.add("pm-search-result-option__figure"),(i=document.createElement("img")).src=`{{${e}}}`,i.width=90,i.alt="",i.loading="lazy",i.classList.add("pm-search-result-option__image"),o.appendChild(i),i=`{% '${o.outerHTML}' if ${e} != '' else '' %}`,r.insertAdjacentHTML("beforeend",i)),(o=document.createElement("div")).classList.add("pm-search-result-option__text"),(e=document.createElement("p")).classList.add("m-y-0","fw-semibold","opt-name"),e.textContent=`{{${s}}}`,o.appendChild(e),(i=document.createElement("p")).classList.add("m-y-0","small","text-arg-gris-intermedio","opt-location"),0<a.length&&(s=a.map(e=>`{{${e}}}`).join(t),i.textContent=s),o.appendChild(i),r.appendChild(o),r.outerHTML):null}let PONCHOMAP_GEOJSON_PROVINCES="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geo-provincias-argentinas.json",ponchoMapProvinceMergeData=(e={},t=[],a="provincia")=>{if(!e||!e.hasOwnProperty("features"))throw new Error("Formato de datos inválido.");let o=new Map,i=(t.forEach(e=>{var t;e&&e[a]&&(t=slugify(e[a]),o.set(t,e))}),[]);return e.features.forEach(t=>{if(t.properties&&(t.properties.fna||t.properties.nam)){var a=t.properties.fna?slugify(t.properties.fna):null,r=t.properties.nam?slugify(t.properties.nam):null;let e=null;a&&o.has(a)?e=o.get(a):r&&o.has(r)&&(e=o.get(r)),!e&&(t.properties.fna||t.properties.nam)||(e&&(e.color&&!t.properties["pm-type"]&&(t.properties.stroke=ponchoColor(e.color)),a={...e},"n"===t.properties["pm-interactive"]&&"n"!==a["pm-interactive"]&&delete a["pm-interactive"],Object.assign(t.properties,a)),i.push(t))}}),e.features=i,e},ponchoMapProvinceCssStyles=e=>{if("boolean"==typeof e&&!e){let t=["poncho-map-province__toggle-map","poncho-map-province__toggle-element"];e=t.map(e=>"."+e).join(",");document.querySelectorAll(e).forEach(e=>{e.classList.remove(...t)})}};class PonchoMapProvinces extends PonchoMapFilter{constructor(e,t,a){a=Object.assign({},{map_align:"left",slider_size:"default",fit_bounds:!0,hide_select:!1,initial_entry:!1,map_init_options:{boxZoom:!1,doubleClickZoom:!1,scrollWheelZoom:!1,zoomControl:!0,zoomSnap:.1},map_layers:!1,map_view:[-40.47815508388363,-62.802101128049806],map_zoom:4.4,overlay_image:!0,overlay_image_bounds:[[-20.70565857951651,-24.50543849552044],[-88.20759652502107,-74.4619171280653]],overlay_image_opacity:.8,overlay_image_url:"/profiles/argentinagobar/themes/contrib/poncho/img/map-shadow-antartida.png",province_index:"provincia",random_entry:!1,slider:!0,toggle_select:!0,tooltip:!0,tooltip_options:{className:"leaflet-tooltip-own",direction:"auto",offset:[0,-3],opacity:1,permanent:!1,sticky:!0}},a),ponchoMapProvinceCssStyles(a.toggle_select),e=ponchoMapProvinceMergeData(e,t,a.province_index);super(e,a),this.initialEntry=a.initial_entry,this.randomEntry=a.random_entry,this.overlayImage=a.overlay_image,this.overlayImageUrl=a.overlay_image_url,this.overlayImageBounds=a.overlay_image_bounds,this.overlayImageOpacity=a.overlay_image_opacity,this.mapView=a.map_view,this.toggleSelect=a.toggle_select,this.hideSelect=a.hide_select,this.fitToBounds=a.fit_bounds}sortObject=(e,a=0)=>e.sort((e,t)=>{e=e[a].toUpperCase(),t=t[a].toUpperCase();return t<e?1:e<t?-1:0});hideSelectProvinces=e=>{"boolean"==typeof e&&(e=`[data-scope-related="${this.scope}"]`,document.querySelectorAll(e).forEach(e=>{e.style.display=this.hideSelect?"none":""}))};_randomEntry=e=>e[Math.floor(Math.random()*e.length)][0];_provincesFromGeoJSON=(e,r)=>{let o={};return e.features.map(e=>{var{name:t=!1,"pm-interactive":a=!1}=e.properties;if("n"===a||!t)return!1;o[e.properties[r]]=t}).filter(Boolean),this.sortObject(Object.entries(o),1)};_selectedEntry=e=>{var t=window.location.hash.replace("#","");let a="";return t?a=t:this.initialEntry?a=this.initialEntry:this.randomEntry&&(a=this._randomEntry(e)),a};_setSelectProvinces=e=>{window.location.hash.replace("#","");e=this._provincesFromGeoJSON(e.geoJSON,e.id);let a=this._selectedEntry(e),r=document.getElementById("id_provincia");return[["","Elegí una provincia"],...e].forEach(e=>{var t=document.createElement("option");e[0]===a&&t.setAttribute("selected","selected"),t.value=e[0],t.textContent=e[1],r.appendChild(t)}),{object:r,selected:a}};_selectedPolygon=e=>{e.map.eachLayer(e=>{e.on("keypress click",e=>{e?.target?.feature?.properties&&(e=e.target.feature.properties.id,document.getElementById("id_provincia").value=e)})})};_selectProvinces=t=>{this._selectedPolygon(t);let a=this._setSelectProvinces(t);a.selected&&t.gotoEntry(a.selected),a.object.addEventListener("change",e=>{t.gotoEntry(e.target.value),e.value=a.selected})};_overlayImage=()=>{this.overlayImageUrl&&"string"==typeof this.overlayImageUrl&&"number"==typeof this.overlayImageOpacity&&L.imageOverlay(this.overlayImageUrl,this.overlayImageBounds,{opacity:this.overlayImageOpacity}).addTo(this.map)};renderProvinceMap=()=>{this.hideSelectProvinces(this.hideSelect),this._overlayImage(),this.render(),this.fitToBounds&&this.fitBounds(),this._selectProvinces(this)}}class GapiSheetData{constructor(e){e=Object.assign({},{gapi_key:"AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",gapi_uri:"https://sheets.googleapis.com/v4/spreadsheets/"},e);this.gapi_key=e.gapi_key,this.gapi_uri=e.gapi_uri}url=(e,t,a)=>{if(!e||"string"!=typeof e)throw new Error("El parámetro 'page' es requerido.");if(t&&"string"==typeof t)return a=a||this.gapi_key,[this.gapi_uri,t,"/values/",encodeURIComponent(e),"?key=",a,"&alt=json"].join("");throw new Error("El parámetro 'spreadsheet' es requerido.")};json_data=e=>{if(e&&e.values&&e.values.length)return{feed:e=this.feed(e),entries:this.entries(e),headers:this.headers(e)};throw new Error("El parámetro 'json' debe contener una propiedad 'values' con al menos una fila.")};feed=(e,t=!0)=>{var a=e.values[0],r=/ |\/|_/gi,o=a.length,i=new Array(o);for(let e=0;e<o;e++)i[e]=(t?a[e].toLowerCase():a[e]).replace(r,"");var s=e.values,n=s.length,l=new Array(n-1);for(let e=1;e<n;e++){var c=s[e],d={};for(let e=0;e<o;e++)d[i[e]]=e<c.length?c[e].trim():"";l[e-1]=d}return l};gapi_feed_row=(e,t="-",a=!0)=>{let r=a?"filtro-":"";a=Object.entries(e);let o={};return a.map(e=>o[e[0].replace("gsx$","").replace(r,"").replace(/-/g,t)]=e[1].$t),o};entries=e=>e.slice(1);headers=e=>e[0]}"undefined"!=typeof exports&&(module.exports=GapiSheetData);class TranslateHTML{ATTRIBUTES=["title","placeholder","alt","value","href","src","html.lang"];constructor(e=[],t=[]){this.dictionary=this.sortByLength(e),this.attributes=t.length?t:this.ATTRIBUTES}sortByLength=e=>(e.sort((e,t)=>e[0].length>t[0].length?-1:e[0].length<t[0].length?1:e[0]-t[0]),e);translateAttributes=(e=!1)=>{let t=e||this.dictionary;this.attributes.forEach(e=>{e=e.split(".").slice(-2);let a=2===e.length?e[0]:"",r=2===e.length?e[1]:e[0];t.forEach(t=>{document.querySelectorAll(`${a}[${r}='${t[0]}']`).forEach(e=>e[r]=t[1])})})};translateHTML=(a,r)=>{for(var e,t=document.evaluate("//*/text()",document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),o=[];e=t.iterateNext();)o.push(e);o.forEach(e=>{var t=e.textContent.replace(a,r);t!==e.textContent&&(t=document.createTextNode(t),e.parentNode.replaceChild(t,e))})};translate=()=>{this.dictionary.forEach(e=>{var t=new RegExp(e[0],"g");this.translateHTML(t,e[1])})}}
1
+ let ponchoColorDefinitionsList=[{name:"www.argentina.gob.ar",space:"arg",hidden_space:!1,description:"",data:[{scope:"arg",name:"Azul principal",group:"primary",color:{900:"#232D4F",800:"#2C3C5F",700:"#354B6E",600:"#3E5A7E",500:"#5A7290",400:"#7589A3",300:"#91A1B5",200:"#ACB8C8",100:"#C8D0DA",50:"#E3E7ED"},instance:[{name:"Azul",code:"arg-azul",description:"Color principal",scope:"arg",related_color:"900",parent_group:"primary",color:"#232D4F",variant:[{variant:"half",color:"#9296A7",name:"Azul medio tono",code:"arg-azul-half"},{variant:"lighter",color:"#C8D0DA",name:"Azul muy claro",code:"arg-azul-lighter"}],alias:[{code:"arg-azul",exclude:!1},{code:"primary",exclude:!0},{code:"azul",exclude:!0},{code:"azul-marino",exclude:!0},{code:"primary-alt",exclude:!0},{code:"arg-primary",exclude:!0}]},{name:"Azul cobalto",code:"arg-secundario",description:"",scope:"arg",related_color:"600",parent_group:"primary",color:"#3E5A7E",variant:[],alias:[{code:"arg-secundario",exclude:!1},{code:"secondary",exclude:!0},{code:"secundario",exclude:!0}]},{name:"Primary light",code:"arg-primary-light",description:"",scope:"arg",related_color:"50",parent_group:"primary",color:"#E3E7ED",variant:[],alias:[{code:"arg-primary-light",exclude:!1},{code:"primary-light",exclude:!0}]},{name:"Azul acero",code:"arg-info",description:"",scope:"arg",related_color:"500",parent_group:"primary",color:"#5A7290",variant:[{variant:"lighter",color:"#E3E7ED",name:"Azul acero muy claro",code:"arg-info-lighter"}],alias:[{code:"arg-info",exclude:!1},{code:"info",exclude:!0}]}]},{scope:"arg",name:"Verde",group:"verde",color:{50:"#F1F5D7",100:"#DEE8A3",200:"#CCDB6E",300:"#B9CE39",400:"#93B727",500:"#6EA015",600:"#4E8F24",700:"#2E7D33",800:"#27692A",900:"#1F5421"},instance:[{name:"Verde",code:"arg-verde",description:"",scope:"arg",related_color:"700",parent_group:"verde",color:"#2E7D33",variant:[{variant:"light",color:"#6EA015",name:"Verde claro",code:"arg-verde-light"},{variant:"half",color:"#96BE99",name:"Verde medio tono",code:"arg-verde-half"},{variant:"dark",color:"#1F5421",name:"Verde oscuro",code:"arg-verde-dark"}],alias:[{code:"arg-verde",exclude:!1},{code:"success",exclude:!0},{code:"verde",exclude:!0}]},{name:"Verdín",code:"arg-verdin",description:"",scope:"arg",related_color:"500",parent_group:"verde",color:"#6EA015",variant:[{variant:"light",color:"#B9CE39",name:"Verdín claro",code:"arg-verdin-light"},{variant:"dark",color:"#2E7D33",name:"Verdín oscuro",code:"arg-verdin-dark"}],alias:[{code:"arg-verdin",exclude:!1},{code:"verdin",exclude:!0}]},{name:"Lima",code:"arg-lima",description:"",scope:"arg",related_color:"300",parent_group:"verde",color:"#B9CE39",variant:[{variant:"light",color:"#DEE8A3",name:"Lima claro",code:"arg-lima-light"},{variant:"dark",color:"#6EA015",name:"Lima oscuro",code:"arg-lima-dark"}],alias:[{code:"arg-lima",exclude:!1},{code:"limon",exclude:!0},{code:"lima",exclude:!0}]}]},{scope:"arg",name:"Amarillo",group:"amarillo",color:{50:"#FFFAE8",100:"#FFF1C0",200:"#FFE997",300:"#FFE06E",400:"#FFD745",500:"#FFCE1C",600:"#D8AE18",700:"#B18F15",800:"#8A6F12",900:"#634F0E"},instance:[{name:"Maíz",code:"arg-maiz",description:"",scope:"arg",related_color:"500",parent_group:"amarillo",color:"#FFCE1C",variant:[{variant:"light",color:"#FFE997",name:"Maíz claro",code:"arg-maiz-light"},{variant:"dark",color:"#B18F15",name:"Maíz oscuro",code:"arg-maiz-dark"}],alias:[{code:"arg-maiz",exclude:!1},{code:"maiz",exclude:!0}]}]},{scope:"arg",name:"Fucsia",group:"fucsia",color:{50:"#FCDDE6",100:"#F8B6C9",200:"#F48EAB",300:"#F16798",400:"#ED3F85",500:"#EC407A",600:"#D72C6B",700:"#C2185B",800:"#9A144A",900:"#721038"},instance:[{name:"Arándano",code:"arg-arandano",description:"",scope:"arg",related_color:"700",parent_group:"fucsia",color:"#C2185B",variant:[{variant:"light",color:"#EC407A",name:"Arándano claro",code:"arg-arandano-light"},{variant:"dark",color:"#721038",name:"Arándano oscuro",code:"arg-arandano-dark"},{variant:"half",color:"#E18CAD",name:"Arándano medio tono",code:"arg-arandano-half"},{variant:"lighter",color:"#FCDDE6",name:"Arándano muy claro",code:"arg-arandano-lighter"}],alias:[{code:"arg-arandano",exclude:!1},{code:"arandano",exclude:!0}]},{name:"Fucsia",code:"arg-fucsia",description:"",scope:"arg",related_color:"500",parent_group:"fucsia",color:"#EC407A",variant:[{variant:"light",color:"#F16798",name:"Fucsia claro",code:"arg-fucsia-light"},{variant:"dark",color:"#9A144A",name:"Fucsia oscuro",code:"arg-fucsia-dark"}],alias:[{code:"arg-fucsia",exclude:!1},{code:"cereza",exclude:!0},{code:"fucsia",exclude:!0}]},{name:"Rosado",code:"arg-rosado",description:"",scope:"arg",related_color:"200",parent_group:"fucsia",color:"#F48EAB",variant:[{variant:"light",color:"#FCDDE6",name:"Rosado claro",code:"arg-rosado-light"},{variant:"dark",color:"#ED3F85",name:"Rosado oscuro",code:"arg-rosado-dark"},{variant:"half",color:"#FAC7D5",name:"Rosado medio tono",code:"arg-rosado-half"}],alias:[{code:"arg-rosado",exclude:!1}]}]},{scope:"arg",name:"Violeta",group:"violeta",color:{50:"#E9E6F2",100:"#D3CEE5",200:"#BEB5D8",300:"#A89DCB",400:"#9284BE",500:"#8561B2",700:"#6A1B99",800:"#4B0F7A",900:"#2C035C",600:"#773EA5"},instance:[{name:"Lavanda",code:"arg-lavanda",description:"",scope:"arg",related_color:"400",parent_group:"violeta",color:"#9284BE",variant:[],alias:[{code:"arg-lavanda",exclude:!1},{code:"lavanda",exclude:!0}]},{name:"Uva",code:"arg-uva",description:"",scope:"arg",related_color:"700",parent_group:"violeta",color:"#6A1B99",variant:[],alias:[{code:"arg-uva",exclude:!1},{code:"uva",exclude:!0}]}]},{scope:"arg",name:"Negro",group:"negro",color:{50:"#F0F0F0",100:"#E9E9E9",200:"#DDDDDD",300:"#838383",150:"#DEE2E6",75:"#F2F2F2",500:"#555555",600:"#444444",900:"#141414",25:"#FFFFFF"},instance:[{name:"Negro",code:"arg-negro",description:"Elementos básicos",scope:"arg",related_color:"900",parent_group:"negro",color:"#141414",variant:[{variant:"lighter",color:"#F0F0F0",name:"Negro muy claro",code:"arg-negro-lighter"},{variant:"light",color:"#DDDDDD",name:"Gris",code:"arg-negro-light"}],alias:[{code:"arg-negro",exclude:!1},{code:"negro",exclude:!0},{code:"black",exclude:!0},{code:"gray-base",exclude:!0}]},{name:"Default",code:"arg-default",description:"",scope:"arg",related_color:"300",parent_group:"negro",color:"#838383",variant:[],alias:[{code:"arg-default",exclude:!1},{code:"default",exclude:!0}]},{name:"Gray light",code:"arg-gray-light",description:"",scope:"arg",related_color:"200",parent_group:"negro",color:"#DDDDDD",variant:[],alias:[{code:"arg-gray-light",exclude:!1},{code:"gray-light",exclude:!0}]},{name:"Gray hover",code:"arg-gray-hover",description:"",scope:"arg",related_color:"100",parent_group:"negro",color:"#E9E9E9",variant:[],alias:[{code:"arg-gray-hover",exclude:!1},{code:"gray-hover",exclude:!0}]},{name:"Gray hover light",code:"arg-gray-hover-light",description:"",scope:"arg",related_color:"50",parent_group:"negro",color:"#F0F0F0",variant:[],alias:[{code:"arg-gray-hover-light",exclude:!1},{code:"gray-hover-light",exclude:!0}]},{name:"Gris intermedio",code:"arg-gris-intermedio",description:"",scope:"arg",related_color:"500",parent_group:"negro",color:"#555555",variant:[],alias:[{code:"arg-gris-intermedio",exclude:!1},{code:"gray",exclude:!0},{code:"grisintermedio",exclude:!0},{code:"gris-area",exclude:!0},{code:"gris",exclude:!1}]},{name:"Gray dark",code:"arg-gray-dark",description:"",scope:"arg",related_color:"600",parent_group:"negro",color:"#444444",variant:[],alias:[{code:"arg-gray-dark",exclude:!1},{code:"gray-dark",exclude:!0}]},{name:"Gray border",code:"arg-gray-border",description:"",scope:"arg",related_color:"150",parent_group:"negro",color:"#DEE2E6",variant:[],alias:[{code:"arg-gray-border",exclude:!1},{code:"gray-border",exclude:!0}]},{name:"Gris niebla",code:"arg-gris-niebla",description:"",scope:"arg",related_color:"75",parent_group:"negro",color:"#F2F2F2",variant:[],alias:[{code:"arg-gris-niebla",exclude:!1},{code:"gray-lighter",exclude:!0}]},{name:"Gray background",code:"arg-gray-background",description:"",scope:"arg",related_color:"25",parent_group:"negro",color:"#FFFFFF",variant:[],alias:[{code:"arg-gray-background",exclude:!1},{code:"gray-background",exclude:!0}]}]},{scope:"arg",name:"Turquesa",group:"turquesa",color:{50:"#DCF1F0",100:"#C0E5E3",200:"#A4D9D7",300:"#88CECB",400:"#6CC3BE",500:"#50B7B2",600:"#459E99",700:"#3B8681",800:"#306D69",900:"#255450"},instance:[{name:"Palta",code:"arg-palta",description:"",scope:"arg",related_color:"500",parent_group:"turquesa",color:"#50B7B2",variant:[{variant:"half",color:"#A8DBD9",name:"Palta medio tono",code:"arg-palta-half"},{variant:"lighter",color:"#C0E5E3",name:"Palta muy claro",code:"arg-palta-lighter"}],alias:[{code:"arg-palta",exclude:!1},{code:"palta",exclude:!0}]},{name:"Verde azulado",code:"arg-verde-azulado",description:"",scope:"arg",related_color:"700",parent_group:"turquesa",color:"#3B8681",variant:[],alias:[{code:"arg-verde-azulado",exclude:!1},{code:"verde-azulado",exclude:!0},{code:"verdeazulado",exclude:!0}]},{name:"Eucalipto",code:"arg-eucalipto",description:"",scope:"arg",related_color:"800",parent_group:"turquesa",color:"#306D69",variant:[{variant:"lighter",color:"#A4D9D7",name:"Eucalipto muy claro",code:"arg-eucalipto-lighter"},{variant:"dark",color:"#255450",name:"Eucalipto oscuro",code:"arg-eucalipto-dark"}],alias:[{code:"arg-eucalipto",exclude:!1}]}]},{scope:"arg",name:"Azul",group:"azul",color:{50:"#CDEBFA",100:"#9AD7F5",200:"#68C3EF",300:"#35AFEA",400:"#039BE5",500:"#0581C6",600:"#0767A7",700:"#084E87",800:"#0A3468",900:"#0C1A49"},instance:[{name:"Cielo",code:"arg-cielo",description:"",scope:"arg",related_color:"400",parent_group:"azul",color:"#039BE5",variant:[],alias:[{code:"arg-cielo",exclude:!1},{code:"cielo",exclude:!0},{code:"celeste",exclude:!0}]},{name:"Escarapela",code:"arg-escarapela",description:"",scope:"arg",related_color:"200",parent_group:"azul",color:"#68C3EF",variant:[],alias:[{code:"arg-escarapela",exclude:!1},{code:"escarapela",exclude:!0},{code:"celesteargentina",exclude:!0},{code:"celeste-argentina",exclude:!1}]},{name:"Enlace",code:"arg-enlace",description:"Enlace",scope:"arg",related_color:"600",parent_group:"azul",color:"#0767A7",variant:[{variant:"dark",color:"#084E87",name:"Enlace oscuro",code:"arg-enlace-dark"},{variant:"light",color:"#0581C6",name:"Enlace claro",code:"arg-enlace-light"}],alias:[{code:"arg-enlace",exclude:!1}]}]},{scope:"arg",name:"Rojo",group:"rojo",color:{50:"#FCDDDC",100:"#F9BBB9",200:"#F69896",300:"#F27673",400:"#EF5350",500:"#E14543",600:"#D43635",700:"#C62828",800:"#A12222",900:"#7C1C1C"},instance:[{name:"Rojo",code:"arg-rojo",description:"Atención o peligro",scope:"arg",related_color:"700",parent_group:"rojo",color:"#C62828",variant:[{variant:"light",color:"#E14543",name:"Rojo claro",code:"arg-rojo-light"},{variant:"dark",color:"#7C1C1C",name:"Rojo oscuro",code:"arg-rojo-dark"},{variant:"lighter",color:"#FCDDDC",name:"Rojo muy claro",code:"arg-rojo-lighter"}],alias:[{code:"arg-rojo",exclude:!1},{code:"danger",exclude:!0},{code:"rojo",exclude:!0}]},{name:"Tomate",code:"arg-tomate",description:"",scope:"arg",related_color:"400",parent_group:"rojo",color:"#EF5350",variant:[{variant:"light",color:"#F69896",name:"Tomate claro",code:"arg-tomate-light"},{variant:"dark",color:"#C62828",name:"Tomate oscuro",code:"arg-tomate-dark"}],alias:[{code:"arg-tomate",exclude:!1},{code:"complementary",exclude:!0},{code:"tomate",exclude:!0}]}]},{scope:"arg",name:"Naranja",group:"naranja",color:{50:"#FDE7BF",100:"#FBCE80",200:"#F9B640",300:"#F79D00",400:"#F38500",500:"#EF6C00",600:"#CE5701",700:"#AE4203",800:"#8D2D04",900:"#6C1805"},instance:[{name:"Marrón claro",code:"arg-marron-claro",description:"",scope:"arg",related_color:"800",parent_group:"naranja",color:"#8D2D04",variant:[{variant:"light",color:"#CE5701",name:"Marrón claro claro",code:"arg-marron-claro-light"},{variant:"dark",color:"#6C1805",name:"Marrón claro oscuro",code:"arg-marron-claro-dark"}],alias:[{code:"arg-marron-claro",exclude:!1},{code:"marron-claro",exclude:!0}]},{name:"Naranja",code:"arg-naranja",description:"",scope:"arg",related_color:"500",parent_group:"naranja",color:"#EF6C00",variant:[{variant:"light",color:"#EF6C00",name:"Naranja claro",code:"arg-naranja-light"},{variant:"dark",color:"#6C1805",name:"Naranja oscuro",code:"arg-naranja-dark"}],alias:[{code:"arg-naranja",exclude:!1},{code:"naranjaoscuro",exclude:!0},{code:"naranja",exclude:!0}]},{name:"Mandarina",code:"arg-mandarina",description:"",scope:"arg",related_color:"300",parent_group:"naranja",color:"#F79D00",variant:[{variant:"light",color:"#FBCE80",name:"Mandarina claro",code:"arg-mandarina-light"},{variant:"dark",color:"#CE5701",name:"Mandarina oscuro",code:"arg-mandarina-dark"}],alias:[{code:"arg-mandarina",exclude:!1},{code:"mandarina",exclude:!0}]}]},{scope:"arg",name:"Blanco",group:"blanco",color:{150:"#FFFFFF"},instance:[{name:"Blanco",code:"arg-blanco",description:"",scope:"arg",related_color:"150",parent_group:"blanco",color:"#FFFFFF",variant:[],alias:[{code:"arg-blanco",exclude:!1},{code:"white",exclude:!0},{code:"arg-white",exclude:!1}]}]},{scope:"arg",name:"Ocre",group:"ocre",color:{50:"#FAF8ED",100:"#F4F0DB",200:"#EAE1B7",300:"#E9CE8C",400:"#E7BA61",500:"#C98941",600:"#AA5821",700:"#8C2701",800:"#6F2001",900:"#511901"},instance:[{name:"Arena",code:"arg-arena",description:"",scope:"arg",related_color:"200",parent_group:"ocre",color:"#EAE1B7",variant:[{variant:"light",color:"#FAF8ED",name:"Arena claro",code:"arg-arena-light"},{variant:"dark",color:"#E7BA61",name:"Arena oscuro",code:"arg-arena-dark"},{variant:"half",color:"#F5F0DB",name:"Arena medio tono",code:"arg-arena-half"}],alias:[{code:"arg-arena",exclude:!1}]},{name:"Amarillo",code:"arg-amarillo",description:"Foco o alerta",scope:"arg",related_color:"400",parent_group:"ocre",color:"#E7BA61",variant:[{variant:"light",color:"#EAE1B7",name:"Amarillo claro",code:"arg-amarillo-light"},{variant:"dark",color:"#AA5821",name:"Amarillo oscuro",code:"arg-amarillo-dark"},{variant:"half",color:"#F3DDB0",name:"Amarillo medio tono",code:"arg-amarillo-half"}],alias:[{code:"arg-amarillo",exclude:!1},{code:"warning",exclude:!0},{code:"amarillo",exclude:!0},{code:"amarillo-intenso",exclude:!0}]},{name:"Marrón oscuro",code:"arg-marron-oscuro",description:"",scope:"arg",related_color:"900",parent_group:"ocre",color:"#511901",variant:[],alias:[{code:"arg-marron-oscuro",exclude:!1}]}]},{scope:"arg",name:"Morado",group:"morado",color:{150:"#3A3796"},instance:[{name:"Azul morado",code:"arg-azul-morado",description:"",scope:"arg",related_color:"150",parent_group:"morado",color:"#3A3796",variant:[],alias:[{code:"arg-azul-morado",exclude:!1}]}]}]},{name:"MiArgentina",space:"miarg",hidden_space:!1,description:"",data:[{scope:"miarg",name:"Azul MiArgentina",group:"azul",color:{150:"#3526C3"},instance:[{name:"Azul MiArgentina",code:"miarg-azul",description:"Azul principal para aplicaciones MiArgentina",scope:"miarg",related_color:"150",parent_group:"azul",color:"#3526C3",variant:[{variant:"half",color:"#6B66CC",name:"Azul MiArgentina medio tono",code:"miarg-azul-half"}],alias:[{code:"miarg-azul",exclude:!1}]}]},{scope:"miarg",name:"Celeste MiArgentina",group:"celeste",color:{150:"#2CB9EE"},instance:[{name:"Celeste MiArgentina",code:"miarg-celeste",description:"",scope:"miarg",related_color:"150",parent_group:"celeste",color:"#2CB9EE",variant:[],alias:[{code:"miarg-celeste",exclude:!1}]}]},{scope:"miarg",name:"Amarillo claro MiArgentina",group:"amarillo-claro",color:{150:"#ffe9b8"},instance:[{name:"Amarillo claro MiArgentina",code:"miarg-amarillo-claro",description:"",scope:"miarg",related_color:"150",parent_group:"amarillo-claro",color:"#ffe9b8",variant:[],alias:[{code:"miarg-amarillo-claro",exclude:!1}]}]},{scope:"miarg",name:"Rosa claro MiArgentina",group:"rosa-claro",color:{150:"#EECCCF"},instance:[{name:"Rosa claro MiArgentina",code:"miarg-rosa-claro",description:"",scope:"miarg",related_color:"150",parent_group:"rosa-claro",color:"#EECCCF",variant:[],alias:[{code:"miarg-rosa-claro",exclude:!1}]}]},{scope:"miarg",name:"Verde claro MiArgentina",group:"verde-claro",color:{150:"#CFEEDC"},instance:[{name:"Verde claro MiArgentina",code:"miarg-verde-claro",description:"",scope:"miarg",related_color:"150",parent_group:"verde-claro",color:"#CFEEDC",variant:[],alias:[{code:"miarg-verde-claro",exclude:!1}]}]},{scope:"miarg",name:"Azul oscuro MiArgentina",group:"azul-oscuro",color:{150:"#222C50"},instance:[{name:"Azul oscuro MiArgentina",code:"miarg-oscuro",description:"",scope:"miarg",related_color:"150",parent_group:"azul-oscuro",color:"#222C50",variant:[],alias:[{code:"miarg-oscuro",exclude:!1}]}]},{scope:"miarg",name:"Gris MiArgentina",group:"gris",color:{150:"#7E848E"},instance:[{name:"Gris MiArgentina",code:"miarg-gris",description:"",scope:"miarg",related_color:"150",parent_group:"gris",color:"#7E848E",variant:[],alias:[{code:"miarg-gris",exclude:!1}]}]},{scope:"miarg",name:"Celeste claro MiArgentina",group:"celeste-claro",color:{150:"#BEE6F6"},instance:[{name:"Celeste claro MiArgentina",code:"miarg-celeste-claro",description:"",scope:"miarg",related_color:"150",parent_group:"celeste-claro",color:"#BEE6F6",variant:[],alias:[{code:"miarg-celeste-claro",exclude:!1}]}]}]},{name:"Colores de la bandera de la República Argentina",space:"bandera",hidden_space:!1,description:'De acuerdo al <a href="https://www.argentina.gob.ar/normativa/nacional/decreto-1650-2010-175328">Decreto 1650/2010</a>, que establece las medidas, características de la tela, colores y accesorios de la Bandera Argentina.',data:[{scope:"bandera",name:"Amarillo",group:"amarillo",color:{150:"#FCBF49"},instance:[{name:"Amarillo Bandera",code:"bandera-amarillo",description:"Color amarillo oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"amarillo",color:"#FCBF49",variant:[],alias:[{code:"bandera-amarillo",exclude:!1}]}]},{scope:"bandera",name:"Celeste",group:"celeste",color:{150:"#75AADB"},instance:[{name:"Celeste Bandera",code:"bandera-celeste",description:"Color celeste oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"celeste",color:"#75AADB",variant:[],alias:[{code:"bandera-celeste",exclude:!1}]}]},{scope:"bandera",name:"Marrón",group:"marron",color:{150:"#843511"},instance:[{name:"Marrón Bandera",code:"bandera-marron",description:"Color marrón oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"marron",color:"#843511",variant:[],alias:[{code:"bandera-marron",exclude:!1}]}]}]},{name:"Gendarmería Nacional",space:"gna",hidden_space:!1,description:"",data:[{scope:"gna",name:"Verde jade",group:"verde-jade",color:{150:"#006666"},instance:[{name:"Verde oscuro Gendarmería",code:"gna-verde-jade",description:"",scope:"gna",related_color:"150",parent_group:"verde-jade",color:"#006666",variant:[],alias:[{code:"gna-verde-jade",exclude:!1},{code:"verde-jade",exclude:!0},{code:"verdejade",exclude:!0}]}]},{scope:"gna",name:"Verde aloe",group:"verde-aloe",color:{150:"#4FBB73"},instance:[{name:"Verde claro Gendarmería",code:"gna-verde-aloe",description:"",scope:"gna",related_color:"150",parent_group:"verde-aloe",color:"#4FBB73",variant:[],alias:[{code:"gna-verde-aloe",exclude:!1},{code:"verde-aloe",exclude:!0}]}]},{scope:"gna",name:"Verde cemento",group:"verde-cemento",color:{150:"#B4BEBA"},instance:[{name:"Gris Gendarmería",code:"gna-verde-cemento",description:"",scope:"gna",related_color:"150",parent_group:"verde-cemento",color:"#B4BEBA",variant:[],alias:[{code:"gna-verde-cemento",exclude:!1},{code:"verde-cemento",exclude:!0},{code:"verdecemento",exclude:!0}]}]}]}];"undefined"!=typeof exports&&(module.exports={ponchoColorDefinitionsList:ponchoColorDefinitionsList});class Color{constructor(e){this.isValidColorDefinitionList(e)&&(this.definitions=e)}replaceSpecialChars=e=>{if("string"!=typeof e||0===e.trim().length)return"";var t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż",a="aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz";let r=t+t.toUpperCase(),o=a+a.toUpperCase();t=new RegExp(r.split("").join("|"),"g");return e.toString().replace(t,e=>o.charAt(r.indexOf(e)))};isValidColorDefinitionList(e){return Array.isArray(e)&&0<e.length&&e[0].hasOwnProperty("space")}get list(){return this.definitions.flatMap(e=>e.data.flatMap(e=>e.instance.map(e=>e)))||[]}findColor=e=>{if("string"!=typeof e||0===e.trim().length)return[];let t=e.toLowerCase();return[...this.variables.map(([e,t])=>[e,t]),...this.colors].filter(function(e){if(e[0].includes(t))return e}).map(([e,t])=>[e,t])};get variables(){let n=[];return this.list.flatMap(e=>{let{alias:t,color:a,description:r,code:o,variant:i=[],name:s}=e;t.forEach(function(t){n.push([t.code,a,r,o,s]),i.forEach(function(e){t.exclude||n.push([t.code+"-"+e.variant,e.color,"",o,e.name])})})}),n.sort()}get spaces(){return this.definitions.map(e=>e.space).sort()}groupsBySpace=e=>{if("string"!=typeof e)throw new TypeError("groupsBySpace: El argumetno debe ser un string");let t=e.toLocaleLowerCase();e=this.definitions.find(e=>e.space==t)?.data?.map(e=>e.group);return e?e.sort():[]};ponchoColor=(e,t="hex")=>{var a="#999999";if("string"!=typeof e||""===e.trim())return a;let r=this.replaceSpecialChars(e).toLowerCase();var e=this.variables?.find(e=>e[0]===r)||this.colors?.find(e=>e[0]===r),o=e?e[1]:a;switch(t.trim().toLowerCase()){case"rgb":return this.hexToRgb(o);case"hsl":return this.rgbToHsl(...this.hexToRgb(o));default:return o}};get colors(){return this.definitions.map(e=>e.data).flatMap(function(e){return e.flatMap(function(e){let{color:t,group:a,scope:r}=e;return Object.entries(t).map(function(e){var[e,t]=e;return[`${r}-${a}-`+e,t]})})})||[]}colorDefinitions=e=>{if(null!=typeof e&&e.trim()){let t=this.replaceSpecialChars(e).toLowerCase(),a;for(let e=0;e<=this.definitions.length-1;e+=1){var r=this.definitions[e].data;for(let e=0;e<=r.length-1;e+=1){var o=r[e].instance;for(let e=0;e<=o.length-1;e+=1){var{alias:i,variant:s}=o[e];if(i.some(e=>e.code==t)){a=o[e];break}if(s.some(e=>e.code==t)){a=o[e];break}}if(a)break}}return a}};colorGroup=(o,i)=>{if(null!=typeof i&&i?.trim()){let r;for(let a=0;a<=this.definitions.length-1;a+=1){let{data:e,space:t}=this.definitions[a];if(r=e.find(e=>e.group==i&&t==o))break}return r}};colorSpace=t=>{if(null!=typeof t&&t?.trim())return this.definitions.find(e=>e.space==t)};colorByHex=e=>{if(this.isValidHex(e)){var t=[],a=this.cleanHex(e);for(let e=0;e<=this.definitions.length-1;e+=1){var r,o=this.definitions[e].data;for(r of o){var i,s=r.instance;for(i of s){var n=i.color;this.cleanHex(n)==a&&t.push(i)}}}return t}};cleanHex=e=>{let t=e.toString().replace("#","").trim().toUpperCase();return!(t.length<3||6<t.length)&&"#"+(t=3==t.length?Array.from(t).map(e=>e.repeat(2)).join(""):t)};isValidHex=e=>null!=e&&"string"==typeof e&&!!new RegExp(/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/).test(e);rgbToHsl=(e,t,a)=>{var r=e/255,o=t/255,i=a/255,e=Math.max(r,o,i),t=Math.min(r,o,i),s=e-t,a=(e+t)/2*100;let n=0,l=(0!=s&&(n=s/(1-Math.abs(2*a/100-1))*100),0);if(0!=s)switch(e){case r:l=(o-i)/s%6*60;break;case o:l=60*((i-r)/s+2);break;case i:l=60*((r-o)/s+4)}return l<0&&(l+=360),[Math.round(l),n.toFixed(1)+"%",a.toFixed(1)+"%"]};hexToRgb=e=>{if(this.isValidHex(e))return e=(e=this.cleanHex(e)).startsWith("#")?e.slice(1):e,[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]};colorName=(e,a={})=>{if(void 0!==e&&!(e.length<1)&&(e="string"==typeof e?[e]:e).every(e=>"string"==typeof e)){var r,o="object"==typeof a&&a.hasOwnProperty("switchLastConnector")?a.switchLastConnector:{i:"e",o:"u"},i="object"==typeof a&&a.hasOwnProperty("defaultLastConnector")?a.defaultLastConnector:"y",a="object"==typeof a&&a.hasOwnProperty("listConnector")?a.listConnector:", ";let t=t=>{var e=this.variables.find(e=>e[0]==t);return void 0!==e?e[4]:t};return 1===e.length?t(e.join("")):(r=e.length,r=e.pop(r-1),o=o[Array.from(t(r))[0].toLowerCase()]||i,(e.map(e=>t(e)).join(a)+" "+o+" "+t(r)).toLowerCase())}}}"undefined"!=typeof exports&&(module.exports={Color:Color});let illustrationColors=["arg-azul","arg-arena","arg-amarillo","arg-palta","arg-verde","arg-arandano","arg-rosado","miarg-azul"],headersBackground={solid:["bg-arg-azul","bg-arg-rojo","bg-arg-info","bg-arg-eucalipto","bg-arg-palta","bg-arg-arandano","bg-arg-negro-light"],mixed:["bg-mix-azul-info","bg-mix-info-azul","bg-mix-palta-azul","bg-mix-azul-palta"]},colorVariations={high:["arg-azul","arg-eucalipto","arg-verde","arg-naranja","arg-rojo","arg-arandano","arg-uva","arg-cielo","arg-palta","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-negro"],medium:["arg-info","arg-verde-azulado","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-palta","arg-lima","arg-maiz","arg-gris-intermedio"]};var ponchoColor,color;async function fetch_json(e,a={}){let{useCorsProxy:r=!0,corsProxyUrl:o="",credentials:t="same-origin",...i}=a;a=Object.assign({},{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:t,redirect:"follow"},i);try{var s=await fetch(e,a);if(s.ok)return await s.json();throw new Error("HTTP error! status: "+s.status)}catch(t){if(r&&(t.message.includes("CORS")||t.message.includes("Network")||"TypeError"===t.name))try{var n=""+o+encodeURIComponent(e),l={...a,credentials:"omit"},c=await fetch(n,l);if(c.ok)return await c.json();throw new Error("HTTP error! status: "+c.status)}catch(e){throw new Error("Fetch fallido directo y con proxy. Error original: "+t.message)}throw t}}void 0!==Color&&(color=new Color(ponchoColorDefinitionsList),ponchoColor=color.ponchoColor),"undefined"!=typeof exports&&(module.exports={colorVariations:colorVariations,illustrationColors:illustrationColors,headersBackground:headersBackground,color:color});let charMap=new Map([["à","a"],["á","a"],["â","a"],["ä","a"],["æ","a"],["ã","a"],["å","a"],["ā","a"],["ă","a"],["ą","a"],["ç","c"],["ć","c"],["č","c"],["đ","d"],["ď","d"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ē","e"],["ė","e"],["ę","e"],["ě","e"],["ğ","g"],["ǵ","g"],["ḧ","h"],["î","i"],["ï","i"],["í","i"],["ī","i"],["į","i"],["ì","i"],["ı","i"],["İ","I"],["ł","l"],["ḿ","m"],["ñ","n"],["ń","n"],["ǹ","n"],["ň","n"],["ô","o"],["ö","o"],["ò","o"],["ó","o"],["œ","o"],["ø","o"],["ō","o"],["õ","o"],["ő","o"],["ṕ","p"],["ŕ","r"],["ř","r"],["ß","s"],["ś","s"],["š","s"],["ş","s"],["ș","s"],["ť","t"],["ț","t"],["û","u"],["ü","u"],["ù","u"],["ú","u"],["ū","u"],["ǘ","u"],["ů","u"],["ű","u"],["ų","u"],["ẃ","w"],["ẍ","x"],["ÿ","y"],["ý","y"],["ž","z"],["ź","z"],["ż","z"],["À","A"],["Á","A"],["Â","A"],["Ä","A"],["Æ","A"],["Ã","A"],["Å","A"],["Ā","A"],["Ă","A"],["Ą","A"],["Ç","C"],["Ć","C"],["Č","C"],["Đ","D"],["Ď","D"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ē","E"],["Ė","E"],["Ę","E"],["Ě","E"],["Ğ","G"],["Ǵ","G"],["Ḧ","H"],["Î","I"],["Ï","I"],["Í","I"],["Ī","I"],["Į","I"],["Ì","I"],["Ł","L"],["Ḿ","M"],["Ñ","N"],["Ń","N"],["Ǹ","N"],["Ň","N"],["Ô","O"],["Ö","O"],["Ò","O"],["Ó","O"],["Œ","O"],["Ø","O"],["Ō","O"],["Õ","O"],["Ő","O"],["Ṕ","P"],["Ŕ","R"],["Ř","R"],["Ś","S"],["Š","S"],["Ş","S"],["Ș","S"],["Ť","T"],["Ț","T"],["Û","U"],["Ü","U"],["Ù","U"],["Ú","U"],["Ū","U"],["Ǘ","U"],["Ů","U"],["Ű","U"],["Ų","U"],["Ẃ","W"],["Ẍ","X"],["Ÿ","Y"],["Ý","Y"],["Ž","Z"],["Ź","Z"],["Ż","Z"]]),replaceSpecialChars=e=>"string"!=typeof e||0===e.trim().length?"":e.replace(/[^\u0000-\u007F]/g,e=>charMap.get(e)||e),slugifyMap=new Map([...Array.from(charMap.entries()),["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"]]),slugify=e=>"string"!=typeof e||0===e.trim().length?e:e.toLowerCase().replace(/\s+/g,"-").replace(/[^\u0000-\u007F]/g,e=>slugifyMap.get(e)||e).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,""),toTitleCase=(e,t=!0)=>"string"!=typeof e||0===e.trim().length?e:(e=e.trim(),t?e.replace(/\S+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase()):e[0].toUpperCase()+e.slice(1).toLowerCase()),secureHTML=("undefined"!=typeof exports&&(module.exports={slugify:slugify,replaceSpecialChars:replaceSpecialChars,toTitleCase:toTitleCase}),(r,i=[])=>{if("string"!=typeof r||0===r.trim().length)return r;if(Array.isArray(i)){var s=["div","section","article","aside","header","footer","main","nav","figure","figcaption","details","summary","dialog","p","span","br","hr","pre","code","kbd","samp","var","blockquote","cite","q","abbr","address","time","mark","small","s","del","ins","sub","sup","wbr","strong","b","em","i","u","dfn","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","col","colgroup","a","img","picture","source","audio","video","track","button","progress","meter"];let t=["script","iframe","object","embed","applet","meta","link","style","base","form"],o=["on\\w+","formaction","action","srcdoc","eval"],e=((i=i.some(e=>t.includes(e.toLowerCase()))?i.filter(e=>!t.includes(e.toLowerCase())):i).some(e=>"*"===e)&&(i=s),r),a=(e=i.includes("img")||i.includes("*")&&s.includes("img")?e.replace(/(<img\s[^>]*?src\s*=\s*["'])javascript:[^"']*["']/gi,'$1"').replace(/(<img\s[^>]*?src\s*=\s*)javascript:[^\s>]*/gi,'$1""').replace(/(<img\s[^>]*?src\s*=\s*["'])data:(?!image\/)[^"']*["']/gi,'$1"').replace(/(<img\s[^>]*?src\s*=\s*)data:(?!image\/)[^\s>]*/gi,'$1""'):e).toString().replace(/</g,"&lt;").replace(/>/g,"&gt;");return 0<i.length&&(r=i.map(e=>e.toLowerCase()).join("|"),s=new RegExp("&lt;("+r+")(\\s[^>]*?)?&gt;","gi"),i=new RegExp("&lt;/("+r+")&gt;","gi"),a=a.replace(s,(e,t,a)=>{if(!a)return`<${t}>`;let r=a;return o.forEach(e=>{var t=new RegExp(`\\s${e}\\s*=\\s*["'][^"']*["']`,"gi"),t=(r=r.replace(t,""),new RegExp(`\\s${e}\\s*=\\s*[^\\s"'>]+`,"gi"));r=r.replace(t,"")}),`<${t}${r=(r=(r=(r=r.replace(/href\s*=\s*["']javascript:[^"']*["']/gi,'href="#"')).replace(/href\s*=\s*javascript:[^\s>]*/gi,'href="#"')).replace(/href\s*=\s*["']data:[^"']*["']/gi,'href="#"')).replace(/href\s*=\s*data:[^\s>]*/gi,'href="#"')}>`}).replace(i,"</$1>")),a}}),headStyle=("undefined"!=typeof exports&&(module.exports={secureHTML:secureHTML}),(a,r,o)=>{if("string"==typeof a&&""!==a.trim()||(a="argob-custom-css"),"string"==typeof r&&""!=r.trim()){var e=document.getElementById(a);if(null!==e){if(e.textContent.trim()===r.trim())return;e.remove()}document.querySelectorAll("head").forEach(e=>{var t=document.createElement("style");t.setAttribute("rel","stylesheet"),t.id=a,"string"==typeof o&&""!==o.trim()&&t.setAttribute("media",o),t.textContent=r,e.appendChild(t)})}});function copyToClipboard(t,a){var t="string"==typeof t?document.querySelector(t):t;if(t&&t instanceof HTMLElement){let e=t;e&&(t=e.textContent,navigator.clipboard.writeText(t).then(function(){"function"==typeof a&&a(e)},function(){}))}}function flattenNestedObjects(e){return e.map(e=>flattenObject(e,""))}function flattenObject(e,t){var a,r={};for(a in e){var o=e[a],i=t?t+"__"+a:a;"object"==typeof o&&null!==o?Object.assign(r,flattenObject(o,i)):r[i]=o}return r}function ponchoTable(e){return ponchoTableLegacyPatch(),ponchoTableDependant(e)}"undefined"!=typeof exports&&(module.exports={flattenObject:flattenObject,flattenNestedObjects:flattenNestedObjects}),ponchoTableLegacyPatch=()=>{document.querySelectorAll("select[id=ponchoTableFiltro]").forEach(e=>{var e=e.parentElement,t=document.createElement("div");t.id="ponchoTableFiltro",t.classList.add("row"),e.parentElement.appendChild(t),e.remove()})};class PonchoAgenda{DATE_REGEX=/^([1-9]|0[1-9]|[1-2][0-9]|3[0-1])\/([1-9]|0[1-9]|1[0-2])\/([1-9][0-9]{3})$/;constructor(e={}){e.headers=this._refactorHeaders(e),e.headersOrder=this._refactorHeadersOrder(e),this.opts=Object.assign({},this.defaults,e),this.categoryTitleClassList=this.opts.categoryTitleClassList,this.itemContClassList=this.opts.itemContClassList,this.itemClassList=this.opts.itemClassList,this.groupCategory=this.opts.groupCategory,this.dateSeparator=this.opts.dateSeparator,this.startDateId=this.opts.startDateId,this.endDateId=this.opts.endDateId,this.timeId=this.opts.timeId,this.descriptionId=this.opts.descriptionId,this.criteriaOneId=this.opts.criteriaOneId,this.criteriaTwoId=this.opts.criteriaTwoId,this.criteriaThreeId=this.opts.criteriaThreeId}defaults={allowedTags:["strong","span","dl","dt","dd","img","em","button","button","p","div","h3","ul","li","time","a","h1"],criteriaOneId:"destinatarios",criteriaThreeId:"destacado",criteriaTwoId:"url",descriptionId:"descripcion",categoryTitleClassList:["h6","text-secondary"],itemContClassList:["list-unstyled"],itemClassList:["m-b-2"],dateSeparator:"/",filterStatus:{header:"Estado",nextDates:"Próximas",pastDates:"Anteriores"},endDateId:"hasta",groupCategory:"filtro-ministerio",rangeLabel:"Fechas",startDateId:"desde",timeId:"horario"};_refactorHeadersOrder=e=>{if(e.hasOwnProperty("headersOrder")&&0<e.headersOrder.length){var t,a=e.headersOrder;for(t of["range","filtro-status"])e.headersOrder.includes(t)||e.headersOrder.push(t);return a}return[]};_header=e=>this.opts.headers.hasOwnProperty(e)?this.opts.headers[e]:e;_refactorHeaders=e=>{let t=this.defaults.filterStatus.header,a=(e?.filterStatus?.header&&(t=e.filterStatus.header),this.defaults.rangeLabel);return{range:a=e?.rangeLabel?e.rangeLabel:a,...e.headers,"filtro-status":t}};_isMarkdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_markdownOptions=()=>this._isMarkdownEnable()&&this.opts.hasOwnProperty("markdownOptions")&&"object"==typeof this.opts.markdownOptions?this.opts.markdownOptions:{};_markdownConverter=e=>this._isMarkdownEnable()?new showdown.Converter(this._markdownOptions()).makeHtml(e):e;_isPastDate=e=>!!this._isValidDateFormat(e)&&this._dateParser(e).date.getTime()<this._currentDate().date.getTime();_dateTimeFormat=(e,t=!1)=>{var{day:e,month:a,year:r}=e;let o="";return[e,a,r].join(this.dateSeparator)+(o=t?[hours,minutes].join(":"):o)};_currentDate=()=>{var e=new Date,t=e.getFullYear(),a=e.getMonth()+1,e=e.getDate(),e=[this._pad(e),this._pad(a),t].join(this.dateSeparator);return{...this._dateParser(e),format:e}};_pad=(e,t=2)=>e.toString().padStart(t,"0");_dateParser=(e,t="00:00:00")=>{var a,r;if(this._isValidDateFormat(e))return[,e,a,r]=this.DATE_REGEX.exec(e),t=new Date(r+`-${a}-${e} `+t),{day:this._pad(e),month:this._pad(a),year:r,hours:this._pad(t.getHours()),minutes:this._pad(t.getMinutes()),date:t}};_isValidDateFormat=e=>null!==this.DATE_REGEX.exec(e);_groupByFingerprintAndCategory=e=>{var t,a={};for(t of e){var r=t[this.groupCategory],o=t.fingerprint;a[o]||(a[o]={}),a[o][r]||(a[o][r]=[]),a[o][r].push(t)}return a};_refactorEntries=e=>{let d=[];return e.forEach(e=>{var t=e[this.startDateId];let a=e[this.endDateId];a=""===a.trim()?t:a;var{pastDates:r,nextDates:o}=this.opts.filterStatus,r=this._isPastDate(a)?r:o,o=this._dateParser(t),i=this._dateParser(a),s=o.date.getTime(),n=i.date.getTime(),l=[s,n].join("_");let c=this._dateTimeFormat(o);s!=n&&(c=`Del ${this._dateTimeFormat(o)} al `+this._dateTimeFormat(i));s={...e,range:c,"filtro-status":r,fingerprint:l,desde:t,hasta:a};d.push(s)}),d};itemTemplate=(e,t,a,r,o,i)=>{let s=document.createElement("dl"),n;return i?(o=this._dateParser(o,i),(n=document.createElement("time")).setAttribute("datetime",o.date.toISOString()),n.textContent=o.hours+":"+o.minutes+"hs."):(n=document.createElement("span")).textContent="--:--",[["Descripción",this._markdownConverter(e),!0,!0,"description"],[this._header(this.criteriaOneId),this._markdownConverter(t),!1,!0,"criteria-one"],[this._header(this.criteriaThreeId),this._markdownConverter(r),!1,!0,"criteria-three"],[this._header(this.criteriaTwoId),this._markdownConverter(a),!1,!0,"criteria-two"],[this._header(this.timeId),n.outerHTML,!1,!0,"time"]].forEach(e=>{var t,[e,a,r,o,i]=e;a&&((t=document.createElement("dt")).textContent=e,t.classList.add("agenda-item__dt","agenda-item__dt-"+i),r&&t.classList.add("sr-only"),(e=document.createElement("dd")).textContent=a,e.classList.add("agenda-item__dd","agenda-item__dd-"+i),o&&s.appendChild(t),s.appendChild(e))}),this.itemClassList.some(e=>e)&&s.classList.add("agenda-item",...this.itemClassList),s};_groupedEntries=e=>{let i=[];return Object.values(e).forEach(e=>{var o;Object.values(e).forEach(e=>{var t="",a="";let r=document.createElement("div");this.itemContClassList.some(e=>e)&&r.classList.add(...this.itemContClassList),e.forEach(e=>{a!=(o=e)[this.groupCategory]&&(a=o[this.groupCategory],t=document.createElement("p"),this.categoryTitleClassList.some(e=>e))&&(t.classList.add(...this.categoryTitleClassList),t.textContent=a,r.appendChild(t));var t=this.itemTemplate(e.descripcion,e.destinatarios,e.url,e.destacados,e.desde,e.horario);r.appendChild(t)}),t+=r.outerHTML,delete o.fingerprint;e={};e[this.descriptionId]=t,i.push({...o,...e})})}),i};_ponchoTableExists=()=>void 0!==ponchoTable;render=()=>{var e;this.opts.hasOwnProperty("jsonData")&&(e=this._refactorEntries(this.opts.jsonData),e=this._groupByFingerprintAndCategory(e),this.opts.jsonData=this._groupedEntries(e),this._ponchoTableExists())&&ponchoTable(this.opts)}}"undefined"!=typeof exports&&(module.exports=PonchoAgenda);let ponchoTableDependant=p=>{var g,_=[],h=!(!p.hasOwnProperty("wizard")||!p.wizard),l=p.hasOwnProperty("emptyLabel")&&p.emptyLabel?p.emptyLabel:"Todos",f={},o=!(!p.hasOwnProperty("orderFilter")||!p.orderFilter)&&p.orderFilter,a=!p.hasOwnProperty("resetValues")||"boolean"!=typeof p.resetValues||p.resetValues,c={},d=["*"],n=!(!p.hasOwnProperty("pushState")||1!=p.pushState),u=!(!p.hasOwnProperty("copyResults")||1!=p.copyResults),m=!1;(p.hasOwnProperty("urlParams")&&1==p.urlParams||1==u||1==n)&&(m=!0);let e={tables:!0,simpleLineBreaks:!0,extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"]},s=(document.querySelector("#ponchoTable").classList.add("state-loading"),jQuery.fn.DataTable.isDataTable("#ponchoTable")&&jQuery("#ponchoTable").DataTable().destroy(),(e,t)=>e.toString().localeCompare(t.toString(),"es",{numeric:!0})),y=e=>Array.isArray(e)?e.reduce((e,t)=>{var[t,a="asc"]=Array.isArray(t)?t:[t,"asc"],a=a.toLowerCase();return e[["asc","desc"].includes(a)?a:"asc"].push(t),e},{asc:[],desc:[]}):{asc:[],desc:[]},b=(e,t)=>{var a,r;if("string"==typeof t&&Array.isArray(e))return"boolean"==typeof o&&o||({asc:a,desc:r}=y(o),Array.isArray(o)&&a.includes(t))?e.sort(s):r.includes(t)?e.sort(s).reverse():e},v=e=>[...new Set(e)],E=(e=0,t,a,r=!1)=>{var o=document.createElement("option");return o.value=a.toString().trim(),o.dataset.column=e,o.textContent=t.toString().trim(),r&&o.setAttribute("selected","selected"),o},C=(e="")=>e.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x=e=>e<=0?0:e,S=()=>[...document.querySelectorAll("[data-filter]")].map(e=>e.value),w=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter")),q=()=>r().extensions.every(e=>{try{return showdown.extension(e),!0}catch(e){return!1}}),r=()=>p.hasOwnProperty("markdownOptions")&&"object"===p.markdownOptions?p.markdownOptions:e,P=t=>{if("string"==typeof t){if(!w())return t;let e;return q()?(e=new showdown.Converter(r())).makeHtml(t):(e=new showdown.Converter).makeHtml(t)}},z=(e,t,a=!1)=>{let r=a?": "+a:"";r=r.replaceAll("*","");a=document.createElement("a");return a.classList.add("btn","btn-primary","btn-sm","margin-btn"),a.href=t,a.target="_blank",a.innerHTML=`${e}<span class="sr-only">${r} (Abre en una nueva ventana)</span>`,a.setAttribute("rel","noopener noreferrer"),a.outerHTML},H=e=>{var t=e.split("/"),t=new Date(t[2],t[1]-1,t[0]).toISOString().split("T")[0],a=document.createElement("span"),r=(a.style.display="none",a.textContent=t,document.createElement("time"));return r.setAttribute("datetime",t),r.textContent=e,a.outerHTML+r.outerHTML},N=(t,a,r,o)=>[...Array(x(t+1)).keys()].map(e=>a[_[x(t-1)]]==o[x(t-1)]&&a[_[x(t)]]==r||""==o[x(t-1)]).every(e=>e),R=(e,t,a)=>{if(!g?.entries?.length)return[];var e=x(e),r=x(t),o=j(t,f),i=""===a,s=_[e],n=_[r];let l;if(o&&!(l=T(t,f).map(e=>k(e))).length)return[];var c,d=new Set;for(c of g.entries)if(i||c[s]===a){var p=c[n];if(p)if(o){var h,u=k(p);for(h of l)if(u.includes(h)){d.add(p);break}}else d.add(p)}return 0===d.size?[]:b(Array.from(d),n)},k=e=>replaceSpecialChars(e.toLowerCase()),V=(e,t,a)=>{if(!g?.entries?.length)return[];var t=t===_.length?t-1:t,r=S(),o=x(t-1),i=x(t),s=j(t,f),n=_[o],l=_[i],o=_[t];let c;if(s&&!(c=T(t,f).map(e=>k(e))).length)return[];var d,p=new Set;for(d of g.entries)if(d[n]===a&&N(e,d,a,r)){var h=d[l];if(h)if(s){var u,m=k(h);for(u of c)if(m.includes(u)){p.add(h);break}}else p.add(h)}return 0===p.size?[]:b(Array.from(p),o)},t=null,A=()=>t=null===t?Object.keys(f):t,L=e=>"filtro-"+A()[e],j=e=>{e=L(e);return c.hasOwnProperty(e)},T=e=>{e=L(e);return c.hasOwnProperty(e)?c[e]:[]},G=(t,a)=>{var r=A(),i=S(),e=r.length;for(let o=t+1;o<e;o++){let e=V(t,o,a);0===e.length&&(e=R(t,o,a));var s=document.querySelector("#"+r[o]);if(s){let a=document.createDocumentFragment(),r=(a.appendChild(E(o,l,"",!0)),i[o]);e.forEach(e=>{var t;e.trim()&&(t=r===e,a.appendChild(E(o,e,e,t)))}),s.innerHTML="",s.appendChild(a)}}},O=(e,t)=>{t&&(e=document.getElementById(e))&&(e.removeAttribute("class"),t=Array.isArray(t)?t:[t],e.classList.add(...t))},$=()=>window.location.hash.replace("#","")||!1;function F(e,a,r){document.querySelectorAll("#"+e).forEach(t=>{setTimeout(function(){t.value=a;var e=new Event(r);t.dispatchEvent(e)},50)})}function U(){if(a){try{document.querySelectorAll("#poncho-table-reset-form").forEach(e=>e.remove())}catch(e){}var e,t=document.querySelector("#ponchoTable_info");t&&((e=document.createElement("a")).id="poncho-table-reset-form",e.href="#",e.textContent="Restablecer",e.setAttribute("aria-label","Restablecer resultados de la tabla"),e.classList.add("js-pt-reset-form"),e.addEventListener("click",e=>{e.preventDefault();var t,e=_.map(e=>e.replace("filtro-",""));document.querySelectorAll("#ponchoTableSearch").forEach(function(e){F("ponchoTableSearch",e.value="","keyup")});for(t of e)document.querySelectorAll("#"+t).forEach(function(e){e.selectedIndex=0}),F(t,"","change")}),(t=t.parentElement).classList.add("ponchotable-share"),t.appendChild(e))}}function I(){if(m){let r=new URL(window.location.pathname,window.location.origin);var e=[..._.map(e=>e.replace("filtro-","")),"ponchoTableSearch"].map(function(e){var t=document.getElementById(e);return t?[e,t.value]:[]});if(e.some(e=>0<e.length)){if(e.some(e=>0<e[1].length)){if(u){try{document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove())}catch(e){}var t=document.createElement("div"),a=(t.classList.add("dropdown"),t.id="ponchoTableShareButton",document.createElement("button")),o=(a.classList.add("btn","btn-sm","btn-default","dropdown-toggle"),a.setAttribute("type","button"),a.setAttribute("id","share-table-data"),a.setAttribute("data-toggle","dropdown"),a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"),a.textContent="Compartir resultados",document.createElement("span")),o=(o.classList.add("caret"),a.appendChild(document.createTextNode(" ")),a.appendChild(o),document.createElement("div")),i=(o.classList.add("dropdown-menu","p-y-1","p-x-1"),o.setAttribute("aria-labelledby","share-table-data"),document.createElement("p")),s=(i.classList.add("js-sharelink-tag","m-b-0","small"),i.setAttribute("id","foo"),document.createElement("a")),i=(s.setAttribute("href","#"),s.setAttribute("data-toclipboard","foo"),s.classList.add("small","btn","btn-sm","btn-default","m-b-0","m-t-1"),s.textContent="Copiar al portapapeles",o.appendChild(i),o.appendChild(s),t.appendChild(a),t.appendChild(o),document.querySelector("#ponchoTable_info")),s=i.parentElement;s.classList.add("ponchotable-share"),s.appendChild(t),"function"==typeof copyToClipboard&&document.querySelectorAll("[data-toclipboard]").forEach(e=>{let t=e.dataset.toclipboard;e.addEventListener("click",e=>{e.preventDefault(),copyToClipboard("#"+t)})})}}else document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove());e.forEach(e=>{var[e,t]=e,e="ponchoTableSearch"==e?"buscar":e;""!=t.trim()&&r.searchParams.append(e,t)}),document.querySelectorAll(".js-sharelink-tag").forEach(function(e){e.innerHTML="";var t=e.dataset.label,a=document.createElement("a"),t=(a.href=r.href,t||r.href);a.textContent=t,e.appendChild(a)}),document.querySelectorAll(".js-sharelink-text").forEach(function(e){var t=e.dataset.attr;t?e.setAttribute(t,r.href):e.innerHTML=r.href}),a=r.href,n&&window.history.pushState({},"",a)}}}_hideTable=(e=!0)=>{let t=e?"none":"block",a=e?"block":"none";document.querySelectorAll('[data-visible-as-table="true"],#ponchoTable_wrapper').forEach(e=>e.style.display=t),document.querySelectorAll('[data-visible-as-table="false"]').forEach(e=>e.style.display=a)},_responsiveType=function(e){if("string"==typeof e){e=e.toLowerCase();if(["none","column","inline"].includes(e))return e}},_responsiveColumns=function(e){if(Array.isArray(e)&&e.every(e=>"number"==typeof e)){var e=[...new Set(e)],t=e.indexOf(0);-1!==t&&e.splice(t,1);if(!(e.length<1))return e}},_responsiveCols=function(e,t,a="none"){return(e=_responsiveColumns(e))?{className:_responsiveType(a),orderable:"boolean"==typeof t&&t,targets:e}:{}};let Q=()=>{var e,t,a,r=jQuery.fn.DataTable.ext.type.search,r=(r.string=e=>e?"string"==typeof e?replaceSpecialChars(e):e:"",{initComplete:(e,t)=>{h&&_hideTable()},lengthChange:!(r.html=e=>e?"string"==typeof e?replaceSpecialChars(e.replace(/<.*?>/g,"")):e:""),autoWidth:!1,pageLength:p.cantidadItems,columnDefs:[{type:"html-num",targets:p.tipoNumero},{targets:p.ocultarColumnas,visible:!1}],ordering:p.orden,order:[[p.ordenColumna-1,p.ordenTipo]],dom:'<"row"<"col-sm-6"l><"col-sm-6"f>><"row"<"col-sm-12"i>><"row"<"col-sm-12"tr>><"row"<"col-md-offset-3 col-md-6 col-sm-offset-2 col-sm-8"p>>',language:{sProcessing:"Procesando...",sLengthMenu:"Mostrar _MENU_ registros",sZeroRecords:"No se encontraron resultados",sEmptyTable:"Ningún dato disponible en esta tabla",sInfo:"_TOTAL_ resultados",sInfoEmpty:"No hay resultados",sInfoFiltered:"",sInfoPostFix:"",sSearch:"Buscar:",sUrl:"",sInfoThousands:".",sLoadingRecords:"Cargando...",oPaginate:{sFirst:"<<",sLast:">>",sNext:">",sPrevious:"<"},oAria:{sSortAscending:": Activar para ordenar la columna de manera ascendente",sSortDescending:": Activar para ordenar la columna de manera descendente",paginate:{first:"Ir a la primera página",previous:"Ir a la página anterior",next:"Ir a la página siguiente",last:"Ir a la última página"}}}});void 0!==p.columnsWidth&&p.columnsWidth&&(r.columnDefs=r.columnDefs.concat((e=>{if(!Array.isArray(e))return[];let a=/(?<value>[0-9]+)(?<measure>\%|px|em|rem|pt)/;return e.map(e=>{var[e=!1,t=!1]=e;if(a.test(e))return"number"!=typeof t?{width:e}:{width:e,targets:t}}).filter(e=>e)})(p.columnsWidth))),void 0!==p.responsiveDetailsColumns&&0<p.responsiveDetailsColumns.length&&(o=_responsiveCols(p.responsiveDetailsColumns,p.responsiveDetailsOrderable,p.responsiveDetailsType),e=p.responsivePriorities,e=Array.isArray(e)?e.map(e=>{var[e=!1,t=!1]=e;if("number"==typeof e)return"number"!=typeof t?{responsivePriority:e}:{responsivePriority:e,targets:t}}).filter(e=>e):[],r.columnDefs=r.columnDefs.concat(o,e),r.responsive=!0);let n=jQuery("#ponchoTable").DataTable(r),l=(jQuery("#ponchoTableSearch").keyup(function(){n.search(jQuery.fn.DataTable.ext.type.search.string(this.value)).draw(),I()}),jQuery("#ponchoTable_filter").parent().parent().remove(),1<document.querySelectorAll("#ponchoTableFiltro option").length&&(document.querySelector("#ponchoTableFiltroCont").style.display="block"),e=>{e=document.querySelectorAll(e+" option");return Object.values(e).map(e=>e.value).some(e=>e)});if(jQuery("select[data-filter]").change(function(){var e=jQuery(this).find("option:selected").data("column"),t=jQuery(this).find("option:selected").val();G(e,t),n.columns().search("").columns().search("").draw();let i=Object.keys(f),s=S();s.forEach((e,t)=>{a=i[t];var a=Object.keys(g.headers).indexOf("filtro-"+a),r=C(s[t]),o=C(replaceSpecialChars(s[t]));j(t,f)?n.columns(a).search(k(s[t])):n.columns(a).search(s[t]?`^(${r}|${o})$`:"",!0,!1,!0)}),n.draw(),window.addEventListener("popstate",e=>{}),h&&((o,i=0,s="")=>{let n=!1;o.forEach((e,t)=>{var a=l("#"+e);let r="none";a&&s&&t<=i+1?r="block":a&&!s&&t<=i+1&&(document.querySelectorAll("#"+o[i+1]).forEach(e=>e.innerHTML=""),r="block",n=!1),document.querySelectorAll(`[data-filter-name="${e}"]`).forEach(e=>e.style.display=r)}),(n=l("#"+o[i])&&s&&!l("#"+o[i+1])?!0:n)?_hideTable(!1):_hideTable()})(i,e,t),I()}),p.hasOwnProperty("hash")&&p.hash){var o=$();let t=o?decodeURIComponent(o):"";document.querySelectorAll("#ponchoTableSearch").forEach(e=>{e.value=t,n.search(jQuery.fn.DataTable.ext.type.search.string(t)).draw()})}if(m){var i,s=new URLSearchParams(window.location.search);for(i of s.keys()){var c=s.get(i),d=(t=_,a=i,d=void 0,null!==(d=new RegExp("filter(?<index>(?:[1-9][0-9]|[1-9]))","").exec(a))&&void 0!==(t=t.map(e=>e.replace("filtro-",""))[d.groups.index-1])?t:a);if(""==c.trim())return;"buscar"==i?F("ponchoTableSearch",c,"keyup"):F(d,c,"change")}}},M=e=>{var n;(g=e).entries="function"==typeof p.refactorEntries&&null!==p.refactorEntries?p.refactorEntries(g.entries):g.entries,g.headers=(p.hasOwnProperty("headers")&&p.headers?p:g).headers,g.headers=(e=>{if(p.hasOwnProperty("headersOrder")&&0<p.headersOrder.length){var t={};for(i of p.headersOrder)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}return e})(g.headers,p.headersOrder),_=Object.keys(g.headers).filter(e=>e.startsWith("filtro-")),c=p.asFilter?p.asFilter(g.entries):{},f=((o,i)=>{let s={};return i.forEach((t,a)=>{let e=[];e=c.hasOwnProperty(i[a])?c[i[a]]:o.entries.map(e=>e[t]);var r=b(v(e),t);t=t.replace("filtro-",""),s[t]=[],r.forEach(e=>{s[t].push({columna:a,value:e})})}),s})(g,_),O("ponchoTableFiltroCont",p.filterContClassList),O("ponchoTableSearchCont",p.searchContClassList),(s=>{var e=document.querySelector("#ponchoTable thead");e.innerHTML="";let r=document.createElement("tr");Object.keys(s.headers).forEach((e,t)=>{var a=document.createElement("th");a.textContent=s.headers[e],a.setAttribute("scope","col"),r.appendChild(a)}),e.appendChild(r);e=document.querySelector("#ponchoTable caption");e.innerHTML="",e.textContent=p.tituloTabla;let a=document.querySelector("#ponchoTable tbody");a.innerHTML="",s.entries.forEach((i,e)=>{if(Object.values(i).some(e=>String(e).trim())){i="function"==typeof p.customEntry&&null!==p.customEntry?p.customEntry(i):i;let t=a.insertRow();t.id="id_"+e,Object.keys(s.headers).forEach(a=>{let r=i[a];if(a.startsWith("btn-")&&""!=r){let e=!1,t="";var o=a.split("-").slice(-1),o=(s.headers.hasOwnProperty(o)&&(e=i[o],t="-"+o),a.replace("btn-","").replace(t,"").replaceAll("-"," "));r=z(o,r,e)}else a.startsWith("fecha-")&&""!=r&&(r=H(r));o=t.insertCell();o.dataset.title=s.headers[a],""==r&&(o.className="hidden-xs");let e=p.hasOwnProperty("allowedTags")?p.allowedTags:d;a.startsWith("btn-")&&""!=r?e=[...e,"a","span"]:a.startsWith("fecha-")&&""!=r&&(e=[...e,"span","time"]);a=secureHTML(r,e);w()?o.innerHTML=P(a):o.innerHTML=a})}})})(g),n=g,document.querySelectorAll("#ponchoTableFiltro").forEach(e=>e.innerHTML=""),Object.keys(f).forEach((e,t)=>{let a=f[e][0].columna||0;var r=f[e].map(e=>e.value),r=b(r,e),o=document.createElement("div"),i=(p.hasOwnProperty("filterClassList")?(i="string"==typeof p.filterClassList?p.filterClassList.split(" "):p.filterClassList,o.classList.add(...i)):(i=Math.floor(12/Object.keys(f).length),o.classList.add("col-sm-12","col-md-"+i)),o.dataset.index=t,o.dataset.filterName=e,h&&0<t&&(o.style.display="none"),document.createElement("div")),t=(i.className="form-group",document.createElement("label"));t.setAttribute("for",e),t.textContent=n.headers["filtro-"+e];let s=document.createElement("select");s.classList.add("form-control"),s.dataset.filter=1,s.name=e,s.id=e,s.appendChild(E(a,l,"",!0)),r.forEach(e=>{e&&s.appendChild(E(a,e,e,!1))}),i.appendChild(t),i.appendChild(s),o.appendChild(i),document.querySelector("#ponchoTableFiltro").appendChild(o)}),document.querySelector("#ponchoTableSearchCont").style.display="block",document.querySelector("#ponchoTable").classList.remove("state-loading"),Q(),I(),U(),setTimeout(()=>{document.querySelectorAll('[id^="dt-search-"], #ponchoTable_filter').forEach(e=>{e.closest(".row").remove()})},300)},D=e=>{jQuery.getJSON(e,function(e){var t=new GapiSheetData;g=t.json_data(e),M(g)})};if(p.jsonData){var B=Object.fromEntries(Object.keys(p.jsonData[0]).map(e=>[e,e])),B={entries:p.jsonData,headers:B};M(B)}else if(p.jsonUrl)D(p.jsonUrl);else if(p.hojaNombre&&p.idSpread){B=(new GapiSheetData).url(p.hojaNombre,p.idSpread);D(B)}else{if(!p.hojaNumero||!p.idSpread)throw"¡Error! No hay datos suficientes para crear la tabla.";(t=>{let a=new GapiSheetData;var e=["https://sheets.googleapis.com/v4/spreadsheets/",p.idSpread,"/?alt=json&key=",a.gapi_key].join("");jQuery.getJSON(e,function(e){e=e.sheets[t-1].properties.title,e=a.url(e,p.idSpread);D(e)})})(p.hojaNumero)}};var content_popover=document.getElementById("content-popover");function popshow(){content_popover.classList.toggle("hidden")}function pophidde(){content_popover.classList.add("hidden")}var ponchoUbicacion=function(e){var a,r,o,i,s,n,t="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geoprovincias.json",l="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geomunicipios.json",c="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geolocalidades.json",d=jQuery('input[name="submitted['+e.provincia+']"]'),p=jQuery('input[name="submitted['+e.municipio+']"]'),h=jQuery('input[name="submitted['+e.localidad+']"]');function u(e,t,a,r=!1,o=!1,i=!1){var s=jQuery("<select></select>").attr("id",t).attr("name",e).addClass("form-control form-select").prop("required",r);return o&&s.append("<option value=''>Seleccione una opción</option>"),jQuery.each(a,function(e,t){let a="";i==t.nombre&&(a=' selected="selected"');var r=t.label||t.nombre;s.append(`<option value="${t.id}"${a}>${r}</option>`)}),s}function m(e,t){var a=p.prop("required");return d.val()?u("sMunicipios","sMunicipios",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption=!1,p.val()):u("sMunicipios","sMunicipios",[],a,!0,!1)}function g(e,t){var a=h.prop("required");return d.val()?u("sLocalidades","sLocalidades",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption,h.val()):u("sLocalidades","sLocalidades",[],a,!0,!1)}t=e.urlProvincias||t,l=e.urlMunicipios||l,c=e.urlLocalidades||c,jQuery.getJSON(t,function(e){var t;a=[],e.provincias.forEach(function(e,t){a.push(e)}),e=[],e=(t=a).sort(function(e,t){e=e.nombre.toUpperCase(),t=t.nombre.toUpperCase();return e.localeCompare(t)}),t=d.prop("required"),(i=u("sProvincias","sProvincias",e,t,!0,d.val())).on("change",function(e){var t;d.val(""),p.val(""),h.val(""),s.children("option:not(:first)").remove(),n.children("option:not(:first)").remove(),""!=i.val()&&(p.val(s.find(":selected").text()),d.val(i.find(":selected").text()),t=m(r,i.val()).find("option"),s.append(t),s.val(""),t=g(o,i.val()).find("option"),n.append(t),n.val(""))}),d.after(i),jQuery(i).select2()}),jQuery.getJSON(l,function(e){r=e.municipios.map(e=>({...e,label:e.nombre_completo})),(s=m(r,i.val())).on("change",function(e){p.val(""),""!=s.val()&&p.val(s.find(":selected").text())}),p.after(s),jQuery(s).select2()}),jQuery.getJSON(c,function(e){o=(e=>{let a=new Map;return e.localidades.filter(e=>{var t=e.provincia.id,e=e.departamento.nombre+" - "+e.nombre,t=(a.has(t)||a.set(t,new Set),a.get(t));return!t.has(e)&&(t.add(e),!0)}).map(e=>({...e,label:e.departamento.nombre+" - "+e.nombre}))})(e),(n=g(o,i.val())).on("change",function(e){h.val(""),""!=n.val()&&h.val(n.find(":selected").text())}),h.after(n),jQuery(n).select2()}),d.hide(),p.hide(),h.hide()};function ponchoChart(t){var e;function _e(e){var t={Line:"line",Bar:"bar",Pie:"pie",Area:"line","Horizontal Bar":"horizontalBar","Stacked Bar":"bar",Mixed:"mixed",HeatMap:"heatmap",default:""};return t[e]||t.default}function fe(e){var e=e.toString().replace(".",","),t=e.split(","),a=new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(t[0]);return e=1<t.length?a.concat(",",t[1].substr(0,2)):a}function a(e,r){var B,t,a,q,o,i,P,z,H,s,n,N,R,l,c,V,G,$,d,p,U,h,Q,u,W,m,g=[],_=[],f=[],J=[],y=[],b=[],v=[],E=[],C=0,x="",Z=[],S=0,w=[],Y=[],X=0,k=r.posicionLeyendas||"top",A="",A=void 0===r.mostrarLeyendas||r.mostrarLeyendas,L="",L=void 0===r.mostrarTotalStacked||r.mostrarTotalStacked,j=_e(r.tipoGrafico),T=e.values;if(jQuery.each(Object.keys(T[0]),function(e,t){var a;"eje-y"==T[0][e].substr(0,5)?(a=(a=T[0][e].split("-"))[0]+a[1],_.push(a),f.push(e)):"nombre-corto"==T[0][e]&&"heatmap"==j&&(X=e)}),jQuery.each(T,function(i,e){var r;0==i&&jQuery.each(f,function(e,t){var a,r,o=/(?<axis>eje-(x|y(?:[1-9]|[1-9][0-9])))-(?<color>[\w-]*?)(?:-(?<type>linea|barra))?$/.exec(T[i][f[e]]);o&&(a=o.groups.type,r=o.groups.axis.replace("-",""),v[r]=[],J.push(o.groups.color),"mixed"==j)&&(a&&("barra"==a||"linea"==a)?Z.push(a):(0==e&&Z.push("barra"),1==e&&Z.push("linea")))}),1==i&&jQuery.each(f,function(e,t){"pie"==j||"heatmap"==j?g.push(T[i][f[e]]):(b.push(T[i][f[e]]),C+=1)}),1<i&&(r=!1,jQuery.each(f,function(e,t){var a=T[0][f[e]].split("-"),a=a[0]+a[1];"pie"==j?v[a].push(T[i][f[e]]):"heatmap"==j?(0==r&&(b.push(T[i][0]),r=!0,C+=1),e!=X&&v[a].push(T[i][f[e]]),e+2==X&&(void 0===T[i][e+2]?Y.push("*"):Y.push(T[i][e+2]))):(0==r&&(g.push(T[i][0]),r=!0),v[a].push(T[i][f[e]]))}))}),"pie"==j?(B=[],jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&B.push(v[e])}),E=B):1==C&&jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(E=v[e])}),"mixed"==j&&0<(t=r.porcentajesMixed||"").length&&(w=t.split(",")),x=1==r.porcentajes?"line"==j&&1<C?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}},mode:"index",intersect:!1}:"pie"==j?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a+"%"}}}:"Stacked Bar"==r.tipoGrafico?1==L?{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:"line"==j&&1<C?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}},mode:"index",intersect:!1}:"pie"==j?{enabled:!0,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a}}}:"Stacked Bar"==r.tipoGrafico&&1<C?1==L?{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)}}}:{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=fe(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}},"pie"==j&&(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),t=g,L=E,H=j,s=y,a=r.idComponenteGrafico,N=k,R=x,n=A,a=document.getElementById(a),new Chart(a,{type:H,data:{labels:t,datasets:[{data:L,borderColor:s,backgroundColor:s,borderWidth:2}]},options:{legend:{display:n,position:N},responsive:!0,tooltips:R}})),1==C&&(a=ponchoColor(J[0]),"Line"==r.tipoGrafico&&(H=g,L=E,s=j,n=a,N=b[0],R=r.ejeYenCero,l=r.idComponenteGrafico,c=k,V=x,G=A,l=document.getElementById(l),new Chart(l,{type:s,data:{labels:H,datasets:[{data:L,borderColor:n,backgroundColor:n,borderWidth:2,lineTension:0,fill:!1,label:N}]},options:{legend:{display:G,position:c},tooltips:V,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:R}}]}}})),"bar"!=j&&"Area"!=r.tipoGrafico||(l=g,L=E,G=j,c=a,V=b[0],q=r.ejeYenCero,o=r.idComponenteGrafico,i=k,P=x,z=A,o=document.getElementById(o),new Chart(o,{type:G,data:{labels:l,datasets:[{data:L,borderColor:c,backgroundColor:c,borderWidth:2,lineTension:0,label:V}]},options:{legend:{display:z,position:i},tooltips:P,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:q}}]}}})),"horizontalBar"==j)&&(o=g,L=E,z=j,i=a,P=b[0],q=r.ejeYenCero,O=r.idComponenteGrafico,oe=k,ie=x,ee=A,O=document.getElementById(O),new Chart(O,{type:z,data:{labels:o,datasets:[{data:L,borderColor:i,backgroundColor:i,borderWidth:2,lineTension:0,label:P}]},options:{legend:{display:ee,position:oe},tooltips:ie,responsive:!0,scales:{xAxes:[{ticks:{beginAtZero:q}}]}}})),1<C)if("heatmap"==j)if(void 0!==r.heatMapColors&&""!=r.heatMapColors&&void 0!==r.heatMapColorsRange&&""!=r.heatMapColorsRange){for(var K=[],O="labelFila",L="labelColumna",ee="labelValor",te=(void 0!==r.datosTooltip&&0<r.datosTooltip.length&&(void 0!==r.datosTooltip[0]&&void 0!==r.datosTooltip[0].labelFila&&(O=r.datosTooltip[0].labelFila),void 0!==r.datosTooltip[1]&&void 0!==r.datosTooltip[1].labelColumna&&(L=r.datosTooltip[1].labelColumna),void 0!==r.datosTooltip[2])&&void 0!==r.datosTooltip[2].labelValor&&(ee=r.datosTooltip[2].labelValor),jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(E=v[e],K.push(E))}),[]),F=0;F<b.length;F++){for(var e=[],ae=0;ae<g.length;ae++){E={x:g[ae],y:parseInt(K[ae][F])};e.push(E)}te.push({name:("*"!=Y[F]?Y:b)[F],data:e})}for(var re=[],F=0;F<r.heatMapColorsRange.length-1;F++){e={from:r.heatMapColorsRange[F],to:r.heatMapColorsRange[F+1],color:ponchoColor(r.heatMapColors[F])};re.push(e)}var oe="",oe=void 0===r.mostrarEjeY||r.mostrarEjeY,ie=te,se=r.idComponenteGrafico,ne=b,le=re,ce=O,de=L,pe=ee,L=r.tituloGrafico,I=oe,he=k,ue=A,se=document.getElementById(se),me=(new ApexCharts(se,{series:ie,chart:{height:650,type:"heatmap"},dataLabels:{enabled:!1},title:{text:L},tooltip:{custom:function({series:e,seriesIndex:t,dataPointIndex:a,w:r}){e=fe(e[t][a]);return'<div class="arrow_box"><span>'+ce+": "+ne[t]+"<br>"+de+": "+r.globals.labels[a]+"<br>"+pe+": "+e+"</span></div>"}},plotOptions:{heatmap:{shadeIntensity:.5,radius:0,useFillColorAsStroke:!1,colorScale:{ranges:le}}},yaxis:{show:I},legend:{show:ue,position:he},responsive:[{breakpoint:1e3,options:{yaxis:{show:!1},legend:{show:ue,position:"top"}}}]}).render(),document.getElementsByClassName("apexcharts-toolbar"));for(let e=0;e<me.length;e++)me[e].style.display="none"}else void 0!==r.heatMapColors&&r.heatMapColors,void 0!==r.heatMapColorsRange&&r.heatMapColorsRange;else{var M=[],D=0,ge=(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),0);jQuery.each(Object.keys(_),function(e,t){var a,e=_[e];v.hasOwnProperty(e)&&(E=v[e],"Line"==r.tipoGrafico?a={label:b[D],data:E,borderColor:y[D],fill:!1,borderWidth:2,lineTension:0,backgroundColor:y[D]}:"Bar"==r.tipoGrafico||"Area"==r.tipoGrafico||"Horizontal Bar"==r.tipoGrafico||"Stacked Bar"==r.tipoGrafico?a={label:b[D],data:E,borderColor:y[D],backgroundColor:y[D],borderWidth:2,lineTension:0}:"Mixed"==r.tipoGrafico&&("barra"==(e=Z[ge])?a={label:b[D],data:E,backgroundColor:y[D],yAxisID:"left-y-axis",type:"bar"}:"linea"==e&&(a={label:b[D],data:E,borderColor:y[D],backgroundColor:y[D],type:"line",yAxisID:"right-y-axis",fill:!1})),M.push(a),D+=1,ge+=1)}),"mixed"==j&&(2==w.length?S=2:1==w.length?"eje-y1"==w[0]?S=0:"eje-y2"==w[0]&&(S=1):S=3),"Stacked Bar"==r.tipoGrafico?(se=g,L=j,le=M,I=r.idComponenteGrafico,he=r.ejeYenCero,ue=k,w=x,W=A,I=document.getElementById(I),new Chart(I,{type:L,data:{labels:se,datasets:le},options:{legend:{display:W,position:ue,labels:{textAlign:"center"}},tooltips:w,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:he},stacked:!0}],xAxes:[{stacked:!0}]}}})):"Mixed"==r.tipoGrafico?(L=g,W="bar",w=M,d=r.idComponenteGrafico,p=r.ejeYenCero,U=k,h=S,S=b[0],Q=b[1],u=A,d=document.getElementById(d),new Chart(d,{type:W,data:{labels:L,datasets:w},options:{legend:{display:u,position:U,labels:{textAlign:"center"}},tooltips:{enabled:!0,mode:"single",callbacks:{label:function(e,t){var a="",r=((2==h||e.datasetIndex==h)&&(a="%"),fe(e.yLabel));return t.datasets[e.datasetIndex].label+": "+r+" "+a}}},responsive:!0,scales:{yAxes:[{id:"left-y-axis",type:"linear",position:"left",ticks:{beginAtZero:p,callback:function(e){return e+(1!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:Q,fontColor:"black"}},{id:"right-y-axis",type:"linear",position:"right",ticks:{beginAtZero:p,callback:function(e){return e+(0!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:S,fontColor:"black"}}]}}})):"Horizontal Bar"==r.tipoGrafico?(d=g,L=j,w=M,u=r.idComponenteGrafico,U=r.ejeYenCero,Q=k,p=x,S=A,u=document.getElementById(u),new Chart(u,{type:L,data:{labels:d,datasets:w},options:{legend:{display:S,position:Q,labels:{textAlign:"center"}},tooltips:p,responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{ticks:{beginAtZero:U}}]}}})):(L=g,w=j,S=M,m=r.idComponenteGrafico,$=r.ejeYenCero,k=k,x=x,A=A,m=document.getElementById(m),new Chart(m,{type:w,data:{labels:L,datasets:S},options:{legend:{display:A,position:k,labels:{textAlign:"center"}},tooltips:x,responsive:!0,maintainAspectRatio:!0,scales:{yAxes:[{ticks:{beginAtZero:$}}]}}}))}""!=r.tituloGrafico&&void 0!==r.tituloGrafico&&(m=r.idTagTituloGrafico,w=r.tituloGrafico,document.getElementById(m))&&(document.getElementById(m).innerHTML=w)}(e=>{var t=!1;return t=(e.idSpread&&e.hojaNombre||e.jsonUrl||e.jsonInput)&&void 0!==e.tipoGrafico&&""!=e.tipoGrafico&&void 0!==e.idComponenteGrafico&&""!=e.idComponenteGrafico&&""!=_e(e.tipoGrafico)?!0:t})(t)?t.jsonInput?a(jQuery.parseJSON(t.jsonInput),t):(e=t.jsonUrl||"https://sheets.googleapis.com/v4/spreadsheets/"+t.idSpread+"/values/"+t.hojaNombre+"?alt=json&key=AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",jQuery.getJSON(e,function(e){a(e,t)})):(void 0!==t.idSpread&&t.idSpread,void 0!==t.hojaNombre&&t.hojaNombre,void 0!==t.tipoGrafico&&t.tipoGrafico,void 0!==t.idComponenteGrafico&&t.idComponenteGrafico,_e(t.tipoGrafico))}let gapi_legacy=e=>{if(!e||!e.values||0===e.values.length)throw new TypeError("Invalid response format");if(!Array.isArray(e.values)||!Array.isArray(e.values[0]))throw new TypeError("Invalid response format: values should be arrays");let i=e.values[0],s=/ |\/|_/gi,n=[];return e.values.forEach((e,t)=>{if(0<t){var a,r={};for(a in i){var o=e.hasOwnProperty(a)?e[a].trim():"";r["gsx$"+i[a].toLowerCase().replace(s,"")]={$t:o}}n.push(r)}}),{feed:{entry:n}}},PM_TRANSLATE=("undefined"!=typeof exports&&(module.exports=gapi_legacy),{es:{cluster_click:"Clic para expandir grupo",cluster_large:"Grupo grande de {{count}} ubicaciones",cluster_medium:"Grupo mediano de {{count}} ubicaciones",cluster_small:"Grupo chico de {{count}} ubicaciones",filter_initial:'Hay {{total_results}} puntos en el mapa. <a href="#" class="{{reset_search}}"aria-label="Restablecer valores del mapa">Restablecer mapa</a>',filter_no_results:"No se encontraron entradas.",filter_select_label:"Seleccione {{header}}",filter_select_legend:"Filtrar por {{header}}",filter_select_all_option_text:"Todos",filter_no_results_by_term:"No encontramos resultados para tu búsqueda.",filter_one_result:"{{total_results}} resultado coincide con tu búsqueda.",filter_reset_values_link:' <a href="#" class="{{reset_search}}"aria-label="Restablecer valores del mapa">Restablecer mapa</a>',filter_results:"{{total_results}} resultados coinciden con tu búsqueda.",filters_aria_label_close_panel:"Cerrar panel de filtros",filters_aria_label_open_close_panel:"Abre o cierra el panel de filtros",filters_aria_label_panel:"Panel de filtros",filters_aria_label_reset:"Restablecer valores del mapa",filters_check_all:"Marcar todos",filters_close_panel_text:"Cerrar panel",filters_has:"Se están usando filtros.",filters_reset:"Restablecer mapa",map_exit:"Salir del mapa",map_fit_bounds:"Ajustar marcadores al mapa",map_full_view:"Ver mapa completo",map_goto_markers:"Ir a los marcadores del mapa",map_help_us:"Ayudá a mejorar el mapa",openmap_aria_label:"Abrir el punto geográfico en un mapa alternativo",openmap_label:"Abrir ubicación en:",search_data:"Hacer una búsqueda",search_placeholder:"Su búsqueda",theme_aria_label_panel:"Herramienta para cambiar de tema visual",theme_change:"Cambiar tema del mapa",theme_description_contrast:"Fondo oscuro con bordes blancos.",theme_description_dark:"Fondo oscuro con bordes blancos de contraste medio.",theme_description_default:"Colores predeterminados del proveedor del mapa.",theme_description_grayscale:"Mapa e interfaz en tonos de gris.",theme_description_relax:"Paleta de colores suaves.",theme_name_contrast:"Alto contraste",theme_name_dark:"Oscuro",theme_name_default:"Original",theme_name_grayscale:"Gris",theme_name_relax:"Relax",theme_open_panel:"Abre el panel de temas",theme_reset:"Restablece el tema del mapa a su configuración original",zoom_aria_label_panel:"Herramientas de zoom",zoom_goto_panel:"Ir a la herramienta de zoom",zoom_in:"Acercar",zoom_out:"Alejar"}});class PonchoMap{constructor(e,t){var a={pan_by:!0,accesible_menu_extras:[{label:"map_help_us",link:"https://www.argentina.gob.ar/sugerencias",target:"_blank"}],allowed_tags:[],anchor_delay:0,map_breakpoint:{large:{lg:{fraction:"3:10",value:992},md:{fraction:"2:7",value:768},sm:{fraction:"1:4",value:576},xl:{fraction:"2:7",value:1200},xs:{fraction:"1:1",value:0},xxl:{fraction:"2:7",value:1400}},default:{lg:{fraction:"4:10",value:992},md:{fraction:"2:6",value:768},sm:{fraction:"1:4",value:576},xl:{fraction:"2:7",value:1200},xs:{fraction:"1:1",value:0},xxl:{fraction:"2:7",value:1400}}},media_breakpoint:{lg:992,md:768,sm:576,xl:1200,xs:0,xxl:1400},content_selector:!1,debug:!1,default_themes:[{aria_label:!1,code:"default",description:"theme_description_default",name:"theme_name_default"},{aria_label:!1,code:"contrast",description:"theme_description_contrast",name:"theme_name_contrast"},{aria_label:!1,code:"dark",description:"theme_description_dark",name:"theme_name_dark"},{aria_label:!1,code:"grayscale",description:"theme_description_grayscale",name:"theme_name_grayscale"},{aria_label:!1,code:"relax",description:"theme_description_relax",name:"theme_name_relax"}],error_reporting:!1,fit_bounds_onevent:!0,fit_bounds_options:{padding:.005,maxZoom:22,animate:!0,duration:.25},hash:!1,header_icons:[],headers:{},id:"id",id_mixing:[],lang:"es",latitud:"latitud",longitud:"longitud",map_align:"center",map_anchor_zoom:16,map_background:"#DDD",map_init_options:{},map_layers:!0,map_layers_default:"osm",map_opacity:1,map_selector:"map",map_style:{},map_view:[-40.44,-63.59],map_zoom:4,markdown_options:{extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"],simpleLineBreaks:!0,tables:!0},marker:"azul",marker_cluster_options:{maxClusterRadius:30,showCoverageOnHover:!1,spiderLegPolylineOptions:{color:"#666666","fill-opacity":.5,opacity:.5,weight:1},spiderfyDistanceMultiplier:.5,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0},min_zoom:2,no_info:!1,open_maps:!1,open_maps_options:{aria_label:"openmap_aria_label",items:[{aria_label:!1,hreflang:"en",label:"Apple maps",lang:"en",link:"https://maps.apple.com/?q={{latitude}},{{longitude}}",platform:"mac",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:!1,label:"Google maps",lang:"en-US",link:"https://www.google.com/maps/search/?api=1&query={{latitude}},{{longitude}}",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:"es",label:'<abbr lang="es" title="Instituto Geográfico Nacional">IGN</abbr> – ArgenMap',lang:"es",link:"https://mapa.ign.gob.ar/?zoom=17&lat={{latitude}}&lng={{longitude}}&layers=argenmap&marker={{latitude}},{{longitude}}",rel:["alternate"],target:"_blank"},{aria_label:!1,hreflang:"en",label:"Open street maps",lang:"en",link:"https://www.openstreetmap.org/?mlat={{latitude}}&mlon={{longitude}}#map=16/{{latitude}}/{{longitude}}",rel:["alternate"],target:"_blank"}],label:"openmap_label"},render_slider:!0,reset_zoom:!0,scope:"",scroll:!1,slider:!1,slider_selector:".pm-slider",slider_size:!1,summary:!1,template:!1,template_innerhtml:!1,template_markdown:!1,template_structure:{container_classlist:["info-container"],definition_classlist:[],definition_list_classlist:["definition-list"],definition_list_tag:"dl",definition_tag:"dd",term_classlist:["h6","fw-bold","m-b-0","font-sans-serif"],term_tag:"dt",title_classlist:["h4","pm-color-primary","m-t-0"]},theme:"default",theme_map:!1,theme_tool:!0,theme_ui:!1,throw_exceptions:!1,title:!1,tooltip:!1,tooltip_label:!1,tooltip_options:{className:"leaflet-tooltip-own",direction:"auto",offset:[13,-18],opacity:1,permanent:!1,sticky:!1}},r=Object.assign({},a,t),e=(this.pan_by=Boolean(r.pan_by),this.lang=r.lang,this.dictionary=(r?.dictionary&&r.dictionary[this.lang]?r.dictionary:PM_TRANSLATE)[this.lang],this.error_reporting=r.error_reporting,this.throw_exceptions=r.throw_exceptions,this.scope=r.scope,this.render_slider=r.render_slider,this.template=r.template,this.template_structure={...a.template_structure,...t.template_structure},this.debug=r.debug,this.template_innerhtml=r.template_innerhtml,this.template_markdown=r.template_markdown,this.markdown_options=r.markdown_options,this.allowed_tags=r.allowed_tags,this.map_selector=r.map_selector,this.headers=this.setHeaders(r.headers),this.header_icons=r.header_icons,this.hash=r.hash,this.scroll=r.scroll,this.fit_bounds_onevent=r.fit_bounds_onevent,this.fit_bounds_options=r.fit_bounds_options,this.map_view=r.map_view,this.map_init_options=r.map_init_options,this.anchor_delay=r.anchor_delay,this.map_zoom=r.map_zoom,this.min_zoom=r.min_zoom,this.map_anchor_zoom=r.map_anchor_zoom,this.tooltip_options=r.tooltip_options,this.tooltip_label=r.tooltip_label,this.tooltip=r.tooltip,this.marker_cluster_options=r.marker_cluster_options,this.marker_color=r.marker,this._icon_cache=new Map,this._marker_color_type=this._getMarkerColorType(),this.id=r.id,this.id_mixing=r.id_mixing,this.title=r.title,this.map_background=r.map_background,this.theme=r.theme,this.theme_tool=r.theme_tool,this.default_themes=r.default_themes,this.temes_not_visibles=[["transparent","Transparent"]],this.theme_ui=r.theme_ui,this.theme_map=r.theme_map,this.map_opacity=r.map_opacity,this.latitude=r.latitud,this.longitude=r.longitud,this.slider=r.slider,this.slider_size=r.slider_size,this.no_info=r.no_info,this.reset_zoom=r.reset_zoom,this.slider_selector=this._selectorName(r.slider_selector),this.selected_marker,this.scope_selector=`[data-scope="${this.scope}"]`,this.scope_sufix="--"+this.scope,this.content_selector=r.content_selector||".js-content"+this.scope_sufix,this.content_outside=this.content_selector!==".js-content"+this.scope_sufix,this.data=this.formatInput(e),this.geometryTypes=["Point","LineString","Polygon","MultiPoint","MultiLineString"],this.map_layers=r.map_layers,this.map_layers_default=r.map_layers_default,this.featureStyle={stroke:"dodgerblue","stroke-opacity":1,"stroke-width":2,"fill-opacity":.5},this.accesible_menu_search=[],this.accesible_menu_filter=[],this.open_maps=r.open_maps,this.open_maps_options=Object.assign({},a.open_maps_options,t?.open_maps_options),this.media_breakpoint=r.media_breakpoint,this.map_breakpoint=r.map_breakpoint,this.map_breakpoint_fractions=r.map_breakpoint_fractions,this.map_align=r.map_align,this.map_style=r.map_style,this.accesible_menu_extras=r.accesible_menu_extras,this.summary=r.summary,this.geojson,this.ersiURL="https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",this.osmURL="https://mapa-ign.argentina.gob.ar/osm/{z}/{x}/{-y}.png",{ersi:{attributes:{tabindex:-1},hreflang:"es",label:'© <abbr lang="en" title="Environmental Systems Research Institute">Esri</abbr>',lang:"en",link:"https://www.esri.com/es-es/home"},ign:{attributes:{tabindex:-1},hreflang:"es",label:'<abbr lang="es" title="Instituto Geográfico Nacional">IGN</abbr>',lang:"es",link:"https://www.ign.gob.ar/AreaServicios/Argenmap/Introduccion"},leaflet:{attributes:{tabindex:-1},hreflang:"en",label:"Leaflet",lang:"en",link:"https://leafletjs.com/",title:"Biblioteca JavaScript para mapas interactivos"},osm:{attributes:{tabindex:-1},hreflang:"en",label:'<abbr lang="en" title="Open Street Map">OSM</abbr>',lang:"en",link:"https://www.openstreetmap.org/copyright"}}),{leaflet:a,ersi:t,ign:r,osm:e}=e,a=(this.prefix=this.addAnchorElement(a,"html"),this.ersiAttribution="Contribuidores: "+this.addAnchorElement(t,"html"),this.osmAttribution="Contribuidores: "+this.addAnchorElement(r,"html")+", "+this.addAnchorElement(e,"html"),this.layerViewSettings={satelital:{attribution:this.ersiAttribution,label:"Mapa satelital",tilesUrl:this.ersiURL,setVisuals:this._setSatelitalView},osm:{attribution:this.osmAttribution,label:"Mapa",setVisuals:this._setOsmView,tilesUrl:this.osmURL}},"undefined"!=typeof L&&L.hasOwnProperty("map")||this.showAlert({title:"No se encuentra el componenete Leaflet",messages:["Verifique que <strong>Leaflet</strong>, esté incluido en el documento HTML.","Lea las indicaciones para usar el componente leaflet "+`en: ${this.addAnchorElement({hreflang:"en",label:"<em>Quick start</em>",lang:"en",link:"https://leafletjs.com/examples/quick-start/",target:"_blank"},"html")}.`]},"danger",!0),this.layerViewConf="satelital"==this.map_layers_default?this.layerViewSettings[this.map_layers_default]:this.layerViewSettings.osm,this.tileLayer=new L.tileLayer(this.layerViewConf.tilesUrl),{renderer:L.svg(),keyboard:!0,...this.map_init_options,zoomControl:!1});this.map=new L.map(this.map_selector,a),this.map.setView(this.map_view,this.map_zoom),this.map.attributionControl.setPrefix(this.prefix),!1!==this.map_init_options?.zoomControl&&L.control.zoom({position:"topleft",zoomControl:!0,zoomInText:"+",zoomInTitle:this._t("zoom_in"),zoomOutText:"-",zoomOutTitle:this._t("zoom_out")}).addTo(this.map),L.hasOwnProperty("markerClusterGroup")?this.markers=new L.markerClusterGroup({...this.marker_cluster_options,...this.customClusters()}):this.markers=new L.FeatureGroup,this.ponchoLoaderTimeout}get version(){return"2.2.2"}logger={log:()=>{this.debug},error:()=>{this.debug},warn:()=>{this.debug},table:()=>{this.debug},info:()=>{this.debug}};_t=(e,t={})=>this.isEmptyString(e)?(this.logger.warn("_t","Está recibiendo una definición vacía."),e):this.isObject(t)?(e=this.dictionary.hasOwnProperty(e)?this.dictionary[e]:e,this.tplParser(e,t)):void this.logger.warn("_t","tpl requiere un objeto clave/valor.");customClusters=()=>{if(!L?.divIcon)return this.logger.warn("Leaflet divIcon is not available"),null;let r={SMALL:10,MEDIUM:100},o=["leaflet-marker-icon","marker-cluster","leaflet-zoom-animated","leaflet-interactive"],i=(e,t)=>{var t=this._t("cluster_"+t,{count:e}),a=this._t("cluster_click"),r=document.createElement("div"),t=(r.setAttribute("aria-label",t),r.title=a,document.createElement("span"));return t.textContent=e,r.appendChild(t),r};return{iconCreateFunction:e=>{var e=e.getChildCount(),t=(t=e)<r.SMALL?"small":t<r.MEDIUM?"medium":"large",a=[...o,"marker-cluster-"+t];return L.divIcon({html:i(e,t),className:a.join(" "),iconSize:L.point(40,40)})}}};isString(e){return"string"==typeof e}isEmptyString(e){return"string"==typeof e&&0===e.trim().length}isNumber(e){return"number"==typeof e&&isFinite(e)}isObject(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}isEmptyObject(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&0===Object.keys(e).length}tplParser=(e,r)=>{if(this.isString(e))return this.isEmptyString(e)?e:this.isObject(r)?this.isEmptyObject(r)?e:Object.keys(r).reduce(function(e,t){var a;if(r.hasOwnProperty(t))return a=new RegExp("\\{\\{\\s{0,2}"+t+"\\s{0,2}\\}\\}","gm"),e.replace(a,r[t])},e):void 0};_processMatch=(t,a)=>{var{replaceStr:t,key:r,compare:o,elseReturn:i,operator:s}=t.groups;if(a.hasOwnProperty(r)){a=a[r],r=o;let e=!1;return(e="!="===s?String(a)!==String(r):"=="===s?String(a)===String(r):!!a)?t:i}return i};conditionalTemplate=(e,t)=>{var a,r=/\{\%\s?('|`)(?<replaceStr>[^\1]*?)\1 if (?<key>[\w\-\.]+)\s?(?:(?<operator>\!\=|\=\=)\s?('|"|`)(?<compare>.*?)\5) else ('|"|`)(?<elseReturn>.*?)\7\s?\%\}/gm;let o=e;for(;null!==(a=r.exec(e));){a.index===r.lastIndex&&r.lastIndex++;var i=this._processMatch(a,t);o=o.replace(a[0],i)}return o};tpl=(e,t,a=0)=>{var r;return this.isObject(t)||this.logger.error("[tpl]","El segundo parámetro debe ser un objeto"),this.isEmptyObject(t)&&this.logger.error("[tpl]","El segundo parámetro no puede ser un objeto vacío"),this.isString(e)?this.isEmptyString(e)?(this.logger.info("[tpl]","Llegó una cadena de texto vacía"),""):(r=this.conditionalTemplate(e,t),null!=(r=this.tplParser(r,t))?r:e):(this.logger.error("[tpl]","El primer parámetro debe ser un string"),String(e))};_setSliderSize=()=>{var e,t;this.isString(this.slider_size)&&(["large","default","medium"].includes(this.slider_size)||(this.logger.warn(`Invalid slider size: ${this.slider_size}. Defaulting to 'default'.`),this.slider_size="default"),e=document.querySelector(".poncho-map"+this.scope_selector))&&(t="slider-"+this.slider_size,e.classList.contains(t)||(e.classList.remove("slider-large","slider-default","slider-medium"),e.classList.add(t)))};_mapWidth=()=>this.map.getSize().x;_setFraction=e=>{let t;var a=this.isNumber(e)?e:document.getElementById(this.map_selector).offsetWidth;let r=Object.keys(this.media_breakpoint);e=["large","default"].includes(this.slider_size)?this.slider_size:"default",e=this.map_breakpoint[e];if(Object.keys(e).every(e=>r.includes(e))){if(Object.values(e).every(function(e){return"object"==typeof e&&null!==e&&"value"in e&&"fraction"in e})){var o,i=Object.entries(e).sort(([,e],[,t])=>t.value-e.value);for(o of i){var[s,{value:n,fraction:l}]=o;if(this.isNumber(n)&&n<=a){t=l,this.logger.table(i),this.logger.log(s,n,t,a);break}}return t||"1:1"}this.showAlert({title:"La definición de <code>map_breakpoints</code>, tiene errores",messages:["Verifique que para cada entrada existan las claves: `value` y `fraction`."],terminal:e},"warning")}else this.showAlert({title:"Una o muchas claves en: <code>map_breakpoints</code>, no son claves correctas.",messages:["Compruebe que las claves coincidan con alguna de las siguientes: "+r.join(", ")+"."],terminal:e},"danger",!0)};setMapAlignment=(e,t=!1,a=this.map_view)=>{if(["left","right"].includes(e.toLowerCase()))if(t=t||this._setFraction(),/^[0-9]{1,2}\:[0-9]{1,2}$/.test(t)){var[t,r]=t.split(":"),o=t/r;if(1===Number(o)||.5===Number(o))return null;var[o,i]=a,a=Array.isArray(a)?{lat:o,lng:i}:this.map.getCenter(),o=this.map.latLngToContainerPoint(a),i="left"==e?r-t:t,a=document.querySelector(".poncho-map"+this.scope_selector).offsetWidth/r*i,e=o.y,t=L.point(a,e),r=this.map.containerPointToLatLng(t);this.map_view=[r.lat,r.lng],this.map.setView(r)}else this.logger.error("La fracción para posicionar el mapa tiene errores sintácticos.")};addAnchorElement=(e={},t="object")=>{var{id:e,title:a,css:r,label:o=null,aria_label:i,link:s="#",hreflang:n,lang:l,target:c,rel:d,datasets:p={},attributes:h={}}=e;let u=/^[a-z]{2}(-[A-Z]{2})?$/i,m=["_self","_blank","_parent","_top"];var g=["noopener","noreferrer"],_=e=>this.isString(e)&&u.test(e),f=e=>m.includes(e);let y=document.createElement("a");if(y.href=s,o&&(s=f(c)&&"_blank"===c,y.innerHTML=s?o+' <span class="sr-only">(Abre en una nueva pestaña)</span>':o),f(c)&&(y.target=c),Array.isArray(d)&&0<d.length){let t=[...new Set(d.filter(Boolean))];"_blank"===c&&g.forEach(e=>{t.includes(e)||t.push(e)}),y.rel=t.join(" ")}else"_blank"===c&&(y.rel=g.join(" "));return _(l)&&(y.lang=l),_(n)&&(y.hreflang=n),i&&y.setAttribute("aria-label",i),e&&(y.id=e),a&&(y.title=a),Array.isArray(r)&&0<r.length&&0<(s=r.filter(e=>e&&"string"==typeof e)).length&&y.classList.add(...s),Object.entries(h).forEach(([e,t])=>{e&&null!=t&&y.setAttribute(e,String(t))}),Object.entries(p).forEach(([e,t])=>{e&&null!=t&&y.setAttribute("data-"+e,String(t))}),"html"===t?y.outerHTML:y};mapOpacity=(e=!1)=>{e=e||this.map_opacity;this.tileLayer.setOpacity(e)};mapBackgroundColor=(e=!1)=>{var e=e||this.map_background,t=this.scope_selector+" .leaflet-container",t=document.querySelector(t);t&&(t.style.background=e)};_disabledEnableThemes=(e,t="disabled")=>{for(var a of e){a=`${this.scope_selector} [data-theme="${a}"]`;document.querySelectorAll(a).forEach(function(e){"disabled"==t?(e.ariaHidden="true",e.parentElement.style.display="none"):(e.removeAttribute("aria-hidden"),e.parentElement.style.display="initial")})}};_setLayerTheme=(t,a,e)=>{document.querySelectorAll(this.scope_selector).forEach(function(e){e.classList.remove(...t),e.classList.add(a)}),this._disabledEnableThemes(["contrast","dark"],e);e=this.scope_selector+' [data-theme^="layer-"]';document.querySelectorAll(e).forEach(function(e){e.dataset.theme==a?e.ariaCurrent="true":e.ariaCurrent="false"})};_setOsmView=()=>{var{tileLayer:e,map:t,osmURL:a,ersiAttribution:r,osmAttribution:o}=this,t=t.attributionControl;e.setUrl(a),t.removeAttribution(r),t.addAttribution(o),this._setLayerTheme(["layer-satelital"],"layer-osm",!1)};_setSatelitalView=()=>{var{tileLayer:e,map:t,ersiURL:a,osmAttribution:r,ersiAttribution:o}=this,t=t.attributionControl;e.setUrl(a),t.removeAttribution(r),t.addAttribution(o),this._setLayerTheme(["layer-osm","map-contrast","map-dark","ui-contrast","ui-dark"],"layer-satelital","disabled")};_menuTheme=()=>{if(this.theme_tool){document.querySelectorAll("#themes-tool"+this.scope_sufix).forEach(e=>e.remove());let t=document.createElement("div");t.classList.add("pm-list-unstyled","pm-list","pm-tools","js-themes-tool"+this.scope_sufix);var a=document.createElement("div"),r=(a.tabIndex="-1",a.dataset.toggle="true",document.createElement("i")),o=(r.ariaHidden="true",r.classList.add("pmi","pmi-adjust"),document.createElement("button")),i=(o.title=this._t("theme_change"),o.id="themes-tool-button"+this.scope_sufix,o.tabIndex="0",o.classList.add("pm-btn","pm-btn-rounded-circle"),o.ariaHasPopup="true",o.ariaControls="menu",o.role="button",o.ariaLabel=this._t("theme_open_panel"),o.appendChild(r),document.createElement("ul")),r=(i.id="list-themes-tool-button"+this.scope_sufix,i.role="menu",i.ariaLabelledby="themes-tool-button"+this.scope_sufix,i.classList.add("pm-container","pm-list","pm-list-unstyled","pm-p-1","pm-caret","pm-caret-b","pm-toggle","pm-accesible-menu"),{label:"Restablecer",attributes:{role:"menuitem",tabIndex:0},aria_label:this._t("theme_reset"),css:["pm-item-link","js-reset-theme"]}),r=this.addAnchorElement(r);let e=document.createElement("li");e.role="presentation",e.classList.add("pm-item-separator"),e.appendChild(r),i.appendChild(e);var s=this.default_themes.length;for(let t=0;t<=s-1;t++){var{code:n,name:l,aria_label:c,description:d}=this.default_themes[t],c={aria_label:c,css:["js-set-theme","pm-item-link"],attributes:{role:"menuitem",tabIndex:0},datasets:{theme:n}},n=document.createElement("span"),l=(n.textContent=this._t(l),this.addAnchorElement(c));l.appendChild(n),d&&((c=document.createElement("small")).classList.add("d-block","small","sr-only"),c.textContent=this._t(d),(n=document.createElement("span")).textContent=", ",n.className="sr-only",l.appendChild(n),l.appendChild(c));let e=document.createElement("li");e.role="presentation",t==s-1&&this.map_layers&&e.classList.add("pm-item-separator"),e.appendChild(l),i.appendChild(e)}if(this.map_layers)for(var p of Object.keys(this.layerViewSettings)){var h=this.layerViewSettings[p].label,h={label:h,css:["pm-item-link",`js-${p}-layer`],attributes:{role:"menuitem",tabIndex:0},datasets:{theme:"layer-"+p}},p=this.addAnchorElement(h);let e=document.createElement("li");e.role="presentation",e.appendChild(p),i.appendChild(e)}a.appendChild(o),a.appendChild(i),t.appendChild(a),document.querySelectorAll(this.scope_selector).forEach(e=>e.appendChild(t)),document.querySelectorAll(this.scope_selector+" .js-satelital-layer").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),this._setSatelitalView()})),document.querySelectorAll(this.scope_selector+" .js-osm-layer").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),this._setOsmView()})),document.querySelectorAll(this.scope_selector+" .js-reset-theme").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),localStorage.removeItem("mapTheme"),this._removeThemes(),this._setThemes(),this.layerViewConf.setVisuals()})),document.querySelectorAll(this.scope_selector+" .js-set-theme").forEach(t=>t.addEventListener("click",e=>{e.preventDefault();e=t.dataset.theme;this.useTheme(e),localStorage.setItem("mapTheme",e)}))}};_setThemeStyles=(t=!1,e=["ui","map"])=>e.map(function(e){return!!["ui","map"].includes(e)&&e+"-"+t});_removeThemes=(a=["ui","map"])=>{document.querySelectorAll(this.scope_selector).forEach(t=>{[...this.default_themes.map(e=>e.code),...this.temes_not_visibles.map(e=>e[0])].forEach(e=>{t.classList.remove(...this._setThemeStyles(e,a))})}),document.querySelectorAll(this.scope_selector+" .js-set-theme").forEach(e=>e.setAttribute("aria-current","false"))};_setTheme=(t,a)=>{var e=document.querySelectorAll(this.scope_selector);this._removeThemes(a),e.forEach(e=>{e.classList.add(...this._setThemeStyles(t,a))}),document.querySelectorAll(this.scope_selector+` .js-set-theme[data-theme="${t}"]`).forEach(e=>e.setAttribute("aria-current","true"))};useTheme=(e=!1)=>{e=e||this.theme;this._setTheme(e,["ui","map"])};useMapTheme=e=>this._setTheme(e,["map"]);useUiTheme=e=>this._setTheme(e,["ui"]);_setThemes=()=>{localStorage.hasOwnProperty("mapTheme")?this._setTheme(localStorage.getItem("mapTheme"),["ui","map"]):this.theme_ui||this.theme_map?(this.theme_ui&&this._setTheme(this.theme_ui,["ui"]),this.theme_map&&this._setTheme(this.theme_map,["map"])):this.useTheme()};_openOnMaps=(e,t)=>{if("boolean"==typeof this.open_maps&&this.open_maps)if(this.validateCoordinates(e,t)){var a,r=document.createElement("ul"),{items:o=[],label:i,aria_label:s}=(r.classList.add("pm-list-unstyled","pm-pb-1"),this.open_maps_options);for(a of o){var{link:n,platform:l="all"}=a,c=/(?=.*\{\{latitude\}\})(?=.*\{\{longitude\}\}).*/gm;("mac"!==l||navigator.userAgent.includes("Mac"))&&c.test(n)&&(l=this.tplParser(n,{latitude:e,longitude:t}),c={...a,link:l,attributes:{tabIndex:0}},n=this.addAnchorElement(c),(l=document.createElement("li")).appendChild(n),r.appendChild(l))}o=document.createElement("summary"),i=(o.textContent=this._t(i),o.tabIndex=0,o.ariaLabel=this._t(s),document.createElement("details")),s=(i.classList.add("blank"),".js-footer"+this.scope_sufix),s=document.querySelector(s);s.classList.add("pm-open-map"),s&&(s.innerHTML=""),i.appendChild(o),i.appendChild(r),s.appendChild(i)}else this.logger.warn(`Coordenadas inválidas: lat=${e}, lng=`+t)};validateCoordinates(e,t){return null!=e&&null!=t&&""!==e&&""!==t&&(e=this.isString(e)?parseFloat(e):e,t=this.isString(t)?parseFloat(t):t,!(!Number.isFinite(e)||!Number.isFinite(t)))&&-90<=e&&e<=90&&(-180<=t&&t<=180)}_slugify=e=>slugify(e);isGeoJSON=e=>"FeatureCollection"===e?.type;get entries(){return this.data.features}get geoJSON(){return this.featureCollection(this.entries)}formatInput=e=>{e.length<1&&this.showAlert({title:"No se puede visualizar el mapa, el documento está vacío",messages:["Es posible que el documento esté vacío.","Verifique el formato del documento JSON o GeoJSON."]},"warning");let t;return t=this.isGeoJSON(e)?e:(e=this.features(e),this.featureCollection(e)),this._setIdIfNotExists(t)};showAlert=(t,a,r=!1)=>{if(this.isObject(t))if(this.isEmptyObject(t))this.logger.error("No se encontraron las claves: title o messages.");else{["danger","warning","info"].includes(a)||(a="danger");var{scope_sufix:o,scope_selector:i,error_reporting:s,throw_exceptions:n,map_selector:l}=this,c="log-container"+o;let e=document.getElementById(c);e||((e=document.createElement("div")).role="alert",e.id=c,(c=document.querySelector(i+".poncho-map"))?.parentNode&&c.parentNode.insertBefore(e,c)),e.textContent="";var d,p,h,i=document.createElement("div"),c=(i.className=`js-error-message${o} poncho-map--message `+a,document.createElement("h2")),{title:o,messages:a=[],terminal:u=!1}=(c.className="pm-visually-hidden sr-only",c.textContent="Registro de errores en el mapa",t);if(this.isEmptyString(o)||((d=document.createElement("p")).innerHTML=o,i.appendChild(d)),Array.isArray(a)&&0<a.length){var m,o=document.createElement("ul"),g=document.createDocumentFragment();for(m of a){var _=document.createElement("li");_.innerHTML=m,g.appendChild(_)}o.appendChild(g),i.appendChild(o)}if(u&&((d=document.createElement("div")).className="console-message-container",(a=document.createElement("details")).className="caret-small caret-dark",(o=document.createElement("summary")).textContent="Mensaje",(p=document.createElement("div")).className="console",(h=document.createElement("code")).textContent=JSON.stringify(u),p.appendChild(h),a.appendChild(o),a.appendChild(p),d.appendChild(a),i.appendChild(d)),(s||r)&&(e.appendChild(c),e.appendChild(i),n||r))throw document.getElementById(l)?.remove(),new Error(JSON.stringify(t));this.logger.error(JSON.stringify(t))}else this.logger.error("showAlert","Espera un objeto de tipo clave/valor.")};feature=t=>{var e,a;if([this.latitude,this.longitude].every(e=>Object.keys(t).includes(e)))return e=t[this.latitude],a=t[this.longitude],this.validateCoordinates(e,a)||this.showAlert({title:"El documento JSON contiene errores en la definición de latitud y longitud.",messages:["Corrobore que los valores de las claves para <code>latitud</code> "+`(${this.latitude}) y <code>longitud</code> `+`(${this.longitude}), no estén vacíos.`,"Revise que el separador de decimales sea un punto y no una coma.","Verifque que los rangos de latitud y longitud sean correctos."],terminal:t},"warning"),delete t[this.latitude],delete t[this.longitude],{type:"Feature",properties:t,geometry:{type:"Point",coordinates:[a,e]}};this.showAlert({title:"La entrada debe incluir las claves para latitud y longitud.",terminal:t},"warning")};featureCollection=e=>({type:"FeatureCollection",features:e});features=e=>e.map(this.feature);_tooltipLabel=(e,t)=>{if(this.tooltip)if(!this.isObject(e)||this.isEmptyObject(e))this.logger.error("[_tooltipLabel]","El primer parámetro debe ser un objeto y no puede estar vacío");else if(this.isNumber(t)||this.isString(t)){if(!this.isEmptyString(t)){if("function"==typeof this.tooltip_label)try{var a=this.tooltip_label(self,e);return null!=a?String(a):""}catch(e){return this.logger.warn("Error ejecutando función de tooltip:",e),""}return this.isString(this.tooltip_label)&&!this.isEmptyString(this.tooltip_label)?this.tpl(this.tooltip_label,e,["*"]):t}this.logger.error("[_tooltipLabel]","El segundo parametro no puede estar vacío")}else this.logger.error("[_tooltipLabel]","El segundo parámetro solo puede ser una cadena de texto o un número")};_isIdMixing=()=>Array.isArray(this.id_mixing)&&0<this.id_mixing.length||"function"==typeof this.id_mixing;_idMixing=a=>{if(this._isIdMixing()){if(a&&"object"==typeof a&&a.properties&&"object"==typeof a.properties){if("function"==typeof this.id_mixing)try{var e=this.id_mixing(this,a);return Array.isArray(e)?e.join(""):void this.logger.warn("_idMixing: la función debe retornar un array")}catch(e){return void this.logger.error("_idMixing: error ejecutando función personalizada",e)}e=this.id_mixing.map(e=>{var t;return Object.prototype.hasOwnProperty.call(a.properties,e)?null!=(t=a.properties[e])?String(t):"":null!=e?String(e):""});return this._slugify(e.join("-"))}this.logger.warn("_idMixing: entry inválido o sin properties")}};_setIdIfNotExists=t=>{if(t&&Array.isArray(t.features)){var e=t.features[0]?.properties.hasOwnProperty("id"),a=this._isIdMixing();if(a||!e)for(let e=0;e<t.features.length;e++){var r,o,i=t?.features[e];i&&(r=i.properties,a?r.id=this._idMixing(i):(i=e+1,o=r[this.title]?this._slugify(r[this.title]):"",r.id=[i,o].filter(Boolean).join("-")))}}return t};addHash=e=>{this.isEmptyString(e)?this.logger.error("Invalid value provided to update hash"):this.hash&&!this.no_info&&(window.location.hash="#"+e)};entry=t=>{if(this.isNumber(t)||this.isString(t)){if(!this.isString(t)||!this.isEmptyString(t))return this.entries.find(e=>!(!e?.properties||e.properties[this.id]!==t||"n"===e.properties?.["pm-interactive"]));this.logger.error("entry requiere un id no vacío.")}else this.logger.error("entry requiere un número o una cadena de texto.")};searchEntries=(e,t)=>{t=t||this.geoJSON;if(this.isEmptyString(e))return this.logger.info("searchEntries","Término vacío."),t;let a=replaceSpecialChars(e).toUpperCase(),r=new Set([this.title,...this.search_fields]);return t.filter(e=>this.searchEntry(a,e.properties,r))};searchEntry=(t,a,e=[])=>(!t||e.length<1||!![...e].some(function(e){return!!a.hasOwnProperty(e)&&replaceSpecialChars(a[e]).toString().toUpperCase().includes(t)}))&&a;_selectorName=e=>e.replace(/^(\.|\#)/,"");scrollCenter=()=>{var e=document.getElementById(this.map_selector),t=e.getBoundingClientRect(),e=(e.offsetLeft+e.offsetWidth)/2,t=t.top+window.scrollY;window.scrollTo({top:t,left:e,behavior:"smooth"})};_clearContent=()=>document.querySelector(".js-content"+this.scope_sufix).innerHTML="";toggleSlider=()=>{this.no_info||document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.toggle(this.slider_selector+"--in"),e.style.display=this.isSliderOpen()?"block":"none"})};_focusOnFeature=t=>{this.map.eachLayer(e=>{e?.options?.id==t&&(e?._path?e._path.focus():e?._icon&&e._icon.focus())})};_clickToggleSlider=()=>document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(t=>t.addEventListener("click",e=>{this._clearContent(),this.toggleSlider(),this._focusOnFeature(t.dataset.entryId)}));isSliderOpen=()=>{var e=document.querySelectorAll(".js-slider"+this.scope_sufix);return Array.from(e).some(e=>e.classList.contains(this.slider_selector+"--in"))};setContent=a=>{if(!this.no_info){this._focusOnSlider(),this.isSliderOpen()||this.toggleSlider();let t="function"==typeof this.template?this.template(this,a):this.defaultTemplate(this,a);document.querySelectorAll(this.content_selector).forEach(e=>{e.innerHTML=t,e.scrollTo({top:0,left:0,behavior:"auto"})}),document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>{e.dataset.entryId=a[this.id]});var e,r=this.entry(a[this.id]);r?.geometry?.coordinates?([r,e]=r.geometry.coordinates,this._openOnMaps(e,r)):this.logger.warn(`No se pudo obtener las coordenadas para el id "${a[this.id]}".`)}};_focusOnSlider=()=>{if(!this.no_info){var e=".js-slider"+this.scope_sufix;let t=document.querySelector(e);t&&(this.isSliderOpen()?t.focus():t.addEventListener("animationend",e=>{"open"!==e.animationName&&t.focus()},{once:!0}))}};setHeaders=e=>{var t=(this.template_structure?.mixing??[]).reduce((e,t)=>{var a=t.key;return a&&(e[a]=t.header??""),e},{});return{...e,...t}};header=(e,t=!1)=>{if(!this.isEmptyString(e))return e=this.headers.hasOwnProperty(e)?this.headers[e]:e,"upper"===t?e.toUpperCase():"lower"===t?e.toLowerCase():e;this.logger.error("header() debe recibir una clave")};_renderSlider=()=>{var e,t,a,r,o,i,s;this.render_slider&&!this.content_outside&&!this.no_info&&(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>e.remove()),(e=document.createElement("div")).className="pm-backdrop",(t=document.createElement("dialog")).id="slider"+this.scope_sufix,t.classList.add("pm-container","pm-slider","js-slider"+this.scope_sufix),t.style.display="none",t.role="region",t.ariaLive="polite",t.ariaLabel="Panel de información",(a=document.createElement("i")).classList.add("pmi","pmi-close"),a.ariaHidden="true",(r=document.createElement("button")).classList.add("btn","pm-btn-xs","btn-secondary","pm-btn-close","js-close-slider"+this.scope_sufix),r.setAttribute("autofocus","autofocus"),r.title="Cerrar panel",r.tabIndex=0,r.ariaLabel="Cerrar panel de información",o={attributes:{tabIndex:0},id:"js-anchor-slider"+this.scope_sufix,css:["sr-only"]},this.addAnchorElement(o),(o=document.createElement("article")).classList.add("pm-content-container"),(s=document.createElement("div")).classList.add("pm-content","js-content"+this.scope_sufix),s.tabIndex=0,(i=document.createElement("footer")).classList.add("pm-footer","js-footer"+this.scope_sufix),o.appendChild(s),o.appendChild(i),r.appendChild(a),t.appendChild(r),t.appendChild(o),s=document.querySelector(this.scope_selector+".poncho-map"))&&(s.appendChild(e),s.appendChild(t),this._sliderElement=t)};_removeTooltips=()=>{let t=this;this.map.eachLayer(function(e){"tooltipPane"===e.options.pane&&e.removeFrom(t.map)})};_showSlider=e=>{this._removeTooltips(),e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):this.fit_bounds_onevent&&this.map.fitBounds(e.getBounds().pad(.005)),e.fireEvent("click")};_showPopup=e=>{e.hasOwnProperty("_latlng")?this.markers.zoomToShowLayer(e,()=>{e.openPopup()}):(this.map.fitBounds(e.getBounds().pad(.005)),e.openPopup())};removeHash=()=>history.replaceState(null,null," ");hasHash=()=>window.location.hash.replace("#","")||!1;gotoHashedEntry=()=>{var e=this.hasHash();e&&this.gotoEntry(e)};gotoEntry=(t,a=!1,e=!1)=>{let r=this.entry(t),o=!1,i=(e,t,a,r)=>{e.options.hasOwnProperty("id")&&e.options.id==t&&(o=!0,this._setSelectedMarker(t,e),this.hash&&this.addHash(t),r&&e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):r&&e.getBounds&&this.map.fitBounds(e.getBounds().pad(.005)),this.slider?this._showSlider(e,a):this._showPopup(e))};this.markers.eachLayer(e=>i(e,t,r,a)),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&i(e,t,r,a)}),!o&&e&&(e=this.entries.find(e=>e.properties[this.id]==t))&&(this.markersMap([e]),this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider(),this._listeners(),e=Array.from(this.markers.getLayers()).find(e=>e.options&&e.options.id==t))&&(this._setSelectedMarker(t,e),this.hash&&this.addHash(t),a&&e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):a&&e.getBounds&&this.map.fitBounds(e.getBounds().pad(.005)),this.slider?this._showSlider(e,r):this._showPopup(e))};_calcPanOffset=e=>{var t,a,r;return!this._sliderElement||(a=(t=this._sliderElement.offsetWidth+15)+40,(r=this._mapWidth())<this.media_breakpoint.sm)?0:(e=e.latlng||e.target?.getLatLng&&e.target.getLatLng())?(e=this.map.latLngToContainerPoint(e).x,r-a<e?Math.round(e-(r-t)+80):0):(this.logger.warn("_calcPanOffset","No se puede acceder a latlng"),0)};_setClickeable=a=>{a.on("click keypress",e=>{document.querySelectorAll(".marker--active").forEach(e=>e.classList.remove("marker--active"));var t=e.sourceTarget._icon||e.sourceTarget._path,t=(t&&t.classList.add("marker--active"),this.entries.find(e=>e?.properties?.[this.id]===a.options.id)),t=(t&&this.setContent(t.properties),this._calcPanOffset(e));t&&this.pan_by&&e.target._map.panBy([t,0],{animate:!0,duration:.5,easeLinearity:.25})})};isFeature=e=>!!e.hasOwnProperty("feature");_clickeableFeatures=()=>{this.reset_zoom&&this.map.eachLayer(e=>{this.isFeature(e)&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&"n"!=e?.feature?.properties["pm-interactive"]&&this._setClickeable(e)})};_clickeableMarkers=()=>{this.no_info||this.markers.eachLayer(this._setClickeable)};_urlHash=()=>{if(this.hash){let t=e=>{e.on("keypress click",()=>{this.addHash(e.options.id)})};this.markers.eachLayer(t),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&t(e)})}};removeListElement=(e,t)=>{t=e.indexOf(t);return-1<t&&e.splice(t,1),e};_templateTitle=t=>{if(!t.hasOwnProperty(this.title))return!1;var a=this.template_structure,e=!!a.hasOwnProperty("title")&&a.title,r=this.title||!1;if(a.hasOwnProperty("title")&&"boolean"==typeof a.title)return!1;if(!e&&!r)return!1;e=e||r;let o;if(a?.header){let e=a.header;if("function"==typeof a.header&&(e=a.header(this,t)),!this.isString(e)||this.isEmptyString(e))return void this.logger.warn("template_Structure['header'] debe ser una cadena de texto no vacía");var r=this.tpl(e,t),i=document.createElement("div");this.template_innerhtml?i.innerHTML=secureHTML(r,this.allowed_tags):i.innerHTML=this._mdToHtml(r),o=i}else(o=document.createElement("h2")).classList.add(...a.title_classlist),o.textContent=t[e];r=document.createElement("header");return r.className="pm-header",r.appendChild(o),r};_templateList=e=>{if(this.template_structure?.values?.length)return this.template_structure.values;let a=Object.keys(e);if(this.template_structure?.exclude?.length){let t=new Set(this.template_structure.exclude);a=a.filter(e=>!t.has(e))}return a};_mdToHtml=e=>this.template_markdown&&this._markdownEnable()?new showdown.Converter(this.markdown_options).makeHtml(String(e).trim()):e;_markdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_templateMixing=s=>{if(this.template_structure.hasOwnProperty("mixing")&&0<this.template_structure.mixing.length){var e=this.template_structure.mixing;let i={};return e.forEach(e=>{var{values:t,separator:a=", ",key:r,template:o}=e;void 0===r?this.showAlert({title:"Mixing requiere un valor en el atributo «key».",terminal:e},"warning"):this.isString(o)&&!this.isEmptyString(o)?i[r]=this.tpl(o,s):Array.isArray(t)&&0<t.length&&(i[r]=t.map(e=>s.hasOwnProperty(e)?s[e]:"").filter(Boolean).join(a))}),Object.assign({},s,i)}return s};_resolveValue=(e,t=!1,a=!1)=>"function"==typeof e?e(this,t,a):e;_setClassList=e=>{let t=e=>String(e).split(/\s|\,|\#|\./).filter(Boolean);return this.isString(e)?t(e):Array.isArray(e)&&0<e.length?e.flatMap(e=>t(e)):[]};_lead=e=>{if(this.template_structure.hasOwnProperty("lead"))if(this.template_structure.lead.hasOwnProperty("key")){var t,{key:a,css:r="small",style:o=!1}=this.template_structure.lead;if(e.hasOwnProperty(a))return(t=document.createElement("p")).textContent=e[a],(a=this._resolveValue(o,e))&&this._setStyle(t,a),(o=this._setClassList(this._resolveValue(r,e)))&&t.classList.add(...o),t}else this.showAlert({title:"Lead requiere la clave «key»",messages:["En la sección de configuraciones verifique que, dentro de <code>template_structure</code>, la entrada <code>lead</code> contenga la clave <code>key</code>.","Compruebe que la clave esté escrita de forma correcta y que no haya espacios o caracteres inválidos."],terminal:this.template_structure.lead},"warning")};_termIcon=(e,t)=>{var a=this.header_icons.find(e=>e.key===t);if(a){var{css:a=!1,style:r=!1,html:o=!1}=a,o=this._resolveValue(o,e,t),r=this._resolveValue(r,e,t),a=this._setClassList(this._resolveValue(a,e,t));if(Array.isArray(a)&&0<a.length)return(e=document.createElement("i")).setAttribute("aria-hidden","true"),e.classList.add(...a),r&&this._setStyle(e,r),e;if(o)return(a=document.createElement("template")).innerHTML=secureHTML(o,this.allowed_tags),a.content}return!1};defaultTemplate=(e,a)=>{a=this._templateMixing(a);var r,o,i,s=this.template_structure,n=this._templateList(a),t=this._templateTitle(a),l=document.createElement("div"),c=(l.classList.add(...s.container_classlist),document.createElement(s.definition_list_tag));c.classList.add(...s.definition_list_classlist),c.style.fontSize="1rem";for(let t of n)a.hasOwnProperty(t)&&a[t]&&(r=document.createElement(s.term_tag),this.header_icons.find(({key:e})=>e===t)&&r.classList.add("pm-term-icon-helper"),r.classList.add(...s.term_classlist),(o=this._termIcon(a,t))&&(r.appendChild(o),r.insertAdjacentText("beforeend"," ")),r.insertAdjacentText("beforeend",this.header(t)),(o=document.createElement(s.definition_tag)).classList.add(...s.definition_classlist),this.template_markdown?(i=secureHTML(a[t],["*"]),i=this._mdToHtml(this.tpl(i,a)),o.innerHTML=i):this.template_innerhtml?(i=secureHTML(a[t],this.allowed_tags),o.innerHTML=this.tpl(i,a)):o.textContent=a[t],""!=this.header(t)&&c.appendChild(r),c.appendChild(o));n=this._lead(a);return n&&t.prepend(n),t&&l.appendChild(t),l.appendChild(c),l.outerHTML};_getMarkerColorType=()=>this.marker_color&&"boolean"!=typeof this.marker_color?"string"==typeof this.marker_color?"string":"function"==typeof this.marker_color?"function":"none":"none";icon=(e="azul")=>{var t;return this._icon_cache.has(e)?this._icon_cache.get(e):(t=new L.icon({iconUrl:"https://www.argentina.gob.ar/sites/default/files/"+`marcador-${e}.svg`,iconSize:[29,40],iconAnchor:[14,40],popupAnchor:[0,-37]}),this._icon_cache.set(e,t),t)};resetView=()=>this.map.setView(this.map_view,this.map_zoom);fitBounds=e=>{var t,a=this.isObject(this.fit_bounds_options)?this.fit_bounds_options:{};"number"==typeof e&&(a.padding=e);let{padding:r=.005,maxZoom:o=22,animate:i=!0,duration:s=.25}=a;try{return this.geojson?(t=this.geojson.getBounds()).isValid()?("satelital"===this.map_layers_default&&17<o&&(o=17),this.map.fitBounds(t.pad(r),{maxZoom:o,animate:i,duration:s}),!0):(this.logger.warn("fitBounds","No hay bounds válidos para ajustar"),!1):(this.logger.warn("fitBounds","No hay geojson disponible"),!1)}catch(e){return this.logger.error("fitBounds",e),!1}};_resetViewButton=()=>{this.reset_zoom&&(document.querySelectorAll(".js-reset-view"+this.scope_sufix).forEach(e=>e.remove()),document.querySelectorAll(this.scope_selector+" .leaflet-control-zoom-in").forEach(e=>{var t=document.createElement("i"),a=(t.classList.add("pmi","pmi-expand"),t.ariaHidden="true",{link:"#",title:this._t("map_full_view"),attributes:{role:"button",tabIndex:0},aria_label:this._t("map_full_view"),css:["js-reset-view"+this.scope_sufix,"leaflet-control-zoom-reset"]}),a=this.addAnchorElement(a);a.appendChild(t),e.after(a)}))};marker=e=>{switch(this._marker_color_type){case"none":return null;case"string":return this.icon(this.marker_color);case"function":var t=this.marker_color(this,e);return"string"==typeof t?this.icon(t):t;default:return null}};_clearLayers=()=>{this.markers.clearLayers(),this.map.eachLayer(e=>{this.isFeature(e)&&this.map.removeLayer(e)})};markersMap=e=>{this._clearLayers();let s=this.tooltip,n=!this.no_info&&!this.slider;var t="function"==typeof this.template;let l=this.title,c=this.id,d=this.tooltip_options,r=this.featureStyle,p=this,h=t?e=>this.template(this,e):e=>this.defaultTemplate(this,e),a=(e,t,a=!1)=>e.hasOwnProperty(t)?e[t]:a||r[t];this.geojson=new L.geoJson(e,{pointToLayer:function(e,t){var e=e.properties,a=p.marker(e),r=e[l],o=p._tooltipLabel(e,r),i={id:e[c]},a=(a&&(i.icon=a),r&&(i.alt=r),new L.marker(t,i));return p.map.options.minZoom=p.min_zoom,p.markers.addLayer(a),s&&r&&a.bindTooltip(o,d),n&&a.bindPopup(h(e)),p.markers},onEachFeature:function(e,t){var{properties:a,geometry:r}=e,r=r.type,o=a[l],i=p._tooltipLabel(a,o),e=(t.options.id=a[c],e.properties.name=o,"n"===a["pm-interactive"]&&(t.options.interactive=!1),"Point"!==r&&"MultiPoint"!==r);e&&(s&&o&&t.bindTooltip(i,d),n)&&t.bindPopup(h(a))},style:function(e){e=e.properties;return{color:a(e,"stroke-color",a(e,"stroke")),strokeOpacity:a(e,"stroke-opacity"),weight:a(e,"stroke-width"),fillColor:a(e,"stroke"),opacity:a(e,"stroke-opacity"),fillOpacity:a(e,"fill-opacity")}}}),this.geojson.addTo(this.map)};_setSelectedMarker=(e,t)=>{e={entry:this.entry(e),marker:t};return this.selected_marker=e};_selectedMarker=()=>{this.map.eachLayer(t=>{this.isFeature(t)&&t.on("click",e=>{this._setSelectedMarker(t.options.id,t)})})};_hiddenSearchInput=()=>{var e,t=document.querySelector(this.scope_selector+".poncho-map");t?((e=document.createElement("input")).type="hidden",e.name="js-search-input"+this.scope_sufix,e.id="js-search-input"+this.scope_sufix,e.disabled=!0,t.appendChild(e)):this.logger.error(`Contenedor no encontrado: ${this.scope_selector}.poncho-map`)};_setFetureAttributes=()=>{let{title:o,id:i}=this;this.map.eachLayer(e=>{var t,{_path:e,feature:a,_leaflet_id:r}=e;a&&e&&(a=a.properties,t="n"!==a?.["pm-interactive"],Object.assign(e,{"aria-label":a?.[o],tabIndex:"n"===a["pm-interactive"]?-1:0,"data-entry-id":a?.[i],"data-leaflet-id":r,"data-interactive":t?null:"n",role:t?"button":"graphics-symbol"}))})};_accesibleAnchors=()=>{var e=[{selector:this.scope_selector+" .leaflet-map-pane",id:"leaflet-map-pane"+this.scope_sufix,attributes:{tabIndex:0,role:"region"}},{selector:this.scope_selector+" .leaflet-control-zoom",id:"leaflet-control-zoom"+this.scope_sufix,attributes:{"aria-label":this._t("zoom_aria_label_panel"),role:"region",tabIndex:0}},{selector:".js-themes-tool-button"+this.scope_sufix,id:"themes-tool-button"+this.scope_sufix,attributes:{"aria-label":this._t("theme_aria_label_panel"),role:"region",tabIndex:0}}];return e.forEach(e=>{var{selector:e,id:t,attributes:a}=e,r=document.querySelector(e);if(r)for(var o in r.id=t,a)r.setAttribute(o,a[o])}),e};_accesibleMenu=()=>{document.querySelectorAll(this.scope_selector+" .pm-accesible-nav").forEach(e=>e.remove());var e=this._accesibleAnchors();let t=[{label:this._t("map_goto_markers"),link:"#"+e[0].id},{label:this._t("map_fit_bounds"),link:"#",css:["js-fit-bounds"]},{label:this._t("map_full_view"),link:"#",css:["js-reset-view"+this.scope_sufix]}];this.map_init_options.hasOwnProperty("zoomControl")&&!1===this.map_init_options.zoomControl||t.splice(2,0,{label:this._t("zoom_goto_panel"),link:"#"+e[1].id}),this.theme_tool&&t.push({label:this._t("theme_change"),link:"#"+e[2].id,css:["js-themes-tool-button"+this.scope_sufix]});e=[{label:this._t("map_exit"),link:"#accesible-return-nav"+this.scope_sufix}],t=[...t,...this.accesible_menu_filter,...this.accesible_menu_search,...this.accesible_menu_extras,...e],e=document.createElement("i");e.classList.add("pmi","pmi-universal-access","accesible-nav__icon"),e.ariaHidden="true";let a=document.createElement("div"),o=(a.classList.add("pm-accesible-nav","top","pm-list"),a.id="pm-accesible-nav"+this.scope_sufix,a.ariaLabel="Menú para el mapa",a.role="navigation",a.tabIndex=0,document.createElement("ul"));o.role="menu",o.classList.add("pm-list-unstyled"),t.forEach(e=>{var{label:t,css:a=[],aria_label:r}=e,e={...e,label:this._t(t),aria_label:this._t(r),css:[...a,"pm-item-link","pm-accesible"],attributes:{role:"menuitem",tabIndex:0}},t=this.addAnchorElement(e),r=document.createElement("li");r.role="presentation",r.appendChild(t),o.appendChild(r)}),a.appendChild(e),a.appendChild(o);var r={label:"Ir al menú del mapa",link:"#pm-accesible-nav"+this.scope_sufix,id:"accesible-return-nav"+this.scope_sufix,css:["pm-item-link","pm-accesible"],attributes:{tabIndex:0}},r=this.addAnchorElement(r);let i=document.createElement("div");i.classList.add("pm-accesible-nav","bottom"),i.appendChild(e.cloneNode(!0)),i.appendChild(r),document.querySelectorAll(""+this.scope_selector).forEach(e=>{e.insertBefore(a,e.children[0]),e.appendChild(i)}),this.fit()};fit=()=>document.querySelectorAll(this.scope_selector+" .js-fit-bounds").forEach(e=>{e.onclick=e=>{e.preventDefault(),this.fitBounds()}});clearAll=()=>{[".js-filter-container"+this.scope_sufix,".js-slider"+this.scope_sufix].forEach(e=>document.querySelectorAll(e).forEach(e=>e.remove()))};cleanState=()=>history.replaceState(null,null," ");_listeners=()=>{let t=this,e=e=>{e.target.closest(".js-reset-view"+this.scope_sufix)&&(e.preventDefault(),t.cleanState(),t.resetView())},a=e=>{e.target.closest(".js-themes-tool-button"+t.scope_sufix)&&(e.preventDefault(),document.querySelector("#themes-tool-button"+t.scope_sufix).focus({focusVisible:!0,preventScroll:!1}))};document.body.addEventListener("click",e),document.body.addEventListener("click",a),this.removeListeners=()=>{document.body.removeEventListener("click",e),document.body.removeEventListener("click",a)}};_accesibleExtras=()=>{document.querySelectorAll(".js-poncho-map__help").forEach(e=>e.ariaLive="polite")};_addSummary=()=>{if("boolean"!=typeof this.summary&&!this.isEmptyObject(this.summary)&&!this.isEmptyString(this.summary)){let e,t=!1;this.isString(this.summary)?e=this.summary:this.isObject(this.summary)&&this.summary.hasOwnProperty("title")&&(t=!0,e=this.summary.title);var a=".poncho-map"+this.scope_selector,a=document.querySelector(a);if(a){var r="summary_"+this.map_selector,o=a.parentNode,i=(a.ariaLabelledby!==r&&a.setAttribute("aria-labelledby",r),document.querySelector("#"+r)||document.createElement("p"));if(i.textContent=e,i.id=r,i.classList.add("pm-summary"),t){var{style:r,css:s,position:n="top",hidden:l=!1}=this.summary;if(i.classList.add(...this._setClassList(s)),this._setStyle(i,r),l&&(i.className="pm-visually-hidden"),"bottom"==n)return void o.insertBefore(i,a.nextSibling)}o.insertBefore(i,a)}}};_setStyle=(e,t)=>{if(t)if(this.isObject(e)&&e instanceof HTMLElement){var a=/([^;:]+)\s*\:\s*([^;:]+)/;if(!this.isString(t)||this.isEmptyString(t)||t.match(a)){if(!this.isObject(t)||this.isEmptyObject(t)){var r,o={};for(r of t.split(";")){var i,s=a.exec(r);s&&([,s,i]=s.map(e=>e.trim()),o[s]=i)}return Object.assign(e.style,o)}for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}else this.showAlert({title:"La función <code>_setStyle</code>, debe recibir un objeto del tipo clave/valor o una cadena de texto con una sintaxis CSS.",terminal:[typeof t,t]},"danger",!0)}else this.showAlert({title:"La función <code>_setStyle</code>, debe recibir un objeto <code>HTMLElement</code>.",terminal:[typeof e,e]},"danger",!0)};render=()=>{this._addSummary(),this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),this.tileLayer.addTo(this.map),this.markersMap(this.entries),this._selectedMarker(),this.slider&&(this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider()),this._urlHash(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this._setFetureAttributes(),this._accesibleMenu(),this._accesibleExtras(),this._setSliderSize(),this.mapOpacity(),this.mapBackgroundColor(),this._listeners(),this.layerViewConf.setVisuals(),this.setMapAlignment(this.map_align)}}class PonchoMapLoader{constructor(e){e=Object.assign({},{close_delay:500,cover_opacity:1,cover_style:{},debug:!1,scope:"",selector:".poncho-map",timeout:5e4},e);this.scope=e.scope,this.cover_opacity=e.cover_opacity,this.cover_style=e.cover_style,this.timeout=e.timeout,this.scope_sufix="--"+this.scope,this.scope_selector=`[data-scope="${this.scope}"]`,this.ponchoLoaderTimeout=null,this._closeTimeoutId=null,this.selector=e.selector,this.close_delay=e.close_delay,this.debug=e.debug}remove=()=>{this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null);var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix);e&&(e.remove(),this.debug)&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader removed.`)};close=(e=!1)=>{e?this.remove():(this._closeTimeoutId&&clearTimeout(this._closeTimeoutId),this._closeTimeoutId=setTimeout(()=>{var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix);e&&e.remove(),this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null),this._closeTimeoutId=null,this.debug&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader closed.`)},this.close_delay))};load=()=>{this._closeTimeoutId&&(clearTimeout(this._closeTimeoutId),this._closeTimeoutId=null),this.ponchoLoaderTimeout&&(clearTimeout(this.ponchoLoaderTimeout),this.ponchoLoaderTimeout=null);var e=document.querySelector(".js-poncho-map__loader"+this.scope_sufix),e=(e&&e.remove(),document.querySelector(""+this.selector+this.scope_selector)),t=document.createElement("span"),a=(t.className="loader",document.createElement("div"));a.dataset.scope=this.selector,a.classList.add("poncho-map__loader","js-poncho-map__loader"+this.scope_sufix),Object.assign(a.style,this.cover_style),this.cover_opacity&&(a.style.backgroundColor="color-mix(in srgb, transparent, var(--pm-loader-background) "+100*this.cover_opacity.toString()+"%)"),a.appendChild(t),e.appendChild(a),this.debug&&this.logger.log(`[PonchoMapLoader:${this.scope}] Loader started.`),this.ponchoLoaderTimeout=setTimeout(()=>{this.remove()},this.timeout)};loader=(e,t=500)=>{this.load(),setTimeout(()=>{e(),this.remove()},t)}}class PonchoMapFilter extends PonchoMap{constructor(e,t){super(e,t);e=Object.assign({},{filters:[],filters_info:!1,filters_visible:!1,fit_bounds_after_filter:!1,messages:{has_filters:"filters_has",initial:"filter_initial",no_results:"filter_no_results",no_results_by_term:"filter_no_results_by_term",one_result:"filter_one_result",reset:"filter_reset_values_link",results:"filter_results"},search_fields:[]},t);this.filters=e.filters,this.fit_bounds_after_filter=Boolean(e.fit_bounds_after_filter),this.filters_info=Boolean(e.filters_info),this.filters_visible=Boolean(e.filters_visible),this.valid_fields=["checkbox","radio","select"],this.search_fields=e.search_fields,this.messages=e.messages,this.accesible_menu_filter=[{aria_label:"filters_aria_label_reset",css:["js-poncho-map-reset"+this.scope_sufix],label:"filters_reset",link:"#"}],0<this.filters.length&&this.accesible_menu_filter.push({label:"Ir al panel de filtros",link:"#filtrar-busqueda"+this.scope_sufix}),this._fieldsCache=new Map}_helpText=e=>{var t=document.querySelectorAll(this.scope_selector+" .js-poncho-map__help");let r={anchor:"#",filter_class:"js-close-filter"+this.scope_sufix,reset_search:"js-poncho-map-reset"+this.scope_sufix,term:this.inputSearchValue,total_entries:this.entries.length,total_filtered_entries:this.filtered_entries.length,total_results:e.length};t.forEach(e=>{e.innerHTML="";var t=document.createElement("ul"),a=(t.classList.add("m-b-0","list-unstyled"),e=>{var t=document.createElement("li");return t.ariaLive="polite",t.innerHTML=e,t.tabIndex=0,t});r.total_entries===r.total_results?t.appendChild(a(this._t(this.messages.initial,r))):r.total_results<1?t.appendChild(a(this._t(this.messages.no_results_by_term,r)+this._t(this.messages.reset,r))):""===this.inputSearchValue&&r.total_results<1?t.appendChild(a(this._t(this.messages.no_results,r)+this._t(this.messages.reset,r))):1==r.total_results?t.appendChild(a(this._t(this.messages.one_result,r)+this._t(this.messages.reset,r))):1<r.total_results&&t.appendChild(a(this._t(this.messages.results,r)+this._t(this.messages.reset,r))),e.appendChild(t)})};_filterPosition=e=>{e=/^([\w\-]+?)(?:__([0-9]+))(?:__([0-9]+))?$/gm.exec(e);return e?[e[1],e[2]]:null};isFilterOpen=()=>document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.contains("filter--in");toggleFilter=()=>{document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.toggle("filter--in")};_filterContainerHeight=()=>{var e=document.querySelector(".js-filter-container"+this.scope_sufix),t=document.querySelector(".js-close-filter"+this.scope_sufix),a=e.offsetParent.offsetHeight,r=3*this._cssVarComputedDistance(),a=a-e.offsetTop-t.offsetHeight-r,e=document.querySelector(".js-poncho-map-filters"+this.scope_sufix),t=(e.style.maxHeight=a+"px",e.offsetHeight-55),r=document.querySelector(".js-filters"+this.scope_sufix);r.style.height=t+"px",r.style.overflow="auto"};_clickToggleFilter=()=>{var e=".js-close-filter"+this.scope_sufix;return document.querySelectorAll(e).forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.toggleFilter(),this._filterContainerHeight()})})};_setFilter=e=>{let[t,a="checked"]=e;e=this.entries.map(e=>{if(e.properties.hasOwnProperty(t))return e.properties[t]}).filter(Boolean),e=[...new Set(e)].map(e=>[t,e,[e],a]);return e.sort((e,t)=>{e=e[1].toUpperCase(),t=t[1].toUpperCase();return t<e?1:e<t?-1:0}),e};_fieldsToUse=(e,t=null)=>{if(null!==t&&this._fieldsCache.has(t))return this._fieldsCache.get(t);var{type:a="checkbox",fields:r=!1,field:o=!1}=e;r||o||this.showAlert({title:"Filters requiere el uso del atributo <code>field</code> o <code>fields</code>.",terminal:e},"warning"),o&&"radio"===a&&(o[1]=!1);let i=r||this._setFilter(o);return"radio"===a&&!1===r&&(e=i.map(e=>e[1]),i=[[i[0][0],"Todos",e,"checked"],...i]),null!==t&&this._fieldsCache.set(t,i),i};_fields=(e,t)=>{var a=this._fieldsToUse(e),r=this.valid_fields.includes(e.type)?e.type:"checkbox";return"select"===r?this._createSelectField(a,t,"__"):this._createCheckableFields(a,t,r,e.type,"__")};_createSelectField=(e,o,i)=>{let s=document.createElement("select");s.className="pm-form-control";var t=this.filters[o];let a,r;var n=0<e.length?e[0][0]:"",l=["select",n,o].join(i),c=(s.name=[n,o].join(i),s.id=l,a=t?.all_options_text&&this.isString(t.all_options_text)&&!this.isEmptyString(t.all_options_text)?t.all_options_text:this._t("filter_select_all_option_text"),document.createElement("option")),c=(c.textContent=a,c.value="",s.appendChild(c),e.forEach((e,t)=>{var[e,a]=e,r=document.createElement("option"),e=["id",e,o,t].join(i);r.textContent=a,r.id=e,r.value=t,s.appendChild(r)}),document.createElement("label"));c.setAttribute("for",l),r=t?.label&&this.isString(t.label)&&!this.isEmptyString(t.label)?t.label:this._t("filter_select_label",{header:this.header(n,"lower")}),!1===t.show_label&&c.classList.add("pm-visually-hidden"),c.classList.add("m-b-xs"),c.textContent=r;document.createElement("div").classList.add("pm-form-group");e=document.createElement("div");return e.classList.add("m-b-2","m-t-xs"),e.appendChild(c),e.appendChild(s),e};_createCheckableFields=(e,s,n,l,c)=>{let d=document.createElement("div");d.classList.add("field-list","m-b-05"),e.forEach((e,t)=>{var[e,a,,r]=e,o=["id",e,s,t].join(c),i=document.createElement("input"),r=(i.type=n,i.id=o,i.className="form-check-input",i.value=t,i.name=("radio"===l?[e,s]:[e,s,t]).join(c),"checked"===r&&(i.checked=!0),document.createElement("span")),e=(r.dataset.info=[e,s,t].join(c),document.createElement("label")),t=(e.textContent=a,e.className="form-check-label",e.htmlFor=o,e.appendChild(r),document.createElement("div"));t.className="form-check",t.appendChild(i),t.appendChild(e),d.appendChild(t)});e=document.createElement("div");return e.appendChild(d),e};_filterButton=()=>{var e=document.querySelector(".poncho-map"+this.scope_selector),t=document.createElement("i"),a=(t.ariaHidden="true",t.classList.add("pmi","pmi-filter"),document.createElement("button")),r=(a.classList.add("pm-btn","pm-btn-rounded-circle","pm-my-1","js-close-filter"+this.scope_sufix),a.id="filtrar-busqueda"+this.scope_sufix,a.role="button",a.ariaLabel=this._t("filters_aria_label_open_close_panel"),a.title=this._t("filters_aria_label_open_close_panel"),a.ariaControls="poncho-map-filters"+this.scope_sufix,document.createElement("div"));r.classList.add("js-filter-container"+this.scope_sufix,"filter-container"),a.appendChild(t),r.appendChild(a),e.appendChild(r)};_cssVarComputedDistance=()=>{var e=document.querySelector(".poncho-map"),e=getComputedStyle(e).getPropertyValue("--pm-slider-distance");return parseInt(e.toString().replace(/[^0-9]*/gm,""))||0};_controlZoomSize=()=>{var e=document.querySelector(this.scope_selector+" .leaflet-control-zoom");return{controlHeight:e.offsetHeight,controlTop:e.offsetTop}};_filterContainer=()=>{var e=document.createElement("i"),t=(e.classList.add("pmi","pmi-close"),e.ariaHidden="true",document.createElement("button")),a=(t.classList.add("btn","btn-xs","btn-secondary","pm-btn-close","js-close-filter"+this.scope_sufix),t.title="Cerrar panel",t.role="button",t.ariaLabel=this._t("filters_aria_label_close_panel"),document.createElement("div")),r=(a.classList.add("js-filters"+this.scope_sufix,"pm-filters-content"),document.createElement("form"));r.classList.add("js-formulario"+this.scope_sufix);let o=document.createElement("div");o.classList.add("js-poncho-map-filters"+this.scope_sufix,"pm-container","poncho-map-filters","pm-caret","pm-caret-t"),o.role="region",o.ariaLive="polite",o.ariaLabel=this._t("filters_aria_label_panel"),o.id="poncho-map-filters"+this.scope_sufix,this.filters_visible&&o.classList.add("filter--in");var i=this._controlZoomSize();let s=i.controlHeight+i.controlTop+"px";t.appendChild(e),r.appendChild(t),r.appendChild(a),o.appendChild(r),document.querySelectorAll(".js-filter-container"+this.scope_sufix).forEach(e=>{e.style.top=s,e.appendChild(o)})};_checkUncheckButtons=e=>{var t=document.createElement("div"),a=(t.classList.add("select-items","form-check"),document.createElement("input")),r=(a.type="checkbox",a.id="check-all-"+e.field[0],a.classList.add("js-select-all-checkbox","form-check-input"),a.dataset.field=e.field[0],a.checked=!0,document.createElement("label"));return r.classList.add("form-check-label"),r.htmlFor="check-all-"+e.field[0],r.textContent=this._t("filters_check_all"),t.appendChild(a),t.appendChild(r),t};_createFilters=e=>{let a=document.querySelector(".js-filters"+this.scope_sufix);e.forEach((e,t)=>{e=this._createFilterFieldset(e,t);a.appendChild(e)})};_createFilterFieldset=(e,t)=>{var a=document.createElement("fieldset"),r=this._createFilterLegend(e,t),r=(a.appendChild(r),this._shouldShowCheckUncheckButtons(e)&&(r=this._checkUncheckButtons(e),a.appendChild(r)),this._fields(e,t));return a.appendChild(r),a};_createFilterLegend=(e,t)=>{var a=document.createElement("legend"),r=this.isString(e.legend)&&!this.isEmptyString(e.legend);return a.textContent=r?e.legend:this._t("filter_select_legend",{header:this.header(this._typeByGroup(t),"lower")}),!1===e.show_legend?a.classList.add("pm-visually-hidden"):a.classList.add("m-t-0","m-b-05","color-primary","h6","font-sans-serif"),a};_shouldShowCheckUncheckButtons=e=>{var t=e.hasOwnProperty("check_uncheck_all")&&e.check_uncheck_all,e="radio"!==e?.type&&"select"!==e?.type;return t&&e};formFilters=()=>{var e;return this.filters.length<1?[]:(e=document.querySelector(".js-formulario"+this.scope_sufix),e=new FormData(e),Array.from(e).filter(e=>""!==e[1]).map(e=>{var t=this._filterPosition(e[0]);return[parseInt(t[1]),parseInt(e[1]),t[0]]}))};_typeByGroup=t=>{var e;return"number"==typeof t&&(e=this._defaultFiltersConfiguration().find(e=>e[0]===t))?e[2]:void 0};_defaultFiltersConfiguration=()=>this.filters.map((e,a)=>this._fieldsToUse(e,a).map((e,t)=>[a,t,e[0],"undefinded"!=typeof e[3]&&"checked"==e[3]])).flat();usingFilters=()=>{var e=this._defaultFiltersConfiguration().every(e=>{e=document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]);return!e||e.checked}),t=this.filters.every((e,t)=>"select"!==e.type||(e=e.field?e.field[0]:e.fields&&e.fields[0]?e.fields[0][0]:"",!(e=document.querySelector(`#select__${e}__`+t)))||0===e.selectedIndex);return e&&t};_resetFormFilters=()=>{this._defaultFiltersConfiguration().forEach(e=>{var t=document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]);t&&(t.checked=e[3])}),this.filters.forEach((e,t)=>{"select"===e.type&&(e=e.field?e.field[0]:e.fields&&e.fields[0]?e.fields[0][0]:"",e=document.querySelector(`#select__${e}__`+t))&&(e.selectedIndex=0)});var e=this.scope_selector+" .js-select-all-checkbox";document.querySelectorAll(e).forEach(e=>{e=e.dataset.field;this._updateCheckAllState(e)})};get inputSearchValue(){var e=document.querySelector("#js-search-input"+this.scope_sufix).value.trim();return""!==e&&e}_countOccurrences=(e,a,r)=>e.reduce((e,t)=>a.some(e=>t.properties[r].includes(e))?e+1:e,0);totals=()=>this.formFilters().map(e=>{var t=this._fieldsToUse(this.filters[e[0]],e[0])[e[1]];return[t[1],this._countOccurrences(this.filtered_entries,t[2],t[0]),...e]});_totalsInfo=()=>{this.filters_info&&this.totals().forEach(e=>{var[,e,t,a,r]=e,r=this._getFilterInfoElement(r,t,a);r&&((t=this._createCountBadge(e)).appendChild(document.createTextNode(" ")),r.appendChild(document.createTextNode(" ")),r.appendChild(t))})};_getFilterInfoElement=(e,t,a)=>{e=this.scope_selector+" "+`[data-info="${e}__${t}__${a}"]`;return document.querySelector(e)};_createCountBadge=e=>{var t=document.createElement("small"),e=(t.classList.add("badge","fw-medium","bg-arg-gris-intermedio"),t.textContent=e,this._createAccessibleText(e));return t.appendChild(e),t};_createAccessibleText=e=>{var t=document.createElement("span");return t.textContent=" elemento"+(1===e?"":"s"),t.className="pm-visually-hidden",t};_search=(e,t,a)=>{t=this._fieldsToUse(this.filters[t],t)[a],a=t[0];if(e.hasOwnProperty(a)){var r,t=t[2],o=e[a];for(r of t)if(r&&o.includes(r))return!0}return!1};_validateGroup=(e,t,a)=>{if(0===t.length)return"select"===this.filters[a]?.type;for(var r of t)if(this._search(e,r[0],r[1]))return!0;return!1};_validateEntry=(t,a,r)=>{if(!(r<1))for(let e=0;e<r;e++){var o=a.get(e)||[];if(!this._validateGroup(t,o,e))return!1}return!0};_filterData=()=>{var e=this.formFilters();let t=this.filters.length;var a,r=this.inputSearchValue;let o=!this.isEmptyString(r),i=o?replaceSpecialChars(r).toUpperCase():"",s=o?new Set([this.title,...this.search_fields]):null,n=new Map;for(a of e){var l=a[0];n.has(l)||n.set(l,[]),n.get(l).push(a)}r=this.entries.filter(e=>!!this._validateEntry(e.properties,n,t)&&(!o||this.searchEntry(i,e.properties,s)));return this.filtered_entries=r};_filteredData=e=>{e=void 0!==e?e:this._filterData(),this.markersMap(e),this._selectedMarker(),this._helpText(e),this.slider&&(this._renderSlider(),this._clickeableMarkers(),this._clickeableFeatures(),this._clickToggleSlider()),this._urlHash(),this._setFetureAttributes(),this._accesibleMenu(),this.fit_bounds_after_filter&&this.fitBounds()};_setSearchInputValue=e=>{var t="#js-search-input"+this.scope_sufix;t?document.querySelector(t).value=e:this.logger.warn("No se encuentra el input search")};_clearSearchInput=()=>document.querySelectorAll("#js-search-input"+this.scope_sufix).forEach(e=>e.value="");_resetSearch=()=>{document.addEventListener("click",e=>{if(e.target.matches(".js-poncho-map-reset"+this.scope_sufix)){e.preventDefault(),e.stopPropagation(),this.removeHash();try{var t="#js-search-input"+this.scope_sufix,a=document.querySelector(t);if(!a)return;var r="#id-poncho-map-search--"+a.dataset.searchScope,o=document.querySelector(r);o&&(o.value="")}catch(e){this.logger.error(e)}try{this._resetFormFilters()}catch(e){this.logger.error(e)}try{this._filteredData(this.entries)}catch(e){this.logger.error(e)}try{this._clearSearchInput()}catch(e){this.logger.error(e)}try{this.resetView()}catch(e){this.logger.error(e)}}})};filterChange(t){var e;"function"!=typeof t?this.logger.error("filterChange requiere una función de callback."):(e=".js-filters"+(this.scope_sufix||""),document.querySelectorAll(e).forEach(e=>{e.onchange=t}))}_updateCheckAllState=e=>{var t,a=document.querySelector(this.scope_selector+" #check-all-"+e);a&&(e=this.scope_selector+` [id^=id__${e}]`,0!==(e=Array.from(document.querySelectorAll(e))).length)&&(e=(t=e.filter(e=>e.checked)).length===e.length,t=0===t.length,a.checked=e,a.indeterminate=!e&&!t)};checkUncheckFilters=()=>{var e=this.scope_selector+" .js-select-all-checkbox",e=document.querySelectorAll(e),t=(e.forEach(a=>{a.addEventListener("change",()=>{var e=a.dataset.field;let t=a.checked;e=this.scope_selector+` [id^=id__${e}]`;document.querySelectorAll(e).forEach(e=>e.checked=t),a.indeterminate=!1,this._filteredData()})}),this.scope_selector+" [id^=id__]");document.querySelectorAll(t).forEach(t=>{t.addEventListener("change",()=>{var e=t.id.split("__");2<=e.length&&(e=e[1],this._updateCheckAllState(e)),this._filteredData()})}),e.forEach(e=>{e=e.dataset.field;this._updateCheckAllState(e)})};render=()=>{this._addSummary(),this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),0<this.filters.length&&(this._filterButton(),this._filterContainer(),this._createFilters(this.filters)),this.tileLayer.addTo(this.map),this._filteredData(),this.filterChange(e=>{e.preventDefault(),this._filteredData()}),this.checkUncheckFilters(),this._totalsInfo(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this.filters_visible&&this._filterContainerHeight(),this._setSliderSize(),this.mapOpacity(),this.mapBackgroundColor(),this._listeners(),this._accesibleExtras(),this.layerViewConf.setVisuals(),this.setMapAlignment(this.map_align),this._resetSearch(),this._clickToggleFilter()}}class PonchoMapSearch{constructor(e,t){var a={scope:!1,placeholder:"search_placeholder",search_fields:e.search_fields,sort:!0,sort_reverse:!1,sort_key:"text",datalist:!0,combobox:!1,combobox_options:!1,debounce_delay:300},a=(this.instance=e,Object.assign({},a,t));this.debounce_delay=a.debounce_delay,this.text=e.headers.hasOwnProperty(a.text)?a.text:e.title,this.datalist=a.datalist,this.combobox=a.combobox,this.combobox_options=a.combobox_options,this.placeholder=a.placeholder,this.scope=a.scope,this.scope_sufix="--"+this.scope,this.sort=a.sort,this.sort_reverse=a.sort_reverse,this.search_scope_selector=this.scope?`[data-scope="${this.scope}"]`:"",this.instance.search_fields=a.search_fields,this.instance.accesible_menu_search=[],this.isSearch()&&this.instance.accesible_menu_search.push({label:"search_data",link:"#id-poncho-map-search"+this.scope_sufix}),this.selectors={datalist:[this.search_scope_selector+" .js-porcho-map-search__list",this.search_scope_selector+" .js-poncho-map-search__list"].join(","),searchInput:this.search_scope_selector+" .js-poncho-map-search__input",scope:this.search_scope_selector,resultItem:this.search_scope_selector+" .js-pm-search-result-item",submit:this.search_scope_selector+" .js-poncho-map-search__submit",searchResultContainer:this.search_scope_selector+" .js-pm-search"},this.cachedDataEntries=[],this._cachedElements={input:null,submit:null,filterSearchInput:null,searchContainer:null},this._searchHandlerBound=!1}_comboboxLabel=e=>{var t;return!this.instance.isObject(this.combobox_options)||this.instance.isEmptyObject(this.combobox_options)?null:(t=this.combobox_options?.template,!this.combobox_options.hasOwnProperty("template")||this.instance.isEmptyString(t)?e[this.text]||null:this.instance.tpl(t,e,["*"]))};_cacheDataEntries=()=>{this.combobox&&(this.instance.entries&&0!==this.instance.entries.length?this.cachedDataEntries=this.instance.entries.map(e=>{if(!e.properties)return null;var t=["name",...new Set(this.instance.search_fields)];let a=e.properties;e=t.map(e=>a[e]).filter(e=>null!=e&&""!==e).map(e=>String(e).trim()),t=slugify(e.join(" ")),e=this._comboboxLabel(a);return{...a,results:t,pm_search_option_template:e}}).filter(e=>null!==e):this.cachedDataEntries=[])};isSearch=()=>!!document.querySelector(this.search_scope_selector);sortData=(e,r)=>{e=e.sort((e,t)=>{var a=e=>{this.instance.removeAccents(e).toUpperCase()};return a(e[r]),a(t[r]),a(e[r]),a(t[r]),0});return this.sort_reverse?e.reverse():e};_triggerSearch=()=>{this._cachedElements.input||(this._cachedElements.input=document.querySelector(this.selectors.searchInput));let t=this._cachedElements.input;var e,a;t&&(a="id-poncho-map-search"+this.scope_sufix,t.id!==a&&((e=document.querySelector(`[for="${t.id}"]`))&&e.setAttribute("for",a),t.id=a),this._cachedElements.submit||(this._cachedElements.submit=document.querySelector(this.selectors.submit)),e=this._cachedElements.submit)&&!this._searchHandlerBound&&(a="#js-search-input"+this.instance.scope_sufix,this._cachedElements.filterSearchInput=document.querySelector(a),this._searchHandlerBound=!0,e.addEventListener("click",e=>{e.preventDefault(),this._cachedElements.filterSearchInput&&(this._cachedElements.filterSearchInput.value=t.value,this._renderSearch(t.value))}))};searchTerm=t=>{var e;this.instance.isEmptyString(t)?this.logger.warn("searchTerm","El término de búsqueda no puede estar vacío."):(e="#js-search-input"+this.instance.scope_sufix,document.querySelectorAll(e).forEach(e=>e.value=t),e="#id-poncho-map-search"+this.scope_sufix,document.querySelectorAll(e).forEach(e=>e.value=t),this.instance._resetSearch(),this._renderSearch(t))};_keyup=()=>{var e=document.querySelectorAll(this.selectors.searchInput);let a=document.querySelector("#js-search-input"+this.instance.scope_sufix);if(a){a.dataset.searchScope=this.scope;let t=e=>{a.value=e.value};e.forEach(e=>{e.addEventListener("keyup",()=>t(e)),e.addEventListener("keydown",()=>t(e))})}};_placeHolder=()=>{if(!this.placeholder)return"";document.querySelectorAll(this.selectors.searchInput).forEach(e=>e.placeholder=this.instance._t(this.placeholder))};_renderSearch=e=>{var t;this.instance.isEmptyString(e)?this.logger.error("_renderSearch","El término de búsqueda no puede estar vacío."):(t=this.instance._filterData(),this.instance.markersMap(t),this.instance.slider&&(this.instance._renderSlider(),this.instance._clickeableFeatures(),this.instance._clickeableMarkers(),this.instance._clickToggleSlider()),this.instance.hash&&this.instance._urlHash(),1==t.length?this.instance.gotoEntry(t[0].properties[this.instance.id],!0,!0):""!=e.trim()&&(this.instance.removeHash(),setTimeout(this.instance.fitBounds,this.instance.anchor_delay)),this.instance._helpText(t),this.instance._resetSearch(),this.instance._setFetureAttributes(),this.instance._accesibleMenu())};_addDataListOptions=()=>{if(!this.datalist)return null;var e=document.querySelector(this.selectors.searchInput);if(!e)return null;let t="id-datalist"+this.scope_sufix,a=(e.setAttribute("list",t),document.createDocumentFragment());this.instance.filtered_entries.filter(e=>e.properties&&e.properties[this.text]).forEach(e=>{var t=document.createElement("option");t.value=e.properties[this.text],a.appendChild(t)}),document.querySelectorAll(this.selectors.datalist).forEach(e=>{e.id=t,e.replaceChildren(a.cloneNode(!0))})};_searchRegion=()=>{var e=document.querySelector(this.search_scope_selector);e.setAttribute("role","region"),e.setAttribute("aria-label","Buscador")};findEntries=e=>{let t=slugify(e);return this.cachedDataEntries.filter(e=>e.results.includes(t))};_creatSearchItem=e=>{var t=e.pm_search_option_template,a=document.createElement("li"),r=(a.setAttribute("role","option"),a.classList.add("m-y-0","pm-search-results__option"),e[this.text]),o=window.location.pathname+"#"+e[this.instance.id],i=document.createElement("a");return i.href=o,i.tabIndex=0,i.dataset.name=r,i.classList.add("js-pm-search-result-item","pm-search-results__action"),i.setAttribute("data-entry-id",e[this.instance.id]),t?i.innerHTML=t:i.textContent=r,a.appendChild(i),a};_comboboxWidth=()=>{var e,t,a;return!!this.combobox_options?.display&&(e=new Set(["expanded","fit-content"]),t="fit-content",a=this.combobox_options.display,e.has(a)?"pm-search-results__"+a:(this.instance.logger.warn("_comboboxWidth",`El estilo "${a}" no es válido. Opciones `+`disponibles: ${Array.from(e).join(", ")}. `+`Usando "${t}" por defecto.`),"pm-search-results__"+t))};_closeSearchResults=()=>{var e=this._cachedElements.searchContainer||document.querySelector(this.selectors.searchResultContainer);e&&(e.classList.remove("pm-search-results"),e.replaceChildren())};searcher=()=>{if(this.combobox){let i=Math.min(Math.max(parseInt(this.combobox_options?.max_results,10)||20,5),50),s=this._comboboxWidth();document.querySelectorAll(this.selectors.datalist).forEach(e=>e.remove());let n=this._cachedElements.input||document.querySelector(this.selectors.searchInput);if(n){document.querySelector(this.search_scope_selector).classList.add("pm-search-combobox"),n.setAttribute("autocomplete","off"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-controls","results-list"),n.setAttribute("role","combobox");let o=document.createElement("div"),e=(o.classList.add("js-pm-search"),o.setAttribute("aria-live","polite"),this._cachedElements.searchContainer=o,{current:null}),t=this.debounce_delay;n.parentElement.after(o),n.addEventListener("keyup",()=>{clearTimeout(e.current),e.current=setTimeout(()=>{o.classList.remove("pm-search-results"),s&&o.classList.remove(s),o.replaceChildren();var e=String(n.value);if(e.trim()&&!(e.length<2)){e=this.findEntries(e);if(!(e.length<1)){var t,a=document.createElement("ul"),r=(a.classList.add("pm-search-results__listbox"),a.setAttribute("role","listbox"),document.createDocumentFragment());for(t of e.slice(0,i))r.appendChild(this._creatSearchItem(t));a.appendChild(r),o.classList.add("pm-search-results"),s&&o.classList.add(s),o.appendChild(a)}}},t)}),n.addEventListener("keydown",e=>{"ArrowDown"==e.key&&(e.preventDefault(),e=o.querySelector(this.selectors.resultItem))&&e.focus()}),o.addEventListener("keydown",e=>{var t,a=e.target;"ArrowDown"==e.key&&(e.preventDefault(),a.matches(this.selectors.resultItem))&&(t=a.closest("li").nextElementSibling)&&(t=t.querySelector(this.selectors.resultItem))&&t.focus(),"ArrowUp"==e.key&&(e.preventDefault(),a.matches(this.selectors.resultItem))&&((t=a.closest("li").previousElementSibling)?(t=t.querySelector(this.selectors.resultItem))&&t.focus():n.focus()),"Tab"!=e.key||!a.matches(this.selectors.resultItem)||a.closest("li").nextElementSibling||e.shiftKey||this._closeSearchResults(),"Escape"==e.key&&(this._closeSearchResults(),n.value="",n.focus())}),window.addEventListener("click",e=>{var t,a=e.target.closest(this.selectors.resultItem);a?(e.preventDefault(),t=a.dataset.entryId,a=a.dataset.name,this.instance._setSearchInputValue(a),n.value=a,this._closeSearchResults(),this.instance.gotoEntry(t,!0,!0)):n.contains(e.target)||o.contains(e.target)||this._closeSearchResults()})}}};render=()=>{this._placeHolder(),this._triggerSearch(),this._addDataListOptions(),this.instance.filterChange(e=>{e.preventDefault(),this.instance._filteredData(),this._addDataListOptions()}),this._searchRegion(),this._keyup(),this.instance._accesibleMenu(),this._cacheDataEntries(),this.searcher()}}function ponchoMapTplSearch(e){var t,a,r,o,i,s;return e&&"object"==typeof e&&({figure:e="",title:s,text:a,separator:t=", "}=e,s)&&"string"==typeof s&&Array.isArray(a)?(a=a.filter(e=>e&&"string"==typeof e),(r=document.createElement("div")).classList.add("pm-search-result-option"),e&&"string"==typeof e&&((o=document.createElement("figure")).classList.add("pm-search-result-option__figure"),(i=document.createElement("img")).src=`{{${e}}}`,i.width=90,i.alt="",i.loading="lazy",i.classList.add("pm-search-result-option__image"),o.appendChild(i),i=`{% '${o.outerHTML}' if ${e} != '' else '' %}`,r.insertAdjacentHTML("beforeend",i)),(o=document.createElement("div")).classList.add("pm-search-result-option__text"),(e=document.createElement("p")).classList.add("m-y-0","fw-semibold","opt-name"),e.textContent=`{{${s}}}`,o.appendChild(e),(i=document.createElement("p")).classList.add("m-y-0","small","text-arg-gris-intermedio","opt-location"),0<a.length&&(s=a.map(e=>`{{${e}}}`).join(t),i.textContent=s),o.appendChild(i),r.appendChild(o),r.outerHTML):null}let PONCHOMAP_GEOJSON_PROVINCES="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geo-provincias-argentinas.json",ponchoMapProvinceMergeData=(e={},t=[],a="provincia")=>{if(!e||!e.hasOwnProperty("features"))throw new Error("Formato de datos inválido.");let o=new Map,i=(t.forEach(e=>{var t;e&&e[a]&&(t=slugify(e[a]),o.set(t,e))}),[]);return e.features.forEach(t=>{if(t.properties&&(t.properties.fna||t.properties.nam)){var a=t.properties.fna?slugify(t.properties.fna):null,r=t.properties.nam?slugify(t.properties.nam):null;let e=null;a&&o.has(a)?e=o.get(a):r&&o.has(r)&&(e=o.get(r)),!e&&(t.properties.fna||t.properties.nam)||(e&&(e.color&&!t.properties["pm-type"]&&(t.properties.stroke=ponchoColor(e.color)),a={...e},"n"===t.properties["pm-interactive"]&&"n"!==a["pm-interactive"]&&delete a["pm-interactive"],Object.assign(t.properties,a)),i.push(t))}}),e.features=i,e},ponchoMapProvinceCssStyles=e=>{if("boolean"==typeof e&&!e){let t=["poncho-map-province__toggle-map","poncho-map-province__toggle-element"];e=t.map(e=>"."+e).join(",");document.querySelectorAll(e).forEach(e=>{e.classList.remove(...t)})}};class PonchoMapProvinces extends PonchoMapFilter{constructor(e,t,a){a=Object.assign({},{map_align:"left",slider_size:"default",fit_bounds:!0,hide_select:!1,initial_entry:!1,map_init_options:{boxZoom:!1,doubleClickZoom:!1,scrollWheelZoom:!1,zoomControl:!0,zoomSnap:.1},map_layers:!1,map_view:[-40.47815508388363,-62.802101128049806],map_zoom:4.4,overlay_image:!0,overlay_image_bounds:[[-20.70565857951651,-24.50543849552044],[-88.20759652502107,-74.4619171280653]],overlay_image_opacity:.8,overlay_image_url:"/profiles/argentinagobar/themes/contrib/poncho/img/map-shadow-antartida.png",province_index:"provincia",random_entry:!1,slider:!0,toggle_select:!0,tooltip:!0,tooltip_options:{className:"leaflet-tooltip-own",direction:"auto",offset:[0,-3],opacity:1,permanent:!1,sticky:!0}},a),ponchoMapProvinceCssStyles(a.toggle_select),e=ponchoMapProvinceMergeData(e,t,a.province_index);super(e,a),this.initialEntry=a.initial_entry,this.randomEntry=a.random_entry,this.overlayImage=a.overlay_image,this.overlayImageUrl=a.overlay_image_url,this.overlayImageBounds=a.overlay_image_bounds,this.overlayImageOpacity=a.overlay_image_opacity,this.mapView=a.map_view,this.toggleSelect=a.toggle_select,this.hideSelect=a.hide_select,this.fitToBounds=a.fit_bounds}sortObject=(e,a=0)=>e.sort((e,t)=>{e=e[a].toUpperCase(),t=t[a].toUpperCase();return t<e?1:e<t?-1:0});hideSelectProvinces=e=>{"boolean"==typeof e&&(e=`[data-scope-related="${this.scope}"]`,document.querySelectorAll(e).forEach(e=>{e.style.display=this.hideSelect?"none":""}))};_randomEntry=e=>e[Math.floor(Math.random()*e.length)][0];_provincesFromGeoJSON=(e,r)=>{let o={};return e.features.map(e=>{var{name:t=!1,"pm-interactive":a=!1}=e.properties;if("n"===a||!t)return!1;o[e.properties[r]]=t}).filter(Boolean),this.sortObject(Object.entries(o),1)};_selectedEntry=e=>{var t=window.location.hash.replace("#","");let a="";return t?a=t:this.initialEntry?a=this.initialEntry:this.randomEntry&&(a=this._randomEntry(e)),a};_setSelectProvinces=e=>{window.location.hash.replace("#","");e=this._provincesFromGeoJSON(e.geoJSON,e.id);let a=this._selectedEntry(e),r=document.getElementById("id_provincia");return[["","Elegí una provincia"],...e].forEach(e=>{var t=document.createElement("option");e[0]===a&&t.setAttribute("selected","selected"),t.value=e[0],t.textContent=e[1],r.appendChild(t)}),{object:r,selected:a}};_selectedPolygon=e=>{e.map.eachLayer(e=>{e.on("keypress click",e=>{e?.target?.feature?.properties&&(e=e.target.feature.properties.id,document.getElementById("id_provincia").value=e)})})};_selectProvinces=t=>{this._selectedPolygon(t);let a=this._setSelectProvinces(t);a.selected&&t.gotoEntry(a.selected),a.object.addEventListener("change",e=>{t.gotoEntry(e.target.value),e.value=a.selected})};_overlayImage=()=>{this.overlayImageUrl&&"string"==typeof this.overlayImageUrl&&"number"==typeof this.overlayImageOpacity&&L.imageOverlay(this.overlayImageUrl,this.overlayImageBounds,{opacity:this.overlayImageOpacity}).addTo(this.map)};renderProvinceMap=()=>{this.hideSelectProvinces(this.hideSelect),this._overlayImage(),this.render(),this.fitToBounds&&this.fitBounds(),this._selectProvinces(this)}}class GapiSheetData{constructor(e){e=Object.assign({},{gapi_key:"AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",gapi_uri:"https://sheets.googleapis.com/v4/spreadsheets/"},e);this.gapi_key=e.gapi_key,this.gapi_uri=e.gapi_uri}url=(e,t,a)=>{if(!e||"string"!=typeof e)throw new Error("El parámetro 'page' es requerido.");if(t&&"string"==typeof t)return a=a||this.gapi_key,[this.gapi_uri,t,"/values/",encodeURIComponent(e),"?key=",a,"&alt=json"].join("");throw new Error("El parámetro 'spreadsheet' es requerido.")};json_data=e=>{if(e&&e.values&&e.values.length)return{feed:e=this.feed(e),entries:this.entries(e),headers:this.headers(e)};throw new Error("El parámetro 'json' debe contener una propiedad 'values' con al menos una fila.")};feed=(e,t=!0)=>{var a=e.values[0],r=/ |\/|_/gi,o=a.length,i=new Array(o);for(let e=0;e<o;e++)i[e]=(t?a[e].toLowerCase():a[e]).replace(r,"");var s=e.values,n=s.length,l=new Array(n-1);for(let e=1;e<n;e++){var c=s[e],d={};for(let e=0;e<o;e++)d[i[e]]=e<c.length?c[e].trim():"";l[e-1]=d}return l};gapi_feed_row=(e,t="-",a=!0)=>{let r=a?"filtro-":"";a=Object.entries(e);let o={};return a.map(e=>o[e[0].replace("gsx$","").replace(r,"").replace(/-/g,t)]=e[1].$t),o};entries=e=>e.slice(1);headers=e=>e[0]}"undefined"!=typeof exports&&(module.exports=GapiSheetData);class TranslateHTML{ATTRIBUTES=["title","placeholder","alt","value","href","src","html.lang"];constructor(e=[],t=[]){this.dictionary=this.sortByLength(e),this.attributes=t.length?t:this.ATTRIBUTES}sortByLength=e=>(e.sort((e,t)=>e[0].length>t[0].length?-1:e[0].length<t[0].length?1:e[0]-t[0]),e);translateAttributes=(e=!1)=>{let t=e||this.dictionary;this.attributes.forEach(e=>{e=e.split(".").slice(-2);let a=2===e.length?e[0]:"",r=2===e.length?e[1]:e[0];t.forEach(t=>{document.querySelectorAll(`${a}[${r}='${t[0]}']`).forEach(e=>e[r]=t[1])})})};translateHTML=(a,r)=>{for(var e,t=document.evaluate("//*/text()",document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),o=[];e=t.iterateNext();)o.push(e);o.forEach(e=>{var t=e.textContent.replace(a,r);t!==e.textContent&&(t=document.createTextNode(t),e.parentNode.replaceChild(t,e))})};translate=()=>{this.dictionary.forEach(e=>{var t=new RegExp(e[0],"g");this.translateHTML(t,e[1])})}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-poncho",
3
- "version": "2.1.70",
3
+ "version": "2.1.72",
4
4
  "description": "Base de html y css para la creación de sitios pertenecientes a la Administración Pública Nacional de la República Argentina.",
5
5
  "main": "index.js",
6
6
  "scripts": {