PageSourceSearch

https://static.wristcheck.com/web/4f919465/_next/static/chunks/2614-6e97772f5e701a06.js

js wristcheck.com collected 2026-10-02 19:04:26 UTC 34,798 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f117-ea61-7651-8acf-2c6e25f7f2b8")}catch(e){}}();try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="e2988c44-7acf-4fd8-95ba-0d938deab268",e._sentryDebugIdIdentifier="sentry-dbid-e2988c44-7acf-4fd8-95ba-0d938deab268")}catch(e){}{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:wristcheck-web":!0})}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2614],{42210:function(e,l,i){"use strict";var s,r=i(67294);function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}l.Z=function(e){return r.createElement("svg",t({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l5 5a.5.5 0 0 1-.708.708L8 5.707l-4.646 4.647a.5.5 0 0 1-.708-.708l5-5Z",fill:"currentColor"})))}},70749:function(e,l,i){"use strict";i.d(l,{U:function(){return d}});var s=i(67294),r=i(17623),t=i(42046);let a=async e=>{let{status:l}=e;try{let{data:e}=await (0,t.mc)({url:"/medusa/store/offers/variants",params:{filters:{status:l}}});if((null==e?void 0:e.success)===!1)throw Error(e.message);let i=e.data.reduce((e,l)=>{if(e[l.product_variant_id]){e[l.product_variant_id].offers=[...e[l.product_variant_id].offers,...l.offers],!e[l.product_variant_id].expire_at&&l.expire_at&&(e[l.product_variant_id].expire_at=l.expire_at);let i=e[l.product_variant_id].highest_offer_expired_at,s=l.highest_offer_expired_at;s&&(!i||new Date(s)>new Date(i))&&(e[l.product_variant_id].highest_offer_expired_at=s),!e[l.product_variant_id].highest_offer_id&&l.highest_offer_id&&(e[l.product_variant_id].highest_offer_id=l.highest_offer_id)}else e[l.product_variant_id]={...l};return e},{}),s=Object.values(i);return s.forEach(e=>{[...e.offers].sort((e,l)=>new Date(e.created_at).getTime()-new Date(l.created_at).getTime()).forEach((e,l)=>{e.buyer&&(e.buyer.label="Buyer ".concat(l+1))})}),s}catch(e){console.error(e)}return null},n=e=>{let{status:l}=e;return(0,r.K_)({queryKey:["all-consignments",l],queryFn:()=>a({status:l}),staleTime:6e5,gcTime:9e5})},d=()=>{let{data:e,isFetched:l,isLoading:i}=n({status:["ACCEPTED","COMPLETED","PENDING","REJECTED","EXPIRED"]});return(0,s.useMemo)(()=>{let s=[],r=[],t=[];if(l&&e)for(let l of e){let e=!1,i=!1,a=!0;for(let s of l.offers){if("PENDING"===s.status){e=!0,a=!1;break}if("ACCEPTED"===s.status||"COMPLETED"===s.status){i=!0,a=!1;break}"REJECTED"!==s.status&&"EXPIRED"!==s.status&&(a=!1)}e?s.push(l):i?r.push(l):a&&t.push(l)}return{activeConsignments:s,soldConsignments:r,pastConsignments:t,counts:{active:s.length,sold:r.length,past:t.length},isLoading:i}},[l,e,i])}},97794:function(e,l,i){"use strict";var s=i(85893),r=i(21928),t=i(12282),a=i.n(t);l.Z=e=>{let{open:l,onOpenChange:i,trigger:t,content:n,alwaysShownContent:d}=e;return(0,s.jsxs)(r.fC,{open:l,onOpenChange:i,className:a().collapsibleRoot,children:[t&&(0,s.jsx)(r.xz,{asChild:!0,children:t}),d&&d,(0,s.jsx)(r.VY,{className:a().collapsibleContent,children:n})]})}},93021:function(e,l,i){"use strict";i.d(l,{z:function(){return s.Z}});var s=i(97794)},45092:function(e,l,i){"use strict";var s=i(85893),r=i(93967),t=i.n(r),a=i(28677),n=i(70749),d=i(84239),c=i(77620),o=i.n(c);l.Z=e=>{var l,i;let{current:r}=e,{t:c}=(0,a.$G)("sell"),{counts:u}=(0,n.U)(),f=[{key:"active",href:"/account/selling/offers/active",label:c("states.active-bids-label","Active"),count:null==u?void 0:u.active},{key:"past",href:"/account/selling/offers/past",label:c("states.past-bids-label","Past"),count:u?(null!==(l=u.past)&&void 0!==l?l:0)+(null!==(i=u.sold)&&void 0!==i?i:0):void 0}];return(0,s.jsxs)("div",{className:o().tabWrapper,children:[(0,s.jsx)("ul",{className:t()(o().tabs,o().tabsEqual),children:f.map(e=>{let l=r===e.key;return(0,s.jsx)("li",{className:l?o().current:"",children:(0,s.jsxs)(d.I,{href:e.href,children:[(0,s.jsx)("span",{className:o().tabLabel,children:e.label}),"number"==typeof e.count?(0,s.jsx)("span",{className:t()(o().tabCount,l&&o().tabCountCurrent),children:e.count}):null]})},e.key)})}),(0,s.jsx)("div",{className:o().separator})]})}},24535:function(e,l,i){"use strict";i.d(l,{Im:function(){return V},yx:function(){return $}});var s=i(85893),r=i(93967),t=i.n(r),a=i(28677),n=i(82726),d=i.n(n),c=i(67294),o=i(8352),u=i(80915),f=i(76025),v=i(42210),h=i(2651),m=i(88844),p=i(84239),x=i(93021),j=i(36519);i(93865),i(40108),i(42122);var g=i(27529),b=i(77907),_=i(66899),y=i(49049),N=i(32715),C=i(59431),w=i(51248),O=i(67538),E=i(19760),M=i(43743),S=i(30202),I=i(17623),k=i(42046);let T=async e=>{try{let{data:l}=await (0,k.e$)({url:"/medusa/store/offers/".concat(e,"/reject"),data:{}});if((null==l?void 0:l.success)===!1)throw Error(l.message);return l}catch(s){var l,i;let e=null==s?void 0:null===(l=s.response)||void 0===l?void 0:l.data;if((null==e?void 0:e.success)===!1)throw Error(null===(i=e.error)||void 0===i?void 0:i.message);throw s}},Z=(e,l)=>{let i=(0,S.NL)();return(0,I.wf)({mutationKey:["offer","reject",e],mutationFn:()=>T(e),onSuccess:s=>((null==l?void 0:l.onSuccess)&&l.onSuccess(s),Promise.all([i.invalidateQueries({queryKey:["offer",e]}),i.invalidateQueries({queryKey:["offer","list"]}),i.invalidateQueries({queryKey:["all-consignments"]})]))})};var D=i(20555),L=i(10321),P=i(66179),R=i(30817),z=i(96723),A=i.n(z),H=e=>{var l,i,r,t,n,d,o;let{offer:u,dismissRejectOfferModal:f,showRejectOfferConfirmationModal:v,showMakeCounterOfferModal:p}=e,{t:x}=(0,a.$G)("account"),[j,b]=(0,c.useState)(null),{mutateAsync:_,isPending:y}=Z(null==u?void 0:u.id),N=(0,c.useMemo)(()=>null==u?void 0:u.records[0],[u]),C=async()=>{try{var e,l,i,s,r,t,a;await _();let n={currency:null==u?void 0:u.currency_code,value:(null!==(t=null==N?void 0:N.amount)&&void 0!==t?t:0)/100,items:[{price:(null!==(a=null==u?void 0:null===(e=u.product_variant)||void 0===e?void 0:e.listing_price)&&void 0!==a?a:0)/100,item_brand:null==u?void 0:null===(l=u.product_variant)||void 0===l?void 0:l.brand,currency:null==u?void 0:null===(i=u.product_variant)||void 0===i?void 0:i.currency_code,item_name:null==u?void 0:null===(s=u.product_variant)||void 0===s?void 0:s.title,item_id:null==u?void 0:null===(r=u.product_variant)||void 0===r?void 0:r.id}]};(0,P.L9)(R.w.REJECT_BID,n),f(),v()}catch(e){(null==e?void 0:e.message)&&b(null==e?void 0:e.message)}};return(0,s.jsx)(L.Z,{onClose:f,open:!0,className:{dialogContent:A().modalWrapper},widthFitContent:!0,children:(0,s.jsxs)("div",{className:A().contentWrapper,children:[(0,s.jsxs)("div",{className:A().titleWrapper,children:[(0,s.jsx)(D.Z,{className:A().icon,width:48,height:48}),(0,s.jsx)("div",{className:A().title,children:x("offers.reject-offer-modal.title","Reject this offer?")}),(0,s.jsx)("div",{className:A().description,children:x("offers.reject-offer-modal.description","Deals don’t happen without a little back-and-forth. Want to counter instead?")})]}),(0,s.jsxs)("div",{className:A().watchInformation,children:[(0,s.jsx)("div",{className:A().image,children:(0,s.jsx)(m.x,{src:null==u?void 0:null===(l=u.product_variant)||void 0===l?void 0:l.thumbnail,alt:"".concat(null==u?void 0:null===(i=u.product_variant)||void 0===i?void 0:i.brand," ").concat(null==u?void 0:null===(r=u.product_variant)||void 0===r?void 0:r.title," Image"),width:1e3,height:1e3,sizes:"120px",crop:"fill",fitParent:"height",gravity:"center"})}),(0,s.jsxs)("div",{className:A().watchDescription,children:[(0,s.jsx)("div",{className:A().brandName,children:null==u?void 0:null===(t=u.product_variant)||void 0===t?void 0:t.brand}),(0,s.jsx)("div",{className:A().modelName,children:null==u?void 0:null===(n=u.product_variant)||void 0===n?void 0:n.title})]})]}),(0,s.jsxs)("div",{className:A().pricingSection,children:[(0,s.jsxs)("div",{className:A().offerPriceWrapper,children:[(0,s.jsx)("div",{className:A().priceTitle,children:x("offers.reject-offer-modal.listing-price","Listing Price:")}),(0,s.jsx)("div",{className:A().priceValue,children:(0,s.jsx)(g.Z,{price:null==u?void 0:null===(d=u.product_variant)||void 0===d?void 0:d.listing_price,sourceCurrency:null==u?void 0:null===(o=u.product_variant)||void 0===o?void 0:o.currency_code})})]}),(0,s.jsxs)("div",{className:A().offerPriceWrapper,children:[(0,s.jsx)("div",{className:A().priceTitle,children:x("offers.reject-offer-modal.offer-price","Final Offer Price:")}),(0,s.jsx)("div",{className:A().finalOfferPrice,children:(0,s.jsx)(g.Z,{price:null==N?void 0:N.amount,sourceCurrency:null==u?void 0:u.currency_code})})]})]}),j&&(0,s.jsx)("div",{className:A().error,children:j}),(0,s.jsxs)("div",{className:A().buttonsWrapper,children:[(0,s.jsx)(h.z,{title:x("offers.reject-offer-modal.make-counter-offer-button","Make Counter Offer"),fullWidth:!0,onClick:()=>{p(),f()},size:"small"}),(0,s.jsx)("div",{className:A().rejectOfferBtn,children:(0,s.jsx)(h.z,{title:x("offers.reject-offer-modal.reject-offer-button","Reject Offer"),styleType:"secondary",fill:"outline",fullWidth:!0,onClick:C,loading:y,size:"small"})})]})]})})},B=e=>{var l,i;let{offer:r,isHighestOffer:n}=e,{t:o}=(0,a.$G)("account"),[u,f]=(0,c.useState)(!1),[v,m]=(0,c.useState)(!1),[p,x]=(0,c.useState)(!1),[g,b]=(0,c.useState)(!1),[_,y]=(0,c.useState)(!1),N=!!(null==r?void 0:r.offer_accepted_at)&&"ACCEPTED"===r.status,C=(null==r?void 0:null===(l=r.records[0])||void 0===l?void 0:l.type)==="SELLER_COUNTER",w=!N&&!C;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:d().pendingActions,children:[w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.z,{title:o("selling.bid-table.accept-cta","Accept"),onClick:()=>f(!0),styleType:"secondary",fullWidth:!0,size:"small"}),(0,s.jsx)(h.z,{title:o("selling.bid-table.counter-cta","Counter"),onClick:()=>m(!0),styleType:"secondary",fill:"outline",fullWidth:!0,size:"small"})]}),(null==r?void 0:null===(i=r.records[0])||void 0===i?void 0:i.type)==="SELLER_COUNTER"&&(0,s.jsx)("div",{className:d().fullWidthBtn,children:(0,s.jsx)(h.z,{title:o("buying.bid-table.view-latest-offer-cta","Vie
1w latest offer"),onClick:()=>f(!0),styleType:"secondary",fullWidth:!0,size:"small"})}),w&&(0,s.jsx)("div",{className:t()(d().fullWidthBtn,d().textBtn),children:(0,s.jsx)(h.z,{title:o("selling.bid-table.reject-cta","Reject Offer"),onClick:()=>b(!0),styleType:"tertiary",color:"black",size:"small",icon:(0,s.jsx)(O.Z,{width:20,height:20,className:d().icon}),reverseLayout:!0})})]}),u&&(0,s.jsx)(j.Z,{offer:r,isHighestOffer:n,dismissAcceptOfferModal:()=>f(!1),side:"seller"}),v&&(0,s.jsx)(M.Z,{offer:r,dismissMakeCounterOfferModal:()=>m(!1),showMakeCounterOfferConfirmationModal:()=>x(!0),side:"seller"}),(0,s.jsx)(E.N,{onClose:()=>x(!1),message:o("offers.make-counter-offer-confirmation-modal.seller-description","Counter offer sent successfully"),note:o("offers.make-counter-offer-confirmation-modal.seller-note","Keep an eye out for the buyer's response."),open:p}),g&&(0,s.jsx)(H,{offer:r,dismissRejectOfferModal:()=>b(!1),showMakeCounterOfferModal:()=>m(!0),showRejectOfferConfirmationModal:()=>y(!0)}),(0,s.jsx)(E.N,{onClose:()=>y(!1),message:o("offers.reject-offer-confirmation-modal.description","You've rejected this offer."),open:_})]})},W=i(89799),G=e=>{var l,i,r;let{consignment:n,offer:f,isHighestOffer:v,statusGroup:m}=e,{t:p}=(0,a.$G)("account"),{locale:x}=(0,b.eV)(),j=(0,c.useMemo)(()=>(0,N.zY)(x),[x]),{isTablet:y}=(0,w.Z)(),[O,E]=(0,c.useState)(!1),M=(0,c.useMemo)(()=>(null==f?void 0:f.status)==="PENDING"&&"active"===m||(null==f?void 0:f.offer_accepted_at),[null==f?void 0:f.status,null==f?void 0:f.offer_accepted_at,m]),S=(0,c.useMemo)(()=>{if((null==f?void 0:f.offer_accepted_at)||(null==f?void 0:f.remaining_completed_at)){var e,l;return(0,o.Z)(null!==(l=null!==(e=null==f?void 0:f.offer_accepted_at)&&void 0!==e?e:null==f?void 0:f.remaining_completed_at)&&void 0!==l?l:"")}return(null==f?void 0:f.expire_at)?(0,o.Z)(f.expire_at):null},[f.expire_at,null==f?void 0:f.offer_accepted_at,null==f?void 0:f.remaining_completed_at]),{expiresIn:I}=(0,_.X)({expiryDate:S||void 0}),k=(0,c.useMemo)(()=>{if(!S)return null;let e=(0,u.Z)(S,"dd MMM yyyy",{locale:j}),l=!M||!I||0===I.days&&0===I.hours&&0===I.minutes;if(y){if(l)return(0,s.jsx)("div",{className:t()(d().countdownExpiry,!M&&d().cancelled),children:p("selling.bid-table.body.bidding-ended-date-mobile","Ended on {{date}}",{date:e})});let i=p("selling.bid-table.body.bidding-ends-date-mobile","Ending in {{days}} days and {{time}}",{days:null==I?void 0:I.days,time:"".concat(null==I?void 0:I.hours,":").concat(String(null==I?void 0:I.minutes).padStart(2,"0"),":").concat(String(null==I?void 0:I.seconds).padStart(2,"0"))});return(0,s.jsx)("div",{className:d().countdownExpiry,children:i})}{if(l)return(0,s.jsx)("div",{className:t()(d().expirationDate,!M&&d().cancelled),children:e});let i=p("selling.bid-table.body.bidding-ends-date-desktop","{{days}} days and {{time}}",{days:I.days,time:"".concat(I.hours,":").concat(String(I.minutes).padStart(2,"0"),":").concat(String(I.seconds).padStart(2,"0"))});return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:d().expirationDate,children:e}),(0,s.jsx)("div",{className:d().countdownExpirySeller,children:i})]})}},[S,j,I,y,p,M]),T=(0,c.useMemo)(()=>{var e;return(null==f?void 0:f.offer_accepted_at)?(0,s.jsx)("div",{className:t()(d().status,d().greenAccent),children:p("selling.status.accepted","Offer Accepted")}):(null==f?void 0:f.status)==="EXPIRED"?(0,s.jsx)("div",{className:t()(d().status,d().stainlessSteelAccent),children:p("selling.status.expired","Expired")}):(null==f?void 0:f.status)==="REJECTED"||"active"!==m?(0,s.jsx)("div",{className:t()(d().status,d().stainlessSteelAccent),children:p("selling.status.rejected","Rejected")}):(null==f?void 0:null===(e=f.last_record)||void 0===e?void 0:e.type)==="SELLER_COUNTER"?(0,s.jsx)("div",{className:t()(d().status,d().blueAccent),children:p("selling.status.pending-buyer-action","Buyer Reviewing")}):(0,s.jsx)("div",{className:t()(d().status,d().redAccent),children:p("selling.status.pending-seller-action","Respond to Buyer")})},[null==f?void 0:f.offer_accepted_at,null==f?void 0:f.status,null==f?void 0:null===(l=f.last_record)||void 0===l?void 0:l.type,m,p]),Z=(0,c.useMemo)(()=>{let e=(null==f?void 0:f.price_exchanged)?n.currency_code:null==f?void 0:f.currency_code,l=(null==n?void 0:n.listing_price)||0,i=(null==f?void 0:f.latest_price)||0,r=l>0&&i>0?Math.round((i-l)/l*100):0;return y?(0,s.jsxs)("div",{className:t()(d().latestBidSellSide,!M&&d().cancelled),children:[(0,s.jsx)(g.Z,{price:(null==f?void 0:f.latest_price)||0,sourceCurrency:null==e?void 0:e.toLowerCase()}),v&&"sold"!==m&&(0,s.jsx)("div",{className:d().highestOfferLabel,children:p("selling.bid-table.highest-offer-pill","Highest Offer")})]}):(0,s.jsxs)("div",{className:d().latestBidSellSide,children:[(0,s.jsx)(g.Z,{price:(null==f?void 0:f.latest_price)||0,sourceCurrency:n.currency_code}),v&&"sold"!==m&&(0,s.jsx)("div",{className:d().highestOfferLabel,children:p("selling.bid-table.highest-offer-pill","Highest Offer")}),r<0&&(0,s.jsx)("div",{className:d().listingPriceDifference,children:p("selling.bid-table.below-listing-price","{{pct}}% below listing price",{pct:r})}),"active"===m&&(0,s.jsx)(h.z,{title:p("selling.bid-table.offer-history-cta","Offer History"),styleType:"tertiary",onClick:()=>E(!0),color:"black",size:"small",icon:(0,s.jsx)(C.Z,{height:16,width:16}),reverseLayout:!0})]})},[y,null==f?void 0:f.latest_price,null==f?void 0:f.price_exchanged,null==f?void 0:f.currency_code,null==n?void 0:n.listing_price,n.currency_code,v,m,p,M]),D=(0,c.useMemo)(()=>({id:f.id,created_at:f.created_at,currency_code:n.currency_code,status:f.status,expire_at:f.expire_at,updated_at:f.updated_at,offer_accepted_at:f.offer_accepted_at,offer_rejected_at:f.offer_rejected_at,remaining_completed_at:f.remaining_completed_at,latest_price:f.latest_price,records:f.last_record?[f.last_record]:[],product_variant:{id:n.product_variant_id,brand:n.brand,listing_price:n.listing_price,currency_code:n.currency_code,thumbnail:n.thumbnail,title:n.title}}),[f,n]);return(0,s.jsxs)(s.Fragment,{children:[O&&(0,s.jsx)(W.Z,{onClose:()=>E(!1),offerId:f.id,offerSide:"seller"}),y?(0,s.jsxs)("div",{className:d().sellerOffersTableRow,children:[(0,s.jsxs)("div",{className:d().sellerOffersTableHead,children:[(0,s.jsx)("div",{className:t()(d().buyerNameCell,!M&&d().cancelled),children:null==f?void 0:null===(i=f.buyer)||void 0===i?void 0:i.label}),k]}),(0,s.jsxs)("div",{className:d().tabletContent,children:[(0,s.jsxs)("div",{className:d().offerRow,children:[(0,s.jsx)("div",{className:t()(d().offerLabel,!M&&d().cancelled),children:p("selling.bid-table.latest-offer","Latest offer:")}),Z]}),(0,s.jsxs)("div",{className:d().historyStatusRow,children:[(0,s.jsx)(h.z,{title:p("selling.bid-table.offer-history-cta","Offer History"),styleType:"tertiary",onClick:()=>E(!0),color:"black",size:"small",icon:(0,s.jsx)(C.Z,{height:16,width:16}),reverseLayout:!0}),T]}),M&&!(null==f?void 0:f.offer_accepted_at)&&(0,s.jsx)(B,{offer:D,isHighestOffer:v})]})]}):(0,s.jsxs)("div",{className:t()(d().sellOffersListGrid,d().sellerOffersTableRow),children:[(0,s.jsx)("div",{className:t()(d().buyerNameCell,!M&&d().cancelled),children:null==f?void 0:null===(r=f.buyer)||void 0===r?void 0:r.label}),(0,s.jsx)("div",{className:t()(d().latestOfferCell,!M&&d().cancelled),children:Z}),(0,s.jsx)("div",{className:d().statusCellWrapper,children:T}),(0,s.jsx)("div",{className:d().endingOnCell,children:k}),"active"===m?(0,s.jsx)("div",{className:d().actionCell,children:!M||(null==f?void 0:f.offer_accepted_at)?(0,s.jsx)("div",{}):(0,s.jsx)(B,{offer:D,isHighestOffer:v})}):(0,s.jsx)("div",{className:d().actionCell,children:(0,s.jsx)(h.z,{title:p("selling.bid-table.offer-history-cta","Offer History"),styleType:"tertiary",onClick:()=>E(!0),color:"black",size:"small",icon:(0,s.jsx)(C.Z,{height:16,width:16}),reverseLayout:!0})})]})]})},F=e=>{var l;let{consignment:i}=e,{t:r}=(0,a.$G)("account"),{locale:n}=(0,b.eV)(),C=(0,c.useMemo)(()=>(0,N.zY)(n),[n]),[w,O]=(0,c.useState)(!0),[E,M]=(0,c.useState)(!1),S=(0,c.useMemo)(()=>
1{if(!(null==i?void 0:i.offers)||0===i.offers.length)return null;let e=i.offers.filter(e=>"PENDING"===e.status);return 0===e.length?null:e.reduce((e,l)=>(l.latest_price||0)>(e.latest_price||0)?l:e)},[null==i?void 0:i.offers]),I=(0,c.useMemo)(()=>(null==S?void 0:S.expire_at)?(0,o.Z)(S.expire_at):void 0,[null==S?void 0:S.expire_at]),{expiresIn:k}=(0,_.X)({expiryDate:I}),T=(0,c.useMemo)(()=>{if(!I)return null;let e=(0,u.Z)(I,"dd MMM yyyy HH:mm",{locale:C});if(!k||0===k.days&&0===k.hours&&0===k.minutes)return(0,s.jsx)("div",{className:d().expirationDate,children:e});let l="".concat(k.days," days and ").concat(k.hours,":").concat(String(k.minutes).padStart(2,"0"),":").concat(String(k.seconds).padStart(2,"0"));return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:d().expirationDate,children:e}),(0,s.jsx)("div",{className:d().countdownExpirySeller,children:l})]})},[I,k,C]),Z=(0,c.useMemo)(()=>"/buy/".concat(null==i?void 0:i.brand_handle,"/").concat(null==i?void 0:i.handle,"?p=").concat((0,y.w8)(null==i?void 0:i.product_variant_id)),[i]);return(0,s.jsxs)("div",{className:d().rowWrapper,children:[(0,s.jsxs)("div",{className:d().desktop,children:[(0,s.jsxs)("div",{className:t()(d().rowMain,d().sellActiveOffersGrid),children:[(0,s.jsxs)(p.I,{href:Z,className:d().productInfos,children:[(0,s.jsx)("div",{className:d().productImage,children:(0,s.jsx)(m.x,{src:(null==i?void 0:i.thumbnail)||"",alt:"".concat((null==i?void 0:i.brand)||""," ").concat((null==i?void 0:i.title)||""," Image"),width:84,height:84,fitParent:"height",crop:"fill",gravity:"center"})}),(0,s.jsxs)("div",{className:d().productDetails,children:[(0,s.jsx)("div",{className:d().brand,children:null==i?void 0:i.brand}),(0,s.jsx)("div",{className:d().name,children:null==i?void 0:i.title}),(0,s.jsx)("div",{className:d().price,children:(0,s.jsx)(g.Z,{price:null==i?void 0:i.listing_price,sourceCurrency:null==i?void 0:i.currency_code})})]})]}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:(null==S?void 0:S.latest_price)||0,sourceCurrency:null==i?void 0:i.currency_code})}),(0,s.jsx)("div",{children:T}),(0,s.jsx)("div",{className:d().action,children:(0,s.jsx)(h.z,{title:r("selling.bid-table.accept-highest-offer-cta","Accept Highest Offer"),fullWidth:!0,onClick:()=>M(!0),size:"small"})})]}),(0,s.jsx)("div",{className:d().separator}),(null==i?void 0:i.offers)&&(0,s.jsxs)("div",{className:d().allOffers,children:[(0,s.jsxs)("div",{className:d().allOffersBtn,onClick:()=>O(!w),children:[r("selling.bid-table.all-offers-cta","All Offers ({{num}})",{num:i.offers.length}),w?(0,s.jsx)(v.Z,{width:20,height:20}):(0,s.jsx)(f.Z,{width:20,height:20})]}),(0,s.jsx)(x.z,{open:w,onOpenChange:e=>O(e),content:(0,s.jsxs)("div",{className:d().sellerAllOffersContent,children:[(0,s.jsxs)("div",{className:t()(d().sellerOffersTableHead,d().sellOffersListGrid),children:[(0,s.jsx)("div",{children:r("selling.bid-table.buyer-name-header","Buyer")}),(0,s.jsx)("div",{children:r("selling.bid-table.latest-offer-header","Latest Offer")}),(0,s.jsx)("div",{className:d().centeredHeader,children:r("selling.bid-table.status-header","Status")}),(0,s.jsx)("div",{children:r("selling.bid-table.ending-on-header","Ending on")}),(0,s.jsx)("div",{className:d().centeredHeader,children:r("selling.bid-table.action-header","Action")})]}),(0,s.jsx)("div",{className:t()(d().sellerOffersTableBody,d().scrollableBody),children:i.offers.map((e,l)=>(0,s.jsxs)(c.Fragment,{children:[(0,s.jsx)(G,{consignment:i,offer:e,isHighestOffer:(null==e?void 0:e.id)===(null==S?void 0:S.id),statusGroup:"active"}),l<i.offers.length-1&&(0,s.jsx)("div",{className:d().separator})]},"offer-".concat(null==e?void 0:e.id,"-").concat(l)))})]})})]})]}),(0,s.jsxs)("div",{className:d().mobile,children:[(0,s.jsxs)(p.I,{href:Z,className:d().productInfos,onClick:()=>O(!w),children:[(0,s.jsx)("div",{className:t()(d().productImage,d().noHeader),children:(0,s.jsx)(m.x,{src:(null==i?void 0:i.thumbnail)||"",alt:"".concat((null==i?void 0:i.brand)||""," ").concat((null==i?void 0:i.title)||""," Image"),width:72,height:72,fitParent:"height",crop:"fill",gravity:"center"})}),(0,s.jsxs)("div",{className:d().productDetails,children:[(0,s.jsx)("div",{className:d().brand,children:null==i?void 0:i.brand}),(0,s.jsx)("div",{className:d().name,children:null==i?void 0:i.title})]})]}),(0,s.jsxs)("div",{className:d().bidInfoWrapper,children:[(0,s.jsxs)("div",{className:d().bidInfo,
1children:[(0,s.jsxs)("div",{className:d().infoRow,children:[(0,s.jsx)("div",{className:d().label,children:r("selling.bid-table.listing-price-label","Listing Price:")}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:null==i?void 0:i.listing_price,sourceCurrency:null==i?void 0:i.currency_code})})]}),(0,s.jsxs)("div",{className:d().infoRow,children:[(0,s.jsx)("div",{className:d().label,children:r("selling.bid-table.highest-offer-label","Highest Offer:")}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:(null==S?void 0:S.latest_price)||0,sourceCurrency:null==i?void 0:i.currency_code})})]})]}),(0,s.jsx)("div",{className:d().action,children:(0,s.jsx)(h.z,{title:r("selling.bid-table.accept-highest-offer-cta","Accept Highest Offer"),fullWidth:!0,onClick:()=>M(!0),size:"small"})}),(0,s.jsxs)("div",{className:d().allOffers,children:[(0,s.jsxs)("div",{className:d().allOffersBtn,onClick:()=>O(!w),children:[r("selling.bid-table.all-offers-cta","All Offers ({{num}})",{num:null==i?void 0:null===(l=i.offers)||void 0===l?void 0:l.length}),w?(0,s.jsx)(v.Z,{width:16,height:16}):(0,s.jsx)(f.Z,{width:16,height:16})]}),(0,s.jsx)(x.z,{open:w,onOpenChange:e=>O(e),content:(0,s.jsx)("div",{className:d().sellerAllOffersContent,children:(0,s.jsx)("div",{className:d().sellerOffersTableBody,children:i.offers.map((e,l)=>(0,s.jsx)(G,{consignment:i,offer:e,isHighestOffer:(null==e?void 0:e.id)===(null==S?void 0:S.id),currencyCode:null==i?void 0:i.currency_code,statusGroup:"active"},"offer-".concat(null==e?void 0:e.id,"-").concat(l)))})})})]})]})]}),E&&(0,s.jsx)(j.Z,{offer:S,dismissAcceptOfferModal:()=>M(!1),side:"seller"})]})},V=e=>{let{consignments:l}=e,{t:i}=(0,a.$G)("account");return(0,s.jsxs)("div",{className:d().accountTable,children:[(0,s.jsxs)("div",{className:t()(d().sellActiveOffersGrid,d().tableHead),children:[(0,s.jsx)("div",{children:i("selling.bid-table.headers.item","Item")}),(0,s.jsx)("div",{children:i("selling.bid-table.headers.highest-bid","Highest Offer")}),(0,s.jsx)("div",{children:i("selling.bid-table.headers.highest-bidding-ends","Offer Ends")}),(0,s.jsx)("div",{className:d().centeredHeader,children:i("selling.bid-table.headers.action","Action")})]}),(0,s.jsx)("div",{className:d().tableBody,children:l.length>0?null==l?void 0:l.map(e=>(0,s.jsx)(F,{consignment:e},"consignment-card-".concat(e.product_id))):(0,s.jsx)("div",{className:d().noConsignmentFound,children:i("selling.bid-table.no-offers-found","No matching offer found")})})]})},Y=e=>{var l;let{consignment:i}=e,{t:r}=(0,a.$G)("account"),{locale:n}=(0,b.eV)(),h=(0,c.useMemo)(()=>(0,N.zY)(n),[n]),[j,_]=(0,c.useState)(!1),C=(0,c.useMemo)(()=>{var e;return(null==i?void 0:null===(e=i.offers)||void 0===e?void 0:e.some(e=>"ACCEPTED"===e.status||"COMPLETED"===e.status||!!e.offer_accepted_at))?"sold":"past"},[null==i?void 0:i.offers]),w=(0,c.useMemo)(()=>{if(!(null==i?void 0:i.offers)||0===i.offers.length)return null;let e=i.offers.filter(e=>"sold"===C?e.offer_accepted_at:e.expire_at||e.offer_rejected_at);if(0===e.length)return null;let l="sold"===C?e.find(e=>e.offer_accepted_at):e.reduce((e,l)=>(l.expire_at||l.offer_rejected_at||0)>(e.expire_at||e.offer_rejected_at||0)?l:e);return null!=l?l:null},[i.offers,C]),O=(0,c.useMemo)(()=>{var e,l;if("sold"===C&&!(null==w?void 0:w.remaining_completed_at)&&!(null==w?void 0:w.offer_accepted_at)||"past"===C&&!(null==w?void 0:w.expire_at)&&!(null==w?void 0:w.offer_rejected_at))return null;let i="sold"===C?null!==(e=null==w?void 0:w.remaining_completed_at)&&void 0!==e?e:null==w?void 0:w.offer_accepted_at:null!==(l=null==w?void 0:w.expire_at)&&void 0!==l?l:null==w?void 0:w.offer_rejected_at,r=(0,u.Z)((0,o.Z)(null!=i?i:""),"sold"===C?"dd MMM yyyy":"dd MMM yyyy HH:mm",{locale:h});return(0,s.jsx)("div",{className:d().expirationDate,children:r})},[h,w,C]),E=(0,c.useMemo)(()=>"/buy/".concat(null==i?void 0:i.brand_handle,"/").concat(null==i?void 0:i.handle,"?p=").concat((0,y.w8)(null==i?void 0:i.product_variant_id)),[i]);return(0,s.jsxs)("div",{className:d().rowWrapper,children:[(0,s.jsxs)("div",{className:d().desktop,children:[(0,s.jsxs)("div",{className:t()(d().rowMain,d().sellSoldOffersGrid),children:[(0,s.jsxs)(p.I,{href:E,className:d().productInfos,children:[(0,s.jsx)("div",{className:d().productImage,children:(0,s.jsx)(m.x,{src:(null==i?void 0:i.thumbnail)||"",alt:"".concat((null==i?void 0:i.brand)||""," ").concat((null==i?void 0:i.title)||""," Image"),width:84,height:84,fitParent:"height",crop:"fill",gravity:"center"})}),(0,s.jsxs)("div",{className:d().productDetails,children:[(0,s.jsx)("div",{className:d().brand,children:null==i?void 0:i.brand}),(0,s.jsx)("div",{className:d().name,children:null==i?void 0:i.title}),(0,s.jsx)("div",{className:d().price,children:(0,s.jsx)(g.Z,{price:null==i?void 0:i.listing_price,sourceCurrency:null==i?void 0:i.currency_code})})]})]}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:(null==w?void 0:w.latest_price)||0,sourceCurrency:null==i?void 0:i.currency_code})}),(0,s.jsx)("div",{children:O})]}),(0,s.jsx)("div",{className:d().separator}),(null==i?void 0:i.offers)&&(0,s.jsxs)("div",{className:d().allOffers,children:[(0,s.jsxs)("div",{className:d().allOffersBtn,onClick:()=>_(!j),children:[r("selling.bid-table.all-offers-cta","All Offers ({{num}})",{num:i.offers.length}),j?(0,s.jsx)(v.Z,{width:20,height:20}):(0,s.jsx)(f.Z,{width:20,height:20})]}),(0,s.jsx)(x.z,{open:j,onOpenChange:e=>_(e),content:(0,s.jsxs)("div",{className:d().sellerAllOffersContent,children:[(0,s.jsxs)("div",{className:t()(d().sellerOffersTableHead,d().sellOffersListGrid),children:[(0,s.jsx)("div",{children:r("selling.bid-table.buyer-name-header","Buyer")}),(0,s.jsx)("div",{children:r("selling.bid-table.latest-offer-header","Latest Offer")}),(0,s.jsx)("div",{className:d().centeredHeader,children:r("selling.bid-table.status-header","Status")}),(0,s.jsx)("div",{children:r("selling.bid-table.ending-on-header","Ending on")})]}),(0,s.jsx)("div",{className:t()(d().sellerOffersTableBody,d().scrollableBody),children:i.offers.map((e,l)=>(0,s.jsxs)(c.Fragment,{children:[(0,s.jsx)(G,{consignment:i,offer:e,statusGroup:C}),l<i.offers.length-1&&(0,s.jsx)("div",{className:d().separator})]},"offer-".concat(null==e?void 0:e.id,"-").concat(l)))})]})})]})]}),(0,s.jsxs)("div",{className:d().mobile,children:[(0,s.jsxs)(p.I,{href:E,className:d().productInfos,onClick:()=>_(!j),children:[(0,s.jsx)("div",{className:t()(d().productImage,d().noHeader),children:(0,s.jsx)(m.x,{src:(null==i?void 0:i.thumbnail)||"",alt:"".concat((null==i?void 0:i.brand)||""," ").concat((null==i?void 0:i.title)||""," Image"),width:72,height:72,fitParent:"height",crop:"fill",gravity:"center"})}),(0,s.jsxs)("div",{className:d().productDetails,children:[(0,s.jsx)("div",{className:d().brand,children:null==i?void 0:i.brand}),(0,s.jsx)("div",{className:d().name,children:null==i?void 0:i.title})]})]}),(0,s.jsxs)("div",{className:d().bidInfoWrapper,children:[(0,s.jsxs)("div",{className:d().bidInfo,
1children:[(0,s.jsxs)("div",{className:d().infoRow,children:[(0,s.jsx)("div",{className:d().label,children:r("selling.bid-table.listing-price-label","Listing Price:")}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:null==i?void 0:i.listing_price,sourceCurrency:null==i?void 0:i.currency_code})})]}),(0,s.jsxs)("div",{className:d().infoRow,children:[(0,s.jsx)("div",{className:d().label,children:"sold"===C?r("selling.bid-table.sold-for-label","Sold For:"):r("selling.bid-table.latest-offer-label","Latest Offer:")}),(0,s.jsx)("div",{className:d().highestOffer,children:(0,s.jsx)(g.Z,{price:(null==w?void 0:w.latest_price)||0,sourceCurrency:null==i?void 0:i.currency_code})})]})]}),(0,s.jsxs)("div",{className:d().allOffers,children:[(0,s.jsxs)("div",{className:d().allOffersBtn,onClick:()=>_(!j),children:[r("selling.bid-table.all-offers-cta","All Offers ({{num}})",{num:null==i?void 0:null===(l=i.offers)||void 0===l?void 0:l.length}),j?(0,s.jsx)(v.Z,{width:16,height:16}):(0,s.jsx)(f.Z,{width:16,height:16})]}),(0,s.jsx)(x.z,{open:j,onOpenChange:e=>_(e),content:(0,s.jsx)("div",{className:d().sellerAllOffersContent,children:(0,s.jsx)("div",{className:d().sellerOffersTableBody,children:i.offers.map((e,l)=>(0,s.jsx)(G,{consignment:i,offer:e,currencyCode:null==i?void 0:i.currency_code,statusGroup:C},"offer-".concat(null==e?void 0:e.id,"-").concat(l)))})})})]})]})]})]})},$=e=>{let{consignments:l,statusGroup:i}=e,{t:r}=(0,a.$G)("account");return(0,s.jsxs)("div",{className:d().accountTable,children:[(0,s.jsxs)("div",{className:t()(d().sellSoldOffersGrid,d().tableHead),children:[(0,s.jsx)("div",{children:r("selling.bid-table.headers.item","Item")}),(0,s.jsx)("div",{children:"sold"===i?r("selling.bid-table.headers.sold-price","Sold Price"):r("selling.bid-table.headers.latest-bid","Latest Offer")}),(0,s.jsx)("div",{children:"sold"===i?r("selling.bid-table.headers.sold-date","Sold Date"):r("selling.bid-table.headers.bidding-ended","Ended On")})]}),(0,s.jsx)("div",{className:d().tableBody,children:l.length>0?null==l?void 0:l.map(e=>(0,s.jsx)(Y,{consignment:e,statusGroup:i},"consignment-card-".concat(e.product_id))):(0,s.jsx)("div",{className:d().noConsignmentFound,children:r("selling.bid-table.no-offers-found","No matching offers found")})})]})}},51156:function(e,l,i){"use strict";i.d(l,{Y:function(){return c}});var s=i(85893),r=i(67294),t=i(28677),a=i(38764),n=i(10688),d=i.n(n),c=e=>{let{consignments:l,setFilteredConsignments:i,initialQuery:n}=e,{t:c}=(0,t.$G)("account"),[o,u]=(0,r.useState)(null!=n?n:""),f=(0,r.useRef)(!1),v=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{let s=e.trim().toLowerCase();if(!s){i(l);return}i(l.filter(e=>{var l,i;return(null==e?void 0:null===(l=e.brand)||void 0===l?void 0:l.toLowerCase().includes(s))||(null==e?void 0:null===(i=e.title)||void 0===i?void 0:i.toLowerCase().includes(s))}))},[l,i]);return(0,r.useEffect)(()=>{!f.current&&n&&n!==o&&u(n)},[n,o]),(0,r.useEffect)(()=>{if(!f.current&&n)return;let e=setTimeout(()=>{h(o)},300);return()=>clearTimeout(e)},[o,h,n]),(0,s.jsx)("div",{className:d().searchBarWrapper,children:(0,s.jsx)("form",{className:d().searchBoxForm,action:"",role:"search",noValidate:!0,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),v.current&&v.current.blur(),h(o)},children:(0,s.jsxs)("label",{className:d().searchInputWrapper,children:[(0,s.jsx)(a.Z,{className:d().searchIcon}),(0,s.jsx)("input",{className:d().searchInput,ref:v,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:c("search.input-placeholder","Search by watch brand"),spellCheck:!1,maxLength:512,type:"search",value:o,onChange:e=>{var l;f.current=!0,u(null!==(l=e.currentTarget.value)&&void 0!==l?l:"")}})]})})})}},12282:function(e){e.exports={collapsibleRoot:"fnwV7PGw",collapsibleContent:"jhwEmMy3",slideDown:"B82gG5wE",slideUp:"LopYJNqi",shine:"TP373Pj4"}},96723:function(e){e.exports={contentWrapper:"_7Zx9zYIj",titleWrapper:"aOGRkAB7",icon:"QHOkNaSp",title:"JrEbJPxa",description:"xoDVAhod",watchInformation:"zRKClOYb",image:"ujcpljiG",watchDescription:"lcmoagcB",brandName:"Un1HX_Ak",modelName:"sY2rntLI",price:"gSIMcXwL",offerPriceWrapper:"X7ht1iDz",pricingSection:"_5y6X3aZh",priceTitle:"Tp6MjuWp",priceValue:"IHHdQkCI",finalOfferPrice:"_1LycLyS7",buttonsWrapper:"mhy5UlQj",error:"hy6diSWT",shine:"G2bpV_zs"}},10688:function(e){e.exports={searchBarWrapper:"pxd7cFpb",searchBoxForm:"uQStT
1Cg4",searchInputWrapper:"rpSofsn2",searchIcon:"HwaJxDrZ",searchInput:"p0Ru2ouj",shine:"_5VEiII0w"}}}]);
2//# chunkId=01a0f117-ea61-7651-8acf-2c6e25f7f2b8

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.