1"use strict";(self["webpackChunkauthenticated_frontend"]=self["webpackChunkauthenticated_frontend"]||[]).push([[8623],{36780:(t,e,i)=>{i.r(e),i.d(e,{default:()=>Xi});var s=function(){var t=this,e=t._self._c;return t.ready&&t.firstLoadDone&&!t.primaryPropositionActive?e("NoActiveModal",{attrs:{"payment-page-proposition-id":t.primaryPropositionId,source:"swap-list"}}):e("div",{staticClass:"swap-list-wrapper"},[t.showNewTutorial?e("SwapListTutorial",{ref:"newTutorial",attrs:{show:!t.newTutorialPaused,"empty-state":t.newTutorialEmptyState},on:{step:t.handleNewTutorialStep,completed:t.handleNewTutorialCompleted}}):t._e(),[e("AccountNotificationModal",{attrs:{show:t.showAccountNotificationModal,count:t.totalSwapCount},on:{"cta-click":t.handleNotificationCtaClick,close:t.handleCloseNotification}}),e("MobileSwapHeader"),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showFullscreenMap&&!t.isShowingSwapModal,expression:"!showFullscreenMap && !isShowingSwapModal"}],staticClass:"tab-navigation-wrapper"},[e("SwapTabNavigation2",{attrs:{"tab-bg-color":"transparent","unread-incoming-count":t.unreadIncomingCount,"unanswered-total-count":t.unansweredTotalCount,"merged-answered-tab":t.consumablesEnabled},on:{"interest-received":t.handleInterestReceived}})],1),e("div",{staticClass:"content-wrapper"},[e("div",{class:["list-content",{"list-content--with-map":t.showSideMap}]},[t.isMobile?t._e():e("InfoBanner",{staticClass:"info-banner"}),t.isTabSwitching||!t.firstLoadDone?e("div",{staticClass:"skeleton-sections"},[e("div",{staticClass:"skeleton-section"},[e("div",{staticClass:"skeleton-header"},[e("div",{staticClass:"skeleton-title"})]),e("div",{staticClass:"skeleton-grid skeleton-grid--feed"},t._l(4,function(t){return e("SwapListCardSkeleton",{key:"sk"+t})}),1)])]):t.currentTabEmpty&&t.isUnansweredFilter?e("TipBox",{staticClass:"low-results-tip",attrs:{title:t.$t("tip_box_empty_title"),body:t.$t("tip_box_empty_body"),"button-label":t.$t("tip_box_empty_button")},on:{"button-click":function(e){t.trackPreferenceButtonClick("swap-list"),t.handleMapEditWishes()}}}):t.currentTabEmpty&&!t.isMergedAnsweredTab?e("NoResult"):e("div",[t.swapFilterType===t.SWAP_FILTER_TYPES.UNANSWERED?e("div",[e("LoadMoreBlock",{staticClass:"feed-map-block",attrs:{infinite:"","insert-after":t.showBoostBlock?20:null,suggestions:t.displayedTopPicks,title:t.$t("top_picks_title"),subtitle:t.$t("top_picks_subtitle"),"is-blurred":t.shouldBlurCards,"has-more":t.topPicks.hasMore,loading:t.topPicks.loading,"load-more-label":t.$t("swap_list_load_more"),"loading-label":t.$t("general_loading")},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove,"load-more":function(e){return t.loadMore(t.topPicks)}},scopedSlots:t._u([{key:"header-action",fn:function(){return[e("StickyMapButton",{attrs:{compact:t.isMobile,"show-map":t.showStickyMapButton},on:{"map-click":t.goToMap}},[e("button",{staticClass:"new-sort-btn",class:{"is-active":t.newFirst,"is-empty":t.isNewSortEmpty},attrs:{type:"button",disabled:t.isNewSortEmpty,"aria-pressed":t.newFirst?"true":"false"},on:{click:t.toggleNewFirst}},[t._v(" "+t._s(t.$t("swap_list_new_sort_label",{count:t.newItemsCount}))+" ")]),e("button",{staticClass:"edit-wishes-round",attrs:{type:"button","aria-label":t.$t("swaplist_edit_wishes_button")},on:{click:function(e){t.trackPreferenceButtonClick("swap-list"),t.handleMapEditWishes()}}},[e("BaseIcon",{attrs:{"icon-file":"filter-slider-black",width:18,height:18}})],1)])]},proxy:!0},{key:"insert",fn:function(){return[e("SponsoredPropositions",{staticClass:"sponsored-propositions",attrs:{propositions:t.sponsoredPropositions,title:t.$t("proposition_extra_visibility_title")}})]},proxy:!0},{key:"card",fn:function({suggestion:i,index:s}){return[e("SwapListCard",{attrs:{suggestion:i,"disable-link":t.newTutorialLockFirstCard&&0===s,"disable-carousel":t.newTutorialLockFirstCard&&0===s,"hide-super-button":t.newTutorialLockFirstCard&&0===s,"is-blurred":t.shouldBlurCards||i.isBlurred,"in-feed":""},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove}})]}},{key:"grid-append",fn:function(){return[t.isUnansweredFilter&&!t.topPicks.hasMore&&t.topPicks.items.length>0?e("TipBox",{staticClass:"inline-tip",attrs:{variant:"stacked",title:t.$t("tip_box_inline_title"),body:t.$t("tip_box_inline_body"),"button-label":t.$t("tip_box_empty_button")},on:{"button-click":function(e){t.trackPreferenceButtonClick("swap-list"),t.handleMapEditWishes()}}}):t._e()]},proxy:!0}],null,!1,1597211246)}),t.isUnansweredFilter&&0===t.topPicks.items.length&&!t.topPicks.loading?e("TipBox",{staticClass:"low-results-tip top-picks-empty-tip",attrs:{title:t.$t("tip_box_empty_title"),body:t.$t("tip_box_empty_body"),"button-label":t.$t("tip_box_empty_button")},on:{"button-click":function(e){t.trackPreferenceButtonClick("swap-list"),t.handleMapEditWishes()}}}):t._e()],1):t._e(),t.swapFilterType===t.SWAP_FILTER_TYPES.LAST_PART_NEW&&t.incoming.items.length>0?e("LoadMoreBlock",{staticClass:"feed-map-block",attrs:{infinite:"",suggestions:t.displayedIncoming,title:t.$t("incoming_block_title"),subtitle:t.$t("incoming_block_subtitle",{count:t.incoming.total}),"has-more":t.incoming.hasMore,loading:t.incoming.loading,"load-more-label":t.$t("swap_list_load_more"),"loading-label":t.$t("general_loading"),"is-blurred":t.shouldBlurCards},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove,"load-more":function(e){return t.loadMore(t.incoming)}},scopedSlots:t._u([{key:"header-action",fn:function(){return[t.showInlineMap?t._e():e("StickyMapButton",{attrs:{compact:t.isMobile},on:{"map-click":t.goToIncomingMap}})]},proxy:!0},{key:"card",fn:function({suggestion:i}){return[e("SwapListCard",{attrs:{suggestion:i,"is-blurred":t.shouldBlurCards||i.isBlurred,"in-feed":"","hide-super-button":""},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove}})]}}],null,!1,2840452444)}):t._e(),t.showBoostFloatingCta?e("button",{class:["floating-cta boost-floating-cta",t.floatingCtaModifier],attrs:{type:"button","data-buy-boost-cta":""},on:{click:t.openBoostPurchase}},[e("BaseIcon",{attrs:{"icon-file":"boost-white",width:18,height:18}}),e("span",[t._v(t._s(t.$t("swap_list_incoming_boost_cta")))])],1
1):t._e(),!t.consumablesEnabled&&t.swapFilterType===t.SWAP_FILTER_TYPES.ANSWERED&&t.interested.items.length>0?e("LoadMoreBlock",{staticClass:"feed-map-block",attrs:{infinite:"",suggestions:t.interested.items,title:t.$t("answered_block_title"),subtitle:t.$t("answered_block_subtitle"),"has-more":t.interested.hasMore,loading:t.interested.loading,"load-more-label":t.$t("swap_list_load_more"),"loading-label":t.$t("general_loading")},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove,"load-more":function(e){return t.loadMore(t.interested)}},scopedSlots:t._u([{key:"header-action",fn:function(){return[t.showInlineMap?t._e():e("StickyMapButton",{attrs:{compact:t.isMobile},on:{"map-click":t.goToInterestedMap}})]},proxy:!0},{key:"card",fn:function({suggestion:i}){return[e("SwapListCard",{attrs:{suggestion:i,"is-blurred":t.shouldBlurCards||i.isBlurred},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove}})]}}],null,!1,2946639330)}):t._e(),!t.consumablesEnabled&&t.swapFilterType===t.SWAP_FILTER_TYPES.REMOVED&&t.removed.items.length>0?e("LoadMoreBlock",{staticClass:"feed-map-block",attrs:{infinite:"",suggestions:t.removed.items,title:t.$t("removed_block_t
1itle"),subtitle:t.$t("removed_block_subtitle"),"has-more":t.removed.hasMore,loading:t.removed.loading,"load-more-label":t.$t("swap_list_load_more"),"loading-label":t.$t("general_loading")},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove,"load-more":function(e){return t.loadMore(t.removed)}},scopedSlots:t._u([{key:"header-action",fn:function(){return[t.showInlineMap?t._e():e("StickyMapButton",{attrs:{compact:t.isMobile},on:{"map-click":t.goToRemovedMap}})]},proxy:!0},{key:"card",fn:function({suggestion:i}){return[e("SwapListCard",{attrs:{suggestion:i,"is-blurred":t.shouldBlurCards||i.isBlurred},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove}})]}}],null,!1,3858166791)}):t._e(),t.isMergedAnsweredTab?e("LoadMoreBlock",{staticClass:"feed-map-block",attrs:{infinite:"","two-column":"",suggestions:t.answeredList.items,title:t.$t("swap_list_my_answered_heading"),subtitle:t.$t("swap_list_my_answered_subtitle"),"has-more":t.answeredList.hasMore,loading:t.answeredList.loading,"load-more-label":t.$t("swap_list_load_more"),"loading-label":t.$t("general_loading")},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove,"load-more":function(e){return t.loadMore(t.answeredList)}},scopedSlots:t._u([{key:"header-action",fn:function(){return[e("StickyMapButton",{attrs:{compact:t.isMobile,"show-map":!t.showInlineMap},on:{"map-click":function(e){t.isRemovedFilter?t.goToRemovedMap():t.goToInterestedMap()}}},[e("div",{staticClass:"answered-toggle",attrs:{role:"group","aria-label":t.$t("swap_list_tabs_answered")}},[e("button",{class:["answered-toggle-btn",{"is-active":!t.isRemovedFilter}],attrs:{type:"button","aria-pressed":t.isRemovedFilter?"false":"true","aria-label":t.$t("interest_button_interested")},on:{click:function(e){return t.setAnsweredSubTab(t.SWAP_FILTER_TYPES.ANSWERED)}}},[e("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("polyline",{attrs:{points:"20 6 9 17 4 12"}})])]),e("button",{class:["answered-toggle-btn",{"is-active":t.isRemovedFilter}],attrs:{type:"button","aria-pressed":t.isRemovedFilter?"true":"false","aria-label":t.$t("interest_badge_removed")},on:{click:function(e){return t.setAnsweredSubTab(t.SWAP_FILTER_TYPES.REMOVED)}}},[e("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M6 6l12 12M18 6L6 18"}})])])])])]},proxy:!0},{key:"card",fn:function({suggestion:i}){return[e("SwapListCard",{attrs:{suggestion:i,compact:"","is-blurred":t.shouldBlurCards||i.isBlurred},on:{like:t.handleGridLike,remove:t.handleGridRemove,"undo-remove":t.handleGridUndoRemove}})]}},{key:"after-grid",fn:function(){return[t.answeredList.loading&&0===t.answeredList.items.length?e("div",{staticClass:"skeleton-grid skeleton-grid--two-column",attrs:{"aria-hidden":"true"}},t._l(4,function(t){return e("SwapListCardSkeleton",{key:"answered-skeleton-"+t})}),1):t.currentTabEmpty?e("NoResult"):t._e()]},proxy:!0}],null,!1,1967062017)}):t._e(),t.showSuperInterestFloatingCta?e("button",{class:["floating-cta super-interest-floating-cta",t.floatingCtaModifier],attrs:{type:"button"},on:{click:t.handleSuperInterestCta}},[e("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"}},[e("path",{attrs:{d:"M12 2.5l2.9 6.1 6.6.9-4.8 4.7 1.1 6.6-5.8-3.2-5.8 3.2 1.1-6.6L2.5 9.5l6.6-.9z"}})]),e("span",[t._v(t._s(t.superInterestCtaLabel))])]):t._e()],1)],1),t.showSideMap?e("aside",{staticClass:"side-map-column"},[e("div",{staticClass:"side-map-sticky"},[e("SwapListSideMap",{attrs:{"proposition-id":t.currentPropositionId,"swap-filter-type":t.swapFilterType,locked:t.sideMapLocked},on:{"show-interest":t.handleMapShowInterest,remove:t.handleMapRemove,"undo-remove":t.handleMapUndoRemove}})],1)]):t._e()]),t.showEditWishesModal?e("EditWishesModal",{attrs:{"proposition-id":t.primaryPropositionId,"wish-count":t.primaryPropositionWishCount,"swap-type":t.primaryProposition?t.primaryProposition.swapType:null},on:{close:function(e){t.showEditWishesModal=!1},saved:t.handleWishesSaved}}):t._e(),t.showFullscreenMap?e("SuggestionsFullscreenMap",{attrs:{v2:"","proposition-id":t.currentPropositionId,"pins-endpoint":t.mapPinsEndpoint,"hide-edit-wishes":t.swapFilterType!==t.SWAP_FILTER_TYPES.UNANSWERED,"hide-super-button":t.swapFilterType===t.SWAP_FILTER_TYPES.LAST_PART_NEW,"received-super-interest":t.mapReceivedSuperInterest},on:{close:function(e){return t.closeFullscreenMap()},"edit-wishes":function(e){t.trackPreferenceButtonClick("map"),t.handleMapEditWishes()},"show-interest":t.handleMapShowInterest,remove:t.handleMapRemove,"undo-remove":t.handleMapUndoRemove}}):t._e()]],2)},r=[],o=i(95353),n=i(98648),a=function(){var t=this,e=t._self._c;return t.visible?e("div",{class:["swap-tutorial",{"swap-tutorial--shown":t.shown}]},[t.isInterlude||!t.targetRect&&t.shown?e("div",{staticClass:"swap-tutorial__backdrop",on:{click:t.handleInterludeBackdropClick}}):t._e(),t.isInterlude?e("div",{staticClass:"swap-tutorial__coach swap-tutorial__coach--centered",attrs:{role:"dialog","aria-modal":"true"}},[e("div",{staticClass:"swap-tutorial__top-row"},[e("div",{staticClass:"swap-tutorial__meta"},[e("span",{staticClass:"swap-tutorial__meta-icon",attrs:{"aria-hidden":"true"}},[e("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{d:"M9.94 14.06A2 2 0 0 0 8.5 12.62l-5.5-1.42 5.5-1.42a2 2 0 0 0 1.44-1.44L11.36 3l1.42 5.34a2 2 0 0 0 1.44 1.44l5.5 1.42-5.5 1.42a2 2 0 0 0-1.44 1.44L11.36 20z"}}
1),e("path",{attrs:{d:"M20 4v3"}}),e("path",{attrs:{d:"M21.5 5.5h-3"}})])])])]),e("h2",{staticClass:"swap-tutorial__title"},[t._v(" "+t._s(t.$t("tutorial_interlude_title"))+" ")]),e("p",{staticClass:"swap-tutorial__body"},[t._v(" "+t._s(t.$t("tutorial_interlude_body"))+" ")]),e("button",{staticClass:"swap-tutorial__button",attrs:{type:"button"},on:{click:t.finishInterlude}},[t._v(" "+t._s(t.$t("tutorial_interlude_button"))+" ")])]):t._e(),!t.isInterlude&&t.targetRect?e("div",{staticClass:"swap-tutorial__mask",style:t.maskStyle}):t._e(),!t.isInterlude&&t.targetRect?e("div",{staticClass:"swap-tutorial__ring",style:t.ringStyle,attrs:{"aria-hidden":"true"}}):t._e(),!t.isInterlude&&t.targetRect?e("div",{ref:"coach",staticClass:"swap-tutorial__coach",style:t.coachStyle,attrs:{role:"dialog","aria-modal":"true","aria-labelledby":`swap-tutorial-title-${t.step}`}},[t.coachPlacement.above?t._e():e("div",{staticClass:"swap-tutorial__coach-arrow",style:t.arrowStyle}),e("div",{staticClass:"swap-tutorial__top-row"},[e("div",{staticClass:"swap-tutorial__meta"},[e("span",{staticClass:"swap-tutorial__meta-icon",attrs:{"aria-hidden":"true"}},[e("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{d:"M9.94 14.06A2 2 0 0 0 8.5 12.62l-5.5-1.42 5.5-1.42a2 2 0 0 0 1.44-1.44L11.36 3l1.42 5.34a2 2 0 0 0 1.44 1.44l5.5 1.42-5.5 1.42a2 2 0 0 0-1.44 1.44L11.36 20z"}}),e("path",{attrs:{d:"M20 4v3"}}),e("path",{attrs:{d:"M21.5 5.5h-3"}})])]),t.showStepIndicator?e("span",{staticClass:"swap-tutorial__meta-text"},[t._v(" "+t._s(t.$t("tutorial_step_label",{current:t.step,total:t.totalSteps}))+" ")]):t._e()])]),e("h2",{staticClass:"swap-tutorial__title",attrs:{id:`swap-tutorial-title-${t.step}`}},[t.activeStep.titleHtml?e("span",{domProps:{innerHTML:t._s(t.activeStep.titleHtml)}}):[t._v(t._s(t.activeStep.title))]],2),e("p",{staticClass:"swap-tutorial__body"},[t.activeStep.bodyHtml?e("span",{domProps:{innerHTML:t._s(t.activeStep.bodyHtml)}}):[t._v(t._s(t.activeStep.body))]],2),t.activeStep.buttonLabel?e("button",{staticClass:"swap-tutorial__button",attrs:{type:"button"},on:{click:t.handlePrimary}},[t._v(" "+t._s(t.activeStep.buttonLabel)+" ")]):t._e()]):t._e()]):t._e()},l=[],d=i(79486);function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach(function(e){p(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function p(t,e,i){return(e=h(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function h(t){var e=m(t,"string");return"symbol"==typeof e?e:e+""}function m(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const g=320,w=14,v=190,b=768,f=6,y=16,_=1e3,k=500,S={name:"SwapListTutorial",props:{show:{type:Boolean,default:!1},initialStep:{type:Number,default:1},totalSteps:{type:Number,default:2},tabSelector:{type:String,default:'[data-swap-tab="unanswered"] .menu-option'},cardSelector:{type:String,default:".load-more-block-grid > div"},emptySelector:{type:String,default:".low-results-tip"},emptyButtonSelector:{type:String,default:".low-results-tip .tip-box-button, .no-result .action-button"},emptyState:{type:Boolean,default:!1}},data(){return{step:1,targetRect:null,stickyBottom:0,resizeObserver:null,observedEl:null,viewportW:"undefined"!==typeof window?window.innerWidth:0,viewportH:"undefined"!==typeof window?window.innerHeight:0,scrollLocked:!1,previousBodyOverflow:"",shown:!1,transitionTimeoutId:null,isInterlude:!1,coachHeight:0,addedScrollPadding:!1,previousBodyPaddingBottom:"",emptyButtonAnchored:!1,startedTracked:!1,emptyStateTracked:!1}},computed:{visible(){return this.show},activeStep(){switch(this.step){case 1:return{title:this.$t("tutorial_step1_t
1itle"),titleHtml:null,body:this.$t("tutorial_step1_body"),bodyHtml:null,buttonLabel:this.$t("tutorial_step1_button"),showSkip:!1,icon:"sparkle"};case 2:return this.emptyState?{title:this.$t("tutorial_step2_empty_title"),titleHtml:null,body:this.$t("tutorial_step2_empty_body"),bodyHtml:null,buttonLabel:null,showSkip:!1,icon:"sparkle"}:{title:this.$t("tutorial_step2_title"),titleHtml:null,body:this.$t("tutorial_step2_body"),bodyHtml:null,buttonLabel:null,showSkip:!1,icon:"sparkle"};default:return{title:"",titleHtml:null,body:"",bodyHtml:null,buttonLabel:null,showSkip:!1,icon:"sparkle"}}},showStepIndicator(){return 1===this.step||2===this.step},isCardStep(){return 2===this.step},targetBox(){if(!this.targetRect)return null;const t=this.isCardStep,e=t?f:f+4,i=f,s=this.ringPadBottom(),r=this.targetRect.bottom+s,o=Math.max(this.targetRect.top-i,this.stickyBottom);return{x:this.targetRect.left-e,y:o,w:this.targetRect.width+2*e,h:Math.max(0,r-o)}},ringStyle(){const t=this.targetBox;if(!t)return{};const e=this.isCardStep&&!this.emptyButtonAnchored;return{top:`${t.y}px`,left:`${t.x}px`,width:`${t.w}px`,height:`${t.h}px`,borderRadius:e?"22px":"9999px"}},maskStyle(){const t=this.targetBox;if(!t)return{};const e=this.isCardStep&&!this.emptyButtonAnchored,{x:i,y:s,w:r,h:o}=t,n=e?22:9999,a=Math.min(n,r/2,o/2),l=this.viewportW,d=this.viewportH,c=`M0 0 H${l} V${d} H0 Z`,u=`M${i+a} ${s} H`+(i+r-a)+` A${a} ${a} 0 0 1 ${i+r} ${s+a} V`+(s+o-a)+` A${a} ${a} 0 0 1 ${i+r-a} ${s+o}`+` H${i+a}`+` A${a} ${a} 0 0 1 ${i} ${s+o-a}`+` V${s+a}`+` A${a} ${a} 0 0 1 ${i+a} ${s} Z`;return{clipPath:`path(evenodd, '${c} ${u}')`}},coachWidth(){return Math.min(g,this.viewportW-2*y)},coachLeft(){const t=this.targetBox;if(!t)return y;const e=t.x+t.w/2;let i=e-this.coachWidth/2;return i=Math.min(this.viewportW-this.coachWidth-y,i),Math.max(y,i)},coachStyle(){return this.targetBox?{top:`${this.coachPlacement.top}px`,left:`${this.coachLeft}px`,width:`${this.coachWidth}px`}:{}},coachPlacement(){const t=this.targetBox;if(!t)return{top:0,above:!1};const e=window.innerHeight||document.documentElement.clientHeight,i=this.coachHeight||v,s=t.y+t.h+w,r=e-i-y;if(s<=r)return{top:s,above:!1};const o=t.y-i-w;return o>=y?{top:o,above:!0}:{top:Math.max(y,r),above:!1}},arrowStyle(){const t=this.targetBox;if(!t)return{};const e=t.x+t.w/2;return{left:e-this.coachLeft+"px"}}},watch:{show:{immediate:!0,handler(t){t?(this.step=this.initialStep,this.shown=!1,this.clearTransitionTimeout(),this.setActive(!0),this.lockScroll(),this.$nextTick(()=>{this.scrollTargetIntoView(),this.updateTarget()}),this.transitionTimeoutId=setTimeout(()=>{this.shown=!0},_),this.startedTracked||(this.startedTracked=!0,this.trackTutorial("started",{description:"New tutorial shown (step 1, tab spotlight)"}))):(this.setActive(!1),this.cleanup(),this.unlockScroll(),this.removeScrollSpace(),this.clearTransitionTimeout(),this.shown=!1)}},emptyState(){this.show&&2===this.step&&this.$nextTick(()=>{this.scrollTargetIntoView(),this.updateTarget()})}},mounted(){window.addEventListener("resize",this.updateTarget),window.addEventListener("scroll",this.updateTarget,{passive:!0}),this.show&&this.updateTarget()},beforeDestroy(){this.setActive(!1),this.cleanup(),this.unlockScroll(),this.removeScrollSpace(),this.clearTransitionTimeout(),window.removeEventListener("resize",this.updateTarget),window.removeEventListener("scroll",this.updateTarget)},methods:{selectorForStep(){return 1===this.step?this.tabSelector:2===this.step&&this.emptyState?this.emptySelector:this.cardSelector},resolveTargetEl(){if(2===this.step&&this.emptyState){const t=window.innerWidth||document.documentElement.clientWidth;if(t<=b){const t=document.querySelector(this.emptyButtonSelector);if(t)return{el:t,isEmptyButton:!0}}return{el:document.querySelector(this.emptySelector),isEmptyButton:!1}}return{el:document.querySelector(this.selectorForStep()),isEmptyButton:!1}},ringPadBottom(){return this.isCardStep?f:-2},stickyBarBottom(){if(1===this.step)return 0;const t=document.querySelector(".tab-navigation-wrapper");if(!t)return 0;const e=t.getBoundingClientRect();return e.bottom>0?e.bottom:0},scrollTargetIntoView(){if(this._isDestroyed||!this.show)return;const{el:t}=this.resolveTargetEl();if(!t)return;const e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=this.ringPadBottom()+(this.coachHeight||v)+w+y,r=e.bottom+s-i,o=e.top-y-this.stickyBarBottom();let n=0;if(r>0?n=Math.ceil(r):o<0&&(n=Math.max(o,r),n>-1&&(n=0)),0===n)return;if(n>0){const t=window.scrollY||window.pageYOffset||document.body.scrollTop||0,e=Math.max(0,document.documentElement.scrollHeight-i-t);n>e&&this.addScrollSpace(n-e)}const a=this.scrollLocked;a&&this.unlockScroll(),window.scrollBy(0,n),a&&this.lockScroll()},addScrollSpace(t){const e=this.addedScrollPadding&&parseFloat(document.body.style.paddingBottom)||
10;this.addedScrollPadding||(this.previousBodyPaddingBottom=document.body.style.paddingBottom,this.addedScrollPadding=!0),document.body.style.paddingBottom=`${e+t}px`},removeScrollSpace(){this.addedScrollPadding&&(this.previousBodyPaddingBottom?document.body.style.paddingBottom=this.previousBodyPaddingBottom:document.body.style.removeProperty("padding-bottom"),this.addedScrollPadding=!1)},updateTarget(){if(this._isDestroyed||!this.show)return;this.viewportW=window.innerWidth||document.documentElement.clientWidth,this.viewportH=window.innerHeight||document.documentElement.clientHeight;const{el:t,isEmptyButton:e}=this.resolveTargetEl();if(!t)return void(null!==this.targetRect&&(this.targetRect=null));this.emptyButtonAnchored=e;const i=this.stickyBarBottom();i!==this.stickyBottom&&(this.stickyBottom=i);const s=t.getBoundingClientRect(),r={top:s.top,left:s.left,width:s.width,height:s.height,bottom:s.bottom},o=this.targetRect,n=o&&o.top===r.top&&o.left===r.left&&o.width===r.width&&o.height===r.height;n||(this.targetRect=r),i>0&&r.top<i&&!this.reanchorQueued&&(this.reanchorQueued=!0,requestAnimationFrame(()=>{this.reanchorQueued=!1,!this._isDestroyed&&this.show&&this.scrollTargetIntoView()})),this.observeTarget(t),2===this.step&&this.emptyState&&this.trackEmptyStateShown(),this.$nextTick(()=>{if(this.$refs.coach&&this.$refs.coach.offsetHeight){const t=this.$refs.coach.offsetHeight;t!==this.coachHeight&&(this.coachHeight=t,this.scrollTargetIntoView())}})},observeTarget(t){"undefined"!==typeof ResizeObserver&&this.observedEl!==t&&(this.resizeObserver&&this.resizeObserver.disconnect(),this.observedEl=t,this.resizeObserver=new ResizeObserver(()=>{window.requestAnimationFrame(()=>this.updateTarget())}),this.resizeObserver.observe(t))},cleanup(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.observedEl=null},trackTutorial(t,e={}){d.A.emitEvent(d.A.eventTypes.CLICK,"Tutorial",u({variant:"v2",action:t},e))},trackEmptyStateShown(){this.emptyStateTracked||(this.emptyStateTracked=!0,this.trackTutorial("empty-state-shown",{description:"Step 2 anchored on the empty state (no suggestions)"}))},handlePrimary(){1===this.step?this.transitionToStep(2):this.$emit("completed")},goToStep(t){this.transitionToStep(t)},startInterlude(){this.trackTutorial("first-interest",{description:"User made their first interest decision during step 2"}),this.clearTransitionTimeout(),this.shown=!1,this.transitionTimeoutId=setTimeout(()=>{this.isInterlude=!0,this.targetRect=null,this.cleanup(),this.$nextTick(()=>{this.shown=!0})},k)},finishInterlude(){this.isInterlude&&(this.clearTransitionTimeout(),this.shown=!1,this.transitionTimeoutId=setTimeout(()=>{this.isInterlude=!1,this.trackTutorial("completed",{description:"User finished the interlude â tutorial completed"}),this.$emit("completed")},k))},handleInterludeBackdropClick(){this.isInterlude&&this.finishInterlude()},transitionToStep(t){this.clearTransitionTimeout(),this.shown=!1,this.transitionTimeoutId=setTimeout(()=>{this.step=t,this.$emit("step",t),2===t&&this.trackTutorial("step-2",{description:'User clicked "Get started" â card step shown'}),this.$nextTick(()=>{this.scrollTargetIntoView(),this.updateTarget(),this.transitionTimeoutId=setTimeout(()=>{this.shown=!0},50)})},k)},clearTransitionTimeout(){this.transitionTimeoutId&&(clearTimeout(this.transitionTimeoutId),this.transitionTimeoutId=null)},lockScroll(){this.scrollLocked||"undefined"===typeof document||(this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",document.addEventListener("touchmove",this.blockTouchMove,{passive:!1}),this.scrollLocked=!0)},unlockScroll(){this.scrollLocked&&"undefined"!==typeof document&&(document.body.style.overflow=this.previousBodyOverflow,document.removeEventListener("touchmove",this.blockTouchMove),this.scrollLocked=!1)},blockTouchMove(t){t.preventDefault()},setActive(t){this.$store&&this.$store.commit("ui/setTutorialActive",t),this.notifyAppShell(t)},notifyAppShell(t){"undefined"!==typeof window&&window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify({type:"TUTORIAL_ACTIVE",active:t}))}}},T=S;var P=i(81656),C=(0,P.A)(T,a,l,!1,null,"42633325",null);const I=C.exports;var E=function(){var t=this,e=t._self._c;return e("section",{staticClass:"load-more-block",class:{"load-more-block--single":t.infinite&&!t.twoColumn,"load-more-block--two-column":t.twoColumn},attrs:{"aria-labelledby":t.title?"lmb-"+t._uid:void 0}},[t.title?e("div",{staticClass:"load-more-block-header"},[e("div",{staticClass:"load-more-block-header-row"},[e("div",[e("h2",{staticClass:"load-more-block-title",attrs:{id:"lmb-"+t._uid}},[t._v(t._s(t.title))]),t.subtitle?e("p",{staticClass:"load-more-block-subtitle"},[t._v(t._s(t.subtitle))]):t._e()]),t._t("header-action")],2)]):t._e(),t._t("before-grid"),e("transition-group",{ref:"grid",staticClass:"load-more-block-grid",attrs:{name:t.transitionName,tag:"div","aria-live":"polite"},on:{"before-leave":t.onBeforeLeave,leave:t.onLeave}},[t._l(t.suggestions,function(i,s){return[e("div",{key:i.propositionId+(i.details?i.details.type:""),staticClass:"load-more-block-item"},[t._t("card",function(){return[e("SuggestionCard",{attrs:{suggestion:i,"is-blurred":t.isBlurred},on:{like:function(e){return t.$emit("like",e)},remove:function(e){return t.$emit("remove",e)},"undo-remove":function(e){return t.$emit("undo-remove",e)}}})]},{suggestion:i,index:s})],2),t.insertAfter&&s===t.insertIndex?e("div",{key:"__insert__",staticClass:"load-more-block-item load-more-block-insert"},[t._t("insert")],2):t._e()]}),t.insertAfter&&0===t.suggestions.length&&!t.loading?e("div",{key:"__insert__",staticClass:"load-more-block-item load-more-block-insert"},[t._t("insert")],2):t._e(),t.$slots["grid-append"]?e("div",{key:"__grid-append__",staticClass:"load-more-block-item"},[t._t("grid-append")],2):t._e()],2),t._t("after-grid"),t.infinite&&t.loading&&t.suggestions.length>0?e("div",{staticClass:"load-more-block-loading",attrs:{"aria-hidden":"true"}},t._l(2,function(t){return e("SwapListCardSkeleton",{key:"loading-"+t})}),1):t._e(),t.infinite&&t.hasMore?e("div",{ref:"sentinel",staticClass:"load-more-block-sentinel",attrs:{"aria-hidden":"true"}}):t._e(),t.hasMore&&!t.infinite?e("button",{staticClass:"load-more-block-btn",attrs:{disabled:t.loading},on:{click:t.handleLoadMore}},[t._v(" "+t._s(t.loading?t.loadingLabel:t.loadMoreLabel)+" ")]):t._e()],2)},M=[],L=i(72877),$=function(){var t=this;t._self._c;return t._m(0)},A=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"swap-list-card-skeleton",attrs:{"aria-hidden":"true"}},[e("div",{staticClass:"swap-list-card-skeleton__image"}),e("div",{staticClass:"swap-list-card-skeleton__body"},[e("div",{staticClass:"swap-list-card-skeleton__line swap-list-card-skeleton__line--address"}),e("div",{staticClass:"swap-list-card-skeleton__line swap-list-card-skeleton__line--area"}),e("div",{staticClass:"swap-list-card-skeleton__line swap-list-card-skeleton__line--details"}),e("div",{staticClass:"swap-list-card-skeleton__line swap-list-card-skeleton__line--price"})]),e("div",{staticClass:"swap-list-card-skeleton__actions"},[e("div",{staticClass:"swap-list-card-skeleton__btn"}),e("div",{staticClass:"swap-list-card-skeleton__btn"})])])}];
1const O={name:"SwapListCardSkeleton"},B=O;var R=(0,P.A)(B,$,A,!1,null,"65ad8f4c",null);const F=R.exports,x={name:"LoadMoreBlock",components:{SuggestionCard:L.ZJ,SwapListCardSkeleton:F},props:{suggestions:{type:Array,required:!0},title:{type:String,default:""},subtitle:{type:String,default:""},hasMore:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadMoreLabel:{type:String,default:""},loadingLabel:{type:String,default:""},isBlurred:{type:Boolean,default:!1},infinite:{type:Boolean,default:!1},twoColumn:{type:Boolean,default:!1},insertAfter:{type:Number,default:null}},data(){return{previousCount:null,observer:null,loadingMore:!1,resetting:!1}},computed:{insertIndex(){return Math.min(this.insertAfter||0,this.suggestions.length)-1},transitionName(){return this.resetting?"":"swap-list"}},watch:{"suggestions.length"(t,e){if(0===t&&e>0?this.resetting=!0:t>0&&this.resetting&&this.$nextTick(()=>{this.resetting=!1}),null===this.previousCount||t<=this.previousCount)return;const i=this.previousCount;this.previousCount=null,this.loadingMore=!1,this.infinite||this.$nextTick(()=>{const t=this.$refs.grid&&this.$refs.grid.$el;if(!t)return;const e=t.children;if(e[i]){const t=e[i].querySelector('a, button, [tabindex="0"]');t&&t.focus()}})},loading(t,e){e&&!t&&(this.loadingMore=!1)},hasMore(){this.infinite&&this.$nextTick(this.observeSentinel)}},mounted(){this.infinite&&this.$nextTick(this.observeSentinel)},beforeDestroy(){this.observer&&this.observer.disconnect()},methods:{observeSentinel(){if(!this.infinite||"undefined"===typeof IntersectionObserver)return;this.observer&&this.observer.disconnect();const t=this.$refs.sentinel;t&&(this.observer=new IntersectionObserver(t=>{const e=t.some(t=>t.isIntersecting);e&&this.hasMore&&!this.loading&&!this.loadingMore&&this.handleLoadMore()},{rootMargin:"800px 0px"}),this.observer.observe(t))},handleLoadMore(){this.previousCount=this.suggestions.length,this.loadingMore=!0,this.$emit("load-more")},onBeforeLeave(t){const e=t.getBoundingClientRect();t.style.width=`${e.width}px`,t.style.height=`${e.height}px`},onLeave(t,e){if(this.resetting)return void e();const i=t.getBoundingClientRect().height;t.style.height=`${i}px`,t.style.opacity="1",t.style.overflow="hidden",t.offsetHeight,requestAnimationFrame(()=>{t.style.transition="height 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 190ms ease, margin 260ms cubic-bezier(0.2, 0.8, 0.2, 1), padding 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",t.style.height="0px",t.style.opacity="0",t.style.marginTop="0",t.style.marginBottom="0",t.style.paddingTop="0",t.style.paddingBottom="0"});let s=!1;const r=()=>{s||(s=!0,t.removeEventListener("transitionend",o),e())},o=e=>{e.target===t&&"height"===e.propertyName&&r()};t.addEventListener("transitionend",o),setTimeout(r,320)}}},D=x;var N=(0,P.A)(D,E,M,!1,null,"5778cd37",null);const j=N.exports;var W=i(20383),z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"no-result"},[e("BaseIcon",{staticClass:"no-results-icon",attrs:{"icon-file":t.noResultContent.icon,width:t.noResultContent.iconWidth?t.noResultContent.iconWidth:117,height:t.noResultContent.iconHeight?t.noResultContent.iconHeight:117}}),e("h1",{staticClass:"heading",domProps:{innerHTML:t._s(t.noResultContent.title)}}),e("p",{staticClass:"text-body"},[t._v(" "+t._s(t.noResultContent.bodyText)+" ")]),t.shouldShowEditWishes?e("BaseButton",{staticClass:"action-button",attrs:{link:`${t.$routes.EDIT_PROPOSITION_WISHES}/${t.primaryPropositionId}`}},[t._v(t._s(t.$t("swap_container_button")))]):t._e(),t.shouldShowFindMatches?e("BaseButton",{staticClass:"action-button",attrs:{"icon-file":"arrow-right-alt3-white","icon-last":!0,"icon-size":16},on:{click:function(e){return t.handleClickFindMatches(e)}}},[t._v(t._s(t.$t("swap_container_button_swap_type")))]):t._e()],1)},U=[],V=i(83265),G=i(45189);function H(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function q(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?H(Object(i),!0).forEach(function(e){Y(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Y(t,e,i){return(e=K(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function K(t){var e=Q(t,"string");return"symbol"==typeof e?e:e+""}function Q(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const Z={name:"NoResultSwaps",components:{BaseButton:V.A,BaseIcon:G.A},data(){return{SWAP_FILTER_TYPES:n.Di}},computed:q(q({},(0,o.L8)({swapFilterType:"swapList/swapFilterType",filterCount:"swapList/filterCount",primaryPropositionId:"myPropositions/primaryPropositionId"})),{},{isAnswered(){return this.swapFilterType===n.Di.ANSWERED},shouldShowEditWishes(){return this.swapFilterType===n.Di.UNANSWERED_NEW||this.swapFilterType===n.Di.UNANSWERED},shouldShowFindMatches(){return this.swapFilterType===n.Di.ANSWERED||this.swapFilterType===n.Di.REMOVED},noResultContent(){switch(this.swapFilterType){case n.Di.ONLY_FULL_INTEREST:return{icon:"stars-matt",title:this.$t("swaps_no_result_title"),bodyText:this.$t("swaps_no_result_full_desc")};case n.Di.LAST_PART:case n.Di.LAST_PART_NEW:return{icon:"icon-key-line",title:this.$t("swaps_no_result_title"),bodyText:this.$t("swaps_no_result_last_desc")};case n.Di.INTEREST_MARKED:case n.Di.MARKED:case n.Di.SWAPLIST_MARKED:return{icon:"icon-hand-thumb-up",title:this.$t("swaps_no_result_title"),bodyText:this.$t("swaps_no_result_interest_desc")};case n.Di.FAVOURITES:return{icon:"icon-heart-bold",title:this.$t("swaps_no_result_title"),bodyText:this.$t("swaps_no_result_fav_desc")};case n.Di.UNANSWERED:case n.Di.UNANSWERED_NEW:case n.Di.ALL:return{icon:"stars-matt",title:this.$t("swaps_no_result_unanswered_title"),bodyText:this.$t("swaps_no_result_unanswered_desc")};case n.Di.NEW:return{icon:"stars-matt",title:this.$t("no_result_nothing_new")};case n.Di.ANSWERED:return{icon:"guy-mailbox",iconWidth:282,iconHeight:239,title:this.$t("swaps_no_result_answered_title"),bodyText:this.$t("swaps_no_result_answered_desc")};case n.Di.REMOVED:return{icon:"guy-mailbox",iconWidth:282,iconHeight:239,title:this.$t("swaps_no_result_removed_title"),bodyText:this.$t("swaps_no_result_removed_desc")};default:return{}}}}),methods:q(q({},(0,o.i0)({setSwapType:"swapList/setSwapType"})),{},{handleClickFindMatches(t){t.preventDefault(),this.$router.push({path:`${this.$t("path_swap_list",this.$routeLocale)}`}),this.setSwapType({swapFilterType:n.Di.UNANSWERED,update:!0})}})},J=Z;var X=(0,P.A)(J,z,U,!1,null,"50d13b8a",null);const tt=X.exports;var et=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mobile-swap-header"},[e("InfoBanner",{staticClass:"info-banner"})],1)},it=[],st=i(25411);const rt={name:"MobileSwapHeader",components:{InfoBanner:st.A}},ot=rt;var nt=(0,P.A)(ot,et,it,!1,null,"43e4e712",null);const at=nt.exports;var lt=i(55524),dt=i(61597),ct=i(18871),ut=function(){var t=this,e=t._self._c;return e("div",{staticClass:"sticky-map-actions"},[e("div",{ref:"flow",staticClass:"sticky-map-flow",class:{"sticky-map-flow--map":t.showMap}},[t._t("default"),t.showMap?e("div",{ref:"sentinel",staticClass:"sticky-map-sentinel",attrs:{"aria-hidden":"true"}}):t._e()],2),t.showMap?e("div",{staticClass:"sticky-map-column"},[e("div",{staticClass:"sticky-map-wrap",class:{"is-stuck":t.isStuck}},[e("MapButton",{ref:"button",attrs:{compact:t.compact},on:{click:function(e){return t.$emit("map-click")}}})],1)]):t._e()])},pt=[],ht=function(){var t=this,e=t._self._c;return e("div",{class:["map-button-wrapper",{compact:t.compact}]},[e("BaseButton",{class:t.compact?"map-button-compact":"rounded white tiny",attrs:{"icon-file":"map-pin-dark","icon-size":t.compact?16:20},on:{click:function(e){return t.$emit("click")}}},[t.compact?t._e():[t._v(t._s(t.$t("swaplist_button_map_view")))]],2)],1)},mt=[];const gt={name:"MapButton",components:{BaseButton:V.A},props:{compact:{type:Boolean,default:!1}}},wt=gt;var vt=(0,P.A)(wt,ht,mt,!1,null,"4861a62e",null);
1const bt=vt.exports,ft={name:"StickyMapButton",components:{MapButton:bt},props:{compact:{type:Boolean,default:!1},showMap:{type:Boolean,default:!0}},data(){return{isStuck:!1}},watch:{showMap(){this.$nextTick(()=>this.observe())}},created(){this.observer=null,this.resizeObserver=null},mounted(){this.observe()},beforeDestroy(){this.disconnect()},methods:{observe(){this.disconnect(),this.observeSentinel(),this.observeLayout()},observeSentinel(){if("undefined"===typeof IntersectionObserver)return;const t=this.$refs.sentinel;t&&(this.observer=new IntersectionObserver(t=>{const e=t[t.length-1];this.isStuck=!e.isIntersecting&&e.boundingClientRect.top<0}),this.observer.observe(t))},observeLayout(){var t;if(this.syncLayout(),"undefined"===typeof ResizeObserver)return;const e=null===(t=this.$refs.button)||void 0===t?void 0:t.$el;if(!e)return;this.resizeObserver=new ResizeObserver(()=>this.syncLayout()),this.resizeObserver.observe(e);const i=this.$el.offsetParent;i&&this.resizeObserver.observe(i)},syncLayout(){var t;const e=null===(t=this.$refs.button)||void 0===t?void 0:t.$el,i=this.$el.offsetParent,s=this.$refs.flow;if(!e||!i||!s)return;const r=s.getBoundingClientRect().top-i.getBoundingClientRect().top,o=e.getBoundingClientRect().width;this.$el.style.setProperty("--sticky-map-top",`${Math.round(r)}px`),this.$el.style.setProperty("--sticky-map-width",`${Math.round(o)}px`)},disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.isStuck=!1}}},yt=ft;var _t=(0,P.A)(yt,ut,pt,!1,null,"2e0b2eae",null);const kt=_t.exports,St=2;function Tt(t,e){const i=t&&t.residences||[],s=!(!t||!t.active),r=i.some(t=>t.images&&t.images.length>=St),o=i.some(t=>!!t.description),n=!1,a="se"===e&&i.some(t=>!!t.landlord);return{hasProposition:s,hasImages:r,hasDescription:o,hasFloorplan:n,hasLandlord:a}}function Pt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function Ct(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(i),!0).forEach(function(e){It(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function It(t,e,i){return(e=Et(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Et(t){var e=Mt(t,"string");return"symbol"==typeof e?e:e+""}function Mt(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const Lt=5e3,$t=864e5,At="completeListingModalLastShown";let Ot=!1;function Bt(){const t=new Date;return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}function Rt(t){return`${At}:${t}`}function Ft(t){if(!t)return!1;try{return localStorage.getItem(Rt(t))===Bt()}catch(e){return!1}}function xt(t){if(t)try{localStorage.setItem(Rt(t),Bt())}catch(e){}}function Dt(t){if(!t)return!1;const e=new Date(t);return!isNaN(e.getTime())&&Date.now()-e.getTime()<$t}const Nt={computed:Ct(Ct({},(0,o.L8)({_completeListing_primaryProposition:"myPropositions/primaryProposition",_completeListing_primaryPropositionActive:"myPropositions/primaryPropositionActive"})),{},{shouldShowCompleteListingModal(){const t=this._completeListing_primaryProposition;if(!this._completeListing_primaryPropositionActive||!t)return!1;if(Dt(t.createdAt))return!1;if(Ft(t.propositionId))return!1;const{hasDescription:e,hasImages:i}=Tt(t,this.$country.getCountry());return!e||!i}}),watch:{shouldShowCompleteListingModal:{immediate:!0,handler(t){t&&(Ot||this._completeListingTimer||(this._completeListingTimer=setTimeout(()=>{if(this._completeListingTimer=null,Ot)return;if(!this.shouldShowCompleteListingModal)return;const t=this._completeListing_primaryProposition&&this._completeListing_primaryProposition.propositionId;Ot=!0,xt(t),this._completeListing_setGlobalModal("CompleteListingModal")},Lt)))}}},beforeDestroy(){this._completeListingTimer&&(clearTimeout(this._completeListingTimer),this._completeListingTimer=null)},methods:Ct({},(0,o.i0)({_completeListing_setGlobalModal:"ui/setGlobalModal"}))};var jt=function(){var t=this,e=t._self._c;return e("div",{class:["swap-tab-navigation-wrapper",{"has-overflow-right":t.hasOverflowRight,"has-overflow-left":t.hasOverflowLeft}]},[e("div",{staticClass:"swap-tab-nav"},[e("TabNavigation",{attrs:{"bg-color":t.tabBgColor}},[e("div",{staticClass:"swap-tab-item-wrapper",attrs:{"data-swap-tab":"unanswered"}},[e("TabNavigationItem",{attrs:{active:t.swapFilterType===t.SWAP_FILTER_TYPES.UNANSWERED||t.swapFilterType===t.SWAP_FILTER_TYPES.NEW,"bg-color":t.tabBgColor},nativeOn:{click:function(e){return t.selectTab(t.SWAP_FILTER_TYPES.UNANSWERED)}}},[t._v(t._s(t.$t("swap_list_tabs_unanswered"))+" "),t.unansweredTotalCount>0?e("span",{staticClass:"tab-count"},[t._v("("+t._s(t.unansweredTotalCount)+")")]):t._e()])],1),e("div",{class:["swap-tab-item-wrapper","last-part-tab",{disabled:0===t.lastPartCount&&0===t.unreadIncomingCount}]},[e("TabNavigationItem",{attrs:{active:t.swapFilterType===t.SWAP_FILTER_TYPES.LAST_PART_NEW,"bg-color":t.tabBgColor},nativeOn:{click:function(e){return t.selectTab(t.SWAP_FILTER_TYPES.LAST_PART_NEW)}}},[t._v(t._s(t.$t("swaps_list_toggle_me"))+" ")]),t.unreadIncomingCount>0?e("NotificationDot",{attrs:{size:12}}):t._e()],1),e("div",{class:["swap-tab-item-wrapper",{disabled:t.answeredTabDisabled}],attrs:{"data-swap-tab":t.mergedAnsweredTab?"answered removed":"answered"}},[e("TabNavigationItem",{attrs:{active:t.answeredTabActive,"bg-color":t.tabBgColor},nativeOn:{click:function(e){return t.selectTab(t.SWAP_FILTER_TYPES.ANSWERED)}}},[t._v(t._s(t.$t("swap_list_tabs_answered"))+" ")])],1),t.mergedAnsweredTab?t._e():e("div",{class:["swap-tab-item-wrapper",{disabled:0===t.removedCount}],attrs:{"data-swap-tab":"removed"}},[e("TabNavigationItem",{attrs:{active:t.swapFilterType===t.SWAP_FILTER_TYPES.REMOVED,"bg-color":t.tabBgColor},nativeOn:{click:function(e){return t.selectTab(t.SWAP_FILTER_TYPES.REMOVED)}}},[t._v(" "+t._s(t.$t("swap_list_tabs_removed"))+" ")])],1)]),t.hasOverflowRight?e("button",{staticClass:"swap-tab-scroll-hint",attrs:{type:"button","aria-label":t.$t("swap_list_tabs_scroll_more")},on:{click:function(e){return t.scrollTabsBy(160)}}},[e("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"}},[e("path",{attrs:{d:"M9 6l6 6-6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}})])]):t._e()],1)])},Wt=[],zt=i(1507),Ut=i(69871),Vt=i(72022),Gt=i(26996);function Ht(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function qt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Ht(Object(i),!0).forEach(function(e){Yt(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ht(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Yt(t,e,i){return(e=Kt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Kt(t){var e=Qt(t,"string");return"symbol"==typeof e?e:e+""}function Qt(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const Zt={name:"SwapTabNavigation2",components:{TabNavigation:zt.A,TabNavigationItem:Ut.A,NotificationDot:Vt.A},props:{tabBgColor:{type:String,default:"#fff",required:!1},unreadIncomingCount:{type:Number,default:0},unansweredTotalCount:{type:Number,default:0},mergedAnsweredTab:{type:Boolean,default:!1}},data(){return{SWAP_FILTER_TYPES:n.Di,hasOverflowRight:!1,hasOverflowLeft:!1,scrollEl:null,scrollResizeObserver:null}},computed:qt(qt({},(0,o.L8)({swapFilterType:"swapList/swapFilterType",swapInterestCounts:"swapList/swapInterestCounts"})),{},{lastPartCount(){var t,e;return(null===(t=this.swapInterestCounts)||void 0===t||null===(e=t.interestedInMine)||void 0===e?void 0:e.total)??0},answeredCount(){var t,e;return(null===(t=this.swapInterestCounts)||void 0===t||null===(e=t.answered)||void 0===e?void 0:e.total)??0},removedCount(){var t,e;return(null===(t=this.swapInterestCounts)||void 0===t||null===(e=t.removed)||void 0===e?void 0:e.total)??0},answeredTabActive(){return this.swapFilterType===n.Di.ANSWERED||this.mergedAnsweredTab&&this.swapFilterType===n.Di.REMOVED},answeredTabDisabled(){const t=this.mergedAnsweredTab?this.answeredCount+this.removedCount:this.answeredCount;return 0===t}}),created(){const t=new URL(location.href).searchParams.get("filterType");if(t){const e=t.toUpperCase();Object.values(n.Di).includes(e)&&this.$store.commit("swapList/setSwapFilterType",{swapFilterType:e})}(0,Gt.B1)("interest",this.onInterest)},mounted(){this.scrollEl=this.$el.querySelector(".menu-wrapper"),this.scrollEl&&(this.scrollEl.addEventListener("scroll",this.updateOverflow,{passive:!0}),this.$nextTick(this.updateOverflow),"undefined"!==typeof ResizeObserver?(this.scrollResizeObserver=new ResizeObserver(this.updateOverflow),this.scrollResizeObserver.observe(this.scrollEl)):window.addEventListener("resize",this.updateOverflow))},beforeDestroy(){(0,Gt.al)("interest",this.onInterest),this.scrollEl&&this.scrollEl.removeEventListener("scroll",this.updateOverflow),window.removeEventListener("resize",this.updateOverflow),this.scrollResizeObserver&&this.scrollResizeObserver.disconnect()},methods:{onInterest(t){this.$emit("interest-received",t)},updateOverflow(){if(!this.scrollEl)return;const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollEl,s=2;this.hasOverflowLeft=t>s,this.hasOverflowRight=t+i<e-s},scrollTabsBy(t){this.scrollEl&&this.scrollEl.scrollBy({left:t,behavior:"smooth"})},selectTab(t){if(t===this.swapFilterType)return;if(t===n.Di.ANSWERED&&this.answeredTabActive)return;const e={[n.Di.LAST_PART_NEW]:"LastPart",[n.Di.ANSWERED]:"Answered",[n.Di.REMOVED]:"Removed"},i=e[t];i&&d.A.emitEvent(d.A.eventTypes.CLICK,"SwapTabClicked",{tab:i}),this.$store.commit("swapList/setSwapFilterType",{swapFilterType:t}),this.$router.replace({query:{filterType:t.toLowerCase()}}).catch(t=>{"NavigationDuplicated"!==t.name&&console.error(t)})}}},Jt=Zt;var Xt=(0,P.A)(Jt,jt,Wt,!1,null,"a1b8452e",null);const te=Xt.exports;var ee=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade-soft",mode:"out-in",appear:""}},[t.show?e("div",{staticClass:"account-notification-modal"},[e("div",{staticClass:"content"},[e("img",{attrs:{src:i(7165),alt:"Team effort, powerful statement"}}),e("div",{staticClass:"text-wrapper"},[e("div",{staticClass:"title"},[t._v(t._s(t.$t("matches_notification_modal_title")))]),e("div",{staticClass:"body-text",domProps:{innerHTML:t._s(1===t.count?t.$t("matches_notification_modal_body_singular",{count:t.count}):t.$t("matches_notification_modal_body",{count:t.count}))}}),e("div",{staticClass:"cta-button"}
1,[e("BaseButton",{class:["primary-action","smaller",{rounded:t.isMobile,tiny:!t.isMobile}],attrs:{"icon-file":t.isMobile?"icon-chat-white":"arrow-right-alt3-white","icon-last":!t.isMobile,"icon-size":t.isMobile?20:14},on:{click:t.handleCtaClick}},[t._v(t._s(t.$t("matches_notification_modal_cta")))])],1)]),e("button",{staticClass:"close-button",on:{click:t.handleClose}},[e("BaseIcon",{staticClass:"base-input-icon",attrs:{"icon-file":"icon-close-black",height:t.isMobile?20:16,width:20}})],1)])]):t._e()])},ie=[];function se(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function re(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?se(Object(i),!0).forEach(function(e){oe(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):se(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function oe(t,e,i){return(e=ne(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ne(t){var e=ae(t,"string");return"symbol"==typeof e?e:e+""}function ae(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const le={name:"AccountNotificationModal",components:{BaseButton:V.A,BaseIcon:G.A},props:{show:{type:Boolean,default:!1},count:{type:Number,default:0,required:!0}},computed:re({},(0,o.L8)({isMobile:"screenSize/isMobile"})),methods:{handleClose(){this.$emit("close")},handleCtaClick(){this.$emit("cta-click")}}},de=le;var ce=(0,P.A)(de,ee,ie,!1,null,"ad6a7944",null);const ue=ce.exports;var pe=function(){var t=this,e=t._self._c;return e("StandardModal",{attrs:{"standard-modal-name":"EditWishesModal","show-header":!1,"esc-close":!0},on:{close:t.handleClose}},[e("div",{staticClass:"edit-wishes-content",attrs:{slot:"content"},slot:"content"},["editAreas"===t.currentView?e("button",{staticClass:"back-button",on:{click:function(e){t.currentView="wishForm"}}},[e("BaseIcon",{staticClass:"back-icon",attrs:{icon:"chevron-left-dark",height:20,width:20}}),t._v(" "+t._s(t.$t("general_back"))+" ")],1):t._e(),"wishForm"===t.currentView?e("WishForm2",{ref:"wishForm",attrs:{"proposition-id":t.propositionId,"wish-index":t.wishIndex,"show-floating-save-button":!1,"wish-count":t.wishCount,"swap-type":t.swapType,"show-header":!0,"show-areas-link":!0,"show-add-wish-link":!0,"show-remove-wish":!0,"intercept-areas-link":!0},on:{saved:t.handleWishSaved,deleted:t.handleWishDeleted,change:t.handleWishChange,"edit-areas":function(e){t.currentView="editAreas"}}}):t._e(),"editAreas"===t.currentView?e("EditWishAreas",{attrs:{"modal-mode":!0,"proposition-id-prop":t.propositionId,"wish-index-prop":t.wishIndex},on:{saved:t.handleAreasSaved}}):t._e(),"wishForm"===t.currentView?e("FloatingSaveButton",{staticClass:"modal-save-button",attrs:{"is-visible":t.hasChanges,"icon-file":"check-mark-white"},on:{saveClick:t.handleSave}},[t.isSaving?[t._v(" "+t._s(t.$t("edit_user_credentials_loading"))+" ")]:[t._v(" "+t._s(t.$t("edit_user_credentials_save"))+" ")]],2):t._e()],1)])},he=[],me=i(33751),ge=i(51807),we=i(50983),ve=i(38835);const be={name:"EditWishesModal",components:{WishForm2:me.A,StandardModal:ge.A,FloatingSaveButton:we.A,EditWishAreas:ve["default"],BaseIcon:G.A},props:{propositionId:{type:[String,Number],required:!0},wishIndex:{type:Number,default:1},wishCount:{type:Number,default:1},swapType:{type:Number,default:null}},data(){return{hasChanges:!1,isSaving:!1,currentView:"wishForm"}},methods:{handleWishSaved(){this.isSaving=!1,this.$emit("saved"),this.$emit("close")},handleWishDeleted(){this.$emit("saved"),this.$emit("close")},handleWishChange(t){t&&"boolean"===typeof t.dataChanged&&(this.hasChanges=t.dataChanged)},async handleSave(){this.$refs.wishForm&&(this.isSaving=!0,await this.$refs.wishForm.save(),this.isSaving=!1)},handleAreasSaved(){this.$emit("saved"),this.$emit("close")},handleClose(){this.$emit("close")}}},fe=be;var ye=(0,P.A)(fe,pe,he,!1,null,"c464e88c",null);const _e=ye.exports;var ke=i(92554),Se=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:!t.isViewingProposition,expression:"!isViewingProposition"},{name:"outside-click",rawName:"v-outside-click",value:t.handleOutsideClick,expression:"handleOutsideClick"}],class:["fullscreen-map",{"inline-map":t.inline}]}
1,[t.hideBackButton?t._e():e("button",{class:["back-button",{"back-button--v2":t.v2&&!t.isMobile}],on:{click:function(e){return t.$emit("close")}}},[e("BaseIcon",{attrs:{"icon-file":"arrow-back","icon-size":t.v2&&!t.isMobile?20:24}}),t.isMobile?t._e():e("span",[t._v(t._s(t.$t("suggestions_map_back")))])],1),t.hideEditWishes?t._e():e("div",{staticClass:"preferences-button"},[e("EditWishesButton",{attrs:{v2:"",small:t.isMobile},on:{click:function(e){return t.$emit("edit-wishes")}}})],1),t.hideEditWishes&&!t.v2&&t.isMobile?e("button",{staticClass:"filter-button",on:{click:function(e){return t.$emit("open-filters")}}},[e("BaseIcon",{attrs:{"icon-file":"filter-slider-black","icon-size":20}}),e("span",[t._v(t._s(t.$t("swap_list_filter_title")))]),t.filterCount>0?e("span",{staticClass:"filter-count"},[t._v(t._s(t.filterCount))]):t._e()],1):t._e(),e("MapView",{ref:"mapView",attrs:{region:t.region,markers:t.pins,"selected-marker-id":t.selectedPinId,"hovered-marker-id":t.hoveredMarkerId,"max-zoom":t.hideExactAddress?13.5:null,"enable-layer-mode":""},on:{"marker-click":t.handleMarkerClick,"map-click":t.handleMapClick,"map-ready":t.handleMapReady}}),t.loadingPins?e("div",{staticClass:"pins-loading"},[e("BaseSpinner",{attrs:{classes:["spinner-alt"]}})],1):t._e(),e("div",{class:["zoom-controls",{"zoom-controls--top":t.hideEditWishes&&t.v2}]},[e("button",{staticClass:"zoom-btn",on:{click:t.zoomIn}},[e("span",{staticClass:"zoom-icon"},[t._v("+")])]),e("button",{staticClass:"zoom-btn",on:{click:t.zoomOut}},[e("span",{staticClass:"zoom-icon"},[t._v("â")])])]),t.blurAddress?e("div",{staticClass:"freemium-overlay"},[e("div",{staticClass:"freemium-cta-wrapper"},[e("div",{staticClass:"freemium-cta-left"},[e("BaseIcon",{attrs:{"icon-file":"icon-map-pin-alt",width:20,height:20}}),e("div",{staticClass:"freemium-cta-label"},[t._v(" "+t._s(t.$t("freemium_map_cta_label_plural"))+" ")])],1),e("router-link",{staticClass:"freemium-unlock-btn",attrs:{to:t.premiumCta}},[e("BaseIcon",{attrs:{"icon-file":"premium-icon",width:16,height:16}}),t._v(" "+t._s(t.$t("freemium_map_cta_unlock"))+" ")],1)],1)]):t._e(),t.selectedSuggestion&&t.selectedSuggestions.length<=1?e("MapMarkerCard",{attrs:{swap:t.selectedSuggestion,"outside-wishes":t.isOutsideWishes(t.selectedSuggestion),"super-interest":t.isSuperInterest(t.selectedSuggestion),loading:t.loadingSuggestion,"hide-super-button":t.hideSuperButton},on:{"show-interest":t.handleShowInterest,remove:t.handleRemove,"undo-remove":t.handleUndoRemove,navigate:t.handleNavigate}}):t._e(),t.selectedSuggestions.length>1&&t.isMobile?e("div",{staticClass:"marker-cards-scroll",on:{"&scroll":function(e){return t.handleCarouselScroll.apply(null,arguments)}}},t._l(t.selectedSuggestions,function(i){return e("MapMarkerCard",{key:i.propositionId,attrs:{swap:i,"outside-wishes":t.isOutsideWishes(i),"super-interest":t.isSuperInterest(i),loading:!!i.pending,"hide-super-button":t.hideSuperButton,compact:""},on:{"show-interest":t.handleShowInterest,remove:t.handleRemove,"undo-remove":t.handleUndoRemove,navigate:t.handleNavigate}})}),1):t._e(),t.selectedSuggestions.length>1&&!t.isMobile?e("div",{staticClass:"marker-card-paginated"},[e("MapMarkerCard",{attrs:{swap:t.currentDesktopSuggestion,"outside-wishes":t.isOutsideWishes(t.currentDesktopSuggestion),"super-interest":t.isSuperInterest(t.currentDesktopSuggestion),loading:!!t.currentDesktopSuggestion&&!!t.currentDesktopSuggestion.pending,"hide-super-button":t.hideSuperButton},on:{"show-interest":t.handleShowInterest,remove:t.handleRemove,"undo-remove":t.handleUndoRemove,navigate:t.handleNavigate}}),e("div",{staticClass:"marker-card-paginated__footer"},[e("button",{staticClass:"marker-card-paginated__btn",attrs:{disabled:0===t.currentCardIndex,"aria-label":t.$t("general_previous")},on:{click:t.prevCard}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[e("polyline",{attrs:{points:"15 18 9 12 15 6"}})])]),e("span",{staticClass:"marker-card-paginated__counter"},[t._v(" "+t._s(t.currentCardIndex+1)+" "+t._s(t.$t("flow_pagination_of"))+" "+t._s(t.selectedSuggestions.length)+" ")]),e("button",{staticClass:"marker-card-paginated__btn",attrs:{disabled:t.currentCardIndex===t.selectedSuggestions.length-1,"aria-label":t.$t("general_next")},on:{click:t.nextCard}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[e("polyline",{attrs:{points:"9 18 15 12 9 6"}}
1)])])])],1):t._e(),t.loadingSuggestion&&!t.selectedSuggestion&&0===t.selectedSuggestions.length?e("MapMarkerCard",{attrs:{loading:!0}}):t._e()],1)},Te=[],Pe=i(23703),Ce=function(){var t=this,e=t._self._c;return t.swap||t.loading?e("div",{class:["marker-card",{"marker-card--compact":t.compact,"marker-card--removed":t.isRemoved,"marker-card--liked":t.isLiked,"marker-card--super-target":t.isSuperTarget}]},[t.loading?e("div",{staticClass:"marker-card-skeleton"},[e("div",{staticClass:"skeleton-image block-pulse"}),t._m(0)]):t.swap?[t.showOutsideBanner?e("div",{staticClass:"marker-card-outside-banner"},[e("span",{staticClass:"marker-card-outside-dot",attrs:{"aria-hidden":"true"}}),e("strong",[t._v(t._s(t.$t("suggestion_card_outside_preferences")))])]):t._e(),e("div",{staticClass:"marker-card-content",on:{click:t.goToProposition}},[t.isSuperTarget?e("CornerInfoBadge",{staticClass:"marker-card-super-badge",attrs:{kind:"super",compact:""}}):t._e(),e("div",{staticClass:"marker-card-image-wrapper"},[t.imageUrl&&!t.imageError?e("img",{staticClass:"marker-card-image",attrs:{src:t.imageUrl,alt:t.address},on:{error:function(e){t.imageError=!0}}}):e("div",{staticClass:"marker-card-image-placeholder"}),t.isAnswered||!t.swap.isNew&&!t.showBoostPill?t._e():e("div",{staticClass:"marker-card-badges"},[t.swap.isNew?e("span",{staticClass:"marker-card-new-badge"},[t._v(" "+t._s(t.$t("suggestion_badge_new"))+" ")]):t._e(),t.showBoostPill?e("span",{staticClass:"marker-card-boost-badge"},[e("BaseIcon",{attrs:{"icon-file":"boost-white",width:"16",height:"16"}})],1):t._e()]),t.showBoostRound?e("span",{class:["marker-card-boost-round",{"marker-card-boost-round--below-super":t.isSuperTarget}]},[e("BaseIcon",{attrs:{"icon-file":"icon-rocket-purple",width:14,height:14}})],1):t._e(),t.isAnswered&&!t.rowPending?e("div",{staticClass:"marker-card-badge",class:{"marker-card-badge--v2":t.consumablesEnabled,"marker-card-badge--super":t.showSuperBadge},attrs:{role:"status","aria-label":t.consumablesEnabled?t.badgeLabel:null}},[t.consumablesEnabled?e("span",{staticClass:"sr-only"},[t._v(t._s(t.badgeLabel))]):e("span",{staticClass:"marker-card-badge-text"},[t._v(" "+t._s(t.badgeLabel)+" ")]),t.showSuperBadge?e("svg",{staticClass:"marker-card-badge-icon marker-card-badge-icon--star",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"}},[e("path",{attrs:{d:"M12 2.5l2.9 6.1 6.6.9-4.8 4.7 1.1 6.6-5.8-3.2-5.8 3.2 1.1-6.6L2.5 9.5l6.6-.9z"}})]):t.isLiked?e("svg",{staticClass:"marker-card-badge-icon marker-card-badge-icon--check",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"}},[e("polyline",{attrs:{points:"20 6 9 17 4 12"}})]):e("svg",{staticClass:"marker-card-badge-icon marker-card-badge-icon--x",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"}},[e("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),e("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])]):t._e(),t.isTwoToOne?e("button",{staticClass:"marker-card-residence-toggle",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.toggleResidence.apply(null,arguments)}}},[e("BaseIcon",{attrs:{"icon-file":"shift",width:"14",height:"14"}}),t._v(" "+t._s(t.$t("residence_toggle_label_short",{n:t.activeResidenceIndex+1,count:t.residenceCount}))+" ")],1):t._e()]),e("div",{staticClass:"marker-card-body"},[e("div",{staticClass:"marker-card-info"},[e("div",{staticClass:"marker-card-address"},[t._v(" "+t._s(t.address)+" "),t.hideStreetNumber?e("BlurredStreetNumber"):t._e()],1),e("div",{staticClass:"marker-card-details"},[t._l(t.detailItems,function(i,s){return[s>0?e("span",{key:`sep-${s}`},[t._v(" · ")]):t._e(),e("span",{key:`item-${s}`,class:{"marker-card-deviation":t.isDeviating(i.field)}},[t._v(t._s(i.text))])]})],2),e("div",{staticClass:"marker-card-rent",class:{"marker-card-deviation":t.isDeviating("rent")}},[t._v(" "+t._s(t.rent)+" ")])]),e("div",{staticClass:"marker-card-actions",class:{"marker-card-actions--v2":t.consumablesEnabled}},[t.showRow?e("InterestActionRow",{attrs:{compact:"",framed:"",interested:null,"super-remaining":t.superLikesRemaining,"show-super":!t.hideSuperButton&&!t.isSuperTarget,locked:t.pending},on:{no:t.handleRemove,super:t.handleSuperLike,yes:t.handleInterest}}):t._e(),t.consumablesEnabled||t.isAnswered?t._e():e("button",{staticClass:"marker-card-remove",attrs:{"aria-label":t.$t("suggestion_card_remove")},on:{click:function(e){return e.stopPropagation(),t.handleRemove.apply(null,arguments)}}},[e("svg",{attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[e("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),e("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])]),t.consumablesEnabled||t.isAnswered?t._e():e("button",{staticClass:"marker-card-cta",on:{click:function(e){return e.stopPropagation(),t.handleInterest.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("interest_button_show_interest"))+" ")]),t.showSuperCta?e("SuperLikeCta",{attrs:{pill:"",remaining:t.superLikesRemaining,selected:t.isSuperLiked,locked:t.pending},on:{click:t.handleSuperLike}}):t._e(),t.showUndo?e("button",{staticClass:"marker-card-cta marker-card-cta--undo",on:{click:function(e){return e.stopPropagation(),t.handleUndo.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("reverse_interest_action_btn_text"))+" ")]):t._e()],1)])],1)]:t._e()],2):t._e()},Ie=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"skeleton-text"},[e("div",{staticClass:"skeleton-line wide block-pulse"}),e("div",{staticClass:"skeleton-line narrow block-pulse"}),e("div",{staticClass:"skeleton-line price block-pulse"})])}],Ee=i(89658),Me=i(20854),Le=i(45911),$e=i(85331),Ae=i(3870),Oe=i(91209),Be=i(95923),Re=i(38892);function Fe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function xe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Fe(Object(i),!0).forEach(function(e){De(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Fe(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function De(t,e,i){return(e=Ne(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ne(t){var e=je(t,"string");return"symbol"==typeof e?e:e+""}function je(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const We={name:"MapMarkerCard",components:{BlurredStreetNumber:Ee.A,InterestActionRow:Me.A,SuperLikeCta:Le.A,CornerInfoBadge:$e.A,BaseIcon:G.A},props:{swap:{type:Object,default:null},hideSuperButton:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},outsideWishes:{type:Boolean,default:!1},superInterest:{type:Boolean,default:!1}},data(){var t,e,i;const s=null===(t=this.swap)||void 0===t||null===(e=t.details)||void 0===e||null===(i=e.interests)||void 0===i?void 0:i[0];let r="default";return!0===s?r="liked":!1===s&&(r="removed"),{imageError:!1,status:r,activeResidenceIndex:0,pending:!1,pendingFrom:null}},computed:xe(xe({},(0,o.L8)({primaryPropositionIsLimited:"myPropositions/primaryPropositionIsLimited",hideStreetNumber:"myPropositions/hideExactAddress",appReady:"app/ready",isTestEnabled:"app/isTestEnabled",superLikesRemaining:"menu/superLikesRemaining",isSuperLikedId:"interests/isSuperLiked"})),{},{consumablesEnabled(){return this.isTestEnabled("consumables")},isSuperTarget(){return this.consumablesEnabled&&this.superInterest},showBoostPill(){return!!this.swap.hasBoost&&!this.consumablesEnabled},showBoostRound(){return!!this.swap.hasBoost&&this.consumablesEnabled},rowPending(){return this.consumablesEnabled&&"row"===this.pendingFrom},showRow(){return this.consumablesEnabled&&(!this.isAnswered||this.rowPending)},showSuperCta(){return this.consumablesEnabled&&this.isLiked&&!this.rowPending&&!this.isSuperTarget},showUndo(){return this.isAnswered&&!this.showRow&&!this.showSuperCta},isSuperLiked(){var t;const e=null===(t=this.swap)||void 0===t?void 0:t.propositionId;return null!=e&&this.isSuperLikedId(e)},showSuperBadge(){return this.consumablesEnabled&&this.isLiked&&this.isSuperLiked},badgeLabel(){return this.showSuperBadge?this.$t("super_interest_banner_label"):this.isLiked?this.$t("interest_button_interested"):this.$t("interest_badge_removed")},isLiked(){return"liked"===this.status},isRemoved(){return"removed"===this.status},isAnswered(){return this.isLiked||this.isRemoved},residenceCount(){var t,e;return(null===(t=this.swap)||void 0===t||null===(e=t.residences)||void 0===e?void 0:e.length)||0},isTwoToOne(){return this.residenceCount>1},residence(){return this.swap&&this.swap.residences?this.swap.residences[this.activeResidenceIndex]:null},imageUrl(){if(!this.residence)return null;const t=this.residence.pictures||[];return t.length>0?t[0]:null},address(){if(!this.residence||!this.appReady)return"";const t=this.residence.streetAddress||"";return this.hideStreetNumber?(0,Be.q)(t).street:t},detailItems(){if(!this.residence)return[];const t=[];if(this.residence.rooms&&t.push({field:"rooms",text:`${this.residence.rooms} ${this.$tc("map_swap_item_rooms",Number(this.residence.rooms))}`}),this.residence.sqm&&t.push({field:"sqm",text:`${this.residence.sqm} ${this.$t("map_swap_item_sqm")}`}),null!=this.residence.floor){const e=(0,Ae.W)(this.residence.floor)?"":`${this.$t("proposition_description_floor")} `;t.push({field:null,text:`${e}${(0,Ae._)(this.residence.floor,t=>this.$t(t))}`})}return t},markLocked(){return this.consumablesEnabled&&this.pending},showOutsideBanner(){return this.outsideWishes&&(this.consumablesEnabled||!this.isAnswered)},deviatingFields(){return(0,Oe.P)(this.swap&&this.swap.deviations)},rent(){return this.residence&&this.residence.rent?this.$t("general_price",{amount:(0,Re.e)(this.residence.rent)}):""}}),watch:{swap(){var t,e,i;this.imageError=!1,this.activeResidenceIndex=0,this.pending=!1,this.pendingFrom=null;const s=null===(t=this.swap)||void 0===t||null===(e=t.details)||void 0===e||null===(i=e.interests)||void 0===i?void 0:i[0];this.status=!0===s?"liked":!1===s?"removed":"default"}},methods:xe(xe({},(0,o.i0)({setGlobalModal:"ui/setGlobalModal",openSuperInterestPurchase:"superLikes/openPurchase"})),{},{isDeviating(t){return!!t&&this.deviatingFields.has(t)},toggleResidence(){this.activeResidenceIndex=(this.activeResidenceIndex+1)%this.residenceCount},goToProposition(){this.$emit("navigate",this.swap)},stillShowing(t){var e;return(null===(e=this.swap)||void 0===e?void 0:e.propositionId)===t},async handleInterest({cancel:t}={}){var e;const i=()=>{"function"===typeof t&&t()};if(this.markLocked)return void i();const s=null===(e=this.swap)||void 0===e?void 0:e.propositionId,r=this.status;this.status="liked",this.pending=!0,this.pendingFrom="row";try{await new Promise((t,e)=>{this.$emit("show-interest",xe(xe({},this.swap),{},{interested:!0,resolve:t,reject:e}))})}catch{this.stillShowing(s)&&(this.status=r,i())}finally{this.stillShowing(s)&&(this.pending=!1,this.pendingFrom=null)}},async handleSuperLike({cancel:t}={}){var e,i;const s=()=>{"function"===typeof t&&t()};if(this.pending||this.isSuperLiked)return void s();if(this.primaryPropositionIsLimited&&!(this.superLikesRemaining>0))return s(),this.setGlobalModal("SuperInterestPaywall"),void d.A.emitEvent(d.A.eventTypes.SEE,"Paywall",{trigger:"super-interest-freemium",src:"map-marker-card"});if("number"===typeof this.superLikesRemaining&&this.superLikesRemaining<=0)return s(),this.openSuperInterestPurchase(),void d.A.emitEvent(d.A.eventTypes.SEE,"Paywall",{trigger:"super-interest-out-of-quota",src:"map-marker-card"});d.A.emitEvent(d.A.eventTypes.CLICK,"SuperInterest",{src:"map-marker-card",propositionId:null===(e=this.swap)||void 0===e?void 0:e.propositionId});const r=null===(i=this.swap)||void 0===i?void 0:i.propositionId,o=this.status;this.status="liked",this.pending=!0,this.pendingFrom="liked"===o?"cta":"row";try{await new Promise((t,e)=>{this.$emit("show-interest",xe(xe({},this.swap),{},{interested:!0,superLike:!0,previousInterested:"liked"===o||null,resolve:t,reject:e}))})}catch{this.stillShowing(r)&&(this.status=o,s())}finally{this.stillShowing(r)&&(this.pending=!1,this.pendingFrom=null)}},async handleUndo(){var t;if(this.markLocked)return;const e=this.status;if(this.primaryPropositionIsLimited)return this.setGlobalModal("ReverseInterestActionPaywall"),void d.A.emitEvent(d.A.eventTypes.SEE,"Paywall",{trigger:"removed"===e?"reverse-no-interest-action":"reverse-interest-action",src:"interest-mark"});const i=null===(t=this.swap)||void 0===t?void 0:t.propositionId;this.status="default",this.pending=!0,this.pendingFrom="undo";try{"liked"===e?await new Promise((t,e)=>{this.$emit("show-interest",xe(xe({},this.swap),{},{interested:null,resolve:t,reject:e}))}):"removed"===e&&await new Promise((t,e)=>{this.$emit("undo-remove",xe(xe({},this.swap),{},{resolve:t,reject:e}))})}catch{this.stillShowing(i)&&(this.status=e)}finally{this.stillShowing(i)&&(this.pending=!1,this.pendingFrom=null)}},async handleRemove({cancel:t}={}){var e;const i=()=>{"function"===typeof t&&t()};if(this.markLocked)return void i();const s=null===(e=this.swap)||void 0===e?void 0:e.propositionId,r=this.status;this.status="removed",this.pending=!0,this.pendingFrom="row";try{await new Promise((t,e)=>{this.$emit("remove",xe(xe({},this.swap),{},{resolve:t,reject:e}))})}catch{this.stillShowing(s)&&(this.status=r,i())}finally{this.stillShowing(s)&&(this.pending=!1,this.pendingFrom=null)}}})},ze=We;var Ue=(0,P.A)(ze,Ce,Ie,!1,null,"1c97d817",null);const Ve=Ue.exports;var Ge=function(){var t=this,e=t._self._c;return t.v2?e("button",{class:["edit-wishes-button-v2",{small:t.small}],on:{click:function(e){return t.$emit("click")}}},[e("BaseIcon",{staticClass:"edit-wishes-button-v2-icon",attrs:{"icon-file":"filter-slider-black",width:22,height:22}}),t.small?t._e():e("span",{staticClass:"edit-wishes-button-v2-text"}
1,[t._v(t._s(t.$t("swaplist_edit_wishes_button")))])],1):e("button",{staticClass:"edit-wishes-button",on:{click:function(e){return t.$emit("click")}}},[e("span",{staticClass:"text"},[t._v(t._s(t.$t("swaplist_edit_wishes_button")))]),e("span",{staticClass:"icon-wrapper"},[e("BaseIcon",{staticClass:"icon",attrs:{"icon-file":"gear2",width:16,height:16}})],1)])},He=[];const qe={name:"EditWishesButton",components:{BaseIcon:G.A},props:{v2:{type:Boolean,default:!1},small:{type:Boolean,default:!1}}},Ye=qe;var Ke=(0,P.A)(Ye,Ge,He,!1,null,"5379f80c",null);const Qe=Ke.exports;function Ze(t){const e=t.map(t=>t.latitude),i=t.map(t=>t.longitude);return{northEast:{latitude:Math.max(...e),longitude:Math.max(...i)},southWest:{latitude:Math.min(...e),longitude:Math.min(...i)}}}function Je(t){return{latitude:(t.northEast.latitude+t.southWest.latitude)/2,longitude:(t.northEast.longitude+t.southWest.longitude)/2}}function Xe(t){return{center:{longitude:t.center[0],latitude:t.center[1]},zoom:t.zoom}}function ti(t,e=1.5){if(0===t.length)return{center:{latitude:0,longitude:0},zoom:2};if(1===t.length)return{center:t[0],zoom:15};const i=Ze(t),s=Je(i),r=(i.northEast.latitude-i.southWest.latitude)*e,o=(i.northEast.longitude-i.southWest.longitude)*e,n=Math.max(r,o),a=Math.max(2,Math.min(15,Math.floor(Math.log2(360/n))));return{center:s,zoom:a}}var ei=i(83052),ii=i(53897);function si(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function ri(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?si(Object(i),!0).forEach(function(e){oi(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):si(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function oi(t,e,i){return(e=ni(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ni(t){var e=ai(t,"string");return"symbol"==typeof e?e:e+""}function ai(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const li=12,di={name:"SuggestionsFullscreenMap",components:{MapView:Pe.A,MapMarkerCard:Ve,EditWishesButton:Qe,BaseIcon:G.A,BaseSpinner:ii.A},directives:{outsideClick:ei.A},props:{propositionId:{type:[String,Number],required:!0},pinsEndpoint:{type:Object,default:null},filter:{type:Object,default:null},inline:{type:Boolean,default:!1},hideSuperButton:{type:Boolean,default:!1},receivedSuperInterest:{type:Boolean,default:!1},hideEditWishes:{type:Boolean,default:!1},hideBackButton:{type:Boolean,default:!1},deselectOnOutsideClick:{type:Boolean,default:!1},v2:{type:Boolean,default:!1}},data(){return{region:this.getInitialRegion(),currentCardIndex:0}},computed:ri(ri({},(0,o.L8)({pins:"suggestionsMap/pins",outsideWishesIds:"suggestionsMap/outsideWishesIds",superInterestIds:"suggestionsMap/superInterestIds",selectedPinId:"suggestionsMap/selectedPinId",hoveredPropositionId:"suggestionsMap/hoveredPropositionId",selectedSuggestion:"suggestionsMap/selectedSuggestion",selectedSuggestions:"suggestionsMap/selectedSuggestions",loadingPins:"suggestionsMap/loadingPins",loadingSuggestion:"suggestionsMap/loadingSuggestion",isMobile:"screenSize/isMobile",filterCount:"swapList/filterCount",showGlobalModal:"ui/showGlobalModal",primaryProposition:"myPropositions/primaryProposition",hideExactAddress:"myPropositions/hideExactAddress"})),{},{isViewingProposition(){return!!this.$route.query.propositionPageId},blurAddress(){return this.hideExactAddress},premiumCta(){return this.primaryProposition?`${this.$t("path_payment_proposition",this.$routeLocale)}/${this.primaryProposition.propositionId}`:"/"},hoveredMarkerId(){if(null==this.hoveredPropositionId)return null;const t=Number(this.hoveredPropositionId),e=this.pins.find(e=>(e.propositionIds||[e.id]).some(e=>Number(e)===t));return e?e.id:null},currentDesktopSuggestion(){return 0===this.selectedSuggestions.length?null:this.selectedSuggestions[this.currentCardIndex]||this.selectedSuggestions[0]}}),watch:{pins(t){t.length>0&&this.fitToPins()},"$route.query.propositionPageId"(t){t||this.hideMobileTabBar()},selectedSuggestions(t,e){const i=(t||[]).map(t=>t.propositionId).join(","),s=(e||[]).map(t=>t.propositionId).join(",");i!==s&&(this.currentCardIndex=0)},filter:{handler(){clearTimeout(this._filterDebounce),this._filterDebounce=setTimeout(()=>{this.fetchPins({propositionId:this.propositionId,endpoint:this.pinsEndpoint,filter:this.filter})},500)},deep:!0},propositionId(){this.refetchPins()},pinsEndpoint(t,e){const i=t&&t.url,s=e&&e.url;i!==s&&this.refetchPins()}},mounted(){this.inline||(document.body.style.overflow="hidden"),this.hideMobileTabBar(),this.fetchPins({propositionId:this.propositionId,endpoint:this.pinsEndpoint,filter:this.filter})},beforeDestroy(){clearTimeout(this._filterDebounce),clearTimeout(this._carouselScrollDebounce),this.inline||(document.body.style.overflow=""),this.showMobileTabBar(),this.deselectPin()},methods:ri(ri(ri({},(0,o.i0)("suggestionsMap",["fetchPins","selectPin","deselectPin","fetchSuggestionAtIndex"])),(0,o.i0)("menu",["hideMobileTabBar","showMobileTabBar"])),{},{getDefaultRegion(){return Xe(this.$country.getValue("MAP_SETTINGS"))},getInitialRegion(){const t=this.$store.getters["myPropositions/primaryProposition"],e=t&&t.residences&&t.residences[0];return e&&e.latitude&&e.longitude?{center:{latitude:e.latitude,longitude:e.longitude},zoom:li}:this.getDefaultRegion()},handleMapReady(){this.pins.length>0&&this.fitToPins()},refetchPins(){this.deselectPin(),this.fetchPins({propositionId:this.propositionId,endpoint:this.pinsEndpoint,filter:this.filter})}
1,isOutsideWishes(t){return!!t&&this.outsideWishesIds.has(Number(t.propositionId))},isSuperInterest(t){return this.receivedSuperInterest&&!!t&&(!0===t.hasSuperInterest||this.superInterestIds.has(Number(t.propositionId)))},async handleMarkerClick(t){await this.selectPin({pinId:t.id,propositionIds:t.propositionIds||[t.id],lazy:!0}),this.isMobile&&this.selectedSuggestions.length>1&&this.fetchSuggestionAtIndex({index:1})},handleCarouselScroll(t){clearTimeout(this._carouselScrollDebounce);const e=t.target;this._carouselScrollDebounce=setTimeout(()=>{const t=Array.from(e.children);if(!t.length)return;let i=0;const s=e.scrollLeft+e.clientWidth/2;t.forEach((t,r)=>{t.offsetLeft-e.offsetLeft<=s&&(i=r)}),this.fetchSuggestionAtIndex({index:i}),this.fetchSuggestionAtIndex({index:i+1})},150)},handleMapClick(){this.deselectPin()},handleOutsideClick(){this.deselectOnOutsideClick&&(this.showGlobalModal||this.isViewingProposition||(this.selectedPinId||this.selectedSuggestion||0!==this.selectedSuggestions.length)&&this.deselectPin())},handleShowInterest(t){this.$emit("show-interest",t)},handleRemove(t){this.$emit("remove",t)},handleUndoRemove(t){this.$emit("undo-remove",t)},handleNavigate(t){return this.$router.push({query:ri(ri({},this.$route.query),{},{propositionPageId:t.propositionId,type:t.details?t.details.type:void 0})})},prevCard(){this.currentCardIndex>0&&(this.currentCardIndex--,this.fetchSuggestionAtIndex({index:this.currentCardIndex}))},nextCard(){this.currentCardIndex<this.selectedSuggestions.length-1&&(this.currentCardIndex++,this.fetchSuggestionAtIndex({index:this.currentCardIndex}))},fitToPins(){if(0===this.pins.length)return;const t=this.pins.map(t=>t.coordinate),e=ti(t);e&&(this.region=e),this.$nextTick(()=>{this.$refs.mapView&&this.$refs.mapView.fitToMarkers()})},zoomIn(){this.$refs.mapView&&this.$refs.mapView.zoomIn()},zoomOut(){this.$refs.mapView&&this.$refs.mapView.zoomOut()}})},ci=di;var ui=(0,P.A)(ci,Se,Te,!1,null,"155d7187",null);const pi=ui.exports;var hi=function(){var t=this,e=t._self._c;return e("div",{staticClass:"swap-list-side-map"},[t.locked?e("div",{staticClass:"side-map-locked"},[e("div",{staticClass:"side-map-locked-backdrop"}),e("div",{staticClass:"side-map-locked-content"},[e("div",{staticClass:"side-map-locked-icon"},[e("BaseIcon",{attrs:{"icon-file":"premium-icon",width:26,height:26}})],1),e("h3",{staticClass:"side-map-locked-title"},[t._v(" "+t._s(t.$t("swap_list_map_locked_title"))+" ")]),e("p",{staticClass:"side-map-locked-body"},[t._v(" "+t._s(t.$t("swap_list_map_locked_body"))+" ")]),e("BaseButton",{staticClass:"grey smaller side-map-locked-cta",attrs:{"icon-file":"premium-icon",link:t.paymentPageLink}},[t._v(" "+t._s(t.$t("get_premium"))+" ")])],1)]):e("SuggestionsFullscreenMap",{attrs:{"proposition-id":t.propositionId,"pins-endpoint":t.pinsEndpoint,inline:!0,v2:!0,"hide-edit-wishes":"","hide-back-button":"","deselect-on-outside-click":"","hide-super-button":t.hideSuperButton,"received-super-interest":t.receivedSuperInterest},on:{"show-interest":function(e){return t.$emit("show-interest",e)},remove:function(e){return t.$emit("remove",e)},"undo-remove":function(e){return t.$emit("undo-remove",e)}}})],1)},mi=[],gi=i(74344);const wi={name:"SwapListSideMap",components:{SuggestionsFullscreenMap:pi,BaseButton:V.A,BaseIcon:G.A},props:{propositionId:{type:[String,Number],required:!0},swapFilterType:{type:String,required:!0},locked:{type:Boolean,default:!1}},computed:{hideSuperButton(){return this.swapFilterType===n.Di.LAST_PART_NEW},receivedSuperInterest(){return this.swapFilterType===n.Di.UNANSWERED||this.swapFilterType===n.Di.LAST_PART_NEW},pinsEndpoint(){return(0,gi.SR)(this.swapFilterType)},paymentPageLink(){return`${this.$t("path_payment_proposition",this.$routeLocale)}/${this.propositionId}`}},watch:{locked:{immediate:!0,handler(t){t&&d.A.emitEvent(d.A.eventTypes.SEE,"Paywall",{trigger:"map-locked",src:"swap-list-incoming-inline"})}}}},vi=wi;var bi=(0,P.A)(vi,hi,mi,!1,null,"1067033b",null);const fi=bi.exports;var yi=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tip-box",class:`tip-box--${t.variant}`},["stacked"===t.variant?e("BaseIcon",{staticClass:"tip-box-icon tip-box-icon--top",attrs:{"icon-file":"tip-box",width:t.iconSize,height:t.iconSize,"aria-hidden":"true"}}):t._e(),e("div",{staticClass:"tip-box-content"},[e("h4",{staticClass:"tip-box-heading"},["row"===t.variant?e("BaseIcon",{staticClass:"tip-box-icon",attrs:{"icon-file":"tip-box",width:t.iconSize,height:t.iconSize,"aria-hidden":"true"}}):t._e(),e("span",[t._v(t._s(t.title))])],1),e("p",{staticClass:"tip-box-body"},[t._v(t._s(t.body))])]),t.buttonLabel?e("BaseButton",{staticClass:"tip-box-button rounded",class:"stacked"===t.variant?"smaller":"tiny",on:{click:function(e){return t.$emit("button-click")}}},[t._v(" "+t._s(t.buttonLabel)+" ")]):t._e()],1)},_i=[];const ki={name:"TipBox",components:{BaseButton:V.A,BaseIcon:G.A},props:{title:{type:String,default:""},body:{type:String,default:""},buttonLabel:{type:String,default:""},variant:{type:String,default:"row",validator:t=>["row","stacked"].includes(t)}},computed:{iconSize(){return"stacked"===this.variant?24:16}}},Si=ki;var Ti=(0,P.A)(Si,yi,_i,!1,null,"5ad71e45",null);const Pi=Ti.exports;function Ci(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function Ii(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Ci(Object(i),!0).forEach(function(e){Ei(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ci(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Ei(t,e,i){return(e=Mi(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Mi(t){var e=Li(t,"string");return"symbol"==typeof e?e:e+""}function Li(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function $i(t){const{proposition:e}=t;return{propositionId:e.id,residences:e.residences.map(t=>Ii(Ii({},t),{},{images:t.images.map(t=>({fileName:t.url,altText:t.altText}))})),details:{type:e.swapType},isInterested:t.isInterested,isBookmarked:t.isBookmarked,isNew:t.isNew,hasBoost:t.hasBoost,depth:t.depth,isBlurred:t.isBlurred,isOutsideWishes:t.isOutsideWishes,deviations:t.deviations,hasSuperInterest:!0===t.hasSuperInterest,isSuperInterested:!0===t.isSuperInterested}}async function Ai(t,{skip:e=0,take:i=25,includeOutsideWishes:s=!1,newFirst:r=!1}={}){const{data:o}=await dt.zm.get(`/api/suggestions/top-picks/${t}`,{params:{skip:e,take:i,includeOutsideWishes:s,newFirst:r}});return{items:o.items.map($i),total:o.total,hasMore:o.hasMore,counters:o.counters}}async function Oi(t,{skip:e=0,take:i=25}={}){const{data:s}=await dt.zm.get(`/api/suggestions/incoming/${t}`,{params:{skip:e,take:i}});return{items:s.items.map($i),total:s.total,hasMore:s.hasMore,counters:s.counters}}async function Bi(t,{skip:e=0,take:i=25}={}){const{data:s}=await dt.zm.get(`/api/suggestions/interested/${t}`,{params:{skip:e,take:i}});return{items:s.items.map($i),total:s.total,hasMore:s.hasMore,counters:s.counters}}async function Ri(t,{skip:e=0,take:i=25}={}){const{data:s}=await dt.zm.get(`/api/suggestions/removed/${t}`,{params:{skip:e,take:i}});return{items:s.items.map($i),total:s.total,hasMore:s.hasMore,counters:s.counters}}function Fi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function xi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Fi(Object(i),!0).forEach(function(e){Di(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Fi(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Di(t,e,i){return(e=Ni(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ni(t){var e=ji(t,"string");return"symbol"==typeof e?e:e+""}function ji(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}class Wi{constructor({fetchFn:t,defaultTake:e=16,initialTake:i=null,label:s="items"}){this.fetchFn=t,this.defaultTake=e,this.initialTake=i||e,this.label=s,this.items=[],this.total=0,this.hasMore=!1,this.counters=null,this.loading=!1}async load(t,{reset:e=!1,params:i={}}={}){if(!this.loading){e&&(this.items=[]),this.loading=!0;try{const s=e?0:this.items.length,r=0===this.items.length||e?this.initialTake:this.defaultTake,o=await this.fetchFn(t,xi({skip:s,take:r},i));this.items=e?o.items:[...this.items,...o.items],void 0!==o.total&&(this.total=o.total),void 0!==o.hasMore&&(this.hasMore=o.hasMore),void 0!==o.counters&&(this.counters=o.counters)}catch(s){console.error(`Failed to fetch ${this.label}:`,s)}finally{this.loading=!1}}}}function zi(t,e){if(!e||0===e.length)return t;const i=new Set(e);return(t||[]).filter(t=>!i.has(String(t.propositionId)))}function Ui({lastMarked:t,propositionId:e,items:i}){const s=t;if(!s||String(s.propositionId)!==String(e))return null;if("boolean"!==typeof s.interested)return null;const r=(i||[]).some(t=>String(t.propositionId)===String(e));return r?s.interested?"answered":"removed":null}function Vi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function Gi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?Vi(Object(i),!0).forEach(function(e){Hi(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Vi(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Hi(t,e,i){return(e=qi(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function qi(t){var e=Yi(t,"string");return"symbol"==typeof e?e:e+""}function Yi(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const Ki=[n.Di.ANSWERED,n.Di.REMOVED],Qi={name:"SwapList2",components:{LoadMoreBlock:j,SwapListCard:W.A,SwapListCardSkeleton:F,NoResult:tt,MobileSwapHeader:at,NoActiveModal:lt.A,SwapListTutorial:I,InfoBanner:st.A,StickyMapButton:kt,SwapTabNavigation2:te,AccountNotificationModal:ue,EditWishesModal:_e,SponsoredPropositions:ke.A,SuggestionsFullscreenMap:pi,SwapListSideMap:fi,TipBox:Pi,BaseIcon:G.A},mixins:[Nt],data(){const t=this.$store.getters["screenSize/isMobile"],e=this.$store.getters["screenSize/isSmallDesktop"],i=t?2:e?4:6;return{FULL_SWAP_TYPES:["DIRECT_SWAP_100","TRIANGLE_SWAP_100"],SWAP_FILTER_TYPES:n.Di,waitForAppReadyIntervalId:null,firstLoadDone:!1,showNewTutorial:!1,newTutorialPaused:!1,newTutorialStep:1,tutorialFreeMarkUsed:!1,showAccountNotificationModal:!1,showEditWishesModal:!1,isTabSwitching:!1,isS
1howingSwapModal:!1,newFirst:!1,dismissedIds:[],dismissedIncomingIds:[],answeredSinceCountersRefresh:0,topPicks:new Wi({fetchFn:Ai,defaultTake:20,initialTake:20,label:"top picks"}),incoming:new Wi({fetchFn:Oi,defaultTake:4*i,label:"incoming"}),interested:new Wi({fetchFn:async(...t)=>{const e=await Bi(...t);return this.consumablesEnabled&&this.seedSuperLiked(e.items),e},defaultTake:4*i,label:"interested"}),removed:new Wi({fetchFn:Ri,defaultTake:4*i,label:"removed"})}},head:{title(){return{inner:this.$t("meta_title_swaplist")}}},computed:Gi(Gi({},(0,o.L8)({sponsoredPropositions:"propositions/sponsoredPropositions",lastMarked:"interests/lastMarked",ready:"app/ready",isTestEnabled:"app/isTestEnabled",isAppRequest:"app/isAppRequest",isMyPropositionsLoading:"myPropositions/loadingPropositions",swapItemMode:"swapList/swapItemMode",isMobile:"screenSize/isMobile",isDesktop:"screenSize/isDesktop",listPropositionId:"swapList/listPropositionId",primaryPropositionId:"myPropositions/primaryPropositionId",primaryProposition:"myPropositions/primaryProposition",primaryPropositionActive:"myPropositions/primaryPropositionActive",primaryPropositionIsLimited:"myPropositions/primaryPropositionIsLimited",swapFilterType:"swapList/swapFilterType",unseenDetails:"notificationCenter/unseenDetails",superLikesRemaining:"menu/superLikesRemaining"})),{},{totalSwapCount(){let t=0;if(this.unseenDetails&&this.unseenDetails.typesCount){const{typesCount:e}=this.unseenDetails;t=Object.entries(e).reduce((t,e)=>this.FULL_SWAP_TYPES.includes(e[0])?t+e[1]:t,0)}return t},primaryPropositionWishCount(){return this.primaryProposition&&this.primaryProposition.wishes&&Array.isArray(this.primaryProposition.wishes)?this.primaryProposition.wishes.length:1},newTutorialEmptyState(){return 0===this.topPicks.items.length&&!this.topPicks.loading},newTutorialLockFirstCard(){return this.showNewTutorial&&2===this.newTutorialStep},newTutorialActive(){return this.showNewTutorial&&!this.newTutorialPaused},currentTabEmpty(){switch(this.swapFilterType){case n.Di.UNANSWERED:return 0===this.topPicks.items.length&&!this.topPicks.loading;case n.Di.LAST_PART_NEW:return 0===this.incoming.items.length&&!this.incoming.loading;case n.Di.ANSWERED:return 0===this.interested.items.length&&!this.interested.loading;case n.Di.REMOVED:return 0===this.removed.items.length&&!this.removed.loading;default:return!0}},activeCounters(){switch(this.swapFilterType){case n.Di.LAST_PART_NEW:return this.incoming.counters;case n.Di.ANSWERED:return this.interested.counters;case n.Di.REMOVED:return this.removed.counters;default:return this.topPicks.counters}},currentSection(){switch(this.swapFilterType){case n.Di.LAST_PART_NEW:return"incoming";case n.Di.ANSWERED:return"interested";case n.Di.REMOVED:return"removed";default:return"top-picks"}},showFullscreenMap(){return"1"===this.$route.query.map&&this.canShowFullscreenMap&&!!this.currentPropositionId},canShowFullscreenMap(){return!this.showInlineMap&&!this.incomingMapLocked},incomingMapLocked(){return this.swapFilterType===n.Di.LAST_PART_NEW&&this.primaryPropositionIsLimited},mapPinsEndpoint(){return(0,gi.SR)(this.swapFilterType)},unreadIncomingCount(){var t;return(null===(t=this.activeCounters)||void 0===t?void 0:t.unreadIncoming)??0},unansweredTotalCount(){var t;const e=(null===(t=this.activeCounters)||void 0===t?void 0:t.total)??0;return Math.max(0,e-this.answeredSinceCountersRefresh)},showStickyMapButton(){return!this.showInlineMap&&!this.newTutorialActive&&(this.displayedTopPicks.length>0||this.topPicks.loading)},shouldBlurCards(){return this.primaryPropositionIsLimited&&this.swapFilterType===n.Di.LAST_PART_NEW},showInlineMap(){return this.isDesktop},showSideMap(){return this.showInlineMap&&(!this.currentTabEmpty||this.isMergedAnsweredTab)},sideMapLocked(){return this.shouldBlurCards},currentPropositionId(){return this.$route.params.otherUserPropositionId||this.primaryPropositionId},isUnansweredFilter(){return this.swapFilterType===n.Di.UNANSWERED},isRemovedFilter(){return this.swapFilterType===n.Di.REMOVED},mapReceivedSuperInterest(){return this.swapFilterType===n.Di.UNANSWERED||this.swapFilterType===n.Di.LAST_PART_NEW},consumablesEnabled(){return this.isTestEnabled("consumables")},isMergedAnsweredTab(){return this.consumablesEnabled&&Ki.includes(this.swapFilterType)},answeredList(){return this.isRemovedFilter?this.removed:this.interested},hasBoost(){var t;return!(null===(t=this.primaryProposition)||void 0===t||!t.extraVisibility)},showBoostFloatingCta(){return this.consumablesEnabled&&this.swapFilterType===n.Di.LAST_PART_NEW&&this.displayedIncoming.length>0&&!this.hasBoost},showSuperInterestFloatingCta(){return this.isMergedAnsweredTab&&!this.isRemovedFilter&&this.interested.items.length>0},floatingCtaModifier(){return{"floating-cta--app":this.isAppRequest}},superInterestCtaLabel(){return this.superLikesRemaining>0?this.$tc("swap_list_super_interest_remaining_cta",this.superLikesRemaining,{count:this.superLikesRemaining}):this.$t("swap_list_super_interest_topup_cta")},displayedTopPicks(){return zi(this.topPicks.items,this.dismissedIds)},displayedIncoming(){return zi(this.incoming.items,this.dismissedIncomingIds)},newItemsCount(){return this.topPicks.counters&&this.topPicks.counters.newCount||0},isNewSortEmpty(){return 0===this.newItemsCount&&!this.newFirst},showBoostBlock(){return this.$country.isFeatureEnabled("EXTRA_VISIBILITY")&&this.sponsoredPropositions.length>0}}),watch:{activeCounters(){this.answeredSinceCountersRefresh=0},newTutorialEmptyState(t){!t&&this.newTutorialPaused&&(this.newTutorialPaused=!1)}
1,canShowFullscreenMap:{immediate:!0,handler(t){t||"1"!==this.$route.query.map||this.closeFullscreenMap({replace:!0})}},currentPropositionId(t,e){t!=e&&e&&this.primaryPropositionActive&&(this.isTabSwitching=!0,this.loadForCurrentTab(!0).finally(()=>{this.isTabSwitching=!1}))},listPropositionId(t,e){t!==e&&window.scrollTo(0,0)},swapFilterType(t,e){if(t!==e){window.scrollTo(0,0);const i=this.consumablesEnabled&&Ki.includes(t)&&Ki.includes(e);this.isTabSwitching=!i,this.loadForCurrentTab(!0).finally(()=>{this.isTabSwitching=!1})}},"$route.query.map"(t,e){var i;const s=(null===(i=window.history.state)||void 0===i?void 0:i.key)??null;"1"===t?"1"!==e&&(this.mapEntryKey=s!==this.lastEntryKey?s:null):(this.mapEntryKey=null,"1"===e&&(this.showEditWishesModal=!1)),this.closingMap=!1,this.lastEntryKey=s},$route(t,e){var i,s,r;if(this.closingMap=!1,this.lastEntryKey=(null===(i=window.history.state)||void 0===i?void 0:i.key)??null,t.query){const e=Object.keys(t.query);this.isShowingSwapModal=e.includes("propositionPageId")}const o=null===(s=t.query)||void 0===s?void 0:s.propositionPageId,n=null===e||void 0===e||null===(r=e.query)||void 0===r?void 0:r.propositionPageId;o&&o!==n&&(this.trackViewPropositionClicked(o),this.$store.commit("interests/setLastMarked",null)),n&&!o&&this.dismissIfMarkedFromDetail(n)}},beforeCreate(){this.$store.commit("trial/temporaryHideTrialBanner",{hide:!0})},created(){var t;const e=this.$route.query.filterType,i=e&&String(e).toUpperCase();i&&Object.values(n.Di).includes(i)&&this.$store.commit("swapList/setSwapFilterType",{swapFilterType:i}),this.mapEntryKey=null,this.lastEntryKey=(null===(t=window.history.state)||void 0===t?void 0:t.key)??null,this.closingMap=!1},async mounted(){const t=(await i.e(996).then(i.bind(i,24703))).default;if(t(),this.$route.query){const t=Object.keys(this.$route.query);this.isShowingSwapModal=t.includes("propositionPageId")}await this.waitForAppReadyAsync(),this.$nextTick(()=>{window.scrollTo(0,0)}),this.primaryPropositionActive&&(await this.loadForCurrentTab(!0),this.sponsoredPropositions&&0!==this.sponsoredPropositions.length||this.getSponsoredPropositions(),d.A.emitEvent(d.A.eventTypes.PAGEVIEW,"SwapList",{propositionId:this.currentPropositionId,listType:this.swapItemMode})),this.firstLoadDone=!0,null!==this.unseenDetails&&this.totalSwapCount>0&&(this.showAccountNotificationModal=!0);const e=await this.fetchAndSetTasksToComplete(this.primaryPropositionId),s=!!e&&e.includes("SWAPLIST_TUTORIAL");let r=!1;try{r="1"===sessionStorage.getItem("signupTutorialPending"),r&&sessionStorage.removeItem("signupTutorialPending")}catch(o){}r&&!s&&window.Logger.log("SWAPLIST_TUTORIAL task missing for proposition",this.primaryPropositionId,"tasks:",e),(s||r)&&(this.showNewTutorial=!0)},beforeDestroy(){clearInterval(this.waitForAppReadyIntervalId),this.temporaryHideTrialBanner({hide:!1}),this.$store.commit("swapList/setSwapFilterType",{swapFilterType:n.Di.UNANSWERED})},methods:Gi(Gi(Gi({},(0,o.i0)({getSponsoredPropositions:"propositions/getSponsoredPropositions",temporaryHideTrialBanner:"trial/temporaryHideTrialBanner",markUnseenNotificationAsRead:"notificationCenter/markUnseenNotificationAsRead",fetchAndSetTasksToComplete:"app/fetchAndSetTasksToComplete",fetchUnseenDetails:"notificationCenter/fetchUnseenDetails",setGlobalModal:"ui/setGlobalModal",openSuperInterestPurchase:"superLikes/openPurchase"})),(0,o.PY)({setExtraVisibilityPaymentVisible:"extraVisibility/setVisible",setExtraVisibilityPaymentProposition:"extraVisibility/setProposition"})),{},{async openBoostPurchase(){d.A.emitEvent(d.A.eventTypes.CLICK,"BoostFloatingCta",{src:"swap-list-incoming"}),await(0,ct.gn)(this.primaryPropositionId)?this.setGlobalModal("BoostInfo"):(this.setExtraVisibilityPaymentProposition(this.primaryProposition),this.setExtraVisibilityPaymentVisible(!0))},handleSuperInterestCta(){d.A.emitEvent(d.A.eventTypes.CLICK,"SuperInterestFloatingCta",{remaining:this.superLikesRemaining,src:"swap-list-answered"}),!this.primaryPropositionIsLimited||this.superLikesRemaining>0?this.superLikesRemaining>0?this.setGlobalModal("SuperInterestExplain"):this.openSuperInterestPurchase():this.setGlobalModal("SuperInterestPaywall")},trackPreferenceButtonClick(t){d.A.emitEvent(d.A.eventTypes.CLICK,"PreferenceButtonClick",{triggeredFrom:t})},trackMapButtonClicked(t){d.A.emitEvent(d.A.eventTypes.CLICK,"MapButtonClicked",{triggeredFromSection:t})},openFullscreenMap(){if("1"!==this.$route.query.map)return this.$router.push({query:Gi(Gi({},this.$route.query),{},{map:"1"})})},closeFullscreenMap({replace:t=!1}={}){var e;if("1"!==this.$route.query.map||this.closingMap)return;const i=null!=this.mapEntryKey&&(null===(e=window.history.state)||void 0===e?void 0:e.key)===this.mapEntryKey;if(this.mapEntryKey=null,i&&!t)return this.closingMap=!0,void this.$router.go(-1);const s=Gi({},this.$route.query);return delete s.map,this.$router.replace({query:s})},goToMap(){this.trackMapButtonClicked("top-picks"),this.openFullscreenMap()},goToIncomingMap(){this.trackMapButtonClicked("incoming"),this.primaryPropositionIsLimited?(this.setGlobalModal("MapLocked"),d.A.emitEvent(d.A.eventTypes.SEE,"Paywall",{trigger:"map-locked",src:"swap-list-incoming"})):this.openFullscreenMap()},goToInterestedMap(){this.trackMapButtonClicked("interested"),this.openFullscreenMap()},goToRemovedMap(){this.trackMapButtonClicked("removed"),this.openFullscreenMap()},setAnsweredSubTab(t){t!==this.swapFilterType&&(this.$store.commit("swapList/setSwapFilterType",{swapFilterType:t}),this.$router.replace({query:{filterType:t.toLowerCase()}}).catch(t=>
1{"NavigationDuplicated"!==t.name&&console.error(t)}))},handleInterestReceived(t){var e;const i=null===(e=t.propositionId2)||void 0===e?void 0:e.toString();if(!i)return;const s=[this.topPicks,this.incoming,this.interested,this.removed];for(const r of s){const e=r.items.find(t=>t.propositionId.toString()===i);e&&this.$set(e,"isInterested",t.interested)}this.$store.commit("suggestionsMap/UPDATE_INTEREST_STATE",{propositionId:i,interested:t.interested})},handleWishesSaved(){this.loadForCurrentTab(!0),this.$store.dispatch("suggestionsMap/fetchPins",{propositionId:this.currentPropositionId,endpoint:this.mapPinsEndpoint,filter:null})},handleMapShowInterest({propositionId:t,interested:e,superLike:i=!1,previousInterested:s,resolve:r,reject:o}){void 0===e&&(e=!0);let n="undo";!0===e&&(n=i?"super":"yes"),this.trackInterestMarkClicked(t,n,!0),this.$store.dispatch("interests/markInterest",Gi(Gi({targetPropositionId:t,interested:e},i?{superLike:!0,previousInterested:s}:{}),{},{where:"map-suggestions"})).then(i=>{r&&r(i),this.syncListsAfterMapMark(t,e),e&&this.dismissFromFeed(t,"answered")}).catch(o)},handleMapRemove({propositionId:t,resolve:e,reject:i}){this.trackInterestMarkClicked(t,"no",!0),this.$store.dispatch("swapList/markPropositionForNoInterest",{targetPropositionId:t,interested:!1,where:"map-suggestions"}).then(i=>{e&&e(i),this.syncListsAfterMapMark(t,!1),this.dismissFromFeed(t,"removed")}).catch(i)},handleMapUndoRemove({propositionId:t}){this.trackInterestMarkClicked(t,"undo",!0),this.$store.dispatch("swapList/setUnmarkPropositionNoInterest",t),this.$store.dispatch("interests/markInterest",{targetPropositionId:t,interested:null,where:"map-suggestions"}).then(()=>{this.syncListsAfterMapMark(t,null)}).catch(t=>window.Logger.log(t))},syncListsAfterMapMark(t,e){const i=String(t),s=[this.topPicks,this.incoming,this.interested,this.removed];for(const r of s){const t=r.items.find(t=>String(t.propositionId)===i);t&&this.$set(t,"isInterested",e)}},handleMapEditWishes(){this.showNewTutorial&&this.newTutorialEmptyState&&(this.newTutorialPaused=!0),this.isMobile?this.showEditWishesModal=!0:this.$router.push(`${this.$routes.EDIT_PROPOSITION_WISHES}/${this.primaryPropositionId}?from=swaplist`)},topPicksParams(){return{includeOutsideWishes:!0,newFirst:this.newFirst}},seedSuperLiked(t){t.filter(t=>t.isSuperInterested).forEach(t=>this.$store.commit("interests/addSuperLiked",t.propositionId))},loadForCurrentTab(t=!1){const e=this.currentPropositionId;switch(t&&(this.dismissedIds=[],this.dismissedIncomingIds=[]),this.swapFilterType){case n.Di.UNANSWERED:return this.topPicks.load(e,{reset:t,params:this.topPicksParams()});case n.Di.LAST_PART_NEW:return this.incoming.load(e,{reset:t});case n.Di.ANSWERED:return this.interested.load(e,{reset:t});case n.Di.REMOVED:return this.removed.load(e,{reset:t});default:return Promise.resolve()}},loadMore(t){const e={"top picks":"top-picks"},i=e[t.label];i&&d.A.emitEvent(d.A.eventTypes.CLICK,"ShowMoreClicked",{section:i});const s=t===this.topPicks?this.topPicksParams():{};t.load(this.currentPropositionId,{params:s})},getSectionForProposition(t,e){const i=t.toString(),s={"top picks":"top-picks",incoming:"incoming",interested:"interested",removed:"removed"},r=[this.topPicks,this.incoming,this.interested,this.removed];for(const o of r)if(o.items.some(t=>{var e;return(null===(e=t.propositionId)||void 0===e?void 0:e.toString())===i}))return s[o.label];return e?this.currentSection:null},trackInterestMarkClicked(t,e,i){const s=this.getSectionForProposition(t,i);d.A.emitEvent(d.A.eventTypes.CLICK,"InterestMarkClicked",{triggeredFromSection:s,map:i,interest:e})},trackViewPropositionClicked(t){const e=this.showFullscreenMap,i=this.getSectionForProposition(t,e);d.A.emitEvent(d.A.eventTypes.CLICK,"View Proposition",{src:"swaplist",propositionId:t,triggeredFromSection:i,map:e})},handleCloseNotification(){this.handleMarkUnseenNotificationAsRead(),this.showAccountNotificationModal=!1},async handleMarkUnseenNotificationAsRead(){if(this.unseenDetails&&this.unseenDetails.typesCount){try{for(const[t]of Object.entries(this.unseenDetails.typesCount))this.FULL_SWAP_TYPES.includes(t)&&await this.markUnseenNotificationAsRead({propositionId:this.currentPropositionId,type:t})}catch(t){console.error("Error marking notifications as read:",t)}this.fetchUnseenDetails()}},async handleNotificationCtaClick(){this.handleMarkUnseenNotificationAsRead(),this.$router.push(`${this.$t("path_matches",this.$routeLocale)}`)},waitForAppReadyAsync(){return new Promise(t=>{!this.ready||this.isMyPropositionsLoading?(this.waitForAppReadyIntervalId&&t(),this.waitForAppReadyIntervalId=setInterval(()=>{this.ready&&!this.isMyPropositionsLoading&&(clearInterval(this.waitForAppReadyIntervalId),t())},50)):t()})},markTutorialAsComplete(){dt.zm.post("/api/user/SetTutorialCompleted?v=1")},handleNewTutorialStep(t){this.newTutorialStep=t},handleNewTutorialCompleted(){this.showNewTutorial=!1,this.newTutorialStep=1,this.markTutorialAsComplete()},maybeCompleteNewTutorial(){this.showNewTutorial&&2===this.newTutorialStep&&this.$nextTick(()=>{this.$refs.newTutorial&&this.$refs.newTutorial.startInterlude()})},handleGridLike({id:t,interested:e,superLike:i=!1,previousInterested:s,resolve:r,reject:o}){let n="undo";
1!0===e&&(n=i?"super":"yes"),this.trackInterestMarkClicked(t,n,!1);const a=this.showNewTutorial&&2===this.newTutorialStep&&!this.tutorialFreeMarkUsed&&!0===e&&!i;a&&(this.tutorialFreeMarkUsed=!0);const l=a?"tutorial":"swap-list";this.$store.dispatch("interests/markInterest",Gi(Gi({targetPropositionId:t,interested:e},i?{superLike:!0,previousInterested:s}:{}),{},{where:l})).then(()=>{r(),!0===e&&this.dismissFromFeed(t,"answered"),this.maybeCompleteNewTutorial()}).catch(o)},handleGridRemove({id:t,resolve:e,reject:i}){this.trackInterestMarkClicked(t,"no",!1),this.$store.dispatch("interests/markInterest",{targetPropositionId:t,interested:!1,where:"swap-list"}).then(()=>{e&&e(),this.dismissFromFeed(t,"removed"),this.maybeCompleteNewTutorial()}).catch(t=>{i&&i(t)})},dismissFromFeed(t,e){const i=this.swapFilterType===n.Di.UNANSWERED,s=this.swapFilterType===n.Di.LAST_PART_NEW;if(!i&&!s)return;this.flyCardToTab(e);const r=String(t),o=i?this.dismissedIds:this.dismissedIncomingIds;setTimeout(()=>{o.includes(r)||(o.push(r),this.answeredSinceCountersRefresh+=1)},225)},dismissIfMarkedFromDetail(t){const e=this.swapFilterType===n.Di.UNANSWERED,i=this.swapFilterType===n.Di.LAST_PART_NEW;if(!e&&!i)return;const s=e?this.topPicks:this.incoming,r=Ui({lastMarked:this.lastMarked,propositionId:t,items:s.items});r&&(this.dismissFromFeed(t,r),this.$store.commit("interests/setLastMarked",null))},flyCardToTab(t){const e=290;setTimeout(()=>{const e=document.querySelector(`[data-swap-tab~="${t}"]`);if(!e)return;const i=document.querySelector(".swap-tab-navigation-wrapper .menu-wrapper"),s=e.getBoundingClientRect(),r=i?i.getBoundingClientRect():null,o=!r||s.left>=r.left&&s.right<=r.right;if(o)return e.classList.add("swap-tab-pulse"),void setTimeout(()=>e.classList.remove("swap-tab-pulse"),950);const n=document.querySelector(".swap-tab-scroll-hint");n&&(n.classList.add("is-pulsing"),setTimeout(()=>n.classList.remove("is-pulsing"),1100))},e)},toggleNewFirst(){this.newFirst=!this.newFirst,d.A.emitEvent(d.A.eventTypes.CLICK,"NewSortToggled",{src:"swap-list",active:this.newFirst}),this.dismissedIds=[],this.dismissedIncomingIds=[],this.topPicks.load(this.currentPropositionId,{reset:!0,params:this.topPicksParams()})},handleGridUndoRemove({id:t}){this.trackInterestMarkClicked(t,"undo",!1),this.$store.dispatch("swapList/setUnmarkPropositionNoInterest",t),this.$store.dispatch("interests/markInterest",{targetPropositionId:t,interested:null,where:"swap-list"}).catch(t=>window.Logger.log(t))}})},Zi=Qi;var Ji=(0,P.A)(Zi,s,r,!1,null,"184e25ce",null);const Xi=Ji.exports}}]); 2//# sourceMappingURL=swap-list.fd28296c.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.