1"use strict";(self.webpackChunkpalma_web=self.webpackChunkpalma_web||[]).push([[474],{13474:(e,a,t)=>{t.r(a),t.d(a,{default:()=>y});var l=t(65043),i=t(89892),n=t(36808),r=t(73216),s=t(2237),o=t(43589),c=t(1917),d=t(70579);function u(e){var a,t;let{alerts:l,onClick:u,favorites:m=!1}=e;const v=(0,o.ok)(),h=(0,o.WD)();let p=[];const x=(0,r.Zp)();return l.length>0&&(p=(0,c.PJ)([...l])),(0,d.jsx)(d.Fragment,{children:0===(null===(a=p)||void 0===a?void 0:a.length)?m?(0,d.jsx)("div",{style:{marginBottom:"10px"},children:(0,d.jsx)(n.A,{title:h("lb_titulo_aviso"),text:h("lb_titulo_texto_favorito"),width:"160px",onClick:()=>x("/".concat(v,"/").concat(s.k$.paradas[v])),buttonLabel:h("lb_buscar")})}):(0,d.jsx)("div",{style:{marginBottom:"10px",flexGrow:1},children:(0,d.jsx)(n.A,{title:h("lb_titulo_aviso"),text:h("lb_titulo_texto"),width:"160px",onClick:()=>x("/".concat(v,"/").concat(s.k$.paradas[v])),buttonLabel:h("lb_buscar")})}):(0,d.jsx)("section",{className:"avisos-list",children:null===(t=p)||void 0===t?void 0:t.map((e,a)=>(0,d.jsx)(i.A,{alert:e,onClick:()=>u(e),favorites:m},e+a))})})}var m=t(83372);t(52420);function v(){return(0,d.jsx)("section",{className:"avisos-list",children:new Array(8).fill(null).map((e,a)=>(0,d.jsx)(m.A,{height:180,duration:.5},"avisos-list"+a))})}var h=t(7802),p=t(5137),x=t(1206),f=t(44700),g=t(84088),b=t(75040),j=t(16154);function y(){const e=(0,o.WD)(),[a,t]=(0,l.useState)(!0),[i,n]=(0,l.useState)([]),m=(0,p.d4)(x.zU),y=(0,p.d4)(f.px),w=(0,r.Zp)(),[A,N]=(0,b.A)(),I=null===m||void 0===m?void 0:m.stops,_=null===m||void 0===m?void 0:m.lines,{logEventAnalytics:k}=(0,j.A)();(0,l.useEffect)(()=>{k("avisos_screen")},[]);return(0,l.useEffect)(()=>{(0,c.F1)(),t(!0),(async e=>{const a=[],l=[];await Promise.all(e.map(e=>(e.paradas.forEach(t=>{I.some(e=>e.stopId===t.idParada)?l.some(a=>a.idAlerta===e.idAlerta)||l.push(e):a.some(a=>a.idAlerta===e.idAlerta)||l.some(a=>a.idAlerta===e.idAlerta)||a.push(e)}),e.lineas.forEach(t=>{_.some(e=>e.routeId===t.idLinea)?l.some(a=>a.idAlerta===e.idAlerta)||l.push(e):a.some(a=>a.idAlerta===e.idAlerta)||l.some(a=>a.idAlerta===e.idAlerta)||a.push(e)}),n(l)))).then(()=>t(!1))})(y)},[y,I,_]),(0,d.jsxs)(d.Fragment,{children:[N(e("lb_configuracion_menu_avisos")),(0,d.jsx)("section",{className:"avisos-container",children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"advice-titles-container",children:[(0,d.jsx)(g.A,{ariaLabel:"time",Icon:h.h,className:"advice-titles-icon"}),(0,d.jsx)("h1",{className:"advice-titles",children:e("lb_mis_avisos")})]}),a?(0,d.jsx)(v,{}):(0,d.jsx)(u,{alerts:i,onClick:e=>{w(A(s.k$.notices,"ADVICE",(0,c.aJ)(String(e.idAlerta))))},favorites:!0})]}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"advice-titles-container",children:[(0,d.jsx)(g.A,{ariaLabel:"time",Icon:h.h,className:"advice-titles-icon"}),(0,d.jsx)("h1",{className:"advice-titles",children:e("lb_avisos")})]}),(0,d.jsx)("section",{className:"avisos-box",children:a?(0,d.jsx)(v,{}):(0,d.jsx)(u,{alerts:y,onClick:e=>{w(A(s.k$.notices,"ADVICE",(0,c.aJ)(String(e.idAlerta))))}})})]})]})})]})}},13938:(e,a,t)=>{t.d(a,{h:()=>o});var l,i=t(65043);const n=["title","titleId"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},r.apply(null,arguments)}function s(e,a){let{title:t,titleId:s}=e,o=function(e,a){if(null==e)return{};var t,l,i=function(e,a){if(null==e)return{};var t={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==a.indexOf(l))continue;t[l]=e[l]}return t}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)t=n[l],-1===a.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,n);return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:a,"aria-labelledby":s},o),t?i.createElement("title",{id:s},t):null,l||(l=i.createElement("g",{fill:"none"},i.createElement("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"}),i.createElement("path",{fill:"#455455FF",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 5a1 1 0 0 0-.993.883L11 8v3H8a1 1 0 0 0-.117 1.993L8 13h3v3a1 1 0 0 0 1.993.117L13 16v-3h3a1 1 0 0 0 .117-1.993L16 11h-3V8a1 1 0 0 0-1-1"}))))}const o=i.forwardRef(s);t.p},36808:(e,a,t)=>{t.d(a,{A:()=>n});
1var l=t(59188),i=t(70579);function n(e){let{title:a,text:t,width:n="100%",onClick:r,buttonLabel:s}=e;return(0,i.jsxs)("div",{className:"empty-favorite-list",children:[(0,i.jsx)("h2",{className:"title",children:a}),(0,i.jsx)("p",{className:"text",children:t}),(0,i.jsx)(l.A,{title:s,className:"btn-explorer",style:{width:n},onClick:()=>r()})]})}},54832:(e,a,t)=>{t.d(a,{A:()=>s});var l=t(26183),i=t(43589),n=t(5137),r=t(13472);function s(){const[e]=(0,l.oN)(),[a]=(0,l.dX)(),t=(0,i.ok)(),s=(0,n.wA)(),o=(0,i.WD)();return{downloadFaqFile:async function(a){const t=await e(a);if(null!==t){const e=document.createElement("a"),a=null===t||void 0===t?void 0:t.data;e.href=a,e.setAttribute("download","Faq archivo"),document.body.appendChild(e),e.click()}},downloadFileByAlert:async function(e){let{language:l,alertId:i,fileId:n}=e;const c=l||t,d=await a({language:c,alertId:i,fileId:n});if(null!==d&&void 0!==d&&d.isSuccess){const e=document.createElement("a"),a=null===d||void 0===d?void 0:d.data,t=null===a||void 0===a?void 0:a.split("/").pop();e.href=a,e.setAttribute("download",t),document.body.appendChild(e),e.click(),document.body.removeChild(e)}else s((0,r.ul)({message:o("lb_msj_error_generico"),type:"error"}))}}}},71821:(e,a,t)=>{t.d(a,{h:()=>o});var l,i=t(65043);const n=["title","titleId"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},r.apply(null,arguments)}function s(e,a){let{title:t,titleId:s}=e,o=function(e,a){if(null==e)return{};var t,l,i=function(e,a){if(null==e)return{};var t={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==a.indexOf(l))continue;t[l]=e[l]}return t}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)t=n[l],-1===a.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,n);return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:a,"aria-labelledby":s},o),t?i.createElement("title",{id:s},t):null,l||(l=i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M24 0v24H0V0zM12.594 23.258l-.012.002-.071.035-.02.004-.014-.004-.071-.036c-.01-.003-.019 0-.024.006l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.016-.018m.264-.113-.014.002-.184.093-.01.01-.003.011.018.43.005.012.008.008.201.092c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.003-.011.018-.43-.003-.012-.01-.01z"}),i.createElement("path",{fill:"#455455FF",d:"M16 3a1 1 0 0 1 1 1v1h2a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2V4a1 1 0 0 1 2 0v1h6V4a1 1 0 0 1 1-1M8.01 16H8a1 1 0 0 0-.117 1.993L8.01 18a1 1 0 1 0 0-2m4 0H12a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m4 0H16a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m-8-4H8a1 1 0 0 0-.117 1.993L8.01 14a1 1 0 1 0 0-2m4 0H12a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m4 0H16a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2M19 7H5v2h14z"}))))}const o=i.forwardRef(s);t.p},83187:(e,a,t)=>{t.d(a,{h:()=>o});var l,i=t(65043);const n=["title","titleId"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},r.apply(null,arguments)}function s(e,a){let{title:t,titleId:s}=e,o=function(e,a){if(null==e)return{};var t,l,i=function(e,a){if(null==e)return{};var t={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==a.indexOf(l))continue;t[l]=e[l]}return t}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)t=n[l],-1===a.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,n);return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:a,"aria-labelledby":s},o),t?i.createElement("title",{id:s},t):null,l||(l=i.createElement("g",{fill:"none"},i.createElement("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"}),i.createElement("path",{fill:"#455455FF",d:"M16 3a1 1 0 0 1 1 1v1h2a2 2 0 0 1 1.995 1.85L21 7v12a2 2 0 0 1-1.85 1.995L19 21H5a2 2 0 0 1-1.995-1.85L3 19V7a2 2 0 0 1 1.85-1.995L5 5h2V4a1 1 0 0 1 2 0v1h6V4a1 1 0 0 1 1-1m-1.176 6.379-4.242 4.242-1.415-1.414a1 1 0 0 0-1.414 1.414l2.114 2.115a1.01 1.01 0 0 0 1.429 0l4.942-4.943a1 1 0 1 0-1.414-1.414"}))))}const o=i.forwardRef(s);t.p},84790:(e,a,t)=>{t.d(a,{Z:()=>o});
1var l=t(65043),i=t(5137),n=t(1206),r=t(44700),s=t(44084);const o=()=>{const[e,a]=(0,l.useState)([]),[t,o]=(0,l.useState)([]),c=(0,i.d4)(n.QL),d=(0,i.d4)(n.B_),u=(0,i.d4)(r.px),{deleteFavorites:m}=(0,s.r)();return{favoriteStopsAlerts:t,favoriteLineAlerts:e,isAlert:(e,a)=>{let t=!1;return u.forEach(l=>"line"===e&&l.lineas.some(e=>Number(e.idLinea)===Number(a))||"stop"===e&&l.paradas.some(e=>Number(e.idParada===a)||Number(e.idNombre===a))?t=!0:void 0),t},getFavoriteAlerts:(e,t)=>{if(t){const t=e.paradas.map(e=>e.idParada).filter(e=>c.some(a=>a.stopId===e)),l=e.lineas.map(e=>e.idLinea).filter(e=>d.some(a=>a.routeId===e));o(t),a(l)}else o(e.paradas.map(e=>e.idParada)),a(e.lineas.map(e=>e.idLinea))},handleDelete:(e,a)=>{if(e){if(e.paradas.length){const t=null===e||void 0===e?void 0:e.paradas.map(e=>e.idParada).filter(e=>c.includes(e));m("stops",t,a)}if(e.lineas.length){const t=null===e||void 0===e?void 0:e.lineas.map(e=>e.idLinea).filter(e=>d.some(a=>a.routeId===e));m("lines",t,a)}}}}}},89892:(e,a,t)=>{t.d(a,{A:()=>N});var l=t(65043),i=t(61726),n=t(98767),r=t(7802),s=t(71821),o=t(83187),c=t(13938),d=t(31629),u=t(71776),m=t(15763),v=t(54832),h=t(84088),p=t(62642),x=t(29196),f=t(5137),g=t(23994),b=t(84790),j=t(59188),y=t(43589),w=t(92763),A=t(70579);function N(e){var a,t,N,I,_,k,O,C,F;let{alert:E,onClick:L,favorites:P,onlyInfo:S=!1,stateOpen:H=!0}=e;const M=null===E||void 0===E||null===(a=E.paradas)||void 0===a?void 0:a.map(e=>e.idParada),D=null===E||void 0===E||null===(t=E.lineas)||void 0===t?void 0:t.map(e=>e.idLinea),V=(0,f.d4)(p.hf),z=(0,f.d4)(x.kD),B=V.filter(e=>M.includes(e.id)),W=z.filter(e=>D.includes(e.id)),[R,Z]=(0,l.useState)(!1),{handleDelete:$}=(0,b.Z)(),[q,J]=(0,l.useState)(H),T=(0,y.WD)(),G=e=>{const a=null===e||void 0===e?void 0:e.split(" "),t=a[0],l=a[1];return"".concat(t,", ").concat(l)},{downloadFaqFile:Q}=(0,v.A)(),U="#".concat(null===(N=E.priority)||void 0===N?void 0:N.iconColor),X={"--warning-icon-color":U},K="#".concat(null===(I=E.priority)||void 0===I?void 0:I.backgroundColor),{getLineInfo:Y,gotToPasoPorParada:ee}=(0,w.A)();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)("article",{className:"item-avisos-container",style:{border:"2px solid #".concat(null===(_=E.priority)||void 0===_?void 0:_.iconColor),background:K},onClick:L,children:[(0,A.jsxs)("div",{className:"alert-message",children:[(0,A.jsxs)("div",{className:"alert-message-title-and-icon",children:[(0,A.jsx)("div",{className:"alert-warning-icon",children:(0,A.jsx)(h.A,{ariaLabel:"time",Icon:r.h,style:X})}),(0,A.jsx)("h2",{className:"alert-warning",style:{color:U},children:E.titulo||T("lb_avisos")})]}),!q&&S?(0,A.jsx)(h.A,{onClick:()=>J(!q),Icon:q?m.h:u.h}):(0,A.jsx)(A.Fragment,{})]}),q?(0,A.jsx)("div",{className:"item-avisos-list",children:(0,A.jsxs)("div",{className:"alert-container",children:[B.length||W.length?(0,A.jsxs)("div",{className:"lines",children:[W.map((e,a)=>(0,A.jsx)(i.A,{onClick:a=>{Y(e),a.stopPropagation()},code:null===e||void 0===e?void 0:e.code,routeColor:null===e||void 0===e?void 0:e.routeColor,styles:{cursor:"pointer",maxHeight:"18px",minHeight:"18px",height:"18px",minWidth:"25px",maxWidth:"30px",padding:"0px 2px",fontSize:"14px"}},"lineCode-".concat(a,"-").concat(Number(E.id)))),null===B||void 0===B?void 0:B.map((e,a)=>(0,A.jsx)(n.A,{onClick:a=>{ee(e),a.stopPropagation()},text:null===e||void 0===e?void 0:e.stopCode,transportMode:null===e||void 0===e?void 0:e.transportMode,styles:{cursor:"pointer",maxHeight:"20px",minHeight:"20px",height:"20px",padding:"0px 5px",borderRadius:"5px",fontSize:"14px"}},"codeStop-".concat(a,"-").concat(Number(E.id))))]}):(0,A.jsx)(A.Fragment,{}),(null===(k=E.fechas[0])||void 0===k?void 0:k.horaInicio)&&(0,A.jsxs)("span",{className:"alert-date",style:{margin:"5px 0px"},children:[(0,A.jsx)(h.A,{ariaLabel:"time",Icon:s.h,className:"alert-date-img"}),(0,A.jsx)("p",{className:"alert-date-text",children:"".concat(T("lb_desde_el")," ").concat(G(E.fechas[0].horaInicio))})]}),(null===(O=E.fechas[0])||void 0===O?void 0:O.horaFin)&&(0,A.jsxs)("span",{className:"alert-date",style:{margin:"5px 0px"},children:[(0,A.jsx)(h.A,{ariaLabel:"time",Icon:o.h,className:"alert-date-img"}),(0,A.jsx)("p",{className:"alert-date-text",children:"".concat(T("lb_hasta_el")," ").concat(G(null===(C=E.fechas[0])||void 0===C?void 0:C.horaFin)," (aprox.)")})]}),E.descripcion&&S?(0,A.jsxs)("span",{className:"alert-date ",style:{margin:"5px 0px"},children:[(0,A.jsx)(h.A,{ariaLabel:"time",Icon:r.h,className:"alert-date-img"}),(0,A.jsx)("p",{className:"alert-date-text",children:E.descripcion})]}):(0,A.jsx)(A.Fragment,{})]})}):(0,A.jsx)(A.Fragment,{}),S?(0,A.jsx)(A.Fragment,{children:q?(0,A.jsxs)("div",{className:"actions-onlyinfo",children:[(0,A.jsx)("div",{className:"download-action",children:(null===E||void 0===E||null===(F=E.files)||void 0===F?void 0:F.length)>0&&(null===E||void 0===E?void 0:E.files.map((e,a)=>(0,A.jsxs)("div",{className:"file-download-box",children:[(0,A.jsx)(h.A,{Icon:d.h}),(0,A.jsx)("span",{style:{textDecoration:"underline"},onClick:()=>Q(e),children:T("lb_avisos_descargar")})]},"alert-file-".concat(a))))}),(0,A.jsx)(j.A,{onClick:()=>J(!q),icon:q?m.h:u.h,background:"transparent",style:{marginTop:"auto"}})]}):(0,A.jsx)(A.Fragment,{})}):(0,A.jsxs)("div",{className:"actions",children:[(0,A.jsx)("span",{style:{textDecoration:"underline"},children:T("lb_avisos_ampliar")}),(0,A.jsx)(h.A,{Icon:c.h})]})]}),R&&(0,A.jsx)(g.A,{onClose:()=>Z(!1),onAccept:()=>$(E,()=>Z(!1)),title:'Esta acci\xf3n eliminar\xe1 la l\xednea/parada de la lista de "Favoritos" y "Alertas/Mis avisos" \xbfDesea continuar?'})]})}}}]); 2//# sourceMappingURL=474.b36994a8.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.