1"use strict";(self.webpackChunkstartdeck_pwa=self.webpackChunkstartdeck_pwa||[]).push([[101],{1101:(ut,w,u)=>{u.r(w),u.d(w,{SubscriptionModule:()=>dt});var q=u(4543),_=u(6204),T=u(7282),e=u(1699),h=u(304),b=u(1861);let Z=(()=>{class n{constructor(t,i){this.authService=t,this.helper=i}canActivate(t,i){return this.authService.authenticate(!0).then(o=>{if(!o)return!1;let r=this.authService.user||null;return!r||!r.subscription||(this.helper.navigateToUrl("/subscription"),!1)})}static#e=this.\u0275fac=function(i){return new(i||n)(e.LFG(h.e),e.LFG(b.W))};static#t=this.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),C=(()=>{class n{constructor(t,i){this.authService=t,this.helper=i}canActivate(t,i){return this.authService.authenticate(!0).then(o=>{if(!o)return!1;let r=this.authService.user||null;return!r||"team-docs"!=r.subscription_plan||(this.helper.navigateToUrl("/subscription"),!1)})}static#e=this.\u0275fac=function(i){return new(i||n)(e.LFG(h.e),e.LFG(b.W))};static#t=this.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var g=u(9740),m=u(605),d=u(6575);const J=["braintreeDropIn"];function N(n,s){1&n&&(e.TgZ(0,"div",14),e._UZ(1,"i",15),e.qZA())}function P(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",14)(1,"button",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submitHandler())}),e._uU(2," Save "),e.qZA()()}}let D=(()=>{class n{constructor(t,i){this._subscriptionService=t,this._helperService=i,this.data={},this.braintreeInstance=null,this.isBrainTreeUiLoaded=!1}ngOnInit(){this.getClientToken()}getClientToken(){this._subscriptionService.clientToken(!1).subscribe(t=>{t&&!t.error?this.initBrainTree(t):(this._helperService.errorMessage(t.message),this._helperService.navigateToUrl("/"))})}initBrainTree(t){g.create({authorization:t,container:"#dropin-container",paypal:{flow:"vault"}},(i,o)=>{i?console.error(i):(this.braintreeInstance=o,this.braintreeDropIn.nativeElement.children[0]&&(this.isBrainTreeUiLoaded=!0))})}submitHandler(){this.braintreeInstance.requestPaymentMethod((t,i)=>{t?this._helperService.errorMessage(t.message):(this._helperService.blockUI(),this._subscriptionService.paymentMethods("post",{token:i.nonce}).subscribe(o=>{o&&!o.error?(this._helperService.successMessage("Payment Method Added."),this._helperService.navigateToUrl("subscription")):(this._helperService.errorMessage(o.message),this._helperService.navigateToUrl("/")),this._helperService.unBlockUI()}))})}back(){this._helperService.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(b.W))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-payment-methods"]],viewQuery:function(i,o){if(1&i&&e.Gf(J,5),2&i){let r;e.iGM(r=e.CRH())&&(o.braintreeDropIn=r.first)}},decls:16,vars:3,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-20"],["class","text-center",4,"ngIf"],[1,"flex","flex-wrap",3,"ngClass"],[1,"w-full","sm:w-10/12","mx-auto"],[1,"bg-white","shadow-card","p-4","mb-4"],["id","dropin-container"],["braintreeDropIn",""],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-primary","fa-2x"],["type","button",1,"bg-success","rounded","px-8","py-2","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"]],template:function(i,o){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Add Payment Method "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,N,2,0,"div",8),e.TgZ(10,"div",9)(11,"div",10)(12,"div",11),e._UZ(13,"div",12,13),e.qZA(),e.YNc(15,P,3,0,"div",8),e.qZA()()()),2&i&&(e.xp6(9),e.Q6J("ngIf",!o.isBrainTreeUiLoaded),e.xp6(1),e.Q6J("ngClass",o.braintreeInstance?"visible":"invisible"),e.xp6(5),e.Q6J("ngIf",o.braintreeInstance))},dependencies:[d.mk,d.O5],encapsulation:2})}return n})();var f=u(1670),v=u(3455),p=u(1071),Q=u(2844),k=u(2185),l=u(8849);function Y(n,s){1&n&&(e.TgZ(0,"small",8),e._UZ(1,"i",9),e._uU(2," Coupon code applied successfully! Choose payment method and click subscribe below to complete your subscription."),e.qZA())}function L(n,s){1&n&&(e.TgZ(0,"small",10),e._UZ(1,"i",11),e._uU(2," Discount Coupon is invali
1d or expired"),e.qZA())}function j(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removecoupon())}),e._UZ(2,"img",14),e.qZA(),e.TgZ(3,"ul",15)(4,"li",16)(5,"div",17),e._uU(6," Monthly Subscription: "),e.qZA(),e.TgZ(7,"div",18),e._uU(8),e.ALo(9,"currency"),e.qZA()(),e.TgZ(10,"li",19)(11,"div",17),e._uU(12),e.qZA(),e.TgZ(13,"div",18),e._uU(14),e.ALo(15,"currency"),e.qZA()(),e.TgZ(16,"li",20)(17,"div",17),e._uU(18," Total Subscription: "),e.qZA(),e.TgZ(19,"div",18),e._uU(20),e.ALo(21,"currency"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(8),e.hij(" ",e.lcZ(9,4,t.plan_price)," "),e.xp6(4),e.hij(" Coupon: ",t.data.name," "),e.xp6(2),e.hij(" -",e.lcZ(15,6,t.data.discountCoupon.amount)," "),e.xp6(6),e.hij(" ",e.lcZ(21,8,t.plan_price-t.data.discountCoupon.amount)," ")}}let x=(()=>{class n{constructor(t){this._subscriptionService=t,this.discountCoupon=new e.vpe,this.removeCoupon=new e.vpe,this.isCouponCodeEntered=new e.vpe,this.type="pro",this.data={},this.coupon_name=""}ngOnInit(){this.license_count=this.license_count?this.license_count:1}checkDiscountCoupon(){if(!this.coupon_name)return!1;this._subscriptionService.checkDiscoutCoupon(this.coupon_name,this.type,this.license_count).subscribe(t=>{this.data=t,t.error&&this.discountCoupon.emit(null),t.error||this.discountCoupon.emit(t.discountCoupon)})}removecoupon(){this.coupon_name="",this.removeCoupon.emit(!0),this.isCouponCodeEntered.emit(!1),this.data=null}isUserEnterCode(t){this.isCouponCodeEntered.emit(t.length>0)}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-discount-coupon"]],inputs:{plan_price:"plan_price",type:"type",license_count:"license_count"},outputs:{discountCoupon:"discountCoupon",removeCoupon:"removeCoupon",isCouponCodeEntered:"isCouponCodeEntered"},decls:10,vars:5,consts:[[1,"mb-2","text-gray-300","font-medium"],[1,"w-full"],[1,"flex","items-center","border","border-primary","rounded"],["id","discount-coupon-input","type","text","placeholder","Enter Coupon Code",1,"appearance-none","bg-transparent","border-none","w-full","text-gray-300","focus:outline-none","focus:shadow-outline","placeholder-gray-light","text-sm","px-3","py-2",3,"value","ngModel","input","ngModelChange"],["type","button",1,"bg-primary","px-4","sm:px-10","py-2","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"],["id","messageSuccess","class","text-success font-normal",4,"ngIf"],["id","messageError","class","text-danger font-normal",4,"ngIf"],["class","p-3 border border-dashed border-gray-light mt-3 rounded relative",4,"ngIf"],["id","messageSuccess",1,"text-success","font-normal"],[1,"fa","fa-check"],["id","messageError",1,"text-danger","font-normal"],[1,"fa","fa-exclamation-triangle"],[1,"p-3","border","border-dashed","border-gray-light","mt-3","rounded","relative"],["title","Remove Coupon","href","javascript:void(0);",1,"text-danger","absolute","inline-block","leading-none",2,"top","-12px","right","-8px",3,"click"],["src","assets/images/icon-cancel.svg",1,"inline-block","w-4"],[1,"text-sm","text-gray-600","font-normal","break-all","leading-4"],[1,"flex","flex-wrap","items-center","pb-3"],[1,"w-9/12"],[1,"w-3/12","text-right"],[1,"flex","flex-wrap","items-center","py-3","border-t","border-gray-light","border-opacity-25"],[1,"flex","flex-wrap","items-center","pt-3","border-t","border-gray-light","border-opacity-25","text-gray-300","font-bold"]],template:function(i,o){1&i&&(e.TgZ(0,"div",0),e._uU(1,"Discount Coupon"),e.qZA(),e.TgZ(2,"div",1)(3,"div",2)(4,"input",3),e.NdJ("input",function(a){return o.isUserEnterCode(a.target.value)})("ngModelChange",function(a){return o.coupon_name=a}),e.qZA(),e.TgZ(5,"button",4),e.NdJ("click",function(){return o.checkDiscountCoupon()}),e._uU(6,"Apply"),e.qZA()(),e.YNc(7,Y,3,0,"small",5),e.YNc(8,L,3,0,"small",6),e.qZA(),e.YNc(9,j,22,10,"div",7)),2&i&&(e.xp6(4),e.Q6J("value",o.coupon_name)("ngModel",o.coupon_name),e.xp6(3),e.Q6J("ngIf",o.data&&0==o.data.error),e.xp6(1),e.Q6J("ngIf",o.data&&1==o.data.error),e.xp6(1),e.Q6J("ngIf",o.data&&0==o.data.error))},dependencies:[d.O5,l.Fj,l.JJ,l.On,d.H9],encapsulation:2})}return n})();function E(n,s){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",t.data.subscription.plan_name,"")}}function F(n,s){if(1&n&&(e.TgZ(0,"div",14)(1,"div",15)(2,"span",16),e._uU(3),e.qZA(),e.TgZ(4,"span",17),e._uU(5,"\xa0/ User / Month"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(3),e.hij("$",t.data.plan.price,"")}}function H(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",18)(1,"ul",19)(2,"li",20)(3,"div",21),e._uU(4," Total Users: "),e.qZA(),e.TgZ(5,"div",22)(6,"input",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.data.no_of_licenses=o)}),e.qZA()()(),e.TgZ(7,"li",24)(8,"div",25),e._uU(9," Price: "),e.qZA(),e.TgZ(10,"div",26)(11,"div",27),e._uU(12),e.ALo(13,"currency"),e.qZA()()()()()}if(2&n){const t=e.oxw();e.xp6(6),e.Q6J("value",t.data.no_of_licenses)("ngModel",t.data.no_of_licenses),e.xp6(6),e.hij(" ",e.lcZ(13,3,t.data.no_of_licenses*t.data.plan.price)," ")}}function B(n,s){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"img",35),e.TgZ(2,"div",36)(3,"div",37),e._uU(4),e.TgZ(5,"span",38),e._uU(6,"(Owner)"),e.qZA()(),e.TgZ(7,"small",39),e._uU(8),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name,""),e.xp6(4),e.Oqu(t.email)}}
1function O(n,s){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"img",35),e.TgZ(2,"div",36)(3,"div",37),e._uU(4),e.qZA(),e.TgZ(5,"small",39),e._uU(6),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name," "),e.xp6(2),e.Oqu(t.email)}}function G(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",40)(1,"a",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw(2);return e.KtG(r.deleteLicense(o.uid))}),e._UZ(2,"img",42),e.qZA()()}}function K(n,s){if(1&n&&(e.TgZ(0,"li",31),e.YNc(1,B,9,3,"div",32),e.YNc(2,O,7,3,"div",32),e.YNc(3,G,3,0,"div",33),e.qZA()),2&n){const t=s.$implicit;e.Q6J("ngClass",s.last?"":"border-b border-light"),e.xp6(1),e.Q6J("ngIf",t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner)}}function $(n,s){if(1&n&&(e.TgZ(0,"div",18)(1,"p",28),e._UZ(2,"i",29),e._uU(3),e.qZA(),e.TgZ(4,"ul"),e.YNc(5,K,4,4,"li",30),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.AsE(" There are already ",t.data.licenses.length," users in the team roster but you are trying to purchase the subscription for ",t.data.no_of_licenses," user(s). It is important to delete the unused member(s) from the team roster before continue. "),e.xp6(2),e.Q6J("ngForOf",t.data.licenses)}}function W(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"app-discount-coupon",43),e.NdJ("removecoupon",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.removeCoupon(o))})("isCouponCodeEntered",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.isCouponCodeEntered(o))})("discountCoupon",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.discountCoupon(o))}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("type",t.data.subscription.type)("plan_price",t.calculateSubscriptionPrice())("license_count",t.data.team_docs_members)}}function R(n,s){1&n&&(e.TgZ(0,"button",44),e._uU(1," Subscribe "),e.qZA())}let z=(()=>{class n extends v.u{constructor(t,i,o,r){super(),this._helper=t,this._subscriptionService=i,this.apiService=o,this.teamDocsService=r,this.data={},this.braintreeInstance=null,this.discount_coupon=null,this.trial_used=null,this.hasDropInLoaded="",this.CouponCodeEntered=null,this.existingLicenses=0}setInputData(t){this.data=t}
1ngOnInit(){this.getClientTokenAndPlan(),this.getSubscription(),this.teamDocsService.observer().subscribe(t=>{this.data.licenses=t.licenses,this.data.no_of_licenses=this.data.no_of_licenses?this.data.no_of_licenses:t.team_docs_members_count,this.existingLicenses=t.team_docs_members_count})}discountCoupon(t){this.discount_coupon=t}removeCoupon(){this.discount_coupon=null}getSubscription(){this._subscriptionService.get().subscribe(t=>{this.data.team_docs_members=t.data.members_count,this.data.subscription=t.data.subscription,this.trial_used=t.data.trial_used,this.getPlan(t.data.subscription.type),"team-docs"==t.data.subscription.type&&this.getLicenses()})}getPlan(t){this._subscriptionService.plan(t).subscribe(i=>this.data.plan=i)}getLicenses(){this.teamDocsService.licenses().subscribe(t=>{t.error?(this._helper.errorMessage(t.message),this._helper.navigateToUrl("projects")):this.teamDocsService.updateObserver(t.data)})}getClientTokenAndPlan(){this._subscriptionService.clientToken(!0).subscribe(t=>{t&&!t.error?(this.data.token=t,this.initBrainTree(this.data.token)):(this._helper.errorMessage(t.message),this._helper.navigateToUrl("/"))})}initBrainTree(t){t&&g.create({authorization:t,container:"#dropin-container",paypal:{flow:"vault"}},(i,o)=>{i?console.error(i):this.braintreeInstance=o})}getBraintreePaymentMethodToken(){var t={error:!1,payload_token:null,error_message:""},i=this;return new Promise((o,r)=>{i.braintreeInstance.requestPaymentMethod((a,c)=>{a?(t.error=!0,t.error_message=a.message):t.payload_token=c.nonce,o(t)})})}deleteLicense(t){confirm("Are you sure you want to delete this member? This will also delete this member from all the active teams. All of the member's files are retained on Google Drive")&&(this._helper.blockUI(),this.teamDocsService.deleteLicense(t).subscribe(i=>{i.error?(this._helper.errorMessage(i.message),this._helper.unBlockUI()):(this.teamDocsService.updateObserver(i.data),this._helper.successMessage("Member Deleted."),this._helper.unBlockUI())}))}calculateSubscriptionPrice(){return"pro"==this.data.subscription.type?this.data.plan.price:this.data.no_of_licenses*this.data.plan.price}isCouponCodeEntered(t){this.CouponCodeEntered=t}submitHandler(t){var i=this;return(0,f.Z)(function*(){if(i.discount_coupon||!i.CouponCodeEntered)if("team-docs"==i.data.plan&&i.data.no_of_licenses<i.data.licenses.length)i._helper.errorMessage("You cannot purchase "+i.data.no_of_licenses+" licenses as you already assigned "+i.data.licenses.length+" licenses on trial.\n Please delete existing users then purchase");else{var o=null;if(i.data.token){let c=yield i.getBraintreePaymentMethodToken();if(c.error)return i._helper.errorMessage(c.error_message),i.close(),!1;o=c.payload_token}i._helper.blockUI(),i.apiService.post("subscription/subscribe-now",{token:o,discountCoupon:i.discount_coupon?i.discount_coupon.name:null,type:i.data.subscription.type,no_of_licenses:i.data.no_of_licenses}).subscribe(c=>{c&&!c.error?(i._helper.successMessage("Subscription updated successfully"),window.location.reload()):(i.close(),i._helper.unBlockUI(),i._helper.errorMessage(c.message))})}else i._helper.errorMessage("Please apply the discount coupon that you entered")})()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(p.W_),e.Y36(m.F),e.Y36(Q.s),e.Y36(k.e))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-subscribe-now"]],features:[e.qOj],decls:15,vars:6,consts:[[1,"modal","in","p-4","overflow-auto"],[1,"modal-dialog","max-w-2xl"],[1,"modal-header","px-4","py-2","bg-primary","text-white","text-sm","leading-6","relative","flex","justify-between"],[4,"ngIf"],[1,"fa","fa-times","leading-6","opacity-50","cursor-pointer","modalclose",3,"click"],[1,"modal-body","p-4"],["class","text-center mb-3",4,"ngIf"],[3,"ngSubmit"],["subscriptionForm","ngForm"],["class","p-3 pb-0 border border-dashed border-gray-light bg-smoke-white bg-opacity-25 mb-3 rounded relative",4,"ngIf"],[3,"type","plan_price","license_count","removecoupon","isCouponCodeEntered","discountCoupon",4,"ngIf"],["id","dropin-container",1,"mt-4"],[1,"text-right","mt-4"],["type","submit","class","bg-success px-4 py-2 leading-6 text-white rounded text-sm tracking-wide font-medium focus:outline-none hover:shadow-btn transition-all duration-300",4,"ngIf"],[1,"text-center","mb-3"],[1,"text-success","flex","items-center","justify-center","md:leading-8"],[1,"text-xl","md:text-2xl","font-extrabold"],[1,"md:text-lg","font-medium"],[1,"p-3","pb-0","border","border-dashed","border-gray-light","bg-smoke-white","bg-opacity-25","mb-3","rounded","relative"],[1,"text-sm","text-gray-300","font-normal","leading-5"],[1,"flex","flex-wrap","items-center","pb-3"],[1,"w-10/12","text-gray-600"],[1,"w-2/12","text-right"],["name","no_of_licenses","min","1","type","number","autofocus","",1,"border","rounded","border-opacity-50","border-primary","text-sm","w-full","sm:w-17","px-1","py-1","text-gray-300","focus:outline-none","focus:shadow-outline","focus:border-primary","placeholder-gray-light",3,"value","ngModel","ngModelChange"],[1,"flex","flex-wrap","items-center","py-3","border-t","border-gray-light","border-opacity-50","text-gray-300","font-bold"],[1,"w-10/12"],[1,"w-2/12"],[1,"w-full","sm:w-17","sm:ml-auto"],[1,"text-left","bg-warning","bg-opacity-10","border-l-2","border-warning","text-gray-300","italic","text-xs","px-2","py-1","mb-2"],[1,"fa","fa-info-circle","text-gray-600"],["class","flex justify-between sm:items-center py-2 ",3,"ngClass",4,"ngFor","ngForOf"],[1,"flex","justify-between","sm:items-center","py-2",3,"ngClass"],["class","flex items-start",4,"ngIf"],["class","text-right w-6",4,"ngIf"],[1,"flex","items-start"],[1,"inline-block","w-7","h-7","rounded-full","mt-0.5",3,"src"],[1,"ml-2"],[1,"text-gray-300","text-sm","leading-4","sm:leading-5","flex","flex-wrap","gap-0.5","break-all"],[1,"text-gray-900"],[1,"text-gray-900","leading-4","break-all"],[1,"text-right","w-6"],["href","javascript:void(0);",3,"click"],["alt","Delete","src","assets/images/icon-delete-danger.svg",1,"inline-block","w-3","mt-0.5"],[3,"type","plan_price","license_count","removecoupon","isCouponCodeEntered","discountCoupon"],["type","submit",1,"bg-success","px-4","py-2","leading-6","text-white","rounded","text-sm","tracking-wide","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300"]],template:function(i,o){if(1&i){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e.YNc(3,E,2,1,"span",3),e.TgZ(4,"i",4),e.NdJ("click",function(){return o.close()}),e.qZA()(),e.TgZ(5,"div",5),e.YNc(6,F,6,1,"div",6),e.TgZ(7,"form",7,8),e.NdJ("ngSubmit",function(){e.CHM(r);const c=e.MAs(8);return e.KtG(o.submitHandler(c))}),e.YNc(9,H,14,5,"div",9),e.YNc(10,$,6,3,"div",9),e.YNc(11,W,1,3,"app-discount-coupon",10),e._UZ(12,"div",11),e.TgZ(13,"div",12),e.YNc(14,R,2,0,"button",13),e.qZA()()()()()}2&i&&(e.xp6(3),e.Q6J("ngIf",o.data&&o.data.subscription),e.xp6(3),e.Q6J("ngIf",o.data&&o.data.licenses),e.xp6(3),e.Q6J("ngIf",o.data&&o.data.licenses),e.xp6(1),e.Q6J("ngIf",o.data&&o.data.licenses&&o.data.no_of_licenses<o.data.licenses.length),e.xp6(1),e.Q6J("ngIf",o.data&&o.data.plan&&o.data.subscription&&o.trial_used),e.xp6(3),e.Q6J("ngIf",o.data&&o.data.plan&&o.braintreeInstance))},dependencies:[d.mk,d.sg,d.O5,l._Y,l.Fj,l.wV,l.JJ,l.JL,l.qQ,l.On,l.F,x,d.H9],encapsulation:2})}return n})(),X=(()=>{class n extends v.u{constructor(t,i,o){super(),this._subscriptionService=t,this._helperService=i,this._apiService=o,this.data={},this.discount_coupon=null,this.CouponCodeEntered=null,this.price=null}ngOnInit(){this.getPlan(this.data.type)}setInputData(t){this.data=t}getPlan(t){this._subscriptionService.plan(t).subscribe(i=>this.price=i.price)}calculateSubscriptionPrice(){if("pro"==this.data.type)return this.price}discountCoupon(t){this.discount_coupon=t}removeCoupon(t){this.discount_coupon=null}isCouponCodeEntered(t){this.CouponCodeEntered=t}switch(){this.data&&"pro"==this.data.type&&this.switchToPro()}switchToPro(){this._helperService.blockUI(),this._subscriptionService.switchToProPlan({discount_coupon:this.discount_coupon?this.discount_coupon.name:null}).subscribe(i=>{i&&!i.error&&i.data.subscription?(this.data=i.data,this.close(),this._helperService.navigateToUrl("/projects")):(this._helperService.navigateToUrl("/projects"),this._helperService.errorMessage(i.message)),this._helperService.unBlockUI()})}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(p.W_),e.Y36(p.sM))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-switch-to-pro"]],features:[e.qOj],decls:17,vars:0,consts:[["id","switch",1,"modal","in","p-4"],[1,"modal-dialog","max-w-xl","animated-from-top","relative","rounded"],[1,"fa","fa-times","text-sm","mt-2","leading-6","text-gray-900","opacity-25","cursor-pointer","modalclose","absolute","right-0","mr-4",3,"click"],[1,"modal-body","p-5"],[1,"font-bold","text-lg","text-gray-300","text-center","mb-3"],[1,"text-xs","text-gray-600"],[1,"text-xs","text-gray-600","mt-1.5"],[1,"text-center","mt-4","pt-4","border-t","border-gray-white"],["href","javascript:void(0);",1,"inline-block","px-4","mr-2","py-1","text-gray-600","underline","text-xs","tracking-wide","font-medium",3,"click"],["href","javascript:void(0);",1,"bg-primary","inline-block","px-5","py-1","text-white","rounded","text-xs","tracking-wide","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"]],template:function(i,o){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"i",2),e.NdJ("click",function(){return o.close()}
1),e.qZA(),e.TgZ(3,"div",3)(4,"h4",4),e._uU(5,"Switch to Individual Pro plan"),e.qZA(),e.TgZ(6,"p",5),e._uU(7," This action will cancel your Team Docs subscription and return StartDeck to Individual Pro mode. "),e.qZA(),e.TgZ(8,"p",5),e._uU(9," All team files are retained on Google Drive "),e.qZA(),e.TgZ(10,"p",6),e._uU(11," If you simply want to switch to Individual mode and show files from your personal Google Drive, simple click 'Show My Files' from the Teams menu. "),e.qZA(),e.TgZ(12,"div",7)(13,"a",8),e.NdJ("click",function(){return o.close()}),e._uU(14," Not Now "),e.qZA(),e.TgZ(15,"a",9),e.NdJ("click",function(){return o.switch()}),e._uU(16," Proceed "),e.qZA()()()()())},encapsulation:2})}return n})();function V(n,s){1&n&&(e.TgZ(0,"div",10),e._UZ(1,"i",11),e.qZA())}function ee(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"p",23),e._UZ(1,"i",24),e._uU(2),e.TgZ(3,"a",25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.subscribeNow())}),e._uU(4," Subscribe Now "),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(2),e.AsE(" Your ",t.data.subscription.trial_period," day free trial will expire on ",t.data.subscription.trial_ends_on,". Click here to ")}}
1function te(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"p",23),e._uU(1),e.TgZ(2,"a",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.resume())}),e._uU(3," Resume Subscription "),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.hij(' Your Subscription will expire on "',t.data.subscription.billing_period_end_date,'". Click here to ')}}function ie(n,s){if(1&n&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.AsE(" $",t.data.subscription.next_bill_amount," (Coupon Applied : ",t.data.subscription.discount_coupon,") ")}}function ne(n,s){if(1&n&&e._uU(0),2&n){const t=e.oxw(3);e.hij(" $",t.data.subscription.next_bill_amount," ")}}function oe(n,s){if(1&n&&(e.TgZ(0,"li",32)(1,"div",30),e._uU(2," No. of licenses: "),e.qZA(),e.TgZ(3,"div",31),e._uU(4),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(4),e.hij(" ",t.data.members_count," ")}}function re(n,s){if(1&n&&(e.ynx(0),e.TgZ(1,"div",27)(2,"ul",28)(3,"li",29)(4,"div",30),e._uU(5," Billing Period: "),e.qZA(),e.TgZ(6,"div",31),e._uU(7),e.qZA()(),e.TgZ(8,"li",32)(9,"div",30),e._uU(10," Next Bill Date: "),e.qZA(),e.TgZ(11,"div",31),e._uU(12),e.qZA()(),e.TgZ(13,"li",32)(14,"div",30),e._uU(15," Next Bill Amount: "),e.qZA(),e.TgZ(16,"div",31),e.YNc(17,ie,2,2,"div",33),e.YNc(18,ne,1,1,"ng-template",null,34,e.W1O),e.qZA()(),e.YNc(20,oe,5,1,"li",35),e.qZA()(),e.BQk()),2&n){const t=e.MAs(19),i=e.oxw(2);e.xp6(7),e.AsE(" ",i.data.subscription.billing_period_start_date," - ",i.data.subscription.billing_period_end_date," "),e.xp6(5),e.hij(" ",i.data.subscription.next_billing_date," "),e.xp6(5),e.Q6J("ngIf",i.data.subscription.discount_coupon)("ngIfElse",t),e.xp6(3),e.Q6J("ngIf","team-docs"==i.data.subscription.type)}}const S=function(){return{subscription:"true"}};function se(n,s){1&n&&(e.TgZ(0,"a",42),e._uU(1," Remove Licenses "),e.qZA()),2&n&&e.Q6J("routerLink","/subscription/team-docs/downgrade")("queryParams",e.DdM(2,S))}function ae(n,s){if(1&n&&(e.ynx(0),e.TgZ(1,"div",38)(2,"a",39),e._uU(3," Go to Team Roster "),e.qZA(),e.TgZ(4,"a",40),e._uU(5," Add Licenses "),e.qZA(),e.YNc(6,se,2,3,"a",41),e.qZA(),e.BQk()),2&n){const t=e.oxw(3);e.xp6(2),e.Q6J("routerLink","/team-docs/licenses"),e.xp6(2),e.Q6J("routerLink","/subscription/team-docs/upgrade")("queryParams",e.DdM(4,S)),e.xp6(2),e.Q6J("ngIf",t.data.members_count>1)}}function ce(n,s){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",36)(2,"a",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.cancel(o.data.subscription.type))}),e._uU(3," Cancel Subscription "),e.qZA(),e.YNc(4,ae,7,5,"ng-container",19),e.qZA(),e.BQk()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngIf","team-docs"==t.data.subscription.type)}}function le(n,s){1&n&&(e.TgZ(0,"div",43)(1,"a",44),e._UZ(2,"img",45),e._uU(3," Multiple users? Click here for upgrade to Team Docs Edition "),e.qZA()()),2&n&&(e.xp6(1),e.Q6J("routerLink","/subscription/team-docs"))}function de(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",43)(1,"a",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.switchPlanToPro())}),e._UZ(2,"img",47),e._uU(3," Single user? Click here for switch to Individual Pro plan "),e.qZA()()}}function ue(n,s){if(1&n&&(e.TgZ(0,"h5",61),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij(" Ending in ",t.last4," ")}}function pe(n,s){if(1&n&&(e.TgZ(0,"div",62),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.AsE(" Expiration: ",t.expirationMonth," / ",t.expirationYear," ")}}function _e(n,s){1&n&&(e.TgZ(0,"div",63),e._UZ(1,"img",64),e.qZA())}function me(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",63)(1,"span")(2,"a",65),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw(3);return e.KtG(r.removePaymentMethod(o.token))}),e._UZ(3,"img",66),e.qZA()(),e.TgZ(4,"span")(5,"a",67),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw(3);return e.KtG(r.changeDefaultPaymentMethod(o.token))}),e._UZ(6,"img",68),e.qZA()()()}}function ge(n,s){if(1&n&&(e.TgZ(0,"li",54)(1,"div",55),e._UZ(2,"img",56),e.TgZ(3,"div",57),e.YNc(4,ue,2,1,"h5",58),e.YNc(5,pe,2,2,"div",59),e.qZA()(),e.YNc(6,_e,2,0,"div",60),e.YNc(7,me,7,0,"div",60),e.qZA()),2&n){const t=s.$implicit;e.Q6J("ngClass",t.default?"default-set":""),e.xp6(2),e.Q6J("src",t.imageUrl,e.LSH),e.xp6(2),e.Q6J("ngIf",!t.email),e.xp6(1),e.Q6J("ngIf",!t.email),e.xp6(1),e.Q6J("ngIf",t.default),e.xp6(1),e.Q6J("ngIf",!t.default)}}
1function fe(n,s){if(1&n&&(e.TgZ(0,"div",14)(1,"div",48)(2,"div",49),e._uU(3,"Payment Methods"),e.qZA(),e.TgZ(4,"a",50),e._UZ(5,"i",51),e._uU(6," Add New Card"),e.qZA()(),e.TgZ(7,"ul",52),e.YNc(8,ge,8,6,"li",53),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("routerLink","/subscription/payment-methods"),e.xp6(4),e.Q6J("ngForOf",t.paymentMethods)}}function he(n,s){if(1&n&&(e.TgZ(0,"li",32)(1,"div",72)(2,"p",73),e._uU(3),e.qZA()(),e.TgZ(4,"div",74)(5,"small",75),e._UZ(6,"i",24),e._uU(7),e.qZA()()()),2&n){const t=s.$implicit;e.xp6(3),e.hij(" ",t.description," "),e.xp6(4),e.hij(" ",t.created_at," ")}}function be(n,s){if(1&n&&(e.TgZ(0,"div",69)(1,"div",70),e._uU(2,"Subscription History"),e.qZA(),e.TgZ(3,"ul"),e.YNc(4,he,8,2,"li",71),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",t.data.subscription.history)}}function ve(n,s){if(1&n&&(e.TgZ(0,"div",12)(1,"div",13)(2,"div",14)(3,"div",15)(4,"h3",16),e._uU(5),e.qZA(),e.TgZ(6,"div",17),e._uU(7),e.qZA()(),e.YNc(8,ee,5,2,"p",18),e.YNc(9,te,4,1,"p",18),e.YNc(10,re,21,6,"ng-container",19),e.YNc(11,ce,5,1,"ng-container",19),e.YNc(12,le,4,1,"div",20),e.YNc(13,de,4,0,"div",20),e.qZA(),e.YNc(14,fe,9,2,"div",21),e.YNc(15,be,5,1,"div",22),e.qZA()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(t.data.subscription.plan_name),e.xp6(1),e.Q6J("ngClass",t.data.subscription.on_trial?"bg-warning text-warning":t.data.subscription.is_cancelled?"bg-danger text-danger":"bg-success text-success"),e.xp6(1),e.hij(" ",t.data.subscription.on_trial?"On Trial":t.data.subscription.is_cancelled?"Canceled":"Active"," "),e.xp6(1),e.Q6J("ngIf",t.data.subscription.on_trial),e.xp6(1),e.Q6J("ngIf",t.data.subscription.is_cancelled),e.xp6(1),e.Q6J("ngIf",!t.data.subscription.on_trial&&!t.data.subscription.is_cancelled),e.xp6(1),e.Q6J("ngIf",!t.data.subscription.is_cancelled),e.xp6(1),e.Q6J("ngIf","pro"==t.data.subscription.type&&1==t.auth.user.can_create_team_drives),e.xp6(1),e.Q6J("ngIf","team-docs"==t.data.subscription.type),e.xp6(1),e.Q6J("ngIf",t.paymentMethods&&t.paymentMethods.length>0),e.xp6(1),e.Q6J("ngIf",t.data.subscription.history)}}let xe=(()=>{class n{constructor(t,i,o){this._helper=t,this._subscription=i,this.auth=o,this.data={},this.paymentMethods={}}ngOnInit(){this._subscription.get().subscribe(t=>{null==t.data.subscription?(this._helper.errorMessage("You donot have any active subscription."),this._helper.navigateToUrl("/subscription/pro")):(this.data=t.data,console.log("subscription data",this.data))}),this.getPaymentMethods()}ngAfterViewInit(){this._helper.bindJqueryDropdown()}getPaymentMethods(){this._subscription.paymentMethods("get").subscribe(i=>{i&&!i.error?this.paymentMethods=i.data:this._helper.errorMessage(i.message)})}cancel(t){let i=this;var a,r="";"team-docs"==t&&this.data.subscription.on_trial?r="Are you sure you want to cancel the subscription? \n \n All StartDeck content is retained on your Google Drive. Teams may be reactivated at anytime with renewed subscription.":"team-docs"!=t||this.data.subscription.on_trial?("pro"==t&&this.data.subscription.on_trial||"pro"==t&&!this.data.subscription.on_trial)&&(r="Are you sure you want to cancel the subscription? \n \nAll StartDeck content is retained on your Google Drive StartDeck folder. StartDeck may be reactivated at anytime with renewed subscription."):r="Are you sure you want to cancel the subscription? \n \nAll StartDeck content is retained on your Google Drive. Teams may be reactivated at anytime with renewed subscription.",confirm(r)&&(a=t,i._helper.blockUI(),i._subscription.cancel(a).subscribe(c=>{c&&!c.error&&c.data.subscription?i.data=c.data:c&&!c.error?i._helper.navigateToUrl("/projects"):(i._helper.navigateToUrl("/projects"),i._helper.errorMessage(c.message)),i._helper.unBlockUI()}))}resume(){this._helper.blockUI(),this._subscription.resume().subscribe(t=>{t&&!t.error&&t.data.subscription?this.data=t.data:t&&!t.error?this._helper.navigateToUrl("/projects"):(this._helper.navigateToUrl("/projects"),this._helper.errorMessage(t.message)),this._helper.unBlockUI()})}switchPlanToPro(){this._helper.openModal(X,{type:"pro"})}switchPlanToFree(){confirm("Are you sure, you want to switch to Free plan
1now? By continuing, you will no longer have access to team docs features.")&&(this._helper.blockUI(),this._subscription.switchToFreePlan().subscribe(i=>{i&&!i.error?this._helper.navigateToUrl("/projects"):(this._helper.navigateToUrl("/projects"),this._helper.errorMessage(i.message)),this._helper.unBlockUI()}))}changeDefaultPaymentMethod(t){this._helper.blockUI(),this._subscription.changeDefaultPaymentMethod(t).subscribe(i=>{i&&!i.error?(this.paymentMethods=[],this.paymentMethods=i.data,this._helper.successMessage("Payment Method Updated."),this._helper.unBlockUI()):(this._helper.errorMessage(i.message),this._helper.unBlockUI())})}removePaymentMethod(t){confirm("Are you sure you want to proceed?")&&(this._helper.blockUI(),this._subscription.paymentMethods("delete",{token:t}).subscribe(o=>{o&&!o.error?(this.paymentMethods=[],this.paymentMethods=o.data,this._helper.successMessage("Payment Method Deleted."),this._helper.unBlockUI()):(this._helper.errorMessage(o.message),this._helper.unBlockUI())}))}subscribeNow(){this._helper.openModal(z,{subscription:this.data.subscription,no_of_licences:this.data.members_count})}back(){this._helper.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(p.W_),e.Y36(m.F),e.Y36(h.e))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-home"]],decls:11,vars:2,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-20"],["class","mt-20 p-25p text-center","style","margin-top:20px",4,"ngIf"],["class","flex flex-wrap",4,"ngIf"],[1,"mt-20","p-25p","text-center",2,"margin-top","20px"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-primary","fa-2x"],[1,"flex","flex-wrap"],[1,"w-full","lg:w-10/12","mx-auto"],[1,"bg-white","shadow-card","p-4","mb-4"],[1,"flex","items-center","justify-between","mb-4"],[1,"sm:text-lg","text-gray-300","font-medium"],[1,"inline-block","bg-opacity-25","rounded","px-2","text-xs",3,"ngClass"],["class","text-sm bg-smoke-white p-3 text-gray-600",4,"ngIf"],[4,"ngIf"],["class","border-t border-dashed border-gray-light pt-3 mt-3",4,"ngIf"],["class","bg-white shadow-card p-4 mb-4",4,"ngIf"],["class","bg-white shadow-card p-4 pb-1",4,"ngIf"],[1,"text-sm","bg-smoke-white","p-3","text-gray-600"],[1,"fa","fa-clock-o"],["href","javascript:void(0);",1,"text-primary","underline",3,"click"],["href","javascript:void(0);",1,"text-success","underline",3,"click"],[1,"bg-smoke-white","rounded","px-3"],[1,"text-sm"],[1,"flex","flex-wrap","py-3"],[1,"w-full","sm:w-3/12","pr-2","text-gray-600"],[1,"w-full","sm:w-9/12","text-gray-300","font-medium"],[1,"flex","flex-wrap","py-3","border-light","border-t"],[4,"ngIf","ngIfElse"],["no_discount",""],["class","flex flex-wrap py-3 border-light border-t",4,"ngIf"],[1,"flex","flex-wrap","gap-3","sm:gap-4","justify-between","text-center","mt-2","sm:mt-3"],["href","javascript:void(0);",1,"font-medium","inline-block","rounded","text-danger","text-xs","w-full","sm:w-auto","sm:py-1",3,"click"],[1,"w-full","sm:w-auto"],["href","javascript:void(0);",1,"bg-gray-300","focus:outline-none","font-medium","hover:shadow-btn","inline-block","px-4","py-1","rounded","text-white","text-xs","w-full","sm:w-auto","transition-all","duration-300","mr-0","sm:mr-4","mb-3","sm:mb-0",3,"routerLink"],["href","javascript:void(0);",1,"bg-primary","focus:outline-none","font-medium","hover:shadow-btn","inline-block","px-4","py-1","rounded","text-white","text-xs","w-full","sm:w-auto","transition-all","duration-300","mr-0","sm:mr-4","mb-3","sm:mb-0",3,"routerLink","queryParams"],["href","javascript:void(0);","class","bg-warning focus:outline-none font-medium hover:shadow-btn inline-block px-4 py-1 rounded text-white text-xs w-full sm:w-auto transition-all duration-300",3,"routerLink","queryParams",4,"ngIf"],["href","javascript:void(0);",1,"bg-warning","focus:outline-none","font-medium","hover:shadow-btn","inline-block","px-4","py-1","rounded","text-white","text-xs","w-full","sm:w-auto","transition-all","duration-300",3,"routerLink","queryParams"],[1,"border-t","border-dashed","border-gray-light","pt-3","mt-3"],["href","javascript:void(0);",1,"p-2","block","transition-all","duration-300","hover:shadow-btn","bg-success","bg-opacity-10","border","border-success","border-opacity-50","text-success","rounded-md","text-center","text-sm","font-medium",3,"routerLink"],["src","assets/images/icon/team-docs-success.svg",1,"inline-block","align-text-top","-mr-0.5"],["href","javascript:void(0);",1,"p-2","block","transition-all","duration-300","hover:shadow-btn","bg-primary","bg-opacity-10","border","border-primary","border-opacity-50","text-primary","rounded-md","text-center","text-sm","font-medium",3,"click"],["src","assets/images/icon/single-user-primary.svg",1,"inline-block","align-text-top","-mr-0.5"],[1,"flex","justify-between","items-center","mb-3"],[1,"text-gray-300","font-medium"],["href","javascript:void(0);",1,"text-primary","text-xs",3,"routerLink"],[1,"fa","fa-plus-circle"],[1,"payment-method-list"],["class","card-list relative",3,"ngClass",4,"ngFor","ngForOf"],[1,"card-list","relative",3,"ngClass"],[1,"w-9/12","flex","items-start"],[1,"w-10","mt-1",3,"src"],[1,"pl-2"],["class","font-medium text-sm break-all block leading-5 card-detail
1s",4,"ngIf"],["class","text-gray-900 text-xs break-all font-normal",4,"ngIf"],["class","w-3/12 text-right",4,"ngIf"],[1,"font-medium","text-sm","break-all","block","leading-5","card-details"],[1,"text-gray-900","text-xs","break-all","font-normal"],[1,"w-3/12","text-right"],["src","assets/images/icon-check-success.svg",1,"inline-block"],["title","Remove Payement Method","href","javascript:void(0)",1,"inline-block","mr-4",3,"click"],["src","assets/images/icon-delete-danger.svg",1,"inline-block","w-4"],["title","Make Default","href","javascript:void(0);",1,"inline-block",3,"click"],["src","assets/images/icon-done-disable.svg",1,"inline-block","w-5"],[1,"bg-white","shadow-card","p-4","pb-1"],[1,"text-gray-300","mb-3","font-medium"],["class","flex flex-wrap py-3 border-light border-t",4,"ngFor","ngForOf"],[1,"w-full","md:w-10/12","order-last","md:order-none"],[1,"text-sm","text-gray-600"],[1,"w-full","md:w-2/12","md:text-right"],[1,"text-gray-900","text-xs"]],template:function(i,o){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Subscription "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,V,2,0,"div",8),e.YNc(10,ve,16,11,"div",9),e.qZA()),2&i&&(e.xp6(9),e.Q6J("ngIf",!o.data.subscription),e.xp6(1),e.Q6J("ngIf",o.data.subscription))},dependencies:[d.mk,d.sg,d.O5,_.rH],encapsulation:2})}return n})();function ye(n,s){1&n&&(e.TgZ(0,"div",26),e._UZ(1,"i",27),e.qZA())}function we(n,s){if(1&n&&(e.TgZ(0,"div",28),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" $",t.data.plan.price,"/Month")}}function Te(n,s){if(1&n&&(e.TgZ(0,"button",33),e._uU(1),e._UZ(2,"br"),e.TgZ(3,"span",32),e._uU(4,"(Excludes Premium Templates)"),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("Start ",t.data.plan.trial_period," Days Free Trial")}}function Ze(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",29),e.YNc(1,Te,5,1,"button",30),e.TgZ(2,"a",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submitHandler("subscribe"))}),e._uU(3," Subscribe"),e._UZ(4,"br"),e.TgZ(5,"span",32),e._uU(6,"(Includes Premium Templates)"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.data.trial_used)}}let U=(()=>{class n{constructor(t,i){this._subscriptionService=t,this._helperService=i,this.data={},this.braintreeInstance=null,this.discount_coupon=null,this.CouponCodeEntered=null}ngAfterViewInit(){this._helperService.bindJqueryDropdown()}ngOnInit(){this.getClientTokenAndPlan()}getClientTokenAndPlan(){this._subscriptionService.getClientTokenAndSubscriptionPlan("pro").subscribe(t=>{t&&!t.error?(this.data=t,this.initBrainTree(t.token)):(this._helperService.errorMessage(t.message),this._helperService.navigateToUrl("/"))})}discountCoupon(t){this.discount_coupon=t}removeCoupon(t){this.discount_coupon=null}initBrainTree(t){t&&g.create({authorization:t,container:"#dropin-container",paypal:{flow:"vault"},vaultManager:!0},(i,o)=>{i?console.error(i):this.braintreeInstance=o})}getBraintreePaymentMethodToken(){var t={error:!1,payload_token:null,error_message:""},i=this;return new Promise((o,r)=>{i.braintreeInstance.requestPaymentMethod((a,c)=>{a?(t.error=!0,t.error_message=a.message):t.payload_token=c.nonce,o(t)})})}isCouponCodeEntered(t){this.CouponCodeEntered=t}submitHandler(t){var i=this;return(0,f.Z)(function*(){var o="subscribe"==t;if(i.discount_coupon||!i.CouponCodeEntered){var r=null;if(o&&i.data.token){let a=yield i.getBraintreePaymentMethodToken();if(a.error)return i._helperService.errorMessage(a.error_message),!1;r=a.payload_token,i.data.trial_used=!0}i._helperService.blockUI(),i._subscriptionService.pro({token:r,discountCoupon:i.discount_coupon?i.discount_coupon.name:null,trial_used:i.data.trial_used,is_subscribe:o}).subscribe(a=>{a&&!a.error?(i._helperService.successMessage(i.data.trial_used?"Successfully Subscribed.":"Trial Activated."),i._helperService.navigateToUrl("subscription")):(i._helperService.errorMessage(a.message),i._helperService.navigateToUrl("/")),i._helperService.unBlockUI()})}else i._helperService.errorMessage("Please apply the discount coupon that you entered")})()}back(){this._helperService.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(p.W_))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-pro"]],decls:39,vars:8,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-2
10"],["class","text-center",4,"ngIf"],[1,"form-horizontal","subscription-form",3,"ngClass","ngSubmit"],["subscriptionForm","ngForm"],[1,"flex","flex-wrap"],[1,"w-full","sm:w-10/12","mx-auto"],[1,"p-2","md:p-3","mb-4","transition-all","duration-300","hover:shadow-btn","bg-success","bg-opacity-10","border","border-success","border-opacity-50","text-success","rounded-md","text-center","text-sm","md:text-base","font-medium"],["href","javascript:void(0);",3,"routerLink"],["src","assets/images/icon/team-docs-success.svg",1,"inline-block","align-text-top","md:w-6","-mr-0.5"],[1,"bg-white","shadow-card","p-4","mb-4"],[1,"flex","flex-wrap","items-center","bg-smoke-white","rounded","p-4",3,"ngClass"],[1,"w-full","sm:w-7/12","order-last","sm:order-none"],[1,"flex","flex-wrap","items-center","mb-2","md:mb-5"],["class","text-success text-2xl md:text-3xl leading-10 font-extrabold",4,"ngIf"],[1,"bullet-success-check","text-gray-300","font-normal","text-xs","leading-5","pl-5","md:text-sm","sm:leading-6"],[1,"mb-4","md:mb-6"],[3,"plan_price","type","removeCoupon","isCouponCodeEntered","discountCoupon"],["id","dropin-container"],["class","text-center flex flex-wrap gap-4 justify-center",4,"ngIf"],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-primary","fa-2x"],[1,"text-success","text-2xl","md:text-3xl","leading-10","font-extrabold"],[1,"text-center","flex","flex-wrap","gap-4","justify-center"],["type","submit","class","bg-success rounded px-8 py-2 text-white text-sm font-medium focus:outline-none hover:shadow-btn transition-all duration-300",4,"ngIf"],["href","javascript:void(0)",1,"bg-success","rounded","px-8","py-2","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"],[2,"font-size","9px"],["type","submit",1,"bg-success","rounded","px-8","py-2","text-white","text-sm","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300"]],template:function(i,o){if(1&i){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Individual Pro Subscription "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,ye,2,0,"div",8),e.TgZ(10,"form",9,10),e.NdJ("ngSubmit",function(){e.CHM(r);const c=e.MAs(11);return e.KtG(o.submitHandler(c))}),e.TgZ(12,"div",11)(13,"div",12)(14,"div",13)(15,"a",14),e._UZ(16,"img",15),e._uU(17," Multiple users? Click here for Team Docs Edition "),e.qZA()(),e.TgZ(18,"div",16)(19,"div",17)(20,"div",18)(21,"div",19),e.YNc(22,we,2,1,"div",20),e.qZA(),e.TgZ(23,"ul",21)(24,"li",22),e._uU(25,"Unlimited Templates"),e.qZA(),e.TgZ(26,"li",22),e._uU(27,"Unlimited Projects"),e.qZA(),e.TgZ(28,"li",22),e._uU(29,"Unlimited Content Library"),e.qZA(),e.TgZ(30,"li",22),e._uU(31,"Unlimited eSignatures, delivery and document tracking"),e.qZA(),e.TgZ(32,"li"),e._uU(33,"Unlimited Access to Premium Templates"),e.qZA()()()(),e.TgZ(34,"app-discount-coupon",23),e.NdJ("removeCoupon",function(c){return o.removeCoupon(c)})("isCouponCodeEntered",function(c){return o.isCouponCodeEntered(c)})("discountCoupon",function(c){return o.discountCoupon(c)}),e.qZA()(),e.ynx(35),e.TgZ(36,"div",16),e._UZ(37,"div",24),e.qZA(),e.BQk(),e.YNc(38,Ze,7,1,"div",25),e.qZA()()()()}2&i&&(e.xp6(9),e.Q6J("ngIf",o.data&&!o.data.plan||o.data&&o.data.trial_used&&!o.braintreeInstance),e.xp6(1),e.Q6J("ngClass",o.data&&!o.data.trial_used&&o.data.plan||o.data&&o.data.trial_used&&o.braintreeInstance?"visible":"invisible"),e.xp6(5),e.Q6J("routerLink","/subscription/team-docs"),e.xp6(4),e.Q6J("ngClass",o.data.trial_used?"mb-4":""),e.xp6(3),e.Q6J("ngIf",o.data&&o.data.plan),e.xp6(12),e.Q6J("plan_price",o.data.plan.price)("type","pro"),e.xp6(4),e.Q6J("ngIf",o.data&&!o.data.trial_used&&o.data.plan||o.data&&o.data.trial_used&&o.braintreeInstance))},dependencies:[d.mk,d.O5,_.rH,l._Y,l.JL,l.F,x],encapsulation:2})}return n})();function Ce(n,s){1&n&&(e.TgZ(0,"span"),e._uU(1," Existing Licenses"),e.qZA())}function ke(n,s){if(1&n&&(e.TgZ(0,"p",11),e._UZ(1,"i",12),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.AsE(" There are already ",t.data.licenses.length," users in the team roster but you are trying to purchase the subscription for ",t.data.no_of_licenses," user(s). It is important to delete the unused member(s) from the team roster before continue. ")}}
1function Se(n,s){if(1&n&&(e.TgZ(0,"div",16),e._UZ(1,"img",17),e.TgZ(2,"div",18)(3,"div",19),e._uU(4),e.TgZ(5,"span",20),e._uU(6,"(Owner)"),e.qZA()(),e.TgZ(7,"small",21),e._uU(8),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name,""),e.xp6(4),e.Oqu(t.email)}}function Ue(n,s){if(1&n&&(e.TgZ(0,"div",16),e._UZ(1,"img",17),e.TgZ(2,"div",18)(3,"div",19),e._uU(4),e.qZA(),e.TgZ(5,"small",21),e._uU(6),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name," "),e.xp6(2),e.Oqu(t.email)}}function Ae(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",22)(1,"a",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.deleteLicense(o.uid))}),e._UZ(2,"img",24),e.qZA()()}}function Ie(n,s){if(1&n&&(e.TgZ(0,"li",13),e.YNc(1,Se,9,3,"div",14),e.YNc(2,Ue,7,3,"div",14),e.YNc(3,Ae,3,0,"div",15),e.qZA()),2&n){const t=s.$implicit;e.Q6J("ngClass",s.last?"":"border-b border-light"),e.xp6(1),e.Q6J("ngIf",t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner)}}function Me(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"button",25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.apply())}),e._uU(1," Continue "),e.qZA()}}let qe=(()=>{class n extends v.u{constructor(t,i){super(),this._helper=t,this.subscriptionService=i,this.data={},this.success=!1}setInputData(t){this.data.no_of_licenses=t.no_of_licences,this.data.existingLicensesCount=t.existingLicensesCount,this.data.licenses=t.licenses}ngOnInit(){}deleteLicense(t){confirm("Are you sure you want to delete this member? This will also delete this member from all the active teams. All of the member's files are retained on Google Drive")&&(this._helper.blockUI(),this.subscriptionService.deleteExpiredTeamDocsSubscriptionLicense(t).subscribe(i=>{i.error?(this._helper.errorMessage(i.message),this._helper.unBlockUI()):(this.data.licenses.splice(this.data.licenses.findIndex(o=>o.uid===t),1),this._helper.successMessage("Member Deleted."),this._helper.unBlockUI())}))}apply(){this.success=!0,this.close(this.success)}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(p.W_),e.Y36(m.F))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-manage-existing-team-liceses"]],features:[e.qOj],decls:14,vars:4,consts:[[1,"modal","in","p-4","overflow-auto"],[1,"modal-dialog","max-w-2xl"],[1,"modal-header","px-4","py-2","bg-primary","text-white","text-sm","leading-6","relative","flex","justify-between"],[4,"ngIf"],[1,"fa","fa-times","leading-6","opacity-50","cursor-pointer","modalclose",3,"click"],[1,"modal-body","p-4"],[1,"p-3","pb-0","border","border-dashed","border-gray-light","bg-smoke-white","bg-opacity-25","mb-3","rounded","relative"],["class","text-left bg-warning bg-opacity-10 border-l-2 border-warning text-gray-300 italic text-xs px-2 py-1 mb-2",4,"ngIf"],["class","flex justify-between sm:items-center py-2 ",3,"ngClass",4,"ngFor","ngForOf"],[1,"text-center"],["class","bg-success my-0-auto rounded px-6 py-2 inline-block text-white text-sm tracking-wider font-medium focus:outline-none hover:shadow-btn transition-all duration-300",3,"click",4,"ngIf"],[1,"text-left","bg-warning","bg-opacity-10","border-l-2","border-warning","text-gray-300","italic","text-xs","px-2","py-1","mb-2"],[1,"fa","fa-info-circle","text-gray-600"],[1,"flex","justify-between","sm:items-center","py-2",3,"ngClass"],["class","flex items-start",4,"ngIf"],["class","text-right w-6",4,"ngIf"],[1,"flex","items-start"],[1,"inline-block","w-7","h-7","rounded-full","mt-0.5",3,"src"],[1,"ml-2"],[1,"text-gray-300","text-sm","leading-4","sm:leading-5","flex","flex-wrap","gap-0.5","break-all"],[1,"text-gray-900"],[1,"text-gray-900","leading-4","break-all"],[1,"text-right","w-6"],["href","javascript:void(0);",3,"click"],["alt","Delete","src","assets/images/icon-delete-danger.svg",1,"inline-block","w-3","mt-0.5"],[1,"bg-success","my-0-auto","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"]],template:function(i,o){1&i&&(e.TgZ(0,"p"),e._uU(1,"manage-existing-team-liceses w
1orks!"),e.qZA(),e.TgZ(2,"div",0)(3,"div",1)(4,"div",2),e.YNc(5,Ce,2,0,"span",3),e.TgZ(6,"i",4),e.NdJ("click",function(){return o.close()}),e.qZA()(),e.TgZ(7,"div",5)(8,"div",6),e.YNc(9,ke,3,2,"p",7),e.TgZ(10,"ul"),e.YNc(11,Ie,4,4,"li",8),e.qZA()(),e.TgZ(12,"div",9),e.YNc(13,Me,2,0,"button",10),e.qZA()()()()),2&i&&(e.xp6(5),e.Q6J("ngIf",o.data),e.xp6(4),e.Q6J("ngIf",o.data&&o.data.licenses&&o.data.no_of_licenses<o.data.licenses.length),e.xp6(2),e.Q6J("ngForOf",o.data.licenses),e.xp6(2),e.Q6J("ngIf",o.data.no_of_licenses>=o.data.licenses.length))},dependencies:[d.mk,d.sg,d.O5],encapsulation:2})}return n})();function Je(n,s){1&n&&(e.TgZ(0,"div",10),e._UZ(1,"i",11),e.qZA())}function Ne(n,s){if(1&n&&(e.TgZ(0,"div",27)(1,"h4",28),e._uU(2," Team Docs "),e.qZA(),e.TgZ(3,"div",29)(4,"span",30),e._uU(5),e.qZA(),e.TgZ(6,"span",31),e._uU(7,"\xa0/ user / month "),e.qZA()()()),2&n){const t=e.oxw(2);e.xp6(5),e.hij("$",t.data.plan.price,"")}}function Pe(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",33)(2,"div",34)(3,"label",35),e._uU(4," Number of Users: "),e.qZA()(),e.TgZ(5,"div",36)(6,"input",37),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.no_of_license=o)}),e.qZA()()(),e.TgZ(7,"div",38)(8,"div",34)(9,"label",35),e._uU(10," Total Monthly Subscription: "),e.qZA()(),e.TgZ(11,"div",36)(12,"div",39),e._uU(13),e.ALo(14,"currency"),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.Q6J("ngClass",t.data.trial_used?"mb-4":""),e.xp6(6),e.Q6J("value",t.no_of_license)("ngModel",t.no_of_license),e.xp6(7),e.hij(" ",e.lcZ(14,4,t.no_of_license*t.data.plan.price)," ")}}function De(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"app-discount-coupon",40),e.NdJ("removeCoupon",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.removeCoupon(o))})("isCouponCodeEntered",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.isCouponCodeEntered(o))})("discountCoupon",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.discountCoupon(o))}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("plan_price",t.totelPrice(t.data.plan.price,t.no_of_license))("type","team-docs")("license_count",t.no_of_license)}}function Qe(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"button",45),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.setSubmitAction("free-trial"))}),e._uU(1),e._UZ(2,"br"),e.TgZ(3,"span",44),e._uU(4,"(Excludes Premium Templates)"),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.hij("Start ",t.data.plan.trial_period," Days Free Trial")}}function Ye(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",41),e.YNc(1,Qe,5,1,"button",42),e.TgZ(2,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.setSubmitAction("subscribe"))}),e._uU(3," Subscribe"),e._UZ(4,"br"),e.TgZ(5,"span",44),e._uU(6,"(Includes Premium Templates)"),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.data.trial_used)}}function Le(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"form",13,14),e.NdJ("ngSubmit",function(){e.CHM(t);const o=e.MAs(2),r=e.oxw();return e.KtG(r.submitHandler(o))}),e.TgZ(3,"div",15)(4,"div",16)(5,"a",17),e._UZ(6,"img",18),e._uU(7," Single user? Click here for Individual Pro Subscription "),e.qZA()(),e.TgZ(8,"div",19),e.YNc(9,Ne,8,1,"div",20),e.YNc(10,Pe,15,6,"div",21),e.TgZ(11,"p",22),e._UZ(12,"i",23),e._uU(13," Team Docs is available with Google Workspace Business Standard, Business Plus and Enterprise. Google Workspace Business Starter does not support Team Docs. "),e.qZA(),e.YNc(14,De,1,3,"app-discount-coupon",24),e.qZA(),e.ynx(15),e.TgZ(16,"div",19),e._UZ(17,"div",25),e.qZA(),e.BQk(),e.YNc(18,Ye,7,1,"div",26),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("ngClass",t.data&&!t.data.trial_used&&t.data.plan||t.data&&t.data.trial_used&&t.braintreeInstance?"visible":"invisible"),e.xp6(5),e.Q6J("routerLink","/subscription/pro"),e.xp6(4),e.Q6J("ngIf",t.data&&t.data.plan),e.xp6(1),e.Q6J("ngIf",t.data&&t.data.plan),e.xp6(4),e.Q6J("ngIf",t.data.showDiscount),e.xp6(4),e.Q6J("ngIf",t.data&&!t.data.trial_used&&t.data.plan||t.data&&t.data.trial_used&&t.braintreeInstance)}}let A=(()=>{class n{constructor(t,i,o){this._subscriptionService=t,this._helperService=i,this.activatedRoute=o,this.data={},this.no_of_license=3,this.braintreeInstance=null,this.discount_coupon=null,this.CouponCodeEntered=null,this.payloadToken=null,this.isSubscribeButtonClicked=null}ngAfterViewInit(){this._helperService.bindJqueryDropdown()}ngOnInit(){this.getClientTokenAndPlan(),this.expiredTeamDocsSubscriptionDetail
1s()}getClientTokenAndPlan(){this._subscriptionService.getClientTokenAndSubscriptionPlan().subscribe(t=>{t&&!t.error?(this.data=t,this.initBrainTree(t.token)):(this._helperService.errorMessage(t.message),this._helperService.navigateToUrl("/team-docs"))})}expiredTeamDocsSubscriptionDetails(){this._subscriptionService.expiredTeamDocsSubscriptionDetails().subscribe(t=>{if(t&&1==t.error)return this._helperService.errorMessage("Something went wrong. Please try again."),!1;t&&0==t.error&&(this.data.expired_licenses=t.expiredLicenses,this.data.subscription_expired=t.expired)})}discountCoupon(t){this.discount_coupon=t}removeCoupon(t){this.discount_coupon=null}initBrainTree(t){t&&g.create({authorization:t,container:"#dropin-container",paypal:{flow:"vault"},vaultManager:!0},(i,o)=>{i?console.error(i):this.braintreeInstance=o})}totelPrice(t,i){return t*i}getBraintreePaymentMethodToken(){var t={error:!1,payload_token:null},i=this;return new Promise((o,r)=>{i.braintreeInstance.requestPaymentMethod((a,c)=>{a?(t.error=!0,console.error(a)):t.payload_token=c.nonce,o(t)})})}isCouponCodeEntered(t){this.CouponCodeEntered=t}setSubmitAction(t){this.isSubscribeButtonClicked="subscribe"==t}submitHandler(t){var i=this;return(0,f.Z)(function*(){if(i.discount_coupon||!i.CouponCodeEntered)if(/^[1-9]\d*$/.test(t.value.no_of_license))if(i.data.subscription_expired){if(i.data.subscription_expired){if(t.value.no_of_license>=i.data.expired_licenses.length)return void i.createTeamDocsSubscription(t.value.no_of_license);i._helperService.openModal(qe,{no_of_licences:t.value.no_of_license,existingLicensesCount:i.data.expired_licenses.length,licenses:i.data.expired_licenses}).output().subscribe(a=>{a&&i.createTeamDocsSubscription(t.value.no_of_license)})}}else i.createTeamDocsSubscription(t.value.no_of_license);else i._helperService.errorMessage("Decimal Value not allowed in 'Number of licenses' field");else i._helperService.errorMessage("Please apply the discount coupon that you entered")})()}createTeamDocsSubscription(t){var i=this;return(0,f.Z)(function*(){if(i.isSubscribeButtonClicked&&i.data.token){let o=yield i.getBraintreePaymentMethodToken();if(o.error)return i._helperService.errorMessage("Something went wrong. Please try again"),!1;i.payloadToken=o.payload_token}i._helperService.blockUI(),i._subscriptionService.teamDocs({token:i.payloadToken,discountCoupon:i.discount_coupon?i.discount_coupon.name:null,trial_used:i.data.trial_used,no_of_license:t,is_subscribe_button_clicked:i.isSubscribeButtonClicked}).subscribe(o=>{o&&!o.error?(i.isSubscribeButtonClicked&&(i.data.trial_used=!0),i._helperService.successMessage(i.data.trial_used?"Successfully Subscribed.":"Trail Activated."),i._helperService.navigateToUrl("team-docs/licenses?create-team=true")):(i._helperService.errorMessage(o.message),i._helperService.navigateToUrl("/")),i._helperService.unBlockUI()})})()}back(){this._helperService.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(p.W_),e.Y36(_.gz))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-team-docs"]],decls:11,vars:2,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-20"],["class","mt-20 p-25p text-center",4,"ngIf"],["class","flex flex-wrap",3,"ngClass",4,"ngIf"],[1,"mt-20","p-25p","text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-2x","fa-spin","text-primary","font-size-50"],[1,"flex","flex-wrap",3,"ngClass"],[1,"w-full",3,"ngSubmit"],["subscriptionForm","ngForm"],[1,"w-full","md:w-10/12","mx-auto"],[1,"p-2","md:p-3","mb-4","transition-all","duration-300","hover:shadow-btn","bg-primary","bg-opacity-10","border","border-primary","border-opacity-50","text-primary","rounded-md","text-center","text-sm","md:text-base","font-medium"],["href","javascript:void(0);",3,"routerLink"],["src","assets/images/icon/single-user-primary.svg",1,"inline-block","align-text-top","md:w-6","-mr-0.5"],[1,"bg-white","shadow-card","p-4","mb-4"],["class","text-center mb-4",4,"ngIf"],["class","bg-smoke-white bg-opacity-25 border border-gray-light border-opacity-25 rounded p-3 sm:p-4",3,"ngClass",4,"ngIf"],[1,"p-2","mt-4","text-gray-600","bg-gray-600","bg-opacity-10","border","border-gray-600","border-opacity-25","font-normal","text-xs","rounded","mb-2"],[1,"fa","fa-info-circle","text-sm"],[3,"plan_price","type","license_count","removeCoupon","isCouponCodeEntered","discountCoupon",4,"ngIf"],["id","dropin-container"],["class","text-center flex flex-wrap gap-4 justify-center",4,"ngIf"],[1,"text-center","mb-4"],[1,"text-lg","md:text-xl","font-medium","text-gray-300"],[1,"text-success","flex","items-center","justify-center","mt-2"],[1,"text-xl","md:text-2xl","font-extrabold"],[1,"md:text-lg","font-medium"],[1,"bg-smoke-white","bg-opacity-25","border","border-gray-light","border-opacity-25","rounded","p-3","sm:p-4",3,"ngClass"],[1,"flex","flex-wrap","items-center"],[1,"w-full","sm:w-6/12","mb-1","sm:mb-0","sm:text-right","sm:pr-8"],[1,"inline-block","text-gray-600","text-sm","font-medium"],[1,"w-full","sm:w-6/12"],["name","no_of_license","type","number","min","1","autofocus","",1,"border","border-gray-light","rounded","w-full","md:w-72","px-3","py-2","h-12","text-gray-300","focus:outline-none","focus:shadow-outline","focus:border-primary","placeholder-gray-light",3,"value","ngModel","ngModelChange"],[1,"flex","flex-wrap","items-center","border-t","border-gray-light","border-opacity-25","pt-3","sm:pt-4","mt-3","sm:mt-4"],[1,"border","border-gray-light","bg-smoke-white","rounded","w-full","md:w-72","px-3","py-2","min-h-12","flex","items-center","text-gray-300","font-medium"],[3,"plan_price","type","license_count","removeCoupon","isCouponCodeEntered","discountCoupon"],[1,"text-center","flex","flex-wrap","gap-4","justify-center"],["type","submit","class","bg-success rounded px-6 py-2 inline-block text-white text-sm font-medium focus:outline-none hover:shadow-btn transition-all duration-300",3,"click",4,"ngIf"],["type","submit",1,"bg-success","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"],[2,"font-size","9px"],["type","submit",1,"bg-success","rounded","px-6","py-2","inline-block","text-white","text-sm","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"click"]],template:function(i,o){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Team Docs Subscription "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,Je,2,0,"div",8),e.YNc(10,Le,19,6,"div",9),e.qZA()),2&i&&(e.xp6(9),e.Q6J("ngIf",o.data&&!o.data.plan||o.data&&o.data.tri
1al_used&&!o.braintreeInstance),e.xp6(1),e.Q6J("ngIf",o.data&&o.data.plan||o.data&&!o.data.trial_used&&o.braintreeInstance))},dependencies:[d.mk,d.O5,_.rH,l._Y,l.Fj,l.wV,l.JJ,l.JL,l.qQ,l.On,l.F,x,d.H9],encapsulation:2})}return n})();var y=u(8540);function je(n,s){1&n&&(e.TgZ(0,"div",17),e._UZ(1,"i",18),e.qZA())}function Ee(n,s){if(1&n&&(e.TgZ(0,"div",32)(1,"div",27)(2,"label",28),e._uU(3," Current Number of Licenses: "),e.qZA()(),e.TgZ(4,"div",29)(5,"div",33),e._uU(6),e.qZA()()()),2&n){const t=e.oxw(2);e.xp6(6),e.hij(" ",t.subscription.members_count," ")}}function Fe(n,s){if(1&n&&(e.TgZ(0,"div",34)(1,"div",27)(2,"label",28),e._uU(3," Additional price: "),e.qZA()(),e.TgZ(4,"div",29)(5,"div",33),e._uU(6),e.qZA()()()),2&n){const t=e.oxw(2);e.xp6(6),e.hij(" $",t.no_of_license*t.data.plan.price," ")}}function He(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"div",21)(3,"span",22),e._uU(4),e.qZA(),e.TgZ(5,"span",23),e._uU(6,"\xa0/ License / Month"),e.qZA()()(),e.TgZ(7,"div",24),e.YNc(8,Ee,7,1,"div",25),e.TgZ(9,"div",26)(10,"div",27)(11,"label",28),e._uU(12," Add New Licenses: "),e.qZA()(),e.TgZ(13,"div",29)(14,"input",30),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.no_of_license=o)}),e.qZA()()(),e.YNc(15,Fe,7,1,"div",31),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(4),e.hij("$",t.data.plan.price,""),e.xp6(4),e.Q6J("ngIf",t.subscription),e.xp6(6),e.Q6J("value",t.no_of_license)("ngModel",t.no_of_license),e.xp6(1),e.Q6J("ngIf",t.data.plan&&t.subscription&&!t.subscription.subscription.on_trial)}}function Be(n,s){1&n&&(e.TgZ(0,"a",38),e._uU(1,"Cancel"),e.qZA()),2&n&&e.Q6J("routerLink","/team-docs/licenses")}function Oe(n,s){1&n&&(e.TgZ(0,"a",38),e._uU(1,"Cancel"),e.qZA()),2&n&&e.Q6J("routerLink","/subscription")}function Ge(n,s){1&n&&(e.TgZ(0,"button",39),e._uU(1,"Add Licenses Now"),e.qZA())}function Ke(n,s){if(1&n&&(e.TgZ(0,"button",39),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("Add Licenses Now ",t.no_of_license*t.data.plan.price-t.discount,"")}}
1function $e(n,s){if(1&n&&(e.TgZ(0,"div",35),e.YNc(1,Be,2,1,"a",36),e.YNc(2,Oe,2,1,"a",36),e.YNc(3,Ge,2,0,"button",37),e.YNc(4,Ke,2,1,"button",37),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.goToManageLicensePage),e.xp6(1),e.Q6J("ngIf",!t.goToManageLicensePage),e.xp6(1),e.Q6J("ngIf",!t.discount),e.xp6(1),e.Q6J("ngIf",t.discount)}}let We=(()=>{class n{constructor(t,i,o,r){this._subscriptionService=t,this._helperService=i,this.activeRoute=o,this.router=r,this.data={},this.no_of_license=1,this.braintreeInstance=null,this.subscription=null,this.discount=0,this.couponName=""}ngOnInit(){this.getClientTokenAndPlan(),this._subscriptionService.get().subscribe(t=>this.subscription=t.data)}getDiscountValue(t){this.discount=t.amount,this.couponName=t.name}getClientTokenAndPlan(){this._subscriptionService.getClientTokenAndSubscriptionPlan().subscribe(t=>{t&&!t.error?(this.data=t,this.initBrainTree(t.token)):(this._helperService.errorMessage(t.message),this._helperService.navigateToUrl("/team-docs"))})}initBrainTree(t){t&&g.create({authorization:t,container:"#dropin-container",paypal:{flow:"vault"}},(i,o)=>{i?console.error(i):this.braintreeInstance=o})}getBraintreePaymentMethodToken(){var t={error:!1,payload_token:null},i=this;return new Promise((o,r)=>{i.braintreeInstance.requestPaymentMethod((a,c)=>{a?(t.error=!0,console.error(a)):t.payload_token=c.nonce,o(t)})})}submitHandler(t){var i=this;return(0,f.Z)(function*(){var o=null;if(i.data.token){let r=yield i.getBraintreePaymentMethodToken();if(r.error)return i._helperService.errorMessage(r.error_message),!1;o=r.payload_token}i._helperService.blockUI(),i._subscriptionService.upgradeTeamDocs({token:o,trial_used:i.data.trial_used,no_of_license:t.value.no_of_license}).subscribe(r=>{r&&!r.error?(i._helperService.successMessage("New Licenses added."),i._helperService.navigateToUrl("subscription"),i._helperService.unBlockUI()):(i._helperService.errorMessage(r.message),i._helperService.unBlockUI())})})()}subscriptionPriceAfterUpgrade(){return parseInt(this.subscription.subscription.next_bill_amount)+this.no_of_license*this.data.plan.price}upgradedLicensePrice_back(){let t=+this.data.members_count*+this.data.plan.price,i=t+this.no_of_license*this.data.plan.price,o=y(this.data.subscription.billing_period_start_date),r=y(this.data.subscription.billing_period_end_date),a=Math.abs(o.diff(r,"days"))+1;return((Math.abs(y().diff(r,"days"))+1)/a*(i-t)).toFixed(2)}redirectToPreviousPage(){this.activeRoute.queryParams.subscribe(t=>{this.router.navigate(t&&t.manage_licenses?["/team-docs/licenses"]:["/subscription"])})}back(){this._helperService.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(p.W_),e.Y36(_.gz),e.Y36(_.F0))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-upgrade"]],decls:18,vars:5,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-20"],["class","mt-20 p-25p text-center",4,"ngIf"],[1,"flex","flex-wrap",3,"ngClass"],[1,"w-full","md:w-10/12","mx-auto"],[3,"ngSubmit"],["subscriptionForm","ngForm"],["class","bg-white shadow-card p-3 sm:p-4 mb-4",4,"ngIf"],[1,"bg-white","shadow-card","p-3","sm:p-4","mb-4",3,"ngClass"],["id","dropin-container"],["class","flex flex-wrap w-full gap-4 justify-center text-center",4,"ngIf"],[1,"mt-20","p-25p","text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-primary","font-size-50","fa-2x"],[1,"bg-white","shadow-card","p-3","sm:p-4","mb-4"],[1,"text-center","mb-3","sm:mb-4"],[1,"text-success","flex","items-center","justify-center","md:leading-8"],[1,"text-xl","md:text-2xl","font-extrabold"],[1,"md:text-lg","font-medium"],[1,"bg-smoke-white","bg-opacity-25","border","border-gray-light","border-opacity-25","rounded","p-3","sm:p-4"],["class","flex flex-wrap items-center border-b border-gray-light border-opacity-25 pb-3 sm:pb-4 mb-3 sm:mb-4",4,"ngIf"],[1,"flex","flex-wrap","items-center"],[1,"w-full","sm:w-6/12","mb-1","sm:mb-0","sm:text-right","sm:pr-8"],[1,"block","text-gray-600","text-sm","leading-4","font-medium"],[1,"w-full","sm:w-6/12"],["name","no_of_license","type","number","min","1","autofocus","",1,"border","border-gray-light","rounded","w-full","md:w-72","px-3","py-2","h-12","text-gray-300","focus:outline-none","focus:shadow-outline","focus:border-primary","placeholder-gray-light",3,"value","ngModel","ngModelChange"],["class","flex flex-wrap items-center border-t border-gray-light border-opacity-25 pt-3 sm:pt-4 mt-3 sm:mt-4",4,"ngIf"],[1,"flex","flex-wrap","items-center","border-b","border-gray-light","border-opacity-25","pb-3","sm:pb-4","mb-3","sm:mb-4"],[1,"border","border-gray-light","bg-smoke-white","rounded","w-full","md:w-72","px-3","py-2","min-h-12","flex","items-center","text-gray-300","font-medium"],[1,"flex","flex-wrap","items-center","border-t","border-gray-light","border-opacity-25","pt-3","sm:pt-4","mt-3","sm:mt-4"],[1,"flex","flex-wrap","w-full","gap-4","justify-center","text-center"],["href","javascript:void(0);","class","bg-warning rounded px-6 py-2 inline-block text-white text-sm tracking-wider font-medium focus:outline-none hover:shadow-btn transition-all duration-300",3,"routerLink",4,"ngIf"],["class","bg-success rounded px-6 py-2 inline-block text-white text-sm tracking-wider font-medium focus:outline-none hover:shadow-btn transition-all duration-300",4,"ngIf"],["href","javascript:void(0);",1,"bg-warning","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"routerLink"],[1,"bg-success","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300"]],template:function(i,o){if(1&i){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Add Licenses "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,je,2,0,"div",8),e.TgZ(10,"div",9)(11,"div",10)(12,"form",11,12),e.NdJ("ngSubmit",function(){e.CHM(r);const c=e.MAs(13);return e.KtG(o.submitHandler(c))}),e.YNc(14,He,16,5,"div",13),e.TgZ(15,"div",14),e._UZ(16,"div",15),e.qZA(),e.YNc(17,$e,5,4,"div",16),e.qZA()()()()}2&i&&(e.xp6(9),e.Q6J("ngIf",!o.subscription||o.subscription&&!o.subscription.subscription.on_trial&&!o.braintreeInstance),e.xp6(1),e.Q6J("ngClass",o.subscription&&o.subscription.subscription.on_trial&&o.data&&o.data.plan||o.subscription&&!o.subscription.subscription.on_trial&&o.braintreeInstance?"visible":"invisible"),e.xp6(4),e.Q6J("ngIf",o.data&&o.data.plan),e.xp6(1),e.Q6J("ngClass",o.subscription&&!o.subscription.subscription.on_trial&&o.braintreeInstance?"visible":"invisible"),e.xp6(2),e.Q6J("ngIf",o.subscription&&o.subscription.subscription.on_trial&&o.data&&o.data.plan||o.subscription&&!o.subscription.subscription.on_trial&&o.braintreeInstance))},dependencies:[d.mk,d.O5,_.rH,l._Y,l.Fj,l.wV,l.JJ,l.JL,l.qQ,l.On,l.F],encapsulation:2})}return n})();var Re=u(7178);function ze(n,s){1&n&&(e.TgZ(0,"div",21),e._UZ(1,"i",22),e.qZA())}
1function Xe(n,s){if(1&n&&(e.TgZ(0,"div",23),e._UZ(1,"i",24),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.AsE(" You have assigned ",t.data.licenses.length," of your ",t.data.team_docs_members_count," licenses. ")}}function Ve(n,s){if(1&n&&(e.TgZ(0,"div",28),e._UZ(1,"img",29),e.TgZ(2,"div",30)(3,"div",31),e._uU(4),e.TgZ(5,"span",32),e._uU(6,"(Owner)"),e.qZA()(),e.TgZ(7,"small",33),e._uU(8),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name,""),e.xp6(4),e.Oqu(t.email)}}function et(n,s){if(1&n&&(e.TgZ(0,"div",28),e._UZ(1,"img",29),e.TgZ(2,"div",30)(3,"div",31),e._uU(4),e.qZA(),e.TgZ(5,"small",33),e._uU(6),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("src",t.profile_image_url?t.profile_image_url:"/default-user-profile/gray.svg",e.LSH),e.xp6(3),e.hij(" ",t.name," "),e.xp6(2),e.Oqu(t.email)}}function tt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",34)(1,"a",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.deleteLicense(o.uid))}),e._UZ(2,"img",36),e.qZA()()}}function it(n,s){if(1&n&&(e.TgZ(0,"li",25),e.YNc(1,Ve,9,3,"div",26),e.YNc(2,et,7,3,"div",26),e.YNc(3,tt,3,0,"div",27),e.qZA()),2&n){const t=s.$implicit;e.xp6(1),e.Q6J("ngIf",t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner),e.xp6(1),e.Q6J("ngIf",!t.is_owner)}}function nt(n,s){if(1&n&&(e.TgZ(0,"option",46),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t," ")}}function ot(n,s){if(1&n&&(e.TgZ(0,"div",37)(1,"div",38)(2,"div",39)(3,"label",40),e._uU(4," Current Number of Licenses: "),e.qZA()(),e.TgZ(5,"div",41)(6,"div",42),e._uU(7),e.qZA()()(),e.TgZ(8,"div",43)(9,"div",39)(10,"label",40),e._uU(11," Decrease Licenses To: "),e.qZA()(),e.TgZ(12,"div",41)(13,"select",44),e.YNc(14,nt,2,2,"option",45),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(7),e.hij(" ",t.data.team_docs_members_count," "),e.xp6(6),e.Q6J("ngModel",t.data.team_docs_members_count-1),e.xp6(1),e.Q6J("ngForOf",t.convertToArray(t.data.team_docs_members_count))}}function rt(n,s){1&n&&(e.TgZ(0,"a",47),e._uU(1,"Cancel"),e.qZA()),2&n&&e.Q6J("routerLink","/team-docs/licenses")}function st(n,s){1&n&&(e.TgZ(0,"a",47),e._uU(1,"Cancel"),e.qZA()),2&n&&e.Q6J("routerLink","/subscription")}let at=(()=>{class n{constructor(t,i,o,r,a,c){this._subscriptionService=t,this._helperService=i,this._teamDocsService=o,this._auth=r,this.activeRoute=a,this.router=c,this.data={},this.goToManageLicensePage=!1,this.goToSubscriptionPage=!1}ngOnInit(){this._teamDocsService.observer().subscribe(t=>this.data=t),this.getLicenses(),this.activeRoute.queryParams.subscribe(t=>{t&&t.manage_licenses?this.goToManageLicensePage=!0:t&&t.subscription&&(this.goToSubscriptionPage=!0)})}getLicenses(){this._teamDocsService.licenses().subscribe(t=>{t.error?(this._helperService.errorMessage(t.message),this._helperService.navigateToUrl("projects")):this._teamDocsService.updateObserver(t.data)})}convertToArray(t){return Re.range(1,t)}submitHandler(t){this._helperService.blockUI(),this._subscriptionService.downgradeTeamDocs({licenses:t.value.downgraded_licenses}).subscribe(i=>{i&&i.error&&"DELETE_TEAM_DOCS_MEMBER"==i.type?(this._helperService.errorMessage(i.message),this._helperService.unBlockUI()):i&&i.error?(this._helperService.errorMessage(i.message),this._helperService.navigateToUrl("subscription"),this._helperService.unBlockUI()):(this._helperService.navigateToUrl("subscription"),this._helperService.unBlockUI())})}deleteLicense(t){confirm("Are you sure you want to delete this member? This will also delete this member from all the active teams. All of the member's files are retained on Google Drive")&&(this._helperService.blockUI(),this._teamDocsService.deleteLicense(t).subscribe(i=>{i.error?(this._helperService.errorMessage(i.message),this._helperService.unBlockUI()):(this._teamDocsService.updateObserver(i.data),this._helperService.successMessage("Member Deleted."),this._helperService.unBlockUI())}))}redirectToPreviousPage(){this.activeRoute.queryParams.subscribe(t=>{this.router.navigate(t&&t.manage_licenses?["/team-docs/licenses"]:["/subscription"])})}back(){this._helperService.jumpToPreviousPage()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(m.F),e.Y36(p.W_),e.Y36(k.e),e.Y36(p.e8),e.Y36(_.gz),e.Y36(_.F0))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-downgrade"]],decls:24,vars:6,consts:[[1,"bg-white"],[1,"container","mx-auto"],[1,"flex","sm:items-center","px-4","py-3"],[1,"pr-2"],["href","javascript:void(0);",1,"text-gray-300",3,"click"],[1,"fa","fa-angle-left","font-bold","text-3xl"],[1,"text-gray-300","font-medium","flex-1","text-center","text-sm","sm:text-base"],[1,"container","mx-auto","px-4","py-4","min-h-90-vh","lg:min-h-70-vh","xl:min-h-screen","mb-2
10"],["class","mt-20 p-25p text-center",4,"ngIf"],[1,"flex","flex-wrap"],[1,"w-full","md:w-10/12","mx-auto"],[3,"ngSubmit"],["subscriptionForm","ngForm"],[1,"bg-white","shadow-card","p-3","sm:p-4","mb-4"],["class","p-2 text-primary bg-primary bg-opacity-10 border border-primary border-opacity-25 text-sm rounded",4,"ngIf"],[1,"last-child-style-none"],["class","flex justify-between sm:items-center py-3 border-b border-light",4,"ngFor","ngForOf"],["class","bg-smoke-white bg-opacity-25 border border-gray-light border-opacity-25 rounded p-3 sm:p-4",4,"ngIf"],[1,"flex","flex-wrap","w-full","gap-4","justify-center","text-center"],["class","bg-warning rounded px-6 py-2 inline-block text-white text-sm tracking-wider font-medium focus:outline-none hover:shadow-btn transition-all duration-300",3,"routerLink",4,"ngIf"],[1,"bg-success","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300"],[1,"mt-20","p-25p","text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-2x","fa-spin","text-primary","font-size-50"],[1,"p-2","text-primary","bg-primary","bg-opacity-10","border","border-primary","border-opacity-25","text-sm","rounded"],[1,"fa","fa-exclamation-circle"],[1,"flex","justify-between","sm:items-center","py-3","border-b","border-light"],["class","flex items-start",4,"ngIf"],["class","text-right w-6",4,"ngIf"],[1,"flex","items-start"],[1,"inline-block","w-7","h-7","rounded-full","mt-0.5",3,"src"],[1,"ml-2"],[1,"text-gray-300","text-sm","leading-4","sm:leading-5","flex","flex-wrap","gap-0.5","break-all"],[1,"text-gray-900"],[1,"text-gray-900","leading-4","break-all"],[1,"text-right","w-6"],["href","javascript:void(0);",3,"click"],["alt","Delete","src","assets/images/icon-delete-danger.svg",1,"inline-block","w-3","mt-0.5"],[1,"bg-smoke-white","bg-opacity-25","border","border-gray-light","border-opacity-25","rounded","p-3","sm:p-4"],[1,"flex","flex-wrap","items-center","border-b","border-gray-light","border-opacity-25","pb-3","sm:pb-4","mb-3","sm:mb-4"],[1,"w-full","sm:w-6/12","mb-1","sm:mb-0","sm:text-right","sm:pr-8"],[1,"block","text-gray-600","text-sm","leading-4","font-medium"],[1,"w-full","sm:w-6/12"],[1,"border","border-gray-light","bg-smoke-white","rounded","w-full","md:w-72","px-3","py-2","min-h-12","text-gray-300"],[1,"flex","flex-wrap","items-center"],["name","downgraded_licenses",1,"appearance-none","relative","border","border-gray-light","rounded","w-full","md:w-72","px-3","py-2","h-12","text-gray-300","focus:outline-none","focus:shadow-outline","focus:border-primary","select-aarow-change",3,"ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"bg-warning","rounded","px-6","py-2","inline-block","text-white","text-sm","tracking-wider","font-medium","focus:outline-none","hover:shadow-btn","transition-all","duration-300",3,"routerLink"]],template:function(i,o){if(1&i){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),e.NdJ("click",function(){return o.back()}),e._UZ(5,"i",5),e.qZA()(),e.TgZ(6,"div",6),e._uU(7," Remove Licenses "),e.qZA()()()(),e.TgZ(8,"div",7),e.YNc(9,ze,2,0,"div",8),e.TgZ(10,"div",9)(11,"div",10)(12,"form",11,12),e.NdJ("ngSubmit",function(){e.CHM(r);const c=e.MAs(13);return e.KtG(o.submitHandler(c))}),e.TgZ(14,"div",13),e.YNc(15,Xe,3,2,"div",14),e.TgZ(16,"ul",15),e.YNc(17,it,4,3,"li",16),e.qZA(),e.YNc(18,ot,15,3,"div",17),e.qZA(),e.TgZ(19,"div",18),e.YNc(20,rt,2,1,"a",19),e.YNc(21,st,2,1,"a",19),e.TgZ(22,"button",20),e._uU(23,"Remove Licenses Now"),e.qZA()()()()()()}2&i&&(e.xp6(9),e.Q6J("ngIf",!o.data),e.xp6(6),e.Q6J("ngIf",o.data.licenses),e.xp6(2),e.Q6J("ngForOf",o.data.licenses),e.xp6(1),e.Q6J("ngIf",o.data),e.xp6(2),e.Q6J("ngIf",o.goToManageLicensePage),e.xp6(1),e.Q6J("ngIf",!o.goToManageLicensePage))},dependencies:[d.sg,d.O5,_.rH,l._Y,l.YN,l.Kr,l.EJ,l.JJ,l.JL,l.On,l.F],encapsulation:2})}return n})(),I=(()=>{class n{constructor(t,i){this.authService=t,this.helper=i}canActivate(t,i){return this.authService.authenticate(!0).then(o=>{if(!o)return!1;let r=this.authService.user||null;return!r||1==r.can_create_team_drives||(this.helper.navigateToUrl("/team-docs"),!1)})}static#e=this.\u0275fac=function(i){return new(i||n)(e.LFG(h.e),e.LFG(b.W))};static#t=this.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var M=u(3499);const ct=[{path:"",component:xe,canActivate:[T.B],data:{title:"Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"pro",component:U,canActivate:[Z],data:{title:"Individual Pro | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"pro",component:U,canActivate:[Z],data:{title:"Individual Pro | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"team-docs",component:A,canActivate:[I,C],data:{title:"Team Docs | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"team-docs",component:A,canActivate:[I,C],data:{title:"Team Docs | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"team-docs/upgrade",component:We,canActivate:[M.a],data:{title:"Team Doc Licenses | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"team-docs/downgrade",component:at,canActivate:[M.a],data:{title:"Team Doc Licenses | Subscription | StartDeck",logo:p.W_.getLogo(2)}},{path:"payment-methods",component:D,canActivate:[T.B],data:{title:"Payment Methods | Subscription | StartDeck",logo:p.W_.getLogo(2)}}];let lt=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#i=this.\u0275inj=e.cJS({imports:[_.Bz.forChild(ct),_.Bz]})}return n})(),dt=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#i=this.\u0275inj=e.cJS({imports:[q.I,lt]})}return n})()}}]); 2//# sourceMappingURL=101.2273200dd2733045.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.