1"use strict";(self.webpackChunkpalma_web=self.webpackChunkpalma_web||[]).push([[875],{44108:(e,n,l)=>{l.d(n,{A:()=>p});var t=l(89379),i=(l(65043),l(31899)),a=l.n(i),o=(l(25015),l(45479)),s=l(43589),r=l(62389),d=l(66608),c=l(82220),u=l(99873),v=l(70579);function p(e){var n;const l=(0,s.ok)();(0,i.registerLocale)("es",function(){let e=u.A;switch(l){case"es":e=r.A;break;case"en":e=d.A;break;case"de":e=c.A}return e}());return(0,v.jsx)(a(),{calendarClassName:"calendar-container",locale:l,onChange:n=>{let l=new Date(n.toString());e.changeDate(l)},inline:!0,selected:null!==(n=e.selectedDate)&&void 0!==n?n:new Date,includeDateIntervals:e.hasInterval?[{start:(0,o.default)(new Date,-1),end:(0,o.default)(new Date,14)}]:void 0,calendarContainer:n=>{let{className:l,children:i}=n;return(0,v.jsx)("div",{className:l,style:(0,t.A)((0,t.A)({},{alignSelf:"center",justifyContent:"center"}),e.style),children:i})},renderCustomHeader:e=>{let{monthDate:n,decreaseMonth:t,increaseMonth:i}=e;return(0,v.jsxs)("div",{className:"calendar-header",children:[(0,v.jsx)("button",{"aria-label":"Previous Month",className:"react-datepicker__navigation react-datepicker__navigation--previous",onClick:t,children:(0,v.jsx)("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"<"})}),(0,v.jsx)("span",{className:"react-datepicker__current-month",children:n.toLocaleString(l,{month:"long"}).charAt(0).toUpperCase()+n.toLocaleString(l,{month:"long"}).slice(1)+", "+n.toLocaleString(l,{year:"numeric"})}),(0,v.jsx)("button",{"aria-label":"Next Month",className:"react-datepicker__navigation react-datepicker__navigation--next",onClick:i,children:(0,v.jsx)("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:">"})})]})}})}},61113:(e,n,l)=>{l.r(n),l.d(n,{default:()=>gn});var t,i=l(40733),a=l(16855),o=l(79405),s=l(84088),r=l(27785),d=l(23994),c=l(14251),u=l(23400),v=l(5137),p=l(76476),m=l(85352),h=l(37545),g=l(65043);const x=["title","titleId"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},f.apply(null,arguments)}function j(e,n){let{title:l,titleId:i}=e,a=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,x);return g.createElement("svg",f({width:9,height:15,viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":i},a),l?g.createElement("title",{id:i},l):null,t||(t=g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.16629 0.833008C5.64644 0.83263 6.1107 1.005 6.47427 1.31864C6.83783 1.63227 7.07643 2.06624 7.14647 2.54125C7.21651 3.01627 7.11333 3.50063 6.85576 3.90585C6.5982 4.31108 6.20345 4.61012 5.74362 4.74834L5.63029 4.77901L7.24829 6.62901L8.46429 7.23701C8.6165 7.31301 8.7339 7.44432 8.79244 7.60406C8.85098 7.7638 8.84624 7.93988 8.77918 8.09624C8.71212 8.25259 8.58782 8.3774 8.43174 8.44509C8.27565 8.51278 8.0996 8.51824 7.93962 8.46034L7.86829 8.42901L6.65229 7.82101C6.53632 7.76303 6.42942 7.68847 6.33495 7.59967L6.24495 7.50634L5.56629 6.73101L5.12629 8.48967C5.08651 8.6497 5.01733 8.80093 4.92229 8.93567L4.84895 9.03034L6.13429 10.2057C6.29974 10.3567 6.42447 10.547 6.49695 10.759L6.52829 10.8657L7.02029 12.833H7.16629C7.33621 12.8332 7.49964 12.8983 7.6232 13.0149C7.74676 13.1316 7.82111 13.291 7.83107 13.4606C7.84103 13.6302 7.78584 13.7973 7.67678 13.9276C7.56772 14.0579 7.41302 14.1416 7.24429 14.1617L7.16629 14.1663H6.55162C6.40232 14.1663 6.25657 14.1208 6.13387 14.0357C6.01116 13.9506 5.91735 13.8301 5.86495 13.6903L5.84029 13.6103L5.23495 11.1897L3.22829 9.35501C2.97628 9.22669 2.77157 9.02161 2.64372 8.76937C2.51586 8.51713 2.47147 8.23079 2.51695 7.95167L2.53962 7.84301L2.88162 6.47501L2.66629 6.62834L1.73762 8.17634C1.65017 8.32235 1.5102 8.42938 1.34638 8.47551C1.18256 8.52163 1.0073 8.50336 0.856515 8.42443C0.705733 8.3455 0.590846 8.2119 0.535398 8.05099C0.47995 7.89009 0.488139 7.71407 0.558288 7.55901L0.594288 7.48967L1.52295 5.94234C1.59812 5.81696 1.69339 5.7048 1.80495 5.61034L1.89162 5.54367L3.73295 4.22701C3.45898 3.94514 3.27414 3.5888 3.20152 3.20249C3.1289 2.81617 3.17173 2.41703 3.32466 2.05492C3.47758
11.69281 3.73382 1.38379 4.06136 1.16647C4.3889 0.949152 4.77321 0.833167 5.16629 0.833008ZM2.53295 10.289C2.58642 10.1272 2.69979 9.99207 2.8498 9.91127C2.9998 9.83047 3.17505 9.81017 3.33955 9.85454C3.50405 9.8989 3.64533 10.0046 3.73436 10.1498C3.82339 10.2951 3.85342 10.469 3.81829 10.6357L3.79829 10.7103L3.51429 11.561C3.46208 11.7179 3.38115 11.8637 3.27562 11.991L3.19229 12.0823L2.08762 13.187C2.15941 13.3217 2.18279 13.477 2.15388 13.6268C2.12496 13.7767 2.04549 13.9121 1.92875 14.0104C1.812 14.1088 1.66505 14.1641 1.51245 14.1671C1.35984 14.1701 1.21082 14.1206 1.09029 14.027L1.02762 13.971L0.698954 13.6423C0.583041 13.5264 0.513399 13.3722 0.503089 13.2086C0.49278 13.045 0.54251 12.8832 0.642955 12.7537L0.698954 12.6903L2.24962 11.1397L2.53295 10.289ZM5.16629 2.16634C4.98948 2.16634 4.81991 2.23658 4.69488 2.3616C4.56986 2.48663 4.49962 2.6562 4.49962 2.83301C4.49962 3.00982 4.56986 3.17939 4.69488 3.30441C4.81991 3.42944 4.98948 3.49968 5.16629 3.49968C5.3431 3.49968 5.51267 3.42944 5.63769 3.30441C5.76272 3.17939 5.83295 3.00982 5.83295 2.83301C5.83295 2.6562 5.76272 2.48663 5.63769 2.3616C5.51267 2.23658 5.3431 2.16634 5.16629 2.16634Z",fill:"#314450"})))}const b=g.forwardRef(j);l.p;var C;const _=["title","titleId"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},y.apply(null,arguments)}function w(e,n){let{title:l,titleId:t}=e,i=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,_);return g.createElement("svg",y({width:15,height:13,viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t},i),l?g.createElement("title",{id:t},l):null,C||(C=g.createElement("path",{d:"M13.5767 5.04678C13.8253 5.04679 14.0649 5.13939 14.2489 5.30653C14.433 5.47366 14.5481 5.70334 14.572 5.95078L14.5767 6.04678V8.71345C14.5767 9.48463 14.2797 10.2262 13.7474 10.7842C13.2151 11.3422 12.4883 11.6738 11.718 11.7101L11.5767 11.7134H4.61667L4.596 12.0148C4.55867 12.4948 4.09667 12.7948 3.70933 12.5914L3.60933 12.5388L3.38067 12.4134L3.11867 12.2608L2.82667 12.0814C2.61797 11.9498 2.41279 11.8126 2.21133 11.6701L1.95467 11.4841L1.73933 11.3201C1.70876 11.2965 1.67832 11.2727 1.648 11.2488C1.322 10.9888 1.33467 10.4521 1.68133 10.1781L1.87333 10.0288L1.98533 9.94545L2.23867 9.76211L2.38 9.66345L2.69133 9.45611L2.85267 9.35278L3.15267 9.16811C3.20067 9.14011 3.246 9.11278 3.29133 9.08745L3.54067 8.94611L3.75133 8.83278C4.136 8.63278 4.556 8.88945 4.59267 9.33745L4.618 9.71345H11.5767C11.8252 9.71345 12.0647 9.62094 12.2487 9.45395C12.4327 9.28695 12.548 9.05743 12.572 8.81011L12.5767 8.71345V6.04678C12.5767 5.78156 12.682 5.52721 12.8696 5.33967C13.0571 5.15214 13.3115 5.04678 13.5767 5.04678ZM11.368 0.122113L11.5773 0.234113L11.8227 0.373446L12.1007 0.53878C12.361 0.698571 12.616 0.866884 12.8653 1.04345L13.122 1.23011L13.3373 1.39345L13.4287 1.46545C13.7547 1.72478 13.742 2.26145 13.3953 2.53545L13.3047 2.60678L13.0913 2.76811L12.838 2.95145L12.546 3.15211C12.3893 3.25674 12.2306 3.35831 12.07 3.45678L11.786 3.62678L11.536 3.76745L11.3253 3.88078C10.9407 4.08078 10.5207 3.82411 10.4847 3.37678L10.458 3.00011H3.5C3.23478 3.00011 2.98043 3.10547 2.79289 3.29301C2.60536 3.48054 2.5 3.7349 2.5 4.00011V6.66678C2.5 6.932 2.39464 7.18635 2.20711 7.37389C2.01957 7.56142 1.76522 7.66678 1.5 7.66678C1.23478 7.66678 0.98043 7.56142 0.792893 7.37389C0.605357 7.18635 0.5 6.932 0.5 6.66678V4.00011C0.5 3.20446 0.81607 2.4414 1.37868 1.87879C1.94129 1.31618 2.70435 1.00011 3.5 1.00011H10.46L10.4733 0.792113L10.4807 0.69878C10.518 0.219446 10.98 -0.0812203 11.368 0.122113Z",fill:"#314450"})))}const N=g.forwardRef(w);l.p;var L,A,k=l(13938),S=l(89379),I=l(70579);function P(e){return(0,I.jsxs)("div",{className:"busButton",style:(0,S.A)({backgroundColor:e.routeColor?"#".concat(e.routeColor):"#F3F4F6"},e.style),children:[(0,I.jsx)("small",{className:"bus-button-text",children:e.text}),(0,I.jsx)(s.A,{Icon:e.icon,ariaLabel:"bus-icon",style:{height:"20px",width:"20px",fill:"#FFF"+e.routeTextColor}})]})}function O(e){return(0,I.jsxs)("div",{className:"timeButton",style:(0,S.A)({},e.style),children:[(0,I.jsx)(s.A,{Icon:e.icon,ariaLabel:"timeButton_icon",style:{height:"20px",width:"18px",marginBottom:"-5px"}}),(0,I.jsx)("small",{className:"timeButton_text",children:"".concat(e.time," min")})]})}const D=["title","titleId"];function M(){return M=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},M.apply(null,arguments)}function E(e,n){let{title:l,titleId:t}=e,i=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,D);return g.createElement("svg",M({width:8,height:8,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t},i),l?g.createElement("title",{id:t}
1,l):null,L||(L=g.createElement("g",{clipPath:"url(#clip0_1374_9761)"},g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.88966 1.5867C1.8986 1.51098 1.92509 1.43839 1.96703 1.37472C2.00897 1.31105 2.0652 1.25805 2.13124 1.21995C2.19728 1.18185 2.27131 1.15969 2.34742 1.15525C2.42354 1.15081 2.49964 1.1642 2.56966 1.19436C2.92366 1.3457 3.71699 1.70536 4.72366 2.28636C5.73066 2.8677 6.43899 3.37536 6.74666 3.6057C7.00933 3.8027 7.00999 4.19336 6.74699 4.39103C6.44233 4.62003 5.74266 5.12103 4.72366 5.7097C3.70366 6.29836 2.91966 6.6537 2.56899 6.80303C2.26699 6.93203 1.92899 6.73636 1.88966 6.4107C1.84366 6.03003 1.75766 5.1657 1.75766 3.99836C1.75766 2.8317 1.84333 1.9677 1.88966 1.5867Z",fill:"#929CA3"}))),A||(A=g.createElement("defs",null,g.createElement("clipPath",{id:"clip0_1374_9761"},g.createElement("rect",{width:8,height:8,fill:"white"})))))}const T=g.forwardRef(E);l.p;var R=l(36019);function F(e){let{steps:n,total:l}=e;return(0,I.jsx)("div",{className:"steps",children:n.map((e,t)=>{const i=Math.ceil(e.duration/60),a=1===(null===n||void 0===n?void 0:n.length)?100:Math.ceil(100*i/l);return(0,I.jsxs)(g.Fragment,{children:[!!t&&(0,I.jsx)(s.A,{Icon:T,ariaLabel:"separator",className:"separator",style:{width:8,height:8,cursor:"auto"}}),"WALK"===e.mode?(0,I.jsx)(O,{time:i,icon:b,style:{width:"".concat(a,"%"),cursor:"auto"}}):(0,I.jsx)(P,{text:e.routeShortName,icon:R.h,routeColor:e.routeColor,routeTextColor:e.routeTextColor,style:{width:a+"%",cursor:"auto"}})]},e+i+"btn"+t)})})}var B=l(7802),Z=l(14878);function H(e){let{horario:n,total:l,warning:t}=e;return(0,I.jsxs)("div",{className:"timeResultPlanner",children:[(0,I.jsx)("h4",{className:"schedule",children:n}),(0,I.jsxs)("div",{className:"duration-warning",children:[(0,I.jsx)("h4",{className:"total",children:Z.A.getFormatedTime(l)}),t?(0,I.jsx)(s.A,{Icon:B.h,ariaLabel:"warning",className:"warning"}):""]})]})}var z=l(43589);function W(e){const n=(0,m.DP)(),l=(0,z.WD)(),{faster:t,selected:i,height:a,caminarMenos:o,menosTransbordos:r,horario:d,alert:c,steps:u,total:v,onClick:g,onClickNav:x,order:f,index:j}=e;function C(e){return 0!==j||f===e}return(0,I.jsx)("div",{className:"item-results-planner"+(i?" --selected":""),onClick:g,children:(0,I.jsx)(p.A,{height:a||"max-content",styles:{marginBottom:0},style:{background:n.colors.secondaryBackground,padding:"12px 22px"},children:(0,I.jsxs)("div",{className:"item-results-planner-box",children:[t&&C("duration")?(0,I.jsxs)("span",{className:"faster",children:[(0,I.jsx)(s.A,{Icon:h.h,ariaLabel:"icon-bus",className:"faster-img",style:{marginRight:5}}),(0,I.jsx)("p",{className:"faster-text",children:l("lb_planner_preferencias_ruta_mas_rapida")})]}):o&&C("walkTime")?(0,I.jsxs)("span",{className:"faster",children:[(0,I.jsx)(s.A,{Icon:b,ariaLabel:"walk",style:{marginRight:5}}),(0,I.jsx)("p",{className:"faster-text",children:l("lb_planner_preferencias_caminar")})]}):r?(0,I.jsxs)("span",{className:"faster",children:[(0,I.jsx)(s.A,{Icon:N,ariaLabel:"transbordo",style:{marginRight:5}}),(0,I.jsx)("p",{className:"faster-text",children:l("lb_planner_preferencias_menos_trans")})]}):void 0,(0,I.jsx)(H,{horario:d,total:v,warning:c}),(0,I.jsx)(F,{steps:u,total:v}),!e.showSelectedDetail&&(0,I.jsx)("div",{className:"item-results-planner-detail",children:i&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(s.A,{Icon:k.h,ariaLabel:"add",onClick:x}),(0,I.jsx)("span",{onClick:x,children:l("lb_mas_detalles")})]})})]})})})}function q(e){let n=(0,S.A)({height:e.height},e.styles);return e.wide&&(n=(0,S.A)((0,S.A)({},n),{},{borderRadius:"16px"})),(0,I.jsx)("div",{className:"cardBody",style:n,children:e.children})}var Y,G=l(61082),V=l(905),$=l(61726);const K=["title","titleId"];function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},Q.apply(null,arguments)}function U(e,n){let{title:l,titleId:t}=e,i=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,K);return g.createElement("svg",Q({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:n,"aria-labelledby":t},i),l?g.createElement("title",{id:t},l):null,Y||(Y=g.createElement("g",{fill:"none",fillRule:"evenodd"},g.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"}),g.createElement("path",{fill:"#6D6E6FFF",d:"M10.5 2a8.5 8.5 0 1 0 5.262 15.176l3.652 3.652a1 1 0 0 0 1.414-1.414l-3.652-3.652A8.5 8.5 0 0 0 10.5 2M6 10.5a1 1 0 0 1 1-1h2.5V7a1 1 0 0 1 2 0v2.5H14a1 1 0 1 1 0 2h-2.5V14a1 1 0 1 1-2 0v-2.5H7a1 1 0 0 1-1-1"}))))}const X=g.forwardRef(U);l.p;
1var J=l(20370),ee=l(84790),ne=l(29196),le=l(62642),te=l(10391),ie=l(1917),ae=l(19584),oe=l(54239),se=l(98767),re=l(46390);function de(e){const n=(0,v.wA)(),[l,t]=(0,g.useState)(),[i,a]=(0,g.useState)({}),{isAlert:o}=(0,ee.Z)(),r=(0,v.d4)(oe.L7),d=(0,v.d4)(te.aH),c=(0,v.d4)(ne.kD),u=(0,v.d4)(le.hf),p=(0,v.d4)(ae.vW),m=(0,z.WD)(),{plan:h}=e;(0,g.useEffect)(()=>{(async()=>{t(await x())})()},[h,i]);const x=async()=>{var e,l,t,v,g,x,f,j,b,C,_,y,w,L,A,k,S;let P=[],O=!1;for(let He in h.legs){var D,M,E,T,R,F,H,z,W,q,Y,G,K,Q,U,ee,ne,le,ae,oe,de,ce,ue,ve,pe,me,he,ge,xe,fe,je,be,Ce,_e,ye,we,Ne,Le,Ae,ke,Se,Ie,Pe,Oe,De,Me,Ee,Te,Re,Fe,Be,Ze;if(O=(null===(D=h.legs[He])||void 0===D?void 0:D.mode)===(null===(M=h.legs[parseInt(He)-1])||void 0===M?void 0:M.mode),0===parseInt(He))P.push((0,I.jsxs)("div",{className:"row",children:[(0,I.jsxs)("div",{className:"start-time",children:[(0,I.jsx)("p",{style:{margin:"0px"},children:m("lb_planner_salir_en")}),(0,I.jsxs)("b",{children:[new Date((null===(T=h.legs[He])||void 0===T?void 0:T.startTime)-Date.now()).getMinutes().toString()," min"]})]}),(0,I.jsxs)("div",{className:"init_line_icon",children:[(0,I.jsx)("div",{children:(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(R=d.location)&&void 0!==R&&R.position&&"my_location"===(null===(F=r[0])||void 0===F?void 0:F.id)?"Mi Localizaci\xf3n":"Origen",Icon:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(H=d.location)&&void 0!==H&&H.position&&"my_location"===(null===(z=r[0])||void 0===z?void 0:z.id)?re.R.drawables.general.Ic_your_ubi:re.R.drawables.general.Ic_Origin})}),"WALK"===(null===(W=h.legs[He])||void 0===W?void 0:W.mode)?(0,I.jsx)("div",{className:"walk-line",style:{marginBottom:"2px"}}):(0,I.jsx)("div",{className:"line-section",children:(0,I.jsx)("div",{className:"transport-line",style:{backgroundColor:"#".concat(null===(q=h.legs[He])||void 0===q?void 0:q.routeColor)}})})]}),(0,I.jsx)("div",{className:"start-direction",children:(0,I.jsxs)("div",{style:{paddingTop:"2px",display:"flex",flexDirection:"row",alignItems:"center"},children:["WALK"!==(null===(Y=h.legs[He])||void 0===Y?void 0:Y.mode)?(0,I.jsx)(se.A,{text:h.legs[He].from.stopCode,styles:{height:"28px",marginRight:"5px"},transportMode:"1"}):"",(0,I.jsx)("div",{children:null!==(G=r[0].name.toLowerCase())&&void 0!==G?G:null===(K=h.legs[He])||void 0===K||null===(Q=K.from)||void 0===Q?void 0:Q.name.toLowerCase()}),o("stop",null===(U=h.legs[He].from)||void 0===U?void 0:U.name)&&(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(ee=d.location)&&void 0!==ee&&ee.position&&"my_location"===(null===(ne=r[0])||void 0===ne?void 0:ne.id)?"Mi Localizaci\xf3n":"Origen",Icon:B.h})]})})]},"1"+h));if(O)P.push((0,I.jsxs)("div",{className:"row",children:[(0,I.jsx)("div",{className:"start-time"}),(0,I.jsxs)("div",{className:"line-section",children:[(0,I.jsx)("div",{className:"walk-line"}),(0,I.jsx)("div",{className:"trans-circle",style:{border:"solid 4px #000"}}),(0,I.jsx)("div",{className:"walk-line"})]}),(0,I.jsxs)("div",{className:"trans-section",children:[(0,I.jsx)("div",{className:"divider"}),(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,I.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,I.jsx)(s.A,{Icon:N,style:{marginRight:"5px",height:"18px",width:"18px",marginBottom:"3px"}}),(0,I.jsx)("span",{style:{alignSelf:"center",marginBottom:"3px"},children:m("lb_planner_transbordo")}),(0,I.jsx)("div",{className:"point"}),(0,I.jsx)("div",{style:{marginBottom:"3px"},children:Math.round(((null===(le=h.legs[He])||void 0===le||null===(ae=le.to)||void 0===ae?void 0:ae.arrival)-(null===(oe=h.legs[He])||void 0===oe||null===(de=oe.from)||void 0===de?void 0:de.departure))/6e4)+" "+m("lb_planner_minutos")})]}),(0,I.jsx)(s.A,{className:"walk-section-zoom-icon",Icon:X,style:{marginRight:"5px",height:"22px",width:"22px",cursor:"pointer"},onClick:()=>{var e,l,t,i;n((0,te.jQ)({coords:{lat:null===(e=h.legs[He])||void 0===e||null===(l=e.from)||void 0===l?void 0:l.lat,lng:null===(t=h.legs[He])||void 0===t||null===(i=t.from)||void 0===i?void 0:i.lon},zoom:18,duration:.8})),(0,ie.F1)()}})]}),(0,I.jsx)("div",{className:"divider"})]})]},"trans"+He));if("WALK"===(null===(E=h.legs[He])||void 0===E?void 0:E.mode))P.push((0,I.jsxs)("div",{className:"row",children:[(0,I.jsx)("div",{className:"start-time"}),(0,I.jsx)("div",{className:"line-section",children:(0,I.jsx)("div",{className:"walk-line"})}),(0,I.jsx)("div",{className:"walk-section",children:(0,I.jsx)("div",{className:"row",style:{alignItems:"center"},children:(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,I.jsxs)("div",{className:"intermediateWalk",children:[(0,I.jsx)(s.A,{className:"walk-icon",ariaLabel:"Caminar",Icon:J.h}),(0,I.jsxs)("div",{children:[Number(null===(ce=h.legs[He])||void 0===ce?void 0:ce.distance).toFixed(0)," m"]}),(0,I.jsx)("div",{className:"point"}),(0,I.jsx)("div",{children:Math.ceil((null===(ue=h.legs[He])||void 0===ue?void 0:ue.duration)/60)+" "+m("lb_planner_minutos")})]}),(0,I.jsx)(s.A,{className:"walk-section-zoom-icon",Icon:X,onClick:()=>{var e,l,t,i;n((0,te.jQ)({coords:{lat:null===(e=h.legs[He])||void 0===e||null===(l=e.from)||void 0===l?void 0:l.lat,lng:null===(t=h.legs[He])||void 0===t||null===(i=t.from)||void 0===i?void 0:i.lon},zoom:18,duration:.8})),(0,ie.F1)()}})]})})})]},"2"+He));
1else P.push((0,I.jsxs)("div",{className:"row",children:[(0,I.jsx)("div",{className:"start-time",children:(0,I.jsxs)("div",{className:"btn-start-time",children:[(0,I.jsx)($.A,{code:null===(ve=h.legs[He])||void 0===ve?void 0:ve.routeShortName,routeColor:null===(pe=h.legs[He])||void 0===pe?void 0:pe.routeColor,warning:o("line",null===(me=c.find(e=>{var n;return e.code===(null===(n=h.legs[He])||void 0===n?void 0:n.routeShortName)}))||void 0===me?void 0:me.id)}),(0,I.jsx)("div",{className:"time",children:Z.A.getTime(null===(he=h.legs[He])||void 0===he?void 0:he.startTime)})]})}),(0,I.jsxs)("div",{className:"line-section",children:[0!==parseInt(He)?(0,I.jsx)("div",{className:"trans-circle",style:{border:"solid 4px #".concat(null===(ge=h.legs[He])||void 0===ge?void 0:ge.routeColor)}}):"",(0,I.jsx)("div",{className:"transport-line",style:{backgroundColor:"#".concat(null===(xe=h.legs[He])||void 0===xe?void 0:xe.routeColor)}}),(0,I.jsx)("div",{className:"trans-circle",style:{border:"solid 4px #".concat(null===(fe=h.legs[He])||void 0===fe?void 0:fe.routeColor),marginBottom:"2px"}})]}),(0,I.jsxs)("div",{className:"transport-section",children:[(0,I.jsx)("div",{className:"transport-stop-code --desde",children:0!==parseInt(He)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(se.A,{text:h.legs[He].from.stopCode,styles:{height:"28px",cursor:"auto"},transportMode:"1",onClick:()=>{h.legs[He].from}}),parseInt(He)?(0,I.jsx)("div",{className:"transport-direction",children:null===(je=h.legs[He])||void 0===je||null===(be=je.from)||void 0===be||null===(Ce=be.name)||void 0===Ce?void 0:Ce.toLowerCase()}):null,o("stop",null===(_e=u.find(e=>{var n;return e.stopCode===(null===(n=h.legs[He])||void 0===n?void 0:n.from.stopCode)}))||void 0===_e?void 0:_e.id)&&(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(ye=d.location)&&void 0!==ye&&ye.position&&"my_location"===(null===(we=r[0])||void 0===we?void 0:we.id)?"Mi Localizaci\xf3n":"Origen",Icon:B.h})]}):""}),null!==(Ne=h.legs[He])&&void 0!==Ne&&null!==(Le=Ne.intermediateStops)&&void 0!==Le&&Le.length?(0,I.jsx)("div",{children:(0,I.jsxs)("div",{style:{margin:"15px 0px",width:"100%"},children:[(0,I.jsx)("div",{className:"headsignParadas",children:null!==(Ae=h.legs[He])&&void 0!==Ae&&Ae.headsign?"\xbb ".concat(null===(ke=h.legs[He])||void 0===ke?void 0:ke.headsign):""}),(0,I.jsxs)("div",{className:"row",style:{cursor:"pointer",marginLeft:5,minWidth:"120px"},onClick:e=>{var n;a({[He]:{value:!(null!==(n=i[He])&&void 0!==n&&n.value)}})},children:[(0,I.jsx)(s.A,{className:"arrow-intermediate",Icon:null!==(Se=i[He])&&void 0!==Se&&Se.value?re.R.drawables.general.Ic_chevron_up:re.R.drawables.general.Ic_chevron_down,color:re.R.colors.neutral.gray_700}),(0,I.jsx)("div",{className:"intermediate",children:"".concat(null===(Ie=h.legs[He])||void 0===Ie||null===(Pe=Ie.intermediateStops)||void 0===Pe?void 0:Pe.length," ").concat(m("lb_paradas"))}),(0,I.jsx)("div",{className:"point-stop-accordion"})]}),(0,I.jsx)("div",{children:(0,I.jsx)(V.Collapse,{isOpened:null===(Oe=i[He])||void 0===Oe?void 0:Oe.value,children:null===(De=h.legs[He])||void 0===De||null===(Me=De.intermediateStops)||void 0===Me?void 0:Me.map(function(e,n){var l,t,i;return(0,I.jsx)("div",{style:{display:"flex"},children:(0,I.jsxs)("div",{className:"intermediate",style:{margin:"10px 15px",display:"flex",width:"fit-content"},children:[(0,I.jsx)("span",{style:{display:"flex",width:"auto"},children:null===e||void 0===e?void 0:e.name.toLowerCase()}),o("stop",null===(l=u.find(n=>String(n.stopCode)===e.stopCode))||void 0===l?void 0:l.id)&&(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(t=d.location)&&void 0!==t&&t.position&&"my_location"===(null===(i=r[0])||void 0===i?void 0:i.id)?"Mi Localizaci\xf3n":"Origen",Icon:B.h}),(0,I.jsx)("div",{className:"point-stop"})]},n)},e)})})})]})}):(0,I.jsx)("div",{style:{height:"77px"}}),parseInt(He)!==h.legs.length-1?(0,I.jsxs)("div",{className:"transport-stop-code --hasta",children:[(0,I.jsx)(se.A,{text:h.legs[He].to.stopCode,styles:{height:"28px",cursor:"auto"},transportMode:"1",onClick:()=>{h.legs[He].to.stopCode}}),(0,I.jsx)("span",{style:{marginLeft:"5px"},className:"intermediateStop",children:null===(Ee=h.legs[He])||void 0===Ee||null===(Te=Ee.to)||void 0===Te||null===(Re=Te.name)||void 0===Re?void 0:Re.toLowerCase()}),o("stop",null===(Fe=u.find(e=>e.stopCode===h.legs[He].to.stopCode))||void 0===Fe?void 0:Fe.id)&&(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(Be=d.location)&&void 0!==Be&&Be.position&&"my_location"===(null===(Ze=r[0])||void 0===Ze?void 0:Ze.id)?"Mi Localizaci\xf3n":"Origen",Icon:B.h})]}):null]})]},"3"+He))}return P.push((0,I.jsxs)("div",{className:"row",children:[(0,I.jsx)("div",{className:"start-time",children:Z.A.getTime(null===(e=h.legs[(null===(l=h.legs)||void 0===l?void 0:l.length)-1])||void 0===e?void 0:e.endTime)}),(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(t=d.location)&&void 0!==t&&t.position&&"my_location"===(null===(v=r[1])||void 0===v?void 0:v.id)?"Mi localizaci\xf3n":"Destino",Icon:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(g=d.location)&&void 0!==g&&g.position&&"my_location"===(null===(x=r[1])||void 0===x?void 0:x.id)?re.R.drawables.general.Ic_your_ubi:re.R.drawables.general.Ic_Destination}),(0,I.jsx)("div",{className:"start-direction",style:{textTransform:"capitalize"},children:(0,I.jsxs)("div",{style:{paddingTop:"2px",display:"flex",flexDirection:"row",alignItems:"flex-start"},children:["WALK"!==(null===(f=h.legs[h.legs.length-1])||void 0===f?void 0:f.mode)?(0,I.jsx)(se.A,{text:h.legs[h.legs.length-1].to.stopCode,styles:{height:"28px",marginRight:"5px"},transportMode:"1"}):""," ",(0,I.jsx)("div",{style:{display:"inline-block"},children:null!==(j=null===(b=r[1])||void 0===b||null===(C=b.name)||void 0===C?void 0:C.toLowerCase())&&void 0!==j?j:null===(_=h.legs[(null===(L=h.legs)||void 0===L?void 0:L.length)-1])||void 0===_||null===(y=_.to)||void 0===y||null===(w=y.name)||void 0===w?void 0:w.toLowerCase()}),o("stop",null===(A=u.find(e=>e.stopCode===h.legs[h.legs.length-1].to.stopCode))||void 0===A?void 0:A.id)&&(0,I.jsx)(s.A,{className:"start-icon",ariaLabel:p.PermissionGeolocation&&null!==d&&void 0!==d&&null!==(k=d.location)&&void 0!==k&&k.position&&"my_location"===(null===(S=r[0])||void 0===S?void 0:S.id)?"Mi Localizaci\xf3n":"Origen",Icon:B.h})]})})]},"last")),P};return(0,I.jsx)("div",{className:"route-detail-synoptic",children:l})}var ce=l(16154);function ue(e){const{isAlert:n}=(0,ee.Z)(),l=(0,z.WD)();let t=new Date(e.selected.startTime),i=new Date(e.selected.endTime),a=Z.A.getTime(t),o=Z.A.getTime(i);const s=e.selected.legs,r=a+"-"+o,d=Math.round(e.selected.duration/60);let c=!1;const{logEventAnalytics:u}=(0,ce.A)();if(s)for(let v=0;v<s.length;v++){let e=s[v];if("BUS"===e.mode){if(n("stop",Number(e.from.stopCode))){c=!0;break}if(n("stop",Number(e.to.stopCode))){c=!0;break}for(let l=0;l<e.intermediateStops.length;l++){let t=e.intermediateStops[l];if(n("stop",Number(t.stopCode))){c=!0;break}}}if(c)break}return(0,g.useEffect)(()=>{u("planner_detail_route")},[]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(G.A,{title:l("lb_planner_donde_quieres_ir"),back:()=>e.onBack()}),(0,I.jsx)(W,{horario:r,total:d,steps:s,alert:c,showSelectedDetail:e.showSelectedDetail,onClick:()=>null}),(0,I.jsx)(q,{styles:{padding:"5px 0px"},children:(0,I.jsx)(de,{plan:e.selected})})]})}var ve,pe=l(98397);const me=["title","titleId"];function he(){return he=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},he.apply(null,arguments)}function ge(e,n){let{title:l,titleId:t}=e,i=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,me);return g.createElement("svg",he({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:n,"aria-labelledby":t},i),l?g.createElement("title",{id:t},l):null,ve||(ve=g.createElement("path",{fill:"#4B5858FF",d:"M4 4a1 1 0 0 0 0 2h16a1 1 0 1 0 0-2H4Zm-1 8a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1Zm0 7a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1Zm7-5
1a5 5 0 1 1 9.172 2.757l1.535 1.536a1 1 0 0 1-1.414 1.414l-1.536-1.535A5 5 0 0 1 10 14Zm5-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})))}const xe=g.forwardRef(ge);l.p;var fe=l(44363);let je=0,be=0,Ce=0,_e=0,ye=0,we=0;function Ne(e){var n,l,t;const i=(0,v.wA)(),a=(0,v.d4)(pe.jY),[o,r]=(0,g.useState)(null===(n=a.plannerResult)||void 0===n||null===(l=n.plan)||void 0===l?void 0:l.itineraries),[d,c]=(0,g.useState)(!1),[u,p]=(0,g.useState)(0),[m,h]=(0,g.useState)(0),{isAlert:x}=(0,ee.Z)(),f=(0,z.WD)();(0,g.useEffect)(()=>{var e,n,l,t,i,o,s,d,c,u,v,p,m;je=(null===(e=a.plannerResult)||void 0===e||null===(n=e.plan)||void 0===n||null===(l=n.itineraries[0])||void 0===l?void 0:l.duration)||0,be=(null===(t=a.plannerResult)||void 0===t||null===(i=t.plan)||void 0===i||null===(o=i.itineraries[0])||void 0===o?void 0:o.walkTime)||0,Ce=(null===(s=a.plannerResult)||void 0===s||null===(d=s.plan)||void 0===d||null===(c=d.itineraries[0])||void 0===c?void 0:c.transfers)||0,null===(u=a.plannerResult)||void 0===u||null===(v=u.plan)||void 0===v||v.itineraries.forEach((e,n)=>{e.duration<=je&&(0===n&&e.duration===je||0!==n&&e.duration<je)&&(je=e.duration,_e=n),e.walkTime<=be&&(0===n&&e.walkTime===be||0!==n&&e.walkTime<be)&&(be=e.walkTime,ye=n),e.transfers<=Ce&&n<we&&(0===n&&e.transfers===Ce||0!==n&&e.transfers<Ce)&&(Ce=e.transfers,we=n)}),r(null===(p=a.plannerResult)||void 0===p||null===(m=p.plan)||void 0===m?void 0:m.itineraries)},[null===(t=a.plannerResult)||void 0===t?void 0:t.plan,a.order]);(0,g.useEffect)(()=>{p(0)},[o]);return(()=>{try{return(0,I.jsx)(I.Fragment,{children:d?(0,I.jsx)(ue,{selected:m,showSelectedDetail:!0,onBack:()=>(i(pe.L6.actions.updateSelectedPlan(u)),p(u),c(!d),void(null===e||void 0===e||e.onClick()))}):(0,I.jsx)("div",{className:"containerItemResults",children:o.length?o.map((n,l)=>{let t=new Date(n.startTime),o=new Date(n.endTime);const s=Z.A.getTime(t)+" - "+Z.A.getTime(o),r=Math.round(n.duration/60);let v=!1;if(n.legs)for(let e=0;e<n.legs.length;e++){let l=n.legs[e];if("BUS"===l.mode){if(x("stop",Number(l.from.stopCode))){v=!0;break}if(x("stop",Number(l.to.stopCode))){v=!0;break}for(let e=0;e<l.intermediateStops.length;e++){let n=l.intermediateStops[e];if(x("stop",Number(n.stopCode))){v=!0;break}}}if(v)break}return(0,I.jsx)(W,{faster:l===Number(_e),caminarMenos:l===Number(ye),menosTransbordos:l===Number(we),horario:s,total:r,steps:n.legs,alert:v,selected:u===l,onClick:()=>function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(u!==n){var l,t,o,s,r;const e=null===(l=a.plannerResult)||void 0===l?void 0:l.plan,d={latitude:null===e||void 0===e||null===(t=e.from)||void 0===t?void 0:t.lat,longitude:null===e||void 0===e||null===(o=e.from)||void 0===o?void 0:o.lon},c={latitude:null===e||void 0===e||null===(s=e.to)||void 0===s?void 0:s.lat,longitude:null===e||void 0===e||null===(r=e.to)||void 0===r?void 0:r.lon};i((0,te.jQ)({coords:fe.A.getMidPoint(d,c),zoom:fe.A.getMidZoom(d,c)})),i(pe.L6.actions.updateSelectedPlan(n)),p(n)}}(n,l),onClickNav:()=>function(n){p(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),h(n),c(!d),null===e||void 0===e||e.onClick(),window.matchMedia("(max-width: 768px)").matches&&(0,ie.F1)()}(n,l),order:a.order,index:l},"imreplan_"+l)}):(0,I.jsxs)("div",{className:"explore_noResults",style:{marginTop:"25px",display:"flex",gap:"10px"},children:[(0,I.jsx)(s.A,{Icon:xe}),(0,I.jsx)("span",{children:f("lb_No_encontado")})]})})})}catch(n){return(0,I.jsx)("div",{className:"wrong-message"})}})()}var Le,Ae;const ke=["title","titleId"];function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var t in l)({}).hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},Se.apply(null,arguments)}function Ie(e,n){let{title:l,titleId:t}=e,i=function(e,n){if(null==e)return{};var l,t,i=function(e,n){if(null==e)return{};var l={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;l[t]=e[t]}return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)l=a[t],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,ke);return g.createElement("svg",Se({width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t},i),l?g.createElement("title",{id:t}
1,l):null,Le||(Le=g.createElement("g",{clipPath:"url(#clip0_732_15161)"},g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.7068 7.2936C10.894 7.4811 10.9992 7.73527 10.9992 8.00027C10.9992 8.26527 10.894 8.51943 10.7068 8.70693L6.93609 12.4789C6.74849 12.6664 6.49409 12.7717 6.22885 12.7717C5.96361 12.7716 5.70926 12.6662 5.52176 12.4786C5.33425 12.291 5.22894 12.0366 5.229 11.7714C5.22907 11.5061 5.33449 11.2518 5.52209 11.0643L8.58609 8.00027L5.52209 4.93627C5.33984 4.74775 5.23892 4.4952 5.24108 4.233C5.24323 3.9708 5.34828 3.71993 5.5336 3.53444C5.71893 3.34894 5.96969 3.24365 6.23189 3.24125C6.49408 3.23885 6.74673 3.33953 6.93542 3.5216L10.7074 7.29293L10.7068 7.2936Z",fill:"#314450"}))),Ae||(Ae=g.createElement("defs",null,g.createElement("clipPath",{id:"clip0_732_15161"},g.createElement("rect",{width:16,height:16,fill:"white"})))))}const Pe=g.forwardRef(Ie);l.p;function Oe(e){let{onClick:n}=e;const l=(0,v.d4)(pe.v$),t=(0,v.d4)(pe.rD),i=(0,v.d4)(pe.uH),a=(0,v.d4)(pe.Yz),o=(0,z.WD)(),r=(()=>{let e=0;return"duration"!==l&&(e+=1),t&&(e+=1),a&&(e+=1),i.length>0&&(e+=i.length),e})();return(0,I.jsxs)("div",{className:"preferencesPlannerButton ".concat(r>0?"preferencesPlannerButton-selected":""),onClick:n,children:[(0,I.jsxs)("span",{children:[o("lb_planner_preferencias")," ",r?"(".concat(r,")"):""]}),(0,I.jsx)("span",{className:"preferencesPlanner_icon",children:(0,I.jsx)(s.A,{ariaLabel:"icono-busqueda",Icon:Pe,className:"searchInput_iconSearch"})})]})}var De=l(37347),Me=l(76593);const Ee=[{value:"duration",label:"lb_planner_preferencias_mas_rapida"},{value:"transfers",label:"lb_planner_preferencias_menos_trans"},{value:"walkTime",label:"lb_planner_preferencias_caminar"}],Te=[{value:null,label:"lb_planner_no_especificar"},{value:5,label:"lb_planner_minutos"},{value:10,label:"lb_planner_minutos"},{value:15,label:"lb_planner_minutos"}];function Re(e){let{handleChanges:n}=e;const[l,t]=(0,g.useState)(""),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(!1),r=(0,v.d4)(pe.v$),d=(0,v.d4)(pe.rD),c=(0,v.d4)(pe.Yz),u=(0,z.WD)();(0,g.useEffect)(()=>{r&&t(r),c&&a(c),d&&s(d)},[]);return(0,I.jsxs)("div",{className:"preferencesPlannerPanel",children:[(0,I.jsx)(G.A,{title:u("lb_planner_preferencias"),back:()=>{n({order:l,walk:i,accessibility:o})}}),(0,I.jsxs)("div",{className:"preferencesPlannerPanel_main_container",children:[(0,I.jsx)(q,{styles:{overflow:"visible"},children:(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{className:"preferencesPlannerPanel_tituloBloque",children:u("lb_planner_preferencias_ordenar")}),(0,I.jsx)("div",{className:"preferencesPlannerPanel_containerBloque",children:Ee.map((e,n)=>(0,I.jsx)(Me.A,{name:"order",value:e.value,etiqueta:u(e.label),checked:e.value===l,onChange:e=>t(e.target.value)},e.value))})]})}),(0,I.jsx)(q,{styles:{overflow:"visible"},children:(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{className:"preferencesPlannerPanel_tituloBloque",children:u("lb_planner_preferencias_caminar_max")}),(0,I.jsx)("div",{className:"preferencesPlannerPanel_containerBloque",children:Te.map((e,n)=>(0,I.jsx)(Me.A,{name:"walk",value:e.value,etiqueta:"".concat(e.value?e.value:""," ").concat(u(e.label)),checked:Number(e.value)===Number(i),onChange:e=>a(e.target.value)},e.value))})]})}),(0,I.jsx)(q,{styles:{overflow:"visible"},children:(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{className:"preferencesPlannerPanel_tituloBloque",children:u("lb_planner_preferencias_parametros")}),(0,I.jsx)("div",{className:"preferencesPlannerPanel_containerBloque",children:(0,I.jsx)(De.A,{name:"weelchair",value:"weelchair",etiqueta:u("lb_planner_preferencias_accesibilidad_sillas"),checked:o,onChange:()=>s(!o)})})]})})]})]})}var Fe=l(30621),Be=l(42458),Ze=l(40210),He=l(59188),ze=l(71776),We=l(15763),qe=l(44108);function Ye(e){const[n,l]=(0,g.useState)(e.value);return(0,g.useEffect)(()=>
1{l(e.value)},[e.value]),(0,I.jsx)("input",{type:"time",className:"wheelInput",name:"time","aria-label":"time",style:e.style,onChange:n=>{l(n.target.value),e.onChange(n.target.value)},value:n})}function Ge(e){let{onSelect:n}=e;const{getSelectedDayPlannerMessage:l}=function(){const e=(0,z.WD)();return(0,z.ok)(),{getSelectedDayPlannerMessage:function(n){let l=n.getDay(),t=e("weekDaysAbrev")[l],i=n.getMonth()+1,a=e("monthsAbrev")[i].toLowerCase();return"".concat(t,", ").concat(n.getDate()," ").concat(a)},timeOfStopsFormatted:function(n,l){let t=n.substring(0,5);return"".concat(e("timer_at")," ").concat(t)},parseDateFormatText:function(n){let l=n.getDay(),t=e("weekDaysAbrev")[l],i=n.getMonth(),a=e("monthsAbrev")[i+1].toLowerCase();return"".concat(t,", ").concat(n.getDate()," ").concat(a,", ").concat(n.getHours()<10?"0"+n.getHours():n.getHours(),":").concat(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())},getSinceTimeFormat:function(n){let l=null===n||void 0===n?void 0:n.substring(0,10),t=null===n||void 0===n?void 0:n.substring(11),i=null===l||void 0===l?void 0:l.split("/"),a=null===t||void 0===t?void 0:t.split(":"),o=new Date(parseInt(i[2]),parseInt(i[1])-1,parseInt(i[0]),parseInt(a[0]),parseInt(a[1])),s=o.getHours(),r=s<10?"0"+s:""+s,d=o.getMinutes(),c=d<10?"0"+d:""+d;return"".concat(e("time_since")," ").concat(o.getDate(),"/").concat(o.getMonth()+1,"/").concat(o.getFullYear(),", ").concat(r,":").concat(c)},getUntilTimeFormat:function(n){let l=null===n||void 0===n?void 0:n.substring(0,10),t=null===n||void 0===n?void 0:n.substring(11),i=null===l||void 0===l?void 0:l.split("/"),a=null===t||void 0===t?void 0:t.split(":"),o=new Date(parseInt(i[2]),parseInt(i[1])-1,parseInt(i[0]),parseInt(a[0]),parseInt(a[1])),s=parseInt(a[0]),r=s<10?"0"+s:""+s,d=parseInt(a[1]),c=d<10?"0"+d:""+d;return"".concat(e("time_until"),": ").concat(o.getDate(),"/").concat(o.getMonth()+1,"/").concat(o.getFullYear(),", ").concat(r,":").concat(c," (").concat(e("time_aprox"),")")},parseEventsDate:function(n){let l=new Date(n);return"".concat(e("weekDays")[l.getDay()]," ").concat(l.getDate()," ").concat(e("months")[l.getMonth()+1]," ").concat(l.getFullYear())},getTimeFormatted:function(e){let n=new Date(e);return"".concat(n.getHours()<10?"0"+n.getHours():n.getHours(),":").concat(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())},getEventTimeFormatted:function(e){let n=e.split(":");return"".concat(n[0],":").concat(n[1])}}}(),t=new Date,[i,a]=(0,g.useState)(!0),[o,r]=(0,g.useState)(Z.A.getFormattedDateToPicker(new Date)+" a las "+String(t.getHours()).padStart(2,"0")+":"+String(t.getMinutes()).padStart(2,"0")),[d,c]=(0,g.useState)(new Date),[u,v]=(0,g.useState)(String(t.getHours()).padStart(2,"0")),[p,m]=(0,g.useState)(String(t.getMinutes()).padStart(2,"0"));return(0,I.jsxs)("div",{className:"calendarPlanner",children:[(0,I.jsx)("div",{className:"calendarPlanner_row",children:(0,I.jsxs)("div",{className:"calendarPlanner_dateText",onClick:()=>a(!i),children:[(0,I.jsx)("span",{children:o}),(0,I.jsx)(s.A,{ariaLabel:"icono-desplegable",Icon:i?We.h:ze.h,className:"searchInput_iconSearch"})]})}),i?(0,I.jsxs)("div",{className:"calendarPlanner_calendarCoint",children:[(0,I.jsxs)("div",{className:"calendarPlanner_row",style:{paddingTop:24,paddingLeft:16,paddingRight:16},children:[(0,I.jsx)(Ye,{value:"".concat(u,":").concat(p),onChange:e=>{let n=e.split(":");var l,t;l=n[0],v(l),t=n[1],m(t)}}),(0,I.jsx)(qe.A,{selectedDate:d,changeDate:e=>{c(e)},hasInterval:!0})]}),(0,I.jsxs)("div",{className:"calendarPlanner_pickerContButtons",children:[(0,I.jsx)(He.A,{title:"Cancelar",className:"btn-cancelar",style:{borderStyle:"solid",borderWidth:"1.5px",borderColor:"#489ACA",marginRight:"5px",color:"#4B5858"},width:"50%",onClick:()=>{a(!1)}}),(0,I.jsx)(He.A,{title:"Seleccionar",className:"btn-aceptar",style:{backgroundColor:"#489ACA",marginLeft:"5px",color:"#FFF"},width:"50%",onClick:()=>(r(l(d)+" a las "+u+":"+p+" horas"),n(d.getFullYear()+"/"+String(d.getMonth()+1).padStart(2,"0")+"/"+String(d.getDate()).padStart(2,"0"),u+":"+p+":00"),void a(!1))})]})]}):null]})}var Ve=l(84739),$e=l(44084),Ke=l(3778),Qe=l(26858),Ue=l(13472),Xe=l(1206),Je=l(76495),en=l(29862),nn=l(59109),ln=l(16739),tn=l(9286),an=l(64158),on=l(55484),sn=l(2237),rn=(l(25015),l(73216)),dn=l(75040),cn=l(52258),un=l(32869),vn=l(7792),pn=l(57630),mn=l(57783),hn=l(38687);function gn(){var e,n,l,t,p,m,h,x,f,j;
1const b=(0,v.wA)(),C=(0,rn.Zp)(),[_,y]=(0,g.useState)(),[w,N]=(0,g.useState)(!1),[L,A]=(0,g.useState)(Array),[k,S]=(0,g.useState)(!1),[P,O]=(0,g.useState)(1),[D,M]=(0,g.useState)(0),[E,T]=(0,g.useState)(!1),[R,F]=(0,g.useState)(!0),B=(0,g.useRef)(),H=(0,v.d4)(en.Y4),W=(0,v.d4)(pe.v$),q=(0,v.d4)(pe.Yz),Y=(0,v.d4)(pe.rD),V=(0,v.d4)(pe.uH),$=(0,v.d4)(pe.jY).plannerResult,[K,Q]=(0,g.useState)(""),[U,X]=(0,g.useState)({}),[J,ee]=(0,g.useState)(!1),[ne,ae]=(0,g.useState)(!1),se=(0,v.d4)(Xe.Tt),re=(0,v.d4)(le.hf),[de,ue]=(0,g.useState)(!1),[ve,me]=(0,g.useState)(!1),he=(0,rn.zy)(),ge=(0,ie.zS)(he),{onPlannerSegmentChange:xe}=(0,Ve.A)(),{isFavorite:fe,saveFavorites:je,deleteFavorites:be}=(0,$e.r)(),Ce=(0,z.WD)(),[_e,ye]=(0,dn.A)(),{logEventAnalytics:we}=(0,ce.A)(),{handleOpinionResource:Le}=(0,pn.A)(),[Ae,ke]=(0,g.useState)(null),Se=(0,v.d4)(hn.Vo).allSurveys;(0,g.useEffect)(()=>{we("planner_screen")},[]);const Ie=e=>{var n,l;(0===Number(He.current)?fn(e):bn(e),A([...L,e]),b((0,oe.hZ)({index:He.current,overwrite:!0,stop:e})),qe[0]||qe[1])||b((0,te.jQ)({coords:{lat:Number(null===(n=e.position)||void 0===n?void 0:n.lat),lng:Number(null===(l=e.position)||void 0===l?void 0:l.lng)},zoom:16}));Te()},Pe=e=>{Ie(e)},[De,Me,Ee,Te]=(0,Qe.A)(Ie,Pe,sn.qm.stops,30,P),[He,ze,We,qe,Ye,gn,xn,fn,jn,bn,Cn,_n]=(0,Ke.A)(De);function yn(){const e=qe[1];return"stop"===(null===e||void 0===e?void 0:e.type)?"stops":"poi"===(null===e||void 0===e?void 0:e.type)?"pois":"directions"}const wn=e=>{let n=new Date(e.toString()).getTime();b((0,en.aG)(Z.A.getDate(n)))},Nn=e=>{1===D?(b((0,en.WM)(!1)),b((0,en.uD)(!1)),b((0,en.NO)(!0)),b((0,en.JA)(e))):2===D&&(b((0,en.WM)(!1)),b((0,en.NO)(!1)),b((0,en.uD)(!0)),b((0,en.JA)(e)))},Ln=e=>{let n=!1;return fe("stops",null===e||void 0===e?void 0:e.id)&&(n=!0),fe("pois",null===e||void 0===e?void 0:e.id)&&(n=!0),fe("directions",null===e||void 0===e?void 0:e.id,null===e||void 0===e?void 0:e.position)&&(n=!0),n};(0,g.useEffect)(()=>(b((0,un.o8)(!1)),qe[1]&&Ln(qe[1]),b((0,te.vX)([])),window.scroll({top:0,left:100,behavior:"smooth"}),()=>{fn(null),bn(null),b((0,te.h9)([])),b((0,te.vX)([])),fn(null),bn(null),b((0,oe.YG)())}),[]),(0,g.useEffect)(()=>{qe[1]&&qe[0]?(C(_e(sn.k$.planner,"PLAN",qe)),(0,ie.TZ)("map")):qe[1]||qe[0]?xn?(C(_e(sn.k$.planner,"PLAN",[xn,null])),(0,ie.TZ)("map")):jn&&(C(_e(sn.k$.planner,"PLAN",[null,jn])),(0,ie.TZ)("map")):C(_e(sn.k$.planner,"PLAN",null))},[xn,jn]),(0,g.useEffect)(()=>{qe[1]&&Ln(qe[1]),b((0,te.vX)([])),xe(e=>we("resultPlan",{idPlanning:null===e||void 0===e?void 0:e.idPlanning}))},[xn,jn,H,W,q,Y,V]),(0,g.useEffect)(()=>{const e=ge.params;if(re.length){var n,l;if(qe[0])fn(qe[0]);else if(null!==ge&&void 0!==ge&&ge.params&&null!==ge&&void 0!==ge&&null!==(n=ge.params)&&void 0!==n&&n.length&&e[0]){const n=re.find(n=>n.stopCode===e[0]);n&&(e[2]?(b((0,oe.hZ)({index:0,overwrite:!0,stop:n})),fn(n)):(b((0,oe.hZ)({index:1,overwrite:!0,stop:n})),bn(n)))}if(qe[1])bn(qe[1]);else if(null!==ge&&void 0!==ge&&ge.params&&null!==ge&&void 0!==ge&&null!==(l=ge.params)&&void 0!==l&&l.length&&e[2]){const n=re.find(n=>n.stopCode===e[2]);n&&(b((0,oe.hZ)({index:1,overwrite:!0,stop:n})),bn(n))}qe[0]&&qe[1]?(F(!0),A([...L,qe[0],qe[1]]),(0,ie.F1)()):qe[0]?A([...L,qe[0]]):qe[1]&&A([...L,qe[1]])}},[re]),(0,g.useEffect)(()=>{qe[1]&&Ln(qe[1])},[se]);const An=[{txt:Ce("lb_planner_salir_ahora"),value:0,selected:!1},{txt:Ce("lb_planner_salir_a_las"),value:1,selected:!1},{txt:Ce("lb_planner_llegar_a_las"),value:2,selected:!1}];return(0,g.useEffect)(()=>{var e,n;null!==Me&&void 0!==Me&&null!==(e=Me.stopsLines)&&void 0!==e&&e.length&&(0,ie.TZ)("planner_containerForm"),null!==Me&&void 0!==Me&&null!==(n=Me.pois)&&void 0!==n&&n.length&&(0,ie.TZ)("planner_containerForm")},[null===Me||void 0===Me?void 0:Me.stopsLines,null===Me||void 0===Me?void 0:Me.pois]),(0,I.jsxs)(Ze.A,{styles:{borderRadius:"0px"},children:[ye(Ce("lb_seo_title_planificador"),Ce("lb_seo_description_planificador")),k&&(0,I.jsx)(Re,{handleChanges:e=>{S(!1),b((0,pe.iY)(e.order)),b((0,pe.Hv)(e.accessibility)),b((0,pe.QZ)(e.walk))}}),!k&&!w&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(G.A,{title:Ce("lb_planner_donde_quieres_ir"),extraIcon:R&&Se.find(e=>7===e.ambitoId&&e.isAllowedToAnswer)&&null!==$&&void 0!==$&&$.idPlanning?(0,I.jsx)(vn.A,{icon:Je.h,style:{backgroundColor:"white"},text:Ce("lb_opinion"),onClick:()=>Le(7,0,ke),selected:!1}):void 0}),(0,I.jsxs)("div",{className:"planner_containerForm",id:"planner_containerForm",children:[(0,I.jsxs)("div",{className:"input-box",id:"input-box-planner-from",children:[(0,I.jsx)(r.A,{placeholder:Ce("lb_planner_origen"),name:"origin-planner-screen",actionOnChange:e=>{ze(e,0),y(e)},iconLeft:ln.h,style:{marginRight:8},value:(0,cn.f)(null===(e=qe[0])||void 0===e?void 0:e.type,null===(n=qe[0])||void 0===n?void 0:n.name,null===(l=qe[0])||void 0===l?void 0:l.code),onClear:()=>{b((0,oe.hZ)({index:0,overwrite:!0,stop:null})),fn(null),Te(),O(1)},onFocus:()=>{Te(),gn(0),_n(0),ue(!0),F(!1),(0,ie.TZ)("input-box-planner-from")},onBlur:e=>{setTimeout(()=>{F(!0),gn(null),ue(!1)},250)}}),(0,I.jsx)(a.A,{onClick:()=>We(),disabled:!qe[0]&&!qe[1]})]}),(0,I.jsxs)("div",{className:"input-box",id:"input-box-planner-to",children:[(0,I.jsx)(r.A,{placeholder:Ce("lb_planner_destino"),name:"destination-planner-screen",actionOnChange:e=>{ze(e,1),y(e)},iconLeft:nn.h,style:{marginRight:8},value:(0,cn.f)(null===(t=qe[1])||void 0===t?void 0:t.type,null===(p=qe[1])||void 0===p?void 0:p.name,null===(m=qe[1])||void 0===m?void 0:m.code),onClear:()=>{b((0,oe.hZ)({index:1,overwrite:!0,stop:null})),bn(null),qe[1]&&Ln(qe[1]),Te(),O(1)},onFocus:()=>{Te(),gn(1),_n(1),me(!0),F(!1),(0,ie.TZ)("input-box-planner-to")},onBlur:()=>{F(!0),setTimeout(()=>{gn(null),me(!1)},250)}}),(0,I.jsx)(i.A,{bordered:!0,filled:Ln(qe[1]),onClick:()=>(()=>{const e=qe[1];e&&(Ln(e)?ee(!0):(ee(!1),ae(!0)))})(),disabled:null===(h=qe[1])||void 0===h||!h.id})]}),(0,I.jsxs)("div",{className:"input-box",style:{marginBottom:0}
1,children:[(0,I.jsx)(o.A,{items:An,icon:an.h,onChange:e=>{M(e),0===parseInt(e)?(b((0,en.WM)(!0)),b((0,en.uD)(!1)),b((0,en.NO)(!1)),B.current=0,T(!1)):E?1===parseInt(e)?(b((0,en.WM)(!1)),b((0,en.uD)(!1)),b((0,en.NO)(!0))):2===parseInt(e)&&(b((0,en.WM)(!1)),b((0,en.NO)(!1)),b((0,en.uD)(!0))):T(!0)},style:{zIndex:"2!important",width:"46%"},styleContent:{zIndex:"1010 !important"}}),(0,I.jsx)(Oe,{onClick:()=>S(!0)})]}),(0,I.jsx)("div",{style:{marginTop:"16px",display:E||!0===H.arriveBy||!0===H.leavesAt?"block":"none"},children:(0,I.jsx)(Ge,{onSelect:(e,n)=>{wn(e),Nn(n)}})})]}),J&&(0,I.jsx)(d.A,{onClose:()=>ee(!1),text:"".concat(Ce("lb_favorites_seguro_eliminar_destino"),' "').concat(null===(x=qe[1])||void 0===x?void 0:x.name,'"'),onAccept:()=>(()=>{const e=qe[1];let n=null;const l="stop"===(null===e||void 0===e?void 0:e.type)?"stops":"poi"===(null===e||void 0===e?void 0:e.type)?"pois":"directions";var t;if(n="directions"===l?null===(t=se.find(n=>{var l,t;return n.latitude===(null===e||void 0===e||null===(l=e.position)||void 0===l?void 0:l.lat)&&n.longitude===(null===e||void 0===e||null===(t=e.position)||void 0===t?void 0:t.lng)}))||void 0===t?void 0:t.id:null===e||void 0===e?void 0:e.id,e)try{be(l,[n],()=>ee(!1))}catch(i){return ee(!1),void b((0,Ue.ul)({message:"No se pudo eliminar la parada.",type:"error"}))}})()}),ne&&(0,I.jsx)(on.A,{onClose:()=>ae(!1),title:Ce("lb_favorites_guardar_destino_interrogante"),text:Ce("lb_favorites_guardar_destino_main"),secondaryText:Ce("lb_favorites_guardar_secondary"),onAccept:()=>(()=>{const e=qe[1],n=yn();try{if(e){let l;l="directions"===n?{alias:K.alias||e.name,name:e.name,position:e.position,typeId:U.typeId?U.typeId:0,direction:e.desc,street:e.street}:{id:e.id,alias:K.alias||e.name,latitude:e.position.lat,longitude:e.position.lng,typeId:0,direction:e.desc,street:e.street||e.desc||e.name,portal:e.desc,postalCode:String(e.id),municipality:e.desc,locality:e.desc,country:"es"},je(n,[l],()=>ae(!1))}}catch(l){return ae(!1),b((0,Ue.ul)({message:"Error al agregar el destino. Por favor intentelo m\xe1s tarde.",type:"error"})),l}})(),onAliasChange:e=>Q(e),onIconChange:e=>X(e),item:qe[1],markerType:yn()})]}),(0,I.jsxs)("section",{className:"results-box",children:[!k&&(de||ve)&&!Ee&&(0,I.jsxs)("div",{className:"plannerScreen_linkMyLocation",onClick:()=>(0===Ye?fn(null):bn(null),b((0,oe.hZ)({index:Ye,overwrite:!1,stop:null})),void Cn()),children:[(0,I.jsx)(s.A,{ariaLabel:"time",Icon:tn.h,style:{width:"20px",height:"20px"}}),(0,I.jsx)("span",{children:Ce("lb_planner_seleccionar_mi_localizacion")})]}),(0,I.jsxs)("div",{className:"results-scroll-box scroll-shadows ".concat(w?"":"--scroll"),children:[!k&&(de||ve)&&!Ee&&(0,I.jsx)(u.A,{primaryClick:Ie,secondClick:Ie,noNav:!0,typesAvoid:[sn.yH.ROUTE]}),Ee&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(c.A,{text:Ce("lb_planner_paradas"),style:{marginBottom:0}}),(null===Me||void 0===Me||null===(f=Me.stopsLines)||void 0===f?void 0:f.length)>0?(0,I.jsx)(Fe.A,{noNav:!0,results:Me.stopsLines,prevResults:5}):(0,I.jsx)("div",{className:"explore_noResults",children:Ce("lb_No_encontado")}),(0,I.jsx)(c.A,{text:Ce("lb_explorer_lugares"),style:{marginBottom:0}}),(null===Me||void 0===Me||null===(j=Me.pois)||void 0===j?void 0:j.length)>0?(0,I.jsx)(Fe.A,{noNav:!0,results:Me.pois,prevResults:5,type:sn.yH.POI}):(0,I.jsx)("div",{className:"explore_noResults",children:Ce("lb_No_encontado")}),(0,I.jsx)(c.A,{text:Ce("lb_otra_informacion"),style:{marginBottom:0}}),(0,I.jsx)(Be.A,{prevViewResults:5,searchText:_,clickItem:e=>Ie(e),clickNav:e=>Pe(e)})]}),!k&&R&&(0,I.jsx)(Ne,{style:{cursor:"auto"},onClick:()=>N(!w)})]})]}),Ae?(0,I.jsx)(mn.A,{survey:Ae,planId:null===$||void 0===$?void 0:$.idPlanning,onClose:()=>ke(null)}):null]})}}}]); 2//# sourceMappingURL=875.f8e6f975.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.