(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[86,608],{"0K1N":function(e,t,n){t.a=e=>`//connect.facebook.net/${(e=>{const t=e.replace(/-/g,"_");if(t.startsWith("es"))return"es_LA";if(t.startsWith("ar"))return"ar_AR";switch(t){case"de":return"de_DE";case"fr":return"fr_FR";case"it":return"it_IT";case"ja":return"ja_JP";case"nl":return"nl_NL";case"tr":return"tr_TR";case"en_AU":return"en_US";default:return t}})(e)}/sdk.js`},"2hay":function(e,t,n){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return u})),n.d(t,"i",(function(){return b})),n.d(t,"h",(function(){return h})),n.d(t,"c",(function(){return f}));var i=n("0K1N"),o=n("37no");const r="274266067164",s=["picture.type(large)","id","first_name","last_name","email","gender","birthday"],a=["public_profile","email","user_birthday","user_friends"],c=()=>{"undefined"!=typeof window&&window.FB&&window.FB.init({appId:r,status:!0,xfbml:!0,version:"v2.7"})},l=e=>Object(o.c)(Object(i.a)(e),o.a.FACEBOOK).then(c),d=()=>new Promise(e=>{"undefined"!=typeof window&&window.FB&&window.FB.getLoginStatus(e)}),u=(e,t={},n)=>new Promise((i,o)=>{if("connected"===e.status){n&&n("success");const{authResponse:{userID:o,accessToken:r}}=e,a={facebook_id:o,facebook_token:r,facebook_autologin:t.autologin||!1},c="/me?fields="+s.join(",");window.FB.api(c,e=>{i({creds:a,data:{...e,...a,...e.picture&&!e.picture.data.is_silhouette?{image_url:e.picture.data.url}:{}}})})}else{const t=e.status||"unknown";n&&n("failure."+t),o({status:t})}}),b=(e,t)=>{const n=e.data;e.isTrusted&&"string"==typeof n&&0===n.indexOf("_FB_")&&-1!==n.indexOf("type=login_button_dialog_open")&&t&&t("facebook_connect.login_button_dialog_open")},h=()=>new Promise(e=>{window.FB.login(e,{scope:a.join(",")})}).then(u),f=e=>new Promise((t,n)=>{window.FB.api("/me/permissions",i=>{const o=i.data;if(o){const n=o.find(t=>t.permission===e&&"granted"===t.status);return t({hasPerm:!!n})}return n(Error("Failed to call facebook to get permission"))})})},"2oSX":function(e,t,n){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"g",(function(){return b}));var i=n("8ThB"),o=n("28DW");let r;const s=()=>{const e=r.getState().session;if(!e.isMobile&&!e.isTablet)return"desktop";switch(e.userAgentPlatform){case"ios":return"iphone";case"android":return e.isTablet?"android_tablet":"android";case"ipad":return"ipad";default:return"mobile_other"}},a=(e,t)=>{const n=4===t?3456:3455;return e===i.b?n:3050},c=({action:e,type:t,isCrossDomain:n,isMultipleAccounts:i,trigger:r})=>{Object(o.l)(`new_mweb_${e}.${s()}${i?".multipleAccounts":""}`,{referrer:Object(o.d)(),type:t,cctld:n}),Object(o.a)(`mweb_${e}.${s()}.${Object(o.d)()}.${t}${n?".cctld":""}${i?".multipleAccounts":""}`),Object(o.g)({action:e,event:"success",type:t,trigger:r})},l=({action:e,type:t,error:n,isCrossDomain:i,isMultipleAccounts:r,trigger:a})=>{const c=r?".multipleAccounts":"",l=i?".cctld":"",d={type:t};Object(o.l)(`new_mweb_${e}_error.${s()}${c}${l}`,d),Object(o.k)(`mweb_${e}_error.${s()}.${Object(o.d)()}.${t}${l}${c}`,{error:n}),Object(o.g)({action:e,event:"fail",type:t,trigger:a})},d=({action:e,placement:t,isAuthenticated:n})=>{Object(o.a)(`mweb_${e}.${String(t)}.is_auth_${String(n)}`)},u=e=>{r=e},b=e=>{Object(o.a)(e)}},"37no":function(e,t,n){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a}));var i=n("7w6Q");const o=.01,r=Object.freeze({OTHER:0,FACEBOOK:1,GPLUS_ONE:2,GSI:3});function s(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const i=document.createElement("script");i.src=e,i.async=!0,i.addEventListener("load",t),i.addEventListener("error",n),document.getElementsByTagName("head")[0].appendChild(i)})}function a(e,t=r.OTHER,n=!1){const s=n?"web":"mweb";return new Promise((n,a)=>{if(document.querySelector(`script[src="${e}"]`)){let e=0;if(t===r.GPLUS_ONE)if(window.gapi)n();else{const t=setInterval(()=>{window.gapi||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${s}.loadScript.gplus_one.tries_${e}`,o))},100)}else if(t===r.FACEBOOK)if(window.FB)n();else{const t=setInterval(()=>{window.FB||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${s}.loadScript.facebook.tries_${e}`,o))},100)}else if(t===r.GSI)if(window.google)n();else{const t=setInterval(()=>{window.google||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${s}.loadScript.gsi.tries_${e}`,o))},100)}else n()}else{const t=document.createElement("script");t.src=e,t.async=!0,t.addEventListener("load",n),t.addEventListener("error",a),document.getElementsByTagName("head")[0].appendChild(t)}})}},"3LYl":function(e,t,n){n.d(t,"a",(function(){return s}));var i=n("Lfjc"),o=n("pLLR"),r=n("nKUr");function s(e){const{fullPath:t,isAuthenticated:n,origin:s}=Object(o.d)(),{user:a}=e;return n?null:Object(r.jsx)(i.a,{type:"application/ld+json",value:(()=>{const e={"@context":"http://schema.org/","@type":"Person",name:a.full_name||a.username,mainEntityOfPage:{"@type":"ProfilePage","@id":t?`${s}${t}`:`${s}/${a.username}/`}};return a.image_xlarge_url&&(e.image={"@type":"ImageObject",contentUrl:a.image_xlarge_url}),a.location&&(e.address={"@type":"PostalAddress",addressLocality:a.location}),a.about&&(e.description=a.about),a.domain_url&&(e.url=a.domain_url),e})()})}},"8ThB":function(e,t,n){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const i=0,o=1},H5qz:function(e,t,n){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var i=n("q1tI"),o=n("DzJC"),r=n.n(o),s=n("1dBE"),a=n("nKUr");const{Provider:c,Consumer:l,useHook:d}=Object(s.c)("HeaderShadow");function u({children:e}){const[t,n]=Object(i.useState)(!1),[o,s]=Object(i.useState)(!1),[l,d]=Object(i.useState)(0),[u,b]=Object(i.useState)(null),h=r()(()=>{t&&(s(window.scrollY>0),d(window.scrollY))},50);return Object(i.useEffect)(()=>(n(!0),()=>{n(!1)}),[]),Object(i.useEffect)(()=>(window.addEventListener("scroll",h),()=>{window.removeEventListener("scroll",h)}),[t]),Object(a.jsx)(c,{value:{currentScrollPosition:l,isScrolled:o,setSubheaderShadow:b,subheaderShadow:u},children:e})}},Lfjc:function(e,t,n){n.d(t,"a",(function(){return s}));const i={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},o=/[&><\u2028\u2029]/g;var r=n("nKUr");function s({id:e,type:t="application/json",value:n}){const s=JSON.stringify(n).replace(o,e=>i[e]);return Object(r.jsx)("script",{id:e,type:t,dangerouslySetInnerHTML:{__html:s}})}},MCFh:function(e,t,n){n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"e",(function(){return u}));var i=n("eOdZ"),o=n("2hay");const r="lastUsedSocialShare",s=[6,10,12,5];function a({invitePath:e,objectType:t,i18n:n,isDesktop:i}){let r=n._("A Pin for you","shareMenu.message.title","Messaging title when sharing a pin to a friend");8===t&&(r=n._("Check out this article on Pinterest!","shareMenu.message.title","Messaging title when sharing a today article to a friend"));const s=`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(e)}`,a=`fb-messenger://share/?link=${encodeURIComponent(e)}&app_id=${o.a}`,c=i?"https://twitter.com/intent/tweet?via=pinterest&url="+encodeURIComponent(e):"twitter://post?message="+encodeURIComponent(e),l=i?"https://web.whatsapp.com/send?text="+encodeURIComponent(e):"whatsapp://send?text="+encodeURIComponent(e),d="line://msg/text/?"+encodeURIComponent(e),u="viber://forward?text="+encodeURIComponent(e);return{emailShareLink:s,messengerShareLink:a,twitterShareLink:c,whatsappShareLink:l,lineShareLink:d,telegramShareLink:"tg://msg?text="+encodeURIComponent(e),viberShareLink:u}}function c(e,t,n,i){e&&window.FB&&window.FB.ui&&window.FB.ui({method:"share",mobile_iframe:!0,href:t},e=>{e&&!e.error_message&&i&&i()})}function l(e,t,n,i){if(!n||!t)return;const o=new t(n,{text:()=>e});o.on("success",e=>{i&&i(e)}),o.on("error",e=>{throw new Error("<ShareMenu /> error: copy command failed")})}async function d(e,t,n){const o=i.d.create("CreateExternalInviteResource",{invite_type:{invite_category:3,invite_object:n,invite_channel:e},object_id:t}),r=await o.callCreate(),{invite_url:s,invite_code:a}=r.resource_response.data;return{inviteCode:a,invitePath:s}}async function u(e,t,n,o){i.d.create("SentExternalInviteCallbackResource",{invite_type:{invite_category:3,invite_object:o,invite_channel:e},invite_code:t,object_id:n}).callCreate()}},NLRm:function(e,t,n){n.d(t,"a",(function(){return r}));var i=n("chZb"),o=n.n(i);const r=(e,t)=>{if(t){let t=e;return/.*?:\/\//.test(e)||(t="http://"+t),t=o()(t),t.host}return e=(e=e.replace(/.*?:\/\//g,"")).replace(/\/$/,"")}},Ofms:function(e,t,n){n.d(t,"a",(function(){return r}));var i=n("n6mq"),o=n("nKUr");function r(e){const{children:t,display:n,id:r}=e;return Object(o.jsx)(i.f,{"data-test-id":r,display:n,children:t})}},Oz7m:function(e,t,n){n.d(t,"a",(function(){return c}));var i=n("q1tI"),o=n("KEt0"),r=n("n6mq"),s=n("nKUr");function a(e){return null!=e}function c({additionalPadding:e,inline:t,items:n}){const c=e?Object(s.jsx)("span",{style:{padding:`0 ${4*e}px`},children:Object(s.jsx)(o.a,{})}):Object(s.jsx)(o.a,{}),l=n.filter(a).reduce((e,t,n)=>[...e,0!==n?c:null,t],[]).filter(a).map((e,t)=>Object(s.jsx)(i.Fragment,{children:e},t));return 0===l.length?null:t?Object(s.jsx)(r.f,{children:l}):Object(s.jsx)(r.u,{alignItems:"center",justifyContent:"start",children:l})}},PaNI:function(e,t,n){n.d(t,"a",(function(){return b}));var i=n("/MKj"),o=n("hLPq"),r=n("28DW"),s=n("yweb"),a=n("isp9"),c=n("2oSX"),l=n("AGnR"),d=n("EC67"),u=n("nKUr");function b({alignIconLeft:e,bgColor:t,color:n,disableRedirect:b=!1,fallbackUrl:h,icon:f="arrow-back",onTouch:p,padding:j,placement:g,shouldUseFallbackUrl:m,size:O="lg",viewParameter:x,viewType:w}){const _=Object(s.c)(),y=Object(d.h)(),v=Object(d.i)(),S=Object(i.useSelector)(e=>e.session.isAuthenticated);return Object(u.jsx)(o.a,{accessibilityLabel:_._("Back","navigation button","navigation button"),bgColor:t,color:n,icon:f,onTouch:()=>{if(Object(c.d)({action:"back_button_click",placement:g,isAuthenticated:S}),w&&x&&Object(l.h)({view_type:w,view_parameter:x,element:34}),p&&p(),!b){const e=Object(a.b)(document.referrer);!e&&(!v.key||v.state&&"redirect"===v.state.referrer||m)&&h?y.replace(h):e?(Object(r.a)("unauth.backButton.sendToDuploNotAmp"),y.replace(e)):v.pathname.includes("/password/reset/")&&v.search&&v.search.includes("?nativeShouldDismiss=true")?y.push("/login/?dismissWebview=true"):y.goBack()}},padding:j||2,size:O,containerStyle:e?{display:"flex",alignItems:"center",marginLeft:"cancel"===f?"-4px":"-8px",width:"48px",height:"48px"}:{}})}},YWST:function(e,t,n){n.d(t,"b",(function(){return r}));var i=n("q1tI");const o=Object(i.createContext)();function r(){return Object(i.useContext)(o)}t.a=o},cj2l:function(e,t,n){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=n("q1tI");const o=e=>e,r=(e,t,n=o)=>o=>{let r,s;return a=>e(a)?(r=r||Object(i.createFactory)(t(o)),r(a)):(s=s||Object(i.createFactory)(n(o)),s(a))},s=e=>t=>{const n=Object(i.createFactory)(t);class o extends i.Component{shouldComponentUpdate(t){return e(this.props,t)}render(){return n(this.props)}}return o}},d6rY:function(e,t,n){n.d(t,"a",(function(){return c}));var i=n("q1tI"),o=n("H5qz"),r=n("n6mq"),s=n("nKUr");const a={boxShadow:"0px 8px 8px -8px rgba(0, 0, 0, 0.1)",transition:"box-shadow 300ms ease-in-out"};function c({children:e,forwardRef:t,position:n="static",shouldShowShadow:c=!1,top:l}){const{currentScrollPosition:d,isScrolled:u,setSubheaderShadow:b}=Object(o.b)();Object(i.useEffect)(()=>(c&&b("contentHeader"),()=>{c&&b(null)}),[c]);let h=!1;"pending"!==l&&(h=null!=l?d>=l:u);const f=Object(s.jsx)(r.f,{ref:t,dangerouslySetInlineStyle:{__style:{position:n,...h&&c&&{...a,zIndex:499}}},children:e});return"sticky"===n?Object(s.jsx)(r.W,{top:0,children:f}):f}},gesy:function(e,t,n){n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return d}));var i=n("yweb"),o=n("n6mq"),r=n("pLLR"),s=n("nKUr");function a(e){return e&&["DE","AT","CH"].includes(e.toUpperCase())}function c(){const{country:e=""}=Object(r.d)();return a(e)}function l(){return Object(i.c)()._("Imprint","impressumText","Text for link to impressum for Germany, Austra, or Switzerland")}function d(e){return Object(s.jsx)(o.cb,{...e,children:l()})}},k1Bv:function(e,t,n){var i=n("yweb"),o=n("n6mq"),r=n("nKUr");t.a=({isInModal:e})=>{const t=Object(i.c)();return Object(r.jsx)(o.f,{position:e?"absolute":"fixed",top:!0,left:!0,dangerouslySetInlineStyle:{__style:{backgroundColor:"rgba(255,255,255, .5)",height:"100%",width:"100%",zIndex:1}},display:"flex",alignItems:"center",justifyContent:"center",children:Object(r.jsx)(o.U,{accessibilityLabel:t._("Loading","Full page loading state","Full page loading state"),show:!0})})}},pcaS:function(e,t,n){n.d(t,"a",(function(){return d}));var i=n("q1tI"),o=n("hLPq"),r=n("yweb"),s=n("AGnR"),a=n("YWST"),c=n("n6mq"),l=n("nKUr");function d({history:e,placeholder:t,query:n="",scope:d,type:u="default",viewParameter:b,viewType:h}){const f=Object(r.c)(),p=Object(a.b)();Object(i.useEffect)(()=>{p&&setTimeout(()=>{p.load(new URL("search.js","file://"))},500)},[]);const j={default:{label:f._("Search","SearchBar.searchTypes.default.label","Search input label"),path:"/search/"},syop:{label:"en"===f.getLocaleData().locale.split("-")[0]?f._("Search your Pins","SearchBar.searchTypes.profile.englishLabel","text for profile search bar"):f._("Search","SearchBar.searchTypes.profile.nonEnglishLabel","text for profile search bar"),path:"/search/me/"}},g=()=>j[u].path,m=n?Object(l.jsxs)(i.Fragment,{children:[Object(l.jsx)(c.u,{alignItems:"center",flex:"grow",justifyContent:"start",children:Object(l.jsx)(c.f,{marginStart:1,overflow:"hidden",children:Object(l.jsx)(c.cb,{inline:!0,lineClamp:1,weight:"bold",children:n})})}),Object(l.jsx)(c.f,{alignItems:"center","data-test-id":"cancelSearch",display:"flex",marginBottom:1,children:Object(l.jsx)(o.a,{accessibilityLabel:f._("Clear search query","SearchBar.clearIconButton.accessibilityLabel","Accessibility label for icon button to clear the current search query"),onTouch:t=>{const n=g();t.stopPropagation(),e.push(n)},icon:"clear",padding:1,size:"md"})})]}):Object(l.jsxs)(i.Fragment,{children:[Object(l.jsx)(c.w,{accessibilityLabel:f._("Search","SearchBar.searchIcon.accessibilityLabel",'Accessibility label for search bar "search" icon'),icon:"search",size:16}),Object(l.jsx)(c.f,{marginStart:2,children:Object(l.jsx)(c.cb,{color:"gray",children:t||j[u].label})})]});return Object(l.jsx)(c.bb,{onTap:()=>(()=>{const t=g();Object(s.h)({component:43,element:227,aux_data:{entered_query:n},view_parameter:b,view_type:h});const i=n?`${t}?rs=typed&q=${encodeURIComponent(n)}&scope=${d||""}`:t;return e.push(i)})(),rounding:2,children:Object(l.jsx)(c.f,{alignItems:"center",borderStyle:"lg",color:"white",dangerouslySetInlineStyle:{__style:{height:48,padding:"13px 16px"}},"data-test-id":"searchBarPlaceholder",display:"flex",flex:"grow",rounding:8,children:m})})}},sOzb:function(e,t,n){const i=new function(){function e(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:n}function t(e,t,i){let c;for(e=i?Math.floor(e/o):e>>1,e+=Math.floor(e/t),c=0;e>(n-r)*s>>1;c+=n)e=Math.floor(e/(n-r));return Math.floor(c+(n-r+1)*e/(e+a))}this.utf16={encode:function(e){for(var t,n=[],i=0,o=e.length;o>i;){if(55296==(63488&(t=e[i++])))throw!0;t>65535&&(t-=65536,n.push(String.fromCharCode(t>>>10&1023|55296)),t=56320|1023&t),n.push(String.fromCharCode(t))}return n.join("")}};var n=36,o=700,r=1,s=26,a=38,c=2147483647;this.decode=function(i,o){let a,l,d,u,b,h,f,p,j,g,m,O,x,w=[],_=[],y=i.length;for(a=128,d=0,u=72,b=i.lastIndexOf("-"),0>b&&(b=0),h=0;b>h;++h){if(o&&(_[w.length]=i.charCodeAt(h)-65<26),i.charCodeAt(h)>=128)throw!0;w.push(i.charCodeAt(h))}for(f=b>0?b+1:0;y>f;){for(p=d,j=1,g=n;;g+=n){if(f>=y)throw!0;if(m=e(i.charCodeAt(f++)),m>=n)throw!0;if(m>Math.floor((c-d)/j))throw!0;if(d+=m*j,O=g>u?u+s>g?g-u:s:r,O>m)break;if(j>Math.floor(c/(n-O)))throw!0;j*=n-O}if(l=w.length+1,u=t(d-p,l,0===p),Math.floor(d/l)>c-a)throw!0;a+=Math.floor(d/l),d%=l,o&&_.splice(d,0,i.charCodeAt(f-1)-65<26),w.splice(d,0,a),d++}if(o)for(d=0,x=w.length;x>d;d++)_[d]&&(w[d]=String.fromCharCode(w[d]).toUpperCase().charCodeAt(0));return this.utf16.encode(w)},this.toUnicode=function(e){for(var t=e.split("."),n=[],o=0;o<t.length;++o){const e=t[o];n.push(e.match(/^xn--/)?i.decode(e.slice(4)):e)}return n.join(".")}};t.a=function(e){try{return i.toUnicode(e)}catch(t){return e}}},vf2D:function(e,t,n){n.d(t,"a",(function(){return Ue})),n.d(t,"b",(function(){return Ae})),n.d(t,"c",(function(){return Le}));var i=n("q1tI"),o=n("/MKj"),r=n("FDmi"),s=n("Lr1Z"),a=n("y6OW"),c=n("yweb"),l=n("qpbZ"),d=n("n6mq"),u=n("nKUr");function b({invite:e,handleInviteResponse:t}){const n=Object(c.c)(),o=Object(a.a)(),{url:r,name:b,image_cover_url:h}=e.board||{},{full_name:f}=e.invited_by_user||{},p=Object(u.jsxs)(i.Fragment,{children:[Object(u.jsx)(d.f,{paddingX:0,marginEnd:2,children:Object(u.jsx)(d.g,{fullWidth:!0,color:"gray",text:n._("Decline","decline board collaborator invite or request","decline board collaborator invite or request"),onClick:()=>t(!1),size:"lg"})}),Object(u.jsx)(d.f,{paddingX:0,children:Object(u.jsx)(d.g,{fullWidth:!0,color:"red",text:n._("Accept","accept board invite","accept board invite"),onClick:()=>t(!0),size:"lg"})})]});return Object(u.jsx)(d.f,{marginTop:6,marginBottom:8,padding:6,rounding:6,borderStyle:"shadow",children:Object(u.jsx)(s.a,{to:r,pressState:"background",children:Object(u.jsxs)(d.f,{display:"flex",direction:"row",marginBottom:0,children:[Object(u.jsx)(d.f,{position:"relative",marginEnd:0,children:Object(u.jsx)(d.D,{width:48,height:48,rounding:2,children:Object(u.jsx)(d.y,{alt:b||"",naturalWidth:40,naturalHeight:40,src:h,fit:"cover"})})}),Object(u.jsxs)(d.f,{display:"flex",flex:"grow",direction:"column",column:6,paddingX:2,children:[Object(u.jsx)(d.cb,{size:"lg",children:Object(l.b)(n._("{{ inviterFullName }} invited you to join the board {{ board }} {{age}}","intro text for invitation on profile page","intro text for invitation on profile page"),{inviterFullName:f,board:Object(u.jsx)(s.a,{inline:!0,to:r,pressState:"background",children:Object(u.jsx)(d.cb,{weight:"bold",children:b})}),age:Object(u.jsx)(d.cb,{inline:!0,color:"gray",children:o(e.created_at,!0)})})}),Object(u.jsx)(d.f,{display:"flex",marginTop:2,children:p})]})]})})})}var h=n("d6rY"),f=n("Ux6P");function p({anchor:e,onDismiss:t,objectId:n,objectType:o,title:r}){return Object(u.jsx)(i.Fragment,{children:Object(u.jsx)(d.A,{children:Object(u.jsx)(d.L,{anchor:e,onDismiss:t,size:"xl",children:Object(u.jsxs)(d.u,{alignItems:"center",direction:"column",gap:4,wrap:!0,width:370,children:[Object(u.jsx)(d.f,{marginTop:4,marginBottom:4,children:Object(u.jsx)(d.cb,{size:"lg",weight:"bold",children:r})}),Object(u.jsx)(d.u,{width:370,children:Object(u.jsx)(f.a,{objectId:n,objectType:o,onDismiss:t})})]})})})})}var j=n("i2lo"),g=n("k1Bv"),m=n("xKh6"),O=n("Bb4+");function x(){const e=Object(c.c)();return Object(u.jsx)(d.f,{display:"inlineBlock",position:"relative",children:Object(u.jsx)(d.w,{accessibilityLabel:e._("Claimed website","profile.ProfileHeader.ClaimedWebsiteMark","Claimed website icon"),color:"darkGray",icon:"globe-checked",inline:!0,size:16})})}var w=n("pTLB");function _({anchor:e,onDismiss:t}){const n=Object(c.c)(),i=Object(w.b)();if(!i)return null;const{showSignupModal:o}=i;return Object(u.jsx)(d.A,{children:Object(u.jsx)(d.L,{anchor:e,onDismiss:t,size:"xl",children:Object(u.jsxs)(d.u,{alignItems:"center",direction:"column",gap:4,wrap:!0,width:370,children:[Object(u.jsx)(d.f,{display:"flex",justifyContent:"center",marginTop:4,marginBottom:4,children:Object(u.jsx)(d.cb,{size:"lg",weight:"bold",children:n._("Profile options","profilePage.profileOptions","Options heading on Modal on a user profile")})}),Object(u.jsx)(d.f,{padding:4,width:370,children:Object(u.jsx)(d.bb,{onTap:({event:e})=>{e.preventDefault(),e.stopPropagation(),o("signup")},children:Object(u.jsx)(d.cb,{size:"lg",weight:"bold",children:n._("Unblock","profile.ProfileActionsContainer.UnbluckButton","Button to unblock user user's profile page")})})})]})})})}var y=n("KEt0"),v=n("Oz7m"),S=n("clxp"),C=n("NwG/"),k=n("S1na");function I({followerCount:e=0,followingCount:t=0,isOwnProfile:n,session:i,type:o}){const r=Object(c.c)(),s=Object(k.a)(),a=s(i.locale,e,{shortform:!0,shortform_maximum_fraction_digits:1}),b=s(i.locale,t,{shortform:!0,shortform_maximum_fraction_digits:1}),h=n?Object(l.b)(r.ngettext("{{ followerCountFormatted }} follower","{{ followerCountFormatted }} followers",e,"ProfilePage.followerCount.ownProfile","number of followers you have"),{followerCountFormatted:a}):Object(l.b)(r.ngettext("{{ followerCountFormatted }} follower","{{ followerCountFormatted }} followers",e,"ProfilePage.followerCount.othersProfile","number of followers another profile has"),{followerCountFormatted:a}),f=n?Object(l.b)(r.ngettext("{{ followingCountFormatted }} following","{{ followingCountFormatted }} following",t,"ProfilePage.followingCount.ownProfile","number of profiles you are following"),{followingCountFormatted:b}):Object(l.b)(r.ngettext("{{ followingCountFormatted }} following","{{ followingCountFormatted }} following",t,"ProfilePage.followingCount.othersProfile","number of other profiles another user is following"),{followingCountFormatted:b});return Object(u.jsx)(d.cb,{color:"darkGray",weight:"bold",children:"followers"===o?h:f})}var P=n("Aa0Q"),B=n("AGnR"),T=n("W2YJ");function U({badges:e,color:t}){const[n,o]=Object(i.useState)(!1);return Object(i.useEffect)(()=>{T.d&&Object(B.e)({event_type:9667,view_type:4,component:13910})}),Object(u.jsxs)(i.Fragment,{children:[Object(u.jsx)(d.u,{alignItems:"center",children:e.map(e=>Object(u.jsx)(d.bb,{onTap:()=>{T.d&&Object(B.e)({event_type:9669,view_type:4,component:13910}),o(!0)},children:Object(u.jsx)(d.cb,{overflow:"noWrap",children:Object(u.jsx)(d.f,{display:"inlineBlock",rounding:1,paddingX:2,paddingY:1,margin:1,dangerouslySetInlineStyle:{__style:Object(T.l)(t)},children:e.label})})},e.label))}),Object(u.jsx)(P.a,{showModal:!!n,setShowModal:o,inspirationalBadges:e,inspirationalBadgesColor:t})]})}var A=n("mp1x");function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class M extends i.PureComponent{constructor(...e){super(...e),L(this,"state",{modalIsOpen:!1}),L(this,"onSubmit",()=>{const{onBlock:e,onBlockCallback:t,user:n}=this.props,{id:i,first_name:o=""}=n;e(i,o,this.props.i18n),this.closeModal(),t&&t()}),L(this,"openModal",()=>{this.setState({modalIsOpen:!0})}),L(this,"closeModal",()=>{this.setState({modalIsOpen:!1})})}render(){const{modalIsOpen:e}=this.state,{i18n:t,user:n}=this.props,{username:i,full_name:o,blocked_by_me:r}=n;return Object(u.jsx)(d.u,{alignItems:"stretch",justifyContent:"start",children:!r&&Object(u.jsxs)(d.f,{children:[Object(u.jsx)(d.bb,{onTap:this.openModal,children:Object(u.jsx)(d.v,{size:"sm",children:t._("Block","BlockButton.Heading.Block","Blocking an user means you won't be able to follow each other or interact with each other's Pins")})}),Object(u.jsxs)(A.a,{isOpen:e,onDismiss:this.closeModal,hideCloseIcon:!0,type:"block_button",children:[Object(u.jsx)(d.f,{paddingY:2,children:Object(u.jsx)(d.v,{accessibilityLevel:1,size:"md",children:Object(l.b)(t._("Block {{ full_name }}?"),{full_name:o})})}),Object(u.jsx)(d.f,{marginBottom:3,children:Object(u.jsx)(d.cb,{children:Object(l.b)(t._("If you block {{full_name}} ({{username}}),\n                            you won’t be able to follow each other\n                            or interact with each other’s Pins."),{full_name:o,username:i})})}),Object(u.jsx)(d.f,{marginBottom:2,children:Object(u.jsx)(d.g,{fullWidth:!0,color:"red",text:t._("Block"),onClick:this.onSubmit})}),Object(u.jsx)(d.g,{fullWidth:!0,color:"gray",text:t._("Cancel"),onClick:this.closeModal})]})]})})}}function E(e){const t=Object(c.c)();return Object(u.jsx)(M,{...e,i18n:t})}var F=n("hLPq");var R=({onBlock:e,onUnblockUser:t,user:n,userBlocked:o})=>{const r=Object(c.c)(),[s,a]=Object(i.useState)(!1),l=()=>a(!1);return Object(u.jsxs)(i.Fragment,{children:[Object(u.jsx)(F.a,{accessibilityLabel:r._("Other actions","profileHeader.actionBar.overflow","Accessibility label for button to open other options modal"),color:"darkGray",icon:"ellipsis",onTouch:()=>a(!0),size:"lg",testId:"icon-ellipsis"}),Object(u.jsx)(A.a,{hideCloseIcon:!0,isOpen:s,onDismiss:l,type:"block_button",children:Object(u.jsxs)(d.f,{paddingX:1,paddingY:5,children:[Object(u.jsx)(d.cb,{children:r._("Profile options","profilePage.profileOptions","Options heading on Modal on a user profile")}),Object(u.jsx)(d.f,{marginBottom:8,marginTop:4,children:o?Object(u.jsx)(d.bb,{onTap:()=>t(n.id),children:Object(u.jsx)(d.v,{size:"sm",children:r._("Unblock","profile.ProfileActionsContainer.UnbluckButton","Button to unblock user user's profile page")})}):Object(u.jsx)(E,{onBlock:e,onBlockCallback:l,user:n})}),Object(u.jsx)(d.u,{alignItems:"stretch",justifyContent:"center",children:Object(u.jsx)(d.g,{color:"gray",onClick:l,size:"lg",text:r._("Close","profilePage.profileOptions.Button.closeModal","accessible label for close button on Modal on a user profile")})})]})})]})},$=n("sOzb"),D=n("Ofms"),z=n("XBgn");function H({hasVerifiedIdentity:e,isVerifiedMerchant:t,name:n,showVerifiedBadge:i,inspirationalBadges:o,inspirationalBadgesColor:r}){return Object(u.jsx)(d.v,{align:"center",overflow:"normal",size:"lg",children:Object(u.jsxs)(d.f,{dangerouslySetInlineStyle:{__style:{WebkitHyphens:"none"}},display:"inlineBlock",children:[n,i&&Object(u.jsx)(d.f,{"data-test-id":t?"verifiedMerchantBadge":"verifiedPinnerBadge",display:"inlineBlock",marginStart:2,children:Object(u.jsx)(z.a,{showVerifiedIdentity:e,isVerifiedMerchant:t,size:"xl",inspirationalBadges:o,inspirationalBadgesColor:r})})]})})}var q=n("OadL"),N=n("NLRm"),W=n("28DW"),K=n("QAzJ");var G=n("EC67"),Y=n("0HhX"),V=n("g6r8"),X=n("5SBu"),J=n("gesy");const Q=e=>{const t=Object(N.a)(e).replace(/^www\./,"");return Object($.a)(t)},Z=({userId:e})=>(Object(Y.b)({name:"VerifiedMerchantResource",options:{userId:e}}),null);function ee({blockUser:e,handleShareClick:t,unblockUser:n,renderShareMenu:a}){const l=Object(c.c)(),b=Object(G.j)(),h=Object(o.useSelector)(e=>e),[f,p]=Object(i.useState)(!1),j="phone"===Object(V.a)(),g=Object(o.useDispatch)(),m=Object(V.b)(),O=Object(i.useRef)(null),w=Object(i.useRef)(null),{session:k}=h,P=k.isAuthenticated,B=Object(q.s)(h)[b.username],{about:A="",blocked_by_me:L=!1,country:M="",explicitly_followed_by_me:E,follower_count:F=0,following_count:$=0,full_name:z,id:N,image_xlarge_url:Y,impressum_url:ee="",interest_following_count:te=0,is_primary_website_verified:ne,is_verified_merchant:ie,username:oe,verified_identity:re,website_url:se,is_inspirational_merchant:ae}=B,{inspirationalBadges:ce,inspirationalBadgesColor:le}=function(e,t){var n;const{anyEnabled:i}=Object(K.b)(T.k),{anyEnabled:r}=Object(K.b)(T.j),s=Object(o.useSelector)(e=>e.verifiedMerchants[t]),a=null==s?void 0:s.inspirational_signal,l=Object(T.p)({areBadgesEnabled:i,country:e,verifiedMerchant:s})?Object(T.o)(s.inspirational_signal):[];return{inspirationalBadges:Object(T.n)(Object(c.c)(),l),inspirationalBadgesColor:r&&(null==a||null===(n=a.inspirational_badge_selection)||void 0===n?void 0:n.badgeColor)||T.b[0]}}(M,N),de=$-te,ue=null==re?void 0:re.verified,be=N===k.userId,he=ue||ie,{anyEnabled:fe}=Object(K.b)(T.k),pe=()=>{P||Object(W.h)("click_profile_url")},je=[];if(se){const e=ne&&!he;je.push(Object(u.jsxs)(i.Fragment,{children:[e&&Object(u.jsx)(d.f,{dangerouslySetInlineStyle:{__style:{bottom:1,display:"inline",marginInlineEnd:2}},"data-test-id":"claimed-website-mark",position:"relative",children:Object(u.jsx)(x,{})}),Object(u.jsx)(s.a,{external:!0,inline:!0,nofollow:!0,onTouch:pe,pressState:"background",to:se,children:Object(u.jsx)(d.cb,{color:"darkGray",inline:!0,lineClamp:1,weight:"bold",children:Q(se)})})]}))}je.push(Object(u.jsx)(d.cb,{inline:!0,children:"@"+oe})),A&&je.push(Object(u.jsx)(d.f,{dangerouslySetInlineStyle:{__style:{display:"inline"}},"data-test-id":"profileAboutText",children:Object(u.jsx)(d.cb,{inline:!0,children:A})})),Object(J.b)(M)&&je.push(Object(u.jsx)(s.a,{external:!0,inline:!0,pressState:"background",to:ee,children:Object(u.jsx)(J.a,{color:"darkGray",size:"md",weight:"bold"})}));const ge=Object(u.jsx)(I,{followerCount:F,isOwnProfile:be,session:k,type:"followers"}),me=Object(u.jsx)(I,{followingCount:de,isOwnProfile:be,session:k,type:"following"}),Oe=((B.profile_cover||{}).images||{}).originals;return Object(u.jsxs)(d.f,{alignItems:"center","data-test-id":"profile-header",direction:"column",display:"flex",marginTop:Oe?-3:0,children:[Oe?Object(u.jsxs)(d.f,{width:j?375:656,height:j?278:369,children:[Object(u.jsx)(d.D,{rounding:j?0:8,height:j?211:302,children:Object(u.jsx)(d.y,{alt:l._("cover image","ProfilePage.CoverImage","profile cover image"),naturalHeight:Oe.height,naturalWidth:Oe.width,src:Oe.url})}),Object(u.jsx)(d.f,{display:"flex",alignItems:"end",justifyContent:"center",position:"relative",children:Object(u.jsx)(d.f,{marginTop:-12,children:Object(u.jsx)(r.a,{accessibilityLabel:l._("User Avatar","profile.ProfileHeader.Avatar","Avatar in user profile page"),name:z,outline:!0,size:"xl",src:Y})})})]}):Object(u.jsx)(r.a,{accessibilityLabel:l._("User Avatar","profile.ProfileHeader.Avatar","Avatar in user profile page"),name:z,size:"xl",src:Y}),Object(u.jsx)(d.f,{"data-test-id":"profile-name",marginTop:2,children:Object(u.jsx)(H,{hasVerifiedIdentity:ue,isVerifiedMerchant:ie,name:z,showVerifiedBadge:he,inspirationalBadges:ce,inspirationalBadgesColor:le})}),Object(u.jsxs)(S.a,{name:"InspirationalBadges",children:[fe&&!!ae&&Object(u.jsx)(Z,{userId:N}),Object(u.jsx)(U,{badges:ce,color:le})]}),Object(u.jsx)(d.f,{dangerouslySetInlineStyle:{__style:{textAlign:"center"}},marginTop:2,maxWidth:m?400:void 0,children:Object(u.jsx)(v.a,{inline:!0,items:je})}),Object(u.jsxs)(d.f,{direction:"row",display:"flex",justifyContent:"center",marginTop:2,children:[Object(u.jsx)(d.f,{"data-test-id":"profile-followers-link",alignItems:"center",direction:"row",display:"flex",children:P&&F>0?Object(u.jsx)(s.a,{pressState:"background",rounding:2,to:`/${oe}/_followers/`,children:ge}):ge}),Object(u.jsx)(d.u,{alignItems:"center",justifyContent:"start",children:Object(u.jsx)(y.a,{})}),Object(u.jsx)(d.f,{direction:"row",display:"flex","data-test-id":"follower-count",children:P&&de>0?Object(u.jsx)(s.a,{pressState:"background",rounding:2,to:`/${oe}/_following/`,children:me}):me})]}),Object(u.jsx)(d.f,{marginTop:4,width:"100%",children:Object(u.jsxs)(d.u,{alignItems:"center",gap:P?0:2,justifyContent:P?"between":"center",children:[Object(u.jsx)(D.a,{id:"share-button",children:Object(u.jsx)(d.x,{iconColor:"darkGray",accessibilityLabel:"share",size:"lg",icon:"share",onClick:t,ref:O})}),N!==k.userId&&Object(u.jsx)(C.a,{isSecondaryButton:!0,id:N,size:"lg",onFollow:()=>{g(Object(X.g)(N))},onUnfollow:()=>{g(Object(X.k)(N))},isFollowed:E,isLegoEnabled:!0,isUserFollowButton:!0,isUserMe:!1,followEventType:45,unfollowEventType:46}),P&&!be&&(m?Object(u.jsx)(d.x,{accessibilityLabel:l._("Other actions","profileHeader.actionBar.overflow","Accessibility label for button to open other options modal"),iconColor:"darkGray",icon:"ellipsis",onClick:()=>p(!0),size:"lg",ref:w}):Object(u.jsx)(R,{onBlock:e,onUnblockUser:n,user:B,userBlocked:L}))]})}),a&&a(O.current),f&&Object(u.jsx)(_,{anchor:w.current,onDismiss:()=>p(!1)})]})}var te=n("PaNI");function ne(e){return Object(u.jsxs)(d.f,{alignItems:"center","data-test-id":"all-pins-header",display:"flex",justifyContent:"between",marginTop:-1,children:[Object(u.jsx)(te.a,{color:"darkGray",fallbackUrl:"/",padding:3,size:"sm"}),Object(u.jsx)(d.f,{children:Object(u.jsx)(d.cb,{weight:"bold",children:e.title})}),Object(u.jsx)(d.f,{width:48})]})}var ie=n("MSUY"),oe=n("pcaS");function re({isOwnProfile:e}){const t=Object(G.h)(),n=Object(c.c)();return e?Object(u.jsxs)(d.f,{alignItems:"center",dangerouslySetInlineStyle:{__style:{paddingRight:8}},"data-test-id":"profile-own-header",display:"flex",children:[Object(u.jsx)(d.f,{flex:"grow",children:Object(u.jsx)(oe.a,{history:t,type:"syop",viewParameter:3106,viewType:4})}),Object(u.jsx)(d.u,{alignItems:"center",height:48,justifyContent:"center",width:48,children:Object(u.jsx)(ie.b,{iconButtonColor:"darkGray",iconButtonSize:"lg",elementType:249,viewType:4})}),Object(u.jsx)(d.f,{marginEnd:-3,children:Object(u.jsx)(s.a,{pressState:"background",rounding:"circle",to:"/settings",children:Object(u.jsx)(d.u,{alignItems:"center",height:48,justifyContent:"center",width:48,children:Object(u.jsx)(d.f,{dangerouslySetInlineStyle:{__style:{transform:"rotate(90deg)"}},children:Object(u.jsx)(d.w,{accessibilityLabel:n._("Settings","profile.ProfileActionsContainer.LinkToSettingsPage","Link to your settings page"),color:"darkGray",icon:"cog",size:20})})})})})]}):Object(u.jsx)(d.f,{alignItems:"center","data-test-id":"profile-header",display:"flex",children:Object(u.jsx)(te.a,{color:"darkGray",fallbackUrl:"/",padding:3,size:"sm"})})}function se({location:e,session:t,user:n,viewerId:i}){const o=Object(c.c)(),r=Object(k.a)(),{follower_count:s=0,following_count:a=0,interest_following_count:d=0,username:b}=n,h=a-(null!=d?d:0),f=r(t.locale,s||0,{}),p=r(t.locale,h||0,{}),j=e.pathname.includes(b+"/_followers"),g=e.pathname.includes(b+"/_following"),m=e.pathname.includes(b+"/pins"),O=n.id===i;return m?Object(u.jsx)(ne,{title:o._("All Pins","profilePinsHeader.heading","Heading for page that shows all Pins of a user")}):j?Object(u.jsx)(ne,{title:O?Object(l.b)(o.ngettext("{{ followerCount }} follower","{{ followerCount }} followers",s,"ProfilePage.followerCount.ownProfile","number of followers you have"),{followerCount:f}):Object(l.b)(o.ngettext("{{ followerCount }} follower","{{ followerCount }} followers",s,"ProfilePage.followerCount.othersProfile","number of followers another profile has"),{followerCount:f})}):g?Object(u.jsx)(ne,{title:O?Object(l.b)(o.ngettext("{{ followingCount }} following","{{ followingCount }} following",h,"ProfilePage.followingCount.ownProfile","number of profiles you are following"),{followingCount:p}):Object(l.b)(o.ngettext("{{ followingCount }} following","{{ followingCount }} following",h,"ProfilePage.followingCount.othersProfile","number of other profiles another user is following"),{followingCount:p})}):Object(u.jsx)(re,{isOwnProfile:O})}var ae=n("3LYl"),ce=n("DlC4"),le=n("Tn9N"),de=n("hFTz"),ue=n("/8nX"),be=n("fgXV"),he=n("6adH"),fe=n("QtD7"),pe=n("bUAJ"),je=n("cj2l"),ge=n("ANjH"),me=n("4kAQ"),Oe=n("r8+8"),xe=n("0G5S"),we=n("H5qz"),_e=n("PmFr"),ye=n("RNo4"),ve=n("pivO"),Se=n("YWST"),Ce=n("pLLR"),ke=n("eTKx"),Ie=n("ykUP"),Pe=n("ulr2"),Be=n("go3G");function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue="/boards",Ae="/_created",Le="/tried",Me=[Ae,Le,Ue];class Ee extends i.Component{constructor(...e){super(...e),Te(this,"state",{isInviteActionTaken:!1,isSpinnerShown:!1,sendProfileModalIsOpen:!1,showMore:!1}),Te(this,"openSendProfileModal",()=>{const{isAuthenticated:e,showUnauthSharingModals:t}=this.props;e||t(),this.setState({sendProfileModalIsOpen:!0})}),Te(this,"closeSendPinModal",()=>{const{isAuthenticated:e,hideUnauthSharingModals:t}=this.props;e||t(),this.setState({sendProfileModalIsOpen:!1})}),Te(this,"toggleshowMore",()=>{const{isAuthenticated:e}=this.props,{showMore:t}=this.state;this.setState({showMore:!t}),e||Object(W.h)("click_more_profile_description")}),Te(this,"handleLastPageVisited",()=>{const e=Object(xe.a)(_e.i)?JSON.parse(Object(xe.a)(_e.i)):[];if(!(e.length>0&&e[0].path===this.props.location.pathname)){const{location:e,userBoardExample:t}=this.props,n=!!e.state&&e.state.isFromNavFooterPage,i=t?t.cover_pin:{},o=t?t.cover_images:null,r=i?i.image_signature:null,s=i?i.pin_id:"",a=o?o["222x"]:null;n||Object(pe.d)(e.pathname,r,s,a,"profile")}}),Te(this,"shouldShowBusinessAppUpsell",()=>{const{activateBusinessAppUpsellExp:e,canUpsellNativeApp:t,isPartner:n,user:i,viewerId:o}=this.props,r=(i||{}).id;return!(!n||r!==o||!t)&&e().startsWith("enabled")}),Te(this,"shouldShowUserHeader",()=>{const{location:{pathname:e},user:{username:t}}=this.props;let n=!1;return Me.forEach(t=>{e.indexOf(t)>-1&&(n=!0)}),(e.endsWith("/"+t)||e.endsWith(`/${t}/`))&&(n=!0),n}),Te(this,"handleInviteResponse",e=>{const{invite:t,location:n,onAccept:i,onDismiss:o,showToast:r,user:s}=this.props;if(!t||!t.board)return;const{invited_by_user:a,board:{id:c=null,url:l=""}}=t,{first_name:d=""}=a||{};this.props.requireAuthForLimitedLogin({fn:()=>{const t=(s||{}).id;c?e?(i(c,t),r({icon:"arrow-circle-forward",href:l,text:this.props.i18n._("You're in! Save Pins, plan with collaborators, and more!","ProfilePage.handleInviteResponse.acceptInviteToast","Toast text after accepting board collaborator invite.")})):(o(c,t),r({text:this.props.i18n._("Invitation declined","Toast text after declining board collaborator invite","Toast text after declining board collaborator invite")})):r({text:this.props.i18n._("Invalid Invite","Toast text for an invalid board collab invite","Toast text for an invalid board collab invite")})},modalHeader:Object(Ie.h)({firstName:d,i18n:this.props.i18n}),nextLocation:Object(Ie.i)(n)})(),this.setState({isInviteActionTaken:!0})}),Te(this,"renderInvite",()=>{const{invite:e}=this.props;return e?Object(u.jsx)(d.f,{dangerouslySetInlineStyle:{__style:{margin:"0 -14px"}},children:Object(u.jsx)(b,{handleInviteResponse:this.handleInviteResponse,invite:e})}):null}),Te(this,"clickProfileUrl",()=>{const{isAuthenticated:e}=this.props;e||Object(W.h)("click_profile_url")}),Te(this,"tabChange",()=>{const{isAuthenticated:e}=this.props;e||(Object(W.h)("press_change_tab"),Object(W.i)({action:"click",page:"profile",item:"page-tabs"}))}),Te(this,"experienceRef",Object(i.createRef)())}componentDidMount(){Object(m.a)();const{fetchExperienceWithExtraContext:e,isAuthenticated:t,showBusinessAppUpsell:n,user:i,viewerId:o}=this.props;this.shouldShowBusinessAppUpsell()&&n(),t||Object(W.h)("view_profile_page");e({profile_ownership:(i||{}).id===o?"own":"other"})}componentWillUnmount(){const{hideBusinessAppUpsell:e}=this.props;e()}render(){const{blockUser:e,children:t,experience:n,headerTab:i,i18n:o,invite:r,isAuthenticated:s,isDesktop:a,location:c,match:{params:{username:b}},session:f,unblockUser:m,user:x,userBoardExample:w,viewerId:_,isBot:y}=this.props,{isInviteActionTaken:v,isSpinnerShown:S,sendProfileModalIsOpen:C}=this.state;if(!x)return Object(u.jsx)(d.f,{margin:5,children:Object(u.jsx)(d.U,{show:!0,accessibilityLabel:this.props.i18n._("Loading user profile","Loading state for the user profile page","Loading state for the user profile page")})});w&&!s&&this.handleLastPageVisited();const{id:k,is_verified_merchant:I,eligible_profile_tabs:P=[]}=x||{},B=k===_,T=`/${b||""}${Le}`,U={0:{href:`/${b||""}${Ue}`,id:Ue,text:this.props.i18n._("Saved","profileHeader.tabs.saved","Label for Saved tab on profile header")},3:{href:T,id:Le,text:this.props.i18n._("Tried","mobile.routes.profilePage.","Link to the tried tab on the profile page")},1:{href:`/${b||""}${Ae}`,id:Ae,ref:this.experienceRef,text:this.props.i18n._("Created","profileHeader.tabs.created","Label for Created tab on profile header")}},A=s||!y&&!a,L=s||!y&&!a,M=P.filter(({tab_type:e})=>!!U[e]).filter(({tab_type:e})=>!(3===e&&!L)).filter(({tab_type:e})=>!(1===e&&!A)).map(({tab_type:e})=>U[e]),E=M.findIndex(e=>e.id===i),F=B?3106:3107,R=!v&&!!r&&B,$=this.shouldShowUserHeader(),D=$&&M.length>1;return Object(u.jsx)(ue.a,{objectIdStr:k,viewParameter:F,viewType:4,children:Object(u.jsx)(de.a,{objectId:k,view:4,viewParameter:F,children:Object(u.jsxs)(O.b,{dataLayoutShiftBoundaryId:"ProfilePageContainer",hasFixedHeader:s,children:[s&&Object(u.jsx)(h.a,{shouldShowShadow:!0,position:"sticky",children:Object(u.jsx)(Oe.d,{children:Object(u.jsx)(se,{location:c,session:f,user:x,viewerId:_})})}),!a&&Object(u.jsx)(ce.default,{isOpen:C,objectId:k,objectType:3,onDismiss:this.closeSendPinModal}),($||D||R)&&Object(u.jsxs)(d.f,{direction:"column",display:"flex",paddingX:4,paddingY:0,marginBottom:3,children:[$&&Object(u.jsx)(d.f,{marginBottom:5,children:Object(u.jsx)(ee,{blockUser:e,unblockUser:m,handleShareClick:this.openSendProfileModal,isVerifiedMerchant:I,user:x,renderShareMenu:a&&C?e=>Object(u.jsx)(p,{anchor:e,title:o._("Send this profile","ProfileHeader.ShareMenu.Title","title for share menu popover"),onDismiss:this.closeSendPinModal,objectId:k,objectType:3}):null})}),D&&Object(u.jsxs)(d.f,{"data-test-id":"tabs-container",display:"flex",justifyContent:"center",marginTop:2,children:[Object(u.jsx)(le.a,{hideOverflow:!0,items:M,onChange:this.tabChange,selectedTabIndex:E>-1?E:0}),this.experienceRef&&B&&n&&Object(u.jsx)(j.a,{eligibleIds:[502727],experience:n,placementId:1000312,children:({complete:e,dismiss:t})=>Object(u.jsx)(d.A,{children:Object(u.jsx)(d.L,{showCaret:!0,anchor:this.experienceRef.current,color:"blue",idealDirection:"down",onDismiss:t,positionRelativeToAnchor:!1,size:"flexible",children:Object(u.jsxs)(d.f,{alignItems:"center",direction:"column",display:"flex",padding:2,width:230,children:[Object(u.jsx)(d.f,{paddingY:2,children:Object(u.jsx)(d.cb,{align:"center",color:"white",children:Object(l.b)(this.props.i18n._("New look! Click {{created}} to see Pins you've published. Click {{saved}} to see your saved Pins and boards.","profileHeader.experience.tooltipText","Text informing users about purpose of Created and Saved tabs on profile"),{created:Object(u.jsx)(d.cb,{inline:!0,color:"white",weight:"bold",children:this.props.i18n._("Created","profileHeader.experience.createdTooltipText","Text informing users about purpose of Created and Saved tabs on profile")}),saved:Object(u.jsx)(d.cb,{inline:!0,color:"white",weight:"bold",children:this.props.i18n._("Saved","profileHeader.experience.savedTooltipText","Text informing users about purpose of Created and Saved tabs on profile")})})})}),Object(u.jsx)(d.f,{paddingY:2,width:80,children:Object(u.jsx)(d.g,{fullWidth:!0,color:"white",onClick:()=>{e(1)},text:n.display_data.complete_button_text})})]})})})})]}),R&&this.renderInvite()]}),Object(u.jsx)(d.f,{children:t}),S?Object(u.jsx)(g.a,{}):null,!s&&Object(u.jsx)(ae.a,{user:x})]})})})}}t.d=Object(ge.compose)(he.a,G.l,Object(be.a)({name:"UserResource",key:"resource",noCache:({user:e,session:{isSeoBot:t},viewerId:n})=>!t&&(e||{}).id!==n,options:({match:e})=>(({username:e})=>({field_set_key:"profile",username:e,is_mobile_fork:!0}))({username:e.params.username}),mapDispatch:(e,{showToast:t})=>({blockUser:(n,i,o)=>e(Object(X.a)(n)).then(()=>{t({text:Object(l.b)(o._("You've blocked {{ name }}","profilePage.mapDispatch.blockUserToast","Toast confirming that you've blocked a user"),{name:i}).join(" ")})}),unblockUser:t=>e(Object(X.j)(t)),hideUnauthSharingModals:()=>e(Object(Pe.n)()),showUnauthSharingModals:()=>e(Object(Pe.O)()),showBusinessAppUpsell:()=>e(Object(Pe.F)(!0)),hideBusinessAppUpsell:()=>e(Object(Pe.F)(!1)),activateBusinessAppUpsellExp:()=>e(Object(fe.a)("mweb_business_app_upsell"))||""}),mapState:(e,{match:t})=>{const n=Object(q.s)(e)[t.params.username],i=e.session.userId,o=n?{user_id:n.id}:{},r=o?Object(q.g)(e,o):[];return{locale:e.session.locale,user:n,viewerId:i,userBoardExample:r.length>0?r[0]:null,isAuthenticated:e.session.isAuthenticated,isPartner:!!e.users[i]&&Boolean(e.users[i].is_partner),session:e.session,viewingUser:e.users[e.session.userId],canUpsellNativeApp:e.session.canUseNativeApp&&"android-twa"!==e.session.pwaType}}}),Object(je.a)(({isAuthenticated:e})=>e,Object(be.a)({name:"BoardInvitesResource",key:"boardInvites",options:()=>({current_user:!0}),mapState:e=>{const t=Object(q.n)(e),n=Object.values(t||{})[0],i=n?Object(q.l)(e)[n]:null,o=i?e.boards[i.board]:null,r=i?e.users[i.invited_by_user]:null;return{invite:i?{board:o?{id:o.id,image_cover_url:o.image_cover_url,name:o.name,url:o.url}:null,created_at:i.created_at,invited_by_user:r?{id:r.id,first_name:r.first_name,full_name:r.full_name,username:r.username,image_small_url:r.image_small_url}:null,status:i.status,type:t.type}:null}},mapDispatch:e=>({onAccept:(t,n)=>e(Object(Be.a)(t,n)),onDismiss:(t,n)=>e(Object(Be.i)(t,n))})})))((function(e){const{user:t,viewerId:n,viewingUser:s,showToast:a,history:b,location:h}=e,f=Object(c.c)(),p=Object(V.b)(),j=(t||{}).id===n,g=Object(Se.b)(),m=Object(o.useDispatch)(),O=Object(ke.a)(),{isBot:x}=Object(Ce.d)();Object(i.useEffect)(()=>{g&&setTimeout(()=>{g.load(new URL("[username]/[slug].js","file://")),g.load(new URL("[username]/boards.js","file://")),g.load(new URL("[username]/pins.js","file://")),g.load(new URL("[username]/tried.js","file://")),j&&g.load(new URL("settings.js","file://"))},500)},[]),Object(i.useEffect)(()=>{const e="unlink_successful"===Object(ye.l)(h.search).message;t===s&&e&&(a({duration:7e3,text:Object(u.jsx)(d.cb,{align:"start",children:Object(l.b)(f._("Success! You've unlinked this business account. You are currently in {{username}}.","profilePage.unlinkAccountToast.message","Confirmation message after a user has successfully unlinked business account"),{username:Object(u.jsx)(d.cb,{inline:!0,weight:"bold",children:t.username})})}),thumbnail:Object(u.jsx)(r.a,{name:t.full_name||"",src:t.image_medium_url||"",size:"md"})}),b.replace(`/${t.username}/`))},[t]);const w=Object(ve.b)({id:1000312});return Object(u.jsx)(we.a,{children:Object(u.jsx)(Ee,{...e,experience:w,fetchExperienceWithExtraContext:e=>m(Object(me.h)([1000312],e)),i18n:f,isDesktop:p,requireAuthForLimitedLogin:O,isBot:x})})}))},xKh6:function(e,t,n){var i=n("eOdZ");var o=e=>i.d.create("InviteAttributionResource",{invite_code:e}).callCreate(),r=n("RNo4");t.a=(e=(e=>{}))=>{const t=Object(r.l)(window.location.search),n=t.invite_code;n?o(n):e(t)}}}]);
//# sourceMappingURL=https://sm.pinimg.com/webapp/86-f381f88750cd86e5f6cc.mjs.map