1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4351],{"MO+j":function(e,r,t){t.d(r,{A:function(){return o}});var n=t("2PCm"),o=function(e){function r(r){var t,n=r.reason,o=r.name,i=void 0===o?"DeleteAdError":o;return(t=e.call(this,i)||this).name=i,t.message=i+" - "+n,t.reason=n,t}(0,n.A)(r,e);var t=r.prototype;return t.code=function(){return this.reason},t.toJSON=function(){return{reason:this.reason}},r.create=function(e){return new r({name:e.name,reason:e.reason})},r}((0,t("uWCr").A)(Error))},p3J7:function(e,r,t){t.d(r,{A:function(){return f}});var n=t("MO+j"),o=t("2PCm"),i=t("uWCr"),s=t("GHVx"),a=function(e){function r(r){var t,n=r.reason;return(t=e.call(this)||this)._reason=n,t}return(0,o.A)(r,e),r.prototype.code=function(){return this._reason?{reason:this._reason}:s.A.GET_AD},r}((0,i.A)(Error)),u=function(e){function r(r){var t,n=(void 0===r?{}:r).reason,o=void 0===n?null:n;return(t=e.call(this)||this)._reason=o,t}return(0,o.A)(r,e),r.prototype.code=function(){return this._reason?{reason:this._reason}:s.A.GET_MY_ADS},r}((0,i.A)(Error)),c=function(e){function r(r){var t,n=void 0===r?{}:r,o=n.reason,i=void 0===o?"UNHANDLED_ERROR":o,s=n.userId,a=n.type;return(t=e.call(this)||this)._reason=i,t._userId=s,t._type=a,t.message="[RequestCodeError]: Reason: "+i+" UserId: "+s+" Type: "+a,t}return(0,o.A)(r,e),r.prototype.code=function(){return this._reason?this._reason:"UNHANDLED_ERROR"},r}((0,i.A)(Error)),h=function(e){function r(r){var t,n=r.reason;return(t=e.call(this)||this)._reason=n,t}return(0,o.A)(r,e),r.prototype.code=function(){return"PUBLICATION_LIMIT_EXCEEDED"===this._reason||"COORDINATES_OUT_OF_RANGE"===this._reason||"INVALID_DESCRIPTION"===this._reason||"INVALID_TITLE"===this._reason||"INVALID_ORIENTATION_FOR_PROPERTY_TYPE"===this._reason||"PROPERTY_STATUS_NOT_FOUND"===this._reason?{reason:this._reason}:{reason:s.A.SAVE_AD}},r}((0,i.A)(Error)),d=function(e){function r(r){var t,n=r.reason;return(t=e.call(this)||this)._reason=n,t}return(0,o.A)(r,e),r.prototype.code=function(){return this._reason?this._reason:"UNHANDLED_ERROR"},r}((0,i.A)(Error)),f={deleteAdError:function(e){var r=(void 0===e?{}:e).reason;return new n.A({reason:r})},requestCodeError:function(e){var r=void 0===e?{}:e,t=r.reason,n=r.userId,o=r.type;return new c({reason:t,userId:n,type:o})},validateCodeError:function(e){var r=(void 0===e?{}:e).reason;return new d({reason:r})},saveAdError:function(e){var r=e.reason;return new h({reason:r})},getAdError:function(e){var r=e.reason;return new a(r)},getMyAdsError:function(e){var r=e.reason;return new u({reason:r})}}},DJWI:function(e,r,t){t.d(r,{g:function(){return g}});var n=t("sViW"),o=t("Te0F"),i=t("7UKH"),s=t("5ene"),a=t("JsTM"),u=t("Arrq"),c=t("rLH0"),h=t("oOex"),d=t("p3J7"),f=(0,i.A)("_phoneCountryPrefix"),A=(0,i.A)("_phoneNumber"),p=function(){function e(e){var r=void 0===e?{}:e,t=r.phoneNumber,n=r.phoneCountryPrefix;Object.defineProperty(this,f,{writable:!0,value:void 0}),Object.defineProperty(this,A,{writable:!0,value:void 0}),(0,o.A)(this,f)[f]=n,(0,o.A)(this,A)[A]=t}return e.prototype.toJSON=function(){return{phoneCountryPrefix:(0,o.A)(this,f)[f],phoneNumber:(0,o.A)(this,A)[A]}},e.create=function(r){return new e({phoneCountryPrefix:r.phoneCountryPrefix,phoneNumber:r.phoneNumber})},e}(),v=(0,i.A)("_adsGateWayApiHost"),l=(0,i.A)("_adsErrorFactory"),_=(0,i.A)("_authFetcher"),y=(0,i.A)("_config"),E=(0,i.A)("_cookies"),g=function(){function e(e){var r=e.authFetcher,t=e.cookieWrapper,n=e.config;Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,_,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),(0,o.A)(this,_)[_]=r,(0,o.A)(this,l)[l]=d.A,(0,o.A)(this,y)[y]=n,(0,o.A)(this,v)[v]=(0,o.A)(this,y)[y]("adsGateWayApiHost"),(0,o.A)(this,E)[E]=t}var r=e.prototype;return r.validateCode=function(e){var r=e.code,t=e.phone,i=e.userId,a=this;return(0,n.A)((function(){var e;return(0,s.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,o.A)(a,_)[_].post({data:{code:r,phone:t},url:(0,o.A)(a,v)[v]+"/v1/users/"+i+"/phone/validate"})];case 1:return n.sent(),[2,!0];case 2:throw e=n.sent(),(0,o.A)(a,l)[l].validateCodeError(e.response.data).code();case 3:return[2]}}
1))}))()},r.requestCode=function(e){var r=e.phone,t=e.type,i=e.userId,a=this;return(0,n.A)((function(){var e,n,u,c;return(0,s.YH)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,(0,o.A)(a,_)[_].post({data:{phone:r,type:t},url:(0,o.A)(a,v)[v]+"/v1/users/"+i+"/phone/code"})];case 1:return s.sent(),[2,!0];case 2:throw e=s.sent(),n=e.response||{},u=n.data||{},c=u.reason,console.error(e),(0,o.A)(a,l)[l].requestCodeError({reason:c,userId:i,type:t});case 3:return[2]}}))}))()},r.getValidatedPhone=function(e){var r=e.userId,t=this;return(0,n.A)((function(){var e,n;return(0,s.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,o.A)(t,_)[_].get({url:(0,o.A)(t,v)[v]+"/v1/users/"+r+"/phone/validated"})];case 1:return e=i.sent(),[2,p.create(e.data).toJSON()];case 2:if((n=i.sent())instanceof a.A)throw new Error("EXPIRED_SESSION");throw u.A.create({name:"[GetValidatedPhone#ApiPhoneValidationRepository]",error:n,data:{userId:r}});case 3:return[2]}}))}))()},e.create=function(r){var t=r.config,n=r.logger;return new e({adsErrorFactory:d.A,authFetcher:c.A.create({config:t,logger:n}),cookieWrapper:(0,h.Ew)(),config:t})},e}()},ypsv:function(e,r,t){t.r(r);var n=t("sViW"),o=t("Te0F"),i=t("7UKH"),s=t("5ene"),a=t("DJWI"),u=(0,i.A)("_config"),c=(0,i.A)("_repository"),h=(0,i.A)("_logger"),d=(0,i.A)("_traceConfig"),f=function(){function e(e){var r=e.config,t=void 0===r?{}:r,n=e.repository,i=e.logger,s=e.traceConfig;Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:void 0}),(0,o.A)(this,u)[u]=t,(0,o.A)(this,c)[c]=n,(0,o.A)(this,h)[h]=i,(0,o.A)(this,d)[d]=s}var r=e.prototype;return r.execute=function(e){var r=void 0===e?{}:e,t=r.phone,n=r.type,i=r.userId,s=this;return(0,o.A)(this,h)[h].trace((0,o.A)(this,u)[u]("metrics").useCase.name,(function(){return s.run({phone:t,type:n,userId:i})}),(0,o.A)(this,d)[d])()},r.run=function(e){var r=void 0===e?{}:e,t=r.phone,i=r.type,a=r.userId,u=this;return(0,n.A)((function(){return(0,s.YH)(this,(function(e){return[2,(0,o.A)(u,c)[c].requestCode({phone:t,type:i,userId:a})]}))}))()},e.create=function(r){var t=r.config,n=r.logger;return new e({repository:a.g.create({config:t,logger:n}),logger:n,config:t,traceConfig:{logErrors:!0,tags:[{key:t("metrics").useCase.identifyTagKey,value:"request_code_ads_use_case"}]}})},e}();r.default=f.create}}]);
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.