"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[1530],{92679:(e,n,t)=>{t.d(n,{A:()=>o});var i,a=t(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.d(n,{A:()=>o});var i,a=t(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.d(n,{A:()=>o});var i,a=t(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.d(n,{C:()=>r});var i=t(96540),a=t(52290),l=t(86527),o=t(46879);function r(e){var n=e.entityName,t=void 0===n?"story":n;return i.createElement(a.a,{textAlign:"center",testId:"deleteStoryModalText"},"Deletion is not reversible, and the story will be completely deleted. If you do not want to delete, you can"," ",i.createElement(l.N,{target:"_blank",href:o.Xj4,inline:!0,linkStyle:"OBVIOUS"},"unlist the ",t),".")}},43849:(e,n,t)=>{t.d(n,{$:()=>p,J:()=>m});var i=t(80296),a=t(96540),l=t(44402),o=t(42976),r=t(60603),d=t(8963),s=t(34507),c=function(e){return{overflow:"hidden",transition:"opacity 300ms ease".concat(e?"":" 300ms",", max-height 300ms ease").concat(e?" 300ms":""),maxHeight:e?"0":"450px",opacity:e?0:1}},u=(0,a.createContext)({});function m(e){var n=e.children,t=e.post,m=(0,l.l)(),p=(0,a.useRef)(!1),v=(0,s.K)(t.id,"cache-only").explicitSignal,k=(0,a.useState)(v===o.WN.SHOW_LESS),f=(0,i.A)(k,2),g=f[0],b=f[1],y=(0,r.e)(!1),h=(0,i.A)(y,3),E=h[0],S=h[1],N=h[2],w=(0,a.useCallback)((function(e){g&&p.current&&"max-height"===e.propertyName&&(S(),p.current=!1)}),[g]),C=(0,a.useCallback)((function(){p.current=!0,b(!0)}),[]),O=(0,a.useCallback)((function(){b(!1)}),[]),x=(0,a.useMemo)((function(){return{animateShowLess:C,animateUndo:O}}),[C,O]);return a.createElement(u.Provider,{value:x},a.createElement("div",{className:m(c(g)),onTransitionEnd:w},n),a.createElement(d.b,{post:t,isVisible:E,hide:N}))}var p=function(){return(0,a.useContext)(u)}},8963:(e,n,t)=>{t.d(n,{b:()=>w});var i,a=t(80296),l=t(96540),o=t(17045),r=t(53843),d=t(2550),s=t(21335),c=t(71984),u=t(52290),m=t(94170),p=t(49287),v=t(42976),k=t(60603),f=t(55981),g=t(36557),b=t(44402);function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.d(n,{K:()=>E});var i=t(64467),a=t(80296),l=t(95420),o=t(39181),r=t(96540),d=t(2550),s=t(72130),c=t(49287),u=t(42976),m=t(91830),p=t(97249),v=t(43849),k=t(45458),f=t(50500),g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ExplicitSignalPostQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NegativeSignalModal_post"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"explicitSignalState"}}]}}]}}]}}].concat((0,k.A)(f.c.definitions))},b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ExplicitSignalMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"signal"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ExplicitUserSignal"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendExplicitSignal"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"ObjectField",name:{kind:"Name",value:"signal"},value:{kind:"Variable",name:{kind:"Name",value:"signal"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function h(e){for(var n=1;n{t.d(n,{G:()=>An});var i=t(64467),a=t(58168),l=t(80045),o=t(96540),r=t(80296),d=t(14792),s=t.n(d),c=t(39181),u=t(94971),m=t(14782),p=t(86527),v=t(52290),k=t(85050);function f(e){var n=e.onClick,t=e.hidePopover,i=e.showAt,a=e.bookmarkIcon,l=(0,o.useCallback)((function(){t(),n()}),[n,t]);return o.createElement(k.V,{xs:i.xs,sm:i.sm,md:i.md,lg:i.lg,xl:i.xl},o.createElement(m.q3,null,o.createElement(p.N,{"aria-controls":"aria-id","aria-expanded":"false",onClick:l},o.createElement(v.a,{display:"flex",flexDirection:"row",alignItems:"center",ariaHidden:"true",gap:"12px"},a,"Save"))),o.createElement(m.eS,null))}var g=t(20036),b=t(24809),y=["isResponsive"],h=function(e){var n=e.isResponsive,t=(0,l.A)(e,y);return o.createElement(g.u,(0,a.A)({text:n?"More":void 0,icon:o.createElement(b.A,null)},t))},E=t(69733),S=t(1491),N=t(27721),w=t(1722),C=t(56743),O=t(39160),x=t(51771),A=function(e){var n=e.post,t=e.hidePopover,i=(0,N.R)().value,a=null==i?void 0:i.id,l=(0,w.h)(n).viewerEdge,r=(0,E.wA)(),d=o.useCallback((function(e){return r((0,C.K7)(e))}),[r]),s=(0,O.Dy)((function(e){return e.multiVote.clapsPerPost})),c=(0,x.F)(s,n,l),u=c.clapCount,v=c.viewerClapCount,k=(0,S.f)();return a&&u&&v&&v>0?o.createElement(o.Fragment,null,o.createElement(m.q3,null,o.createElement(p.N,{onClick:function(){k(n,(null==i?void 0:i.id)||"",-v,l),d({postId:n.id,clapCount:u-v,viewerClapCount:0,viewerHasClappedSinceFetch:!0}),t()}},"Undo claps")),o.createElement(m.eS,null)):null},P=t(93948),F=t(44929),I=t(79193),T=t(58285),R=t(9942),D=t(60487),V=t(36557),_=t(44402),M=t(46879),L={cursor:"not-allowed",marginBottom:"8px",opacity:.5},j=function(e){var n=e.post,t=e.shareKey,i=(0,_.l)();return n&&t?o.createElement(m.q3,null,o.createElement(v.a,{width:"174px"},o.createElement("div",{className:i(L)},"Copy Friend Link"),o.createElement(V.kZ,{scale:"S",color:"LIGHTER"},'Friend links have moved to the "Share" menu.  ',o.createElement(p.N,{linkStyle:"OBVIOUS",inline:!0,href:(0,M.ZZI)()},"Learn more")))):null},B=t(5249),U=t(91830),W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PostAllowResponsesMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowResponses"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setPostAllowResponses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"allowResponses"},value:{kind:"Variable",name:{kind:"Name",value:"allowResponses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"allowResponses"}}]}}]}}]},H=(0,E.Ng)()((function(e){var n=e.children,t=e.dispatch,i=e.onCompleted,a=e.targetPostId;return o.createElement(B.s,{mutation:W,onCompleted:function(){t((0,U.MZ)({message:"Responses are now hidden for this post."})),i&&i()},variables:{targetPostId:a,allowResponses:!1},optimisticResponse:{__typename:"Mutation",setPostAllowResponses:{__typename:"Post",id:a,allowResponses:!1}}},(function(e){return n({mutate:e})}))})),K=(0,E.Ng)()((function(e){var n=e.children,t=e.dispatch,i=e.onCompleted,a=e.targetPostId;return o.createElement(B.s,{mutation:W,onCompleted:function(){t((0,U.MZ)({message:"Responses are now shown for this post."})),i&&i()},variables:{targetPostId:a,allowResponses:!0},optimisticResponse:{__typename:"Mutation",setPostAllowResponses:{__typename:"Post",id:a,allowResponses:!0}}},(function(e){return n({mutate:e})}))})),z=t(22036),G=t(60603),q=function(e){var n=e.hidePopover,t=e.postId,i=e.allowResponses,a=(0,G.e)(!1),l=(0,r.A)(a,3),d=l[0],s=l[1],c=l[2],u=function(){c(),n()};return o.createElement(o.Fragment,null,o.createElement(H,{targetPostId:t},(function(e){var n=e.mutate;return o.createElement(z.n,{onConfirm:n,isVisible:d,hide:u,entityTypename:"Post"})})),o.createElement(K,{targetPostId:t},(function(e){var n=e.mutate;return o.createElement(m.q3,null,o.createElement(p.N,{onClick:function(){i?s():n()}},i?"Hide responses":"Show responses"))})))},Z=t(65364),$=t(28899),Y=t(45458),J=t(82567),Q={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionSubmissionOption_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionAvatar_collection"}}]}}].concat((0,Y.A)(J.$.definitions))},X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CollectionSubmissionPopoverQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"writerCollections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionSubmissionOption_collection"}}]}},{kind:"Field",name:{kind:"Name",value:"adminCollections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionSubmissionOption_collection"}}]}}]}}]}}].concat((0,Y.A)(Q.definitions))},ee=t(95420),ne=t(42976),te=[{kind:"FragmentDefinition",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}}]}}],ie={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionPostStatusMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CollectionPostStatus"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionPostStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"collectionSlug"},value:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}}},{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"statusForCollection"}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"}}]}}]}}]}}].concat((0,Y.A)(te))},ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RejectPostFromPubMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CollectionPostStatus"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionPostStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"collectionSlug"},value:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}}},{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"statusForCollection"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"}}]}}]}}]}}].concat((0,Y.A)(te))},le=function(e){var n=(0,ee.n)(ie),t=(0,r.A)(n,1)[0];return(0,o.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:ne.d6.APPROVED}})}),[e])},oe=function(e){var n=(0,ee.n)(ae),t=(0,r.A)(n,1)[0];return(0,o.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:ne.d6.REMOVED},optimisticResponse:{manageCollectionPostStatus:{__typename:"Post",id:e.id,statusForCollection:null,collection:null,pendingCollection:null}}}).then((function(e){if(e.errors&&e.errors[0])throw e.errors[0];return e}))}),[e])},re=t(52764),de=t(3005),se=t(99731),ce=t(85864),ue=t(24960),me=t(53908),pe=t(56942),ve=t(27622),ke=t(66305),fe="collectionSubmissionPopover",ge=[{name:"",value:"No publication",content:o.createElement(v.a,{height:"32px",display:"flex",alignItems:"center",marginLeft:"5px"},o.createElement(V.kZ,{scale:"M",color:"DARKER"},"No publication"))}];function be(e){var n=e.collection;return n.name?o.createElement(v.a,{display:"flex",justifyContent:"space-between",width:"200px",alignItems:"center",marginLeft:"5px"},o.createElement(V.kZ,{scale:"M",color:"DARKER"},n.name),o.createElement($.u,{collection:n,size:32})):null}function ye(e){var n=e.show,t=e.post,i=t.statusForCollection,a=t.isPublished,l=o.useState(!1),d=(0,r.A)(l,2),s=d[0],c=d[1];return s||ke.R5.on("load",(function(){return c(!0)})),!i&&a&&s?o.createElement(Ee,{post:t,noQueryReturn:null},(function(e){var i=e.loading,a=e.error,l=e.data;if(i||a)return null;var r=(void 0===l?{viewer:void 0}:l).viewer,d=t.creator;if(!r||!d||r.id!==d.id)return null;var s=r.adminCollections,c=r.writerCollections;return 0===s.length&&0===c.length?null:o.createElement(m.q3,null,o.createElement(p.N,{"aria-controls":fe,"aria-expanded":"false",onClick:n},"Add to publication"))})):null}function he(e){var n=e.isVisible,t=e.hide;return o.createElement(de.l,{isVisible:n,hide:t,withCloseButton:!0},o.createElement(v.a,{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",maxWidth:"480px"},o.createElement(pe.DZ,{scale:"M",tag:"h3"},"Story submitted"),o.createElement(v.a,{paddingTop:"8px",paddingBottom:"24px"},o.createElement(ve.Pd,{scale:"M"},"We’ll email you when the publication editor has reviewed your submission.")),o.createElement(se.$n,{buttonStyle:"OBVIOUS",onClick:t},"OK")))}var Ee=function(e){var n=e.children,t=e.post,i=e.noQueryReturn,a=t.creator;return a?o.createElement(re.c,null,(function(e){return e?e.id!==a.id?i:o.createElement(Z.X,{query:X,ssr:!1},(function(e){var t=e.loading,i=e.error,a=e.data;return n({loading:t,error:i,data:a})})):i})):i},Se=function(e){var n=e.post,t=e.hide,i=e.showLoadingIndicator,a=e.isVisible,l=e.children,d=o.useState(!1),s=(0,r.A)(d,2),c=s[0],u=s[1],m=o.useState(""),k=(0,r.A)(m,2),f=k[0],g=k[1],b=le(n),y=function(e){var n=(0,ee.n)(ie),t=(0,r.A)(n,1)[0];return(0,o.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:ne.d6.PENDING},optimisticResponse:{manageCollectionPostStatus:{__typename:"Post",id:e.id,statusForCollection:ne.d6.PENDING,pendingCollection:n}}})}),[e])}(n);return c||ke.R5.on("load",(function(){return u(!0)})),n.isPublished&&c?o.createElement(ce.B,null,(function(e){var r=e.isVisible,d=e.hide,s=e.show;return o.createElement(o.Fragment,null,o.createElement(he,{hide:d,isVisible:r}),o.createElement(Ee,{post:n,noQueryReturn:l},(function(e){var r=e.loading,d=e.error,c=e.data;if(r||d)return l;var u=(void 0===c?{viewer:void 0}:c).viewer,m=n.creator;if(!u||!m||u.id!==m.id)return l;var k=u.adminCollections,h=u.writerCollections;if(0===k.length&&0===h.length)return l;var E=k.concat(h).filter((function(e){return!!e&&!!e.slug&&!!e.name})).map((function(e){return{name:e.slug||"",value:e.name||"",content:o.createElement(be,{collection:e})}})),S=ge.concat(E),N=k.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),w=h.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),C="";if(f){var O=S.find((function(e){return e.name===f}));O&&(C=O.value)}var x="addStoryToPublicationTitle";return o.createElement(ue.A,{ariaId:fe,hide:t,isVisible:a,popoverRenderFn:function(){return o.createElement(v.a,{padding:"20px",width:"280px",display:"flex",flexDirection:"column"},o.createElement(V.kZ,{scale:"M",color:"DARKER",ariaLabelledById:x},"Add your story to a publication:"),o.createElement(v.a,{marginTop:"10px",position:"relative"},o.createElement(v.a,{position:"absolute",height:"16px",width:"100%",bottom:"0",zIndex:"100",backgroundImage:"linear-gradient(transparent, #ffffff)"}),o.createElement(v.a,{maxHeight:"160px",overflow:"auto"},o.createElement(me.z,{value:C,onChange:g,options:S,radioButtonsName:"addStory",ariaLabelledBy:x}))),o.createElement(v.a,{display:"flex",marginTop:"20px"},f in N?o.createElement(se.$n,{onClick:function(){var e=N[f];t(),i(),b(e).then((function(){window.location.reload()}))},buttonStyle:"OBVIOUS"},"Add story"):o.createElement(se.$n,{onClick:function(){var e=w[f];y(e),t(),s()},disabled:!f},"Submit"),o.createElement(v.a,{marginLeft:"10px"},o.createElement(V.kZ,{scale:"M",color:"LIGHTER"},o.createElement(p.N,{onClick:t},o.createElement(v.a,{padding:"10px"},"Cancel"))))),o.createElement(v.a,{marginTop:"10px"},o.createElement(V.kZ,{scale:"M"},"This story will be automatically submitted to the publication. When you submit your story, the publication's editors will be notified and will be able to edit your story.")))}},l)})))})):l},Ne=function(e){var n=e.children,t=e.isVisible,i=e.post,a=e.hide,l=e.showLoadingIndicator,r=le(i),d=oe(i),s=(0,E.wA)(),c=i.pendingCollection;return c?o.createElement(ue.A,{ariaId:"manageSubmissionPopover",isVisible:t,hide:a,popoverRenderFn:function(){return o.createElement(v.a,{padding:"16px",maxWidth:"280px"},o.createElement(v.a,{display:"flex",flexDirection:"row",alignItems:"center"},o.createElement(v.a,{paddingRight:"8px"},o.createElement($.u,{collection:c,size:40})),o.createElement(V.kZ,{scale:"S"},"This draft is submitted to ",c.name,".")),o.createElement(v.a,{flexDirection:"row",display:"flex",paddingTop:"16px"},o.createElement(v.a,{paddingRight:"8px"},o.createElement(se.$n,{buttonStyle:"OBVIOUS",onClick:function(){a(),l(),r(i.pendingCollection).then((function(){window.location.reload()}))}},"Accept")),o.createElement(se.$n,{buttonStyle:"SUBTLE",onClick:function(){d(i.pendingCollection).then((function(){s((0,U.MZ)({message:"Story removed from ".concat(c.name||"publication")}))})),a()}},"Don't accept")))}},n):n},we=function(e,n){return n&&e.creator&&n.id===e.creator.id},Ce=t(86329),Oe="removeFromPublicationPopover",xe=function(e){var n=e.viewer,t=e.show,i=e.post,a=(0,Ce.J)(i.pendingCollection||i.collection).viewerEdge,l=null==a?void 0:a.isEditor;return n&&("APPROVED"===i.statusForCollection&&(l||function(e,n){var t=e.pendingCollection||e.collection;return t&&t.creator&&n.id===t.creator.id}(i,n)||we(i,n))||"PENDING"===i.statusForCollection&&we(i,n))?o.createElement(m.q3,null,o.createElement(p.N,{"aria-controls":Oe,"aria-expanded":"false",onClick:t},"Remove story from publication")):null},Ae=function(e){var n=e.children,t=e.isVisible,i=e.hide,a=e.post,l=e.viewer,r=(0,E.wA)(),d=oe(a),s=a.collection||a.pendingCollection;return s?o.createElement(ue.A,{ariaId:Oe,isVisible:t,hide:i,popoverRenderFn:function(){return o.createElement(v.a,{padding:"16px",maxWidth:"280px"},o.createElement(v.a,{display:"flex",flexDirection:"row",alignItems:"center"},o.createElement(v.a,{paddingRight:"8px"},o.createElement($.u,{collection:s,size:40})),"APPROVED"===a.statusForCollection?o.createElement(V.kZ,{scale:"S"},we(a,l)?"Your":"This"," story is published in"," ",s.name,"."):"PENDING"===a.statusForCollection?o.createElement(V.kZ,{scale:"S"},"Your story is being reviewed by ",s.name," editors."):o.createElement(V.kZ,{scale:"S"},"This draft is submitted to ",s.name)),o.createElement(v.a,{flexDirection:"row",display:"flex",paddingTop:"16px"},o.createElement(v.a,{paddingRight:"8px"},o.createElement(se.$n,{buttonStyle:"SUBTLE",onClick:function(){d(s).then((function(){r((0,U.MZ)({message:"Story removed from ".concat(s.name||"publication")}))}),(function(){r((0,U.MZ)({message:"There was a problem removing the story from ".concat(s.name||"publication"),toastStyle:"ERROR"}))})),i()}},"PENDING"===a.statusForCollection?"Cancel submission":"Remove from ".concat(s.name||"")))))}},n):n},Pe=t(38714),Fe=t(89142),Ie=t(32038),Te=t(19723),Re=t(43634),De=t(59348),Ve=t(88308),_e=t(21335),Me=t(71984),Le=t(17045),je=function(e){var n=e.hidePopover,t=e.targetUserId,i=e.postId,a=e.viewerId,l=(0,_e.cd)({id:t}).viewerEdge,d=!(null==l||!l.isBlocking),s=(0,G.e)(!1),c=(0,r.A)(s,3),u=c[0],v=c[1],k=c[2],f=(0,o.useCallback)((function(){k(),n()}),[n,k]),g=(0,Le.M)({viewerId:a,targetAuthorId:t,targetPostId:i,onOptimisticComplete:f});return o.createElement(o.Fragment,null,o.createElement(Me.e,{onSubmit:g,isVisible:u,hide:f,type:"story",alreadyBlocking:d}),o.createElement(m.q3,null,o.createElement(p.N,{onClick:v,color:"RED"},"Report story...")))},Be=t(46445),Ue=t(51260),We=function(){for(var e=arguments.length,n=new Array(e),t=0;t{t.d(n,{D:()=>v});var i=t(58168),a=t(80045),l=t(96540),o=t(14782),r=t(86527),d=t(99731),s=t(51260),c=t(65550),u=["size","href","children","handleClick","buttonStyle","type","isVisible"],m=["href","children","handleClick"],p=["handleClick","isVisible","children","href"],v=function(e){var n=e.size,t=e.href,o=e.children,r=e.handleClick,d=e.buttonStyle,m=e.type,p=e.isVisible,v=void 0===p||p,b=(0,a.A)(e,u),y=!(0,c.L)(),h=(0,s.IF)(),E=(0,s.au)(),S=(0,l.useCallback)((function(e){null==r||r(e)}),[r]);if(!v)return null;var N=h(new URL(t).pathname),w=null==N?void 0:N.params.postId,C=t;switch(y||(C=w?E("ShowMobileWebEditorRedirectEditStory",{postId:w}):E("ShowMobileWebEditorRedirectNewStory",{})),m){case"link":return l.createElement(k,(0,i.A)({href:C,handleClick:S},b),o);case"button":return l.createElement(g,{buttonStyle:d,size:n,href:C,handleClick:S},o);case"popover":return l.createElement(f,(0,i.A)({isVisible:v,href:C,handleClick:S},b),o)}},k=function(e){var n=e.href,t=e.children,o=e.handleClick,d=(0,a.A)(e,m);return l.createElement(r.N,(0,i.A)({href:n,onClick:o},d),t)},f=function(e){var n=e.handleClick,t=e.isVisible,r=void 0===t||t,d=e.children,s=e.href,c=(0,a.A)(e,p);return r?l.createElement(o.q3,null,l.createElement(k,(0,i.A)({href:s,handleClick:n},c),d)):null},g=function(e){var n=e.href,t=e.size,i=e.buttonStyle,a=e.children,o=e.handleClick;return l.createElement(d.$n,{buttonStyle:i,size:t,href:n,onClick:o},a)}},83573:(e,n,t)=>{t.d(n,{s:()=>i});var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UserReportStoryMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetAuthorId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"alsoBlockAuthor"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reason"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportStoryAndMaybeBlockAuthor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetAuthorId"},value:{kind:"Variable",name:{kind:"Name",value:"targetAuthorId"}}},{kind:"Argument",name:{kind:"Name",value:"alsoBlockAuthor"},value:{kind:"Variable",name:{kind:"Name",value:"alsoBlockAuthor"}}},{kind:"Argument",name:{kind:"Name",value:"reason"},value:{kind:"Variable",name:{kind:"Name",value:"reason"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isBlocking"}}]}}]}}]}}]}},17045:(e,n,t)=>{t.d(n,{M:()=>s});var i=t(80296),a=t(95420),l=t(96540),o=t(72130),r=t(91830),d=t(83573);function s(e){var n=e.viewerId,t=e.targetAuthorId,s=e.targetPostId,c=e.onOptimisticComplete,u=(0,r.zF)(),m=(0,o.$L)(),p=(0,a.n)(d.s),v=(0,i.A)(p,1)[0];return(0,l.useCallback)((function(e,i){v({variables:{targetAuthorId:t,targetPostId:s,alsoBlockAuthor:e,reason:i},onCompleted:function(){u({message:"Successfully reported post."}),m.event("post.flagged",{postId:s,reason:i})},onError:function(){u({message:"Unable to report this story. Please try again later."})},optimisticResponse:{__typename:"Mutation",reportStoryAndMaybeBlockAuthor:{__typename:"User",id:t,viewerEdge:{__typename:"UserViewerEdge",id:"userId:".concat(t,"-viewerId:").concat(n),isBlocking:e}}}}),null==c||c()}),[v,n,t,s,c])}},83983:(e,n,t)=>{t.d(n,{G:()=>i,P:()=>a});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3EmailToSubscribersMenuItem_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"subscribersCount"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"isNewsletter"}},{kind:"Field",name:{kind:"Name",value:"isAuthorNewsletter"}}]}}]},a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SendPostAsEmailsMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendPostAsEmails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}]}]}}]}},60487:(e,n,t)=>{t.d(n,{z:()=>w});var i,a=t(64467),l=t(80296),o=t(95420),r=t(96540),d=t(52764),s=t(14782),c=t(86527),u=t(52290),m=t(46445),p=t(36557),v=t(44402),k=t(91830);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n0?r.createElement(r.Fragment,null,r.createElement(s.q3,{paddingTopBottom:"8px"},r.createElement(c.N,{"data-testid":"emailToSubscribersMenuItem",onClick:function(){null!=n&&n.isAuthorNewsletter?(x({message:"You’ve already sent this story to subscribers.",toastStyle:"ERROR",duration:2e3}),t()):C()}},"TEXT"===i?r.createElement(u.a,{display:"inline-block"},r.createElement(p.kZ,{scale:"M"},"Email to subscribers")):r.createElement(u.a,{display:"inline-block"},r.createElement(g,{className:a([S,N])}),r.createElement(u.a,{display:"inline-block",marginLeft:"20px"},r.createElement(p.kZ,{scale:"S"},"Email to subscribers"))))),r.createElement(m.T,{onConfirm:function(){F(),A()},isVisible:w,hide:A,titleText:"Email to subscribers",confirmText:"Send",buttonStyle:"STRONG",buttonSize:"LARGE",showCancelButton:!0,withCloseButton:!0,isDestructiveAction:!1},"A link to this story will be emailed to all your subscribers.")):r.createElement(r.Fragment,null)}))}},38714:(e,n,t)=>{t.d(n,{M:()=>i,b:()=>a});var i=function(e){return!!e&&(e.isAuroraVisible||"Collection"===e.__typename&&e.isAuroraEligible&&e.viewerEdge.isEditor)},a=function(e){return!!e&&("Collection"===e.__typename?e.isAuroraVisible||e.isAuroraEligible&&e.viewerEdge.isEditor:e.isAuroraVisible)}},89429:(e,n,t)=>{t.d(n,{N:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"useIsPinnedInContext_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pinnedAt"}},{kind:"Field",name:{kind:"Name",value:"pinnedByCreatorAt"}}]}}]}},89142:(e,n,t)=>{t.d(n,{L:()=>d,m:()=>s});var i=t(80296),a=t(95420),l=t(96540),o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetPinnedAtMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pinnedAt"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"setPinnedAt"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"targetCollectionId"},value:{kind:"Variable",name:{kind:"Name",value:"collectionId"}}},{kind:"Argument",name:{kind:"Name",value:"pinnedAt"},value:{kind:"Variable",name:{kind:"Name",value:"pinnedAt"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pinnedAt"}}]}}]}}]}}]},r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PostSetPinnedByCreatorAtMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isPinned"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setPostPinnedOnCreatorProfile"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"ObjectField",name:{kind:"Name",value:"isPinned"},value:{kind:"Variable",name:{kind:"Name",value:"isPinned"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]},d=function(e){var n=e.id,t=e.collection,r=e.pendingCollection,d=e.pinnedAt,s=(t||r||{id:""}).id,c=(0,a.n)(o,{optimisticResponse:{__typename:"Mutation",setPinnedAt:{__typename:"Post",id:n,collection:t,pendingCollection:r,pinnedAt:d?0:Date.now()}}}),u=(0,i.A)(c,1)[0],m=l.useCallback((function(){return u({variables:{postId:n,collectionId:s,pinnedAt:!d}})}),[n,s,d,u]);return[d,m]},s=function(e){var n=e.id,t=e.pinnedByCreatorAt,o=(0,a.n)(r,{optimisticResponse:{setPostPinnedOnCreatorProfile:{__typename:"MutationSuccess"}},update:function(e,i){var a;"MutationSuccess"===(null===(a=i.data)||void 0===a?void 0:a.setPostPinnedOnCreatorProfile.__typename)&&e.modify({id:"Post:".concat(n),fields:{pinnedByCreatorAt:function(){return t?0:Date.now()}}})}}),d=(0,i.A)(o,1)[0],s=l.useCallback((function(){return d({variables:{postId:n,isPinned:!t}})}),[n,d,t]);return[t,s]}},62427:(e,n,t)=>{t.d(n,{L:()=>w});var i,a=t(64467),l=t(96540),o=t(86527),r=t(5600),d=t(36557),s=t(72130),c=t(49287),u=t(44402);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.d(n,{_:()=>o});var i=t(58168),a=t(96540),l=t(62427),o=function(e){var n=!e.allowResponses||e.isLimitedState||!e.isPublished,t=(0,a.useMemo)((function(){return e.isPublished?e.allowResponses?e.isLimitedState?"This feature is temporarily disabled":void 0:"Responses hidden":"You cannot respond to a draft"}),[e.isPublished,e.allowResponses,e.isLimitedState]);return a.createElement(l.L,(0,i.A)({},e,{disabled:n,disabledTooltipText:t}))}},32038:(e,n,t)=>{t.d(n,{T:()=>a,e:()=>i});var i="This story is also a response to another story. Are you sure you want to delete this story?",a="This story is also a response to another story. Any edits are applied to both."},32996:(e,n,t)=>{t.d(n,{A:()=>s});var i=t(58168),a=t(96540),l=t(86527),o=t(52290),r=t(24960),d=t(36557);function s(e){var n=e.boxProps,t=void 0===n?{}:n,s=e.children,c=e.dismiss,u=e.dismissText,m=void 0===u?"Ok, got it.":u,p=e.isVisible,v=e.onShow,k=e.message,f=e.withBoldNew,g=void 0!==f&&f,b=e.targetDistance,y=void 0===b?5:b,h=e.positioningStrategy;return(0,a.useEffect)((function(){p&&v&&v()}),[p]),a.createElement(r.A,{hide:c,isVisible:p,noPortal:!0,darkTheme:!0,popoverRenderFn:function(){return a.createElement(o.a,(0,i.A)({padding:"16px"},t),a.createElement(o.a,{marginBottom:"12px"},a.createElement(d.kZ,{scale:"S",color:"WHITE",tag:"span"},g&&a.createElement("strong",null,"New! "),k)),a.createElement(d.kZ,{scale:"S",color:"WHITE"},a.createElement(l.N,{onClick:c,linkStyle:"OBVIOUS",inline:!0},m)))},referenceWidth:"100%",targetDistance:y,positioningStrategy:h},s)}},94170:(e,n,t)=>{t.d(n,{a:()=>A});var i=t(80296),a=t(96540),l=t(96063),o=t(79766),r=t(52290),d=t(99731),s=t(3005),c=t(48198),u=t(85050),m=t(27049),p=t(56942),v=t(36557),k=t(98761),f=t(18642),g=t(46963),b={xs:"SMALL",sm:"REGULAR",md:"REGULAR",lg:"REGULAR",xl:"REGULAR"},y={position:"absolute",top:"8px",left:"0",width:"100%",minHeight:"calc(100% - 8px)",borderRadius:"12px 12px 0 0",padding:"0 24px 24px"},h=function(e){return{"0%":{transform:e?"translateY(100%)":"translateY(16px)"},"100%":{transform:e?"translateY(0%)":"translateY(0px)"}}},E=function(e){return{"0%":{transform:e?"translateY(0%)":"translateY(0px)"},"100%":{transform:e?"translateY(100%)":"translateY(16px)"}}},S={"0%":{opacity:"0"},"100%":{opacity:"1"}},N={"0%":{opacity:"1"},"100%":{opacity:"0"}},w={"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.02)"},"75%":{transform:"scale(1.02)"},"100%":{transform:"scale(1)"}},C={"0%":{background:(0,f.qy)(0)},"100%":{background:(0,f.qy)(.25)}},O={"0%":{background:(0,f.qy)(.25)},"100%":{background:(0,f.qy)(0)}},x={padding:"24px 0"},A=function(e){var n=e.hide,t=e.title,A=e.subtitle,P=e.subtitleTextAlign,F=e.onConfirm,I=e.confirmText,T=e.confirmButtonStyle,R=void 0===T?"STRONG":T,D=e.onCancel,V=e.cancelText,_=e.cancelButtonStyle,M=void 0===_?"OBVIOUS":_,L=e.children,j=e.withCloseButton,B=void 0===j||j,U=e.hideOnConfirm,W=void 0===U||U,H=e.preventClickOutside,K=e.confirmDisabled,z=e.confirmBeforeLeavePage,G=e.delayHideEnabled,q=e.padding,Z=void 0===q?"32px":q,$=e.subtitleMargin,Y=void 0===$?"24px":$,J=e.subtitleColor,Q=void 0===J?"DARKER":J,X=(0,a.useRef)(null),ee=(0,a.useState)(!0),ne=(0,i.A)(ee,2),te=ne[0],ie=ne[1],ae=(0,a.useState)(!0),le=(0,i.A)(ae,2),oe=le[0],re=le[1],de=(0,g.U)()===m.i.xs,se=(0,k.h)({modalBounceKeyframe:w,overlayFadeInKeyframe:C,overlayFadeOutKeyframe:O}),ce=se.modalBounceKeyframe,ue=se.overlayFadeInKeyframe,me=se.overlayFadeOutKeyframe,pe=(0,a.useCallback)((function(){re(!1)}),[]),ve=(0,a.useCallback)((function(e){X.current&&H&&!de&&(e.preventDefault(),e.stopPropagation(),X.current.style.animation="".concat(ce," 600ms ease-in-out"))}),[ce,H,de]);(0,l.A)(X,ve),(0,o.c)({disabled:!z});var ke=(0,a.useCallback)((function(){null==F||F(),W&&pe()}),[pe,F,W]),fe=(0,a.useCallback)((function(){null==D||D(),pe()}),[pe,D]),ge=(0,a.useMemo)((function(){return I||V?a.createElement(r.a,{display:"flex",justifyContent:"flex-end",gap:"16px"},V&&a.createElement(d.$n,{buttonStyle:M,onClick:fe,size:b},V),I&&a.createElement(d.$n,{buttonStyle:R,onClick:ke,size:b,disabled:K},I)):null}),[F,I,R,D,V,M,pe,K]);(0,a.useEffect)((function(){if(X.current)return X.current.addEventListener("animationend",e),function(){var n;null===(n=X.current)||void 0===n||n.removeEventListener("animationend",e)};function e(){X.current.style.animation=""}}),[]),(0,a.useEffect)((function(){if(!oe&&n){var e=setTimeout((function(){n()}),310);return function(){clearTimeout(e)}}}),[oe,n]),(0,a.useEffect)((function(){G&&re(!1)}),[G]);var be,ye=(0,a.useCallback)((function(){return ie(!1)}),[]),he=function(e){var n=e.isAnimating,t=e.isVisible,i=e.isMobile,a=(0,k.h)({modalSlideInKeyframe:h(i),modalSlideOutKeyframe:E(i),modalFadeInKeyframe:S,modalFadeOutKeyframe:N,modalBounceKeyframe:w,overlayFadeInKeyframe:C,overlayFadeOutKeyframe:O}),l=a.modalSlideInKeyframe,o=a.modalSlideOutKeyframe,r=a.modalFadeInKeyframe,d=a.modalFadeOutKeyframe;if(t&&!n)return{animation:"none"};var s="".concat(t?l:o," ").concat(300,"ms forwards cubic-bezier(0.4, 0, 0.2, 1)");if(i)return{animation:s,position:"absolute",width:"100%",height:"calc(100% - 8px)"};var c="".concat(t?r:d," 150ms forwards ease-in-out");return{animation:"".concat(s,", ").concat(c)}}({isAnimating:te,isVisible:oe,isMobile:de});return a.createElement(s.l,{isVisible:oe,hide:H?void 0:pe,withCloseButton:!1,withLayerAnimation:!1,withAnimation:!0,padding:0,customBackgroundColor:(0,f.qy)(.25),layerRules:[x,(be=oe?ue:me,function(){return{animation:"".concat(be," 150ms forwards ease-in-out")}})],containerRules:he,onAnimationEnd:ye},a.createElement(r.a,{ref:X,boxShadow:"rgba(0, 0, 0, 0.15) 0px 2px 10px",width:"540px",padding:Z,borderRadius:"4px",backgroundColor:"BACKGROUND",position:"relative",xs:y},a.createElement(u.V,{xs:!0,height:"56px",marginBottom:"16px",paddingTop:"16px"},ge),a.createElement(r.a,{textAlign:"center"},a.createElement(p.DZ,{scale:"S"},t)),A&&a.createElement(r.a,{marginTop:Y,textAlign:P},a.createElement(v.kZ,{scale:"M",color:Q},A)),L&&a.createElement(r.a,{marginTop:"32px"},L),ge&&a.createElement(u.V,{sm:!0,md:!0,lg:!0,xl:!0,marginTop:"32px"},ge),B&&a.createElement(r.a,{position:"absolute",right:{xs:void 0,sm:"16px",md:"16px",lg:"16px",xl:"16px"},top:{xs:"18px",sm:"16px",md:"16px",lg:"16px",xl:"16px"},left:{xs:"18px",sm:void 0,md:void 0,lg:void 0,xl:void 0}},a.createElement(c.J,{isPositionAbsolute:!1,compensateInnerPadding:!1,size:"REGULAR",onClick:pe}))))}},55981:(e,n,t)=>{t.d(n,{n:()=>r});var i=t(96540),a=t(44402),l=t(1417),o=function(e){return{"& path":{fill:e.colorTokens.foreground.error.primary.base}}},r=function(){var e=(0,a.l)();return i.createElement(l.A,{className:e(o)})}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/1530.60750ec6.chunk.js.map