PageSourceSearch

https://andyweirauthor.com/_nuxt/BAvpTMRj.js

js andyweirauthor.com collected 2026-10-02 05:16:25 UTC 5,351 bytes, 1 lines download raw bytes

1import{o as O,bw as j,bv as $,a9 as f,a6 as _,bp as b,F as D,bM as A,bq as N,cw as P,bJ as U,a3 as s,bz as m}from"./BPlt5jNJ.js";import{u as q}from"./CzPunx1q.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new a.Error().stack;p&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[p]="8bda95de-7e2c-403b-8c8d-7e09cec42d9b",a._sentryDebugIdIdentifier="sentry-dbid-8bda95de-7e2c-403b-8c8d-7e09cec42d9b")}catch{}{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a._sentryModuleMetadata=a._sentryModuleMetadata||{},a._sentryModuleMetadata[new a.Error().stack]=Object.assign({},a._sentryModuleMetadata[new a.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}const G=["data-editable-title","inert"],J=["data-updated"],K=["href","target","onClick","innerHTML"],Q=["innerHTML"],X={__name:"RetailerLinks",props:{modelValue:{type:Object,default:()=>{}},editable:{type:Boolean,default:!1},meta:{type:Object,default:()=>{}},isbn:{type:Number,default:0},workId:{type:Number,default:0},theme:{type:Object,default:()=>{}},moduleTheme:{type:Object,default:()=>{}},module:{type:String,default:""},context:{type:String,default:""},alignment:{type:String,default:""},baseUrl:{type:String,default:""},isInteractive:{type:Boolean,default:!0}},emits:["tracking"],setup(a,{emit:p}){const{getTrackingOverrides:T}=q(),w=P(),h=U(null),C=p,r=a,d=s(()=>{let e=r.modelValue.meta?.button;r.moduleTheme&&(e=r.moduleTheme);const{fontFamily:t,fontWeight:o,fontSize:n,color:i,borderWidth:y,background:k,borderColor:I,backgroundHover:V,hoverTextColor:H,textTransform:R,shape:E,autoThemeButtonHover:x}=e||{},l=r.theme.meta[r.context]||{};return{fontFamily:t||l?.fontFamily,fontWeight:o||l?.fontWeight,fontSize:n||l?.fontSize,color:i||l?.color,borderWidth:y??l?.borderWidth,background:k||l?.background,borderColor:I||l?.borderColor,backgroundHover:x?i||l?.color:V||l?.backgroundHover,hoverTextColor:x?k||l?.background:H||l?.hoverTextColor,textTransform:R??l?.textTransform,shape:E??l?.shape}}),M=s(()=>({"--theme-button-background":d.value.background,"--theme-button-background-hover":d.value.backgroundHover,"--theme-button-color":d.value.color,"--theme-button-hover-text-color":d.value.hoverTextColor,"--theme-button-border-color":d.value.borderColor,"--theme-subheader-text-color":v.value.color})),v=s(()=>{let e=r.modelValue.meta.subheader;(r.moduleTheme||r.module==="FeaturedBook")&&(e=r.modelValue?.subheader);const t=r.theme.meta[r.context]?.subheader||{};return{fontFamily:e?.fontFamily||t?.fontFamily,fontWeight:e?.fontWeight||t?.fontWeight,fontSize:e?.fontSize||t?.fontSize,color:e?.color||t?.color,textTransform:e?.textTransform||t?.textTransform}}),S=s(()=>{const{module:e,alignment:t,modelValue:o}=r,n=o.meta.layout,i=["MultiBook","AudioEmbed"].includes(e)&&t?t:o.meta.button.alignment;return{"layout-row":["row","info"].includes(n)||e==="MultiBook","justify-start":i==="left","justify-center":i==="center","empty:h-8 empty:border-2 border-dashed border-gray-400":!c}}),z=s(()=>{const{fontFamily:e,fontWeight:t,fontSize:o,borderWidth:n,textTransform:i,shape:y}=d.value;return{[e]:e,[`font-weight-${t}`]:t,[`font-size-${o}px`]:o,[`border-${n}`]:n!==void 0,uppercase:i,"rounded-lg @xs:rounded-full":y==="rounded"}}),B=s(()=>{const{fontFamily:e,fontWeight:t,fontSize:o,textTransform:n}=v.value,i=["MultiBook","AudioEmbed"].includes(r.module)&&r.alignment?r.alignment:r.modelValue.meta.button.alignment;return{[e]:e,[`font-weight-${t}`]:t,[`font-size-${o}px`]:o,uppercase:n,[`text-${i}`]:i}}),L=(e,t,o)=>{if(!c)return;const n={event_type:"affiliate_click",...r.meta,affiliate_name:e.target.innerText,product_isbn:t,product_format:o};typeof n.product_isbn=="number"?n.product_isbn=[n.product_isbn.toString()]:n.product_isbn=[n.product_isbn],C("tracking",n)},W=e=>({"w-full retail-link-subheader":!e.url}),g=s({get(){return r.modelValue.retailers?r.modelValue.retailers.filter(t=>t.active).sort((t,o)=>t.order-o.order):[]},set(e){return r.modelValue.retailers=e,e}}),F=()=>
1{if(!c)return;const e=T(g.value);e&&(g.value=e)};let u;const c=w.state.session.isPublic;return j(()=>{c&&(u=new IntersectionObserver(e=>{e.forEach(t=>{t.isIntersecting&&(F(),u.unobserve(t.target))})},{threshold:0,rootMargin:"50px"}),h.value&&u.observe(h.value))}),$(()=>{c&&u&&u.disconnect()}),(e,t)=>(m(),f("div",{ref_key:"retailerLinksRef",ref:h,class:b(["retailer-wrapper",{editable:a.editable}]),"data-editable-title":a.editable?"Edit Retailer Links":null,inert:!a.isInteractive&&!a.editable},[_("div",{style:N(M.value)},[_("div",{class:b(["retailer-wrapper-inner flex flex-row flex-wrap gap-x-2 gap-y-3 my-[2px] empty:my-0",S.value]),"data-updated":g.value?.[0]?.updated,"data-test":"retailer-links-wrapper"},[(m(!0),f(D,null,A(g.value,o=>(m(),f("div",{key:o.id,"data-test":"retail-link-outer",class:b(W(o))},[o.url?(m(),f("a",{key:0,href:o.url,target:o.target?o.target:"_blank",rel:"noopener",class:b(["inline-flex leading-extra-tight py-1 px-2 min-w-14 min-h-7",z.value]),onClick:n=>L(n,o.isbn,o.format),innerHTML:o.label},null,10,K)):(m(),f("div",{key:1,class:b(["pt-2 pb-0 leading-extra-tight",B.value]),innerHTML:o.label},null,10,Q))],2))),128))],10,J)],4)],10,G))}},ee=O(X,[["__scopeId","data-v-98b2d389"]]);export{ee 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.