PageSourceSearch

https://app.marteye.ie/static/js/9437.20d8887c.chunk.js

js marteye.ie collected 2026-10-02 16:30:51 UTC 13,933 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[9437],{68843(t,e,o){o.r(e),o.d(e,{default:()=>A});var n=o(96540),i=o(33867),r=o(15980),s=o(3469),a=o(5556),u=o.n(a),c=o(20671),d=o(74848);const l=({color:t})=>(0,d.jsx)(c.default,{source:o(9473),style:{tintColor:t}});l.propTypes={color:u().string},l.defaultProps={color:"red"};const m=l;class f extends n.Component{state={hearts:[],height:null};createHeart(t){return{id:t,right:p(50,60)}}removeHeart(t){this.setState({hearts:this.state.hearts.filter(e=>e.id!==t)})}componentDidUpdate(t){const e=t.count||-1,o=this.props.count-e;if(o<=0)return;const n=Array(o).fill(0).map((t,o)=>e+o).map(this.createHeart);this.setState({hearts:this.state.hearts.concat(n)})}handleOnLayout=t=>{const e=t.nativeEvent.layout.height;this.setState({height:e})};render(){const{height:t}=this.state,{color:e,renderCustomShape:o}=this.props,n=null!==t;let i={};return null!==e&&(i.color=e),(0,d.jsx)(s.default,{style:[g.container,this.props.style],onLayout:this.handleOnLayout,pointerEvents:"none",children:n&&this.state.hearts.map(({id:e,right:n})=>(0,d.jsx)(h,{height:t||0,style:{right:n},onComplete:this.removeHeart.bind(this,e),children:o?o(e):(0,d.jsx)(m,Object.assign({},i))},e))})}}class h extends n.Component{constructor(t){super(t),this.state={position:new i.default.Value(0),shapeHeight:null,enabled:!1,animationsReady:!1}}componentDidMount(){i.default.timing(this.state.position,{duration:2e3,useNativeDriver:!1,toValue:-1*this.props.height}).start(this.props.onComplete)}getAnimationStyle(){return this.state.animationsReady?{transform:[{translateY:this.state.position},{translateX:this.xAnimation},{scale:this.scaleAnimation},{rotate:this.rotateAnimation}],opacity:this.opacityAnimation}:{opacity:0}}handleOnLayout=t=>{if(this.rendered)return null;this.rendered=!0;const e=Math.ceil(this.props.height),o=-1*e,n=t.nativeEvent.layout.height;e>30&&(this.yAnimation=this.state.position.interpolate({inputRange:[o,0],outputRange:[e,0]}),this.opacityAnimation=this.yAnimation.interpolate({inputRange:[0,Math.max(0,e-n)],outputRange:[1,0]}),this.scaleAnimation=this.yAnimation.interpolate({inputRange:[0,15,30,e],outputRange:[0,1.2,1,1]}),this.xAnimation=this.yAnimation.interpolate({inputRange:[0,e/2,e],outputRange:[0,15,0]}),this.rotateAnimation=this.yAnimation.interpolate({inputRange:[0,e/4,e/3,e/2,e],outputRange:["0deg","-2deg","0deg","2deg","0deg"]}),setTimeout(()=>this.setState({animationsReady:!0}),16))};render(){return(0,d.jsx)(i.default.View,{style:[g.shapeWrapper,this.getAnimationStyle(),this.props.style],onLayout:this.handleOnLayout,children:this.props.children})}}const g=r.default.create({container:{top:0,left:0,right:0,bottom:0,position:"absolute"},shapeWrapper:{position:"absolute",bottom:0,backgroundColor:"transparent"}}),p=(t,e)=>Math.random()*(e-t)+t,A=f},16757(t,e,o){o.r(e),o.d(e,{default:()=>f});var n=o(96540),i=o(15980),r=o(79231),s=o(9620),a=o(3469),u=o(19934),c=o(89774),d=o(30127),l=o(68843),m=o(74848);const f=(0,n.memo)(function(t){let e=(0,u.useCurrentHighestBids)(),o=(0,u.useCurrentAuctionIdents)(),i=(0,u.useActiveLotId)(),r=e&&e[0];const[a,c]=(0,n.useState)(1),d=function(t){const e=(0,n.useRef)();return(0,n.useEffect)(()=>{e.current=t},[t]),e.current}(r);let f=(0,n.useCallback)(()=>{c(a+1)},[c,a]);(0,n.useEffect)(()=>{r!==d&&f()},[r,d,f]);let p=(0,n.useCallback)(()=>(0,m.jsx)(h,{uid:r?.owner,auctionId:o?.auctionId,lotId:i,colour:r?.colour,increment:r?.increment}),[r]);return(0,m.jsx)(s.default,{activeOpacity:1,style:g.FloatingBids,onPress:()=>c(a+1),children:(0,m.jsx)(l.default,{count:a,renderCustomShape:p})})});function h(t){let e=(0,d.getUserColour)(t.uid,t.auctionId,t.lotId);t.colour&&(e=t.colour);let o=(0,u.formatFixed)(t.increment)||"";return(0,m.jsx)(a.default,{style:[g.avatar,!!t.uid&&{backgroundColor:e}],children:(0,m.jsxs)(r.default,{style:g.increment,maxFontSizeMultiplier:1,children:["+",o]})})}const g=i.default.create({FloatingBids:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",zIndex:200,position:"absolute",right:10,bottom:0,width:10,top:0,minHeight:10,minWidth:10,backgroundColor:"transparent",overflow:"visible"},avatar:{width:32,height:32,borderRadius:16,display:"flex",justifyContent:"center",alignItems:"center"},increment:{color:"#FFF",fontFamily:c.Fonts.Montserrat_700Bold,fontSize:15}})},46481(t,e,o){o.r(e),o.d(e,{AuctionSync:()=>H});var n=o(96540),i=o(96718),r=o(19934),s=o(44191),a=o(67478);const{currentAuctionIdentsAtom:u,currentAuctionAtom:c,currentLotsAtom:d,currentHighestBidsAtom:l,selectedHighestBidsAtom:m,participantBidderIdsAtom:f,currentInfoBoardAtom:h,depositRequiredAtom:g,auctionCurrencyAtom:p,auctionLoadStateAtom:A}=r.AuctionAtoms;function y(t,e){let o=!1,n=new Set(t);return e.forEach(t=>{t.owner&&!n.has(t.owner)&&(n.add(t.owner),o=!0)}),o?Array.from(n):t}function I(t){const[e,o]=(0,i.useAtom)(u),[I,w]=(0,i.useAtom)(c),[C]=(0,i.useAtom)(d),E=(0,i.useSetAtom)(l),v=(0,i.useSetAtom)(m),x=(0,i.useSetAtom)(f),B=(0,i.useSetAtom)(h),j=(0,i.useSetAtom)(p),T=(0,i.useSetAtom)(g),O=(0,i.useSetAtom)(A);
1let[R,U]=(0,n.useState)(null);(0,n.useEffect)(()=>(async function(){O("loading");let e=s.default.firestore().collectionGroup("auctions").where("id","==",t).limit(1),n=await e.get({source:"cache"});if(n.empty&&n.metadata.fromCache&&(console.log(`No auction found for ${t} in cache`),n=await e.get({source:"server"})),n.empty)U(!1),O("missing");else{let e=n.docs[0].data();o({auctionId:t,ownerId:e.owner}),U(!0),O("loaded")}}(),()=>{o(null),U(null)}),[t,o,U,O]),(0,n.useEffect)(()=>{if(!e)return;let{auctionId:t,ownerId:n}=e,i=s.default.firestore().doc(`profiles/${n}/auctions/${t}`).onSnapshot(t=>{(0,s.docExists)(t)?w(t.data()):w(null)},i=>{console.error("Auction subscription dropped",i);let r=e.reloadCount||0;r>200?console.error("Hit max reloads."):setTimeout(()=>{o({auctionId:t,ownerId:n,reloadCount:r+1})},1e3)});return()=>{i&&i(),w(null)}},[e,o,w]),(0,n.useEffect)(()=>{x([])},[e?.auctionId,e?.ownerId,x]),(0,n.useEffect)(()=>{if(I){let t=(I.currency||"EUR").toUpperCase(),e=I.currency||"?";t in r.symbolCurrencyMatrix&&(e=r.symbolCurrencyMatrix[t]),j(e)}return()=>{j("\u20ac")}},[j,I]);let D=I&&I.currentLot;const[L,H]=(0,r.useSelectedLotIdState)(),P=(0,a.useCurrentUid)();!function(t){const[e,o]=(0,i.useAtom)(d);let[r,a]=(0,n.useReducer)(b,S),[u,c]=(0,n.useState)((new Date).getTime());(0,n.useEffect)(()=>{if(!t)return;let{auctionId:e,ownerId:o}=t,n=s.default.firestore().collection(`profiles/${o}/auctions/${e}/lots`).orderBy("createdAt","desc").onSnapshot(t=>{let o=[],n=[];
1t.docChanges().forEach(function(t){"added"===t.type&&o.push(Object.assign({id:t.doc.id,auctionId:e},t.doc.data())),"modified"===t.type&&o.push(Object.assign({id:t.doc.id,auctionId:e},t.doc.data())),"removed"===t.type&&n.push(Object.assign({id:t.doc.id,auctionId:e},t.doc.data()))}),o.length&&a({type:"updates",lots:o}),n.length&&a({type:"deletes",lots:n})},t=>{console.error("Error syncing lots",t),setTimeout(()=>{c((new Date).getTime())},1e3)});return()=>{n&&n(),a({type:"reset"})}},[t,a,u,c]),(0,n.useEffect)(()=>{let t=Object.values(r);o(t.sort((t,e)=>t.ordinal&&e.ordinal?e.ordinal.localeCompare(t.ordinal):t.createdAt&&e.createdAt?t.createdAt.seconds<e.createdAt.seconds?1:-1:0))},[r,o])}(e);let $=(0,r.useAuctionHasCatalogue)();(0,n.useEffect)(()=>{!L&&C&&C.length&&(D?H(D):$||H(C[0].id))},[L,H,D,C,$]);let[k,M]=(0,n.useState)((new Date).getTime());(0,n.useEffect)(()=>{if(!e||!D)return;let{auctionId:t,ownerId:o}=e,n=s.default.firestore().collection(`profiles/${o}/auctions/${t}/lots/${D}/bids`).orderBy("amount","desc").limit(10).onSnapshot({includeMetadataChanges:!0},t=>{if(t.empty)E([]);else{let e=t.docs.map(t=>Object.assign({id:t.id},t.data(),{_metadata:{hasPendingWrites:t.metadata.hasPendingWrites}}));E(e),x(t=>y(t,e))}},t=>{console.error("Error fetching bids for the current active lot "+D,t),setTimeout(()=>{M((new Date).getTime())},1e3)});return()=>{n&&n(),E(null)}},[e,D,E,P,k,M]);let[F,z]=(0,n.useState)((new Date).getTime());(0,n.useEffect)(()=>{if(!e||!L||e.ownerId!==P)return;let{auctionId:t,ownerId:o}=e,n=s.default.firestore().collection(`profiles/${o}/auctions/${t}/lots/${L}/bids`).orderBy("amount","desc").limit(10).onSnapshot({includeMetadataChanges:!0},t=>{if(t.empty)v([]);else{let e=t.docs.map(t=>Object.assign({id:t.id},t.data(),{_metadata:{hasPendingWrites:t.metadata.hasPendingWrites}}));v(e),x(t=>y(t,e))}},t=>{console.error("Error fetching bids for the selected lot "+L,t),setTimeout(()=>{z((new Date).getTime())},1e3)});return()=>{n&&n(),v(null)}},[e,v,L,P,F,z]);let[G,Q]=(0,n.useState)((new Date).getTime());(0,n.useEffect)(()=>{if(!e)return;let{auctionId:t,ownerId:o}=e,n=s.default.firestore().collection(`profiles/${o}/auctions/${t}/infoboards`).orderBy("createdAt","desc").limit(1).onSnapshot(t=>{if(t.empty||1!==t.size)B(null);else{let e=t.docs[0].data();B(e)}},t=>{console.error("Error fetching latest infoboard",t),setTimeout(()=>{Q((new Date).getTime())},1e3)});return()=>{n&&n(),B(null)}},[e,B,G,Q]);let W=I?.deposit;return(0,n.useEffect)(()=>{if(e&&P){if(W)return s.default.firestore().doc(`profiles/${e?.ownerId}/auctions/${e.auctionId}/deposits/${P}`).onSnapshot(t=>{(0,s.docExists)(t)?T(!1):T(!0)},t=>{console.error("Error checking for deposit",t)}),()=>{};T(!1)}},[W,T,e,P]),R}let S={};function b(t,e){if("reset"===e.type)return S;let o=Object.assign({},t),n=e.lots;if("updates"===e.type)for(let i of n)o[i.id]=i;if("deletes"===e.type)for(let i of n)delete o[i.id];return o}var w=o(64331);const{currentAuctionIdentsAtom:C,currentAuctionAtom:E,currentLotsAtom:v,currentHighestBidsAtom:x,selectedHighestBidsAtom:B,currentInfoBoardAtom:j,depositRequiredAtom:T,auctionLoadStateAtom:O,auctionCurrencyAtom:R}=r.AuctionAtoms;function U(t){const[e,o]=(0,i.useAtom)(E),[r]=(0,i.useAtom)(v),a=(0,i.useSetAtom)(x),u=(0,i.useSetAtom)(j),c=(0,i.useSetAtom)(R),d=((0,i.useSetAtom)(T),(0,i.useSetAtom)(O),(0,i.use
1SetAtom)(v));let l=function(t){let[e,o]=(0,n.useState)(null),r=(0,i.useSetAtom)(C),a=(0,i.useSetAtom)(O),u=(0,i.useSetAtom)(E);return(0,n.useEffect)(()=>(async function(){a("loading");let e=s.default.firestore().collectionGroup("auctions").where("id","==",t).limit(1),n=await e.get({source:"cache"});if(n.empty&&n.metadata.fromCache&&(n=await e.get({source:"server"})),n.empty)o(!1),r(null),u(null),a("missing");else{let e=n.docs[0].data();r({auctionId:t,ownerId:e.owner}),u(e),o(!0),a("loaded")}}(),()=>{r(null),o(null)}),[t,r,o,a]),e}(t);(0,n.useEffect)(()=>{if(!l)return;let e=new w.AuctionSocket(t);return e.onConnectionStateChanged(t=>{console.log("[auction-mstream] connection state",t)}),e.onAuctionStateChanged((e,n)=>{if(console.log("[auction-mstream] auction state",e),n.auction===e.auction&&n.isBiddingPaused===e.isBiddingPaused&&n.currentLotId===e.currentLotId&&n.currentIncrement===e.currentIncrement||(c(e.auction.currency),o(t=>{let o=Object.assign({},t,{isBiddingPaused:e.isBiddingPaused,currentLot:e.currentLotId,increments:[e.currentIncrement]});if(e.auction){let t=e.auction.startAt.getTime(),n=e.auction.closedAt.getTime();o=Object.assign(o,e.auction,{startAt:t>0?new Date(t).toISOString():null,closedAt:n>0?new Date(n).toISOString():null,lotCatalogueCardType:e.auction?.lotCatalogueCardType})}return console.log("Auction state",o),o})),e.bids!==n.bids){console.log("Seen bids",e.bids);let t=[];for(let o=0;o<e.bids.length;o++){let n=o>0?e.bids[o-1].amount:e.startingPrice,i=e.bids[o],r={id:i.id,owner:i.bidderLotId.toString(),amount:i.amount,colour:`rgba(${i.colour.r},${i.colour.g},${i.colour.b}, ${i.colour.a??1})`,lot:i.lotId,createdAt:s.default.firestore.Timestamp.now(),increment:i.amount-n};t.push(r)}a(t.reverse())}if(e.infoboardUrl!==n.infoboardUrl){let t={createdAt:(new Date).toISOString(),infoBoardImage:e.infoboardUrl};u(t)}if(e.catalogue!==n.catalogue){let o=e.catalogue.map(o=>{let n=Object.assign({},o,{auctionId:t,createdAt:s.default.firestore.Timestamp.now(),startingPrice:0,startedAt:o.startedAt?s.default.firestore.Timestamp.fromDate(o.startedAt):null,endedAt:o.endedAt?s.default.firestore.Timestamp.fromDate(o.endedAt):null,items:o.items.map((n,i)=>({id:`${o.id}-${i}`,auctionId:t,lotId:o.id,auctionOwnerId:e.owner?.id,createdAt:s.default.firestore.Timestamp.now(),type:n.type,media:n.media.map(t=>({uri:t.uri,type:t.type,size:t.size?{width:t.size.width,height:t.size.height}:null})),attributes:n.attributes.reduce((t,e)=>(t[e.name]=e.value,t),{})}))});return o.title&&n.items?.length&&(n.items[0].attributes.Title=o.title),o.subtitle&&n.items?.length&&(n.items[0].attributes.Subtitle=o.subtitle),n.id===e.currentLotId&&(n.startingPrice=e.startingPrice),n});console.log("lots",o),d(o)}if(e.startingPrice!==n.startingPrice){let t=e.currentLotId;d(o=>o.map(o=>o.id===t?Object.assign({},o,{startingPrice:e.startingPrice}):o))}}),()=>{e.close()}},[t,l])}var D=o(93581),L=o(74848);function H(t){let e=(0,D.useConfig)(),o=(0,i.useAtomValue)(r.AuctionAtoms.currentAuctionIdentsAtom);return(0,r.useSyncReplayAudio)(o),e._isLoading?null:(0,L.jsx)(L.Fragment,{children:e.useMstreamAuctions&&!t.forceFirestore?(0,L.jsx)($,{auctionId:t.auctionId}):(0,L.jsx)(P,{auctionId:t.auctionId})})}function P(t){return I(t.auctionId),(0,L.jsx)(L.Fragment,{})}function $(t){return(0,n.useEffect)(()=>{console.log("Using Mstream Auction Sync")},[]),U(t.auctionId),(0,L.jsx)(L.Fragment,{children:" "})}},9473(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABYUlEQVR4AWLwyQQUXweQCUVRGMe1SggCCCCAAQwA8wgAiAAIALGIyQgIIERABCKwCUADABgAggwYMPAo1Le/edjmXvddd+/djx+EvkN0z3mIyvghaSHBGBvM0UPb9YWkjR7m2GCMBC3nAKSGCU6QxQGJoTjBAbI4YYKacQByizcohwumuMlMcYHc6KDr1wCkiSPk6TUjT0c0fw6wgEq2+O4md7hCJaOTbvIExUE3eYbioJu8Q3HQTT6gOOgmL1AcdJNHKA66yT0UB92kiU+oZHTSnf0bDaCSDf4+RnuoJHvTa9hBChUsRce2D4yggo3sGxHIEirI0rmSkQrWBZSvUcm7E1axhf7JFtWcSylA6thBgXao+2zFAEgDu8Dyhvdabvg5VpCnFaqed4EdmUE5zQIOEzsydOyPVwzDLiMH0sfZUH5GP+A0y490kUKZFN2A29AfSZBmkpDjNGwIhF7HUX0BmOX1CgvCyGoAAAAASUVORK5CYII="}}]);

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.