PageSourceSearch

https://borneo-test.web.app/chunk-5WG7ZNQ7.js

js borneo-test.web.app collected 2026-10-03 12:18:54 UTC 31,402 bytes, 3 lines download raw bytes

1import{a as qe}from"./chunk-YNSVVPQL.js";import{a as ie}from"./chunk-SGKJNNI6.js";import{a as Le}from"./chunk-HZSYZ7UK.js";import{b as p,c as Be,j as je}from"./chunk-QKV3JSRF.js";import{a as $}from"./chunk-3C2W3I2Q.js";import{a as D,b as Oe,d as He}from"./chunk-NAUQ2YLB.js";import{b as ze}from"./chunk-DLCLPIE2.js";import{l as Se,t as Pe,u as Ne}from"./chunk-5CCS6TD6.js";import{G as Re,L as De,N as W,P as Fe,s as Te}from"./chunk-OF4PHCNS.js";import{a as R,c as Ae}from"./chunk-EQGGFHQN.js";import{G as Ve,I as L,J as M,P as we,R as ke,Y as j,l as H,m as T,o as q,u as ee,z as B}from"./chunk-2DHHXBOR.js";import{$b as Ce,Aa as E,Ba as ue,E as le,Fb as pe,Gb as c,Gc as Ie,I as se,Ib as S,Lb as X,M as ce,Nb as s,Ob as l,Pb as w,Qb as me,Rb as he,Tb as x,Ub as f,Vb as m,Wb as fe,Xb as ge,Y as O,Yb as ve,Zb as y,ab as K,ac as be,ba as de,bc as ye,bd as k,cb as a,dc as d,ec as Q,f as re,fc as _,fd as xe,ga as z,ha as N,jb as v,pb as I,pd as _e,qc as G,ra as C,sa as b,t as Z,u as ae,ub as g,uc as A,vc as J,wc as Y,yd as Me}from"./chunk-RPEPMGJ4.js";import{ha as te,ma as Ee}from"./chunk-TIZ7DZFM.js";import{k as h}from"./chunk-LXPS6FQF.js";var We=(()=>{let o=class o{constructor(e,i,t){this.customModalController=e,this.route=i,this.router=t}init(){this.route.queryParams.subscribe(e=>{let i=e.orderID;i&&!this.customModalController.exists(p.OrderCoupon)?this.createOrderModal(i):i||this.customModalController.dismissModal(p.OrderCoupon,"external");let t=e[p.LoyaltyBalance];t&&!this.customModalController.exists(p.LoyaltyBalance)?this.createLoyaltyBalanceModal(t):t||this.customModalController.dismissModal(p.LoyaltyBalance,"external");let u=e[p.Help];u&&!this.customModalController.exists(p.Help)?this.createHelpModal(u):u||this.customModalController.dismissModal(p.Help,"external")}),this.route.queryParams.pipe(ae(e=>e[p.PositionRequest]),ce()).subscribe(e=>{if(!e){this.customModalController.dismissModal(p.PositionRequest,"external");return}this.customModalController.exists(p.PositionRequest)||this.createPositionRequestModal()})}createOrderModal(e){return h(this,null,function*(){let i=yield import("./chunk-GSO53KCB.js").then(u=>u.OrderModalWrapperComponent),{close$:t}=this.customModalController.createModal({id:p.OrderCoupon,component:i,inputs:{orderID:e},container:{stackIndex:1,backgroundClass:"bg-light",leftButtonConf:{icon:"arrow-back-outline"},title:`Commande ${e.slice(0,3).toUpperCase()}`,maxWidth:434}});t.subscribe(u=>{u!=="external"&&this.router.navigate([],{queryParams:{orderID:null},queryParamsHandling:"merge"})})})}createHelpModal(e){return h(this,null,function*(){let i=e.split("_"),t=i[0],u=i[1],P=yield import("./chunk-AEJRADZ3.js").then(U=>U.HelpModalComponent),{close$:V}=this.customModalController.createModal({id:p.Help,component:P,inputs:{storeID:t,orderID:u},container:{stackIndex:2,backgroundClass:"bg-white",rightButtonConf:{icon:"close-outline"},title:"Aide",maxWidth:392}});V.subscribe(()=>{this.router.navigate([],{queryParams:{help:null},queryParamsHandling:"merge"})})})}createPositionRequestModal(){return h(this,null,function*(){let e=yield import("./chunk-Z2GFT3FU.js").then(t=>t.PositionRequestModalWrapperComponent),{close$:i}=this.customModalController.createModal({id:p.PositionRequest,component:e,inputs:{},container:{stackIndex:1,backgroundClass:"bg-white",leftButtonConf:{icon:"arrow-back-outline"},title:"",maxWidth:434}});i.subscribe(()=>{this.router.navigate([],{queryParams:{[p.PositionRequest]:null},queryParamsHandling:"merge"})})})}createLoyaltyBalanceModal(e){return h(this,null,function*(){let i=yield import("./chunk-UMUO3JFM.js").then(u=>u.LoyaltyBalanceModalComponent),{close$:t}=this.customModalController.createModal({id:p.LoyaltyBalance,component:i,inputs:{balanceID:e},container:{stackIndex:0,backgroundClass:"bg-light",maxWidth:434,noHeader:!0,rightButtonConf:{icon:"close-btn"}}});t.subscribe(()=>{this.router.navigate([],{queryParams:{[p.LoyaltyBalance]:null},queryParamsHandling:"merge"})})})}openVoucherModal(e){return h(this,null,function*(){let i=yield import("./chunk-E2YOBG6S.js").then(t=>t.VoucherModalComponent);this.customModalController.createModal({id:p.ClientVoucher,component:i,inputs:{voucher:e},container:{stackIndex:1,backgroundClass:"bg-white",title:"Coupon de r\xE9duction",maxWidth:434,noHeader:!1,rightButtonConf:{icon:"close-outline"}}})})}closeVoucherModal(){return h(this,null,function*(){this.customModalController.dismissModal(p.ClientVoucher,null)})}};o.\u0275fac=function(i){return new(i||o)(z(je),z(we),z(ke))}
1,o.\u0275prov=de({token:o,factory:o.\u0275fac,providedIn:"root"});let n=o;return n})();function Ye(n,o){if(n&1&&(s(0,"div",10),d(1),l()),n&2){let r=o.ngIf;a(),_(" ",r," ")}}function et(n,o){if(n&1){let r=x();me(0),s(1,"div",11)(2,"button",12),f("click",function(){C(r);let i=m();return b(i.actionClicked.emit())}),d(3),l()(),he()}if(n&2){let r=m();a(2),c("disabled",r.disabled),a(),_(" ",r.actionLabel," ")}}var Et=(()=>{let o=class o{constructor(e){this.modals=e,this.actionLabel=null,this.actionClicked=new E,this.disabled=!1}ngOnInit(){if(this.voucher.usageCondition?.orderCondition?.orderTypes?.length&&this.orderType){let e=this.voucher.usageCondition?.orderCondition?.orderTypes;this.disabled=!e.includes(this.orderType)}}openVoucher(e){this.modals.openVoucherModal(e)}};o.\u0275fac=function(i){return new(i||o)(v(We))},o.\u0275cmp=I({type:o,selectors:[["unor-single-voucher-display-line"]],inputs:{voucher:"voucher",orderType:"orderType",actionLabel:"actionLabel"},outputs:{actionClicked:"actionClicked"},decls:12,vars:10,consts:[[1,"d-flex","py-2","align-items-center"],[1,"me-3","cursor-pointer",3,"click"],[1,"p-15","rounded","border","border-primary","text-primary"],["name","pricetag-outline",1,"font-size-xl"],[1,"flex-fill","text-truncate","cursor-pointer",3,"click"],[1,"fw-semi-bold","lead-text","flex-fill","text-truncate"],["class","font-size-xxs text-truncate",4,"ngIf"],[1,"ps-2","cursor-pointer",3,"click"],[1,"fw-light-bold","lead-text","font-size-xs","text-truncate"],[4,"ngIf"],[1,"font-size-xxs","text-truncate"],[1,"ps-25"],[1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(i,t){i&1&&(s(0,"div",0)(1,"div",1),f("click",function(){return t.openVoucher(t.voucher)}),s(2,"div",2),w(3,"ion-icon",3),l()(),s(4,"div",4),f("click",function(){return t.openVoucher(t.voucher)}),s(5,"div",5),d(6),l(),g(7,Ye,2,1,"div",6),l(),s(8,"div",7),f("click",function(){return t.openVoucher(t.voucher)}),s(9,"div",8),d(10),l()(),g(11,et,4,2,"ng-container",9),l()),i&2&&(a(),S("opa-7",t.disabled),a(3),S("opa-7",t.disabled),a(2),Q(t.voucher==null?null:t.voucher.label),a(),c("ngIf",t.voucher==null?null:t.voucher.getValidOrderTypes()),a(),S("opa-7",t.disabled),a(2),Q(t.voucher.getLitteralDiscount()),a(),c("ngIf",t.actionLabel))},dependencies:[j,k],encapsulation:2});let n=o;return n})();var it=["*"];function nt(n,o){if(n&1){let r=x();s(0,"input",5),f("focus",function(){C(r);let i=m();return b(i.inputFocused=!0)})("blur",function(){C(r);let i=m();return b(i.inputFocused=!1)}),l()}if(n&2){let r=m();X("form-control font-size-lg rounded-0 border-0 text-righ ",r.fieldClassNames,""),ve("id",r.inputID),c("type",r.type)("modalId",r.modalId)("autocomplete",r.autocomplete)("placeholder",r.placeholder)("name",r.autocomplete+"-input")("formControl",r.control)}}function ot(n,o){if(n&1){let r=x();s(0,"textarea",6),f("focus",function(){C(r);let i=m();return b(i.inputFocused=!0)})("blur",function(){C(r);let i=m();return b(i.inputFocused=!1)}),l()}if(n&2){let r=m();X("form-control font-size-md line-height-135 rounded-0 border-0 text-righ ",r.fieldClassNames,""),c("modalId",r.modalId)("autocomplete",r.autocomplete)("placeholder",r.placeholder)("name",r.autocomplete+"-input")("formControl",r.control)}}var $e=(()=>{let o=class o{constructor(){this.inputFocused=!1}ngOnInit(){}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=I({type:o,selectors:[["unor-inline-input"]],inputs:{inputID:"inputID",label:"label",placeholder:"placeholder",type:"type",autocomplete:"autocomplete",modalId:"modalId",fieldClassNames:"fieldClassNames",control:"control"},ngContentSelectors:it,decls:9,vars:13,consts:[[1,"d-flex","border-bottom","px-3"],[1,"font-size-sm","text-truncate","line-height-135","py-2"],[1,"flex-fill"],["unorInputFocusingListener","",3,"class","id","type","modalId","autocomplete","placeholder","name","formControl","focus","blur",4,"ngIf"],["unorInputFocusingListener","","rows","3",3,"class","modalId","autocomplete","placeholder","name","formControl","focus","blur",4,"ngIf"],["unorInputFocusingListener","",3,"focus","blur","id","type","modalId","autocomplete","placeholder","name","formControl"],["unorInputFocusingListener","","rows","3",3,"focus","blur","modalId","autocomplete","placeholder","name","formControl"]],template:function(i,t){i&1&&(fe(),s(0,"div",0)(1,"div")(2,"div",1),d(3),l()(),s(4,"div",2),g(5,nt,1,10,"input",3)(6,ot,1,8,"textarea",4),l(),s(7,"div"),ge(8),l()()),i&2&&(S("border-primary",t.inputFocused)("border-gray-200",!t.inputFocused)("align-items-center",t.type!=="textarea"),a(2),S("text-muted",t.inputFocused)("text-black-50",!t.inputFocused),a(),_(" ",t.label," "),a(2),c("ngIf",t.type!=="textarea"),a(),c("ngIf",t.type==="textarea"))},dependencies:[k,L,H,q,M,B,$],encapsulation:2});let n=o;return n})();var Ue=(()=>{let o=class o{constructor(e){this.componentData=e,this.close=this.componentData.close||null}ngOnInit(){}reloadPage(){window.location.reload()}};o.\u0275fac=function(i){return new(i||o)(v(Re))}
1,o.\u0275cmp=I({type:o,selectors:[["unor-reload-error-overlay"]],decls:4,vars:0,consts:[[1,"text-center"],[1,"btn","btn-primary","d-block","w-100",3,"click"]],template:function(i,t){i&1&&(s(0,"p",0),d(1,` Oups ! Une erreur est arriv\xE9e... Veuillez rafra\xEEchir cette page.
2`),l(),s(2,"button",1),f("click",function(){return t.reloadPage()}),d(3,` Rafraichir
3`),l())},encapsulation:2});let n=o;return n})();function rt(n,o){n&1&&w(0,"ion-icon",7)}function at(n,o){n&1&&w(0,"ion-icon",8)}var Ze=(()=>{let o=class o{constructor(){this.environment=N(W),this.contextID=Math.random().toString().replace(".",""),this.value=!1,this.optinChange=new E,this.urls=this.environment.urls}ngOnInit(){}toggleValue(){this.value=!this.value,this.optinChange.emit(this.value)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=I({type:o,selectors:[["unor-checkout-optin"]],inputs:{contextID:"contextID",value:"value"},outputs:{optinChange:"optinChange"},decls:13,vars:11,consts:[[1,"d-flex","align-items-center","mb-3","opacity-100",3,"for"],["type","checkbox",1,"custom-control-input","d-none",3,"click","id","checked"],[1,"pe-2"],["class","font-size-xl text-primary","name","checkbox",4,"ngIf"],["class","font-size-xl text-muted","name","square-outline",4,"ngIf"],[1,"font-size-sm","fw-light-bold"],["target","_blank",3,"href"],["name","checkbox",1,"font-size-xl","text-primary"],["name","square-outline",1,"font-size-xl","text-muted"]],template:function(i,t){i&1&&(s(0,"label",0)(1,"input",1),f("click",function(){return t.toggleValue()}),l(),s(2,"div",2),g(3,rt,1,0,"ion-icon",3)(4,at,1,0,"ion-icon",4),l(),s(5,"div",5),d(6," J'accepte les "),s(7,"a",6),d(8," CGU "),l(),d(9," et "),s(10,"a",6),d(11," CGV "),l(),d(12," . "),l()()),i&2&&(y("for","optin-checkbox-",t.contextID,""),a(),y("id","optin-checkbox-",t.contextID,""),c("checked",t.value),a(2),c("ngIf",t.value),a(),c("ngIf",!t.value),a(3),y("href","",t.urls.client,"/static/terms-of-use",K),a(3),y("href","",t.urls.client,"/static/terms-of-sale",K))},dependencies:[L,M,k,j],encapsulation:2});let n=o;return n})();var lt=["verificationCodeInput"],Ke=(n,o)=>[n,o];function st(n,o){n&1&&(s(0,"span",22),d(1," V\xE9rifi\xE9 "),l())}function ct(n,o){if(n&1){let r=x();s(0,"span",23),f("click",function(){C(r);let i=m();return b(i.clickOnToVerify())}),d(1," \xC0 v\xE9rifier "),l()}}function dt(n,o){if(n&1&&(s(0,"p",24),d(1),l()),n&2){let r=m();a(),_(" ",r.sendingError," ")}}function ut(n,o){if(n&1&&(s(0,"span"),d(1),l()),n&2){let r=m().ngIf;a(),_("(",r==null?null:r.seconds,"s)")}}function pt(n,o){if(n&1){let r=x();s(0,"div",25)(1,"button",26),f("click",function(){C(r);let i=m();return b(i.sendVerificationCode())}),d(2," Recevoir un code de v\xE9rification "),g(3,ut,2,1,"span",27),l()()}if(n&2){let r=o.ngIf,e=m();a(),y("id","send-code-button-",e.contextRoute,""),c("disabled",e.sendingVerificationCode||!e.optInChecked||!e.robotVerificationOK||!r.ok),a(2),c("ngIf",!r.ok)}}function mt(n,o){if(n&1&&(s(0,"p",28),d(1),l()),n&2){let r=m();a(),_(" ",r.verificationCodeError," ")}}function ht(n,o){if(n&1&&(s(0,"span"),d(1),l()),n&2){let r=m().ngIf;a(),_("(",r==null?null:r.seconds,"s)")}}function ft(n,o){if(n&1){let r=x();s(0,"div",29)(1,"button",30),f("click",function(){C(r);let i=m();return i.verificationCodePrompt=!1,b(i.optInChanged(!1))}),d(2," Renvoyer un code de v\xE9rification "),g(3,ht,2,1,"span",27),l()()}if(n&2){let r=o.ngIf,e=m();a(),c("disabled",e.sendingVerificationCode||!r.ok),a(2),c("ngIf",!r.ok)}}var Ii=(()=>{let o=class o{constructor(e,i,t,u,P,V,U,Xe){this.customer=e,this.overlays=i,this.cdRef=t,this.device=u,this.logging=P,this.analytics=V,this.ngZone=U,this.queryParams=Xe,this.environment=N(W),this.time=N(qe),this.contextRoute=Math.random().toString().replace(".",""),this.userIdChange=new E,this.userPhoneNumberChange=new E,this.auth=N(Se),this.CustomModalId=p,this.rawNumber=null,this.optInChecked=!1,this.sendingVerificationCode=!1,this.verifyingCode=!1,this.sendingError="",this.verificationCodeError="",this.lastCodeSentTimestamp=null,this.RESEND_COOLDOWN_SEC=45,this.phoneNumberLoggedIn=null,this.loggedInWithSamePhoneNumber=!1,this.verificationCodePrompt=!1,this.recaptchaType="invisible",this.robotVerificationOK=!1,this.phoneNumberControl=new ee("",[T.required,ne=>ie.extract(ne.value).valid?null:{phoneNumber:{valid:!1}}]),this.verificationCodeControl=new ee("",[T.required,T.minLength(6),T.maxLength(6),T.pattern(/[0-9]*/)]),this.unsubscribe$=new re,this.checkResendCodeCooldown=([ne,Qe])=>
3{if(!this.lastCodeSentTimestamp)return{ok:!0,seconds:0};let Ge=Me.difference(Qe||new Date,this.lastCodeSentTimestamp,"second"),oe=Math.max(this.RESEND_COOLDOWN_SEC-Ge,0);return{ok:oe===0,seconds:oe}}}ngOnInit(){this.device.getInfos().then(e=>{e?.operatingSystem==="ios"&&(this.recaptchaType="visible")}).catch(),this.autoCheckVerificationCodeInput(),this.queryParams.getValue("otp").then(e=>{(!this.environment.production||e==="test")&&setTimeout(()=>h(this,null,function*(){this.auth.settings.appVerificationDisabledForTesting=!0}),2e3)}),this.phoneNumberControl.statusChanges.pipe(O(this.unsubscribe$)).subscribe(e=>h(this,null,function*(){if(this.optInChecked=!1,e!=="VALID"){this.sendingError=null,this.verificationCodeError=null,this.sendingVerificationCode=!1,this.verifyingCode=!1,this.verificationCodePrompt=!1,this.verificationCodeControl.reset(),this.loggedInWithSamePhoneNumber=!1,this.userIdChange.emit(null);return}let i=ie.extract(this.phoneNumberControl.value);this.loggedInWithSamePhoneNumber=this.phoneNumberLoggedIn&&i.rawNumber===this.phoneNumberLoggedIn,this.rawNumber=i.rawNumber,this.userPhoneNumberChange.emit(i.rawNumber),this.phoneNumberControl.setValue(i.formatted,{emitEvent:!1});let t=yield Z(this.customer.borneoCustomer$),u=this.loggedInWithSamePhoneNumber?t.uid:null;this.userIdChange.emit(u)})),this.customer.borneoCustomer$.pipe(O(this.unsubscribe$)).subscribe(e=>{try{this.phoneNumberLoggedIn=e.firebaseUser.phoneNumber,this.phoneNumberControl.setValue(e.firebaseUser.phoneNumber),this.loggedInWithSamePhoneNumber=!0,this.userIdChange.emit(e.uid)}catch{this.phoneNumberLoggedIn=null,this.loggedInWithSamePhoneNumber=!1,this.userIdChange.emit(null),this.phoneNumberInitValue&&this.phoneNumberControl.setValue(this.phoneNumberInitValue)}}),this.listenToNativeAuthEvents()}clickOnToVerify(){return h(this,null,function*(){this.analytics.logAnalyticsEvent("click_on_to_verify");try{let e=document.getElementById("send-code-button-"+this.contextRoute);e.classList.add("shake"),yield R(600),e.classList.remove("shake")}catch(e){this.logging.pushLog({label:"Error shaking sendCodeButton",level:"error",value:e,file:"phone-number-validation.component"})}})}startResendCooldown(){this.lastCodeSentTimestamp=new Date}ngOnDestroy(){return h(this,null,function*(){this.unsubscribe$.next(),this.unsubscribe$.complete(),yield D.removeAllListeners(),this.clearRecaptcha({destroying:!0})})}listenToNativeAuthEvents(){return h(this,null,function*(){this.device.isNativeRuntime()&&(this.logging.pushLog({label:"Device is native, start listening to FirebaseAuthentication events...",file:"phone-number-validation.component",level:"debug"}),this.logging.pushLog({label:'Start listening to "phoneCodeSent" event...',file:"phone-number-validation.component",level:"debug"}),D.addListener("phoneCodeSent",({verificationId:e})=>{this.logging.pushLog({label:"Received from FirebaseAuthentication.addListener('phoneCodeSent')",value:{verificationId:e},file:"phone-number-validation.component",level:"debug"}),this.nativeVerificationId=e}),this.logging.pushLog({label:'Start listening to "phoneVerificationCompleted" event...',file:"phone-number-validation.component",level:"debug"}),D.addListener("phoneVerificationCompleted",({verificationCode:e})=>{this.logging.pushLog({label:"Received from FirebaseAuthentication.addListener('phoneVerificationCompleted')",value:{verificationCode:e},file:"phone-number-validation.component",level:"debug"}),this.nativeVerificationCode=e}))})}clearRecaptcha({destroying:e}={destroying:!1}){if(this.recaptchaVerifier){try{this.recaptchaVerifier.clear()}catch(i){this.logging.pushLog({label:"Error while clearing the current reCAPTCHA...",value:i,level:"error",file:"phone-number-validation.component"})}if(!e){try{let i=`invisible-recaptcha-container-${this.contextRoute}`,t=document.getElementById(i);t.innerHTML=""}catch(i){this.logging.pushLog({label:"Error while clearing the invisible reCAPTCHA container element...",value:i,level:"warn",file:"phone-number-validation.component"})}this.cdRef.markForCheck()}}}createInvisibleRecaptcha(){return h(this,null,function*(){if(!this.device.isNativeRuntime()){this.logging.pushLog({label:"Mounting invisible reCAPTCHA...",file:"phone-number-validation.component",level:"debug"});try{let e=`recaptcha-element-${this.contextRoute}`,i=document.createElement("div");i.id=e;
3let t=`invisible-recaptcha-container-${this.contextRoute}`;document.getElementById(t).appendChild(i);let P=new te(this.auth,e,{size:"invisible",callback:V=>{this.ngZone.run(()=>{this.sendingError=null,this.robotVerificationOK=!0,this.logging.pushLog({label:"invisible reCAPTCHA callback response",level:"debug",value:{response:V,recaptchaVerifier:this.recaptchaVerifier},file:"phone-number-validation.component"})})},"expired-callback":()=>{this.ngZone.run(()=>{this.sendingError="reCAPTCHA expir\xE9, veuillez r\xE9essayer.",this.optInChanged(!1),this.logging.pushLog({label:"invisible reCAPTCHA expired-callback called",level:"debug",value:{recaptchaVerifier:this.recaptchaVerifier},file:"phone-number-validation.component"})})},"error-callback":V=>{this.ngZone.run(()=>{this.optInChanged(!1),this.logging.pushLog({label:"visible reCAPTCHA error-callback called",level:"error",value:{recaptchaVerifier:this.recaptchaVerifier,error:V},file:"phone-number-validation.component"})})}});return yield R(200),this.recaptchaVerifier=P,this.robotVerificationOK=!0,this.logging.pushLog({label:"invisible reCAPTCHA mounted!",file:"phone-number-validation.component",level:"debug"}),this.cdRef.markForCheck(),{verifier:this.recaptchaVerifier,error:null}}catch(e){return this.logging.pushLog({label:"Error while mounting invisible reCAPTCHA",value:e,file:"phone-number-validation.component",level:"error"}),{verifier:null,error:"Une erreur est survenue lors de la validation reCAPTCHA. Vous pouvez essayer de rafra\xEEchir la page. Si l'erreur persiste, nous vous invitons \xE0 nous contacter par mail."}}}})}createVisibleRecaptcha(){return h(this,null,function*(){if(!this.device.isNativeRuntime()){this.logging.pushLog({label:"Mounting visible reCAPTCHA...",file:"phone-number-validation.component",level:"debug"});
3try{let e=`visible-recaptcha-container-${this.contextRoute}`,i=new te(this.auth,e,{size:"normal",callback:t=>{this.ngZone.run(()=>{this.sendingError=null,this.robotVerificationOK=!0,this.logging.pushLog({label:"visible reCAPTCHA callback response",level:"debug",value:{response:t,recaptchaVerifier:this.recaptchaVerifier},file:"phone-number-validation.component"})})},"expired-callback":()=>{this.ngZone.run(()=>{this.sendingError="reCAPTCHA expir\xE9, veuillez r\xE9essayer.",this.optInChanged(!1),this.logging.pushLog({label:"visible reCAPTCHA expired-callback called",level:"debug",value:{recaptchaVerifier:this.recaptchaVerifier},file:"phone-number-validation.component"})})},"error-callback":t=>{this.ngZone.run(()=>{this.optInChanged(!1),this.logging.pushLog({label:"visible reCAPTCHA error-callback called",level:"error",value:{recaptchaVerifier:this.recaptchaVerifier,error:t},file:"phone-number-validation.component"})})}});return this.recaptchaVerifier=i,this.logging.pushLog({label:"visible reCAPTCHA mounted!",value:{nodeElementId:"invisible-recaptcha-container"},file:"phone-number-validation.component",level:"debug"}),this.cdRef.markForCheck(),{verifier:this.recaptchaVerifier,error:null}}catch(e){return this.logging.pushLog({label:"Error while mounting visible reCAPTCHA",value:e,file:"phone-number-validation.component",level:"error"}),{verifier:null,error:"Une erreur est survenue lors de la validation reCAPTCHA. Vous pouvez essayer de rafra\xEEchir la page. Si l'erreur persiste, nous vous invitons \xE0 nous contacter par mail."}}}})}optInChanged(e){return h(this,null,function*(){if(this.device.isNativeRuntime()){this.optInChecked=e,this.robotVerificationOK=!0,this.cdRef.markForCheck();return}if(this.optInChecked=e,this.robotVerificationOK=!1,this.cdRef.markForCheck(),!e)return this.clearRecaptcha();this.recaptchaType==="invisible"&&(yield this.createInvisibleRecaptcha()),this.recaptchaType==="visible"&&(yield this.createVisibleRecaptcha()),yield this.recaptchaVerifier.render()})}sendVerificationCode(){return h(this,null,function*(){if(!this.checkResendCodeCooldown([this.lastCodeSentTimestamp,null])){this.sendingError="Veuillez patienter quelques secondes avant de renvoyer un code.";return}let e=this.device.isNativeRuntime();this.analytics.logAnalyticsEvent("send_verification_code"),this.sendingError=null,this.sendingVerificationCode=!0;try{if(this.logging.pushLog({label:"Sending verification code...",value:{phoneNumber:this.rawNumber,flow:e?"native":"web"},file:"phone-number-validation.component",level:"debug"}),this.startResendCooldown(),e)yield D.signInWithPhoneNumber({phoneNumber:this.rawNumber,skipNativeAuth:!0}),this.logging.pushLog({label:"Verification code sent with native plugin!",file:"phone-number-validation.component",level:"debug"}),yield R(2e3),this.verificationCodePrompt=!0,yield R(410),this.verificationCodeInput.nativeElement.focus();else{if(!this.recaptchaVerifier)throw new Error("reCAPTCHA not initialized. Please refresh and try again.");let i=yield Ne(this.auth,this.rawNumber,this.recaptchaVerifier);this.logging.pushLog({label:"Verification code sent with web flow!",value:{phoneNumber:this.rawNumber},file:"phone-number-validation.component",level:"debug"}),this.confirmationResult=i,this.verificationCodePrompt=!0,yield R(410),this.verificationCodeInput.nativeElement.focus()}}catch(i){this.logging.pushLog({label:"Error while sending OTP code!",value:i,level:"error",file:"phone-number-validation.component"}),!e&&i?.code==="auth/invalid-app-credential"&&this.recaptchaType==="invisible"?(this.recaptchaType="visible",this.sendingError="La v\xE9rification reCAPTCHA a \xE9chou\xE9. La confirmation manuelle a \xE9t\xE9 activ\xE9e, veuillez r\xE9essayer.",this.optInChanged(!1)):!e&&i?.code==="auth/invalid-app-credential"&&this.recaptchaType==="visible"?this.sendingError="La v\xE9rification reCAPTCHA a \xE9chou\xE9, vous pouvez essayer de rafra\xEEchir la page pour r\xE9essayer. Si cela ne fonctionne toujours pas, contactez-nous \xE0 [email protected]":i?.code==="auth/too-many-requests"?(this.optInChanged(!1),this.sendingError="Nombre de tentatives trop \xE9lev\xE9, veuillez patienter quelques minutes avant de r\xE9essayer."):i?.code==="auth/invalid-phone-number"?this.sendingError="Le num\xE9ro de t\xE9l\xE9phone doit \xEAtre fran\xE7ais.":(this.sendingError=i.message,this.processAuthError(i))}this.sendingVerificationCode=!1,this.cdRef.markForCheck()})}autoCheckVerificationCodeInput(){this.verificationCodeControl.statusChanges.pipe(O(this.unsubscribe$)).pipe(le(e=>e==="VALID")).subscribe(()=>{this.verificationCodeInput.nativeElement.blur(),this.validateCode(this.verificationCodeControl.value)})}validateCode(e){return h(this,null,function*(){let i=this.device.isNativeRuntime();if(this.logging.pushLog({label:"Validating code with flow",value:{code:e},file:"phone-number-validation.component",level:"debug"}),this.analytics.logAnalyticsEvent("validate_verification_code"),this.verificationCodeError=null,this.verifyingCode=!0,this.verificationCodeControl.disable(),yield Z(this.customer.borneoCustomer$.pipe(se(1e3))),!this.loggedInWithSamePhoneNumber){try{if(i){this.nativeVerificationCode=this.nativeVerificationCode||e;let t=Ee.credential(this.nativeVerificationId,this.nativeVerificationCode);yield Pe(this.auth,t)}else yield this.confirmationResult.confirm(e)}catch(t){this.logging.pushLog({label:"Error while validating code",value:t,level:"error",file:"phone-number-validation.component"}),this.verificationCodeError=t.message,this.processAuthError(t)}this.verificationCodeControl.reset(),this.verificationCodeControl.enable(),this.verifyingCode=!1,this.cdRef.markForCheck()}})}processAuthError(e){(e?.message).includes("The database connection is closing")&&(this.logging.addAnalyticsBreadcrumb({type:"default",category:"ui.overlay",level:"info",message:"Create modal for reload error"}),this.logging.pushLog({label:'"The database connection is closing" error detected, display modal to reload page...',value:e,level:"error",file:"phone-number-validation.component"}),this.overlays.createModal(Ue,{},{key:"idbError"}))}};o.\u0275fac=function(i){return new(i||o)(v(Be),v(De),v(Ie),v(ze),v(Fe),v(He),v(ue),v(Oe))}
3,o.\u0275cmp=I({type:o,selectors:[["unor-phone-number-validation"]],viewQuery:function(i,t){if(i&1&&Ce(lt,5),i&2){let u;be(u=ye())&&(t.verificationCodeInput=u.first)}},inputs:{contextRoute:"contextRoute",phoneNumberInitValue:"phoneNumberInitValue"},outputs:{userIdChange:"userIdChange",userPhoneNumberChange:"userPhoneNumberChange"},decls:32,vars:51,consts:[["verificationCodeInput",""],[1,"form-group","mb-0"],[2,"z-index","1"],[3,"inputID","label","placeholder","autocomplete","type","modalId","control"],[1,"h-100","d-flex","flex-column","justify-content-center"],["class","badge bg-success px-2 font-size-xs rounded-1 fw-normal",4,"ngIf"],["class","badge bg-warning px-2 font-size-xs rounded-1 fw-normal",3,"click",4,"ngIf"],[3,"expand","alwaysRender"],[1,"bg-light","mb-2","mx-3","rounded","border","rounded-top-0","border-top-0"],[3,"id"],["class","px-3 pt-3 text-danger text-center",4,"ngIf"],[1,"p-3"],[3,"loading","dimension"],[1,"font-size-sm","text-muted"],[3,"optinChange","contextID","value"],["class","d-flex justify-content-center mt-3",4,"ngIf"],[3,"loading"],[1,"text-center","mb-3"],[1,"d-block","mb-2",3,"for"],["unorInputFocusingListener","","modalId","cart","type","tel","pattern","[0-9]*","autocomplete","one-time-code","placeholder","XXXXXX",1,"form-control","text-center","font-size-xxl","fw-semi-bold","p-0","mx-auto","py-1",2,"height","auto","width","160px",3,"id","formControl"],["class","text-danger text-center",4,"ngIf"],["class","d-flex flex-column align-items-center",4,"ngIf"],[1,"badge","bg-success","px-2","font-size-xs","rounded-1","fw-normal"],[1,"badge","bg-warning","px-2","font-size-xs","rounded-1","fw-normal",3,"click"],[1,"px-3","pt-3","text-danger","text-center"],[1,"d-flex","justify-content-center","mt-3"],[1,"btn","btn-primary","d-block","w-100","btn-lg","font-size-sm","fw-semi-bold","rounded",3,"click","id","disabled"],[4,"ngIf"],[1,"text-danger","text-center"],[1,"d-flex","flex-column","align-items-center"],[1,"btn","btn-default","border","text-primary","my-1",3,"click","disabled"]],template:function(i,t){if(i&1){let u=x();s(0,"div",1)(1,"div",2)(2,"unor-inline-input",3)(3,"div",4),g(4,st,2,0,"span",5)(5,ct,2,0,"span",6),l()()(),s(6,"unor-expandable-block",7)(7,"div",8),w(8,"div",9),g(9,dt,2,1,"p",10),s(10,"unor-expandable-block",7)(11,"div",11)(12,"unor-loading-block",12)(13,"p",13),d(14," Vous devez valider votre num\xE9ro de t\xE9l\xE9phone avec un code de v\xE9rification. "),l(),s(15,"unor-checkout-optin",14),f("optinChange",function(V){return C(u),b(t.optInChanged(V))}),l(),w(16,"div",9),g(17,pt,4,4,"div",15),A(18,"async"),A(19,"singleMap"),l()()(),s(20,"unor-expandable-block",7)(21,"unor-loading-block",16)(22,"div",11)(23,"div",17)(24,"label",18),d(25," Code de v\xE9rification "),l(),w(26,"input",19,0),l(),g(28,mt,2,1,"p",20)(29,ft,4,2,"div",21),A(30,"async"),A(31,"singleMap"),l()()()()()()}i&2&&(a(2),c("inputID","phone-number-input-field-"+t.contextRoute)("label","T\xE9l\xE9phone*")("placeholder","06 54 83...")("autocomplete","tel-national")("type","tel")("modalId",t.CustomModalId.OrderReview)("control",t.phoneNumberControl),a(),pe("data-telephone-verification-status-badge",t.loggedInWithSamePhoneNumber?"verified":"to-verify"),a(),c("ngIf",t.loggedInWithSamePhoneNumber),a(),c("ngIf",!t.loggedInWithSamePhoneNumber&&t.phoneNumberControl.valid),a(),c("expand",!t.loggedInWithSamePhoneNumber&&t.phoneNumberControl.valid)("alwaysRender",!0),a(2),y("id","invisible-recaptcha-container-",t.contextRoute,""),a(),c("ngIf",t.sendingError),a(),c("expand",!t.verificationCodePrompt)("alwaysRender",!0),a(2),c("loading",t.sendingVerificationCode)("dimension",1.8),a(3),y("contextID","accept-terms-",t.contextRoute,""),c("value",t.optInChecked),a(),y("id","visible-rec
3aptcha-container-",t.contextRoute,""),a(),c("ngIf",Y(19,37,G(45,Ke,t.lastCodeSentTimestamp,J(18,35,t.time.nowInSeconds$)),t.checkResendCodeCooldown)),a(3),c("expand",t.verificationCodePrompt)("alwaysRender",!0),a(),c("loading",t.verifyingCode),a(3),y("for","one-time-code-",t.contextRoute,""),a(2),y("id","one-time-code-",t.contextRoute,""),c("formControl",t.verificationCodeControl),a(2),c("ngIf",t.verificationCodeError),a(),c("ngIf",Y(31,42,G(48,Ke,t.lastCodeSentTimestamp,J(30,40,t.time.nowInSeconds$)),t.checkResendCodeCooldown)))},dependencies:[_e,k,xe,L,H,q,Ve,M,B,Ae,Le,Te,$e,$,Ze],styles:[".shake[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_shake .6s ease;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}"]});let n=o;return n})();export{We as a,Et as b,$e as c,Ii as d};

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.