1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["default-src_app_shared_components_bs-forms_form-stripe_form-stripe_component_ts-src_app_share-f8e217"],{71924:function(e,t,r){r.d(t,{X:function(){return E}});var s=r(64762),n=r(74788),i=r(97245),a=r(52726),o=r(92599),l=r(50270),c=r(86846),m=r(12057);const d=["card"],h=["paymentRequestButton"];function u(e,t){1&e&&n.\u0275\u0275element(0,"div",8,9)}function p(e,t){if(1&e&&(n.\u0275\u0275elementStart(0,"div",10),n.\u0275\u0275elementStart(1,"small",11),n.\u0275\u0275text(2),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd()),2&e){const e=n.\u0275\u0275nextContext();n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate(e.settings.card.error||e.VALIDATION_ERRORS._common.payment_method)}}function _(e,t){if(1&e&&(n.\u0275\u0275elementStart(0,"div"),n.\u0275\u0275elementStart(1,"div",12),n.\u0275\u0275elementStart(2,"div",13),n.\u0275\u0275elementStart(3,"div",14),n.\u0275\u0275elementStart(4,"div",15),n.\u0275\u0275namespaceSVG(),n.\u0275\u0275elementStart(5,"svg",16),n.\u0275\u0275element(6,"path",17),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd(),n.\u0275\u0275namespaceHTML(),n.\u0275\u0275elementStart(7,"div",18),n.\u0275\u0275elementStart(8,"small",19),n.\u0275\u0275text(9),n.\u0275\u0275pipe(10,"currency"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd()),2&e){const e=n.\u0275\u0275nextContext();n.\u0275\u0275advance(9),n.\u0275\u0275textInterpolate1("Billshark will verify my payment method by placing a ",n.\u0275\u0275pipeBind1(10,1,e._shared._cartService.user.on_hold_amount/100)," temporary authorization hold on my payment card. This hold should be released by the bank within 3-7 business days.")}}function y(e,t){1&e&&(n.\u0275\u0275elementStart(0,"div",20),n.\u0275\u0275elementStart(1,"button",21),n.\u0275\u0275listener("click",function(){return"submitCard()"}),n.\u0275\u0275text(2," Submit card "),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementEnd())}let E=(()=>{class e{constructor(e,t,r){this._shared=e,this._activatedRoute=t,this._zone=r,this.account_id="",this.type="",this.client_secret="",this.SETTINGS=i.L6,this.VALIDATION_ERRORS=i.aQ,this.isModal=!1,this.onHoldAmountAlert=!0,this.cardStyle=null,this.eventCards=new n.EventEmitter,this.route="",this.on_hold_amount=0,this.touched=!1,this.settings={error:!1,card:{nativeElement:void 0,stripeElement:void 0,empty:!0,error:i.aQ._common.required},styles:{default:{base:{fontFamily:"Inter-Regular, Arial, Helvetica",fontSize:"14px",color:"#93969d",letterSpacing:"0.75px","::placeholder":{fontSize:"14px",color:"#93969d"}}}},button:{nativeElement:void 0,stripeElement:void 0}}}set setCard(e){this.settings.card.nativeElement=e.nativeElement}set setPaymentRequestButton(e){this.SETTINGS.DIGITAL_WALLET&&(this.settings.button.nativeElement=e.nativeElement)}ngOnInit(){this._shared._utilService.loadScript(i.p_.STRIPE).then(()=>{this.stripe=Stripe(i.bl.STRIPE_PUBLISHED_KEY,this.account_id?{locale:"en",stripeAccount:this.account_id}:{locale:"en"}),this.elements=this.stripe.elements(i.L6.STRIPE_PAYMENT_ELEMENT?{mode:"payment",currency:"usd",amount:100,setup_future_usage:"off_session",capture_method:"automatic"}:{}),this.createStripeElement()})}ngOnDestroy(){try{const e=this.settings&&this.settings.card&&this.settings.card.stripeElement;e&&(e.unmount(),e.destroy())}catch(e){}}createStripeElement(){const e=this.settings.card,t=this.elements.create(i.L6.STRIPE_PAYMENT_ELEMENT?"payment":"card",{classes:{base:"form-control",empty:"ng-invalid",focus:"stripe-control-focused",invalid:"ng-invalid"},style:this.cardStyle||this.settings.styles.default,hidePostalCode:!0});if(t.mount(e.nativeElement),t.on("blur",()=>{this._zone.run(()=>{this.touched=!0,this.settings.error=!1,t.update({classes:{base:"form-control ng-touched"}})})}),t.on("change",r=>{this._zone.run(()=>{this.settings.error=!1,t.update({classes:{base:"form-control ng-touched"}}),Object.assign(e,{empty:r.empty,error:r.empty?i.aQ._common.required:r.error?r.error.message:""})})}),e.stripeElement=t,this.SETTINGS.DIGITAL_WALLET){const e=this.settings.button,r=this.stripe.paymentRequest({country:"US",currency:"usd",total:{label:"Demo total",amount:0}
1,requestPayerName:!0,requestPayerEmail:!0}),s=this.elements.create("paymentRequestButton",{paymentRequest:r});r.canMakePayment().then(r=>{r?(s.mount(e.nativeElement),e.stripeElement=t):s.update({style:{display:"none"}})})}}getCardToken(){return new Promise((e,t)=>(0,s.mG)(this,void 0,void 0,function*(){if(this.SETTINGS.PAYMENT_INTENDS)if(this.client_secret)this.confirmPaymentMethod(e,t);else{let r="";r="secured"!==this.type&&this._shared._httpService.isUserLogged()?i.bl.API_ENDPOINTS.CUSTOMER_PAYMENT_INTENDS:"secured"===this.type||this._shared._httpService.isUserLogged()?i.bl.API_ENDPOINTS.SECURE_PAYMENT_INTENDS:i.bl.API_ENDPOINTS.PAYMENT_INTENDS;const s=this._shared._httpService.isUserLogged()?{}:{query_parameters:Object.assign({},this._shared._cartService.user.queryParams,{pc:this._shared._cartService.user.queryParams.pc||this._shared._cartService.user.queryParams.wpc,ref:this._shared._cartService.user.queryParams.grsf})};this._shared._httpService.httpRequest(r,i.I5.POST,s).then(r=>{const s=JSON.parse(JSON.stringify(r));this.client_secret=s.client_secret,s.on_hold_amount&&(this._shared._cartService.user.on_hold_amount=s.on_hold_amount),this.confirmPaymentMethod(e,t)}).catch(e=>{this.invalidateStripeElement(),t()})}else this.stripe.createToken(this.settings.card.stripeElement,{}).then(r=>{if(!r.error&&r.token)e(r.token);else{const e=this.settings.card;e.empty?e.error=i.aQ._common.required:this.invalidateStripeElement(),t()}}).catch(()=>{t()})}))}confirmPaymentMethod(e,t){return(0,s.mG)(this,void 0,void 0,function*(){if(i.L6.STRIPE_PAYMENT_ELEMENT)if(this._shared._cartService.user.on_hold_amount){const{error:r}=yield this.elements.submit();if(r)return void console.log(r);this.stripe.confirmPayment({elements:this.elements,clientSecret:this.client_secret,redirect:"if_required",confirmParams:{return_url:document.location.href}}).then(r=>{r.error?(this.invalidateStripeElement(r.error.message),t()):e(r.paymentIntent.payment_method)})}else this.stripe.confirmCardSetup(this.stripe.elements,this.client_secret,{payment_method:{card:this.settings.card.stripeElement,billing_details:{}}}).then(r=>{r.error?(this.invalidateStripeElement(r.error.message),t()):e(r.setupIntent.payment_method)});else this._shared._cartService.user.on_hold_amount?this.stripe.confirmCardPayment(this.client_secret,{payment_method:{card:this.settings.card.stripeElement,billing_details:{}}}).then(r=>{r.error?(this.invalidateStripeElement(r.error.message),t()):e(r.paymentIntent.payment_method)}):this.stripe.confirmCardSetup(this.client_secret,{payment_method:{card:this.settings.card.stripeElement,billing_details:{}}}).then(r=>{r.error?(this.invalidateStripeElement(r.error.message),t()):e(r.setupIntent.payment_method)})})}invalidateStripeElement(e=null){this.settings.error=!0,this.settings.card.stripeElement.update({classes:{base:"form-control ng-touched ng-invalid"}}),e&&(this.settings.card.error=e)}}return e.\u0275fac=function(t){return new(t||e)(n.\u0275\u0275directiveInject(a.F1),n.\u0275\u0275directiveInject(o.gz),n.\u0275\u0275directiveInject(n.NgZone))},e.\u0275cmp=n.\u0275\u0275defineComponent({type:e,selectors:[["form-stripe"]],viewQuery:function(e,t){if(1&e&&(n.\u0275\u0275viewQuery(d,5),n.\u0275\u0275viewQuery(h,5)),2&e){let e;n.\u0275\u0275queryRefresh(e=n.\u0275\u0275loadQuery())&&(t.setCard=e.first),n.\u0275\u0275queryRefresh(e=n.\u0275\u0275loadQuery())&&(t.setPaymentRequestButton=e.first)}},inputs:{account_id:"account_id",type:"type",client_secret:"client_secret",isModal:"isModal",onHoldAmountAlert:"onHoldAmountAlert",cardStyle:"cardStyle"},outputs:{eventCards:"eventCards"},decls:8,vars:5,consts:[[1,"bs-form"],[1,"form-group","py-0","mb-0","position-relative"],["bsTooltip","",1,"form-group","my-0",3,"b
1sTooltipError"],["card",""],["class","my-2",4,"ngIf"],["class","col-12 form-group my-0 py-0",4,"ngIf"],[4,"ngIf"],["class","text-center",4,"ngIf"],[1,"my-2"],["paymentRequestButton",""],[1,"col-12","form-group","my-0","py-0"],[1,"text-danger"],[1,"row","pt-2"],[1,"col-12"],[1,"row","px-4"],[1,"col-1","text-right"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 21L12 2L23 21H1ZM12 18C12.2833 18 12.5208 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5208 16.0958 12.2833 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0958 16.4792 11 16.7167 11 17C11 17.2833 11.0958 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM11 15H13V10H11V15Z","fill","#004181"],[1,"col-11","px-3","pl-md-0","pl-lg-2","pl-xl-0"],[1,"Inter-Medium",2,"font-size","14px","color","#004181!important","font-weight","400!important","line-height","16.94px!important"],[1,"text-center"],[1,"btn","my-3","w-100","bg-green-16B7BB","text-white","font-size-16","font-inter-semi-bold","position-relative",3,"click"]],template:function(e,t){1&e&&(n.\u0275\u0275elementStart(0,"form",0),n.\u0275\u0275elementStart(1,"div",1),n.\u0275\u0275element(2,"div",2,3),n.\u0275\u0275template(4,u,2,0,"div",4),n.\u0275\u0275template(5,p,3,1,"div",5),n.\u0275\u0275template(6,_,11,3,"div",6),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(7,y,3,0,"div",7),n.\u0275\u0275elementEnd()),2&e&&(n.\u0275\u0275advance(2),n.\u0275\u0275property("bsTooltipError",t.settings.card.error),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",t.SETTINGS.DIGITAL_WALLET),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.settings.error),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.SETTINGS.PAYMENT_INTENDS&&t.onHoldAmountAlert&&t._shared._cartService.user.on_hold_amount),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.isModal))},directives:[l.\u0275NgNoValidate,l.NgControlStatusGroup,l.NgForm,c.v,m.O5],pipes:[m.H9],styles:[".form-group[data-_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}"]}),e})()},94262:function(e,t,r){r.d(t,{r:function(){return a}});var s=r(97245),n=r(74788),i=r(52726);let a=(()=>{class e{constructor(e){this.shared=e,this.BILL_TYPE=s.$M,this.SETTINGS=s.L6,this.BANNER_STYLES=s.Sc,this.VIDEOS=s.FM,this.PRODUCTS=s.bQ,this.user=e._cartService.user}ngOnInit(){this.shared._seoService.initPage(),this.shared._utilService.dismissAllSidebars(),this.getQueryParameters()}getQueryParameters(){this.user&&(Object.assign(this.user.queryParams,this.shared._activatedRoute.snapshot.queryParams),this.user.queryParams.keyword&&(this.user.queryParams.kw=this.user.queryParams.keyword),this.user.queryParams.gclid&&(this.user.queryParams.cid=this.user.queryParams.gclid))}}return e.\u0275fac=function(t){return new(t||e)(n.\u0275\u0275directiveInject(i.F1))},e.\u0275cmp=n.\u0275\u0275defineComponent({type:e,selectors:[["app-page"]],decls:0,vars:0,template:function(e,t){},encapsulation:2}),e})()}}]);
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.