1"use strict";(self["webpackChunkwickman"]=self["webpackChunkwickman"]||[]).push([[8668],{8412:function(t,e,i){i.r(e),i.d(e,{default:function(){return Ot}});var s=i(641),o=i(33),a=i(3751),r=i(4130),l=i.p+"img/Circle.2d7014d8.svg",n=i(7838),d=i.p+"img/bid-history.85dd5182.svg";const c={class:"bg-white min-h-screen relative"},u={key:0,class:"loading-overlay"},h={key:1,class:"error-container"},p={class:"container mx-auto px-5 nunito-sans-light"},m={class:"text-sm text-[#7A7A7A] my-8"},g={"aria-label":"Breadcrumb"},b={class:"list-reset flex"},y={class:"text-[#3D3D3D]"},k={key:0,class:"flex flex-col md:flex-row gap-10"},f={class:"w-full xl:w-1/2"},w=["src"],v={key:1,src:r,alt:"Placeholder Image",class:"w-full object-cover zoom",style:{width:"100%"},width:"800",height:"800",ref:"zoomImage"},x={class:"flex space-x-4 overflow-x-auto"},L=["src","onClick"],B={class:"w-full xl:w-1/3 space-y-4"},C={class:""},_={key:0,class:"text-[#ff0000] text-base raleway-custom"},A={class:"flex justify-between items-center mt-2 text-gray-500"},P={class:"flex items-center"},S={key:0,class:"mr-2"},I={key:1,class:"text-[#7A7A7A] nunito-sans-light text-right"},E=["src"],$={class:"text-2xl text-gray-800 raleway-custom"},F={class:"flex justify-between mb-2"},X={class:"flex flex-col border-l border-t border-b border-gray-200 py-3 px-8 w-full text-center"},D={class:"text-gray-800 nunito-sans-light text-[20px] !font-bold"},Q={class:"flex flex-col border border-gray-200 py-3 px-8 w-full text-center"},T={class:"text-[#8a2432] text-[14px] nunito-sans-light"},H={class:"text-[#8a2432] font-semibold text-[20px] nunito-sans-light !font-bold"},W={key:0},M={key:1},R={key:0},z={key:0,class:"flex mb-3"},U={class:"text-[#8a2432] text-sm"},j={key:0},q={key:1},N={key:1,class:"flex items-center pb-3 space-x-2 relative"},V={key:0,class:"flex items-center w-full text-[#28A34B] text-[12px] border-t bg-[#f0fff5] border-b border-l-2 p-2 border-[#28A34B] border-r"},O={key:1,class:"flex items-center w-full text-[#FFA500] text-[12px] border-t bg-[#FFF5E5] border-b border-l-2 p-2 border-[#FFA500] border-r"},K={key:2,class:"flex items-center w-full text-[#DA1E28] text-[12px] border-t bg-[#FFF1F1] border-b border-l-2 p-2 border-[#DA1E28] border-r"},Z={class:"p-6 bg-red-100"},Y={class:"flex flex-col sm:flex-row sm:items-center relative"},J={class:"relative flex-grow"},G=["innerHTML"],tt={key:1},et={class:"p-6 bg-red-100 flex justify-between items-center"},it={class:"space-y-1 pt-2 nunito-sans-light"},st={class:"text-[#7A7A7A]"},ot={class:"ml-auto text-left w-40"},at={class:"text-black"},rt={key:1,class:"mt-12"},lt={class:"flex space-x-4 thecontentarea border-gray-300"},nt={key:0,class:"mt-4 text-[#7A7A7A]"},dt=["innerHTML"],ct={class:"mt-10 mb-8"};function ut(t,e,r,ut,ht,pt){const mt=(0,s.g2)("LoadingSpinner"),gt=(0,s.g2)("router-link"),bt=(0,s.g2)("BidHistoryPopup"),yt=(0,s.g2)("RelatedSlider"),kt=(0,s.g2)("QuickBidCard"),ft=(0,s.g2)("BidConfirmation"),wt=(0,s.g2)("SiteFooter");return(0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.Lk)("div",c,[ht.isLoadingProduct?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.bF)(mt)])):ht.error?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.Lk)("p",null,"An error occurred: "+(0,o.v_)(ht.error),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",p,[(0,s.Lk)("div",m,[(0,s.Lk)("nav",g,[(0,s.Lk)("ol",b,[(0,s.Lk)("li",null,[(0,s.bF)(gt,{to:"/",class:"text-[#B8B8B8]"},{default:(0,s.k6)(()=>[...e[10]||(e[10]=[(0,s.eW)("Home",-1)])]),_:1}),e[11]||(e[11]=(0,s.Lk)("span",{class:"mx-2 text-[#B8B8B8]"},">",-1))]),(0,s.Lk)("li",null,[(0,s.bF)(gt,{to:"/"+("live"===ht.product.lot_status?"live-auction":"past-auction"),class:"text-[#B8B8B8]"},{default:(0,s.k6)(()=>[(0,s.eW)((0,o.v_)("live"===ht.product.lot_status?"Live Auction":"Past Auction"),1)]),_:1},8,["to"]),e[12]||(e[12]=(0,s.Lk)("span",{class:"mx-2 text-[#B8B8B8]"},">",-1))]),(0,s.Lk)("li",null,[(0,s.Lk)("span",y,(0,o.v_)(pt.trimmedProductTitle),1)])])])]),ht.product?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.Lk)("div",f,[(0,s.Lk)("div",{class:"image-container border mb-4 border-grey",onMousemove:e[0]||(e[0]=(...t)=>pt.zoomImage&&pt.zoomImage(...t)),onMouseleave:e[1]||(e[1]=(...t)=>pt.resetZoom&&pt.resetZoom(...t)),ref:"imageContainer"},[ht.selectedImage?((0,s.uX)(),(0,s.CE)("img",{key:0,src:`${ht.ImgURL}/${ht.selectedImage.path}?s=800`,alt:"Product Image",class:"w-full object-cover zoom",style:{width:"100%"},width:"800",height:"800",ref:"zoomImage"},null,8,w)):((0,s.uX)(),(0,s.CE)("img",v,null,512))],544),(0,s.Lk)("div",x,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ht.product.images,(t,e)=>((0,s.uX)(),(0,s.CE)("div",{key:e,class:"cursor-pointer"},[(0,s.Lk)("img",{src:`${ht.ImgURL}/${t.path}?s=150`,alt:"Product Thumbnail",class:(0,o.C4)(["w-24 h-24 object-cover border",{"border-[#8a2432]":ht.selectedImage===t,"border-grey":ht.selectedImage!==t}]),onClick:e=>pt.selectImage(t),width:"96",height:"96"},null,10,L)]))),128))])]),(0,s.Lk)("div",B,[(0,s.Lk)("div",C,[e[14]||(e[14]=(0,s.Lk)("div",{class:""},null,-1)),"live"===ht.product.lot_status?((0,s.uX)(),(0,s.CE)("h6",_,[e[13]||(e[13]=(0,s.Lk)("img",{src:l,alt:"Circle Icon",class:"inline-block blink",style:{width:"20px"},width:"20",height:"20"},null,-1)),(0,s.eW)(" Live Auction ends in "+(0,o.v_)(ht.days)+" Days "+(0,o.v_)(ht.hours)+" Hrs "+(0,o.v_)(ht.minutes)+" Min "+(0,o.v_)(ht.seconds)+" Sec ",1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",A,[(0,s.Lk)("p",null,"Lot # "+(0,o.v_)(ht.product.lot_number),1),(0,s.Lk)("p",P,["live"===ht.product.lot_status?((0,s.uX)(),(0,s.CE)("span",S,(0,o.v_)(ht.isFavorite?"Added to watchlist":"Add to wat
1chlist"),1)):((0,s.uX)(),(0,s.CE)("span",I,[e[15]||(e[15]=(0,s.Lk)("span",null,"End Date:",-1)),(0,s.eW)(" "+(0,o.v_)(pt.formatDate(ht.product.end_date)),1)])),"live"===ht.product.lot_status?((0,s.uX)(),(0,s.CE)("button",{key:2,class:"star-button focus:outline-none",onClick:e[2]||(e[2]=(0,a.D$)((...t)=>pt.handleWishlistClick&&pt.handleWishlistClick(...t),["stop"]))},[(0,s.Lk)("img",{src:ht.isFavorite?i(5719):i(2596),alt:"Favorite",class:"star-icon mb-1",width:"24",height:"24"},null,8,E)])):(0,s.Q3)("",!0)])]),(0,s.Lk)("h1",$,(0,o.v_)(ht.product.lot_title),1),(0,s.Lk)("div",F,[(0,s.Lk)("div",X,[e[16]||(e[16]=(0,s.Lk)("span",{class:"text-[#7A7A7A] text-[14px] nunito-sans-light"},"Starting Bid:",-1)),(0,s.Lk)("span",D,"$"+(0,o.v_)(ht.product.starting_bid),1)]),(0,s.Lk)("div",Q,[(0,s.Lk)("span",T,(0,o.v_)("live"===ht.product.lot_status?"Current Bid:":null===ht.currentBid||0===ht.currentBid?"Status":"Winning Bid:"),1),(0,s.Lk)("span",H,[ht.isLoadingBid?((0,s.uX)(),(0,s.CE)("span",W,"--")):((0,s.uX)(),(0,s.CE)("span",M,(0,o.v_)("live"===ht.product.lot_status?`$${ht.currentBid}`:null===ht.currentBid||0===ht.currentBid?"NotSold":`$${ht.currentBid}`),1))])])]),(0,s.Lk)("div",null,[ht.isLoggedIn&&"live"===ht.product.lot_status?((0,s.uX)(),(0,s.CE)("div",R,[null!==ht.minimumBid?((0,s.uX)(),(0,s.CE)("div",z,[e[17]||(e[17]=(0,s.Lk)("p",{class:"text-[#000] text-sm pr-2"},"Minimum Acceptable Bid",-1)),(0,s.Lk)("p",U,[ht.isLoadingBid?((0,s.uX)(),(0,s.CE)("span",j,"Loading...")):((0,s.uX)(),(0,s.CE)("span",q,"$"+(0,o.v_)(ht.minimumBid),1))])])):(0,s.Q3)("",!0),ht.message?((0,s.uX)(),(0,s.CE)("div",N,["success"===ht.message.type?((0,s.uX)(),(0,s.CE)("p",V,(0,o.v_)(ht.message.text),1)):"info"===ht.message.type?((0,s.uX)(),(0,s.CE)("p",O,(0,o.v_)(ht.message.text),1)):"error"===ht.message.type?((0,s.uX)(),(0,s.CE)("p",K,(0,o.v_)("An error occurred. Please try again."===ht.message.text?"This lot is not active now.":ht.message.text),1)):(0,s.Q3)("",!0),(0,s.Lk)("button",{onClick:e[3]||(e[3]=t=>ht.message=null),class:"absolute right-2 top-2 text-gray-400 hover:text-gray-700 focus:outline-none","aria-label":"Close message"},[...e[18]||(e[18]=[(0,s.Lk)("img",{src:n,alt:"Close",class:"w-3 mt-1 h-3"},null,-1)])])])):(0,s.Q3)("",!0),(0,s.Lk)("div",Z,[(0,s.Lk)("div",Y,[(0,s.Lk)("div",J,[e[19]||(e[19]=(0,s.Lk)("span",{class:"absolute left-4 top-1/2 transform -translate-y-1/2 text-black font-bold"},"$",-1)),(0,s.bo)((0,s.Lk)("input",{type:"text","onUpdate:modelValue":e[4]||(e[4]=t=>ht.bidAmount=t),placeholder:"Enter Bidding Amount",class:"w-full pl-8 px-4 py-2 focus:outline-none focus:ring focus:ring-red-300"},null,512),[[a.Jo,ht.bidAmount]])]),(0,s.Lk)("button",{class:"bg-[#8a2432] text-white px-4 py-2 hover:bg-gray-900 focus:outline-none focus:ring focus:ring-red-400 sm:w-36 sm:mt-0 mt-2 w-full w-auto",onClick:e[5]||(e[5]=(...t)=>pt.placeBid&&pt.placeBid(...t))}," Bid Now ")])]),ht.myStatus?((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,o.C4)([{"text-[#28A34B] border-[#28A34B] bg-[#f0fff5]/10":"winning"===ht.winStatus,"text-[#DA1E28] border-[#DA1E28] bg-[#f0fff5]/10":"winning"!==ht.winStatus},"mt-4 text-sm border py-2 px-4"]),innerHTML:ht.myStatus},null,10,G)):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"view-bid-history-btn mt-4 flex items-center",onClick:e[6]||(e[6]=t=>pt.openBidHistoryPopup(ht.product.id))},[...e[20]||(e[20]=[(0,s.Lk)("img",{src:d,alt:"Bid History",class:"mr-2 w-5 h-5"},null,-1),(0,s.Lk)("span",{class:"text-[#7A7A7A]"}," View Bid History",-1)])])])):"live"===ht.product.lot_status?((0,s.uX)(),(0,s.CE)("div",tt,[(0,s.Lk)("div",et,[e[21]||(e[21]=(0,s.Lk)("p",{class:"text-[24px] raleway-custom uppercase font-normal"},"Want to Bid?",-1)),(0,s.Lk)("button",{class:"bg-[#8a2432] text-white px-6 py-2 hover:bg-[black] focus:outline-none focus:ring focus:ring-blue-400",onClick:e[7]||(e[7]=(...t)=>pt.redirectToLogin&&pt.redirectToLogin(...t))},"Login Now")])])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",null,[(0,s.bF)(bt,{visible:ht.isPopupVisible,lotId:ht.selectedLotId,onClose:pt.closeBidHistoryPopup},null,8,["visible","lotId","onClose"])]),(0,s.Lk)("div",it,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ht.product.data,(t,e)=>((0,s.uX)(),(0,s.CE)("div",{key:e,class:"flex justify-between"},[(0,s.Lk)("p",st,(0,o.v_)(t.label)+":",1),(0,s.Lk)("div",ot,[(0,s.Lk)("p",at,(0,o.v_)(t.title||"--"),1)])]))),128))])])])):(0,s.Q3)("",!0),ht.product?((0,s.uX)(),(0,s.CE)("div",rt,[(0,s.Lk)("div",lt,[(0,s.Lk)("button",{onClick:e[8]||(e[8]=t=>ht.activeTab="description"),class:(0,o.C4)([{"border-b-2 border-gray-800 text-gray-800 font-semibold":"description"===ht.activeTab},"pb-2"])},"Description",2)]),"description"===ht.activeTab?((0,s.uX)(),(0,s.CE)("div",nt,[(0,s.Lk)("p",{innerHTML:ht.product.long_description},null,8,dt)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e[22]||(e[22]=(0,s.Lk)("div",{class:"bg-[#f3e9ea] mt-10 p-8 text-[#8a2432] text-[14px]"},[(0,s.Lk)("p",null,[(0,s.Lk)("strong",null,"Note: "),(0,s.eW)("Please closely examine the images provided in this lot prior to placing a bid. High resolution images are provided when viewing from a computer. All lots being sold are second hand in nature and all condition defects are not specifically listed in the lot description. Lots will be sold as seen in the images provided on each lot.")])],-1)),(0,s.Lk)("div",ct,[ht.relatedProducts&&ht.relatedProducts.length>0?((0,s.uX)(),(0,s.Wv)(yt,{key:0,products:ht.relatedProducts,auctionStatus:ht.auctionStatus,wishlist:ht.wishlist,onUpdateSlug:pt.updateSlug,onShowQuickBid:pt.showQuickBidPopup},null,8,["products","auctionStatus","wishlist","onUpdateSlug","onShowQuickBid"])):(0,s.Q3)("",!0)]),ht.showQuickBid?((0,s.uX)(),(0,s.CE)("div",{key:2,class:"quick-bid-overlay",onClick:e[9]||(e[9]=(0,a.D$)((...t)=>pt.closeQuickBidPopup&&pt.closeQuickBidPopup(...t),["self"]))}
1,[(0,s.bF)(kt,{slug:ht.selectedProductSlug,onClose:pt.closeQuickBidPopup},null,8,["slug","onClose"])])):(0,s.Q3)("",!0),ht.showBidConfirmation&&ht.bidConfirmItem?((0,s.uX)(),(0,s.Wv)(ft,{key:3,title:ht.bidConfirmItem.lot_title,bidAmount:parseFloat(ht.bidConfirmItem.bidAmount),slug:ht.bidConfirmItem.slug,onConfirm:pt.confirmBid,onDecline:pt.declineBid},null,8,["title","bidAmount","slug","onConfirm","onDecline"])):(0,s.Q3)("",!0)])]),(0,s.bF)(wt)],64)}var ht=i(592),pt=i(4910),mt=i(8110);const gt={key:0,class:"wrapper mx-auto"},bt={class:"container mx-auto"},yt={key:1,class:"navigation-arrows flex justify-center mt-4"};function kt(t,e,i,o,a,r){const l=(0,s.g2)("SwiperSlide"),n=(0,s.g2)("Swiper");return i.products&&i.products.length>0?((0,s.uX)(),(0,s.CE)("div",gt,[(0,s.Lk)("div",bt,[e[3]||(e[3]=(0,s.Lk)("h2",{class:"raleway-custom text-[24px] mb-4"},"Here are some related items",-1)),r.limitedProducts.length>0?((0,s.uX)(),(0,s.Wv)(n,{key:0,ref:"mySwiper",slidesPerView:4,spaceBetween:1,loop:!0,autoplay:{delay:2e3,disableOnInteraction:!1},breakpoints:{1200:{slidesPerView:4},1024:{slidesPerView:3},480:{slidesPerView:2},300:{slidesPerView:1}},class:"slider3",onSwiper:r.onSwiper},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(r.limitedProducts,o=>((0,s.uX)(),(0,s.Wv)(l,{key:o.id,class:"pr-4 ps-1 my-2 product-slide"},{default:(0,s.k6)(()=>[((0,s.uX)(),(0,s.Wv)((0,s.$y)("live"===o.lot_status?"LiveCard":"ProductCard"),{product:o,wishlist:i.wishlist,onShowQuickBid:e[0]||(e[0]=e=>t.$emit("show-quick-bid",e))},null,40,["product","wishlist"]))]),_:2},1024))),128)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(r.emptySlots,t=>((0,s.uX)(),(0,s.Wv)(l,{key:"empty-"+t,class:"pr-4 ps-1 pt-2 product-slide"}))),128))]),_:1},8,["onSwiper"])):(0,s.Q3)("",!0),i.products.length>4?((0,s.uX)(),(0,s.CE)("div",yt,[(0,s.Lk)("button",{class:"prev",onClick:e[1]||(e[1]=(...t)=>r.prevSlide&&r.prevSlide(...t))},"â®"),(0,s.Lk)("button",{class:"next",onClick:e[2]||(e[2]=(...t)=>r.nextSlide&&r.nextSlide(...t))},"â¯")])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)}var ft=i(8179),wt=i(9014),vt=i(1710),xt=i(9025),Lt=i(6654),Bt={components:{Swiper:ft.RC,SwiperSlide:ft.qr,LiveCard:wt.A,ProductCard:vt.A,QuickBidCard:xt.A},props:{lotSlug:{type:String,required:!0},products:{type:Array,required:!0},auctionStatus:{type:String,required:!0},wishlist:{type:Array,required:!0}},data(){return{swiper:null,showQuickBid:!1,selectedProductSlug:null}},computed:{limitedProducts(){return this.products.slice(0,6)},emptySlots(){return Math.max(0,4-this.limitedProducts.length)}},methods:{onSwiper(t){this.swiper=t},prevSlide(){this.swiper&&this.swiper.slidePrev()},nextSlide(){this.swiper&&this.swiper.slideNext()},showQuickBidPopup(t){this.selectedProductSlug=t,this.showQuickBid=!0},closeQuickBidPopup(){this.showQuickBid=!1,this.selectedProductSlug=null},initializePusher(){(0,Lt.U)("my-channel","my-event",this.updateBidDetails)},updateBidDetails(t){this.products.forEach(e=>{e.id==t.bid.lot_id&&(e.current_bid_amount=t.bid.bid_amount)})}},mounted(){this.initializePusher()}},Ct=i(6262);const _t=(0,Ct.A)(Bt,[["render",kt]]);var At=_t,Pt=i.p+"img/Refresh.f6223641.svg";const St={class:"flex justify-between items-center mb-4"},It={class:"flex items-center space-x-4"},Et={key:0,class:"flex flex-col justify-center items-center py-10"},$t={key:1,class:"content max-h-80 overflow-y-auto"},Ft={key:0,class:"w-full text-left border-collapse"},Xt={class:"py-3 px-4"},Dt={class:"py-3 px-4"},Qt={class:"py-3 px-4"},Tt={key:1,class:"text-gray-600 text-center py-4"};function Ht(t,e,i,r,l,d){const c=(0,s.g2)("LoadingSpinner");return i.visible?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"fixed inset-0 bg-black bg-opacity-60 flex justify-center items-center z-50",onClick:e[3]||(e[3]=(...t)=>d.handleBackdropClick&&d.handleBackdropClick(...t))},[(0,s.Lk)("div",{class:"bg-white p-6 w-11/12 max-w-4xl shadow-lg",onClick:e[2]||(e[2]=(0,a.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",St,[e[6]||(e[6]=(0,s.Lk)("h3",{class:"text-xl font-semibold"},"Bid History",-1)),(0,s.Lk)("div",It,[(0,s.Lk)("button",{onClick:e[0]||(e[0]=(...t)=>d.loadBidHistory&&d.loadBidHistory(...t)),class:"text-lg text-black flex items-center space-x-1"},[...e[4]||(e[4]=[(0,s.Lk)("img",{src:Pt,alt:"Refresh",class:"w-4 h-4 mr-1"},null,-1),(0,s.Lk)("span",{class:"text-sm"},"Refresh",-1)])]),(0,s.Lk)("button",{onClick:e[1]||(e[1]=(...t)=>d.close&&d.close(...t)),class:"text-lg text-black"},[...e[5]||(e[5]=[(0,s.Lk)("img",{src:n,alt:"Close",class:"w-4 h-4 mr-2"},null,-1)])])])]),l.loading?((0,s.uX)(),(0,s.CE)("div",Et,[(0,s.bF)(c),e[7]||(e[7]=(0,s.Lk)("p",{class:"text-gray-500 text-sm"},"Loading bid history, please wait...",-1))])):((0,s.uX)(),(0,s.CE)("div",$t,[l.bids.length?((0,s.uX)(),(0,s.CE)("table",Ft,[e[8]||(e[8]=(0,s.Lk)("thead",null,[(0,s.Lk)("tr",{class:"border-b text-sm font-medium"},[(0,s.Lk)("th",{class:"py-2 px-4 nunito-sans-light text-gray-500"},"Bidder Name"),(0,s.Lk)("th",{class:"py-2 px-4 nunito-sans-light text-gray-500"}
1,"Bidding Amount"),(0,s.Lk)("th",{class:"py-2 px-4 nunito-sans-light text-gray-500"},"Placed On")])],-1)),(0,s.Lk)("tbody",null,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(l.bids,(t,e)=>((0,s.uX)(),(0,s.CE)("tr",{key:t.id,class:(0,o.C4)([{"bg-gray-100":e%2===0,"bg-white":e%2!==0},"hover:bg-gray-50 transition-colors"])},[(0,s.Lk)("td",Xt,(0,o.v_)(t.user_name),1),(0,s.Lk)("td",Dt,"$"+(0,o.v_)(t.bid_amount),1),(0,s.Lk)("td",Qt,(0,o.v_)(d.formatDateTime(t.bid_datetime)),1)],2))),128))])])):((0,s.uX)(),(0,s.CE)("p",Tt,"No bid history available."))]))])])):(0,s.Q3)("",!0)}var Wt=i(8987),Mt=i(8523),Rt={props:{visible:Boolean,lotId:Number},data(){return{bids:[],loading:!1,isLoggedIn:!!Wt.A.get("token"),pusherSubscription:null}},components:{LoadingSpinner:ht.A},watch:{visible(t){t?(this.loadBidHistory(),this.initializePusherConnection()):this.unsubscribePusher()}},methods:{async loadBidHistory(){this.loading=!0;const t=Wt.A.get("token");if(t)try{const e=await pt.Ay.get(`/bids/${this.lotId}`,{headers:{Authorization:`Bearer ${t}`}});this.bids=e.data&&e.data.data?e.data.data:[]}catch(e){console.error("Error fetching bid history:",e),this.bids=[]}finally{this.loading=!1}else this.$router.push("/login")},formatDateTime:Mt.r,close(){this.$emit("close")},handleBackdropClick(t){t.target===t.currentTarget&&this.close()},initializePusherConnection(){this.pusherSubscription&&this.pusherSubscription.unsubscribe();const t=this;this.pusherSubscription=(0,Lt.U)("my-channel","my-event",e=>{console.log("Received message in BidHistoryPopup:",e),e&&e.bid&&e.bid.lot_id==t.lotId&&t.loadBidHistory()})},unsubscribePusher(){this.pusherSubscription&&(this.pusherSubscription.unsubscribe(),this.pusherSubscription=null)}},beforeDestroy(){this.unsubscribePusher()}};const zt=(0,Ct.A)(Rt,[["render",Ht],["__scopeId","data-v-44ee058a"]]);var Ut=zt,jt=i(2536),qt=i(5246),Nt={components:{SiteFooter:mt.A,RelatedSlider:At,BidHistoryPopup:Ut,LoadingSpinner:ht.A,QuickBidCard:xt.A,BidConfirmation:jt.A},metaInfo(){return{title:this.product?.seo_title||this.product?.lot_title,meta:[{name:"description",content:this.product?.seo_description},{name:"keywords",content:this.product?.meta_keywords},{property:"og:title",content:this.product?.seo_title||this.product?.lot_title},{property:"og:description",content:this.product?.seo_description||""},{property:"og:image",content:this.product?.og_image_url?`${this.$baseURL}/storage/${this.product.og_image_url}`:""}],link:[{rel:"canonical",href:this.product?.canonical_url||window.location.href}]}},data(){return{ImgURL:pt.lc,isFavorite:!1,wishlist:[],product:{data:[]},dynamicLotSlug:this.$route.params.slug,isLoggedIn:!1,isLoadingProduct:!0,isLoadingBid:!0,message:null,activeTab:"description",bidAmount:null,isPopupVisible:!1,selectedLotId:null,currentBid:null,minimumBid:null,selectedImage:null,relatedProducts:[],auctionStatus:"",showQuickBid:!1,selectedProductSlug:null,countdownInterval:null,days:0,hours:0,minutes:0,seconds:0,hasFetchedProductDetails:!1,hasFetchedRelatedProducts:!1,hasFetchedBidDetails:!1,myStatus:null,winStatus:null,current_winner:null,storedUid:Wt.A.get("uid"),incomingUid:null,error:null,showBidConfirmation:!1,bidConfirmItem:null}},watch:{"$route.params.slug":{handler(t,e){t!==e&&(this.dynamicLotSlug=decodeURIComponent(t),this.isLoadingProduct=!0,this.hasFetchedProductDetails=!1,this.hasFetchedRelatedProducts=!1,this.hasFetchedBidDetails=!1,this.message=null,this.fetchProductDetails())},immediate:!0}},mounted(){const t=decodeURIComponent(this.$route.params.slug);this.dynamicLotSlug=t,this.isLoggedIn=!!Wt.A.get("token"),this.fetchProductDetails(),this.startCountdown(),this.initializePusher(),document.title="Lot Detail",document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){clearInterval(this.countdownInterval),document.removeEventListener("click",this.handleClickOutside)},created(){this.getWishlist()},computed:{trimmedProductTitle(){return this.product.lot_title&&this.product.lot_title.length>20?this.product.lot_title.substring(0,20)+"....":this.product.lot_title||""}},methods:{redirectToLogin(){this.$router.push("/login")},async placeBid(){this.message=null;const t=parseFloat(this.bidAmount);if(!this.bidAmount||isNaN(t)||t<=0)return this.message={text:"Please enter a valid bid amount.",type:"error"},void this.autoHideMessage();if(t<this.minimumBid)return this.message={text:`Please enter a bid of at least $${this.minimumBid}.`,type:"error"},void this.autoHideMessage();const e=Wt.A.get("token");if(!e)return this.message={text:"You are not authenticated. Please log in.",type:"error"},this.autoHideMessage(),void setTimeout(()=>{this.$router.push({name:"LoginUser"})},2e3);this.bidConfirmItem={...this.product,bidAmount:this.bidAmount},this.showBidConfirmation=!0},async confirmBid(){const t=parseFloat(this.bidConfirmItem.bidAmount),e=Wt.A.get("token");this.showBidConfirmation=!1;this.bidConfirmItem;this.bidConfirmItem=null,this.loading=!0;try{const i=await pt.Ay.post("/bids",{auction_id:this.product.auction_id,lot_id:this.product.id,bid_amount:t},{headers:{Authorization:`Bearer ${e}`}});i.data.success?(i.data.info?this.message={text:i.data.info,type:"info"}:this.message={text:i.data.message,type:"success"},this.currentBid=i.data.data.bid.bid_amount,this.minimumBid=i.data.data.minimum_acceptable_bid,this.myStatus=i.data.data.my_status,this.bidAmount="",this.winStatus=i.data.data.winstatus,this.current_winner=i.data?.bid?.uid):this.message={text:i.data.message||"Failed to place bid.",type:"error"}}catch(i){console.error("Error placing bid:",i),i.response&&i.response.data&&i.response.data.error?this.message={text:i.response.data.error,type:"error"}:i.message?this.message={text:i.message,type:"error"}:this.message={text:"An error occurred. Please try again.",type:"error"}}finally{this.loading=!1}this.autoHideMessage()},declineBid(){this.showBidConfirmation=!1,this.bidConfirmItem=null},autoHideMessage(){setTimeout(()=>{this.message=null},15e3)}
1,async fetchProductDetails(){if(this.hasFetchedProductDetails)return;this.hasFetchedProductDetails=!0;const t=this.dynamicLotSlug;if(!t)return this.error="Product slug is missing.",void(this.isLoadingProduct=!1);const e=`/lots/detail?s=${t}`;try{const t=await this.retryRequest(()=>pt.Ay.get(e));t.data&&t.data.data&&(this.product=t.data.data,this.auctionStatus=t.data.auction_status||"",this.currentBid=this.product.wining_amount||0,this.product.images&&Array.isArray(this.product.images)&&this.product.images.length>0?(this.product.images=this.product.images.map(t=>(t.path=`storage/${t.path.replace(/^\//,"")}`,t)),this.selectedImage=this.product.images[0]):this.selectedImage=null,this.updateMetaTags(),await this.fetchBidDetails(),setTimeout(()=>{this.fetchRelatedProducts()},0))}catch(i){this.selectedImage=null}finally{this.isLoadingProduct=!1,this.closeQuickBidPopup()}},async fetchRelatedProducts(){if(!this.product.id)return;const t=`lots/${this.product.id}/related`;try{const e=await this.retryRequest(()=>pt.Ay.get(t));e.data&&e.data.data?this.relatedProducts=e.data.data.map(t=>(t.images&&Array.isArray(t.images)?t.images=t.images.map(t=>(t.path=t.path?`${t.path}`:"",t)):t.images=[],t)):this.relatedProducts=[]}catch(e){this.relatedProducts=[]}},async fetchBidDetails(){if(this.hasFetchedBidDetails)return;if(this.hasFetchedBidDetails=!0,!this.product||!this.product.id)return this.currentBid=null,this.minimumBid=null,void(this.isLoadingBid=!1);const t=Wt.A.get("token");if(!t)return this.minimumBid=null,this.myStatus=null,void(this.isLoadingBid=!1);this.isLoadingBid=!0;try{const e=await this.retryRequest(()=>pt.Ay.get(`/bid-details?lot_id=${this.product.id}`,{headers:{Authorization:`Bearer ${t}`}}));e.data?(this.minimumBid=e.data.minimum_bid||0,this.myStatus=e.data.my_status||null,this.current_winner=e.data.uid,this.winStatus=e.data.winstatus||null):(this.minimumBid=null,this.myStatus=null,this.winStatus=null,console.error("Bid details not found."))}finally{this.isLoadingBid=!1}},async retryRequest(t,e=3,i=1e3){for(let o=0;o<e;o++)try{return await t()}catch(s){if(o===e-1)throw s;await new Promise(t=>setTimeout(t,i))}},handleWishlistClick(){const t=Wt.A.get("token");if(!t)return this.showToast("Please log in before adding to the watchlist","info"),void this.$router.push({name:"LoginUser"});this.toggleFavorite()},async getWishlist(){const t=Wt.A.get("token");if(t)try{const e=await pt.Ay.get("/wishlist",{headers:{Authorization:`Bearer ${t}`}});this.wishlist=e.data,this.isFavorite=this.wishlist.some(t=>t.lot_id===this.product.id)}catch(e){console.error("Error fetching watchlist:",e)}else console.error("No token found!")},async toggleFavorite(){try{this.isFavorite?await this.removeFromWishlist():await this.addToWishlist(),this.isFavorite=!this.isFavorite}catch(t){console.error("Failed to update wishlist:",t)}},async addToWishlist(){const t=this.product.id,e=Wt.A.get("token");if(e)try{const i=await pt.Ay.post("/wishlist",{lot_id:t},{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});console.log("Product added to wishlist:",i.data),this.getWishlist(),this.showToast("Added to watchlist !","success")}catch(i){i.response&&400===i.response.status&&i.response.data.message?this.showToast(i.response.data.message,"error"):console.error("Error adding product to Watchlist:",i),await this.getWishlist()}else console.error("No token found!")},async removeFromWishlist(){const t=this.product.id,e=Wt.A.get("token");if(e)try{const i=await pt.Ay.delete(`/wishlist/${t}`,{headers:{Authorization:`Bearer ${e}`}});console.log("Product removed from wishlist:",i.data),this.getWishlist(),this.showToast("Removed from watchlist !","info")}catch(i){console.error("Error removing product from wishlist:",i)}else console.error("No token found!")},openBidHistoryPopup(t){this.selectedLotId=t,this.isPopupVisible=!0},closeBidHistoryPopup(){this.isPopupVisible=!1},showToast(t,e="info"){const i=(0,qt.dj)();"success"===e?i.success(t):"error"===e?i.error(t):i.info(t)},selectImage(t){this.selectedImage=t},updateSlug(t){this.dynamicLotSlug=t,this.fetchProductDetails()},formatDate:Mt.Y,formatDateTime:Mt.r,showQuickBidPopup(t){const e=Wt.A.get("token");if(e)this.selectedProductSlug=t,this.showQuickBid=!0;else{const t=(0,qt.dj)();t.info("Please log in to place a bid."),this.$router.push("/login")}},closeQuickBidPopup(){this.showQuickBid=!1,this.selectedProductSlug=null},startCountdown(){this.countdownInterval=setInterval(()=>{this.updateCountdown()},1e3)},updateCountdown(){if(!this.product||!this.product.end_date)return;const t=new Date(this.product.end_date),e=new Date,i=t-e;if(i<=0)return clearInterval(this.countdownInterval),this.days=this.hours=this.minutes=this.seconds=0,void this.reloadPageData();this.days=Math.floor(i/864e5),this.hours=Math.floor(i%864e5/36e5),this.minutes=Math.floor(i%36e5/6e4),this.seconds=Math.floor(i%6e4/1e3)},async reloadPageData(){this.isLoading=!0,await this.fetchProductDetails(),this.isLoading=!1},initializePusher(){(0,Lt.U)("my-channel","my-event",this.updateBidDetails)},updateBidDetails(t){this.product&&this.product.id==t.bid.lot_id&&(this.currentBid=t.bid.bid_amount,this.minimumBid=t.minimum_acceptable_bid,Wt.A.get("uid")==t.bid.uid&&t.bid.uid>0&&(this.winStatus="winning",this.myStatus=t.winmsg),Wt.A.get("uid")==t.puid&&t.puid>0&&(this.winStatus="loosing",this.myStatus=t.loosemsg),this.current_winner=t.bid.uid)},zoomImage(t){const e=this.$refs.zoomImage,i=e.getBoundingClientRect(),s=t.clientX-i.left,o=t.clientY-i.top,a=s/i.width*100,r=o/i.height*100;e.style.transformOrigin=`${a}% ${r}%`,e.style.transform="scale(2)",e.style.cursor="zoom-in"},resetZoom(){const t=this.$refs.zoomImage;t.style.transform="scale(1)",t.style.transformOrigin="center center",t.style.cursor="default"},handleClickOutside(t){const e=this.$refs.imageContainer;e&&!e.contains(t.target)&&this.resetZoom()},updateMetaTags(){if(this.product){const{seo_title:e,seo_description:i,meta_keywords:s,og_image_url:o}=this.product;try{let t=e||this.product.lot_title;t.length>70&&(t=this.product.lot_title),document.title=t,this.updateMetaTag("description",i||e||this.product.lot_title),null!=s&&""!=s&&this.updateMetaTag("keywords",s),this.updateMetaTag("og:title",e||this.product.lot_title),this.updateMetaTag("og:description",i||e||this.product.lot_title),null!=o&&""!=o&&this.updateMetaTag("og:image",o?`${this.$baseURL}/storage/${o}`:"")}catch(t){console.error("Error updating meta tags:",t)}}},updateMetaTag(t,e){let i=document.querySelector(`meta[name="${t}"]`)||document.querySelector(`meta[property="${t}"]`);i?i.setAttribute("content",e):(i=document.createElement("meta"),t.startsWith("og:")?i.setAttribute("property",t):i.setAttribute("name",t),i.setAttribute("content",e),document.head.appendChild(i))}}};const Vt=(0,Ct.A)(Nt,[["render",ut],["__scopeId","data-v-97ec15aa"]]);var Ot=Vt}}]); 2//# sourceMappingURL=8668.e9ecc5df.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.