1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6441],{16013:(t,e,r)=>{"use strict";r.d(e,{Dn:()=>m,HX:()=>f,OG:()=>g,Qd:()=>h,_T:()=>p,mr:()=>c,pl:()=>l,tH:()=>d,yp:()=>b});var n=r(64714),s=r(20708),o=r(63600),a=r(78674);function u(t,e){return{type:a.ddt,count:t.data.count,totalPage:t.data.count%4>0?Math.floor(t.data.count/4)+1:Math.floor(t.data.count/4),pageNumber:e||0,albums:t.data.results}}function l(t,e,r){const n=r?{Authorization:`Token ${r}`}:{};return r=>(r({type:a.$GX}),s.Ay.get(o.WS(t,4),{headers:n}).then((t=>r(u(t,e)))))}function i(t,e,r,n){const a=n?{Authorization:`Token ${n}`}:{};return n=>{const l=r?r-1>4*e?4*e:4*(e-1):0;return s.Ay.get(o.WS(t,4,l),{headers:a}).then((t=>{t.data.count>4*e?n(u(t,e)):n(u(t,e-1))}))}}function c(t,e,r){const n=r?{Authorization:`Token ${r}`}:{};return r=>{const a=4*e;return s.Ay.get(o.WS(t,4,a),{headers:n}).then((t=>r(u(t,e))))}}function h(t,e,r,u){const l=u?{Authorization:`Token ${u}`}:{};return u=>(u({type:a.KSt}),(0,s.Ay)({url:o.iFP(e),method:"POST",data:t,headers:l}).then((t=>{window.location.href=`${r?"/"+r:"/clubs/"+e}/album/${t.data.id}/photos`})).catch((t=>{return u((e=(0,n.vG)(t,"Could not create your album"),{type:a.nWw,messageError:"string"===typeof e?e:e[0]}));var e})))}function p(t){return{type:a.Xgr,albumRequestDeleteId:t}}function d(t){return{type:a.Gok,albumRequestDeleteId:t}}function m(t,e,r,u,l){const c=l?{Authorization:`Token ${l}`}:{};return h=>(h(function(t){return{type:a.yq7,albumId:t}}(e)),s.Ay.delete(o.sKP(t,e),{headers:c}).then((()=>{h(i(t,r,u,l))})).catch((t=>{return h((e=(0,n.vG)(t,"Could not delete your album"),{type:a.xpU,messageError:e}));var e})))}function b(t){return{type:a.Gfm,albumId:t}}function f(){return{type:a._Ne}}function g(t,e,r){return u=>(u({type:a.nKy}),(0,s.Ay)({url:o.sKP(t,e),method:"PATCH",data:r}).then((()=>{u(i(t,0))})).catch((t=>{return u((e=(0,n.vG)(t,"Could not update album name"),{type:a.qWt,messageError:e}));var e})))}},30291:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});r(17725),r(85340),r(75242);var n=r(23065),s=r(76848),o=r(85129),a=r(9950),u=r(50663),l=r(44414);class i extends a.Component{constructor(t){super(t),this.handleChange=t=>{this.setState({name:t.target.value})},this.handleCancel=t=>{t.preventDefault();const{clubSlug:e,clubId:r}=this.props;"undefined"!==typeof window&&(window.location.href=(e?"/"+e:"/clubs/"+r)+"/albums")}
1,this.handleSubmit=t=>{t.preventDefault();const e=this.getParams();this.props.onSubmit(e)},this.state={name:"",photos:[]}}getParams(){return{name:this.state.name,photos:this.state.photos}}render(){const t=Object.assign({},u.A1);return t.lines=12,t.length=5,t.width=2,t.radius=5,t.color="#fff",t.position="relative",(0,l.jsxs)("div",{className:"create-poll-form",children:[(0,l.jsx)("div",{className:"main-form",children:(0,l.jsxs)("div",{className:"col-sm-12",children:[(0,l.jsx)(o.A_,{"aria-required":!0,error:this.props.creatingAlbumError,name:"name",onChange:this.handleChange,placeholder:"ALBUM NAME",readOnly:!1,type:"text",value:this.state.name}),(0,l.jsx)(o.Fv,{errors:{name:this.props.creatingAlbumError}})]})}),(0,l.jsxs)("div",{className:"form-group button-group clearfix row main-form",children:[(0,l.jsx)("button",{className:"btn btn-default-corner btn-cancel",onClick:this.handleCancel,type:"button",children:"Cancel"}),(0,l.jsx)("button",{className:"btn btn-default-corner btn-create-poll",disabled:this.props.creatingAlbum,onClick:this.handleSubmit,type:"submit",children:this.props.creatingAlbum?(0,l.jsx)(s.y$,{config:t}):"Create album"})]})]})}}const c=i;var h=r(16013),p=r(22257),d=r(64714),m=r(2197);class b extends a.Component{constructor(...t){super(...t),this.handleCreateAlbum=t=>{this.props.dispatch((0,h.Qd)(t,this.props.clubId,this.props.clubSlug))}}render(){const{clubId:t,clubSlug:e}=this.props;return(0,l.jsx)(p.A,{active:u.Ok.ALBUMS,className:"club-album",clubId:t,clubSlug:e,hasGoBack:!0,headerProps:{className:"block-main-header--mobile-goback",goBackLink:(0,d.sW)({slug:e||"",id:t},"albums"),goBackTitle:m.yH.GO_BACK_TITLE},title:"",children:(0,l.jsxs)("div",{className:"block-content",children:[(0,l.jsx)("h2",{className:"block-title",children:m.yH.CREATE_TITLE}),(0,l.jsx)(c,{clubId:this.props.clubId,clubSlug:this.props.clubSlug,creatingAlbum:this.props.creatingAlbum,creatingAlbumError:this.props.creatingAlbumError,onSubmit:this.handleCreateAlbum})]})})}}const f=b;var g=r(60853),A=r(6601);class y extends a.Component{constructor(...t){super(...t),this.checkPermisson=()=>{const{club:t}=this.props;
1t.id&&!(0,A.wO)(t,u.SS.PHOTO_ALBUM)&&"undefined"!==typeof window&&(document.referrer.includes("bookclubs")?window.history.back():window.location.href="/")}}componentDidMount(){this.checkPermisson()}componentDidUpdate(t){t.club.id!==this.props.club.id&&this.props.club.id&&this.checkPermisson()}render(){const t=this.props.club.id||Number(this.props.match.params.id);return(0,l.jsx)(n.A,{children:(0,l.jsx)(f,{clubId:t,clubSlug:this.props.match.params.clubSlug,creatingAlbum:this.props.creatingAlbum,creatingAlbumError:this.props.creatingAlbumError,dispatch:this.props.dispatch})})}}const v=(0,g.Ng)((t=>({creatingAlbum:!!t.albums&&t.albums.creatingAlbum,creatingAlbumError:t.albums?t.albums.creatingAlbumError:null,club:t.clubInfo})))(y)},83107:(t,e,r)=>{var n=r(11049);t.exports=function(t,e){return!!(null==t?0:t.length)&&n(t,e,0)>-1}},23259:t=>{t.exports=function(t,e,r){for(var n=-1,s=null==t?0:t.length;++n<s;)if(r(e,t[n]))return!0;return!1}},88183:(t,e,r)=>{var n=r(36669),s=r(83107),o=r(23259),a=r(63445),u=r(3739),l=r(26557);t.exports=function(t,e,r){var i=-1,c=s,h=t.length,p=!0,d=[],m=d;if(r)p=!1,c=o;else if(h>=200){var b=e?null:u(t);if(b)return l(b);p=!1,c=a,m=new n}else m=e?[]:d;t:for(;++i<h;){var f=t[i],g=e?e(f):f;if(f=r||0!==f?f:0,p&&g===g){for(var A=m.length;A--;)if(m[A]===g)continue t;e&&m.push(g),d.push(f)}else c(m,g,r)||(m!==d&&m.push(g),d.push(f))}return d}},3739:(t,e,r)=>{var n=r(57887),s=r(19208),o=r(26557),a=n&&1/o(new n([,-0]))[1]==1/0?function(t){return new n(t)}:s;t.exports=a},19208:t=>{t.exports=function(){}},80561:(t,e,r)=>{var n=r(88183);t.exports=function(t){return t&&t.length?n(t):[]}},75242:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.