1import{_ as ie,a as re}from"./ym2Yau_6.js";import{_ as oe}from"./DnEv_ikF.js";import{e as ne,u as se,S as le,s as ce,U as ue,c as s,b as k,w as $,a7 as L,a as e,d as P,V as O,W as V,h as r,k as de,i as f,t as o,l as pe,m as he,j as c,r as u,G as ge,o as n,n as A,_ as fe}from"./BcJoJbsq.js";import{a as me,u as ve}from"./B-ezNn18.js";import{u as be}from"./gkKsI6bv.js";const ye={class:"site-shell pricing-shell pricing-page-standard"},we={key:0,class:"checkout-loading-overlay","aria-live":"polite","aria-label":"Opening Stripe checkout"},_e={class:"pricing-simple-hero","aria-labelledby":"pricing-title"},ke={key:0,class:"pricing-alert success",role:"status"},Pe={key:1,class:"pricing-alert success",role:"status"},Se={key:2,class:"pricing-alert",role:"status"},Ce={class:"pricing-plans","aria-label":"Pricing plans"},xe={class:"plan-card free-plan","aria-labelledby":"free-plan-title"},Ee={class:"plan-feature-list free-feature-list"},Ie={class:"feature-icon","aria-hidden":"true"},Ue={class:"feature-text"},Be={key:1,class:"secondary-button plan-cta",type:"button",disabled:""},Te={class:"plan-card pro-plan","aria-labelledby":"pro-plan-title"},De={class:"plan-header"},qe={class:"plan-price"},Fe={class:"billing-toggle",role:"radiogroup","aria-label":"Pro billing cycle"},$e=["aria-checked","onClick"],Oe={class:"billing-option-label"},Ve={key:0,class:"billing-discount"},Ae={class:"plan-feature-list"},Me={class:"feature-text"},He=["disabled"],Ne={key:0,class:"checkout-error",role:"alert"},M="Pricing â Free and Pro | StitchPilot.ai",H="Simple StitchPilot.ai pricing: start free with embroidery preview tools, or subscribe to Pro for unlimited Image to Embroidery conversions with monthly or annual billing.",Re=ne({__name:"pricing",setup(Xe){const S=se(),W=he(),C=`${String(W.public.siteUrl||"https://stitchpilot.manus.space").replace(/\/$/,"")}/pricing`;me({title:M,description:H,ogTitle:M,ogDescription:H,ogType:"website",ogUrl:C,twitterCard:"summary_large_image",twitterTitle:M,twitterDescription:H}),ve({link:[{rel:"canonical",href:C}],script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"Product",name:"StitchPilot Pro",brand:{"@type":"Brand",name:"StitchPilot.ai"},description:"Unlimited Image to Embroidery conversions for subscribed StitchPilot.ai users.",url:C,offers:{"@type":"AggregateOffer",lowPrice:"29",highPrice:"290",priceCurrency:"USD",availability:"https://schema.org/InStock",offerCount:2,offers:[{"@type":"Offer",price:"29",priceCurrency:"USD",priceSpecification:{"@type":"UnitPriceSpecification",price:"29",priceCurrency:"USD",billingDuration:"P1M"}},{"@type":"Offer",price:"290",priceCurrency:"USD",priceSpecification:{"@type":"UnitPriceSpecification",price:"290",priceCurrency:"USD",billingDuration:"P1Y"}}]}})}]});const{user:p,fetchUser:x}=le(),N=be(),R=c(()=>`/sign-in?returnTo=${encodeURIComponent(S.fullPath||"/pricing")}`),m=u({subscription:null}),h=c(()=>m.value?.subscription||null),E=c(()=>String(S.query.checkout||"")),I=c(()=>String(S.query.session_id||"")),v=u(!1),U=u(!1),b=u(!1),B=u(!1),d=u(""),y=u(!1),w=u("monthly");let T=null;function J(){y.value=!0,T&&clearTimeout(T),T=setTimeout(()=>{y.value=!1},5e3)}async function D(){if(p.value)try{m.value=await $fetch("/api/billing/subscription",{credentials:"include"})}catch{}}function X(i){const t=i;return t?.statusCode||t?.status||t?.response?.status||t?.data?.statusCode||0}function j(i){const t=i;return t?.data?.detail||t?.response?._data?.detail||t?.message||""}function z(i){const t=X(i),_=j(i);return t===401?"Please sign in before subscribing to StitchPilot Pro.":_||"We could not complete the request. Please try again or contact support."}const q=[{id:"monthly",label:"Monthly",price:"$29",suffix:"/ month",interval:"month",discountBadge:void 0},{id:"yearly",label:"Annual",price:"$290",suffix:"/ year",interval:"year",discountBadge:"Save 17%"}],l=c(()=>q.find(i=>i.id===w.value)??q[0]),g=c(()=>!!h.value?.isProActive),F=c(()=>!!(h.value?.isProActive&&h.value.billingInterval===l.value.interval)),G=c(()=>v.value||b.value||F.value),Q=c(()=>b.value?"Updating planâ¦":F.value?"Current plan":v.value?g.value?"Switching planâ¦":"Opening checkoutâ¦":g.value?l.value.interval==="year"?"Switch to annual"
1:"Switch to monthly":p.value?`Subscribe ${l.value.label}`:"Sign in to subscribe"),K=[{text:"Unlimited Image to Embroidery conversions",supported:!1,highlight:!0},{text:"Export machine-ready embroidery files from uploaded artwork",supported:!1,highlight:!0},{text:"Monthly or annual Pro billing options",supported:!1,highlight:!1},{text:"Embroidery Viewer for PES, DST, JEF, VP3, EXP, HUS, XXX, and EMD files",supported:!0,highlight:!1},{text:"Embroidery to Image previews for documentation and sharing",supported:!0,highlight:!1},{text:"Thread-color and stitch-preview inspection tools",supported:!0,highlight:!1}],Z=[{text:"Unlimited Image to Embroidery conversions",highlight:!0},{text:"Export machine-ready embroidery files from uploaded artwork",highlight:!0},{text:"Monthly or annual billing with visible savings",highlight:!1},{text:"Embroidery Viewer for PES, DST, JEF, VP3, EXP, HUS, XXX, and EMD files",highlight:!1},{text:"Embroidery to Image previews for documentation and sharing",highlight:!1},{text:"Thread-color and stitch-preview inspection tools",highlight:!1}];async function Y(){if(!(!p.value||E.value!=="success"||!I.value||B.value)){B.value=!0,b.value=!0,d.value="";try{m.value=await $fetch("/api/billing/reconcile-checkout",{method:"POST",credentials:"include",body:{sessionId:I.value}}),await x(),await D(),window.history.replaceState({},"","/pricing")}catch(i){console.error("[Pricing] Unable to reconcile checkout session:",i),d.value="Checkout completed, but we could not refresh your Pro status yet. Please open Billing or try again in a moment."}finally{b.value=!1}}}ce(async()=>{await x(),await D(),await Y(),N.capture("pricing_page_view",{has_subscription:!!h.value?.isProActive,current_billing_interval:h.value?.billingInterval??null,is_signed_in:!!p.value})}),ue(I,async()=>{B.value=!1,await Y()});async function ee(){if(d.value="",y.value=!1,!F.value){if(!p.value){await ge(R.value);return}v.value=!0;try{if(g.value&&h.value?.stripeSubscriptionId){const t=await $fetch("/api/billing/subscription/change-plan",{method:"POST",credentials:"include",body:{billingInterval:l.value.interval}});m.value=t,await D(),J();return}U.value=!0,N.capture("checkout_started",{plan:"pro",billing_interval:l.value.interval,flow:g.value?"plan_change":"new_subscription"});const i=await $fetch("/api/stripe/checkout",{method:"POST",credentials:"include",body:{billingInterval:l.value.interval}});if(!i.url){d.value="Checkout did not return a redirect URL. Please try again or contact support.";return}window.open(i.url,"_blank","noopener,noreferrer")}catch(i){console.error("[Pricing] checkout error:",i),d.value=z(i),X(i)===401&&await x()}finally{v.value=!1,U.value=!1}}}return(i,t)=>{const _=ie,te=oe,ae=re;return n(),s("main",ye,[k(_),k(L,{name:"checkout-overlay"},{default:$(()=>[r(U)?(n(),s("div",we,[...t[0]||(t[0]=[e("div",{class:"checkout-loading-card"},[e("div",{class:"checkout-spinner","aria-hidden":"true"}),e("p",null,"Opening checkoutâ¦"),e("span",null,"You will be redirected to Stripe shortly.")],-1)])])):f("",!0)]),_:1}),e("section",_e,[t[1]||(t[1]=e("h1",{id:"pricing-title"},"Choose your StitchPilot plan.",-1)),t[2]||(t[2]=e("p",{class:"pricing-simple-lede"},"Start free with embroidery preview tools, then upgrade to Pro when you need unlimited Image to Embroidery conversion.",-1)),k(L,{name:"alert-slide"},{default:$(()=>[r(y)?(n(),s("div",ke," Your plan has been updated successfully. ")):r(E)==="success"?(n(),s("div",Pe," Your checkout is complete. Your Pro access may take a moment to appear. ")):r(E)==="cancelled"?(n(),s("div",Se," Checkout was cancelled. You can restart the Pro subscription flow whenever you are ready. ")):f("",!0)]),_:1})]),e("section",Ce,[e("article",xe,[t[4]||(t[4]=e("div",{class:"plan-header"},[e("h2",{id:"free-plan-title"},"Free"),e("div",{class:"plan-price"},[e("span",null,"$"),P("0"),e("small",null,"/ month")]),e("p",{class:"plan-description"},"Best for inspecting embroidery files and creating preview images before production work.")],-1)),e("ul",Ee,[(n(),s(O,null,V(K,a=>e("li",{key:a.text,class:A({unsupported:!a.supported,"feature-highlight":a.highlight})},[e("span",Ie,o(a.supported?"â":"Ã"),1),e("span",Ue,o(a.text),1)],2)),64))]),r(p)?r(g)?f("",!0):(n(),s("button",Be,"Current plan")):(n(),de(te,{key:0,class:"secondary-button plan-cta",to:r(R)},{default:$(()=>[...t[3]||(t[3]=[P("Sign up free",-1)])]),_:1},8,["to"]))]),e("article",Te,[e("div",De,[t[5]||(t[5]=e("h2",{id:"pro-plan-title"},"Pro",-1)),e("div",qe,[e("span",null,o(r(l).price.slice(0,1)),1),P(o(r(l).price.slice(1)),1),e("small",null,o(r(l).suffix
1),1)]),t[6]||(t[6]=e("p",{class:"plan-description"},"Unlock the paid workflow that turns artwork into downloadable embroidery machine files.",-1))]),e("div",Fe,[(n(),s(O,null,V(q,a=>e("button",{key:a.id,type:"button",class:A(["billing-option",{active:r(w)===a.id}]),"aria-checked":r(w)===a.id,role:"radio",onClick:Le=>w.value=a.id},[e("span",Oe,[P(o(a.label)+" ",1),a.discountBadge?(n(),s("em",Ve,o(a.discountBadge),1)):f("",!0)]),e("strong",null,o(a.price)+o(a.suffix),1)],10,$e)),64))]),e("ul",Ae,[(n(),s(O,null,V(Z,a=>e("li",{key:a.text,class:A({"feature-highlight":a.highlight})},[t[7]||(t[7]=e("span",{class:"feature-icon","aria-hidden":"true"},"â",-1)),e("span",Me,o(a.text),1)],2)),64))]),e("button",{class:"primary-button plan-cta",type:"button",disabled:r(G),onClick:ee},o(r(Q)),9,He),r(d)?(n(),s("p",Ne,o(r(d)),1)):f("",!0)])]),t[8]||(t[8]=e("section",{class:"pricing-comparison","aria-labelledby":"pricing-comparison-title"},[e("div",{class:"pricing-section-heading"},[e("span",null,"Plan comparison"),e("h2",{id:"pricing-comparison-title"},"Compare Free and Pro."),e("p",null,"See which StitchPilot tools are included before choosing the plan that matches your embroidery workflow.")]),e("div",{class:"comparison-table",role:"table","aria-label":"Free and Pro feature comparison details"},[e("div",{class:"comparison-row comparison-head",role:"row"},[e("span",{role:"columnheader"},"Feature"),e("strong",{role:"columnheader"},"Free"),e("strong",{role:"columnheader"},"Pro")]),e("div",{class:"comparison-row",role:"row"},[e("span",{role:"cell"},"Embroidery Viewer"),e("strong",{role:"cell"},"Included"),e("strong",{role:"cell"},"Included")]),e("div",{class:"comparison-row",role:"row"},[e("span",{role:"cell"},"Embroidery to Image"),e("strong",{role:"cell"},"Included"),e("strong",{role:"cell"},"Included")]),e("div",{class:"comparison-row",role:"row"},[e("span",{role:"cell"},"Image to Embroidery"),e("strong",{role:"cell"},"Not included"),e("strong",{role:"cell"},"Unlimited")]),e("div",{class:"comparison-row",role:"row"},[e("span",{role:"cell"},"Billing"),e("strong",{role:"cell"},"Free forever"),e("strong",{role:"cell"},"$29/month or $290/year")])])],-1)),t[9]||(t[9]=pe('<section class="pricing-faq standard-faq" aria-labelledby="pricing-faq-title" data-v-3bfa003a><div class="pricing-section-heading compact" data-v-3bfa003a><span data-v-3bfa003a>FAQ</span><h2 id="pricing-faq-title" data-v-3bfa003a>Common billing questions.</h2><p data-v-3bfa003a>Review what is free, what Pro unlocks, how subscriptions are managed, and when refunds may apply.</p></div><div class="faq-list" data-v-3bfa003a><details open data-v-3bfa003a><summary data-v-3bfa003a>Which tools are free?</summary><p data-v-3bfa003a>Embroidery Viewer and Embroidery to Image are included in the Free plan. They are intended for inspection, preview generation, and lightweight sharing workflows.</p></details><details data-v-3bfa003a><summary data-v-3bfa003a>What does Pro unlock?</summary><p data-v-3bfa003a>Pro unlocks unlimited Image to Embroidery conversions, the workflow that creates machine-ready embroidery files from uploaded artwork. You can choose monthly billing or an annual plan with savings.</p></details><details data-v-3bfa003a><summary data-v-3bfa003a>How do I manage my plan?</summary><p data-v-3bfa003a>After subscribing, you can review your plan and manage subscription actions from the Billing page in your account center.</p></details><details data-v-3bfa003a><summary data-v-3bfa003a>What is the refund policy?</summary><p data-v-3bfa003a>Refunds may be requested within 7 days only when you provide a clear product quality issue for review. If no specific product quality issue is provided, refunds are not supported.</p></details><details data-v-3bfa003a><summary data-v-3bfa003a>How do I submit quality issue evidence for a refund?</summary><p data-v-3bfa003a>Send screenshots that clearly show the product quality issue to <a href="mailto:[email protected]" data-v-3bfa003a>[email protected]</a> within 7 days of your purchase. Include your account email and a short description of the problem so our team can review the request.</p></details></div></section>',1)),k(ae)])}}}),Qe=fe(Re,[["__scopeId","data-v-3bfa003a"]]);export{Qe 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.