PageSourceSearch

https://gspawn.com/cdn/shopifycloud/checkout-web/assets/c1/a9ba8e86.DGdpkm6F.js

js gspawn.com collected 2026-10-02 10:22:10 UTC 5,061 bytes, 1 lines download raw bytes

1import{u as e,T as t,x as a,s as n,m as r,t as i,w as o}from"./2c1ab0fe.GMbxnz74.js";import{bu as s,B as l,J as c,c as m,o as d,l as u,i as p,bv as b,e as y,bw as g,bx as f,F as h,by as v,V as k,bz as S}from"./164ad2e3.BbIvMjRY.js";import{S as I,bE as j,T as x,bh as E,W as w,bF as _,aZ as z}from"./4c290a1e.C6TDJ9Fn.js";import{u as C}from"./f5a7bb50.W2ESKrfp.js";import{U as P}from"./5c5c2e96.CVCPr6-x.js";import{u as L}from"./9f047e05.CCJUgz_L.js";import{u as q,S as B}from"./ca5e9c49.BT49yYQL.js";import{S as M}from"./f3e117aa.VqIXr3nP.js";import"./app.CepNJbvh.js";import"./0a7dffce.DfUtZWCu.js";import"./5fda1420.KYpufQ--.js";import"./60a453ce.CkhHeRBc.js";import"./21cc90a2.DAzJmttM.js";import"./bb728e1c.iawBHR84.js";function T({progressing:t,onClick:a,cartEmpty:n,inlineSize:r}){const{i18n:i,embed:o}=I(),s=n&&!j(o?.embedder);return e(u,{variant:"primary",disabled:t,loading:t,onClick:a,inlineSize:r,children:s?i.translate("stock.return_to_store_label"):i.translate("stock.continue_cta_label")})}function U({progressing:t,onSecondaryClick:a}){const{i18n:n,url:r,observability:i}=I();return e(u,{onClick:async()=>{try{await a()}catch(e){i.leaveErrorBreadcrumb("Error negotiating before returning to cart",{error:e})}finally{window.location.replace(r.cart())}},variant:"plain",disabled:t,children:e(m,{direction:"inline",gap:"small-200",alignItems:"center",children:e(d,{children:n.translate("general.back_to_cart")})})})}function A(t){const{shop:a,embed:n}=I(),{isAppLayout:r}=s(),i=j(n?.embedder);if(!a.hasStorefront&&t.cartEmpty&&!i)return null;const{primary:o,secondary:m}=function(t,a,n,r){return t?{primary:a.cartEmpty&&n&&!r?null:e(T,{...a,inlineSize:r?"fill":void 0}),secondary:a.cartEmpty||r||n&&!a.cartEmpty?null:e(U,{...a})}:t||a.cartEmpty?{}:{primary:e(T,{...a,inlineSize:r?"fill":void 0})}}(a.hasStorefront,t,r,i);return e(c,{alignItems:"center",alignContent:"center",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"large-300",...i?{gridTemplateColumns:"1fr",inlineSize:"100%"}:{gridTemplateColumns:"@media (inline-size >= extraSmall) 'minmax(auto, max-content) minmax(auto, max-content)', none",justifyContent:"@media (inline-size >= extraSmall) end, ''",justifyItems:"@media (inline-size >= extraSmall) end, ''"},children:[e(l,{display:"@media (inline-size >= extraSmall) auto, none",children:m}),o,e(l,{display:"@media (inline-size >= extraSmall) none, auto",inlineAlignment:"center",children:m})]})}function D({lineItems:i,showLineItems:o=!0,cartEmpty:s,type:l,subtitle:c}){const u=x(),{value:k}=u.merchandiseLines,S=E("merchandiseLines").value,{progress:z,progressing:C}=p(),T=w().merchandiseLines,U=b(),{observability:D,router:O,embed:J}=I(),{currentDetour:N}=y().value,F=t(()=>k?.lines??[],[k]),[G,R]=a(S);L("stock_problems"),q({stage:G?B.Loading:B.Complete,id:"StockProblems"});const H=s&&j(J?.embedder),Q=n(e=>{const t=T.value;T.value=t.filter(({stableId:t})=>!e.includes(t))},[T]),V=n(()=>{_(J,P)},[J]),W=t(()=>F.reduce((e,t)=>({...e,[t.stableId]:t}),{}),[F]),Y=n(({removeUnavailableMerchandise:e=!1}={})=>{const t=T.value,a=t.flatMap(t=>{const a=W[t.stableId];return!e||a&&0!==a.quantity?a&&0!==a.quantity?t.quantity===a.quantity&&t.totalPrice===a.totalPrice?[t]:[{...t,quantity:a.quantity,totalPrice:a.totalPrice}]:[t]:[]});a.length===t.length&&a.every((e,a)=>e===t[a])||(T.value=a)},[W,T]),Z=n(async()=>{const e=i.filter(({problem:e})=>g(e.type)).map(({line:e})=>e.stableId);e.length&&Q(e),Y({removeUnavailableMerchandise:!0}),D.log("stock_problems_actions_submitted","Stock problems actions submitted",{unshippableMerchandiseIds:JSON.stringify(e),currentDetour:JSON.stringify(N),routerCurrentUrl:O.currentUrl.value.normalizedPath}),await z("checkout-stock-problems-submit")},[N,i,D,z,Q,O,Y]),K=f(),X=n(async()=>{await K(i)},[K,i]);return r(function(){Y()},[F,Y]),r(()=>{S||(R(!1),U.notify({checkout_in_progress:!1}))},[S,G,U]),e(v,{message:c,errorType:h.InventoryError,children:e(m,{gap:"large-200",children:[e(d,{children:c}),o&&i.length>0?e(M,{lineItems:i,loading:G,type:l}):null,e(A,{cartEmpty:s,progressing:C.value,onClick:H?V:Z,onSecondaryClick:X})]})})}function O(){const{observability:t,checkout:{wallets:s}}=I(),{canBeDismissed:l,...c}=C(),{progress:m}=p(),[d,u]=a(!0),b=i(()=>
1"GOOGLE_PAY"!==s.activeSession.value?.wallet),{checkoutProtocolModalEventSignal:y}=z(),g=n(()=>{m("stock-problems-modal-close",()=>{u(!1)})},[m]),f=l?{blocking:!1,onHide:g}:{blocking:!0};return r(()=>()=>{y.value="none"},[y]),e(o,{when:b,children:[e(J,{state:c}),e(k,{section:"stock-problems",children:e(S,{id:"stock-problems-modal",open:d,heading:c.title,size:"large",onShow:()=>{t.leaveErrorBreadcrumb("Stock problems modal opened",{type:c.type}),y.value="stockProblems"},...f,children:e(D,{...c})})})]})}function J({state:e}){const{observability:t}=I();return r(()=>{0!==e.lineItems.length&&t.leaveErrorBreadcrumb("Displaying stock problems modal",{type:e.type,lineItems:e.lineItems.map(e=>({stableId:e.line.stableId,problem:e.problem.type}))})},[t,e.lineItems,e.type]),null}export{O 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.