PageSourceSearch

https://clicksigns.ca/cdn/shopifycloud/checkout-web/assets/c1/a9ba8e86.BHbi6jR5.js

js clicksigns.ca collected 2026-10-07 22:26:00 UTC 5,095 bytes, 1 lines download raw bytes

1import{u as e,T as t,z as a,q as n,h as r,k as i,w as o}from"./2c1ab0fe.B2yRRyAW.js";import{bQ as l,b as s,ab as c,S as m,j as d,B as u,v as p,bR as b,k as y,bS as g,bT as f,aa as h,bU as v,af as k,M as S}from"./164ad2e3.-hfWY9cN.js";import{c as I,I as j,b9 as x,bb as E}from"./4b4bc88f.JFrEI7LU.js";import{u as w}from"./f5a7bb50.mEqqOsF_.js";import{U as _}from"./5c5c2e96.Ca1pzIEB.js";import{u as z}from"./9f047e05.D-yqdheF.js";import{u as C,S as P}from"./71ae3d5c.BTocP6cf.js";import{S as L}from"./f3e117aa.CW9Vq1VP.js";import"./d0bb51ec.CiN57OqX.js";import"./app.C_W8kcQ4.js";import"./f67abd2c.Boj0gJpa.js";import"./60a453ce.aSs2kW8G.js";import"./e12db40c.ZpKYxNRe.js";import"./9dba8418.BqWu-Ch9.js";function q({progressing:t,onClick:a,cartEmpty:n,inlineSize:r}){const{i18n:i,embed:o}=I(),l=n&&!j(o?.embedder);return e(u,{variant:"primary",disabled:t,loading:t,onClick:a,inlineSize:r,children:l?i.translate("stock.return_to_store_label"):i.translate("stock.continue_cta_label")})}function A({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 B(t){const{shop:a,embed:n}=I(),{isAppLayout:r}=l(),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(q,{...a,inlineSize:r?"fill":void 0}),secondary:a.cartEmpty||r||n&&!a.cartEmpty?null:e(A,{...a})}:t||a.cartEmpty?{}:{primary:e(q,{...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(s,{display:"@media (inline-size >= extraSmall) auto, none",children:m}),o,e(s,{display:"@media (inline-size >= extraSmall) none, auto",inlineAlignment:"center",children:m})]})}function M({lineItems:i,showLineItems:o=!0,cartEmpty:l,type:s,subtitle:c}){const{observability:u,router:k,embed:S,checkout:{negotiator:w}}=I(),{value:q}=w.current.fields.merchandiseLines,A=x("merchandiseLines").value,{progress:M,progressing:U}=p(),T=w.parts.merchandiseLines,D=b(),{currentDetour:O}=y().value,R=t(()=>q?.lines??[],[q]),[G,J]=a(A);z("stock_problems"),C({stage:G?P.Loading:P.Complete,id:"StockProblems"});const N=l&&j(S?.embedder),H=n(e=>{const t=T.value;T.value=t.filter(({stableId:t})=>!e.includes(t))},[T]),Q=n(()=>{E(S,_)},[S]),X=t(()=>R.reduce((e,t)=>({...e,[t.stableId]:t}),{}),[R]),Y=n(({removeUnavailableMerchandise:e=!1}={})=>{const t=T.value,a=t.flatMap(t=>{const a=X[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)},[X,T]),F=n(async()=>{const e=i.filter(({problem:e})=>g(e.type)).map(({line:e})=>e.stableId);e.length&&H(e),Y({removeUnavailableMerchandise:!0}),u.log("stock_problems_actions_submitted","Stock problems actions submitted",{unshippableMerchandiseIds:JSON.stringify(e),currentDetour:JSON.stringify(O),routerCurrentUrl:k.currentUrl.value.normalizedPath}),await M("checkout-stock-problems-submit")},[O,i,u,M,H,k,Y]),K=f(),V=n(async()=>{await K(i)},[K,i]);return r(function(){Y()},[R,Y]),r(()=>{A||(J(!1),D.notify({checkout_in_progress:!1}))},[A,G,D]),e(v,{message:c,errorType:h.InventoryError,children:e(m,{gap:"large-200",children:[e(d,{children:c}),o&&i.length>0?e(L,{lineItems:i,loading:G,type:s}):null,e(B,{cartEmpty:l,progressing:U.value,onClick:N?Q:F,onSecondaryClick:V})]})})}function U(){const{observability:t,checkout:{wallets:l,negotiator:s}}=I(),{canBeDismissed:c,...m}=w(),{progress:d}=p(),[u,b]=a(!0),y=i(()=>
1"GOOGLE_PAY"!==l.activeSession.value?.wallet),{checkoutProtocolModalEventSignal:g}=s.context,f=n(()=>{d("stock-problems-modal-close",()=>{b(!1)})},[d]),h=c?{blocking:!1,onHide:f}:{blocking:!0};return r(()=>()=>{g.value="none"},[g]),e(o,{when:y,children:[e(T,{state:m}),e(k,{section:"stock-problems",children:e(S,{id:"stock-problems-modal",open:u,heading:m.title,size:"large",onShow:()=>{t.leaveErrorBreadcrumb("Stock problems modal opened",{type:m.type}),g.value="stockProblems"},...h,children:e(M,{...m})})})]})}function T({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{U 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.