1import{e as a,b9 as w,G as C,l as O,cK as I,d as $,e2 as j,e3 as B,aE as E,aF as F,e4 as T,aj as V,a as i,b as r,f as e,a8 as S,p as c,t as v,F as b,L as _,c as y,w as x,a9 as N,s as k,b4 as A,e5 as z,aS as U,a2 as D,v as K,U as M}from"./index-DEIWCX15.js";import"./photoswipe-n7lXYKL2.js";function W(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!I(s)}const p=({image:s,label:u,price:o,profit:d,warningLabel:n,disabled:f},{slots:l,emit:h})=>{var g;return a("div",{class:["gift-grid-item",{"gift-grid-item--disabled":f,"gift-grid-item--with-icon":l.default!==void 0}],onClick:m=>h("select",m)},[d&&a("div",{class:"gift-grid-item__profit"},[d]),a("div",{class:"gift-grid-item__image"},[s&&a(w,C(s,{size:72}),null),!s&&((g=l.default)==null?void 0:g.call(l))]),a("div",{class:"gift-grid-item__label"},[a("div",{class:"gift-grid-item__label-text"},[u]),n&&a("div",{class:"gift-grid-item__label-warning"},[n])]),a(O,{size:"s",rounded:!0,isLoading:!o,disabled:f},W(o)?o:{default:()=>[o]})])},q={class:"gifts-landing"},H={key:0},J={class:"gifts-grid"},Q={key:1},R={class:"gifts-grid"},X=$({__name:"GiftsLanding",props:{user:{},source:{},context:{}},setup(s){const u=s,{isCollectiblesGiftingEnabled:o}=D(),{gifts:d}=j(),{t:n}=B(),{purchaseOptions:f}=E(),{proceedToGift:l}=F(),{proceedToGiftPurchase:h}=T(),{isMe:g}=V(),m=K(()=>!g(u.user.id));return(Y,Z)=>{var G;return i(),r("div",q,[m.value?(i(),r("section",H,[a(e(S),{class:"gifts-landing__avatar",source:s.user.avatar,size:90},null,8,["source"]),c("h2",null,v(e(n)("gifts.giftPlus")),1),c("p",null,v(e(n)("gifts.forName",{name:s.user.name})),1),c("div",J,[((G=e(f))==null?void 0:G.gift)!==void 0?(i(!0),r(b,{key:0},_(e(f).gift,(t,P)=>(i(),y(e(p),{key:t.value,label:t.label,price:t.monthPrice,profit:t.profit,onSelect:ee=>{var L;return(L=e(l))==null?void 0:L(s.user,{source:s.source,period:t.value})}},{default:x(()=>[a(e(N),{size:60,"animation-delay":P*300},null,8,["animation-delay"])]),_:2},1032,["label","price","profit","onSelect"]))),128)):(i(),r(b,{key:1},_(3,t=>a(e(p),{key:`plus-item-placeholder:${t}`,disabled:!0},{default:x(()=>[a(e(N),{size:60,"animation-delay":t*300},null,8,["animation-delay"])]),_:2},1024)),64))])])):k("",!0),e(o)?(i(),r("section",Q,[m.value?k("",!0):(i(),y(e(S),{key:0,class:"gifts-landing__avatar",source:s.user.avatar,size:90},null,8,["source"])),c("h2",null,v(e(n)("gifts.sendGift")),1),c("p",null,v(e(n)("gifts.forName",{name:s.user.name})),1),c("div",R,[e(d).isLoadedInitial?(i(!0),r(b,{key:0},_(e(d).items,t=>(i(),y(e(p),{key:t.code,image:e(U)({uuid:t.previewUuid,color:"transparent",size:72}),label:e(n)("common.countOfTotal",{count:e(z)(t.counters.current,{short:!0}),total:e(z)(t.counters.total,{short:!0})}),warningLabel:t.counters.current===0?e(n)("common.soldOut"):void 0,price:e(A)(t.price),disabled:t.counters.current===0,onSelect:P=>e(h)(t,{user:u.user,context:u.context})},null,8,["image","label","warningLabel","price","disabled","onSelect"]))),128)):(i(),r(b,{key:1},_(6,t=>a(e(p),{key:`gift-item-placeholder:${t}`,disabled:!0})),64))])])):k("",!0)])}}}),ae=M(X,[["__scopeId","data-v-02b4994b"]]);export{ae 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.