(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{d326:function(t,a,e){"use strict";e.r(a),e.d(a,"AffiliateProgramModule",(function(){return Q}));var c=e("1VvW"),n=e("i2L+"),i=e("zqNl"),o=e("uJYd"),r=e("zdQl"),s=e("sXtk"),b=e("kZht"),l=e("F6wS"),f=e("anSm"),d=e("EmXI"),m=e("Tcl6"),g=e("hCLc"),p=e("YC1o"),u=e("NxuZ"),C=e("B6Vo"),h=e("TYVA"),O=e("3W1Y"),T=e("1o0v"),S=e("An66"),U=e("O30t"),w=e("yPvj"),P=e("+I9z"),R=e("aDqW"),_=e("DpwM");function v(t,a){if(1&t&&(b.Ub(0,"div"),b.Ub(1,"p",1),b.Qc(2),b.gc(3,"translate"),b.Tb(),b.Ub(4,"strong",2),b.Qc(5),b.Tb(),b.Tb()),2&t){const t=b.fc();b.Cb(2),b.Sc(" ",b.hc(3,2,"LABEL.FEE_DISCOUNT")," "),b.Cb(3),b.Sc("",t.affiliateStats.referredFeeDiscount,"%")}}function M(t,a){1&t&&b.Pb(0,"tr",12)}function L(t,a){1&t&&b.Pb(0,"tr",13)}function y(t,a){1&t&&(b.Ub(0,"th",14),b.Qc(1),b.gc(2,"translate"),b.Tb()),2&t&&(b.Cb(1),b.Rc(b.hc(2,1,"COLUMN.CURRENCY")))}function A(t,a){if(1&t&&(b.Ub(0,"td",15),b.Pb(1,"market-icon",16),b.Tb()),2&t){const t=a.$implicit;b.Cb(1),b.mc("base",t)}}function E(t,a){1&t&&(b.Ub(0,"th",14),b.Qc(1),b.gc(2,"translate"),b.Tb()),2&t&&(b.Cb(1),b.Rc(b.hc(2,1,"COLUMN.PAST_30")))}function D(t,a){if(1&t&&(b.Ub(0,"td",15),b.Pb(1,"ghost-trail",17),b.gc(2,"cryptoPrecise"),b.Tb()),2&t){const t=a.$implicit,e=b.fc();b.Cb(1),b.mc("content",b.ic(2,1,e.affiliateStats.stats.recent.received[t.toLowerCase()],t))}}function x(t,a){1&t&&(b.Ub(0,"th",14),b.Qc(1),b.gc(2,"translate"),b.Tb()),2&t&&(b.Cb(1),b.Rc(b.hc(2,1,"COLUMN.TOTAL")))}function I(t,a){if(1&t&&(b.Ub(0,"td",15),b.Pb(1,"ghost-trail",17),b.gc(2,"cryptoPrecise"),b.Tb()),2&t){const t=a.$implicit,e=b.fc();b.Cb(1),b.mc("content",b.ic(2,1,e.affiliateStats.stats.total.received[t.toLowerCase()],t))}}let N=(()=>{class t{constructor(){this.tableColumns=["currency","past","total"],this.tableRows=[...h.e]}}return t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=b.Ib({type:t,selectors:[["affiliate-stats"]],inputs:{affiliateStats:"affiliateStats"},decls:26,vars:13,consts:[[1,"stats"],["caption","","ghost","",1,"global__text--bold"],["body",""],[4,"ngIf"],["mat-table","",3,"dataSource"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","currency"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","body","",4,"matCellDef"],["matColumnDef","past"],["matColumnDef","total"],["mat-header-row",""],["mat-row",""],["mat-header-cell",""],["mat-cell","","body",""],[3,"base"],[3,"content"]],template:function(t,a){1&t&&(b.Ub(0,"section",0),b.Ub(1,"div"),b.Ub(2,"p",1),b.Qc(3),b.gc(4,"translate"),b.Tb(),b.Ub(5,"strong",2),b.Qc(6),b.Tb(),b.Tb(),b.Ub(7,"div"),b.Ub(8,"p",1),b.Qc(9),b.gc(10,"translate"),b.Tb(),b.Ub(11,"strong",2),b.Qc(12),b.Tb(),b.Tb(),b.Oc(13,v,6,4,"div",3),b.Tb(),b.Ub(14,"table",4),b.Oc(15,M,1,0,"tr",5),b.Oc(16,L,1,0,"tr",6),b.Sb(17,7),b.Oc(18,y,3,3,"th",8),b.Oc(19,A,2,1,"td",9),b.Rb(),b.Sb(20,10),b.Oc(21,E,3,3,"th",8),b.Oc(22,D,3,4,"td",9),b.Rb(),b.Sb(23,11),b.Oc(24,x,3,3,"th",8),b.Oc(25,I,3,4,"td",9),b.Rb(),b.Tb()),2&t&&(b.Cb(3),b.Sc(" ",b.hc(4,9,"LABEL.ACCOUNT_REFFERRALS")," "),b.Cb(3),b.Sc(" ",null==a.affiliateStats.stats?null:a.affiliateStats.stats.total.accounts," "),b.Cb(3),b.Sc(" ",b.hc(10,11,"LABEL.REVENUE_SHARE")," "),b.Cb(3),b.Sc("",a.affiliateStats.revenuePercentage,"%"),b.Cb(1),b.mc("ngIf",a.affiliateStats.referredFeeDiscount),b.Cb(1),b.mc("dataSource",a.tableRows),b.Cb(1),b.mc("matHeaderRowDef",a.tableColumns)("matHeaderRowDefSticky",!0),b.Cb(1),b.mc("matRowDefColumns",a.tableColumns))},directives:[O.a,T.a,f.a,S.n,U.j,U.g,U.i,U.c,U.e,U.b,U.f,U.h,U.d,U.a,w.a,P.a],pipes:[R.d,_.b],styles:[".stats[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin-bottom:var(--spacing)}.stats[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{border-bottom:solid var(--accent-colour);margin-right:var(--spacing-l)}.stats[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .stats[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-bottom:var(--spacing)}"],changeDetection:0}),t})();const F=[n.a,c.h.forChild([{path:"",component:(()=>{class t{constructor(t,a){this.store=t,this.env=a,this.affiliateUid$=this.store.pipe(Object(i.m)(r.c)),this.affiliateStats$=this.store.pipe(Object(i.m)(r.a))}ngOnInit(){this.store.dispatch(Object(o.x)("NAV.AFFILIATE"))}get baseUrl(){return this.env.urls.base+"/futures?affiliate="}}return t.\u0275fac=function(a){return new(a||t)(b.Ob(i.b),b.Ob(s.a))},t.\u0275cmp=b.Ib({type:t,selectors:[["affiliate-program"]],decls:18,vars:16,consts:[[1,"affiliate-program"],["body",""],["color","accent","appearance","fill"],["matInput","","readonly","",3,"value"],["mat-button","","matSuffix","","mat-icon-button","",1,"affiliate-program__link",3,"clipboard","clipboardSuccessMsg"],["icon","copy","size","lg","sbTooltip","TOOLTIP.COPY_REFERRAL_LINK"],[3,"affiliateStats"]],template:function(t,a){1&t&&(b.Ub(0,"section",0),b.Ub(1,"mat-card"),b.Ub(2,"mat-card-title"),b.Ub(3,"p",1),b.Qc(4),b.gc(5,"translate"),b.Tb(),b.Tb(),b.Ub(6,"mat-card-content"),b.Ub(7,"mat-form-field",2),b.Ub(8,"mat-label"),b.Qc(9),b.gc(10,"translate"),b.Tb(),b.Pb(11,"input",3),b.gc(12,"async"),b.Ub(13,"button",4),b.gc(14,"async"),b.Pb(15,"fa-icon",5),b.Tb(),b.Tb(),b.Pb(16,"affiliate-stats",6),b.gc(17,"async"),b.Tb(),b.Tb(),b.Tb()),2&t&&(b.Cb(4),b.Rc(b.hc(5,6,"HEADING.AFFILIATE_STATS")),b.Cb(5),b.Rc(b.hc(10,8,"FORM.REFERRAL_LINK")),b.Cb(2),b.mc("value",a.baseUrl+b.hc(12,10,a.affiliateUid$)),b.Cb(2),b.mc("clipboard",a.baseUrl+b.hc(14,12,a.affiliateUid$))("clipboardSuccessMsg","SNACKBAR.REFERRAL_LINK_COPIED"),b.Cb(3),b.mc("affiliateStats",b.hc(17,14,a.affiliateStats$)))},directives:[l.a,l.d,f.a,l.b,d.c,d.f,m.b,g.b,d.h,p.a,u.b,C.a,N],pipes:[R.d,S.b],styles:[".affiliate-program[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:var(--spacing) auto;width:40%}@media (min-width:1367px) and (max-width:1440px){.affiliate-program[_ngcontent-%COMP%]{width:60%}}@media (min-width:1025px) and (max-width:1366px){.affiliate-program[_ngcontent-%COMP%]{width:60%}}@media (max-width:1024px){.affiliate-program[_ngcontent-%COMP%]{flex-direction:column;margin:0;padding:var(--spacing);height:100%;width:100%}}.affiliate-program[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{border:1px solid var(--border-colour);height:auto}.affiliate-program[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour)}.affiliate-program[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:var(--spacing)}.affiliate-program[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),t})()}])];let Q=(()=>{class t{}return t.\u0275mod=b.Mb({type:t}),t.\u0275inj=b.Lb({factory:function(a){return new(a||t)},imports:[F]}),t})()}}]);