PageSourceSearch

https://coisar.com/assets/PremiumUpgrade-DJxx9GGh.js

js coisar.com collected 2026-10-07 21:03:06 UTC 2,809 bytes, 2 lines download raw bytes

1import{a0 as y,c as I,K as P,M as e,u as d,F as T,C as D,p as k}from"./vue-vendor-B47-IOI5.js";import{u as E}from"./coisar-DBOxvsqU.js";import{a as L,u as R}from"./usePayment-DeTCZpMR.js";import{a as U}from"./index-O33Ma34B.js";import{_ as x,a as B,b as F,c as A,d as K,e as M,f as N,g as V,h as j}from"./UpgradeStickyCtaMobile-gFbe4kmi.js";import{_ as q,a as z}from"./UpgradeFaq-BvmaU8fl.js";import"./vuefire-qJ79R-Ug.js";import"./firebase-auth-DkOTFHyk.js";import"./firebase-app-i3LHiLFe.js";import"./firebase-firestore-pXPEshlx.js";import"./firebase-storage-CFW5eRaO.js";import"./jsonata-B8fnlbK5.js";import"./gettext-75PVbkNV.js";import"./firebase-functions-CJeCuegn.js";import"./analytics-B7ftq9Nc.js";import"./fontawesome-B4kGKycv.js";import"./storyblok-CixJIiwy.js";import"./headlessui-Y2YZn8U5.js";import"./vueuse-kBox2k3A.js";import"./sentry-DjxoU76I.js";import"./AvatarPhoto-Ci1IvqMe.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new r.Error().stack;c&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[c]="d5e2eb4c-7cda-4030-8222-c539fbfdb48f",r._sentryDebugIdIdentifier="sentry-dbid-d5e2eb4c-7cda-4030-8222-c539fbfdb48f")}catch{}})();const fe={__name:"PremiumUpgrade",setup(r){const c=E(),{reading:a}=y(c),{products:l,bundles:C}=y(L()),u=U(),{createCheckoutSession:$,watchCheckoutSession:v}=R(),w=I(()=>!a.value||l.value.some(t=>{var n,i,m;return(m=(n=t==null?void 0:t.metadata)==null?void 0:n.upgrade_from)==null?void 0:m.split(",").map(f=>f.trim()).includes((i=a.value)==null?void 0:i.type)}));k("checkoutEnabled",w),k("selectableReadingTypes",["basic","basic-pdf","premium"]);async function s(t){var p,_,g,b;let n=t;if(((p=a.value)==null?void 0:p.type)==="premium"){if(t==="premium_bundle")n="premium_pdf";else if(t==="premium")return}const i=C.value.find(o=>o.identifier==n);if(!((_=i==null?void 0:i.line_items)!=null&&_.length)){console.warn("[PremiumUpgrade] bundle not found or has no line_items",{resolvedIdentifier:n,bundle:i});return}u.setLoading(!0);const m=i.line_items,f=(g=l.value.find(o=>{var h;return((h=o==null?void 0:o.metadata)==null?void 0:h.product_identifier)==n}))==null?void 0:g.metadata.coisar_type,S=await $(m,(b=a.value)==null?void 0:b.id,f);v(S,o=>{u.setLoading(!1),window.location.href=o},o=>{console.error("[PremiumUpgrade] checkout session error",o),u.setLoading(!1)})}return(t,n)=>(D(),P(T,null,[e(x,{reading:d(a),onCheckout:s},null,8,["reading"]),e(K),e(M,{onCheckout:s}),e(q),e(B,{reading:d(a),onCheckout:s},null,8,["reading"]),e(N,{onCheckout:s}),e(V),e(j,{onCheckout:s}),e(z),e(F,{reading:d(a),onCheckout:s},null,8,["reading"]),e(A,{reading:d(a),onCheckout:s},null,8,["reading"])],64))}};export{fe as default};
2//# sourceMappingURL=PremiumUpgrade-DJxx9GGh.js.map

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.