1"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[3545],{38976(e,t,r){r.r(t),r.d(t,{default:()=>k});var a=r(74848),s=r(96540),o=r(78692),n=r(80736);let d={card:"card-GkT0f7",cardHeader:"cardHeader-PblAa0",table:"table-olpk9x",thead:"thead-VPsrEj",row:"row-gh4IK9",tableFooter:"tableFooter-_wEz1A",orderTotalPlacespace:"orderTotalPlacespace-nby3iZ",firstCellofth:"firstCellofth-cVRQU1",firstCelloftd:"firstCelloftd-T8C9f1",dropdownCell:"dropdownCell-GyhxXc",cardDevider:"cardDevider-l_HiTr",summaryContainer:"summaryContainer-YEK1sF",summaryRow:"summaryRow-qu9hc0",orderPlacespace:"orderPlacespace-hwsGQP",animatedContainer:"animatedContainer-jX1F6V",slideContainer:"slideContainer-hk4u6p",expanded:"expanded-qgK6fd",collapsed:"collapsed-n6T3u6",trackingLink:"trackingLink-lCYydq"};var i=r(79874),l=r(75538);let c=e=>{let{product:t,isStencil:r}=e,[o,c]=(0,s.useState)(!0),u=t.orderDetail.reduce((e,t)=>e+t.tax,0),m=e=>{let{order_detail:s}=e;return(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd} vg-body-font web-body-font web-builder-font-color`,children:(0,a.jsx)("div",{className:(0,i.A)("w-5/6",{"stencil-item":r}),children:s.name})}),(0,a.jsx)("td",{className:"vg-body-font web-body-font web-builder-font-color",children:(0,a.jsx)("div",{className:(0,i.A)({"stencil-item w-1/6":r}),children:s.productQuantity})}),(0,a.jsx)("td",{className:"vg-body-font web-body-font web-builder-font-color unitprice",children:(0,a.jsxs)("div",{className:(0,i.A)({"stencil-item w-1/3":r}),children:[(0,n.Qn)(t.countryId),(s.totalPrice/s.productQuantity).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})}),(0,a.jsx)("td",{className:"vg-body-font web-body-font web-builder-font-color subtotal",children:(0,a.jsxs)("div",{className:(0,i.A)({"stencil-item w-1/3":r}),children:[(0,n.Qn)(t.countryId),s.totalPrice.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]})},p={},b=[];t.orderDetail.forEach(e=>{let t=e.productBundleName;if(t.length>0){let r=t+e.inventoryBundleId;r in p?p[r].orders.push(e):p[r]={quantity:e.bundleQty,bundleName:e.productBundleName,orders:[e]}}else b.push(e)});let h=Object.entries(p).map(e=>{let[t,r]=e;return(0,a.jsxs)(s.Fragment,{children:[(0,a.jsxs)("tr",{className:d.row,style:{position:"relative"},children:[(0,a.jsxs)("td",{className:`${d.dropdownCell} vg-body-font web-body-font web-builder-font-color`,onClick:()=>c(e=>!e),children:[(0,a.jsx)("i",{className:o?"fa-solid fa-caret-down":"fa-solid fa-caret-right",style:{width:"20px"}}),r.bundleName]}),(0,a.jsx)("td",{className:"vg-body-font web-body-font web-builder-font-color",children:r.quantity})]}),(0,a.jsx)("tr",{className:d.animatedContainer,children:(0,a.jsx)("td",{colSpan:4,style:{padding:0,border:"none"},children:(0,a.jsx)("div",{className:`${d.slideContainer} ${o?d.expanded:d.collapsed}`,children:(0,a.jsx)("table",{style:{width:"100%",borderCollapse:"collapse"},children:(0,a.jsx)("tbody",{children:r.orders.map((e,t)=>(0,a.jsx)(m,{order_detail:e},`order-item-${e.strSellProductId}-${t}`))})})})})})]},t)});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:(0,i.A)(d.card,{stenciled:r}),children:[(0,a.jsxs)("div",{className:(0,i.A)(d.cardHeader,{"stencil-item w-1/2":r}),children:[(0,a.jsx)("div",{className:"vg-subheading-font web-subheading-font web-builder-font-color",onClick:(0,l.gK)()?void 0:()=>{window.location.href=`${n._z.SiteName}${t.vagaroURL}`},children:t.businessName}),(0,a.jsxs)(a.Fragment,{children:[t.orderId&&t.orderId>0?(0,a.jsxs)("span",{className:"web-body-font web-builder-font-color",children:["Order #",(0,n.zQ)(t.orderId),void 0!==t.orderDetail&&null!=t.orderDetail&&t.orderDetail.length>0&&(0,a.jsx)(e=>{let{orderDetail:t,shippingMethod:r}=e,o=[];return(0,a.jsxs)(s.Fragment,{children:[t.map((e,t)=>{if(void 0===e.orderTrackingCode||null==e.orderTrackingCode||""==e.orderTrackingCode)return"";o=e.orderTrackingCode.split(",")}),o&&o.some(e=>!!e)&&(0,a.jsxs)("span",{children:[" (Tracking No. ",o.filter(e=>!!e).map((e,t,o)=>{let n=((e,t)=>{if(!e)return"";let r="";switch(t?.toUpperCase()){case"UPS":r=`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e}`;break;case"USPS":r=`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e}`;break;case"FEDEX":r=`https://www.fedex.com/Tracking?action=track&tracknumbers=${e}`;break;case"AUSPOST":r=`https://auspost.com.au/mypost/track/#/details/${e}`;break;default:t?.toLowerCase()==="evri"?r=`https://www.evri.com/track/parcel/${e}
1`:t?.toLowerCase()==="royal mail"&&(r=`https:orderDetail//www.royalmail.com/track-your-item#/tracking-results/${e}`)}return r})(e,r);return(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:d.trackingLink,children:e}),t<o.length-1&&", "]},t)}),")"]})]})},{orderDetail:t.orderDetail,shippingMethod:t?.shippingMethod})]}):""," ",(0,a.jsx)("div",{className:"web-body-font web-builder-font-color",children:(e=>{let{shippingMethod:t,orderStatus:r}=e;if(t)switch(r){case 1:return"Order Status: Pending";case 3:return"Order Status: Shipped";case 5:return"Order Status: Delivered";case 8:return"Order Status: Cancelled";default:return""}return 8===r?"Order Status: Cancelled":""})(t)})," ",!1==t.orderDetail.some(e=>!!e?.orderTrackingCode&&e.orderTrackingCode.split(",").filter(Boolean).length>0)&&t.estimatedPickupDate&&(0,a.jsxs)("span",{className:"vg-body-font web-body-font web-builder-font-color",children:["(Store Pickup ",t.estimatedPickupDate,") "]})]}),(0,a.jsx)("div",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderPlacespace}`,children:`(order placed on ${t.createdDateFormatNew})`})]}),(0,a.jsxs)("table",{className:d.table,children:[(0,a.jsx)("thead",{className:(0,i.A)(d.thead),children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:(0,i.A)("web-subheading-font web-builder-font-color",d.firstCellofth),children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"Item"})}),(0,a.jsx)("th",{className:"web-subheading-font web-builder-font-color",children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"QTY"})}),(0,a.jsx)("th",{className:"web-subheading-font web-builder-font-color",children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"Unit Price"})}),(0,a.jsx)("th",{className:"web-subheading-font web-builder-font-color",children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"Subtotal"})})]})}),(0,a.jsxs)("tbody",{children:[b.map((e,t)=>(0,a.jsx)(m,{order_detail:e},`order-item-${e.strSellProductId}-${t}`)),h]})]}),(0,a.jsx)("table",{className:d.tableFooter,children:(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd}`}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderTotalPlacespace}`,colSpan:2,children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"Sales Tax"})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderTotalPlacespace}`,children:(0,a.jsxs)("span",{className:(0,i.A)({"stencil-item":r}),children:[(0,n.Qn)(t.countryId),u.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]}),0!==t.shippingAmount&&(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd}`}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.shippingAmount}`,colSpan:2,children:(0,a.jsx)("span",{children:"Shipping"})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.shippingAmount}`,children:(0,a.jsxs)("span",{children:[(0,n.Qn)(t.countryId),t.totalShippingAmount.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]}),0!==t.shippingSurcharge&&(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd}`}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.shippingSurcharge}`,colSpan:2,children:(0,a.jsx)("span",{children:"Shipping and Handling"})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.shippingSurcharge}`,children:(0,a.jsxs)("span",{children:[(0,n.Qn)(t.countryId),t.shippingSurcharge.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]}),0!==t.refundAmount&&(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd}`}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderTotalPlacespace}`,colSpan:2,children:(0,a.jsx)("span",{children:"Refund"})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder
1-font-color ${d.orderTotalPlacespace}`,children:(0,a.jsxs)("span",{children:["- ",(0,n.Qn)(t.countryId),(t.refundAmount+t.shippingRefunded).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]}),(0,a.jsxs)("tr",{className:d.row,children:[(0,a.jsx)("td",{className:`${d.firstCelloftd}`}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderTotalPlacespace}`,colSpan:2,children:(0,a.jsx)("span",{className:(0,i.A)({"stencil-item":r}),children:"Total"})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:`vg-body-font web-body-font web-builder-font-color ${d.orderTotalPlacespace}`,children:(0,a.jsxs)("span",{className:(0,i.A)({"stencil-item":r}),children:[(0,n.Qn)(t.countryId),t.totalOrderAmount.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})})]})]})})]}),(0,a.jsx)("div",{className:`cardDeviderLine ${d.cardDevider}`})]})},u={sellProductId:0,strSellProductId:"",orderId:0,strOrderId:"",imagePath:"",name:"",productQuantity:0,totalPrice:0,tax:0,orderStatus:0,inventoryBundleId:0,strInventoryBundleId:"",productBundleName:"",userPaymentId:0,strUserPaymentId:"",bundleQty:0,strUniqueId:""},m={orderId:0,strOrderId:"",productName:"",totalOrderAmount:0,quantity:0,orderDetail:[u,u,u],businessName:"",cdnUrl:"",imagePath:"",createdDate:"",orderStatus:0,totalPage:0,shippingMethod:"",shippingAmount:0,tax:0,vagaroURL:"",refundAmount:0,taxRefund:0,shippingRefunded:0,estimatedPickupDate:"",createdDateFormat:"",countryId:0,strCountryId:"",createdDateFormatNew:"",totalShippingAmount:0,shippingSurcharge:0,sGroup:"",sPagingDetails:"",isFreeShipping:!1,totalDiscount:0,inventoryBundleId:0,strInventoryBundleId:"",userPaymentId:0,strUserPaymentId:"",strUniqueId:"",orderTrackingCode:""};var p=r(89347);let b={pageTitle:"pageTitle-lptQGp"};var h=r(67359),g=r(8221),f=r(28733);class x{static async getProducts(e){return(await g.Ay.post(f.Wn.getProducts(),e)).data.data.response}}var w=r(58011),y=r(55541),j=r(98767),N=r(27291),v=r(99060);let S=Array(12).fill(m),k=()=>
1{let e=(0,v.zy)(),t=(0,v.Zp)(),[r,d]=(0,s.useState)(1),i=+(1!==r),{items:u,hasMore:g,initialFetchDone:f,loadMore:k,isError:P}=(0,h.X)({fetcher:(e,t)=>x.getProducts({...t,pageNumber:e}),queryKey:{resource:N.N.products,params:{pageSize:"12",orderType:i,device:"Website",module:"MyAccount",merchantId:(0,l.IN)()?"QX9p3jq6~mMP6js9ReeSqw==":(0,n.db)(),appNo:(0,l.IN)()?window.BrandedAppBID:null,brandedApp:(0,l.IN)()??!1,multiLocation:!!(0,l.gK)()}},initialPage:1,pageSize:12,onSuccess:(e,t)=>{},onError:(e,t)=>{w.oR.error(e.message)}});(0,s.useEffect)(()=>{window.scrollTo(0,0)},[]);let C=0!==u.length||g?(0,a.jsx)("p",{style:{textAlign:"center"},children:(0,a.jsx)(y.A,{})}):(0,a.jsx)(p.A,{icon:"inventory",title:"No Products",message:0===i?"You have not purchased any products. Order products now and track pending orders here.":"You have not purchased any products. Order products now and track orders here."});return window.scrollEventBack=function(e){g&&k()},(0,s.useEffect)(()=>{e.pathname.endsWith("/products")?d(1):e.pathname.endsWith("/products/history")&&d(2)},[e]),(0,a.jsxs)("div",{className:`vg-body-font web-builder-font-color web-body-font MyaccountWrapper ${b.productsPage}`,children:[(0,a.jsx)("div",{className:`${b.pageTitle} vg-display-large web-builder-font-color`,children:"Products"}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.hg,{ActiveTab:r,BottomBorder:!0,Name:[{id:1,name:"Pending Order"},{id:2,name:"Order History"}],NoOfTab:"2",TabPosition:"center",TabSize:"large",TabVariant:"horizontal",onClick:e=>{t(2===e?"/myaccount/products/history"+(0,n.X_)():"/myaccount/products"+(0,n.X_)()),d(e)},FullWidth:!0}),(0,a.jsx)(o.A,{dataLength:f?u.length:12,next:k,hasMore:g,loader:!P&&(0,a.jsx)(c,{product:m,isStencil:!0}),endMessage:C,children:(0,a.jsx)("ul",{children:(f?u:S).map((e,t)=>(0,a.jsx)(c,{product:e,isStencil:!f},`${r}-${e.orderId}-${t}`))})})]})]})}}}]);
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.