(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1dee3bad"],{"0e0c":function(t,e,a){"use strict";a("5572")},5572:function(t,e,a){},dfd9:function(t,e,a){"use strict";var s=function(){var t=this,e=t._self._c;return e("div",{class:t.$vuetify.breakpoint.mdAndUp?"py-4 pl-6":"py-4 px-6"},[e("YourOrder",{attrs:{loading:t.loading,showPixScreen:t.showPixScreen},on:{createOrder:function(e){return t.$emit("createOrder")},purchase:function(e){return t.$emit("purchase")}}}),t.mapUrl&&"Cart"===t.$route.name?e("Map",{attrs:{mapUrl:t.mapUrl}}):t._e()],1)},o=[],r=a("8336"),i=a("b0af"),n=a("62ad"),c=a("ce7e"),l=a("132d"),u=a("adda"),d=a("0fd9"),p=a("2fa4"),h=function(){var t,e,a,s=this,o=s._self._c;return o("div",[o(i["a"],{class:s.$vuetify.breakpoint.mdAndUp?"pa-4 rounded-lg":"",style:s.$vuetify.breakpoint.mdAndUp?"":"background-color: #eee;",attrs:{outlined:s.$vuetify.breakpoint.mdAndUp,elevation:"0"}},[s.$route.query.sectorMode?s._e():o(d["a"],{attrs:{"no-gutters":""}},[o(n["a"],[o("span",{staticClass:"checkout-h6 accent--text",staticStyle:{"font-weight":"700"}},[s._v(s._s(s.eventDetails.nome)+" ")]),o(d["a"],{staticClass:"mt-4",attrs:{"no-gutters":"",align:"center"}},[o("span",[o(l["a"],{staticClass:"mr-2",attrs:{small:"",color:"accent"}},[s._v("mdi-calendar-check-outline")]),o("span",{staticClass:"checkout-h4 accent--text"},[s._v(s._s(s.eventDetails.data_exibicao))])],1)]),s.eventDetails.horario_exibicao?o(d["a"],{attrs:{"no-gutters":"",align:"center"}},[o("span",[o(l["a"],{staticClass:"mr-2",attrs:{small:"",color:"accent"}},[s._v("mdi-clock-time-three-outline")]),o("span",{staticClass:"checkout-h4 accent--text"},[s._v(s._s(s.eventDetails.horario_exibicao))])],1)]):s._e(),o(d["a"],{attrs:{"no-gutters":"",align:"center"}},[o("span",[o(l["a"],{staticClass:"mr-2",attrs:{small:"",color:"accent"}},[s._v("mdi-map-marker-outline")]),o("span",{staticClass:"checkout-h4 accent--text"},[s._v(s._s(s.eventDetails.local?s.eventDetails.local.nome:s.$t("general.locationToBeDefined")))])],1)])],1),o(i["a"],{staticClass:"rounded-lg",attrs:{elevation:"0",width:"110",height:"64"}},[o(u["a"],{attrs:{contain:"",src:s.imgUrl,alt:"Evento"}})],1)],1),s.cartProducts&&s.cartProducts.length&&!s.$route.query.sectorMode&&(s.$vuetify.breakpoint.mdAndUp||"Cart"!==s.$route.name)?o(d["a"],{staticClass:"py-3",attrs:{"no-gutters":""}},[o(c["a"])],1):s._e(),s.cartProducts&&s.cartProducts.length&&(s.$vuetify.breakpoint.mdAndUp||"Cart"!==s.$route.name)?o(d["a"],{attrs:{"no-gutters":"",align:"center"}},[o("span",{staticClass:"checkout-h7 accent--text",staticStyle:{"letter-spacing":"1.5px"}},[s._v(s._s(s.$t("cart.tickets").toUpperCase()))]),o(p["a"]),"Payment"!==s.$route.name&&"Participants"!==s.$route.name||s.$route.query.order_hash||s.showPixScreen||s.showSecurityCheck?s._e():o(r["a"],{attrs:{rounded:"",small:"",depressed:"",color:"primary"},on:{click:s.goTickets}},[s._v(s._s(s.$t("summary.edit")))])],1):s._e(),s.cartProducts&&s.cartProducts.length&&(s.$vuetify.breakpoint.mdAndUp||"Cart"!==s.$route.name)?o("div",{staticClass:"pt-4"},[s.$route.query.order_hash?s._e():o("div",s._l(s.cartProducts,(function(t,e){return o("div",{key:e},s._l(t,(function(t,e){var a;return o(d["a"],{key:e,attrs:{"no-gutters":"",align:"center"}},[o(n["a"],{attrs:{cols:"8"}},[o("span",{staticClass:"checkout-h3 accent-text",staticStyle:{"font-weight":"400"}},[s._v(" "+s._s(t.quantidade)+"x "+s._s(t.nome)+" - "+s._s(t.nome_tipo)+" "+s._s(null!==t&&void 0!==t&&t.objsSeats?s.verifySeats(null===t||void 0===t?void 0:t.objsSeats):"")+" ")])]),o(n["a"],{attrs:{align:"end"}},[o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"400"}},[s._v(" "+s._s(s._f("currency")(t.quantidade*(4===(null===(a=s.storeDetails)||void 0===a?void 0:a.id)?t.valor:t.valor+t.valor_conveniencia)))+" ")])])],1)})),1)})),0),s.$route.query.order_hash?o("div",s._l(s.orderProducts,(function(t,e){var a;return o(d["a"],{key:e},[o(n["a"],{attrs:{cols:"8"}},[o("span",{staticClass:"checkout-h3 accent-text",staticStyle:{"font-weight":"400"}},[s._v(" "+s._s(t.quantidade)+"x "+s._s(t.nome)+" - "+s._s(t.nome_tipo)+" "+s._s(null!==t&&void 0!==t&&t.objsSeats?s.verifySeats(null===t||void 0===t?void 0:t.objsSeats):"")+" ")])]),o(n["a"],{attrs:{align:"end"}},[o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"400"}},[s._v(" "+s._s(s._f("currency")(t.quantidade*(4===(null===(a=s.storeDetails)||void 0===a?void 0:a.id)?t.valor:t.valor+t.valor_conveniencia)))+" ")])])],1)})),1):s._e()]):s._e(),s.cartProducts&&s.cartProducts.length>0&&4===(null===(t=s.storeDetails)||void 0===t?void 0:t.id)?o(d["a"],{staticClass:"pt-3",attrs:{"no-gutters":""}},[o("strong",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(" "+s._s(s.$t("summary.ticketsTotal"))+" ")]),o(p["a"]),o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.productsTotalWithoutTax)))])],1):s._e(),s.cartProducts&&s.cartProducts.length>0&&4===(null===(e=s.storeDetails)||void 0===e?void 0:e.id)?o(d["a"],{staticClass:"pt-3",attrs:{"no-gutters":""}},[o("strong",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(" "+s._s(s.$t("summary.serviceTax"))+" ")]),o(p["a"]),o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.taxTotal)))])],1):s._e(),"Cart"!==s.$route.name?o(d["a"],{staticClass:"pt-4",attrs:{"no-gutters":""}},[o(c["a"])],1):s._e(),"CC"===s.paymentOption?o("div",[o(d["a"],{staticClass:"py-4",attrs:{"no-gutters":""}},[o("span",{staticClass:"checkout-h3 accent--text"},[s._v(s._s(s.$t("payment.howWantPay")))])]),o(c["a"]),o(d["a"],{staticClass:"py-4",attrs:{"no-gutters":""}},[o("span",{staticClass:"checkout-h3 accent--text"},[s._v(s._s(s.$t("general.installments")))]),o(p["a"]),s.buyer&&s.buyer.installment_amount?o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s.buyer.installment_amount.instalments)+"x "+s._s(s._f("currency")(s.buyer.installment_amount.interestAmount)))]):o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v("1x "+s._s(s._f("currency")(s.productsTotal)))])],1),o(c["a"])],1):s._e(),s.cartProducts&&s.cartProducts.length&&(s.$vuetify.breakpoint.mdAndUp||"Cart"!==s.$route.name)?o(d["a"],{class:4===(null===(a=s.storeDetails)||void 0===a?void 0:a.id)?"pt-3":"pt-4",attrs:{"no-gutters":""}},[o("strong",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(" Total ")]),o(p["a"]),s.buyer&&s.buyer.installment_amount&&"CC"===s.paymentOption?o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.buyer.installment_amount.total)))]):s.$route.query.order_hash?o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.orderAmount)))]):o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.productsTotal)))])],1):s._e(),s.$route.query.order_hash&&s.orderDetails?o(d["a"],{staticClass:"py-3",attrs:{"no-gutters":""}},[o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(" "+s._s(s.$t("summary.amountPaid"))+" ")]),o(p["a"]),o("strong",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.orderDetails.valor_pago)))])],1):s._e(),s.$route.query.order_hash&&s.orderDetails?o(d["a"],{staticClass:"py-3",attrs:{"no-gutters":""}},[o("span",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(" "+s._s(s.$t("summary.balanceToPay"))+" ")]),o(p["a"]),o("strong",{staticClass:"checkout-h3 accent--text",staticStyle:{"font-weight":"bold"}},[s._v(s._s(s._f("currency")(s.orderDetails.valor_pendente)))])],1):s._e(),s.cartProducts&&s.cartProducts.length&&s.$vuetify.breakpoint.mdAndUp&&!s.$route.query.embed&&"Cart"===s.$route.name?o(d["a"],{staticClass:"mt-4",attrs:{"no-gutters":""}},[o(r["a"],{attrs:{width:"100%",rounded:"",depressed:"",color:"primary",loading:s.loading,height:"40"},on:{click:function(t){return s.$emit("createOrder")}}},[s._v(s._s(s.$t("cart.continue")))])],1):s._e(),"Payment"!==s.$route.name||s.showPixScreen||s.showSecurityCheck||!s.$vuetify.breakpoint.mdAndUp?s._e():o(d["a"],{staticClass:"mt-4",attrs:{"no-gutters":""}},[o(r["a"],{attrs:{width:"100%",rounded:"",depressed:"",color:"primary",disabled:s.productsTotal?!s.canPurchase||!s.paymentOption:!s.canPurchase,loading:s.loading,height:"40"},on:{click:function(t){return s.$emit("purchase")}}},[s._v(s._s("PIX"===s.paymentOption?s.$t("cart.continue"):s.$t("summary.confirm"))+" ")])],1),s.cartProducts&&s.cartProducts.length&&(s.$vuetify.breakpoint.mdAndUp||"Cart"!==s.$route.name)&&s.showDateCancel?o(d["a"],{staticClass:"mt-4",attrs:{justify:"center","no-gutters":""}},[o("span",{staticClass:"checkout-h8",staticStyle:{color:"rgb(23, 169, 108)","font-weight":"600","font-size":"14px"}},[s._v(" "+s._s(s.$t("payment.cancelFree"))+" "+s._s(s.dateCancellation)+" ")])]):s._e()],1)],1)},m=[],_=(a("14d9"),a("2f62")),v={props:["loading","showPixScreen"],computed:{...Object(_["b"])(["cartProducts","buyer","productsTotal","paymentOption","orderDetails","eventDetails","canPurchase","productsDetails","orderDetails","selectedSector","noSectorList","showSecurityCheck","storeDetails","orderProducts","orderAmount"]),imgUrl(){return this.eventDetails.midias.find(t=>1===t.codigo_midia&&1===t.ativo)?this.eventDetails.midias.find(t=>1===t.codigo_midia&&1===t.ativo).url:""},showDateCancel(){var t,e,a,s;return this.$moment().isBefore(null===(t=this.eventDetails)||void 0===t||null===(e=t.politicas_cancelamento.etapas[0])||void 0===e?void 0:e.prazo_cancelamento)&&(null===(a=this.eventDetails)||void 0===a||null===(s=a.politicas_cancelamento)||void 0===s?void 0:s.permite_cancelamento)},dateCancellation(){var t;return null!==(t=this.eventDetails)&&void 0!==t&&t.politicas_cancelamento.etapas[0]?this.$moment(this.eventDetails.politicas_cancelamento.etapas[0].prazo_cancelamento).format("DD/MM/YYYY"):null},productsTotalWithoutTax(){let t=0,e=0;return this.cartProducts.forEach(t=>{t.forEach(t=>{e+=t.valor*t.quantidade})}),t=e,t},taxTotal(){let t=0,e=0;return this.cartProducts.forEach(t=>{t.forEach(t=>{e+=t.valor_conveniencia*t.quantidade})}),t=e,t}},methods:{verifySeats(t){if(!t)return"";var e="";return t.forEach(t=>{e?e=e+", "+this.getIdentification(t.identificacao):e+=this.getIdentification(t.identificacao)}),`(${e})`},getIdentification(t){let e=t.replace("Mesa",""),a=t.toString().split(";").shift(),s=t.toString().split(";").pop();return t.includes("Mesa")?t.includes(";")?"Mesa "+e.split(";")[0]+" Cadeira "+e.split(";").pop():"Mesa "+e:t.includes("MESA")?"Mesa "+e.split("-")[1]:a+"-"+s},goTickets(){let t={whereICame:this.$route.name,order:this.orderDetails,productsDetails:this.productsDetails,cart:this.noSectorList,selectedSector:this.selectedSector,route:"Cart"};localStorage.setItem("cart-order-route-"+this.$route.params.event,JSON.stringify(t)),this.$router.push({name:"Cart",params:{event:this.$route.params.event},query:this.$route.query})}}},g=v,f=a("2877"),y=Object(f["a"])(g,h,m,!1,null,null,null),b=y.exports,C=a("99d9"),k=function(){var t=this,e=t._self._c;return e(i["a"],{class:t.$vuetify.breakpoint.mdAndUp?"rounded-lg mt-4":"",attrs:{flat:!t.$vuetify.breakpoint.mdAndUp,color:t.$vuetify.breakpoint.mdAndUp?"":"grey lighten-3",outlined:t.$vuetify.breakpoint.mdAndUp,id:"card-container"}},[e(C["c"],{staticClass:"pa-0 my-4",class:t.$vuetify.breakpoint.mdAndUp?"px-4":""},[e("h3",{staticClass:"checkout-h3"},[t._v(t._s(t.$t("cart.locationMap")))])]),e(C["b"],{staticClass:"grey--text text-xs-center"},[t.coordinates&&t.coordinates.length?e("panZoom",{style:`overflow: hidden; outline: none !important; cursor: move; max-height: ${t.$vuetify.breakpoint.mdAndUp?"450px":"350px"}; ${t.$vuetify.breakpoint.mdAndUp?"":"max-width: 350px;"}`,attrs:{id:"panz",options:{minZoom:t.$vuetify.breakpoint.mdAndUp?.48:.2,maxZoom:(t.$vuetify.breakpoint.mdAndUp,4),zoomSpeed:(t.$vuetify.breakpoint.mdAndUp,.195),pinchSpeed:.01,zoomDoubleClickSpeed:1,bounds:(t.$vuetify.breakpoint.mdAndUp,!0),boundsPadding:.1}},on:{init:t.onInit}},[e("svg",{staticClass:"noselect",staticStyle:{"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"},attrs:{id:"svgId",width:"770px",height:"700px"}},[e("g",{staticClass:"noselect",staticStyle:{cursor:"default"}},[e("image",{staticClass:"noselect",attrs:{"xlink:href":t.mapUrl,width:"770px",height:"653",x:"0",y:"0"}}),t._l(t.coordinates,(function(a,s){return e("polygon",{key:s,staticClass:"noselect",style:t.sectors.find(e=>e.codigo===t.hoverShape)?"cursor: pointer":"",attrs:{slot:"activator",id:a.productId,"sector-id":"961069",opacity:t.hoverShape===a.productId?"1":"0",fill:"rgba(255,255,0,0.5)",points:a.shape},on:{mousedown:t.checkIfDrag,mouseup:function(e){return t.selectSector(a.productId)},mouseenter:function(e){return t.handleMouse(a.productId)},mouseleave:function(e){return t.handleMouse(null)}},slot:"activator"})}))],2)])]):e("div",[t.mapUrl&&!t.$vuetify.breakpoint.mdAndUp?e(u["a"],{ref:"imgEvent",staticClass:"map__img",attrs:{"max-width":"700",width:"100%",src:t.mapUrl,alt:"Evento"}}):t.mapUrl&&t.$vuetify.breakpoint.mdAndUp?e("MapDialog",{attrs:{mapUrl:t.mapUrl}}):e("div",{staticClass:"text-xs-center"},[t._v(t._s(t.$t("general.unavailable")))])],1)],1)],1)},$=[],x=a("169a"),S=function(){var t=this,e=t._self._c;return e(x["a"],{attrs:{"max-width":"650"},scopedSlots:t._u([{key:"activator",fn:function({on:a,attrs:s}){return[e(u["a"],t._g(t._b({ref:"imgEvent",staticClass:"map__img",attrs:{"max-width":"700",width:"100%",src:t.mapUrl,alt:"Evento"}},"v-img",s,!1),a))]}}]),model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[e(i["a"],[e(C["c"],{staticClass:"mb-4"},[e(d["a"],{attrs:{"no-gutters":"",justify:"space-between"}},[e("span",[t._v(t._s(t.$t("cart.locationMap")))]),e(l["a"],{on:{click:function(e){t.dialog=!1}}},[t._v("mdi-close")])],1)],1),e(C["b"],[e(d["a"],{attrs:{justify:"center","no-gutters":""}},[e(u["a"],{ref:"imgEvent",staticClass:"map__img",attrs:{"max-width":"700",width:"100%",src:t.mapUrl,alt:"Evento"}})],1)],1)],1)],1)},w=[],D={props:["mapUrl"],data(){return{dialog:!1}}},P=D,U=Object(f["a"])(P,S,w,!1,null,null,null),A=U.exports,E={components:{MapDialog:A},props:["mapUrl"],data(){return{hover:!1,windowWidth:0,stageSize:{width:600,height:600},seats:[],panInst:null,panId:null,pzx:null,pzy:null,mapSize:475,selectedSeat:null,image:null,timeoutDrag:null,isDrag:!1}},computed:{...Object(_["b"])(["hoverShape","sectors","noSectorProducts","separateProducts","eventDetails"]),coordinates(){let t=[];return this.sectors&&this.sectors.length&&this.sectors.forEach(e=>{e.mapa_coordenadas&&e.mapa_coordenadas.forEach(a=>{let s=t.find(t=>t.shape==a);s||t.push({shape:a,productId:e.codigo})})}),this.separateProducts&&this.separateProducts.forEach(e=>{e.mapa_coordenadas&&e.mapa_coordenadas.forEach(a=>{let s=t.find(t=>t.shape==a);s||t.push({shape:a,productId:e.codigo_produto})})}),t}},methods:{checkIfDrag(){this.timeoutDrag=setTimeout(()=>{this.isDrag=!0},150)},selectSector(t){if(!this.isDrag){let e=null;if(e=this.$vuetify.breakpoint.xs&&t?this.sectors.find(e=>e.codigo===Number(t)):this.sectors.find(t=>t.codigo===this.hoverShape),e){let a={event_id:this.$route.params.event,sector_id:Number(t)};this.couponDetails&&this.couponDetails.isCupomValid&&(a.coupon=this.couponDetails.cupomData.campaign_coupon),this.$store.dispatch("getSeatsSector",a),this.$store.commit("SET_HOVER_SHAPE",null),this.$store.commit("SET_SHOW_SEAT_MAP",!0),this.$store.commit("SET_SELECTED_SECTOR",e)}}clearTimeout(this.timeoutDrag),this.isDrag=!1},handleMouse(t){this.$store.commit("SET_HOVER_SHAPE",t)},onInit:function(t,e){this.pzx=document.getElementById("panz").offsetWidth,this.pzy=document.getElementById("panz").offsetHeight,this.panInst=t,this.panId=e,this.$vuetify.breakpoint.mdAndUp?(t.moveTo(-10,30),t.zoomAbs(0,0,.5)):(t.moveTo(0,10),t.zoomAbs(0,0,.4)),this.mapIsReady=!0}}},T=E,I=(a("0e0c"),Object(f["a"])(T,k,$,!1,null,null,null)),O=I.exports,M={props:["loading","showPixScreen"],components:{YourOrder:b,Map:O},computed:{...Object(_["b"])(["eventDetails"]),mapUrl(){const t=this.eventDetails.midias.find(t=>2===t.codigo_midia&&1===t.ativo);return!!t&&t.url}}},q=M,z=Object(f["a"])(q,s,o,!1,null,null,null);e["a"]=z.exports}}]); //# sourceMappingURL=chunk-1dee3bad.5868af60.js.map