(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["2dd108fc"],{c8e3:function(e,t,a){"use strict";t["a"]={data:function(){return{dismissNotification:null}},methods:{showNotification:function(e,t){this.dismissNotification&&this.dismissNotification(),this.dismissNotification=this.$q.notify({message:e,color:t,icon:"info"})}}}},dd73:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.eventMapLoading?e._e():a("item-map-basic-opener",{attrs:{"tickets-available":e.eventDate.tickets_available>0},on:{openMap:function(t){e.showSeatMap(e.eventDate.event_date_id,e.eventDate.order_quantity_limit)}}}),a("q-inner-loading",{attrs:{visible:e.eventMapLoading||e.cartLoading}},[a("div",{staticClass:"row justify-center"},[a("div",{staticClass:"col-12"},[a("q-spinner",{attrs:{color:e.SET_COLOR.primary,size:"50px"}})],1),a("div",{staticClass:"col-12 text-center"},[a("p",[e._v("\n          "+e._s(e.$t("label.loadingSeats"))+"\n        ")])])])]),e.SET_DISPLAY.ticket.eventInformation.ticketDate.dayTotal?a("product-total-simple-tool-bar",{attrs:{"purchase-items":e.totalItems(e.eventDate.event_date_id),"purchase-total":e.totalAmount(e.eventDate.event_date_id),loading:e.ticketShoppingCartLoading,"label-sub-title":e.totalToolBarSubTitle(e.eventDate.event_date_id),"hide-amount":e.hideToolbarAmount(e.eventDate.event_date_id)},on:{addToCart:e.buyItems}}):e._e(),e.mapModal.opened?a("active-ticket-modal-map-selectable",{ref:"EventSVGMap",attrs:{"event-code":e.mapModal.eventCode,"event-id":e.singleEventInformation.event_id,"event-date-id":e.mapModal.eventDateId,"max-selected-seats":e.mapModal.orderQuantityLimit,"seats-in-cart":e.seatsInCartByDate},on:{"selected-seat":function(t){e.openPriceDialog(e.mapModal.eventDateId,t)},"removed-seat":function(t){e.removeSeat(e.mapModal.eventDateId,t)},"max-selected":e.checkTicketsInCart},model:{value:e.mapModal.opened,callback:function(t){e.$set(e.mapModal,"opened",t)},expression:"mapModal.opened"}}):e._e(),e.seatDialog.opened?a("selected-seat-dialog",{attrs:{"seat-id":e.seatDialog.seatId,"seat-type":e.seatDialog.seatType,"event-date-id":e.seatDialog.eventDateId},on:{"selected-price":e.selectSeat},model:{value:e.seatDialog.opened,callback:function(t){e.$set(e.seatDialog,"opened",t)},expression:"seatDialog.opened"}}):e._e()],1)},n=[];i._withStripped=!0;var s=a("f1f2"),r=a.n(s),o=(a("cadf"),a("7f7f"),a("ac6a"),a("96cf"),a("c973")),c=a.n(o),d=a("3156"),l=a.n(d),p=(a("c5f6"),a("2f62")),u=a("1b0c"),v=a("00ac"),m=a("c8e3"),h=a("6971"),f=a("2c6e"),g={name:"ActiveTicketListEventMapDataItem",components:{ItemMapBasicOpener:function(){return a.e("2d0e6911").then(a.bind(null,"98fb"))},ActiveTicketModalMapSelectable:function(){return Promise.all([a.e("2d0d6d5c"),a.e("2d21aeb7"),a.e("1274edd9")]).then(a.bind(null,"1462"))},SelectedSeatDialog:function(){return Promise.all([a.e("2d226d26"),a.e("0def9d43")]).then(a.bind(null,"4203"))}},mixins:[u["a"],v["a"],h["b"],m["a"]],props:{selectedEventDateId:{type:[Number,String],required:!1,default:""},eventDate:{type:Object,required:!0}},data:function(){return{mapModal:{eventCode:"",eventDateId:0,orderQuantityLimit:0,opened:!1},seatDialog:{seatId:0,eventDateId:0,seatType:f["e"].seat,opened:!1},displaySeats:[],selectedSector:""}},computed:l()({},Object(p["c"])("ticketSale",["singleEventInformation","loading"]),Object(p["c"])("eventMap",{eventMapLoading:"loading"}),Object(p["c"])("ticketShoppingCart",{selectedSeatsInEventDate:"selectedSeatsInEventDate",selectedSeatByIdInEventDate:"selectedSeatByIdInEventDate",cartOrderCode:"cartOrderCode",cartLoading:"loading",remainingMapTickets:"remainingMapTickets",eventTicketsTotalById:"eventTicketsTotalById"}),{seatsInCartByDate:function(){return this.selectedSeatsInEventDate(this.mapModal.eventDateId)},maxSelectedAlert:function(){return{message:this.$t("error.server.cart.maxPurchaseLimit"),timeout:3e3,color:"info",icon:"info"}},ticketsLeft:{cache:!1,get:function(){return this.remainingMapTickets(this.eventDate)}},canBuy:{cache:!1,get:function(){return this.eventTicketsLimit>this.ticketsOnCart}},ticketsOnDate:{cache:!1,get:function(){return this.selectedSeatsInEventDate(this.eventDate.event_date_id).length}},ticketsOnCart:function(){return this.eventTicketsTotalById(this.singleEventInformation.event_id)},eventTicketsLimit:function(){return this.singleEventInformation.event_tickets_limit}}),beforeDestroy:function(){this.displaySeats=[],this.selectedSector="",this.destroyEventMap()},methods:l()({},Object(p["b"])("eventMap",["destroyEventMap","removeSeatFromAvailableList"]),Object(p["b"])("ticketShoppingCart",["addSeatToOrderItem","updateCartItemQuantity","removeSeatToOrderItem"]),{openPriceDialog:function(e,t){return!this.checkTicketsInCart()&&(this.seatDialog.seatId=t.seatId,this.seatDialog.seatType=t.type,this.seatDialog.eventDateId=e,this.seatDialog.opened=!0,!0)},closePriceDialog:function(){this.seatDialog.seatId=0,this.seatDialog.seatType=f["e"].seat,this.seatDialog.eventDateId=0,this.seatDialog.opened=!1},showSeatMap:function(e,t){var a=this.ticketsOnDate,i=!0;a<1&&!this.canBuy&&(this.showNotification(this.$t("error.server.cart.maxLimitPerCpf"),"negative"),i=!1),this.mapModal.eventCode=this.singleEventInformation.code,this.mapModal.eventDateId=e,this.mapModal.orderQuantityLimit=t,this.mapModal.opened=i},selectSeatTicket:function(){var e=c()(regeneratorRuntime.mark(function e(t){var a,i,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:try{this.addSeatToOrderItem({eventDateId:this.seatDialog.eventDateId,eventId:this.singleEventInformation.event_id,seat:l()({},t,{seat_type:this.seatDialog.seatType})}),a=t.extra_amounts||null,i=0,n="",Array.isArray(a)&&a.forEach(function(e){i+=parseFloat(e.amount),n+=" - ".concat(e.name)}),this.trackProduct({id:"".concat(this.SET_ENTITY).concat(t.price_id||"").concat(t.price_special_id||"").concat(t.seat_id||""),name:this.singleEventInformation.name||t.price_type||"",price_description:t.price_description,cartId:this.cartOrderCode,amount:parseFloat(t.price)+i,brand:this.SET_PAGE_NAME,category:(t.price_type||"")+n,event_code:this.singleEventInformation.code,quantity:1})}catch(e){this.toastError(e),this.removeSeat(this.seatDialog.eventDateId,t.seat_id),this.removeSeatFromAvailableList(t.seat_id)}case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),selectSeat:function(){var e=c()(regeneratorRuntime.mark(function e(t){var a=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!Array.isArray(t)){e.next=9;break}return e.t0=r.a,e.next=4,t.map(function(){var e=c()(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",a.selectSeatTicket(t));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 4:return e.t1=e.sent,e.next=7,e.t0.all.call(e.t0,e.t1);case 7:e.next=11;break;case 9:return e.next=11,this.selectSeatTicket(t);case 11:return this.closePriceDialog(),e.next=14,this.syncCart();case 14:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),removeSeat:function(e,t){var a=this.selectedSeatByIdInEventDate(e,t),i={eventDateId:e,ticket:{seat_id:a.seat_id,price_id:a.price_id,price_special_id:a.price_special_id,quantity:0}};this.updateCartItemQuantity(i),this.removeSeatToOrderItem(i),this.syncCart();var n=a.extra_amounts||null,s=0,r="";return Array.isArray(n)&&n.forEach(function(e){s+=parseFloat(e.amount),r+=" - ".concat(e.name)}),this.trackProduct({id:"".concat(this.SET_ENTITY).concat(a.price_id||"").concat(a.price_special_id||"").concat(a.seat_id||""),name:this.singleEventInformation.name||a.price_type||"",price_description:a.price_description,cartId:this.cartOrderCode,amount:parseFloat(a.price)+s,brand:this.SET_PAGE_NAME,category:(a.price_type||"")+r,event_code:this.singleEventInformation.code,quantity:0}),!0},checkTicketsInCart:function(){return(!this.ticketsLeft||!this.canBuy)&&(this.closePriceDialog(),this.showAlertCantUpdate(h["a"].maxQuantity),!0)}})},_=g,D=a("2877"),I=Object(D["a"])(_,i,n,!1,null,null,null);I.options.__file="MapDate.vue";t["default"]=I.exports}}]);
//# sourceMappingURL=2dd108fc.a9233eac.2024-10-22T18:36:13.257Z.js.map