1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8347],{32011(e,n,a){a.r(n),a.d(n,{default:()=>_n});var s=a(89379),i=a(9950),o=a(48738),r=a.n(o),t=a(53619),l=a(85108),c=a(14417),u=a(27213),d=a(97096),p=a(66568),m=a(42998),b=a(51090),g=a(81120),_=a(87658);const h="Topbar_root__wssO9",x="Topbar_skipToMainContent__D4oQf",k="Topbar_skiptoMainArrow__KcpSQ",L="Topbar_container__gG-i7",j="Topbar_menu__yN9bh h5",v="Topbar_searchMenu__Nfnhq h5",M="Topbar_menuIcon__KIdaE",T="Topbar_searchMenuIcon__K+PCq",f="Topbar_notificationDot__Xn306",N="Topbar_desktop__S+oY9",S="Topbar_rootMenuIcon__REzxO",C="Topbar_rootSearchIcon__rx5pt",P="Topbar_searchContainer__rbtTI",y="Topbar_mobileHelp__oK06B",A="Topbar_modal__5tcfL",w="Topbar_modalScrollLayer__UOHR8",I="Topbar_modalContainer__BCkpI marketplaceModalInMobileBaseStyles",F="Topbar_modalContainerSearchForm__vyy+y Topbar_modalContainer__BCkpI marketplaceModalInMobileBaseStyles",D="Topbar_missingInformationModal__N8l+z marketplaceModalBaseStyles",E="Topbar_genericError__lTCXp",B="Topbar_genericErrorVisible__WEBNQ",G="Topbar_genericErrorContent__gxp27",W="Topbar_genericErrorText__t3WhT h5";var R=a(44414);const O=e=>{const n=e.className,a=e.rootClassName,s=e.ariaLabel,i=r()(a||S,n);return(0,R.jsxs)("svg",{className:i,width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":s,children:[(0,R.jsx)("rect",{x:"6",y:"12",width:"36",height:"2"}),(0,R.jsx)("rect",{x:"12",y:"22",width:"24",height:"2"}),(0,R.jsx)("rect",{x:"6",y:"32",width:"36",height:"2"})]})},U=e=>{const n=e.className,a=e.rootClassName,s=e.ariaLabel,i=r()(a||C,n);return(0,R.jsx)("svg",{className:i,width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":s,children:(0,R.jsxs)("g",{transform:"matrix(-1 0 0 1 17 1)",strokeWidth:"2",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,R.jsx)("path",{d:"M11.733 11.733l3.727 3.727"}),(0,R.jsx)("circle",{cx:"6.4",cy:"6.4",r:"6.4"})]})})};var V=a(80045),q=a(16838);const H="TopbarSearchForm_mobileInputRoot__C5pxr",K="TopbarSearchForm_desktopInputRoot__tetYe",z="TopbarSearchForm_mobileIcon__sd-do",Z="TopbarSearchForm_mobileInput__3qVZO TopbarSearchForm_fontInput__BeZNV",Q="TopbarSearchForm_desktopIcon__TQhWD",J="TopbarSearchForm_desktopInput__XDF+Y p",Y="TopbarSearchForm_mobilePredictions__L3nn6",X="TopbarSearchForm_mobilePredictionsAttribution__7--G0",$="TopbarSearchForm_desktopPredictions__FQnec",ee="TopbarSearchForm_keywordSearchWra
1pper__MmyaI",ne="TopbarSearchForm_searchSubmit__QEP-B",ae="TopbarSearchForm_iconSvgGroup__ZgSSG",se="TopbarSearchForm_icon__gYZqt",ie="TopbarSearchForm_iconSvg__MDG3u",oe=()=>(0,R.jsx)("svg",{className:ie,width:"21",height:"22",viewBox:"0 0 21 22",xmlns:"http://www.w3.org/2000/svg",role:"none",children:(0,R.jsxs)("g",{className:ae,transform:"matrix(-1 0 0 1 20 1)",strokeWidth:"2",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,R.jsx)("path",{d:"M13 14l5.241 5.241"}),(0,R.jsx)("circle",{cx:"7.5",cy:"7.5",r:"7.5"})]})}),re=["onChange"],te=["appConfig","onSubmit","onKeywordChange"],le=e=>e,ce=e=>{const n=e.keywordSearchWrapperClasses,a=e.iconClass,i=e.intl,o=e.isMobile,r=void 0!==o&&o,t=e.inputRef,l=e.onKeywordChange;return(0,R.jsxs)("div",{className:n,children:[(0,R.jsx)("button",{className:ne,"aria-label":i.formatMessage({id:"TopbarDesktop.screenreader.search"}),children:(0,R.jsx)("div",{className:a,children:(0,R.jsx)(oe,{})})}),(0,R.jsx)(q.D0,{name:"keywords",render:e=>{let n=e.input;return(0,R.jsx)("input",(0,s.A)((0,s.A)({className:r?Z:J},n),{},{onChange:e=>{if(n.onChange(e),l){const n=null!==e&&void 0!==e&&e.target?e.target.value:e;l(n)}},id:r?"keyword-search-mobile":"keyword-search","data-testid":r?"keyword-search-mobile":"keyword-search",ref:t,type:"text",placeholder:i.formatMessage({id:"TopbarSearchForm.placeholder"}),autoComplete:"off"}))}})]})},ue=e=>{const n=(0,d.tz)();return(0,R.jsx)("button",(0,s.A)((0,s.A)({className:ne,"aria-label":n.formatMessage({id:"TopbarDesktop.screenreader.search"}),type:"submit"},e),{},{children:(0,R.jsx)(oe,{})}))},de=e=>{const n=e.desktopInputRootClass,a=e.intl,i=e.isMobile,o=void 0!==i&&i,r=e.inputRef,t=e.onLocationChange;return(0,R.jsx)(q.D0,{name:"location",format:le,render:e=>{let i=e.input,l=e.meta;const c=i.onChange,u=(0,V.A)(i,re);return(0,R.jsx)(g.eN,{id:o?"location-search-mobile":"location-search",className:o?H:n,iconClassName:o?z:Q,inputClassName:o?Z:J,predictionsClassName:o?Y:$,predictionsAttributionClassName:o?X:null,placeholder:a.formatMessage({id:"TopbarSearchForm.placeholder"}),closeOnBlur:!o,inputRef:r,input:(0,s.A)((0,s.A)({},u),{},{onChange:e=>{c(e),t(e)}}),meta:l,submitButton:ue,ariaLabel:a.formatMessage({id:"TopbarDesktop.screenreader.search"})})}})},pe=e=>{const n=(0,i.useRef)(null),a=(0,d.tz)(),o=e.appConfig,t=e.onSubmit,l=e.onKeywordChange,c=(0,V.A)(e,te),u=e=>{var a;!(0,p.Ej)(o)&&e.selectedPlace&&(t({location:e}),null===n||void 0===n||null===(a=n.current)||void 0===a||a.blur()
1)},m=(0,p.Ej)(o),b=m?e=>{var a;(0,p.Ej)(o)&&(t({keywords:e.keywords}),null===n||void 0===n||null===(a=n.current)||void 0===a||a.blur())}:e=>{(0,p.Ej)(o)||t({location:e.location})};return(0,R.jsx)(q.lV,(0,s.A)((0,s.A)({},c),{},{onSubmit:b,render:e=>{const s=e.rootClassName,i=e.className,o=e.desktopInputRoot,t=e.isMobile,c=void 0!==t&&t,d=e.handleSubmit,p=r()(s,i),b=o||K,_=r()(ee,c?H:b);return(0,R.jsx)(g.lV,{className:p,onSubmit:d,enforcePagePreloadFor:"SearchPage",children:m?(0,R.jsx)(ce,{keywordSearchWrapperClasses:_,iconClass:r()(c?z:Q||se),intl:a,isMobile:c,inputRef:n,onKeywordChange:l}):(0,R.jsx)(de,{desktopInputRootClass:b,intl:a,isMobile:c,inputRef:n,onLocationChange:u})})}}))};var me=a(54225),be=a(1536);const ge={root:"TopbarMobileMenu_root__qrbRx",content:"TopbarMobileMenu_content__jVJpw",accountLinksWrapper:"TopbarMobileMenu_accountLinksWrapper__+i9kc",customLinksWrapper:"TopbarMobileMenu_customLinksWrapper__FYtrM",avatar:"TopbarMobileMenu_avatar__QS-eb",greeting:"TopbarMobileMenu_greeting__-TcjT",logoutButton:"TopbarMobileMenu_logoutButton__0FF18",customLinkFont:"TopbarMobileMenu_customLinkFont__vpqW8",inbox:"TopbarMobileMenu_inbox__icwPk TopbarMobileMenu_customLinkFont__vpqW8",navigationLink:"TopbarMobileMenu_navigationLink__KgTI3 TopbarMobileMenu_customLinkFont__vpqW8",subNavigationLink:"TopbarMobileMenu_subNavigationLink__ce6Fk",customSection:"TopbarMobileMenu_customSection__kekZk",customSectionTitle:"TopbarMobileMenu_customSectionTitle__HMIy6",customSectionBody:"TopbarMobileMenu_customSectionBody__-lgXn",customLinkGroup:"TopbarMobileMenu_customLinkGroup__J20mI",linkContent:"TopbarMobileMenu_linkContent__aPT9c",linkText:"TopbarMobileMenu_linkText__xK1wd",badge:"TopbarMobileMenu_badge__tJCm7",currentPageLink:"TopbarMobileMenu_currentPageLink__3TI-v",notificationBadge:"TopbarMobileMenu_notificationBadge__hdECU",authenticationGreeting:"TopbarMobileMenu_authenticationGreeting__pnkzi h1",signupLink:"TopbarMobileMenu_signupLink__cVbd9",loginLink:"TopbarMobileMenu_loginLink__IUi8e",currentPage:"TopbarMobileMenu_currentPage__b99jE"},_e=e=>{let n=e.item,a=e.currentPage,s=e.className;const i=n.badgeText,o=n.label,t=n.linkConfig,l=t.type,c=t.href,u=t.route,d=r()(s,((e,n)=>{var a,s;const i=n=>0===(null===e||void 0===e?void 0:e.indexOf(n)),o=e===(null===n||void 0===n?void 0:n.name);return t=null===n||void 0===n||null===(a=n.params)||void 0===a?void 0:a.pageId,i("CMSPage")&&e==="CMSPage:".concat(t)||(r=null===n||void 0===n||null===(s=n.params)||void 0===s?void 0:s.tab,i("InboxPage")&&e==="InboxPage:".concat(r))||o?ge.currentPage:null;var r,t})(a,u)),p=(0,R.jsxs)("span",{className:ge.linkContent,children:[(0,R.jsx)("span",{className:ge.linkText,children:o}),i?(0,R.jsx)("span",{className:ge.badge,children:i}):null]});if("internal"===l&&u){const e=u||{},n=e.name,a=e.params,s=e.to;return(0,R.jsx)("li",{className:d,children:(0,R.jsxs)(g.GF,{name:n,params:a,to:s,children:[(0,R.jsx)("span",{className:ge.menuItemBorder}),p]})})}return(0,R.jsx)("li",{className:d,children:(0,R.jsxs)(g.Gr,{href:c,children:[(0,R.jsx)("span",{className:ge.menuItemBorder}),p]})})},he=e=>{let n=e.currentPage,a=e.sections;return(void 0===a?[]:a).map(e=>(0,R.jsxs)("div",{className:ge.customSection,children:[e.label?(0,R.jsx)("div",{className:ge.customSectionTitle,children:e.label}):null,(0,R.jsx)("div",{className:ge.customSectionBody,children:e.items.map(e=>(0,R.jsxs)("div",{className:ge.customLinkGroup,children:[(0,R.jsx)(_e,{item:e,currentPage:n,className:ge.navigationLink}),e.children.map(e=>(0,R.jsx)(_e,{item:e,currentPage:n,className:r()(ge.navigationLink,ge.subNavigationLink)},e.id))]},e.id))})]},e.key))},xe=e=>{const n=e.isAuthenticated,a=e.currentPage,s=e.inboxTab,i=e.currentUser,o=e.notificationCount,t=void 0===o?0:o,l=e.customLinkSections,c=void 0===l?[]:l,u=e.onLogout,p=e.showCreateListingsLink,m=(0,be.vs)(i),b=c.length>0?(0,R.jsx)(he,{currentPage:a,sections:c}):null,_=p?(0,R.jsx)(g.GF,{className:ge.createNewListingLink,name:"NewListingPage",children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.newListingLink"})}):null;if(!n){const e=(0,R.jsx)(g.GF,{name:"SignupPage",className:ge.signupLink,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.signupLink"})}),n=(0,R.jsx)(g.GF,{name:"LoginPage",className:ge.loginLink,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.loginLink"})}),a=(0,R.jsx)("span",{className:ge.authenticationLinks,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.signupOrLogin",values:{lineBreak:(0,R.jsx)("br",{}),signup:e,login:n}})});return(0,R.jsxs)("nav",{className:ge.root,children:[(0,R.jsxs)("div",{className:ge.content,children:[(0,R.jsx)("div",{className:ge.authenticationGreeting,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.unauthorizedGreeting",values:{lineBreak:(0,R.jsx)("br",{}),signupOrLogin:a}})}),(0,R.jsx)("ul",{className:ge.customLinksWrapper,children:b}),(0,R.jsx)("div",{className:ge.spacer})]}),(0,R.jsx)("div",{className:ge.footer,children:_})]})}const h=t>0?(0,R.jsx)(g.vd,{className:ge.notificationBadge,count:t}):null,x=m.attributes.profile.firstName,k=e=>{const n="AccountSettingsPage"===e&&me.p.includes(a),s=0===(null===a||void 0===a?void 0:a.indexOf("InboxPage"))&&0===(null===e||void 0===e?void 0:e.indexOf("InboxPage"));return a===e||n||s?ge.currentPage:null},L=p?(0,R.jsx)("li",{className:r()(ge.navigationLink,k("ManageListingsPage")),children:(0,R.jsx)(g.GF,{name:"ManageListingsPage",children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.yourListingsLink"})})}):null;return(0,R.jsxs)("div",{className:ge.root,children:[(0,R.jsx)(g.VF,{className:ge.avatar,user:i}),(0,R.jsxs)("div",{className:ge.content,children:[(0,R.jsx)("span",{className:ge.greeting,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.greeting",values:{displayName:x}})}),(0,R.jsx)(g.bG,{rootClassName:ge.logoutButton,onClick:u,children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.logoutLink"})}),(0,R.jsxs)("ul",{className:ge.accountLinksWrapper,children:[(0,R.jsx)("li",{className:r()(ge.inbox,k("InboxPage:".concat(s))),children:(0,R.jsxs)(g.GF,{name:"InboxPage",params:{tab:s},children:[(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.inboxLink"}),h]})}),(0,R.jsx)("li",{className:r()(ge.inbox,k("FavoriteListingsPage")),children:(0,R.jsx)(g.GF,{name:"FavoriteListingsPage",children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.favoriteListingsLink"})})}),L,(0,R.jsx)("li",{className:r()(ge.navigationLink,k("ProfileSettingsPage")),children:(0,R.jsx)(g.GF,{name:"ProfileSettingsPage",children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.profileSettingsLink"})})}),(0,R.jsx)("li",{className:r()(ge.navigationLink,k("AccountSettingsPage")),children:(0,R.jsx)(g.GF,{name:"AccountSettingsPage",children:(0,R.jsx)(d.sA,{id:"TopbarMobileMenu.accountSettingsLink"})})})]}),(0,R.jsx)("ul",{className:ge.customLinksWrapper,children:b}),(0,R.jsx)("div",{className:ge.spacer})]}),(0,R.jsx)("div",{className:ge.footer,children:_})]})};var ke=a(5544);const Le={currentPage:"LinksMenu_currentPage__Tn3JB",menuItemBorder:"LinksMenu_menuItemBorder__pPqY7",linkMenuLabelWrapper:"LinksMenu_linkMenuLabelWrapper__YxJUq",linkMenuLabel:"LinksMenu_linkMenuLabel__jMJTj",linkMenuIsOpen:"LinksMenu_linkMenuIsOpen__KQAWN",arrowIcon:"LinksMenu_arrowIcon__7Dsco",linkMenuContent:"LinksMenu_linkMenuContent__7LfZi",sectionHeaderItem:"LinksMenu_sectionHeaderItem__PJjoA",sectionHeaderItemWithDivider:"LinksMenu_sectionHeaderItemWithDivider__0W-5F",sectionLabel:"LinksMenu_sectionLabel__PVLS-",menuLink:"LinksMenu_menuLink__6ImMz marketplaceDefaultFontStyles",submenuLink:"LinksMenu_submenuLink__MwkeS",linkContent:"LinksMenu_linkContent__UJCFK",linkText:"LinksMenu_linkText__+qs4a",badge:"LinksMenu_badge__bp7zZ"},je=e=>{let n=e.item,a=e.currentPage,s=e.className,i=e.onClick;const o=n.badgeText,t=n.label,l=n.linkConfig,c=l.type,u=l.href,d=l.route,p=r()(s,((e,n)=>{var a,s;const i=n=>0===(null===e||void 0===e?void 0:e.indexOf(n)),o=e===(null===n||void 0===n?void 0:n.name);return t=null===n||void 0===n||null===(a=n.params)||void 0===a?void 0:a.pageId,i("CMSPage")&&e==="CMSPage:".concat(t)||(r=null===n||void 0===n||null===(s=n.params)||void 0===s?void 0:s.tab,i("InboxPage")&&e==="InboxPage:".concat(r))||o?Le.currentPage:null;var r,t})(a,d)),m=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("span",{className:Le.menuItemBorder}),(0,R.jsxs)("span",{className:Le.linkContent,children:[(0,R.jsx)("span",{className:Le.linkText,children:t}),o?(0,R.jsx)("span",{className:Le.badge,children:o}):null]})]});if("internal"===c&&d){const e=d||{},n=e.name,a=e.params,s=e.to;return(0,R.jsx)("div",{onClick:i,children:(0,R.jsx)(g.GF,{name:n,params:a,to:s,className:p,children:m})})}return(0,R.jsx)("div",{onClick:i,children:(0,R.jsx)(g.Gr,{href:u,className:p,children:m})})},ve=()=>(0,R.jsx)("span",{className:Le.linkMenuLabelWrapper,children:(0,R.jsx)(O,{className:Le.menuIcon})}),Me=e=>{const n=(0,i.useState)(!1),a=(0,ke.A)(n,2),s=a[0],o=a[1],t=e.id,l=e.currentPage,c=e.sections,u=((e,n,a)=>e.flatMap((e,s)=>{const i=[];e.label&&i.push((0,R.jsx)(g.Dr,{className:r()(Le.sectionHeaderItem,{[Le.sectionHeaderItemWithDivider]:s>0}),children:(0,R.jsx)("div",{className:Le.sectionLabel,children:e.label})},"section-".concat(e.key)));const o=e.items.flatMap(e=>[(0,R.jsx)(g.Dr,{children:(0,R.jsx)(je,{item:e,currentPage:n,className:Le.menuLink,onClick:a})},e.id),...e.children.map(e=>(0,R.jsx)(g.Dr,{children:(0,R.jsx)(je,{item:e,currentPage:n,className:r()(Le.menuLink,Le.submenuLink),onClick:a})},e.id))]);return[...i,...o]}))(void 0===c?[]:c,l,()=>o(!1));return(0,R.jsxs)(g.W1,{id:t,contentPlacementOffset:0,contentPosition:"right",isOpen:s,onToggleActive:o,skipFocusOnNavigation:!0,children:[(0,R.jsx)(g.Wq,{id:"links-menu-label",className:Le.linkMenuLabel,isOpenClassName:Le.linkMenuIsOpen,children:(0,R.jsx)(ve,{})}),(0,R.jsx)(g.rm,{className:Le.linkMenuContent,children:u})]})},Te="CustomLinksMenu_customLinksMenu__3IuWL",fe=e=>{let n=e.currentPage,a=e.customLinkSections,s=void 0===a?[]:a;return e.hasClientSideContentReady&&0!==s.length?(0,R.jsx)("div",{className:Te,children:(0,R.jsx)(Me,{id:"linksMenu",currentPage:n,sections:s})}):null},Ne="TopbarDesktop_root__73jS8",Se="TopbarDesktop_logoLink__TNZZh",Ce="TopbarDesktop_searchLink__2RMPA",Pe="TopbarDesktop_takeAvailableSpace__q1wgo",ye="TopbarDesktop_topbarSearchWithLeftPadding__cqF9w",Ae="TopbarDesktop_topbarLink__NPYsn",we="TopbarDesktop_topbarLinkLabel__sRlcP marketplaceDefaultFontStyles",Ie="TopbarDesktop_notificationDot__a+kv3",Fe="TopbarDesktop_profileMenuLabel__5K1AS",De="TopbarDesktop_profileMenuIsOpen__RCBVE",Ee="TopbarDesktop_avatar__zWMDy",Be="TopbarDesktop_profileMenuContent__XE30R",Ge="TopbarDesktop_menuItemBorder__4g3XG",We="TopbarDesktop_menuLink__FTX9K marketplaceDefaultFontStyles",Re="TopbarDesktop_logoutButton__e5cEG",Oe="TopbarDesktop_currentPage__QrbBN",Ue="TopbarDesktop_leftContainer__tHtnb",Ve="TopbarDesktop_rightContainer__ktPNr",qe=()=>(0,R.jsx)(g.GF,{id:"signup-link",name:"SignupPage",className:Ae,children:(0,R.jsx)("span",{className:we,children:(0,R.jsx)(d.sA,{id:"TopbarDesktop.signup"})})}),He=()=>(0,R.jsx)(g.GF,{id:"login-link",name:"LoginPage",className:Ae,children:(0,R.jsx)("span",{className:we,children:(0,R.jsx)(d.sA,{id:"TopbarDesktop.login"})})}),Ke=e=>{let n=e.notificationCount,a=e.inboxTab;const s=n>0?(0,R.jsx)("div",{className:Ie}):null;return(0,R.jsx)(g.GF,{id:"inbox-link",className:Ae,name:"InboxPage",params:{tab:a},children:(0,R.jsxs)("span",{className:we,children:[(0,R.jsx)(d.sA,{id:"TopbarDesktop.inbox"}),s]})})},ze=e=>{let n=e.currentPage,a=e.currentUser,s=e.onLogout,i=e.showManageListingsLink,o=e.intl;const t=e=>{const a="AccountSettingsPage"===e&&me.p.includes(n);return n===e||a?Oe:null};return(0,R.jsxs)(g.W1,{skipFocusOnNavigation:!0,children:[(0,R.jsx)(g.Wq,{id:"profile-menu-label",className:Fe,isOpenClassName:De,ariaLabel:o.formatMessage({id:"TopbarDesktop.screenreader.profileMenu"}),children:(0,R.jsx)(g.eu,{className:Ee,user:a,disableProfileLink:!0})}),(0,R.jsxs)(g.rm,{className:Be,children:[(0,R.jsx)(g.Dr,{children:(0,R.jsxs)(g.GF,{className:r()(We,t("FavoriteListingsPage")),name:"FavoriteListingsPage",children:[(0,R.jsx)("span",{className:Ge}),(0,R.jsx)(d.sA,{id:"TopbarDesktop.favoriteListingsLink"})]})},"FavoriteListingsPage"),i?(0,R.jsx)(g.Dr,{children:(0,R.jsxs)(g.GF,{className:r()(We,t("ManageListingsPage")),name:"ManageListingsPage",children:[(0,R.jsx)("span",{className:Ge}),(0,R.jsx)(d.sA,{id:"TopbarDesktop.yourListingsLink"})]})},"ManageListingsPage"):null,(0,R.jsx)(g.Dr,{children:(0,R.jsxs)(g.GF,{className:r()(We,t("ProfileSettingsPage")),name:"ProfileSettingsPage",children:[(0,R.jsx)("span",{className:Ge}),(0,R.jsx)(d.sA,{id:"TopbarDesktop.profileSettingsLink"})]})},"ProfileSettingsPage"),(0,R.jsx)(g.Dr,{children:(0,R.jsxs)(g.GF,{className:r()(We,t("AccountSettingsPage")),name:"AccountSettingsPage",children:[(0,R.jsx)("span",{className:Ge}),(0,R.jsx)(d.sA,{id:"TopbarDesktop.accountSettingsLink"})]})},"AccountSettingsPage"),(0,R.jsx)(g.Dr,{children:(0,R.jsxs)(g.bG,{rootClassName:Re,onClick:s,children:[(0,R.jsx)("span",{className:Ge}),(0,R.jsx)(d.sA,{id:"TopbarDesktop.logout"})]})},"logout")]})]})},Ze=e=>{var n;const a=e.className,s=e.config,o=e.customLinkSections,t=e.currentUser,l=e.currentPage,c=e.rootClassName,u=e.notificationCount,d=void 0===u?0:u,p=e.intl,m=e.isAuthenticated,b=e.onLogout,_=e.onSearchSubmit,h=e.initialSearchFormValues,x=void 0===h?{}:h,k=e.showSearchForm,L=e.showCreateListingsLink,j=e.inboxTab,v=(0,i.useState)(!1),M=(0,ke.A)(v,2),T=M[0],f=M[1];(0,i.useEffect)(()=>{f(!0)},[]);const N=s.marketplaceName,S=T&&m,C=m||!T,P=null==o||0===(null===o||void 0===o?void 0:o.length),y=r()(c||Ne,a),A=S?(0,R.jsx)(Ke,{notificationCount:d,inboxTab:j}):null,w=S?(0,R.jsx)(ze,{currentPage:l,currentUser:t,onLogout:b,showManageListingsLink:L,intl:p}):null,I=C?null:(0,R.jsx)(qe,{}),F=C?null:(0,R.jsx)(He,{}),D=k?(0,R.jsx)(pe,{className:r()(Ce,{[Pe]:P}),desktopInputRoot:ye,onSubmit:_,initialValues:x,appConfig:s}):null;return(0,R.jsxs)("nav",{className:y,"aria-label":p.formatMessage({id:"TopbarDesktop.screenreader.topbarNavigation"}),children:[(0,R.jsx)("div",{className:Ue,children:(0,R.jsx)(fe,{currentPage:l,customLinkSections:o,hasClientSideContentReady:S||!C})}),(0,R.jsx)(g.lh,{id:"logo-topbar-desktop",className:Se,layout:"desktop",alt:p.formatMessage({id:"TopbarDesktop.logo"},{marketplaceName:N}),linkToExternalSite:null===s||void 0===s||null===(n=s.topbar)||void 0===n?void 0:n.logoLink}),D,(0,R.jsxs)("div",{className:Ve,children:[A,w,I,F]})]})};var Qe=a(43145),Je=a(96369);var Ye=a(27800),Xe=a(76562);function $e(e){return(0,Je.A)(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,Ye.A)(e)||(0,Xe.A)()}const en=/^\[section\](?:\s*\|\s*)?/i,nn=/^\[sublink\](?:\s*\|\s*)?/i,an=e=>{if("string"!==typeof e)return null;const n=e.trim();return n.length>0?n:null},sn=e=>e||"__default__",on=e=>({entryType:"link",sectionLabel:e.sectionLabel,mainLabel:e.mainLabel,subLabel:e.subLabel,badgeText:e.badgeText,displayLabel:e.displayLabel,isStructured:e.isStructured}),rn=e=>({id:e.id,label:e.label,badgeText:e.badgeText,linkConfig:e.linkConfig,children:[]}),tn=e=>{const n=Array.isArray(e)?e:[],a=[],s=new Map,i=new Map;let o=null,r=null;
1return n.forEach((e,n)=>{const t=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=n.currentSectionLabel,s=void 0===a?null:a,i=n.currentMainLabel,o=void 0===i?null:i,r="string"===typeof e?e.trim():"";if(en.test(r))return{entryType:"section",sectionLabel:an(r.replace(en,"")),mainLabel:null,subLabel:null,badgeText:null,displayLabel:null,isStructured:!1};if(nn.test(r)){const e=$e(r.replace(nn,"").split("|").map(an)),n=e[0],a=(0,Qe.A)(e).slice(1),i=an(a.join(" | "));return on({sectionLabel:s,mainLabel:o,subLabel:n,badgeText:i,displayLabel:n,isStructured:!0})}if(!r.includes("|"))return on({sectionLabel:s,mainLabel:r,subLabel:null,badgeText:null,displayLabel:r,isStructured:!1});const t=$e(r.split("|").map(an)),l=t[0],c=(0,Qe.A)(t).slice(1),u=an(c.join(" | "));return on({sectionLabel:s,mainLabel:l,subLabel:null,badgeText:u,displayLabel:l||r,isStructured:!0})}(e.text,{currentSectionLabel:o,currentMainLabel:r});if("section"===t.entryType)return o=t.sectionLabel,void(r=null);if(!t.displayLabel)return;const l=((e,n,a)=>{const s=sn(a),i=n.get(s);if(i)return i;const o={key:s,label:a,items:[]};return n.set(s,o),e.push(o),o})(a,s,t.sectionLabel),c=sn(t.sectionLabel),u=t.mainLabel?"".concat(c,":").concat(t.mainLabel):null,d=rn({id:"topbar-link-".concat(n),label:t.displayLabel,badgeText:t.badgeText,linkConfig:e});if(t.subLabel&&u&&i.has(u))return r=t.mainLabel,void i.get(u).children.push(d);const p=rn({id:"topbar-link-".concat(n),label:t.subLabel?t.displayLabel:t.mainLabel||t.displayLabel,badgeText:t.badgeText,linkConfig:e});l.items.push(p),t.mainLabel&&(r=t.mainLabel),!t.subLabel&&u&&i.set(u,p)}),a.filter(e=>e.items.length>0)};var ln=a(29042);const cn="always",un="mobileMenuButton",dn="mobileSearchButton",pn=(e,n,a)=>{const i=n.pathname,o=n.search,r=n.state,t="?".concat((0,m.As)((0,s.A)({[a]:"open"},(0,m.qg)(o))));e.push("".concat(i).concat(t),r)},mn=(e,n,a)=>{const s=n.pathname,i=n.search,o=n.state,r=(0,u.fN)((0,m.qg)(i),(e,n)=>n!==a),t=(0,m.As)(r),l=t?"?".concat(t):"";e.push("".concat(s).concat(l),o)},bn=e=>{const n=e.show,a=r()(E,{[B]:n});return n?(0,R.jsx)("div",{className:a,role:"alert",children:(0,R.jsx)("div",{className:G,children:(0,R.jsx)("p",{className:W,children:(0,R.jsx)(d.sA,{id:"Topbar.genericError"})})})}):null},gn=e=>{var n,a,o,l,c;const u=e.className,S=e.rootClassName,C=e.desktopClassName,E=e.mobileRootClassName,B=e.mobileClassName,G=e.isAuthenticated,W=e.isLoggedInAs,V=e.authScopes,q=void 0===V?[]:V,H=e.authInProgress,K=e.currentUser,z=e.currentUserHasListings,Z=e.currentUserHasOrders,Q=e.currentPage,J=e.notificationCount,Y=void 0===J?0:J,X=e.intl,$=e.history,ee=e.location,ne=e.onManageDisableScrolling,ae=e.onResendVerificationEmail,se=e.sendVerificationEmailInProgress,ie=e.sendVerificationEmailError,oe=e.showGenericError,re=e.config,te=e.routeConfiguration,le=n=>{const a=e.currentSearchParams,i=e.history,o=e.location,r=e.config,t=e.routeConfiguration,l=(0,s.A)((0,s.A)({},a),(()=>{if((0,p.Ej)(r))return{keywords:null===n||void 0===n?void 0:n.keywords};const e=(null===n||void 0===n?void 0:n.location)||{},a=e.search,i=e.selectedPlace||{},o=i.origin,t=i.bounds,l=(0,p.fC)(r)?{origin:o}:{};return(0,s.A)((0,s.A)({},l),{},{address:a,bounds:t})})()),c=(0,_.RK)(t,o),u=c.routeName,d=c.pathParams;i.push((0,b.__)(u,t,d,l))},ce=()=>{const n=e.onLogout,a=e.history,s=e.routeConfiguration;n().then(()=>{const e=(0,b.pL)("LandingPage",s);t.A.dev?a.push(e):"undefined"!==typeof window&&(window.location=e),console.log("logged out")})},ue=(0,ln.yw)(re,K),de=(0,ln.y6)(re,K),me=de.customer,be=de.provider,ge=me?be&&z?"sales":"orders":"sales",_e=(0,m.qg)(ee.search,{latlng:["origin"],latlngBounds:["bounds"]}),he=_e.mobilemenu,ke=_e.mobilesearch,Le=_e.keywords,je=_e.address,ve=_e.origin,Me=_e.bounds,Te=i.useRef(Le);i.useEffect(()=>{Te.current=Le},[Le]);const fe=(e=>[...Array.isArray(e)?e:[]])(null===(n=re.topbar)||void 0===n?void 0:n.customLinks),Ne=((e,n)=>(Array.isArray(e)?e:[]).map(e=>
1{const a=e.type,i=e.href,o="string"===typeof i?i:"";if(o&&("internal"===a||"/"===o.charAt(0)))try{const a=new URL("http://my.marketplace.com"+o),i=(0,b.WN)(a.pathname,n);if(i.length>0){var r;const n=i[0],o={search:a.search,hash:a.hash};return(0,s.A)((0,s.A)({},e),{},{route:{name:null===(r=n.route)||void 0===r?void 0:r.name,params:n.params,to:o}})}}catch(t){return e}return e}))(fe,te),Se=tn(Ne),Ce=Q||((e,n)=>{const a=(0,b.WN)(e.pathname,n);if(a.length>0){var s;const e=a[0],n=(e=>{var n,a;return"CMSPage"===(null===(n=e.route)||void 0===n?void 0:n.name)?"CMSPage:".concat(null===(a=e.params)||void 0===a?void 0:a.pageId):null})(e),i=(e=>{var n,a;return"InboxPage"===(null===(n=e.route)||void 0===n?void 0:n.name)?"InboxPage:".concat(null===(a=e.params)||void 0===a?void 0:a.tab):null})(e);return n||i||"".concat(null===(s=e.route)||void 0===s?void 0:s.name)}})(ee,te),Pe=Y>0?(0,R.jsx)("div",{className:f}):null,ye=!("undefined"!==typeof window&&(null===(a=window)||void 0===a?void 0:a.matchMedia))||(null===(o=window.matchMedia("(max-width: ".concat(1024,"px)")))||void 0===o?void 0:o.matches),Ae=ye&&"open"===he,we=ye&&"open"===ke,Ie=(0,R.jsx)(xe,{isAuthenticated:G,currentUser:K,onLogout:ce,notificationCount:Y,currentPage:Ce,customLinks:Ne,showCreateListingsLink:ue,inboxTab:ge,customLinkSections:Se}),Fe=(()=>{if((0,p.Ej)(re))return{keywords:Le};return{location:((0,p.fC)(re)?je&&ve&&Me:je&&Me)?{search:je,selectedPlace:{address:je,origin:ve,bounds:Me}}:null}})(),De=r()(S||h,u),Ee=((null===re||void 0===re||null===(l=re.topbar)||void 0===l?void 0:l.searchBar)||{}).display,Be=void 0===Ee?cn:Ee,Ge=Be===cn,We="onlySearchPage"===Be&&["SearchPage","SearchPageWithListingType"].includes(Ce),Re=Ge||We||"notLandingPage"===Be&&"LandingPage"!==Ce,Oe=Re?(0,R.jsx)(g.$n,{id:dn,rootClassName:v,onClick:()=>pn($,ee,"mobilesearch"),title:X.formatMessage({id:"Topbar.searchIcon"}),children:(0,R.jsx)(U,{className:T,ariaLabel:X.formatMessage({id:"Topbar.searchIcon"})})}):(0,R.jsx)("div",{className:v});return(0,R.jsxs)("div",{className:De,children:[(0,R.jsxs)(g.$n,{onClick:e=>{e.preventDefault();const n=document.getElementById("main-content");n&&(n.scrollIntoView({behavior:"smooth",block:"start"}),n.setAttribute("tabindex","-1"),n.focus(),n.addEventListener("blur",()=>{n.removeAttribute("tabindex")},{once:!0}))},className:x,children:[(0,R.jsx)(d.sA,{id:"Topbar.skipToMainContent"}),(0,R.jsx)(g.N1,{direction:"right",size:"small",rootClassName:k})]}),(0,R.jsx)(g.R6,{isAuthenticated:G,isLoggedInAs:W,authScopes:q,currentUser:K,onLogout:ce,currentPage:Ce}),(0,R.jsxs)("nav",{className:r()(E||L,B),children:[(0,R.jsxs)(g.$n,{id:un,rootClassName:j,onClick:()=>pn($,ee,"mobilemenu"),title:X.formatMessage({id:"Topbar.menuIcon"}),children:[(0,R.jsx)(O,{className:M,ariaLabel:X.formatMessage({id:"Topbar.menuIcon"})}),Pe]}),(0,R.jsx)(g.lh,{id:"logo-topbar-mobile",layout:"mobile",alt:X.formatMessage({id:"Topbar.logoIcon"}),linkToExternalSite:null===re||void 0===re||null===(c=re.topbar)||void 0===c?void 0:c.logoLink}),Oe]}),(0,R.jsx)("div",{className:N,children:(0,R.jsx)(Ze,{className:C,currentUserHasListings:z,currentUser:K,currentPage:Ce,initialSearchFormValues:Fe,intl:X,isAuthenticated:G,notificationCount:Y,onLogout:ce,onSearchSubmit:le,config:re,customLinkSections:Se,showSearchForm:Re,showCreateListingsLink:ue,inboxTab:ge})}),(0,R.jsx)(g.aF,{id:"TopbarMobileMenu",className:A,scrollLayerClassName:w,containerClassName:I,isOpen:Ae,onClose:()=>mn($,ee,"mobilemenu"),usePortal:!0,onManageDisableScrolling:ne,focusElementId:un,children:H?null:Ie}),(0,R.jsx)(g.aF,{id:"TopbarMobileSearch",containerClassName:F,isOpen:we,onClose:()=>{if(!(0,p.Ej)(re))return void mn($,ee,"mobilesearch");const e=Le||"";(Te.current||"")!==e?le({keywords:Te.current}):mn($,ee,"mobilesearch")},usePortal:!0,onManageDisableScrolling:ne,focusElementId:dn,children:(0,R.jsxs)("div",{className:P,children:[(0,R.jsx)(pe,{onSubmit:le,initialValues:Fe,isMobile:!0,appConfig:re,onKeywordChange:e=>{Te.current=e}}),(0,R.jsx)("p",{className:y,children:(0,R.jsx)(d.sA,{id:"Topbar.mobileSearchHelp"})})]})}),(0,R.jsx)(g.iM,{id:"MissingInformationReminder",containerClassName:D,currentUser:K,currentUserHasListings:z,currentUserHasOrders:Z,location:ee,onManageDisableScrolling:ne,onResendVerificationEmail
1:ae,sendVerificationEmailInProgress:se,sendVerificationEmailError:ie}),(0,R.jsx)(bn,{show:oe})]})},_n=e=>{const n=(0,l._r)(),a=(0,c.Z6)(),i=(0,d.tz)();return(0,R.jsx)(gn,(0,s.A)({config:n,routeConfiguration:a,intl:i},e))}}}]);
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.