PageSourceSearch

https://stcdn.leadconnectorhq.com/_preview/ChrKLPSw.js

js leadconnectorhq.com collected 2026-09-24 07:28:41 UTC 4,110 bytes, 1 lines download raw bytes

1import{a1 as I,af as N,cC as R,c as r,eo as F,ep as U,eq as j,ah as s,M as a,N as t,aJ as d,aK as c,ag as o,al as p,aA as u,az as q,bF as z,a5 as m,_ as M}from"./CqWH0BZP.js";import{u as $}from"./DtysEf6Z.js";import"./DuPoDUne.js";import"./wdic_FQ1.js";import"./DQE77ral.js";import"./D1nErt21.js";import"./DFiheZjC.js";import"./DRNKrJGC.js";import"./BoA7liN9.js";import"./7SBfHb3l.js";import"./PyyIl4xt.js";import"./uHKR0ql4.js";import"./Dl-x8CJl.js";import"./DT6pKBTi.js";import"./D0mAmvsc.js";import"./BCFd6tDZ.js";import"./C3h9HDah.js";const H={key:0,class:"pdp-v2-variants"},J={key:0,class:"pdp-v2-variants__wrapper"},K=["for","title"],W=["id","onUpdate:modelValue","aria-label","onChange"],G=["value","aria-label"],Q={key:1,class:"pdp-v2-variants__pills-wrapper"},X=["title"],Y={class:"pdp-v2-variants__pills-container"},Z=["aria-label","onClick"],ee={key:2,class:"pdp-v2-variants__wrapper"},ae={class:"pdp-v2-variants__group"},te=["aria-label","value"],le=["value","aria-label"],se={key:3,class:"pdp-v2-variants__pills-wrapper"},re={class:"pdp-v2-variants__pills-group"},oe={class:"pdp-v2-variants__pills-container"},ne=["aria-label","onClick"],ie=I({__name:"Variants",props:{element:{type:Object,required:!0}},async setup(S){let h,C;const _=S,{t:f}=N(),{product:n,selectedVariation:v,selectedPrice:T,initPdpV2Product:B,onChangeVariation:k,onChangePrice:w}=$();[h,C]=R(()=>B()),await h,C();const y=r(()=>_.element.extra?.variantsStyling?.variantPickerStyle?.value||"dropdown"),i=r(()=>_.element.extra?.variantsStyling?.pillColors?.value||F),g=r(()=>_.element.extra?.variantsStyling?.dropdownColors?.value||U),D=r(()=>_.element.extra?.variantsStyling?.labelColor?.value||j),P=b=>({color:b?i.value.selectedText:i.value.unselectedText,backgroundColor:b?i.value.selectedBg:i.value.unselectedBg,borderColor:b?i.value.selectedBorder:i.value.unselectedBorder}),V=r(()=>({color:g.value.text,backgroundColor:g.value.background,borderColor:g.value.border})),x=r(()=>({color:D.value})),A=r(()=>T.value?._id),L=r(()=>!n.value?.variants?.length&&(n.value?.prices?.length??0)>1),E=r(()=>_.element.extra?.customText?.value?.priceColumnHeading??f("ecommerce.product_detail.select_price"));return(b,O)=>s(n)?(a(),t("div",H,[y.value==="dropdown"&&Object.keys(s(v)).length?(a(),t("div",J,[(a(!0),t(d,null,c(s(n).variants,e=>(a(),t("div",{key:e.id,class:"pdp-v2-variants__group"},[o("label",{for:"variant-select-"+e.id,class:"pdp-v2-variants__label",title:e.name,style:u(x.value)},p(e.name),13,K),q(o("select",{id:"variant-select-"+e.id,"onUpdate:modelValue":l=>s(v)[e.id]=l,"aria-label":e.name,class:"pdp-v2-variants__select variant-dropdown",style:u(V.value),onChange:l=>s(k)(l.target.value,e.id)},[(a(!0),t(d,null,c(e.options,l=>(a(),t("option",{key:l.id,value:l.id,"aria-label":l.name},p(l.name),9,G))),128))],44,W),[[z,s(v)[e.id]]])]))),128))])):m("",!0),y.value==="pills"&&Object.keys(s(v)).length?(a(),t("div",Q,[(a(!0),t(d,null,c(s(n).variants,e=>(a(),t("div",{key:e.id,class:"pdp-v2-variants__pills-group"},[o("p",{class:"pdp-v2-variants__label",title:e.name,style:u(x.value)},p(e.name),13,X),o("div",Y,[(a(!0),t(d,null,c(e.options,l=>(a(),t("button",{key:l.id,type:"button",class:"variant-pill",style:u(P(s(v)[e.id]===l.id)),"aria-label":e.name+": "+l.name,onClick:de=>s(k)(l.id,e.id)},p(l.name),13,Z))),128))])]))),128))])):m("",!0),y.value==="dropdown"&&L.value?(a(),t("div",ee,[o("div",ae,[o("select",{"aria-label":E.value,class:"pdp-v2-variants__select variant-dropdown",value:A.value,style:u(V.value),onChange:O[0]||(O[0]=e=>s(w)(e.target.value))},[(a(!0),t(d,null,c(s(n).prices,e=>(a(),t("option",{key:e._id,value:e._id,"aria-label":e.name},p(e.name),9,le))),128))],44,te)])])):m("",!0),y.value==="pills"&&L.value?(a(),t("div",se,[o("div",re,[o("div",oe,[(a(!0),t(d,null,c(s(n).prices,e=>(a(),t("button",{key:e._id,type:"button",class:"variant-pill",style:u(P(A.value===e._id)),"aria-label":e.name,onClick:l=>s(w)(e._id)},p(e.name),13,ne))),128))])])])):m("",!0)])):m("",!0)}}),Le=Object.assign(M(ie,[["__scopeId","data-v-c47458d9"]]),{__name:"PreviewElementsEcommercePdpV2Variants"});export{Le 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.