PageSourceSearch

https://www.paulsmith.co.jp/_nuxt/DINbD1bE.js

js paulsmith.co.jp collected 2026-10-02 07:04:47 UTC 2,743 bytes, 1 lines download raw bytes

1import{_ as v}from"./BDRFOPKB.js";import{W as P,m as E,d as $,X as M,Y as B,s as p,Z as L,A as F,z as U,o as s,e as f,E as N,b as l,u as n,a as r,F as y,t as _,C as k,h as T,M as V,$ as A}from"./BoIX-Qb1.js";import{_ as D}from"./DSVr3Uhu.js";import{u as Y}from"./CZeGSu-Z.js";import"./BAPimAVW.js";function j(){const{cart:g,fetchCart:u}=P();async function a(){var o;let t=g.value;return(o=t==null?void 0:t.lines)!=null&&o.length||(t=await u()),t}async function i(){var o;const t=await a();if(!((o=t==null?void 0:t.lines)!=null&&o.length))throw new Error("Cart is empty");return t.checkoutUrl||"/checkout"}async function h(){var o;const t=await a();if(!((o=t==null?void 0:t.lines)!=null&&o.length))throw new Error("Cart is empty");try{E().trackShopifyBeginCheckout(t)}catch(c){console.error("[ShopifyCheckout] Failed to track begin_checkout",c)}window.location.assign(t.checkoutUrl||"/checkout")}return{getCheckoutUrl:i,redirectToCheckout:h}}const z={class:"checkout flex min-h-[calc(100vh_-_var(--header-basic))] items-center justify-center px-lg py-4xl"},G={class:"mx-auto flex max-w-screen-sm flex-col items-center text-center"},H={class:"heading-h2 mb-lg"},O={class:"heading-h2 mb-lg"},R={key:0,class:"mb-2xl text-textErrorSale"},W={class:"flex flex-col gap-md sm:flex-row"},Q=$({__name:"complete-purchase",setup(g){const u=M(),a=Y(),i=B(),{redirectToCheckout:h}=j(),t=p(!0),o=p(!1),c=p("");async function b(){if(o.value=!0,t.value=!1,!a.emptyCMSPage.name)try{await a.setEmptyCmsPage()}catch(e){console.warn("[Checkout] Failed to load empty checkout CMS page",e)}}async function C(){t.value=!0,o.value=!1,c.value="";try{await h()}catch(e){if((e==null?void 0:e.message)==="Cart is empty"){await b();return}c.value=(e==null?void 0:e.message)||"Unable to open Shopify checkout.",t.value=!1}}return L(()=>{u.setContentPageSettings("checkout")}),F(()=>{C()}),U({title:"Checkout | Paul Smith",meta:[{name:"description",content:"Paul Smith Checkout"}]}),(e,X)=>{const S=v,w=V,m=A,x=D;return s(),f(x,null,{default:N(()=>{var d;return[l("main",z,[l("section",G,[n(t)?(s(),f(S,{key:0,class:"heading-h3",text:e.$t("Loading")},null,8,["text"])):n(o)?(s(),r(y,{key:1},[(d=n(a).emptyCMSPage.content)!=null&&d.body?(s(),f(w,{key:0,blocks:n(a).emptyCMSPage.content.body},null,8,["blocks"])):(s(),r(y,{key:1},[l("h1",H,_(e.$t("Your bag is empty")),1),k(m,{label:e.$t("Continue Shopping"),to:n(i)("/")},null,8,["label","to"])],64))],64)):(s(),r(y,{key:2},[l("h1",O,_(e.$t("Checkout")),1),n(c)?(s(),r("p",R,_(n(c)),1)):T("",!0),l("div",W,[k(m,{"btn-type":"block",label:e.$t("Try again"),onClick:C},null,8,["label"]),k(m,{"btn-type":"tertiary",label:e.$t("Continue Shopping"),to:n(i)("/")},null,8,["label","to"])])],64))])])]}),_:1})}}});
1export{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.