(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[91290],{542554:(e,t,o)=>{o.r(t),o.d(t,{AMPPageContainer:()=>s,default:()=>l});var r=o(883119),n=o(134879),i=o(444445),d=o(780280),a=o(995081),c=o(785893);const s=({children:e,dataLayoutShiftBoundaryId:t,hasFixedHeader:o=!1,hasGutter:s=!0,height:l,showKeychainError:_=!1,useViewport:u=!1})=>{const I=(0,d.B)(),p=(0,a.jd)(I.userAgent.platform)?a.Vf:0;return(0,c.jsx)(r.xu,{"data-layout-shift-boundary-id":t||"PageContainer",height:u?`calc(100vh - ${p}px)`:l,paddingX:s?i.D6:void 0,paddingY:o||_?void 0:3,children:(0,c.jsx)(n.C,{value:!!s,children:e})})},l=s},678638:(e,t,o)=>{o.d(t,{$n:()=>S,A4:()=>A,CE:()=>I,ET:()=>P,F$:()=>h,Kw:()=>T,Nv:()=>v,PA:()=>f,X_:()=>m,d9:()=>y,e1:()=>u,o4:()=>O,vB:()=>b});var r=o(563339),n=o(483025),i=o(254176),d=o(422946),a=o(379725),c=o(782677),s=o(412067),l=o(956800),_=o(414327);function u(e){return t=>{const{boardId:o,sectionIdBefore:r,sectionIdAfter:n,sourceSectionId:i,targetSectionId:a}=e;t((0,l._f)({feedType:d.DV.BOARD_SECTIONS,feedId:o,itemType:"boardsection",sourceItemId:i,targetItemId:a}));const c={section_id:i,section_before:r||void 0,section_after:n||void 0};return s.Z.create("BoardSectionsReorderResource",c).callUpdate({showError:!1})}}function I(e,t){return o=>o((0,a.U)("BoardSectionResource",{options:{field_set_key:t||"board_page",section_id:e}}))}function p(e,t){return{type:"SECTION_ADDED",payload:{boardId:e,section:t}}}function b({boardId:e,name:t,nameSource:o,pinImport:n,initialPinIds:a=[]},c,u){let I=0;"RECOMMENDATION"===o?I=1:"EDITED_RECOMMENDATION"===o&&(I=2);const b={board_id:e,initial_pins:n&&!n.all?n.pinIds:a,name:t,name_source:I,...u?{orbac_subject_id:u}:Object.freeze({})};return t=>s.Z.create("BoardSectionResource",b).callCreate({showError:!1}).then((({resource_response:{data:o}})=>{t(p(e,o)),t((0,l.vX)({feedId:e,feedType:d.DV.BOARD_SECTIONS,itemIds:[o.id],itemType:"boardsection"})),t((0,i.Tq)(e,"pin_count")),t((0,_.jB)("BoardSectionsRepinResource",{board_id:e}));const{all:a,pinIds:s}=n||{all:!1,pinIds:[]};return a?new Promise(((n,i)=>t((0,r.Z)({inverseSelection:!0,selectedPinIds:s,source:{boardId:e,sectionId:null},target:{boardId:e,sectionId:o.id}},c)).then((()=>n(o))).catch(i))):(s.length>0&&t((0,l.N8)(d.DV.BOARDFEED,e)),o)}))}function E(e,t){return{type:"SECTION_DELETED",payload:{boardId:e,sectionId:t}}}function h(e,t,o){return r=>s.Z.create("BoardSectionEditResource",{section_id:t,...o?{orbac_subject_id:o}:Object.freeze({})}).callDelete({showError:!1}).then((()=>Promise.all([r(E(e,t)),r((0,l.EX)({feedId:e,feedType:d.DV.BOARD_SECTIONS,itemIds:[t],itemType:"boardsection"})),r((0,i.Tq)(e,"pin_count")),r((0,_.jB)("BoardSectionsRepinResource",{board_id:e}))])))}function S(e,t,o,r){return n=>s.Z.create("BoardSectionEditResource",{section_id:t,title:o,...r?{orbac_subject_id:r}:Object.freeze({})}).callCreate({showError:!1}).then((t=>{const o=t.resource_response.data;return n(function(e,t){return o=>{const r=t.board;var n,a,c,s,_;r&&r.id!==e?(o(E(e,null!==(n=t.id)&&void 0!==n?n:"")),o((0,l.EX)({feedId:e,feedType:d.DV.BOARD_SECTIONS,itemIds:[null!==(a=t.id)&&void 0!==a?a:""],itemType:"boardsection"})),o((0,i.Tq)(e,"pin_count")),o(p(null!==(c=r.id)&&void 0!==c?c:"",t)),o((0,l.vX)({feedId:null!==(s=r.id)&&void 0!==s?s:"",feedType:d.DV.BOARD_SECTIONS,itemIds:[null!==(_=t.id)&&void 0!==_?_:""],itemType:"boardsection"})),o((0,i.Tq)(e,"pin_count"))):o({type:"SECTION_UPDATED",payload:{boardId:e,section:t}})}}(e,o)),n((0,_.jB)("BoardSectionsRepinResource",{board_id:e})),o}))}function y(e,t,o){return r=>s.Z.create("BoardSectionsMergeResource",{source_section_id:t,target_section_id:o}).callUpdate({showError:!1}).then((n=>Promise.all([r(E(e,t)),r((0,_.jB)("BoardSectionsRepinResource",{board_id:e})),r(I(o)),r((0,l.N8)(d.DV.BOARD_SECTION_PINS,o))]).then((()=>n))))}const D=(e,t)=>({type:"BOARD_SECTION_EDIT",payload:t}),f=(e,t)=>o=>s.Z.create("BoardSectionEditResource",{...t,section_id:e}).callCreate().then((e=>(o(D(0,t)),e.resource_response.data))),A=e=>t=>{const o={section_id:e};return s.Z.create("BoardSectionResource",o).callGet().then((e=>{var o;const r=(null===(o=e.resource_response)||void 0===o?void 0:o.data)||{id:"",title:""};return t(D(0,r)),e}))},O=(e,t,o,r)=>n=>{const i=s.Z.create("BoardSectionEditResource",{section_id:t}).callDelete();return n(((e,t,o,r)=>({type:"BOARD_SECTION_DELETE",payload:{userId:e,boardSectionId:t,boardId:o,pinCount:r}}))(e,t,o,r)),i},v=(e,t,o)=>r=>{const i={board_id:e,initial_pins:t,name:o},d="BoardSectionResource";return s.Z.create(d,i).callCreate().then((o=>{const a=o.resource_response.data,s=(0,c.Fv)(a,n.Z[d]);return r((0,_.XM)(d,i,o,s)),t.length&&r({type:"PINS_MOVE",payload:{source:{boardId:e},target:{boardId:e,sectionId:a.id},pinIds:t}}),o}))},T=e=>t=>{const{source:o,target:r,pinIds:i}=e;if(t({type:"PINS_MOVE",payload:e}),o.boardlessPins||r.boardId!==o.boardId){const e={board_id:r.boardId,pin_ids:i,section_id:r.sectionId},t="BulkEditResource";return s.Z.create(t,e).callUpdate()}if(r.sectionId){const e={section_id:r.sectionId,pins:i},o="BoardSectionEditResource";return s.Z.create(o,e).callUpdate().then((r=>{const i=(0,c.Fv)(r.resource_response.data,n.Z[o]);return t((0,_.XM)(o,e,r,i)),r}))}const d={section_id:o.sectionId,pins:i};return s.Z.create("BoardSectionPinsResource",d).callDelete()},m=e=>t=>{t({type:"PINS_MOVE_ALL",payload:e});const{source:o,target:r,excludePinIds:n}=e,i={board_id:o.boardId,new_board_id:r.boardId,pin_ids:n,old_section_id:o.sectionId,new_section_id:r.sectionId};return s.Z.create("BulkEditSelectAllResource",i).callUpdate()},P=(e,t,o,r)=>n=>n(v(e,[],t)).then((t=>{const i=t.resource_response.data.id;return n(m({source:{boardId:e,sectionId:r},target:{boardId:e,sectionId:i},excludePinIds:o}))}))},576028:(e,t,o)=>{o.d(t,{V:()=>d,u:()=>i});var r=o(412067),n=o(254176);const i=e=>t=>{const o={board_id:e};return r.Z.create("BoardResource",o).callGet().then((e=>{const o=e&&e.resource_response&&e.resource_response.data;return o&&t((0,n.yT)(o)),e}))};function d(e,t,o){return(i,d)=>{const{boards:a}=d(),c=a[e],s=void 0===t.collaborator_requests_enabled||null===t.collaborator_requests_enabled?Object.freeze({}):{collaborator_requests_enabled:t.collaborator_requests_enabled},l={allow_homefeed_recommendations:t.allow_homefeed_recommendations,category:t.category,collab_board_email:t.collab_board_email,collaborator_invites_enabled:t.collaborator_invites_enabled,collaborator_permissions_setting:t.collaborator_permissions_setting,description:t.description,name:t.name,privacy:t.privacy,sensitivity:t.sensitivity||null,...o?{orbac_subject_id:o}:Object.freeze({}),...s};return i((0,n.yT)({...l,id:e})),r.Z.create("BoardResource",{...l,board_id:e}).callUpdate().then((e=>{const o=e&&e.resource_response&&e.resource_response.data||t;return i((0,n.yT)(o)),e})).catch((e=>{throw c&&i((0,n.yT)(c)),e}))}}},563339:(e,t,o)=>{o.d(t,{Z:()=>I,S:()=>u});var r=o(412067),n=o(254176),i=o(422946),d=o(678638),a=o(124237);const c=e=>t=>{a.Z.showError(function(e,t){switch(e.api_error_code){case 2171:case 2172:case 2173:return t._('Please wait until the previous board action finishes.', ' - ', ' -- ');default:return e.message}}(t,e))};var s=o(956800);const l=e=>(0,s.N8)(e.sectionId?i.DV.BOARD_SECTION_PINS:i.DV.BOARDFEED,e.sectionId||e.boardId);function _(e,t){const{source:o,target:r}=e;r.boardId!==o.boardId?(t((0,n.Tq)(o.boardId,"pin_count")),t((0,n.Tq)(r.boardId,"pin_count"))):o.sectionId&&r.sectionId||t((0,n.Tq)(r.boardId,"pin_count")),o.sectionId&&t((0,d.CE)(o.sectionId)),r.sectionId&&t((0,d.CE)(r.sectionId))}function u(e){return t=>{const{selectedPinIds:o,source:r,target:n}=e;t((0,s.EX)({feedId:r.sectionId||r.boardId,feedType:r.sectionId?i.DV.BOARD_SECTION_PINS:i.DV.BOARDFEED,itemIds:o,itemType:"pin"})),t((0,s.vX)({feedId:n.sectionId||n.boardId,feedType:n.sectionId?i.DV.BOARD_SECTION_PINS:i.DV.BOARDFEED,itemIds:o,itemType:"pin"})),_(e,t)}}function I(e,t){return o=>function(e,t,o){const{inverseSelection:n,selectedPinIds:d,source:a,target:_,orbacSubjectId:u}=e;if(a.boardId===_.boardId&&(a.sectionId||null)===(_.sectionId||null))return Promise.reject();if(n){const e={board_id:a.boardId,new_board_id:_.boardId,old_section_id:a.sectionId||void 0,new_section_id:_.sectionId||void 0,pin_ids:d,orbac_subject_id:u};return r.Z.create("BulkEditSelectAllResource",e).callUpdate({showError:!1}).then((()=>Promise.all([t(l(a)),t(l(_))]))).catch(c(o))}{const e=(e,o)=>{t((0,s.EX)({feedId:e.sectionId||e.boardId,feedType:e.sectionId?i.DV.BOARD_SECTION_PINS:i.DV.BOARDFEED,itemIds:d,itemType:"pin"})),t((0,s.vX)({feedId:o.sectionId||o.boardId,feedType:o.sectionId?i.DV.BOARD_SECTION_PINS:i.DV.BOARDFEED,itemIds:d,itemType:"pin"}))};e(a,_);const n=()=>e(_,a);if(_.boardId===a.boardId){if(_.sectionId){const e={section_id:_.sectionId,pins:d,orbac_subject_id:u};return r.Z.create("BoardSectionEditResource",e).callUpdate({showError:!1}).catch((e=>{n(),c(o)(e)}))}{const e={section_id:a.sectionId,pins:d,orbac_subject_id:u};return r.Z.create("BoardSectionPinsResource",e).callDelete({showError:!1}).catch((e=>{n(),c(o)(e)}))}}{const e={board_id:_.boardId,section_id:_.sectionId||void 0,pin_ids:d,orbac_subject_id:u};return r.Z.create("BulkEditResource",e).callUpdate({showError:!1}).catch((e=>{n(),c(o)(e)}))}}}(e,o,t).then((()=>_(e,o)))}},447948:(e,t,o)=>{function r(e,t){return{type:"CHANGE_CAROUSEL_SLOT_INDEX",payload:{id:e,index:t}}}function n(e,t){return{type:"SET_PIN_COMMENTS_DISABLED",payload:{id:e,pinCommentsDisabled:t}}}function i(e,t,o,r,n){return{type:"PIN_SAVE",payload:{id:e,boardId:t,title:o,url:r,localPinId:n}}}function d(e){return{type:"PIN_UNSAVE",payload:{id:e}}}o.d(t,{Gb:()=>d,I1:()=>l,Ib:()=>u,NA:()=>s,Ur:()=>i,Vw:()=>c,b9:()=>p,i0:()=>I,mO:()=>n,q1:()=>_,t_:()=>a,yR:()=>r,yj:()=>b});const a=(e,t,o)=>({type:"PIN_UNDO_SAVE",payload:{pinId:e,boardId:t,boardSectionId:o}});function c(e){return{type:"PIN_SHOW_SUGGESTED_CREATOR_RECS",payload:{id:e,value:!0}}}function s({id:e,text:t,undoAction:o,undoActionOptions:r,undoText:n}){return{type:"PIN_SHOW_UNDO_AND_FEEDBACK",payload:{id:e,value:!0,text:t,undoAction:o,undoActionOptions:r,undoText:n}}}function l(e){return{type:"PIN_SHOW_FEEDBACK",payload:{id:e,value:!1}}}function _(e,t){return{type:"PIN_SHOW_FEEDBACK",payload:{id:e,value:!0,text:t}}}function u(e){return{type:"PIN_SHOW_FEEDBACK_OVERLAY",payload:{id:e,value:!0}}}function I(e){return{type:"PIN_SHOW_FEEDBACK_OVERLAY",payload:{id:e,value:!1}}}function p(e){return{type:"PIN_SHOW_AD_REASONS_MODAL",payload:{id:e,value:!0}}}function b(e){return{payload:{id:e,value:!1},type:"PIN_SHOW_AD_REASONS_MODAL"}}},404508:(e,t,o)=>{o.d(t,{Z:()=>I});var r=o(702664),n=o(941646),i=o(898781),d=o(112690),a=o(52022),c=o(867820),s=o(385740),l=o(883119),_=o(276775),u=o(785893);function I({alignIconLeft:e,bgColor:t,color:o,disableRedirect:I=!1,fallbackUrl:p,icon:b="arrow-back",onTouch:E,padding:h,placement:S,shouldUseFallbackUrl:y,size:D="lg",viewParameter:f,viewType:A}){const O=(0,i.ZP)(),v=(0,_.useHistory)(),T=(0,_.useLocation)(),m=(0,r.useSelector)((e=>e.session.isAuthenticated)),P=(0,d.Z)(),B=(0,a.Z)(),{viewType:R,viewParameter:N}=(0,s.SU)(),[g,C]=A?[A,f]:[R,N],w=()=>{(0,c.My)(`mweb_back_button_click.${String(S)}.is_auth_${String(m)}`),B({action:"click",item:"back-button"}),g&&P({view_type:g,view_parameter:C,element:34,event_type:102}),E&&E(),I||((!T.key||T.state&&"redirect"===T.state.referrer||y)&&p?v.push(p):T.pathname.includes("/password/reset/")&&T.search&&T.search.includes("?nativeShouldDismiss=true")?v.push("/login/?dismissWebview=true"):v.goBack())};return(0,u.jsx)(n.Z,{id:"back-button",children:e?(0,u.jsx)(l.xu,{display:"flex",width:48,height:48,alignItems:"center",marginStart:"cancel"===b?-1:-2,children:(0,u.jsx)(l.hU,{accessibilityLabel:O._('Back', 'navigation button', 'navigation button'),bgColor:t,iconColor:o||t&&!["white","lightGray","transparent"].includes(t)?o:"gray",icon:b,onClick:w,padding:"auto"!==h?h:2,size:D})}):(0,u.jsx)(l.hU,{accessibilityLabel:O._('Back', 'navigation button', 'navigation button'),bgColor:t,iconColor:o||t&&!["white","lightGray","transparent"].includes(t)?o:"gray",icon:b,onClick:w,padding:"auto"!==h?h:2,size:D})})}},166753:(e,t,o)=>{o.d(t,{Z:()=>s});var r=o(499128),n=o(139574),i=o(576028),d=o(678638),a=o(447948),c=o(785893);const s=({boardId:e,boardSectionId:t,clientTrackingParams:o,dispatch:s,i18n:l,newPinId:_,onError:u,onSuccess:I,originalPinId:p,shouldRefresh:b=!1,showToast:E,sourcePinId:h})=>s((0,n.q)({pinId:_,boardId:e,boardSectionId:t,clientTrackingParams:o})).then((()=>{p&&s((0,a.t_)(p,e,t)),s((0,a.t_)(h,e,t)),b&&(t&&s((0,d.A4)(t)),e&&s((0,i.u)(e))),E((({hideToast:e})=>(0,c.jsx)(r.ZP,{text:l._('Pin removed!', 'Utils.Unsave.Success', 'User removed their pin'),onHide:e}))),I&&I()})).catch((()=>{E((({hideToast:e})=>(0,c.jsx)(r.ZP,{variant:"error",text:l._('Sorry! There was an error removing your Pin.', 'Utils.Unsave.Error', 'Error when user tried to remove pin'),onHide:e}))),null==u||u()}))}}]); //# sourceMappingURL=https://sm.pinimg.com/webapp/91290-c53b04fe88f689e9.mjs.map