PageSourceSearch

https://lakpura.com/cdn/shopifycloud/checkout-web/assets/c1/0e9ee714.DqBmP7tY.js

js lakpura.com collected 2026-10-01 10:37:08 UTC 13,511 bytes, 1 lines download raw bytes

1import{u as e,S as t,f as n,q as a,T as s,l as r}from"./2c1ab0fe.D_oO1jU7.js";import{P as o,n as i,e2 as l,a0 as u,B as c,e3 as d,bW as p,e4 as h,e5 as m,e6 as y,e7 as f,e as g,K as v,h as P,br as _}from"./164ad2e3.DgUUtBtV.js";import{O as b,cB as k,P as S,Q as E,dr as I,cA as C,dn as w,ds as A,bJ as B,S as R,dt as x,a6 as N,X as L,aq as M,du as U,ar as j,b9 as F,dv as D,dw as T}from"./4c290a1e.D9lE9kmU.js";import{S as O}from"./39921a74.bStpjMMs.js";import{u as W,c as q,d as J,e as G}from"./e3e348f2.sbssU431.js";import{E as H}from"./5587f402.B4N8qnlk.js";import{s as $}from"./ccdf3592.Jq-5VsnW.js";import{a as K}from"./app.bDJ3v-8C.js";import{g as Y,a as X,b as z}from"./8599b02a.yKiXuwTF.js";import{v as Z,a as Q,u as V}from"./0c0ad074.C7YXa-mF.js";import{u as ee}from"./53bbdad9.Bipg1_Lt.js";import{u as te,a as ne}from"./ec391382.Cpl2aZVN.js";function ae({line:n}){const{i18n:a,source:s}=b(),r="paymentCollection"===s.type,{title:l,lineAmount:u}=n,c=0===u.amount?a.translate("shipping.free_rate_label"):a.formatCurrency(u.amount,{currency:u.currencyCode,form:"short"}),d=0===u.amount?"uppercase":void 0;return e(o,{children:[l,r?null:e(t,{children:[" · ",e(i,{type:"strong",letterCase:d,children:c})]})]},l)}const se="shop-pay-hsa-details",re=`${se}-description`;function oe(){const{checkout:e,shop:t,shopPay:a}=b(),s=S().paymentMethods,{paymentLines:r}=E();return n((()=>{const n=I(s.value);if(!t.hasFlagEnabled(C)||!function({identity:e}){return"shopPay"===e.current.value}({identity:e.identity})||"ELIGIBLE"!==n&&"MIXED_CART"!==n||a.session.isInstallmentsSelected.value)return!1;const o=a.session.selectedPaymentMethod.value;if(o)return"CREDIT_CARD"===o.paymentMethod;const i=r.value[0]?.method,l="wallet"===i?.type&&"SHOP_PAY"===i.name?i.walletContent:void 0,u=null!=l&&"paymentMethod"in l&&"CREDIT_CARD"===l.paymentMethod;return"direct"===i?.type||u}))}function ie(){const{checkout:e,shopPay:t}=b(),a=oe();return n((()=>a.value&&k(e.proposal.negotiated.fields.paymentMethods.value)&&t.session.hsaRequested.value))}function le(){const{i18n:s,shopPay:r,checkout:i}=b(),d=n((()=>I(i.proposal.negotiated.fields.paymentMethods.value))),p=n((()=>"ELIGIBLE"!==d.value)),h="MIXED_CART"===d.value,m=n((()=>!p.value&&r.session.hsaRequested.value)),y=h?s.translate("payment.shop_pay_hsa.mixed_cart_description"):s.translate("payment.shop_pay_hsa.description"),f=a((e=>{p.value||r.session.unstable_setHsaRequested(e)}),[p,r.session]);return e(c,{background:"base",colorLayer:"control",border:"base",borderRadius:"base",children:[e("span",{id:re,hidden:!0,children:y}),e(l,{id:se,open:h||m.value,summary:e(c,{padding:"base",children:e(O,{label:s.translate("payment.shop_pay_hsa.label"),checked:m.value,disabled:p.value,onChange:f,icon:"none","aria-controls":`${se}-content`,"aria-describedby":re})}),content:e(t,{children:[e(u,{}),e(c,{padding:"base",children:e(o,{type:"small",color:"subdued",children:y})})]})})]})}function ue(e){return s((()=>e.some((e=>{if("customField"===e.kind)return w(e).required.peek();const t=w(e);return t.behaviors.peek().blockProgress&&t.capabilities.blockProgress}))),[e])}function ce(){const{shop:e,shopPay:{user:t}}=b();return!e.hasFlagEnabled(A)&&t.getExperimentAssignment(H)===H.variants.treatment}function de(){const e=b(),{shop:t}=e,a=W(),s=B(),r=t.hasFlagEnabled(R);return n((()=>x(e.checkout,{showPayWithApplePayButton:a.value,paymentFullyCoveredByRedeemablesAndGiftCards:s.value,isApplePayInShopPayKillswitched:r})))}function pe(){const e=b(),{checkout:t,shopPay:a}=e,s="shopPay"===t.identity.current.value,r=q().value,o=function(){const{checkout:{identity:e}}=b(),{paymentLines:t}=E(),{inMemoryGooglePayParts:{paymentSheetOpenPromise:a}}=N(),s=function(){const{persistedGooglePaySignal:e}=N(),{checkout:t}=b();return n((()=>{const n=e.value?.receiptIdForPaymentFailure,a=t.latestReceipt.value;return Boolean("failed"===a?.status&&"payment"===a?.failure?.type&&n&&a?.id===n)}))}();return n((()=>"googlePay"===e.current.value&&!!L(t.value,"GOOGLE_PAY")&&(void 0!==a?.value||s.value)))}().value,i=J().value,l=!s&&r&&!i,u=!s&&o,{showApplePay:c,isApplePayInShopPay:p}=de().value,h=G(),m=function(){const e=d(),t=e?.config;return"NATIVE"===t?.payActionType}(),y=ce();return{kind:$(t,{showPayWithPayPal:l,showApplePay:c&&!i,showPayWithGooglePay:u,isEmbeddedCheckout:h,shouldRenderCheckoutProtocolButton:m,isInstallmentsSupported:e.checkout.installments.isSupported.value,isInstallmentsSelected:a.session.isInstallmentsSelected.value,isInstallmentsUkHoldoutTreatment:y}),showPayWithPayPal:l,isApplePayInShopPay:p,shouldDeferWalletToReview:i}}function he({existing:e,scope:t,next:n}){return[...e.filter((e=>!function(e,t){return!!e&&(e===t||e.startsWith(`${t}.`))}(e.target,t))),...n]}var me=(e=>(e.BlankEmail="blank_email",e.BlankPhone="blank_phone",e.InvalidEmail="invalid_email",e.InvalidPhone="invalid_phone",e.ShopAccountsInvali
1dEmail="shop_accounts_invalid_email",e.ShopAccountsInvalidPhone="shop_accounts_invalid_phone",e.ShopAccountsPhoneLimitReached="shop_accounts_phone_limit_reached",e))(me||{});function ye(){const{progressContinueWithResult:e}=fe();return{progressContinue:a((async()=>"continue"===await e()),[e])}}function fe(){const{source:e,observability:t,shopPay:{progressInterceptor:o}}=b(),i=M(),{createUnverifiedUser:l}=function(){const e=function(){const{email:e}=E(),{shopPay:t}=b();return n((()=>{const n=e.value.trim(),a=t.userVerification.value,s=Z(n,me.BlankEmail),r=Q(n,me.InvalidEmail),o="invalid"===a.status&&a.email===n?me.InvalidEmail:void 0;return{email:n,emailError:s||r||o}}))}(),{source:{checkoutSessionIdentifier:t},url:s,shopPay:o}=b(),i=o.user.phoneNumber,l=o.user.unstable_setPhoneNumber,{transactionParams:u}=o.config,c=o.user.isAuthenticatedUser,d=(()=>{const{shopPay:e}=b(),t=e.signup.phoneNumber,a=e.signup.phoneCountryCode,s=ee(),o=r(s.isPhoneNumberUtilLoaded),i=r(s.validatePhoneNumber),l=e.user.isAuthenticatedUser;return n((()=>({missingRequiredMobilePhoneNumber:Boolean(!l.value&&(!t.value||o.value&&!i.value(t.value,a.value,!0)))})))})(),p=a((async(n=!0)=>{const{email:a,emailError:r}=e.value;if(c.value||i.value)return{status:"skipped"};if(!u)return{status:"failed",errors:[{field:[],code:"missing_content",message:"Transaction params are missing"}]};const h=[];if(r&&h.push({field:["email"],code:r,message:"email is blank or invalid"}),d.value.missingRequiredMobilePhoneNumber&&h.push({field:["phone"],code:me.InvalidPhone,message:"Mobile phone number is missing or invalid"}),h.length>0)return{status:"failed",errors:h};let m=n?o.signup.hcaptchaToken.value:void 0;if(!m)try{const e=o.signup.captchaRef.value,t=await(e?.execute({async:!0}));t&&(m=t.response)}catch(g){return"challenge-closed"===g?{status:"failed",errors:[]}:{status:"failed",errors:[{field:["hcaptcha"],code:String(g),message:"A captcha error was caught and handled"}]}}let y=null;try{const e=o.signup.phoneNumber.value||"";y=await fetch(s.shopPayCreateUnverifiedUser(),{method:"POST",body:JSON.stringify({email:a,phone:e,hcaptcha_token:m,origin:"c1_unverified_user_signup",checkout_token:t,transaction_params:u}),headers:{"Content-Type":"application/json",accept:"application/json"}})}catch{return{status:"failed",errors:[{field:[],code:"unknown_error",message:"An error was caught and handled during API request"}]}}const f=await y.json();return 200!==y.status?Array.isArray(f?.errors)&&1===f?.errors.length&&"further_authorization_required"===f?.errors[0].code&&n?(o.signup.unstable_setHcaptchaToken(void 0),p(!1)):{status:"failed",errors:f?.errors||[{field:[],code:`response_with_http_error_${y.status}`,message:"Failed to create user"}]}:(l(f.parsed_phone),o.user.unstable_setEmail(a),o.user.unstable_updateFlow("authenticated_user"),{status:"success"})}),[c,i,u,e,d,l,o,s,t]);return{createUnverifiedUser:p}}(),{handleCreateUnverifiedUserErrors:u}=function(){const{i18n:e,shopPay:t,checkout:{validation:{contactErrors:{emailInputError:n}}}}=b(),a=p(),{openModal:s}=V(),r={[me.BlankEmail]:e.translate("field_errors.email_blank"),[me.InvalidEmail]:e.translate("field_errors.email_invalid"),[me.ShopAccountsInvalidEmail]:e.translate("field_errors.email_invalid")},o={[me.BlankPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[me.InvalidPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[me.ShopAccountsInvalidPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[me.ShopAccountsPhoneLimitReached]:e.translate("mobile_phone_number.phone_limit_reached")};return{handleCreateUnverifiedUserErrors:e=>{if(0===e.length)return;const i=e.map((e=>e.code)),l=r[i.find((e=>e in r))],u=o[i.find((e=>e in o))];return l||u?(n.value=l,t.signup.unstable_setPhoneError(u)):s({type:h.Generic}),Promise.resolve().then((()=>a()))}}}(),c=p(),d=a((async()=>{try{const e=await l(),n=await o.runInterceptors();i.validationErrors.value=he({existing:i.validationErrors.value,scope:m,next:Y(n)});const a=X(n);if(!a){const e=z(n);t.log("shop_pay_progress_interceptor_error_reported","Shop Pay progress interceptor reported an error in useShopPayProgressContinue",{interceptorErrors:e})}if("failed"===e?.status)return u(e.errors),"blocked";if(!a)return function(e){Promise.resolve().then((()=>e()))}(c),"blocked"}catch(a){const s=a;return U(s.message)||function(e){return K.includes(e.name)}(s)?t.log("shop_pay_progress_continue_unactionable_error","Shop Pay progress continue swallowed an unactionable error in useShopPayProgressContinue",{errorName:s.name,errorMessage:(n=s.message,n?.slice(0,ge)),sourceType:e.type}):t.error(s,{errorClass:y.ShopPayProgressIntercept,severity:"error",metadata:{source:{type:e.type},checkout:{token:e.checkoutSessionIdentifier??"checkout_identifier_undefined"}}}),"errored"}var n;return"continue"}),[l,c,u,o,i,t,e]);return s((()=>({progressContinueWithResult:d})),[d])}const ge=200;function ve(){const{source:e,checkout:t,shop:n,shopPay:s,observability:r,userEvents:o}
1=b(),i=s.installments,l=s.user.installments;return a((()=>{l.isRejected.value&&!l.isRetryable.value||(i.unstable_setModalOpen(!0,"checkout_button"),r.log("installments_modal_opened","[Installments] Modal opened"),o.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...j(e,t,n),action:"continue_with_installments"}}))}),[i,l,r,o,e,t,n])}function Pe(e){const{kind:t}=pe(),n=function(){const{showApplePay:e}=de().value,t=N().applePaySessionHandler.value,n=t?.onClickHandler??null,s=ne({breadcrumbPrefix:T,isApplePay:!0}),r=a((()=>{n?.({validateButtonPress:s})}),[n,s]);return e&&n?r:null}(),r=function(){const{checkout:{identity:e},observability:t,shopPay:n}=b(),r=f(),{nextPage:o}=v(),{progress:i}=P(),{progressContinue:l}=ye(),u=function(){const{observability:e,source:t,router:n}=b(),{currentDetour:a,currentPage:r}=g().value,{nextPage:o,previousPage:i}=v();return s((()=>({ensureShopPayURL:()=>{r||n.navigate("/shoppay",{replace:!0})},logError:(n,{result:s}={})=>{e.error(new F(n,{groupingHash:"ShopPayError::InvalidPageLogger"}),{severity:"error",metadata:{source:{type:t.type},checkout:{token:t.checkoutSessionIdentifier||t.sourceId},event:{currentDetour:JSON.stringify(a),currentPage:JSON.stringify(r),nextPage:JSON.stringify(o),previousPage:JSON.stringify(i),result:JSON.stringify(s)}}})}})),[a,r,e,o,i,n,t.checkoutSessionIdentifier,t.sourceId,t.type])}(),c=_(),d=te(),p=ne({breadcrumbPrefix:D}),h=a((async()=>{if(p()){d();try{n.session.unstable_setButtonProgressing(!0),await l()?(t.leaveErrorBreadcrumb(`${D} - progress`),await i("shop-pay-progress-button-press",(e=>{t.leaveErrorBreadcrumb(`${D} - progression`,{status:e.status,nextPageId:o.id}),"thankYou"!==o.id&&u.logError("Shop Pay button triggered progression when next page is not `thankYou`",{result:e})}),{onProgressBlocked:()=>{t.leaveErrorBreadcrumb(`${D} - progress blocked`,{nextPageId:o.id}),u.ensureShopPayURL()}}),c.notify({checkout_in_progress:!0})):(t.leaveErrorBreadcrumb(`${D} - progress continue failed`,{nextPageId:o.id}),"thankYou"!==o.id&&(u.logError("Shop Pay button is pressed when next page is not `thankYou`"),u.ensureShopPayURL()))}finally{n.session.unstable_setButtonProgressing(!1)}}}),[p,d,n.session,l,t,i,o,u,c]);return"shopPay"!==e.current.value||r?null:h}(),o=function(){const{checkout:{identity:e},shopPay:t,observability:n}=b(),s=f(),{progressContinue:r}=ye(),o=ve(),i=a((async()=>{t.session.unstable_setButtonProgressing(!0),n.log("installments_cta_clicked","[Installments] Continue to purchase button clicked");try{await r()&&o()}finally{t.session.unstable_setButtonProgressing(!1)}}),[t.session,n,r,o]);return s||"shopPay"!==e.current.value||!t.session.isInstallmentsSelected.value?null:i}();return"applePay"===t&&n?n:"installments"===t&&o?o:"default"!==t&&"checkoutProtocol"!==t||!r?e:r}const _e={Button:"liLqL",Sparkles:"b71fw"},be={Button:"OJbFq","Button-prefersDarkMode":"LhoYl",WalletLogoContainer:"wNUaA"},ke={StickyFooter:"XR3sZ",StickyFooterExperiment:"_4fPUS",StickyFooterAtBottom:"_5FRe7",StickyFooterBuffer:"ZDqoP",SDKStickyFooterBuffer:"zANgR",EmbedStickyFooterBuffer:"_3A6oJ",ButtonContainer:"K8y4t",SDKButtonContainer:"_7S3NK",EmbedButtonContainer:"SdyJr"},Se={Wrapper:"GsMGr",Container:"eDhAI",Section:"P0xJW","Container-fixed":"iRlFp","Container-fixed-entering":"_24aJk","Container-fixed-exiting":"ktbnR","Container-fixed-enter":"PCKgT","Container-fixed-exited":"DvZWz",Shadow:"COpTB","Shadow-enter":"_0hDB9","Shadow-exiting":"P1NPi","Shadow-exited":"lQN1j"};export{ae as D,le as H,ce as a,oe as b,be as c,ke as d,ie as e,ye as f,ve as g,pe as h,de as i,fe as j,ue as k,Se as l,he as r,_e as s,Pe as u};

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.