1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6249],{26249:(e,l,o)=>{o.d(l,{A:()=>u});var n=o(14232),s=o(89159),t=o(85664),i=o(89848),r=o(93440),a=o(56600),d=o(13305);let u=()=>{let[e,l]=(0,t.L4)(s.gD),[o,u]=(0,t.L4)(s.DO),[c,_]=(0,t.L4)(s.j2),[g,k]=(0,t.L4)(s.GG),[b,p]=(0,t.L4)(r.TF),v=(0,t.vc)(r.DJ),[S,h]=(0,t.L4)(r.wH),[y,m]=(0,t.L4)(s.D1),[A,E]=(0,t.L4)(s.Lc),[f,w]=(0,t.L4)(s.NR),[B,T]=(0,t.L4)(s.iw),[L,x]=(0,n.useState)(!1),D=(0,a.C2)(),q=i.A.getSessionEncryp("is_blocked"),j=i.A.getSessionEncryp("is_blocked_return"),N=(e,l,o,n)=>{if(null==e?void 0:e.selectedSeatsToBook){let s=e.selectedSeatsToBook.map(e=>e.number).join(","),t=e.selectedSeatsToBook.reduce((e,o)=>(e[o.number]=[null==l?void 0:l.id,o.net_amount],e),{});i.A.releaseSeat(null==o?void 0:o.pnr_number,null==l?void 0:l.id,s,null==o?void 0:o.breq_number,t),n(null)}};return{goThroughBlockSeat:l=>{var n,s,t,r,a,u,_,k,p,S,m;let{setBoardingErrorMessage:E,setDroppingErrorMessage:w,tripStep:T,onContinueClick:L,fast_forward:q=!1}=l;if(x(!0),!e||!e.boardingStage){E("Seleccione punto de embarque"),x(!1);return}if(!e||!e.droppingStage){w("Seleccione punto de llegada"),x(!1);return}if(2!=T){if(!c||!c.selectedSeatsToBook||!c.selectedSeatsToBook.length){console.log("Selecciona tu asiento"),x(!1);return}}else if(!g||!g.selectedSeatsToBook||!g.selectedSeatsToBook.length){console.log("Selecciona tu asiento"),x(!1);return}console.log(e,"*******************");let j=2==T&&g.selectedSeatsToBook?A:y,N=2==T&&g.selectedSeatsToBook?y:A,O={book_ticket:{seat_details:{fares_hash:{}},contact_detail:{mobile_number:"988888888",emergency_name:"Kupos",email:"[email protected]"}},origin_id:j.value,destination_id:N.value,boarding_at:2==T?null==o||null==(n=o.boardingStage)?void 0:n.id:null==e||null==(s=e.boardingStage)?void 0:s.id,drop_off:2==T?null==o||null==(t=o.droppingStage)?void 0:t.id:null==e||null==(r=e.droppingStage)?void 0:r.id,no_of_seats:2==T?null==(a=g.selectedSeatsToBook)?void 0:a.length:null==(u=c.selectedSeatsToBook)?void 0:u.length,travel_date:2==T?B:f,reservation_id:2==T?null==o?void 0:o.id:null==e?void 0:e.id,seat_numbers_arr:[],trip_type:"instant_block",is_ops_book:"true",is_onward:2==T&&(null==(_=g.selectedSeatsToBook)?void 0:_.length)?"false":"true",is_return:2==T&&(null==(k=g.selectedSeatsToBook)?void 0:k.length)?"true":"false"},C={},I=[],R={},G=[];c.selectedSeatsToBook.map(e=>{C[e.number]=e.net_amount.toString(),I.push(e.number)}),2==T&&(null==(p=g.selectedSeatsToBook)?void 0:p.length)&&g.selectedSeatsToBook.map(e=>{R[e.number]=e.net_amount.toString(),G.push(e.number)}),O.book_ticket.seat_details.fares_hash=2==T?R:C,O.seat_numbers_arr=2==T?G:I,i.A.setSessionEncryp("instantBlockObj",O),console.log(null==b?void 0:b.api_type,"@@@@@@@@"),console.log(null==v?void 0:v.is_block_ts_ticket,"@@@@@@@@###"),console.log(null==b?void 0:b.allow_instant_seat,"!!!!!!!!!");let H=2===T?null==g?void 0:g.selectedSeatsToBook:null==c?void 0:c.selectedSeatsToBook,F=(null==H?void 0:H.map(e=>e.number))||[];if((null==b?void 0:b.api_type)==1&&(null==v?void 0:v.is_block_ts_ticket)){try{d.A.track("seat_block_attempted",{seats:F||[],leg_index:0},{operator_id:(null==e||null==(S=e.route)?void 0:S.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}h(!0),D({callback:l=>{var o,n,s,t,r,a,u,c;if(l&&(null==l?void 0:l.success)){x(!1),2==T?(i.A.setSessionEncryp("booking_details_hash_return",null==l||null==(o=l.data)?void 0:o.result),i.A.setSessionEncryp("is_blocked_return",!0)):(i.A.setSessionEncryp("booking_details_hash_onward",null==l||null==(n=l.data)?void 0:n.result),i.A.setSessionEncryp("is_blocked",!0));try{d.A.track("seat_block_succeeded",{seats:F||[],hold_expires_at:new Date(Date.now()+6e5).toISOString(),leg_index:0},{operator_id:(null==e||null==(s=e.route)?void 0:s.id)||null,schedule_id:(null==e||null==(t=e.route)?void 0:t.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}L(q)}else{x(!1),console.log(l,"@@@@@@&&&&&#####"),console.log(null==l||null==(r=l.data)?void 0:r.message);try{d.A.track("seat_block_failed",{seats:F||[],reason_code:(null==l||null==(a=l.data)?void 0:a.message)||"unknown",leg_index:0},{operator_id:(null==e||null==(u=e.route)?void 0:u.id)||null,schedule_id:(null==e||null==(c=e.route)?void 0:c.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}return}},data:O})}else if(1!=b.api_type&&(null==b?void 0:b.allow_instant_seat)){try{d.A.track("seat_block_attempted",{seats:F||[],leg_index:0}
1,{operator_id:(null==e||null==(m=e.route)?void 0:m.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}h(!0),D({callback:l=>{var o,n,s,t,r,a,u,c;if(l&&(null==l?void 0:l.success)){x(!1),2==T?(i.A.setSessionEncryp("booking_details_hash_return",null==l||null==(o=l.data)?void 0:o.result),i.A.setSessionEncryp("is_blocked_return",!0)):(i.A.setSessionEncryp("booking_details_hash_onward",null==l||null==(n=l.data)?void 0:n.result),i.A.setSessionEncryp("is_blocked",!0));try{d.A.track("seat_block_succeeded",{seats:F||[],hold_expires_at:new Date(Date.now()+6e5).toISOString(),leg_index:0},{operator_id:(null==e||null==(s=e.route)?void 0:s.id)||null,schedule_id:(null==e||null==(t=e.route)?void 0:t.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}L(q)}else{x(!1),console.log(l,"@@@@@@&&&&&#####"),console.log(null==l||null==(r=l.data)?void 0:r.message);try{d.A.track("seat_block_failed",{seats:F||[],reason_code:(null==l||null==(a=l.data)?void 0:a.message)||"unknown",leg_index:0},{operator_id:(null==e||null==(u=e.route)?void 0:u.id)||null,schedule_id:(null==e||null==(c=e.route)?void 0:c.id)||null})}catch(e){console.error("[analytics] track failed:",(null==e?void 0:e.message)||e)}return}},data:O})}else{let e=i.A.getSessionEncryp("booking_details_hash_onward"),l=i.A.setSessionEncryp("booking_details_hash_return");e||i.A.setSessionEncryp("is_blocked",!1),l||i.A.setSessionEncryp("is_blocked_return",!1),L(q)}},loading:L,handleSeatRelease:()=>{let l=i.A.getSessionEncryp("is_blocked"),n=i.A.getSessionEncryp("is_blocked_return");l?(console.log("onward released"),N(c,e,i.A.getSessionEncryp("booking_details_hash_onward"),_),i.A.setSessionEncryp("is_blocked",!1)):n&&(console.log("return released"),N(g,o,i.A.getSessionEncryp("booking_details_hash_return"),k),i.A.setSessionEncryp("is_blocked_return",!1))},getInstantReservationHash:()=>{var e,l;let o=B&&j&&S;return{instant_reservation_id:q&&S?null==(e=i.A.getSessionEncryp("booking_details_hash_onward"))?void 0:e.pnr_number:null,instant_return_reservation_id:o?null==(l=i.A.getSessionEncryp("booking_details_hash_return"))?void 0:l.pnr_number:null}},getBreqNumber:()=>{var e,l,o,n;return{breq_number:S&&q?null==(l=i.A.getSessionEncryp("booking_details_hash_onward"))||null==(e=l.booking_details_hash)?void 0:e.breq_number:null,breq_return_number:j&&B&&S?null==(n=i.A.getSessionEncryp("booking_details_hash_return"))||null==(o=n.booking_details_hash)?void 0:o.breq_number:null}},reset:()=>{i.A.setSessionEncryp("is_blocked",!1),i.A.setSessionEncryp("is_blocked_return",!1),i.A.setSessionEncryp("return_clicked",!1),i.A.setSessionEncryp("return_call",!1),i.A.setSessionEncryp("booking_details_hash_onward",null),i.A.setSessionEncryp("booking_details_hash_return",null),h(!1)},setLoading:x}}}}]);
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.