PageSourceSearch

https://arches.avantlink.com/chunk-6XWT3S76.js

js avantlink.com collected 2026-10-02 02:16:36 UTC 12,517 bytes, 3 lines download raw bytes

1import{a as Ei}from"./chunk-SROVJ6C2.js";import{$a as hi,Ab as Ci,Bb as Si,Fb as Mi,Ga as mi,Ib as xi,Md as Ti,Td as Ii,Ua as di,Ya as ui,Ye as Pi,Za as fi,ab as gi,cb as Ai,da as pi,db as vi,eb as wi,ec as ki,g as ni,h as oi,ha as si,ka as ci,m as b,mb as bi,t as li,uc as $i,xb as yi,zb as _i}from"./chunk-E46PARQF.js";import{$a as M,Ab as K,Cb as O,Cc as ii,Eb as R,F as j,Gb as g,K as H,Kb as X,Lb as G,Mb as J,Na as z,Oa as Q,Oc as ti,Ra as p,Uc as ei,Vb as l,Wa as h,Wb as x,Z as E,_a as S,ad as ai,ba as q,ea as W,eb as w,f as V,hd as F,ka as C,nc as m,oc as d,pa as D,qa as U,rd as k,s as N,sb as c,tb as o,tc as Z,td as ri,ub as n,v,vb as s,w as P,wd as B,zb as Y}from"./chunk-MNQHZSSI.js";import"./chunk-SE5JAREP.js";var Bi=["applicationDetailsDialog"];function Li(i,y){if(i&1&&(o(0,"div"),s(1,"br"),o(2,"mat-form-field",10)(3,"mat-label"),l(4,"Social Media URL"),n(),s(5,"input",11),m(6,"async"),n(),s(7,"br"),n()),i&2){let t=g(2);p(5),c("value",d(6,1,t.websiteUrl$))}}function Vi(i,y){if(i&1&&(o(0,"div",12)(1,"mat-form-field",10)(2,"mat-label"),l(3,"Verification URL"),n(),s(4,"input",13),o(5,"mat-hint"),l(6,"Enter the URL where #AvantLink was added"),n(),o(7,"mat-error"),l(8),m(9,"validationMessage"),n()(),s(10,"br"),n()),i&2){let t=g(2);c("cdkTrapFocusAutoCapture",!0),p(4),c("formControl",t.verificationUrlControl),p(4),x(d(9,3,t.verificationUrlControl.errors))}}function Ni(i,y){if(i&1){let t=O();o(0,"p",14),R("click",function(){D(t);let r=g(2);return U(r.onViewApplicationDetailsClick())}),l(1," View Application Details "),n()}}function ji(i,y){if(i&1){let t=O();Y(0),o(1,"div",2)(2,"a",3),s(3,"img",4),m(4,"absUrl"),n()(),o(5,"div",5)(6,"h2"),l(7),n(),s(8,"p",6),w(9,Li,8,3,"div",1),m(10,"async"),w(11,Vi,11,5,"div",7),m(12,"async"),m(13,"async"),m(14,"async"),s(15,"br"),o(16,"div")(17,"button",8),R("click",function(){D(t);let r=g();return U(r.buttonClickFn())}),l(18),n()(),s(19,"br"),w(20,Ni,2,0,"p",9),m(21,"async"),n(),K()}if(i&2){let t=g();p(3),c("src",d(4,7,"/assets/images/avantlink-fullcolor.svg"),Q),p(4),x(t.title),p(),c("innerHTML",t.subTitle,z),p(),c("ngIf",d(10,9,t.applicationStatus$)!=="cannotFind"),p(2),c("ngIf",d(12,11,t.socialMediaPlatform$)==="unsupportedPlatform"&&d(13,13,t.applicationStatus$)==="pending"&&d(14,15,t.emailSent$)===!1),p(7),x(t.buttonText),p(2),c("ngIf",d(21,17,t.applicationStatus$)!=="cannotFind")}}function Hi(i,y){if(i&1&&(o(0,"h2",15),l(1,"Application Details"),n(),o(2,"mat-dialog-content"),s(3,"mat-divider")(4,"p"),o(5,"div",16)(6,"mat-form-field")(7,"mat-label"),l(8,"Application ID"),n(),s(9,"input",11),m(10,"async"),n(),o(11,"mat-form-field")(12,"mat-label"),l(13,"AvantLink Network"),n(),s(14,"input",11),m(15,"async"),n(),o(16,"mat-form-field",17)(17,"mat-label"),l(18,"Name"),n(),s(19,"input",11),m(20,"async"),n(),o(21,"mat-form-field",17)(22,"mat-label"),l(23,"Email"),n(),s(24,"input",11),m(25,"async"),n(),o(26,"mat-form-field",17)(27,"mat-label"),l(28,"Social Media URL"),n(),s(29,"input",11),m(30,"async"),n()()(),o(31,"mat-dialog-actions",18)(32,"button",19),l(33,"OK"),n()()),i&2){let t,a,r,u=g();p(9),c("value",(t=d(10,5,u.affiliateApplication$))==null?null:t.classic_affiliate_application_id),p(5),c("value",(a=d(15,7,u.affiliateApplication$))==null?null:a.affiliate_network),p(5),c("value",d(20,9,u.firstLastName$)),p(5),c("value",(r=d(25,11,u.affiliateApplication$))==null?null:r.affiliate_email),p(5),c("value",d(30,13,u.websiteUrl$))}}var Di=(()=>{class i{constructor(t,a,r,u,$,_,Ri){this.changeDetectorRef=t,this.dialog=a,this.applicationsApiService=r,this.route=u,this.snackBarService=$,this.fb=_,this.router=Ri,this.instagramClientId="1499478493732219",this.socialMediaPlatforms=["instagram.com","unsupportedPlatform"],this.socialMediaPlatformNameMap={"instagram.com":"Instagram"},this.affiliateApplicationUpdated$=new V,this.redirectUri=`${b.dashboardUrl}/affiliate-application-verification/oauth-redirect`,this.oAuthState=ci(),this.verificationUrlControl=this.fb.control("",[vi.required,Ti(/\w+\.\w+/,"Please enter a valid url.")]),this.affiliateApplicationInital$=P([this.route.paramMap,this.route.queryParamMap]).pipe(q(([e,f])=>{this.apiToken=f.get("apiToken");let A={headers:new F({authorization:this.apiToken})};return this.applicationsApiService.getAffiliateApplication(e.get("id"),A)}),W(e=>this.affiliateApplicationId=e.affiliate_application_id),H(e=>{if(e.status===404)return N({});throw e})),this.affiliateApplication$=j(this.affiliateApplicationInital$,this.affiliateApplicationUpdated$).pipe(E({bufferSize:1,refCount:!0})),this.queryParamMap$Sub=this.route.queryParamMap.subscribe(e=>this.apiToken=e.get("apiToken")),this.applicationStatus$=this.affiliateApplication$.pipe(v(e=>pi(e)?"cannotFind":e.application_status)),this.firstLastName$=this.affiliateApplication$.pipe(v(e=>`${e.affiliate_first_name} ${e.affiliate_last_name}`)),this.websiteUrl$=this.affiliateApplication$.pipe(v(e=>e.website_url)),this.emailSent$=this.affiliateApplication$.pipe(v(e=>e.verification_url!=null&&e.verification_url!=="")),this.socialMediaPlatform$=this.websiteUrl$.pipe(v(e=>{try{let f=new URL(e).hostname,A=si(f);if(this.socialMediaPlatforms.includes(A))return A}catch{}return"unsupportedPlatform"}),E({bufferSize:1,refCount:!0})),this.updateTemplate$Sub=P([this.applicationStatus$,this.socialMediaPlatform$,this.emailSent$]).subscribe(([e,f,A])=>{e==="pending"?f==="unsupportedPlatform"?A?(this.title="Social Media Account Verification",this.subTitle='Thank y
1ou for submitting your verification. Please leave the <span class="color-mid-blue">#AvantLink</span> on the bio, profile, or about section of your social media account until you hear form us. Our compliance team will review your application and respond within the next 3-5 business days.',this.buttonText="Homepage",this.buttonClickFn=()=>window.location.href="https://www.avantlink.com/"):(this.title="Social Media Account Verification",this.subTitle='To verify ownership place <span class="color-mid-blue">#AvantLink</span> on the bio, profile, or about section of your social media account.',this.buttonText="Verify Ownership",this.buttonClickFn=()=>{if(!this.verificationUrlControl.valid)return;let T={headers:new F({authorization:this.apiToken})};this.applicationsApiService.updateAffiliateApplication({verification_url:this.verificationUrlControl.value},this.affiliateApplicationId,T).subscribe(I=>this.affiliateApplicationUpdated$.next(I),I=>{this.snackBarService.openErrorSnackBar(I?.error?.error??"An error occurred updating the application.")})}):(this.title=`${li(this.socialMediaPlatformNameMap,f)} Account Verification`,this.subTitle="To complete your application, please verify you have administrative rights for the following account.",this.buttonText="Verify Ownership",this.buttonClickFn=()=>{let T=`https://api.instagram.com/oauth/authorize?client_id=${this.instagramClientId}&redirect_uri=${this.redirectUri}&scope=user_profile&response_type=code&state=${this.oAuthState}`;this.openWindow(T,"instagram")}):e==="confirmed"?(this.title="Verification Successful",this.subTitle="We confirmed administrative rights for the following account. Our compliance team will review your application and respond in the next 3-5 business days.",this.buttonText="Homepage",this.buttonClickFn=()=>window.location.href="https://www.avantlink.com/"):e==="active"?(this.title="Application Approved",this.subTitle="Thank you for applying. Your application has been approved and you may 
1now login.",this.buttonText="Login",this.buttonClickFn=()=>this.router.navigateByUrl("/login")):e==="denied"?(this.title="Application Denied",this.subTitle="Thank you for applying. Your social media does not meet our criteria and your application has been denied",this.buttonText="Acceptance Criteria",this.buttonClickFn=()=>window.location.href=`${b.supportUrl}/hc/en-us/articles/203095229-How-to-Become-an-AvantLink-Affiliate`):e==="cannotFind"&&(this.title="Application Not Found",this.subTitle="Whoops. Something went wrong. If you received an affiliate application email you may reach out to our compliance team to see what happened to your application. Otherwise you may apply again.",this.buttonText="Apply to AvantLink",this.buttonClickFn=()=>window.location.href="https://www.avantlink.com/signup/"),this.changeDetectorRef.detectChanges()}),this.oAuthRedirectPopupListener=e=>{if(e.origin===b.dashboardUrl&&e.data?.kind==="InstagramOAuthRedirectPostData"){if(e.data.oAuthState!==this.oAuthState){this.snackBarService.openErrorSnackBar("Auth window in invalid state.");return}this.applicationsApiService.confirmApplicationWithSocialMedia(this.affiliateApplicationId,e.data.instagramAuthCode,this.redirectUri,this.apiToken).subscribe(f=>{this.snackBarService.openSnackBar("Confirmation Successful"),this.affiliateApplicationUpdated$.next(f)},f=>{this.snackBarService.openErrorSnackBar(f?.error?.error??"An error occurred confirming the application.")})}}}onViewApplicationDetailsClick(){this.dialog.open(this.applicationDetailsDialog,{maxWidth:"611px"})}openWindow(t,a){let r=500,u=700,$=Math.round(screen.width/2-r/2)+window.screenX,_=0;screen.height>u&&(_=Math.round(screen.height/2-u/2)+window.screenY),window.open(t,a,`width=${r},height=${u},scrollbars=yes,resizable=yes,toolbar=no,location=yes,left=${$},top=${_}`)}ngOnInit(){window.addEventListener("message",this.oAuthRedirectPopupListener,!1)}ngOnDestroy(){this.updateTemplate$Sub.unsubscribe(),this.queryParamMap$Sub.unsubscribe(),window.removeEventListener("message",this.oAuthRedirectPopupListener,!1)}static{this.\u0275fac=function(a){return new(a||i)(h(ii),h(ui),h(Ei),h(k),h(di),h(yi),h(ri))}}static{this.\u0275cmp=S({type:i,selectors:[["app-affiliate-social-media-auth"]],viewQuery:function(a,r){if(a&1&&X(Bi,7),a&2){let u;G(u=J())&&(r.applicationDetailsDialog=u.first)}},standalone:!1,decls:4,vars:3,consts:[["applicationDetailsDialog",""],[4,"ngIf"],[1,"logo"],["href","https://www.avantlink.com/"],[3,"src"],[1,"indent","mat-typography"],[1,"sub-title","mat-subtitle-2",3,"innerHTML"],["cdkTrapFocus","",3,"cdkTrapFocusAutoCapture",4,"ngIf"],["mat-raised-button","","color","primary",3,"click"],["class","a-like underline",3,"click",4,"ngIf"],[1,"full-width"],["matInput","","disabled","",3,"value"],["cdkTrapFocus","",3,"cdkTrapFocusAutoCapture"],["matInput","","cdkFocusInitial","","placeholder","Enter URL",3,"formControl"],[1,"a-like","underline",3,"click"],[1,"mat-h2"],[1,"two-column-flex-gutters"],[1,"double-width"],["align","end"],["color","primary","mat-raised-button","","mat-dialog-close",""]],template:function(a,r){a&1&&(w(0,ji,22,19,"ng-container",1),m(1,"async"),w(2,Hi,34,15,"ng-template",null,0,Z)),a&2&&c("ngIf",d(1,1,r.affiliateApplication$)!=null)},dependencies:[ti,Ai,wi,mi,fi,gi,hi,ki,Mi,_i,Si,Ci,xi,bi,ni,ei,$i,Ii],styles:[`[_nghost-%COMP%]{display:block;margin:12vh auto 0;max-width:410px;text-align:center}.logo[_ngcontent-%COMP%]{margin-bottom:60px}.indent[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;width:86%}.two-column-flex-gutters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:0 -6px}.two-column-flex-gutters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 1 180px;margin:6px}.two-column-flex-gutters[_ngcontent-%COMP%]   .double-width[_ngcontent-%COMP%]{flex-basis:372px}mat-button-toggle-group[_ngcontent-%COMP%]{flex-wrap:wrap}
2/*# sourceMappingURL=affiliate-social-media-auth.component-PPO7NRCL.css.map */`],changeDetection:0})}}return i})();var Ui=(()=>{class i{constructor(t){this.route=t,this.queryParamMap$Sub=this.route.queryParamMap.subscribe(a=>{let r={kind:"InstagramOAuthRedirectPostData",instagramAuthCode:
2a.get("code"),oAuthState:a.get("state")};window.opener.postMessage(r,b.dashboardUrl),window.close()})}ngOnInit(){}ngOnDestroy(){this.queryParamMap$Sub.unsubscribe()}static{this.\u0275fac=function(a){return new(a||i)(h(k))}}static{this.\u0275cmp=S({type:i,selectors:[["ng-component"]],standalone:!1,decls:2,vars:0,template:function(a,r){a&1&&(o(0,"p"),l(1,"Checking social media account..."),n())},encapsulation:2})}}return i})();var qi=[{path:"oauth-redirect",component:Ui},{path:":id",component:Di}],Oi=(()=>{class i{static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275mod=M({type:i})}static{this.\u0275inj=C({imports:[B.forChild(qi),B]})}}return i})();var $t=(()=>{class i{static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275mod=M({type:i})}static{this.\u0275inj=C({imports:[ai,Pi,oi,Oi]})}}return i})();export{$t as AffiliateSocialMediaAuthModule};
3//# sourceMappingURL=chunk-6XWT3S76.js.map

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.