text: (window.webpackJsonp=window.webpackJsonp||[]).push([[41],{"1gua":function(e,t,n){"use strict";var a=n("eVuF"),r=n.n(a),s=n("ln6h"),i=n.n(s),o=n("O40h"),c=n("vDqi"),u=n.n(c),l=n("obyI"),p=n("cph9"),h=u.a.create({baseURL:l.c+"/api"});h.interceptors.request.use(function(){var e=Object(o.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(p.a)();case 2:return n=Object(p.b)("ACCESS_TOKEN"),t.headers.Authorization=void 0==n?Object(p.d)():n,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());t.a={getLocations:function(){return function(e){return new r.a(function(){var e=Object(o.a)(i.a.mark((function e(t,n){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.get("/v1/locations");case 3:200===(a=e.sent).status&&0===a.data.status.code?t(a):n(a),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),n(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},setField:function(e,t,n,a,r){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;return function(c){return c({type:"SET_FIELD",label:t,field_type:n,notes:a,need_otp:s,placeholder:r,option_data:i,index:e,disabled_condition:o})}},scanQRCode:function(e){return function(t){return new r.a(function(){var t=Object(o.a)(i.a.mark((function t(n,a){var r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,h.post("/v1/qrcode",{qrcode:e});case 3:200===(r=t.sent).status&&0===r.data.status.code?n(r):a(r),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}}}},"3OM0":function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("q1tI"),i=n.n(s),o=n("17x9"),c=n.n(o),u=n("TSYQ"),l=n.n(u),p=n("xQ8M"),h=n.n(p),d=n("33Jr"),f=c.a.oneOfType([c.a.number,c.a.string]),m=c.a.oneOfType([c.a.string,c.a.number,c.a.shape({size:f,push:Object(d.e)(f,'Please use the prop "order"'),pull:Object(d.e)(f,'Please use the prop "order"'),order:f,offset:f})]),v={children:c.a.node,hidden:c.a.bool,check:c.a.bool,size:c.a.string,for:c.a.string,tag:d.m,className:c.a.string,cssModule:c.a.object,xs:m,sm:m,md:m,lg:m,xl:m,widths:c.a.array},b={tag:"label",widths:["xs","sm","md","lg","xl"]},g=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},_=function(e){var t=e.className,n=e.cssModule,s=e.hidden,o=e.widths,c=e.tag,u=e.check,p=e.size,f=e.for,m=Object(r.a)(e,["className","cssModule","hidden","widths","tag","check","size","for"]),v=[];o.forEach((function(t,a){var r=e[t];if(delete m[t],r||""===r){var s,i=!a;if(h()(r)){var o,c=i?"-":"-"+t+"-";s=g(i,t,r.size),v.push(Object(d.i)(l()(((o={})[s]=r.size||""===r.size,o["order"+c+r.order]=r.order||0===r.order,o["offset"+c+r.offset]=r.offset||0===r.offset,o))),n)}else s=g(i,t,r),v.push(s)}}));var b=Object(d.i)(l()(t,!!s&&"sr-only",!!u&&"form-check-label",!!p&&"col-form-label-"+p,v,!!v.length&&"col-form-label"),n);return i.a.createElement(c,Object(a.a)({htmlFor:f},m,{className:b}))};_.propTypes=v,_.defaultProps=b,t.a=_},L3zb:function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("dI71"),i=n("JX7q"),o=n("q1tI"),c=n.n(o),u=n("17x9"),l=n.n(u),p=n("TSYQ"),h=n.n(p),d=n("33Jr"),f={children:l.a.node,type:l.a.string,size:l.a.string,bsSize:l.a.string,state:Object(d.e)(l.a.string,'Please use the props "valid" and "invalid" to indicate the state.'),valid:l.a.bool,invalid:l.a.bool,tag:d.m,innerRef:l.a.oneOfType([l.a.object,l.a.func,l.a.string]),static:Object(d.e)(l.a.bool,'Please use the prop "plaintext"'),plaintext:l.a.bool,addon:l.a.bool,className:l.a.string,cssModule:l.a.object},m=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(Object(i.a)(Object(i.a)(n))),n.focus=n.focus.bind(Object(i.a)(Object(i.a)(n))),n}Object(s.a)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.focus=function(){this.ref&&this.ref.focus()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,s=e.type,i=e.bsSize,o=e.state,u=e.valid,l=e.invalid,p=e.tag,f=e.addon,m=e.static,v=e.plaintext,b=e.innerRef,g=Object(r.a)(e,["className","cssModule","type","bsSize","state","valid","invalid","tag","addon","static","plaintext","innerRef"]),_=["radio","checkbox"].indexOf(s)>-1,w=new RegExp("\\D","g"),k=p||("select"===s||"textarea"===s?s:"input"),y="form-control";v||m?(y+="-plaintext",k=p||"input"):"file"===s?y+="-file":_&&(y=f?null:"form-check-input"),o&&"undefined"===typeof u&&"undefined"===typeof l&&("danger"===o?l=!0:"success"===o&&(u=!0)),g.size&&w.test(g.size)&&(Object(d.n)('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),i=g.size,delete g.size);var O=Object(d.i)(h()(t,l&&"is-invalid",u&&"is-valid",!!i&&"form-control-"+i,y),n);return("input"===k||p&&"function"===typeof p)&&(g.type=s),!g.children||v||m||"select"===s||"string"!==typeof k||"select"===k||(Object(d.n)('Input with a type of "'+s+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete g.children),c.a.createElement(k,Object(a.a)({},g,{ref:b,className:O}))},t}(c.a.Component);m.propTypes=f,m.defaultProps={type:"text"},t.a=m},TTXP:function(e,t,n){"use strict";var a=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("q1tI")),s=(0,a(n("8/g6")).default)(r.default.createElement(r.default.Fragment,null,r.default.createElement("circle",{cx:"12",cy:"12",r:"3.2"}),r.default.createElement("path",{d:"M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"})),"CameraAlt");t.default=s},UeEt:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/edit-profile",function(){return n("eIvD")}])},eIvD:function(e,t,n){"use strict";n.r(t);var a=n("hfKm"),r=n.n(a),s=n("2Eek"),i=n.n(s),o=n("XoMD"),c=n.n(o),u=n("Jo+v"),l=n.n(u),p=n("4mXO"),h=n.n(p),d=n("pLtp"),f=n.n(d),m=n("vYYK"),v=n("Cg2A"),b=n.n(v),g=n("0iUn"),_=n("MI3g"),w=n("a7VT"),k=n("sLSF"),y=n("Tit0"),O=n("q1tI"),j=n.n(O),x=n("/MKj"),C=n("nOHt"),N=n.n(C),E=n("ndts"),T=n("Bhuq"),S=n.n(T),P=n("TRZx"),R=n.n(P),z=n("SqZg"),F=n.n(z),M=(n("cfN/"),function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),r()(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}());function I(){}var D=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||S()(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=F()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(R.a?R()(e,t):e.__proto__=t)}(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.onRequestClose,n=e.onCancel,a=e.cancelText,r=e.menus,s=e.show;return j.a.createElement("div",{className:"react-actionsheet"+(s?" react-actionsheet-show":""),onClick:t},j.a.createElement("div",{className:"react-actionsheet-mask"}),j.a.createElement("div",{className:"react-actionsheet-wrap"},j.a.createElement("div",{className:"react-actionsheet-menu"},r.map((function(e,t){var n=e.content,a=e.onClick,r=void 0===a?I:a;return j.a.createElement("div",{key:t,className:"react-actionsheet-menu-item",onClick:r},n)}))),j.a.createElement("div",{className:"react-actionsheet-action"},j.a.createElement("div",{className:"react-actionsheet-action-item",onClick:n},a))))}}]),t}(j.a.Component);D.defaultProps={onRequestClose:I,onCancel:I,cancelText:"\u53d6\u6d88",show:!1,menus:[]};var L=D,q=n("x91w"),U=n("uGE4"),A=n("1gua"),V=n("cph9"),J=n("Ywvz"),Y=n("zeFo"),G=n("uBiN"),B=n("jrRI"),K=n("3OM0"),Q=n("q7Gj"),X=n("L3zb"),H=n("hfUC"),Z=n("TTXP"),W=n.n(Z),$=(n("EcZ2"),j.a.createElement);function ee(e,t){var n=f()(e);if(h.a){var a=h()(e);t&&(a=a.filter((function(t){return l()(e,t).enumerable}))),n.push.apply(n,a)}return n}var te=function(e){function t(e){var n;return Object(g.a)(this,t),(n=Object(_.a)(this,Object(w.a)(t).call(this,e))).state={nickname:"",nickname_invalid:!1,nickname_invalid_message:"",email:"",email_invalid:!1,email_invalid_message:"",phone_number:"",phone_number_invalid:!1,phone_number_invalid_message:"",fullname:"",fullname_invalid:!1,fullname_invalid_message:"",birthdate:new Date,birthdate_invalid:!1,birthdate_invalid_message:"",gender:"",gender_invalid:!1,gender_invalid_message:"",location:"",location_invalid:!1,location_invalid_message:"",location_data:[],interest_data:[],interests:"",interests_invalid:!1,interests_invalid_message:"",otp:"",show_action_sheet:!1,input_photo_accept:"image/*",profile_photo_src:"https://cdn.zeplin.io/5c7fab96082323628629989f/assets/DDD7D5C6-7114-402B-A0C4-4EC7DE7707BC.svg"},n.inputPhotoElement=null,n}return Object(y.a)(t,e),Object(k.a)(t,null,[{key:"getInitialProps",value:function(e){Object(E.a)(e)}}]),Object(k.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.props.getUserData().then((function(t){if(200===t.status){for(var n=t.data.data,a=[],r=0;r<n.interest.length;r++)a.push(n.interest[r].name);e.setState({email:n.email,phone_number:n.phone_number,nickname:n.nickname?n.nickname:"",fullname:n.display_name,birthdate:new Date(n.dob?1e3*n.dob:b()()),gender:n.gender,location:n.location,profile_photo_src:n.photo_url?n.photo_url:e.state.profile_photo_src,interest_data:n.interest,interests:a.join(",")},(function(){e.props.setUserProfile(e.state.nickname,e.state.fullname,e.state.birthdate,e.state.gender,e.state.phone_number,e.state.email,e.state.otp,e.state.location)}))}})).catch((function(e){})),this.props.getLocations().then((function(t){200===t.status&&e.setState({location_data:t.data.data})})).catch((function(e){}))}},{key:"handleSubmit",value:function(e){e.preventDefault()}},{key:"formatDate",value:function(e){var t=e.getFullYear(),n=("0"+(e.getMonth()+1)).slice(-2);return("0"+e.getDate()).slice(-2)+"/"+n+"/"+t}},{key:"onChangeNickname",value:function(e){this.setState({nickname:e.target.value})}},{key:"onChangeInterests",value:function(e){this.setState({interests:e.target.value})}},{key:"onChangeEmail",value:function(e){this.setState({email:e.target.value})}},{key:"onChangePhoneNumber",value:function(e){this.setState({phone_number:e.target.value})}},{key:"onChangeFullname",value:function(e){this.setState({fullname:e.target.value})}},{key:"onChangeBirthdate",value:function(e){this.setState({birthdate:e})}},{key:"onChangeGender",value:function(e){this.setState({gender:e.target.value})}},{key:"onChangeLocation",value:function(e){this.setState({location:e.target.value})}},{key:"goToFormField",value:function(e,t,n,a,r){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;this.props.setField(e,t,n,a,r,s,i,o),N.a.push("/user/edit/form-field")}},{key:"handleCameraTakePhoto",value:function(e,t){var n=new FileReader,a=this;n.onload=function(e){a.setState({profile_photo_src:e.target.result},(function(){a.props.setUserProfilePhoto(a.state.profile_photo_src),N.a.push("/user/photo/crop")}))},n.readAsDataURL(e.target.files[0])}},{key:"render",value:function(){var e=this;return $(J.a,{title:"RCTI+ - Live Streaming Program 4 TV Terpopuler"},$(Y.a,{visible:!0,title:"Edit Profile",dropdownMenu:[{label:"Change Password",callback:function(){N.a.push("/user/change-password")}},{label:"Log Out",callback:function(){e.props.logout(1).then((function(){return N.a.push("/signin")})).catch((function(){return Object(V.e)("ACCESS_TOKEN")}))}}]}),$(L,{show:this.state.show_action_sheet,menus:[{content:"Camera",onClick:function(){e.setState({input_photo_accept:"image/*;capture=camera"},(function(){return e.inputPhotoElement.click()}))}},{content:"Gallery",onClick:function(){e.setState({input_photo_accept:"image/*"},(function(){return e.inputPhotoElement.click()}))}}],onRequestClose:function(){return e.setState({show_action_sheet:!e.state.show_action_sheet})},cancelText:"Cancel"}),$("div",{className:"wrapper-content container-box-ep",style:{marginTop:50}},$("input",{onChange:this.handleCameraTakePhoto.bind(this),ref:function(t){return e.inputPhotoElement=t},id:"profile-photo-data",type:"file",accept:this.state.input_photo_accept,style:{display:"none"}}),$(G.a,{onSubmit:this.handleSubmit.bind(this)},$(B.a,{className:"profile-photo-container"},$("div",{className:"profile-photo",onClick:function(){return e.setState({show_action_sheet:!e.state.show_action_sheet})}},$("img",{className:"profile-photo",src:this.state.profile_photo_src}),$(W.a,{className:"profile-photo-button"}))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"nickname"},"Nickname (Live Chat)"),$(Q.a,null,$(X.a,{onClick:this.goToFormField.bind(this,0,"Nickname (Live Chat)","text","\n                                        <ul>\n                                            <li>You may change your username back after 14 days</li>\n                                            <li>Username has never been used with another user</li>\n                                        </ul>\n                                    ","insert nickname",!1,[],{length:4,type:"min"}),value:this.state.nickname,onChange:this.onChangeNickname.bind(this),invalid:this.state.nickname_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.nickname_invalid&&!!this.state.nickname},this.state.nickname_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"fullname"},"Full Name"),$(Q.a,null,$(X.a,{onClick:this.goToFormField.bind(this,1,"Full Name","text","","insert full name",!1,[],{length:25,type:"max"}),value:this.state.fullname,onChange:this.onChangeFullname.bind(this),invalid:this.state.fullname_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.fullname_invalid&&!!this.state.fullname},this.state.fullname_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"birthdate"},"Birthdate"),$(Q.a,null,$(X.a,{onClick:this.goToFormField.bind(this,2,"Birthdate","date","","dd/mm/yy",!1),value:this.formatDate(this.state.birthdate),onChange:this.onChangeBirthdate.bind(this),invalid:this.state.birthdate_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.birthdate_invalid&&!!this.state.birthdate},this.state.birthdate_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"gender"},"Gender"),$(Q.a,null,$(X.a,{type:"select",onClick:this.goToFormField.bind(this,3,"Gender","select","","select gender",!1,["Male","Female"]),value:this.state.gender?this.state.gender.charAt(0).toUpperCase()+this.state.gender.substring(1):"",onChange:this.onChangeGender.bind(this),invalid:this.state.gender_invalid,className:"form-control-ep"},$("option",null),$("option",null,"Male"),$("option",null,"Female")),$(H.a,{valid:!this.state.gender_invalid&&!!this.state.gender},this.state.gender_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"phone_number"},"Phone Number"),$(Q.a,null,$(X.a,{onClick:this.goToFormField.bind(this,4,"Phone Number","phone","\n                                        <ul>\n                                            <li>Make sure the phone number is active because we will sent you verification code to verify and secure your account</li>\n                                        </ul>\n                                    ","insert phone number",!0),value:this.state.phone_number?this.state.phone_number:"",onChange:this.onChangePhoneNumber.bind(this),invalid:this.state.phone_number_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.phone_number_invalid&&!!this.state.phone_number},this.state.phone_number_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"email"},"Email"),$(Q.a,null,$(X.a,{onClick:this.goToFormField.bind(this,5,"Email","email","","insert email",!0),value:this.state.email,onChange:this.onChangeEmail.bind(this),invalid:this.state.email_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.email_invalid&&!!this.state.email},this.state.email_invalid_message))),$(B.a,null,$(K.a,{className:"form-label-ep",for:"nickname"},"Interests"),$(Q.a,null,$(X.a,{onClick:function(){return N.a.push("/user/edit/interest")},value:this.state.interests,onChange:this.onChangeInterests.bind(this),invalid:this.state.interests_invalid,className:"form-control-ep"}),$(H.a,{valid:!this.state.interests_invalid&&!!this.state.interests},this.state.interests_invalid_message))),$(B.a,null))))}}]),t}(j.a.Component);t.default=Object(x.b)((function(e){return e}),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){Object(m.a)(e,t,n[t])})):c.a?i()(e,c()(n)):ee(Object(n)).forEach((function(t){r()(e,t,l()(n,t))}))}return e}({},U.a,{},A.a,{},q.a))(te)},hfUC:function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("q1tI"),i=n.n(s),o=n("17x9"),c=n.n(o),u=n("TSYQ"),l=n.n(u),p=n("33Jr"),h={children:c.a.node,tag:p.m,className:c.a.string,cssModule:c.a.object,valid:c.a.bool,tooltip:c.a.bool},d={tag:"div",valid:void 0},f=function(e){var t=e.className,n=e.cssModule,s=e.valid,o=e.tooltip,c=e.tag,u=Object(r.a)(e,["className","cssModule","valid","tooltip","tag"]),h=o?"tooltip":"feedback",d=Object(p.i)(l()(t,s?"valid-"+h:"invalid-"+h),n);return i.a.createElement(c,Object(a.a)({},u,{className:d}))};f.propTypes=h,f.defaultProps=d,t.a=f},jrRI:function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("q1tI"),i=n.n(s),o=n("17x9"),c=n.n(o),u=n("TSYQ"),l=n.n(u),p=n("33Jr"),h={children:c.a.node,row:c.a.bool,check:c.a.bool,inline:c.a.bool,disabled:c.a.bool,tag:p.m,className:c.a.string,cssModule:c.a.object},d=function(e){var t=e.className,n=e.cssModule,s=e.row,o=e.disabled,c=e.check,u=e.inline,h=e.tag,d=Object(r.a)(e,["className","cssModule","row","disabled","check","inline","tag"]),f=Object(p.i)(l()(t,!!s&&"row",c?"form-check":"form-group",!(!c||!u)&&"form-check-inline",!(!c||!o)&&"disabled"),n);return i.a.createElement(h,Object(a.a)({},d,{className:f}))};d.propTypes=h,d.defaultProps={tag:"div"},t.a=d},ndts:function(e,t,n){"use strict";var a=n("nOHt"),r=n.n(a),s=n("cph9");t.a=function(e){e.isServer?e.req.headers.cookie&&(!Object(s.b)("ACCESS_TOKEN")||"/signin"!==e.pathname&&"/signup"!==e.pathname||setTimeout((function(){r.a.push("/")}),0)):!Object(s.b)("ACCESS_TOKEN")||"/signin"!==e.pathname&&"/signup"!==e.pathname||setTimeout((function(){r.a.push("/")}),0)}},q7Gj:function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("q1tI"),i=n.n(s),o=n("17x9"),c=n.n(o),u=n("TSYQ"),l=n.n(u),p=n("33Jr"),h={tag:p.m,size:c.a.string,className:c.a.string,cssModule:c.a.object},d=function(e){var t=e.className,n=e.cssModule,s=e.tag,o=e.size,c=Object(r.a)(e,["className","cssModule","tag","size"]),u=Object(p.i)(l()(t,"input-group",o?"input-group-"+o:null),n);return i.a.createElement(s,Object(a.a)({},c,{className:u}))};d.propTypes=h,d.defaultProps={tag:"div"},t.a=d},uBiN:function(e,t,n){"use strict";var a=n("wx14"),r=n("zLVn"),s=n("dI71"),i=n("JX7q"),o=n("q1tI"),c=n.n(o),u=n("17x9"),l=n.n(u),p=n("TSYQ"),h=n.n(p),d=n("33Jr"),f={children:l.a.node,inline:l.a.bool,tag:d.m,innerRef:l.a.oneOfType([l.a.object,l.a.func,l.a.string]),className:l.a.string,cssModule:l.a.object},m=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(Object(i.a)(Object(i.a)(n))),n.submit=n.submit.bind(Object(i.a)(Object(i.a)(n))),n}Object(s.a)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.submit=function(){this.ref&&this.ref.submit()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,s=e.inline,i=e.tag,o=e.innerRef,u=Object(r.a)(e,["className","cssModule","inline","tag","innerRef"]),l=Object(d.i)(h()(t,!!s&&"form-inline"),n);return c.a.createElement(i,Object(a.a)({},u,{ref:o,className:l}))},t}(o.Component);m.propTypes=f,m.defaultProps={tag:"form"},t.a=m},uGE4:function(e,t,n){"use strict";var a=n("eVuF"),r=n.n(a),s=n("ln6h"),i=n.n(s),o=n("O40h"),c=n("vDqi"),u=n.n(c),l=n("obyI"),p=n("cph9"),h=u.a.create({baseURL:l.c+"/api"});h.interceptors.request.use(function(){var e=Object(o.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(p.a)();case 2:return n=Object(p.b)("ACCESS_TOKEN"),t.headers.Authorization=void 0==n?Object(p.d)():n,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());t.a={updateUserProfile:function(e,t,n,a){return function(s){return new r.a(function(){var r=Object(o.a)(i.a.mark((function r(o,c){var u;return i.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,h.post("/v1/user",{username:e,dob:t,gender:n,location:a});case 3:0===(u=r.sent).data.status.code?(s({type:"UPDATE_PROFILE",status:u.data.status}),o(u)):c(u),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),c(r.t0);case 10:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(e,t){return r.apply(this,arguments)}}())}},getUserData:function(){return function(e){return new r.a(function(){var t=Object(o.a)(i.a.mark((function t(n,a){var r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,h.get("/v2/user");case 3:200===(r=t.sent).status&&0===r.data.status.code?(e({type:"USER_DATA",data:r.data.data,meta:r.data.meta}),n(r)):a(r),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}},getInterests:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";return function(t){return new r.a(function(){var n=Object(o.a)(i.a.mark((function n(a,r){var s;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,h.get("/v1/genre?status=".concat(e));case 3:0===(s=n.sent).data.status.code?(t({type:"INTERESTS",data:s.data.data,meta:s.data.meta,status:s.data.status}),a(s)):r(s),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),r(n.t0);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},checkUser:function(e){return function(t){return new r.a(function(){var n=Object(o.a)(i.a.mark((function n(a,r){var s;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,h.get("/v2/user/exist?username=".concat(e));case 3:s=n.sent,t({type:"CHECK_USER",status:s.data.status}),a(s),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),r(n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})));return function(e,t){return n.apply(this,arguments)}}())}},setInterest:function(e){return function(t){return new r.a(function(){var t=Object(o.a)(i.a.mark((function t(n,a){var r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,h.post("/v2/interest",{interest:e});case 3:r=t.sent,n(r),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),a(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}},setUserProfile:function(e,t,n,a,r,s,i,o){return function(c){return c({type:"SET_PROFILE",nickname:e,fullname:t,dob:n,gender:a,phone_number:r,email:s,otp:i,location:o})}},setValue:function(e,t){return function(n){return n({type:"SET_VALUE",index:e,value:t})}},updateUserData:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(a){return new r.a(function(){var a=Object(o.a)(i.a.mark((function a(r,s){var o,c;return i.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,(o={})[e]=t,n&&(o.otp=n),a.next=6,h.post("/v2/user",o);case 6:200===(c=a.sent).status&&0===c.data.status.code?r(c):s(c),a.next=13;break;case 10:a.prev=10,a.t0=a.catch(0),s(a.t0);case 13:case"end":return a.stop()}}),a,null,[[0,10]])})));return function(e,t){return a.apply(this,arguments)}}())}},setUserProfilePhoto:function(e){return function(t){return t({type:"SET_PROFILE_PHOTO_SRC",src:e})}},uploadProfilePhoto:function(e){var t=new FormData;return t.append("photo",e),function(e){return new r.a(function(){var e=Object(o.a)(i.a.mark((function e(n,a){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.post("/v1/user/photo",t,{headers:{"Content-Type":"multipart/form-data"}});case 3:200===(r=e.sent).status&&0===r.data.status.code?n(r):a(r),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},verify:function(e){var t=e.nickname,n=e.password;return function(e){return new r.a(function(){var e=Object(o.a)(i.a.mark((function e(a,r){var s,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s={},t&&(s.nickname=t),n&&(s.password=n),e.next=6,h.post("/v2/verify",s);case 6:200===(o=e.sent).status&&0===o.data.status.code?a(o):r(o),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),r(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}())}},setChangePasswordData:function(e,t,n){return function(a){return a({type:"SET_CHANGE_PASSWORD_DATA",change_password:{current_password:e,new_password:t,re_password:n}})}},changePassword:function(e,t,n){return function(a){return new r.a(function(){var a=Object(o.a)(i.a.mark((function a(r,s){var o;return i.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,h.post("/v2/change-password",{password:e,repassword:t,otp:n});case 3:200===(o=a.sent).status&&0===o.data.status.code?r(o):s(o),a.next=10;break;case 7:a.prev=7,a.t0=a.catch(0),s(a.t0);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})));return function(e,t){return a.apply(this,arguments)}}())}},getUserInterest:function(){return function(e){return new r.a(function(){var e=Object(o.a)(i.a.mark((function e(t,n){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.get("/v2/user/interest");case 3:200===(a=e.sent).status&&0===a.data.status.code?t(a):n(a),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),n(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},contactUs:function(e){var t=e.name,n=e.phone,a=e.email,s=e.comment;return function(e){return new r.a(function(){var e=Object(o.a)(i.a.mark((function e(r,o){var c;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.post("/v1/contactus",{name:t,phone:n,email:a,comment:s});case 3:200===(c=e.sent).status&&0===c.data.status.code?r(c):o(c),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),o(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}}}},xQ8M:function(e,t){e.exports=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}}},[["UeEt",1,0,2]]]);