PageSourceSearch

https://tradmarket.com/static/js/OffersPage.40dfb049.chunk.js

js tradmarket.com collected 2026-09-27 10:01:15 UTC 30,693 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3849],{37335:(e,t,a)=>{a.d(t,{ZP:()=>N,Kj:()=>b});var i=a(72791),r=a(42789),n=a(55269),o=a(81694),s=a.n(o),l=a(81420),c=a(29305),d=(a(73665),a(35074)),u=a(84480),g=a(79908),_=a(66319),m=a(82795);const f="EditListingPricingAndStockForm_root__8tNSa",p="EditListingPricingAndStockForm_error__aEh-Z",P="EditListingPricingAndStockForm_input__GHjmu",v="EditListingPricingAndStockForm_unitTypeHidden__L-lUm",E="EditListingPricingAndStockForm_stockHelp__w4nzn",h="EditListingPricingAndStockForm_submitButton__8lPlx",{Money:L}=_.V5,b=(e,t,a)=>{const i=a.formatMessage({id:"EditListingPricingAndStockForm.priceRequired"}),r=u.C1(i),n=new L(e,t),o=(0,g.lb)(a,n),s=a.formatMessage({id:"EditListingPricingAndStockForm.priceTooLow"},{minPrice:o}),l=u.i2(s,e);return e?u.A3(r,l):r},O=e=>i.createElement(n.l0,Object.assign({},e,{render:e=>{const{formId:t,autoFocus:a,className:r,disabled:o,ready:g,handleSubmit:_,intl:L,invalid:O,pristine:N,marketplaceCurrency:y,unitType:k,listingMinimumPriceSubUnits:C,listingType:S,saveActionMsg:A,updated:M,updateInProgress:I,fetchErrors:F}=e,T=b(C,y,L),x="multipleItems"===(null===S||void 0===S?void 0:S.stockType),D=u.C1(L.formatMessage({id:"EditListingPricingAndStockForm.stockIsRequired"})),H=u.DG(L.formatMessage({id:"EditListingPricingAndStockForm.stockMinimum"}),1),w=(Z=L.formatMessage({id:"EditListingPricingAndStockForm.stockMaximum"}),R=1e4,e=>{const t=Number.parseInt(e,10);return!Number.isNaN(t)&&t>R?Z:void 0});var Z,R;const B=u.A3(D,H,w),U=s()(f,r),W=M&&N||g,q=I,Y=O||o||q,{updateListingError:V,showListingsError:z,setStockError:$}=F||{},j=(0,d.zv)($)?L.formatMessage({id:"EditListingPricingAndStockForm.oldStockTotalWasOutOfSync"}):L.formatMessage({id:"EditListingPricingAndStockForm.stockUpdateFailed"});return i.createElement(m.l0,{onSubmit:_,className:U},V?i.createElement("p",{className:p},i.createElement(c._H,{id:"EditListingPricingAndStockForm.updateFailed"})):null,z?i.createElement("p",{className:p},i.createElement(c._H,{id:"EditListingPricingAndStockForm.showListingFailed"})):null,i.createElement(m.VU,{id:"".concat(t,"price"),name:"price",className:P,autoFocus:a,label:L.formatMessage({id:"EditListingPricingAndStockForm.pricePerProduct"},{unitType:k}),placeholder:L.formatMessage({id:"EditListingPricingAndStockForm.priceInputPlaceholder"}),currencyConfig:l.Z.getCurrencyFormatting(y),validate:T}),x?i.createElement(i.Fragment,null,i.createElement(m.gC,{className:P,id:"stock",name:"stock",label:L.formatMessage({id:"EditListingPricingAndStockForm.stockLabel"}),placeholder:L.formatMessage({id:"EditListingPricingAndStockForm.stockPlaceholder"}),type:"number",min:1,max:1e4,validate:B}),i.createElement("p",{className:E},i.createElement(c._H,{id:"EditListingPricingAndStockForm.stockHelp"}))):i.createElement(n.gN,{id:"stock",name:"stock",type:"hidden",className:v},(e=>i.createElement("input",null===e||void 0===e?void 0:e.input))),$?i.createElement("p",{className:p},j):null,i.createElement(m.zx,{className:h,type:"submit",inProgress:q,disabled:Y,ready:W},A))}}));O.defaultProps={fetchErrors:null,listingMinimumPriceSubUnits:0,formId:"EditListingPricingAndStockForm"};const N=(0,r.qC)(c.XN)(O)},70059:(e,t,a)=>{a.d(t,{Ib:()=>E,MT:()=>v,h2:()=>y,ip:()=>b,j3:()=>L,kN:()=>h,mf:()=>N});var i=a(6515),r=a(83738),n=a(72791),o=a(29305),s=a(66319),l=a(53002),c=a(79908),d=a(53176),u=a(21102),g=a(82795),_=a(618),m=a(77352),f=a(96885);const p=["bookingDates","bookingStartTime","bookingEndTime","bookingStartDate","bookingEndDate","quantity","deliveryMethod"],{UUID:P}=s.V5,v=(e,t,a)=>{if(e&&e.currency===t){const t=(0,c.lb)(a,e);return{formattedPrice:t,priceTitle:t}}return e?{formattedPrice:"(".concat(e.currency,")"),priceTitle:"Unsupported currency (".concat(e.currency,")")}:{}},E=(e,t)=>(e.images||[]).map((e=>{const a=e.attributes.variants,i=a?a[t]:null,r=e.attributes.sizes,n=r?r.find((e=>e.name===t)):null;return i||n})).filter((e=>null!=e)),h=e=>()=>{const{history:t,params:a,currentUser:i,callSetInitialValues:r,location:n,routes:o,setInitialValues:s,setInquiryModalOpen:c}=e;if(i)c(!0);else{const e={from:"".concat(n.pathname).concat(n.search).concat(n.hash)};r(s,{inquiryModalOpenForListingId:a.id}),t.push((0,l.EW)("SignupPage",o,{},{}),e)}},L=e=>t=>{const{history:a,params:i,getListing:r,onSendInquiry:n,routes:o,setInquiryModalOpen:s}=e,c=r(new P(i.id)),{message:d}=t;n(c,d.trim()).then((e=>{s(!1),a.push((0,l.EW)("OrderDetailsPage",o,{id:e.uuid},{}))})).catch((()=>{}))},b=e=>t=>{const{history:a,params:n,currentUser:o,getListing:s,from_address:c,
1cartItems:g,offerParams:_,callSetInitialValues:m,onInitializeCardPaymentData:v,routes:E,author:h}=e,L=s(new P(n.id)),b=(0,f.hJ)(L);try{L.author||(L.author=h);const{bookingDates:e,bookingStartTime:n,bookingEndTime:s,bookingStartDate:f,bookingEndDate:P,quantity:O,deliveryMethod:N=b}=t,y=(0,r.Z)(t,p),k=e?{bookingDates:{bookingStart:e.startDate,bookingEnd:e.endDate}}:n&&s?{bookingDates:{bookingStart:(0,d.Ft)(n),bookingEnd:(0,d.Ft)(s)}}:{},C=Number.parseInt(O,10),S=Number.isInteger(C)?{quantity:C}:{quantity:1},A=N?{deliveryMethod:N}:{},M=S.quantity||1,I=(null!==g&&void 0!==g?g:[]).map((e=>(0,i.Z)((0,i.Z)({},e),{},{stockCount:e.stockCount>1?e.stockCount:M}))),F={listing:L,orderData:(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},k),S),A),y),{},{from_address:c,cartItems:I,offerParams:_}),confirmPaymentError:null},T=!o,{setInitialValues:x}=(0,l.dI)("CheckoutPage",E);m(x,F,T),v(),a.push((0,l.EW)("CheckoutPage",E,{id:L.id.uuid,slug:(0,u.qi)(L.attributes.title)},{}))}catch(O){}},O=e=>{const{title:t,topbar:a,scrollingDisabled:i,children:r}=e;return n.createElement(g.T3,{title:t,scrollingDisabled:i},n.createElement(g.ip,{topbar:a,footer:n.createElement(_.Z,null)},r))},N=e=>{const{topbar:t,scrollingDisabled:a,intl:i}=e;return n.createElement(O,{title:i.formatMessage({id:"ListingPage.errorLoadingListingTitle"}),topbar:t,scrollingDisabled:a},n.createElement("p",{className:m.Z.errorText},n.createElement(o._H,{id:"ListingPage.errorLoadingListingMessage"})))},y=e=>{const{topbar:t,scrollingDisabled:a,intl:i}=e;return n.createElement(O,{title:i.formatMessage({id:"ListingPage.loadingListingTitle"}),topbar:t,scrollingDisabled:a},n.createElement("p",{className:m.Z.loadingText},n.createElement(o._H,{id:"ListingPage.loadingListingMessage"})))}},50907:(e,t,a)=>{a.d(t,{Z:()=>p});var i=a(72791),r=a(42789),n=a(55269),o=a(81694),s=a.n(o),l=a(29305),c=(a(84480),a(73665),a(82795));const d={root:"Offers_root__QUFcA",icon:"Offers_icon__ZG5EV",heading:"Offers_heading__n9Ak1 marketplaceModalTitleStyles",field:"Offers_field__reOOA",error:"Offers_error__+9iN8",submitBtn:"Offers_submitBtn__PLeB0",actionBtns:"Offers_actionBtns__Hi-bz"};var u=a(43755),g=a(81420),_=a(37335);const m=e=>i.createElement(n.l0,Object.assign({},e,{render:e=>{const{rootClassName:t,className:a,handleSubmit:r,intl:n,listingTitle:o,authorDisplayName:m,sendEnquiryError:f,invali
1d:p,inquiryInProgress:P}=e,v=s()(t||d.root,a),E=(0,_.Kj)(0,"USD",n);return i.createElement(c.l0,{className:v,onSubmit:r,enforcePagePreloadFor:"OrderDetailsPage"},i.createElement(u.Z,{className:d.icon}),i.createElement("h2",{className:d.heading},i.createElement(l._H,{id:"OfferForm.heading",values:{listingTitle:o,authorDisplayName:m}})),i.createElement(c.VU,{id:"price",name:"price",className:d.input,currencyConfig:g.Z.getCurrencyFormatting("USD"),validate:E}),i.createElement("div",{className:d.actionBtns},f?i.createElement("p",{className:d.error},i.createElement(l._H,{id:"OfferForm.sendEnquiryError"})):null,i.createElement(c.KM,{className:d.submitBtn,type:"submit",inProgress:P,disabled:p},i.createElement(l._H,{id:"OfferForm.submitButtonText"}))))}}));m.defaultProps={rootClassName:null,className:null,submitButtonWrapperClassName:null,inProgress:!1,sendEnquiryError:null};const f=(0,r.qC)(l.XN)(m);f.displayName="OfferForm";const p=f},99415:(e,t,a)=>{a.r(t),a.d(t,{OfferCard:()=>De,OfferItem:()=>He,OfferTableRow:()=>xe,OffersPageComponent:()=>we,default:()=>Ze});var i=a(6515),r=a(72791),n=a(42789),o=a(47375),s=a(81694),l=a.n(s),c=a(6639),d=a(29305),u=(a(73665),a(25863)),g=a(82795),_=a(26634),m=a(618),f=a(58272),p=a(96885),P=a(72426),v=a.n(P),E=a(12093),h=a(32628),L=a(53002),b=a(43093),O=a(21102),N=a(50907),y=a(53176),k=a(44425),C=a(46902),S=a(56443),A=a(26871),M=a(62260),I=a(70059);const F="OffersPage_messagePanel__lYZEP",T="OffersPage_listingPanel__9x5Vc",x="OffersPage_headingWrapper__-SJp0",D="OffersPage_noResultsContainer__a4Zqt",H="OffersPage_sectionHeading__HKHEg",w="OffersPage_noResultsDescription__ReRrx",Z="OffersPage_pagination__1rYh7",R="OffersPage_tableWrapper__vHQEb",B="OffersPage_offersTable__puyZl",U="OffersPage_tableHeader__3sKhg",W="OffersPage_tableRow__b6SsJ",q="OffersPage_tableCell__CvHI7",Y="OffersPage_colImage__YRVXH",V="OffersPage_colTitle__bK-ER",z="OffersPage_colListingPrice__Y6Jby",$="OffersPage_colOfferPrice__OUbyd",j="OffersPage_colStatus__yIG3s",G="OffersPage_colStore__nUFTB",K="OffersPage_tableThumbnail__ASEWb",J="OffersPage_tableTitleLink__RlSip",X="OffersPage_tablePrice__oEa0J",Q="OffersPage_tableOfferPrice__ba8rH",ee="OffersPage_statusBadge__gkbmN",te="OffersPage_statusOffered__p3kd9",ae="OffersPage_statusAccepted__i1zna",ie="OffersPage_statusDeclined__AZHId",re="OffersPage_statusExpired__lkXUE",ne="OffersPage_storeCell__m9Js8",oe="OffersPage_storeAvatar__90wII",se="OffersPage_storeName__nlrcL",le="OffersPage_offerCard__4Mx2e",ce="OffersPage_cardHeader__XrV6P",de="OffersPage_cardImage__o30Dp",ue="OffersPage_cardInfo__EeKij",ge="OffersPage_cardTitle__KVuZ5",_e="OffersPage_cardListingPrice__eZOxD",me="OffersPage_cardDetails__ASCTK",fe="OffersPage_cardOfferPrice__7Mmxj",pe="OffersPage_cardStore__41Vgc",Pe="OffersPage_submitBtn__i3dwp",ve="OffersPage_offerModalContent__VBdT8",Ee="OffersPage_offerModalImg__KHdAJ",he="OffersPage_offerButtons__58f31",Le="OffersPage_counter__hKsel",be="OffersPage_showMore__YZaim";var Oe;const Ne=(0,y.f)(),ye=null===(Oe=(0,A.Yt)("default-purchase"))||void 0===Oe?void 0:Oe.transitions,ke=ye.TRANSITION_ACCEPT_OFFER,Ce=ye.TRANSITION_SEND_OFFER,Se=ye.TRANSITION_DECLINE_OFFER,Ae=ye.TRANSITION_COUNTER_OFFER,Me=ye.TRANSITION_ACCEPT_AFTER_COUNTER_OFFER,Ie=ye.TRANSITION_DECLINE_AFTER_COUNTER_OFFER,Fe=(e,t,a)=>{var i,r,n,o;const s=(null===t||void 0===t||null===(i=t.customer)||void 0===i||null===(r=i.id)||void 0===r?void 0:r.uuid)===(null===a||void 0===a||null===(n=a.id)||void 0===n?void 0:n.uuid),l=null===t||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.createdAt,c=(0,y.vc)(l,Ne);switch(e){case Ce:const e=v()(c).add(24,"hours"),a=v().duration(null===e||void 0===e?void 0:e.diff(v()())).asHours(),i=a<=0;let r;if(i)r="Offer has expired";else{const e=Math.ceil(a),t=1===e?"hour":"hours";r="Offer expires in ".concat(e," ").concat(t)}return{initial:!0,message:r,status:"offered",showActionBar:!s,showExploreMore:i,color:"#f77f00",title:s?i?"Your offer of $".concat((0,p.ph)(t)," has expired."):"You\u2019ve made an offer for $".concat((0,p.ph)(t),". Your offer is valid for 24 hours. You will be notified with the seller response."):"You have received an offer from ".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer)," for $").concat((0,p.ph)(t),". What would you like to do?")};case ke:return{isAccepted:!0,message:"Offer accepted!",status:"accepted",color:"#1e4c2f",showBuyButton:s,title:s?"Congrats! Your offer has been accepted by ".concat((0,p.MA)(null===t||void 0===t?void 0:t.provider)," for $").concat((0,p.ph)(t),"."):"You have accepted ".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer),"'s offer for $").concat((0,p.ph)(t),"."),description:s?"Please click on the button below to complete the purchase at the accepted price.":"The customer now needs to purchase the item. You can accept other offers in the meantime."};case Se:return{isDeclined:!0,message:"Offer declined.",status:"declined",color:"#59766c",showExploreMore:!0,title:s?"Unfortunately your offer of $".concat((0,p.ph)(t)," has been declined by ").concat((0,p.MA)(null===t||void 0===t?void 0:t.provider)," and n
1o counter offer was provided. You can buy the item at the listed price or explore similar items."):"You declined an offer of $".concat((0,p.ph)(t)," from ").concat((0,p.MA)(null===t||void 0===t?void 0:t.customer))};case Ae:return{isCounter:!0,message:"Counter offer made.",status:"pending",color:"#f77f00",showCounterActions:s,title:s?"Good news! ".concat((0,p.MA)(null===t||void 0===t?void 0:t.provider)," responded to your offer with a counter offer of $").concat((0,p.ph)(t),"."):" You gave an a counter offer of $".concat((0,p.ph)(t)," to ").concat((0,p.MA)(null===t||void 0===t?void 0:t.customer),"."),description:s?"You have 24 hours to accept the offer or it will expire.":"".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer)," has 24 hours to accept or reject your counter offer.")};case Me:return{isAcceptAfterCounter:!0,message:"Counter offer accepted!",status:"accepted",color:"#1e4c2f",showBuyButton:s,title:s?"Congrats! You accepted counter offer by ".concat((0,p.MA)(null===t||void 0===t?void 0:t.provider)," for $").concat((0,p.ph)(t),"."):"Your counter offer has been accepted by ".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer)," for $").concat((0,p.ph)(t),"."),description:s?"You have 24 hours to complete the purchase. Please click on the button below to purchase the item for $".concat((0,p.ph)(t),"."):"".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer)," has 24 hours to purchase before the offer expires.")};case Ie:return{isDeclineAfterCounter:!0,message:"Counter offer declined.",status:"declined",color:"#59766c",showExploreMore:!0,title:s?"You declined counter offer by ".concat((0,p.MA)(null===t||void 0===t?void 0:t.provider)," for $").concat((0,p.ph)(t),"."):"Your counter offer has been declined by ".concat((0,p.MA)(null===t||void 0===t?void 0:t.customer)," for $").concat((0,p.ph)(t),".")};default:return{message:"",status:""}}},Te=(e,t)=>
1t?re:"offered"===(null===e||void 0===e?void 0:e.status)||"pending"===(null===e||void 0===e?void 0:e.status)?te:"accepted"===(null===e||void 0===e?void 0:e.status)?ae:"declined"===(null===e||void 0===e?void 0:e.status)?ie:te,xe=e=>{var t,a,i,n,o,s,c,d,u;const{currentUser:_,tx:m,history:f,onClick:P}=e,{customer:E,provider:h,listing:L}=m,b=(null===_||void 0===_||null===(t=_.id)||void 0===t?void 0:t.uuid)===(null===h||void 0===h||null===(a=h.id)||void 0===a?void 0:a.uuid)?E:h,O=(0,p.ph)(m),N=Fe(null===m||void 0===m||null===(i=m.attributes)||void 0===i?void 0:i.lastTransition,m,_),k=(0,p.MA)(b),C=(0,p.PN)(m),S=(0,p.sC)(m),A=null===m||void 0===m||null===(n=m.attributes)||void 0===n?void 0:n.createdAt,M=(0,y.vc)(A,Ne),I=v()(M).add(24,"hours"),F=v().duration(null===I||void 0===I?void 0:I.diff(v()())).asHours()<=0,T=null!==L&&void 0!==L&&null!==(o=L.attributes)&&void 0!==o&&null!==(s=o.price)&&void 0!==s&&s.amount?(null===L||void 0===L||null===(c=L.attributes)||void 0===c||null===(d=c.price)||void 0===d?void 0:d.amount)/100:0;return r.createElement("tr",{className:W,onClick:P},r.createElement("td",{className:l()(q,Y)},r.createElement("img",{src:C,alt:null===L||void 0===L||null===(u=L.attributes)||void 0===u?void 0:u.title,className:K})),r.createElement("td",{className:l()(q,V)},r.createElement("span",{className:J},S)),r.createElement("td",{className:l()(q,z)},r.createElement("span",{className:X},"$",Number(T)>0?Number(T).toFixed(2):"0.00")),r.createElement("td",{className:l()(q,$)},r.createElement("span",{className:Q},"$",Number(O)>0?Number(O).toFixed(2):"0.00")),r.createElement("td",{className:l()(q,j)},r.createElement("span",{className:l()(ee,Te(N,F))},F||null!==N&&void 0!==N&&N.initial?r.createElement(g.PJ,{name:F?"expiredClock":"clock"}):null,F?"Expired":null===N||void 0===N?void 0:N.message)),r.createElement("td",{className:l()(q,G)},r.createElement("div",{className:ne},r.createElement("span",{className:oe},r.createElement(g.qE,{user:b,disableProfileLink:!0})),r.createElement("span",{className:se},k))))},De=e=>{var t,a,i,n,o,s,c,d,u;const{currentUser:_,tx:m,onClick:f}=e,{customer:P,provider:E,listing:h}=m,L=(null===_||void 0===_||null===(t=_.id)||void 0===t?void 0:t.uuid)===(null===E||void 0===E||null===(a=E.id)||void 0===a?void 0:a.uuid)?P:E,b=(0,p.ph)(m),O=Fe(null===m||void 0===m||null===(i=m.attributes)||void 0===i?void 0:i.lastTransition,m,_),N=(0,p.MA)(L),k=(0,p.PN)(m),C=(0,p.sC)(m),S=null===m||void 0===m||null===(n=m.attributes)||void 0===n?void 0:n.createdAt,A=(0,y.vc)(S,Ne),M=v()(A).add(24,"hours"),I=v().duration(null===M||void 0===M?void 0:M.diff(v()())).asHours()<=0,F=null!==h&&void 0!==h&&null!==(o=h.attributes)&&void 0!==o&&null!==(s=o.price)&&void 0!==s&&s.amount?(null===h||void 0===h||null===(c=h.attributes)||void 0===c||null===(d=c.price)||void 0===d?void 0:d.amount)/100:0;return r.createElement("div",{className:le,onClick:f},r.createElement("div",{className:ce},r.createElement("div",{className:de},r.createElement("img",{src:k,alt:null===h||void 0===h||null===(u=h.attributes)||void 0===u?void 0:u.title})),r.createElement("div",{className:ue},r.createElement("h3",{className:ge},C),r.createElement("p",{className:_e},"Listed: $",Number(F)>0?Number(F).toFixed(2):"0.00"),r.createElement("span",{className:l()(ee,Te(O,I))},I||null!==O&&void 0!==O&&O.initial?r.createElement(g.PJ,{name:I?"expiredClock":"clock"}):null,I?"Expired":null===O||void 0===O?void 0:O.message))),r.createElement("div",{className:me},r.createElement("span",{className:fe},"Offer: $",Number(b)>0?Number(b).toFixed(2):"0.00"),r.createElement("div",{className:pe},r.createElement("span",null,r.createElement(g.qE,{user:L,disableProfileLink:!0})),r.createElement("span",null,N))))},He=xe,we=e=>{var t,a;const n=(0,c.mX)(),{currentUser:o,fetchInProgress:s,fetchOrdersOrSalesError:l,intl:u,pagination:f,params:P,scrollingDisabled:E,transactions:b,onManageDisableScrolling:k,onUpdateOffer:C,updateOfferInProgress:S,history:A,callSetInitialValues:W,onInitializeCardPaymentData:q,getListing:K}=e,[J,X]=(0,r.useState)(!1),[Q,ee]=(0,r.useState)(!1),[te,ae]=(0,r.useState)(null),ie=!!f&&null!=f.totalItems,re=!s&&ie,ne=re&&f.totalItems>0,oe=re&&0===f.totalItems&&!l,se=r.createElement("div",{className:F},r.createElement(g.H3,{as:"h2",className:H},r.createElement(d._H,{id:"OffersPage.loadingOffers",defaultMessage:"Loading offers..."}))),le=l?r.createElement("div",{className:F},r.createElement(g.H3,{as:"h2",className:H},r.createElement(d._H,{id:"OffersPage.fetchFailed"}))):null,ce=oe?r.createElement("div",{className:D},r.createElement(g.H3,{as:"h1",className:H},r.createElement(d._H,{id:"OffersPage.noOffers",defaultMessage:"You don't have any offers yet"})),r.createElement("p",{className:w},r.createElement(d._H,{id:"OffersPage.noOffersDescription",defaultMessage:"When buyers make offers on your listings, they'll appear here."}))):null,de=ne?r.createElement("div",{className:x},r.createElement(g.H3,{as:"h1",className:H},r.createElement(d._H,{id:"OffersPage.youHaveOffers",defaultMessage:"Your Offers ({count})",values:{count:f.totalItems}}))):ce,ue=ne&&f&&f.totalPages>1?r.createElement(g.iE,{className:Z,pageName:"OffersPage",pagePathParams:P,pagination:f}):null,ge=ne?r.createElement("div",{className:R},r.createElement("table",{className:B},r.createElement("thead",{className:U},r.createElement("tr",null,r.createElement("th",{className:Y}),r.createElement("th",{className:V},"Product"),r.createElement("th",{className:z},"Listing Price"),r.createElement("th",{className:$},"Offer Price"),r.createElement("th",{className:j},"Status"),r.createElement("th",{className:G},"From"))),r.createElement("tbody",null,b.map((e=>{var t;return r.createElement(xe,{key:null===e||void 0===e||null===(t=e.id)||void 0===t?void 0:t.uuid,currentUser:o,tx:e,intl:u,history:A,onClick:()=>(e=>{X(!J),ae(e)})(e)})}))))):null,_e=(0,p.g$)(null===te||void 0===te?void 0:te.customer,o),me=(0,p.x9)(te),fe=async()=>{var e;const t=null===te||void 0===te?void 0:te.listing,a=null===te||void 0===te?void 0:te.provider,r=(0,i.Z)((0,i.Z)({},(0,M.Ae)(t)),{},{authorId:null===a||void 0===a||null===(e=a.id)||void 0===e?void 0:e.uuid}),n={params:{id:t.id.uuid,slug:(0,O.qi)(t.attributes.title)},history:A,routes:(0,h.ZP)()};(0,I.ip)((0,i.Z)((0,i.Z)({},n),{},{currentUser:o,callSetInitialValues:W,getListing:K,author:a,cartItems:[r],offerParams:me,onInitializeCardPaymentData:q}))({quantity:1,deliveryMethod:"shipping"})},pe=async(e,t,a)=>{const r=e===ke,n=e===Me,o=e===Ie,s=e===Se,l=e===Ae,c={id:null===te||void 0===te?void 0:te.id,transition:e,message:t||r||n?"You accepted an offer of ".concat(null===me||void 0===me?void 0:me.price):s||o?"You declined an offer of ".concat(null===me||void 0===me?void 0:me.price):""};Object.assign(c,{offerParams:(0,i.Z)((0,i.Z)({},me),{},{type:r?"accept":n?"acceptAfterCounter":o?"declineAfterCounter":"declined"})}),l&&Object.assign(c,{offerParams:(0,i.Z)((0,i.Z)({},me),{},{offerPrice:a,type:"counter"})});const d=await C(c);n?fe():d&&(X(!1),ae(null),ee(null))},Oe=te?Fe(null===te||void 0===te||null===(t=te.attributes)||void 0===t?void 0:t.lastTransition,te,o):null,ye=!(null===Oe||void 0===Oe||!Oe.showBuyButton),Ce=!(null===Oe||void 0===Oe||!Oe.showExploreMore),Te=!(null===Oe||void 0===Oe||!Oe.showActionBar),De=!(null===Oe||void 0===Oe||!Oe.showCounterActions),{brand:He="",size:we=""}=(0,p.mb)(null===te||void 0===te?void 0:te.listing)||{},Ze=null===te||void 0===te||null===(a=te.attributes)||void 0===a?void 0:a.createdAt,Re=(0,y.vc)(Ze,Ne),Be=v()(Re).add(24,"hours"),Ue=v().duration(null===Be||void 0===Be?void 0:Be.diff(v()())).asHours()<=0,We=r.createElement("div",{className:ve},r.createElement("div",{className:Ee,onClick:()=>{var e,t,a,i;A.push((0,L.EW)("ListingPage",(0,h.ZP)(),{id:(null===te||void 0===te||null===(e=te.listing)||void 0===e||null===(t=e.id)||void 0===t?void 0:t.uuid)||h.$d,slug:(0,O.qi)((null===te||void 0===te||null===(a=te.listing)||void 0===a||null===(i=a.attributes)||void 0===i?void 0:i.title)||h.xX)},{}))}},r.createElement("img",{src:(0,p.PN)(te),alt:(0,p.sC)(te)})),r.createElement("h2",null,Ue?"Your offer of $".concat(null===me||void 0===me?void 0:me.offerPrice," has expired."):null===Oe||void 0===Oe?void 0:Oe.title),null!==Oe&&void 0!==Oe&&Oe.description&&!Ue?r.createElement("p",null,null===Oe||void 0===Oe?void 0:Oe.description):null,Ue?null:ye?r.createElement("div",{className:he},r.createElement(g.zx,{className:Pe,onClick:fe},"Buy Now")):null,Ce?r.createElement("div",{className:be},r.createElement("span",null,"Don't worry. You can still explore similar products."),r.createElement("div",{className:he},r.createElement(g.zx,{className:Pe,onClick:()=>A.push((0,L.EW)("SearchPage",(0,h.ZP)(),{},{pub_brand:He,pub_size:we}))},"Explore Similar Products"))):null,De?S?r.createElement(g.vM,null):Ue?null:r.createElement("div",{className:he},r.createElement(g.zx,{onClick:()=>pe(Ie)},"Decline"),r.createElement(g.zx,{className:Pe,onClick:()=>pe(Me)},"Accept")):null),qe=r.createElement("div",{className:ve},r.createElement("div",{className:Ee},r.createElement("img",{src:(0,p.PN)(te),alt:(0,p.sC)(te)})),r.createElement("h2",null,Ue?"Your offer of $".concat((0,p.ph)(te)," has expired."):null===Oe||void 0===Oe?void 0:Oe.title),Ue?null:r.createElement(r.Fragment,null,Te?S?r.createElement(g.vM,null):r.createElement("div",{className:he},r.createElement(g.zx,{onClick:()=>ee(!Q)},"Counter"),r.createElement(g.zx,{onClick:()=>pe(Se)},"Decline"),r.createElement(g.zx,{onClick:()=>pe(ke)},"Accept")):null,Q?r.createElement("div",{className:Le},r.createElement(N.Z,{isOffersPage:!0,sendButtonText:"Send Counter Offer",onSubmit:e=>{var t,a;const i=null===e||void 0===e?void 0:e.price,r=(null===i||void 0===i?void 0:i.amount)/100;pe(Ae,"".concat(null===o||void 0===o||null===(t=o.attributes)||void 0===t||null===(a=t.profile)||void 0===a?void 0:a.displayName," just sent a counter offer of $").concat(r,"."),r)}})):null)),Ye=r.createElement(g.u_,{id:"OffersPage.offerModal",isOpen:J,onClose:()=>{X(!1),ae(null)},usePortal:!0,onManageDisableScrolling:k,isOfferModal:!0},_e?We:qe),Ve=n.marketplaceName,ze=u.formatMessage({id:"OffersPage.schemaTitle"},{marketplaceName:Ve}),$e=u.formatMessage({id:"OffersPage.schemaDescription"},{marketplaceName:Ve});return r.createElement(g.T3,{title:ze,description:$e,scrollingDisabled:E},r.createElement(g.ip,{topbar:r.createElement(r.Fragment,null,r.createElement(_.Z,{currentPage:"OffersPage"}),r.createElement(g.Tb,{currentPage:"OffersPage"})),footer:r.createElement(m.Z,null)},s?se:null,l?le:null,s||l?null:r.createElement("div",{className:T},de,ge,ue)),Ye)};we.defaultProps={currentUser:null,fetchOrdersOrSalesError:null};
1const Ze=(0,n.qC)((0,o.$j)((e=>{const{fetchInProgress:t,fetchOrdersOrSalesError:a,pagination:i,transactionRefs:r,updateOfferInProgress:n,updateOfferSuccess:o,updateOfferError:s}=e.OffersPage,{currentUser:l,currentUserHasListings:c}=e.user,d=(0,u.EV)(e,r),g=(0,S._e)(d)?null===d||void 0===d?void 0:d.filter((e=>{var t,a;return null===e||void 0===e||null===(t=e.attributes)||void 0===t||null===(a=t.protectedData)||void 0===a?void 0:a.offerParams})):[],_=(0,S._e)(g)?g.filter((e=>{const t=(0,p.x9)(e);return!((null===t||void 0===t?void 0:t.createdAt)<v()().subtract(24,"hours").unix())})):[],m=(null===_||void 0===_?void 0:_.length)||0,f=Math.ceil(m/(null===i||void 0===i?void 0:i.perPage));return{currentUser:l,fetchInProgress:t,fetchOrdersOrSalesError:a,getListing:t=>{const a={id:t,type:"listing"},i=(0,u.EV)(e,[a]);return 1===i.length?i[0]:null},pagination:Object.assign({},i,{totalItems:m,totalPages:f}),scrollingDisabled:(0,C.uS)(e),currentUserHasListings:c,transactions:_,updateOfferInProgress:n,updateOfferSuccess:o,updateOfferError:s}}),(e=>({onManageDisableScrolling:(t,a)=>e((0,C.R4)(t,a)),onUpdateOffer:t=>e((0,E.aL)(t)),callSetInitialValues:(t,a,i)=>e(t(a,i)),onInitializeCardPaymentData:()=>e((0,b.aw)())}))),d.XN,f.withRouter,k.ss)(we)},77352:(e,t,a)=>{a.d(t,{Z:()=>i});const i={root:"ListingPage_root__0JVsl",pageRoot:"ListingPage_pageRoot__cX9zR",loadingText:"ListingPage_loadingText__1uIgp",errorText:"ListingPage_errorText__VvhCV",sectionHero:"ListingPage_sectionHero__cg3MB",heroHeight:"ListingPage_heroHeight__5D9AZ",imageWrapperForSectionHero:"ListingPage_imageWrapperForSectionHero__7nIGi ListingPage_heroHeight__5D9AZ",actionBar:"ListingPage_actionBar__ydKdz",actionBarForProductLayout:"ListingPage_actionBarForProductLayout__YWjQi",actionBarForHeroLayout:"ListingPage_actionBarForHeroLayout__+TkhH",ownListingText:"ListingPage_ownListingText__Xp1RX h3",ownListingTextPendingApproval:"ListingPage_ownListingTextPendingApproval__b3ybT",closedListingText:"ListingPage_closedListingText__vxNGG h4",editListingLink:"ListingPage_editListingLink__Yujin h5",editIcon:"ListingPage_editIcon__ESl+O",rootForImage:"ListingPage_rootForImage__p0jwo ListingPage_heroHeight__5D9AZ",viewPhotos:"ListingPage_viewPhotos__jyo1G marketplaceTinyFontStyles",carouselModalScrollLayer:"ListingPage_carouselModalScrollLayer__ZS2uN",carouselModalContainer:"ListingPage_carouselModalContainer__QLyUE",contentWrapperForHeroLayout:"ListingPage_contentWrapperForHeroLayout__GkUsr",mainColumnForProductLayout:"ListingPage_mainColumnForProductLayout__D7MaJ",galleryColumn:"ListingPage_galleryColumn__k1CGS",orderColumnForProductLayout:"ListingPage_orderColumnForProductLayout__3h+hZ",descriptionColumn:"ListingPage_descriptionColumn__eWgBK",breadcrumbsWrapper:"ListingPage_breadcrumbsWrapper__Jir7l",breadcrumbsOverflowing:"ListingPage_breadcrumbsOverflowing__kb8aY",breadcrumbs:"ListingPage_breadcrumbs__r1fOF",contentWrapperForProductLayout:"ListingPage_contentWrapperForProductLayout__zhuvq",mainColumnForHeroLayout:"ListingPage_mainColumnForHeroLayout__-eGvb",orderColumnForHeroLayout:"ListingPage_orderColumnForHeroLayout__qwYN1",orderPanel:"ListingPage_orderPanel__rnDCD",productOrderPanel:"ListingPage_productOrderPanel__QvVFr",orderPanelTitle:"ListingPage_orderPanelTitle__uOI-V",sectionAvatar:"ListingPage_sectionAvatar__SekRU",avatarMobile:"ListingPage_avatarMobile__YCieI",avatarDesktop:"ListingPage_avatarDesktop__jmfTg",desktopPriceContainer:"ListingPage_desktopPriceContainer__Bzrzm",desktopPriceValue:"ListingPage_desktopPriceValue__nb1el marketplaceModalTitleStyles",desktopPerUnit:"ListingPage_desktopPerUnit__kD3Fb h5",heading:"ListingPage_heading__A-eLJ",title:"ListingPage_title__RgXCz marketplaceModalTitleStyles",author:"ListingPage_author__4SKg1 h5",authorNameLink:"ListingPage_authorNameLink__3qUqI",contactWrapper:"ListingPage_contactWrapper__lc22h",separator:"ListingPage_separator__hfvYx",contactLink:"ListingPage_contactLink__9VorF",sectionText:"ListingPage_sectionText__12yCx",preLine:"ListingPage_preLine__huY63",sectionHeading:"ListingPage_sectionHeading__OeQ6q p",sectionHeadingWithExtraMargin:"ListingPage_sectionHeadingWithExtraMargin__8gBdQ p",text:"ListingPage_text__Assqc",ingress:"ListingPage_ingress__FkfWu p",sectionDetail
1s:"ListingPage_sectionDetails__f2OWz",sectionMultiEnum:"ListingPage_sectionMultiEnum__pIQZe",details:"ListingPage_details__JGxRj",detailsRow:"ListingPage_detailsRow__+dnRi",detailLabel:"ListingPage_detailLabel__WFG9n",sectionMap:"ListingPage_sectionMap__urLWB",sectionReviews:"ListingPage_sectionReviews__M-HBI",sectionAuthor:"ListingPage_sectionAuthor__uIVto",inquiryModalContent:"ListingPage_inquiryModalContent__5teW8",inquiryForm:"ListingPage_inquiryForm__NLOTx",inquirySubmitButtonWrapper:"ListingPage_inquirySubmitButtonWrapper__Gpa6F",map:"ListingPage_map__QvA9D",longWord:"ListingPage_longWord__eWG5H",productGallery:"ListingPage_productGallery__a+tAo",mobileHeading:"ListingPage_mobileHeading__nFCDr",productDesktopHeading:"ListingPage_productDesktopHeading__dNJZN",productSideContent:"ListingPage_productSideContent__8kM-g",productBookingPanel:"ListingPage_productBookingPanel__JXTPK",mainContentWrapper:"ListingPage_mainContentWrapper__S-WIl",listingPageContentTab:"ListingPage_listingPageContentTab__vuRwU",tabSect:"ListingPage_tabSect__nOsA-",active:"ListingPage_active__wm6M1",tabContent:"ListingPage_tabContent__z8n7N",protectionSec:"ListingPage_protectionSec__bZmKN",protectionLabel:"ListingPage_protectionLabel__HqgVh",tradProtectLogo:"ListingPage_tradProtectLogo__bx8hK",protectionSubtext:"ListingPage_protectionSubtext__vu6Gt",paymentMethods:"ListingPage_paymentMethods__azJeQ",paymentMode:"ListingPage_paymentMode__oYCEj",stripeIcon:"ListingPage_stripeIcon__RaURV",paymentIcon:"ListingPage_paymentIcon__Q5pyt",condition:"ListingPage_condition__PsTUn",visaIcon:"ListingPage_visaIcon__eFgNR",mastercardIcon:"ListingPage_mastercardIcon__s49LE",amexIcon:"ListingPage_amexIcon__TlBkL",discoverIcon:"ListingPage_discoverIcon__d373T",applePayIcon:"ListingPage_applePayIcon__8st1B"}}}]);
2//# sourceMappingURL=OffersPage.40dfb049.chunk.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.