PageSourceSearch

https://lailagoddess.com/cdn/shopifycloud/checkout-web/assets/c1/7fd9930c.D9coQokU.js

js lailagoddess.com collected 2026-10-06 06:49:20 UTC 6,655 bytes, 1 lines download raw bytes

1import{z as e,g as a,h as n,u as t,J as o,T as l,q as i,S as s}from"./2c1ab0fe.RaLGJvq2.js";import{s as r,f as c,t as d,b as m,aa as p,S as h,B as u,a0 as g,d as _,M as b,bQ as f}from"./164ad2e3.bPUx3Fg0.js";import{Q as y,C as w}from"./3e6029dd.CRU0unE2.js";import"./app.CPIYcwpp.js";import{bg as x,a as M,p as S,bh as k}from"./f67abd2c.BTHhdhoM.js";import"./d0bb51ec.BIqtCEEY.js";import"./60a453ce.BHWO3gHr.js";import"./e12db40c.CeuzD2R-.js";import"./9dba8418.DCzpk36x.js";var v="var(--_1cm3fw00)";const z=d("Countdown");function C({duration:l=0,defaultValue:i=l,label:s,onEnd:d}){const m=r(void 0,z),[p]=e(()=>Date.now()+i),[h,u]=e(()=>Math.max(i,0)),g=a(d),_=a(!1);g.current=d,n(()=>{let e;const a=()=>{const n=Math.max(p-Date.now(),0);u(n),0!==n?e=setTimeout(a,n%1e3||1e3):_.current||(_.current=!0,g.current?.())};return a(),()=>clearTimeout(e)},[p]);const b=l>0?Math.min(Math.max((l-h)/l*100,0),100):0;return t("div",{role:s?"timer":void 0,"aria-labelledby":s?m:void 0,className:"_1cm3fw02 _1cm3fw01 _1fragem6t _1fragemzf _1fragem82",children:[t("div",{"aria-hidden":!0,className:"_1cm3fw04 _1cm3fw03 _1fragemup _1fragemv4 _1fragemzf _1fragem32",style:o({[v]:`${b}%`}),children:t("div",{className:"_1cm3fw06 _1cm3fw05 _1fragem4q"})}),s&&t(c,{id:m,accessibilityVisibility:"hidden",type:"small",textAlign:"center",color:"subdued",children:s(h)})]})}function I(e=navigator.userAgent,a){return x(e)||/Shop App\/[^/]+\/iOS\//.test(e)||null!=a&&"WEB"!==a}const E=new Set(["alipay","bancontact","blik","eps","ideal","klarna","mobilepay","multibanco","paypal","przelewy24","satispay","sofort","swish","twint","usdc","wechatpay"]);function R(e){return e.toLowerCase().replace(/[\s_-]+/gu,"")}const D=e=>{const a=Math.floor(e/36e5),n=String(Math.floor(e%36e5/6e4)).padStart(2,"0"),t=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return a>0?`${a}:${n}:${t}`:`${n}:${t}`},A={bogus_app_coin:"/cdn/shopifycloud/checkout-web/assets/c1/assets/bogus.Dgqxw51f.svg",pix:"/cdn/shopifycloud/checkout-web/assets/c1/assets/pix.D3fYfWH5.svg",blik:"/cdn/shopifycloud/checkout-web/assets/c1/assets/blik.DVGmDGpj.svg",swish:"/cdn/shopifycloud/checkout-web/assets/c1/assets/swish.Bmk5gRpD.svg"},T=["wechat_pay","paynow"];function q({challengeType:a,challengeData:o,receipt:r,paymentMethod:d,onModalRender:x,challengeExpiresAt:v}){const z=((e,a)=>null!=a?Math.max(a-Date.now(),0):e&&f(e)&&e.timeout?.millisecondsRemaining||0)(r,v),[q,j]=e(!1),[O,N]=e(),[Q]=e(z),{i18n:$,client:L,embed:B}=M(),V=function(e){const{paymentMethod:a}=e,{userEvents:n,shop:{id:t},source:o}=M(),l=e=>n.monorailEvent({schemaId:"checkout_buyer_action_required_events/1.0",payload:{eventTriggerReason:e,paymentMethodDisplayName:a.name,checkoutSessionIdentifier:o.checkoutSessionIdentifier||"",shopId:parseInt(S(t),10)}});return{onModalRendered:()=>l("modal_rendered"),onModalTimeout:()=>l("buyer_action_timeout"),onModalExit:()=>l("buyer_closes_modal"),onCopiedToClipboard:()=>l("buyer_copies_to_clipboard"),onChallengeRendered:e=>{switch(e){case"QR_CODE":l("qr_code_rendered");break;case"EXTERNAL":l("external_action_rendered")}}}}({paymentMethod:d});l(()=>{q&&x&&setTimeout(()=>{x()},1e3)},[q,x]);const J=i(()=>r?(V.onModalTimeout(),j(!1),null):null,[r,V]);let W,F;n(()=>{a&&o&&Q&&(N(JSON.parse(o)),j(!0))},[a,o,Q]);let G,X=!1;switch(a){case"QR_CODE":if(W=$.translate("payment_challenge_modal.qr_code.instructions",{paymentMethod:d.name}),O){const e=JSON.parse(O.data);F=e?.mobile_app_universal_url,G=e?.instruction,X=T.includes(e?.instruction),"wechat_pay"===e?.instruction?W=I(L.userAgent,B?.platform)?$.translate("payment_challenge_modal.qr_code.wechat_instructions_mobile"):$.translate("payment_challenge_modal.qr_code.wechat_instructions"):"paynow"===e?.instruction&&(W=I(L.userAgent,B?.platform)?$.translate("payment_challenge_modal.qr_code.paynow_instructions_mobile"):$.translate("payment_challenge_modal.qr_code.paynow_instructions"))}break;case"EXTERNAL":W=$.translate("payment_challenge_modal.external.instructions",{paymentMethod:d.name});break;default:W=$.translate("payment_challenge_modal.instructions",{paymentMethod:d.name})}n(()=>{q&&O&&V.onModalRendered()},[q,O,V]),n(()=>{O&&V.onChallengeRendered(a)},[V,O,a]);const H=$.translate("payment_challenge_modal.copy_text",{paymentMethod:d.name}),Y=$.translate("payment_challenge_modal.open_app_text",{paymentMethod:d.name}),K=F?Y:H,P=$.translate("payment_challenge_modal.header",{paymentMethod:d.name}),U=$.translate("payment_challenge_modal.close"),Z=(e=>{const a=k(e);return a?A[a]:null})(d),ee="QR_CODE"===a?function(e){for(const a of e){if("string"!=typeof a||""===a)continue;const e=R(a);if(E.has(e))return`https://cdn.shopify.com/static/retail/lpm-icons/png/square-icons/${e}.png`}}([G,...d.paymentBrands??[]]):void 0;return r&&t(b,{open:q,blocking:!0,accessibilityLabel:P,size:"base",children:t(m,{children:[t(p,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"large-300",alignItems:"center",alignContent:"center",children:[t(c,{size:"large",textAlign:"start",children:P}),t(h,{gap:"small-400",alignItems:"end",children:t(u,{onClick:()=>(V.onModalExit(),void window.location.reload()),variant:"plain",tone:"monochrome",inlineAlignment:"end",accessibilityLabel:U,children:t(g,{type:"x"})})})]}),t(m,{children:[t(_,{blockSize:"base"}),Z&&!ee&&t(s,{children:[t(h,{gap:"large-300",alignItems:"center",children:t("img",{src:Z,alt:d.name})}),t(_,{blockSize:"small-400"})]}),t(h,{gap:"large-300",alignItems:"center",children:t(c,{size:"base",textAlign:"center",textWrap:"pretty",children:W})}),"QR_CODE"===a&&O&&t(s,{children:[t(_,{blockSize:"base"}),t(h,{gap:"base",alignItems:"center",children:[t(h,{gap:"base",maxInlineSize:"150px",minInlineSize:"150px",alignItems:"center",children:t(y,{content:O?.code,size:"fill",logo:ee},ee)}),!X&&t(s,{children:[t(_,{blockSize:"large-200"}),t(h,{gap:"base",alignItems:"center",maxInlineSize:"400px",minInlineSize:"@media (inline-size >= extraSmall) 400px, 100%",children:t(u,{commandFor:"qr-code-challenge-data-code",command:F?void 0:"--copy",inlineSize:"fill",inlineAlignment:"center",onClick:()=>{F&&(window.open(F,"_blank"),V.onChallengeRendered("QR_CODE"))},children:K})}),!F&&t(w,{text:O?.code,id:"qr-code-challenge-data-code",onCopy:()=>V.onCopiedToClipboard()})]})]})]}),t(_,{blockSize:"large-200"}),t(h,{alignItems:"center",children:t(m,{maxInlineSize:"150px",minInlineSize:"150px",children:t(C,{duration:Q,defaultValue:z,label:e=>$.translate("payment_challenge_modal.timer_message",{timeLeft:D(e)}),onEnd:J})})}),t(_,{blockSize:"large-200"})]})]})})}export{A as SUPPORTED_PAYMENT_METHOD_BRAND_ICONS,q as default};

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.