1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ed2fbfa0-82dc-556e-8627-e7aae4d5f6d7")}catch(e){}}(); 3import{a as yn}from"./chunk-TY4XG6MA.js";import{a as On}from"./chunk-T324O74B.js";import{a as Mn}from"./chunk-ZOK2B6DD.js";import{a as xn,c as Tn,j as In}from"./chunk-TXCD4PRZ.js";import{a as hn,b as Sn,c as En}from"./chunk-MSA6WV2Y.js";import{b as un}from"./chunk-ILIKFZUR.js";import"./chunk-HDQ2OQH3.js";import"./chunk-NHWPTFK5.js";import"./chunk-OPMYPTQJ.js";import"./chunk-2O7BLI3X.js";import{a as gn,b as Cn}from"./chunk-RUOOIYEE.js";import{b as vn,c as bn}from"./chunk-DZNH4HIG.js";import{a as vt,b as bt}from"./chunk-IMNCQ2EI.js";import"./chunk-3YGHZU45.js";import{b as rt}from"./chunk-RPJTA2VR.js";import"./chunk-QZXMYL2U.js";import"./chunk-JGT63LE4.js";import{a as Et}from"./chunk-7WZQSSX4.js";import"./chunk-XEAINILI.js";import"./chunk-53VKNBRS.js";import"./chunk-6H7BIAQI.js";import"./chunk-M65BSUF3.js";import{a as it,b as oe,c as re,e as nt,i as ot}from"./chunk-XZNL7LO4.js";import{a as sn}from"./chunk-J3MSZMSS.js";import"./chunk-52W6NZSR.js";import{a as Ji}from"./chunk-NPRWW2ST.js";import"./chunk-JLOG7XQX.js";import"./chunk-EC67LAO2.js";import"./chunk-YIIUQD3W.js";import"./chunk-O4LA4Y65.js";import"./chunk-PHDNNWYC.js";import"./chunk-AVXGOFU5.js";import{a as en}from"./chunk-HMD4ATWS.js";import"./chunk-LC4GL6BY.js";import"./chunk-G2JVMJ3D.js";import{a as on}from"./chunk-6BH2GX4Q.js";import"./chunk-XOPTNUOX.js";import"./chunk-DJZAAY4T.js";import"./chunk-SAPQUNLO.js";import"./chunk-YIVFDWR5.js";import"./chunk-3KU65WUI.js";import"./chunk-7O7PHN7K.js";import{a as rn}from"./chunk-5ANCYTWX.js";import"./chunk-WLKADQ3E.js";import"./chunk-724R5KMW.js";import{c as tn,e as nn}from"./chunk-HFDXKP4Z.js";import"./chunk-LFPISLJZ.js";import{d as Yi,f as Qi,h as Ki,l as Zi}from"./chunk-DSJSYB4E.js";import"./chunk-C2G5RE3R.js";import"./chunk-ZDN44GWA.js";import"./chunk-FEWKE2AH.js";import{a as Ri}from"./chunk-QL4VJ2QL.js";import{a as Gi,c as Ui}from"./chunk-3A6DKDFQ.js";import{b as dn}from"./chunk-J4S7XH45.js";import{b as cn,d as fn,e as mn,h as pn,j as _n}from"./chunk-QCKRDW7H.js";import"./chunk-LVMYCT45.js";import{a as wi}from"./chunk-IBQCDLEK.js";import{b as ln}from"./chunk-H7ZIX4WS.js";import{j as $i}from"./chunk-77ARB4HB.js";import"./chunk-CS2MJ5M3.js";import"./chunk-UDSQAHHB.js";import"./chunk-3U3VC64T.js";import"./chunk-SK4CP6Z3.js";import{A as hi,w as Ci}from"./chunk-OJTNZT7X.js";import{o as an}from"./chunk-Z3QG2G4P.js";import"./chunk-SVCKQJI6.js";import"./chunk-F3KOJE4Y.js";import{f as tt}from"./chunk-QPZXNIK5.js";import"./chunk-JARYQ55D.js";import{d as St}from"./chunk-NKRSYQ4J.js";import{b as Vi}from"./chunk-EMKBJTNV.js";import{F as xe,M as Di,f as Ai,i as Pi}from"./chunk-3RYN32BS.js";import"./chunk-UN3O3IFS.js";import"./chunk-OFYW6MS4.js";import{c as Bi}from"./chunk-3OTOMHWL.js";import"./chunk-PD36SD65.js";import"./chunk-IFE2GPQA.js";import{b as Ni}from"./chunk-ZKLPADAU.js";import"./chunk-U6RKU7UR.js";import{a as ki}from"./chunk-NRM2Y3YH.js";import"./chunk-EY2234XP.js";import"./chunk-HGY444TQ.js";import"./chunk-374JJROF.js";import{d as Xi}from"./chunk-BGJSVAYQ.js";import"./chunk-TPT3AOKO.js";import"./chunk-AKKGC67F.js";import{e as zi,f as Hi}from"./chunk-AAQHVPE7.js";import"./chunk-N5ZVBAC3.js";import{k as Li}from"./chunk-7NE5STKW.js";import"./chunk-PKFQHFDT.js";import"./chunk-ZZ6M2MPT.js";import"./chunk-LONKHYJH.js";import"./chunk-7DTBIKTL.js";import"./chunk-X5XZKHM4.js";import"./chunk-MGWK276X.js";import"./chunk-MQOEUPCL.js";import{b as Wi}from"./chunk-UNOJGYF4.js";import"./chunk-LBMIAQTB.js";import"./chunk-FFDINKHJ.js";import"./chunk-WTROLLFK.js";import{b as qi}from"./chunk-53FVLSRN.js";import"./chunk-JFK4CL5R.js";import{a as bi}from"./chunk-W6MVXLEZ.js";import"./chunk-FU5DPTK3.js";import"./chunk-PXSA72QB.js";import"./chunk-26CMXKXW.js";import"./chunk-QBR4LE3E.js";import"./chunk-KP2MTX2A.js";import{a as ne}from"./chunk-NW6LBU3S.js";import{b as ji}from"./chunk-QTVHWLHH.js";import"./chunk-NSYF4DJO.js";import"./chunk-FLXVTRWX.js";import"./chunk-RPKUPHGZ.js";import"./chunk-VID4LFWM.js";import"./chunk-DUY7LPKV.js";import"./chunk-JOUNBJPT.js";import{b as xi}from"./chunk-QQSOXE3U.js";import{a as Ee}from"./chunk-UQRH6SIV.js";import"./chunk-UW6RJTNO.js";import"./chunk-UMK5M6L6.js";import"./chunk-VBZC6THA.js";import{b as Si,c as ke}from"./chunk-Q2W4NJLV.js";import{a as Ze}from"./chunk-6JNSDIBG.js";import{c as ve}from"./chunk-4OFYAGOL.js";import{d as Je,e as et,f as Oi,g as Ti,j as ht,o as Ii,r as Mi,s as yi,w as Fi,z as be}from"./chunk-DLPJWK4L.js";import"./chunk-GF4LZVAY.js";import"./chunk-IB7PDLZR.js";import"./chunk-CW2OZJHE.js";import{i as ie,m as Se}from"./chunk-RTONOUWN.js";import"./chunk-TZLCZWSJ.js";import"./chunk-XC22UET4.js";import"./chunk-QY63XGLG.js";import"./chunk-7YHKA44F.js";import"./chunk-PHQDK3CD.js";import"./chunk-6VA3YQYO.js";import"./chunk-PRWO7TOS.js";import"./chunk-GYTVHEQZ.js";import{i as B}from"./chunk-JRSEXRUO.js";import"./chunk-QDUENW5W.js";import"./chunk-WKEDV5IB.js";import"./chunk-I632XHT5.js";import"./chunk-LTX5EWBQ.js";import"./chunk-5SLJO4N5.js";import{a as gi}from"./chunk-K3LPZKPV.js";import{b as H,j as Z,p as Ye}from"./chunk-4R4EGKM3.js";import"./chunk-DUH43RV6.js";import{b as Ke,f as Ei,h as V,i as vi}from"./chunk-LBWFELBH.js";import"./chunk-LVHFRK5S.js";import"./chunk-2C3TBEYH.js";import{b as he,c as fi,d as mi}from"./chunk-P5GCYECX.js";import{a as Pe}from"./chunk-BI5TAYFX.js";import"./chunk-U3OPTH4F.js";import{a as N}from"./chunk-J77BE44H.js";import"./chunk-UBPRZHFC.js";import"./chunk-5WBPRBLT.js";import{F as pi,a as Ce,b as Qe,m as Y,p as Re,q as ai,r as li,s as Ae,t as si,u as gt,v as di,w as Ct,x as ci}from"./chunk-WMK4UHKL.js";import{b as _i,d as ui}from"./chunk-TGY5CREU.js";import{a as A}from"./chunk-R2MTWKGX.js";import"./chunk-QFFBMNNE.js";import"./chunk-H77KB3FH.js";import"./chunk-RL5QFXWK.js";import"./chunk-NEMB4EFY.js";import{Ia as ge,fa as oi,g as ti,ma as ri,o as Xe,p as ue,qa as We,v as qe,z as ii}from"./chunk-QKEHE5CK.js";import{a as ni}from"./chunk-JXQ5ZH4X.js";import{$d as ei,Aa as g,Ac as f,Ad as He,Bb as Ut,Cd as ut,Db as s,E as Pt,Gc as _e,Ha as C,I as z,Ia as h,Id as x,Jd as w,Kc as v,Kd as D,L as kt,Na as fe,O as Nt,Od as we,R as Ge,Sc as F,Ta as I,Uc as ye,Ud as le,V as Ue,Vb as y,Vc as Fe,Wa as Gt,Wb as zt,Xc as S,Yb as me,Zd as R,_b as te,_c as d,_d as b,ca as Dt,f as Rt,g as pt,gd as jt,hd as Xt,he as je,ia as Bt,i
3d as ae,jd as qt,ka as Lt,kd as G,la as ce,m as $e,md as Wt,nd as E,od as O,p as At,pa as Vt,pc as pe,pd as K,qc as m,qd as Yt,rd as Qt,sc as p,sd as Kt,t as _t,tc as ze,td as Zt,uc as Ht,ud as L,v as J,va as ee,vc as X,vd as W,w as de,wa as $t,wc as q,wd as T,xc as _,xd as Jt,yc as a,zc as l}from"./chunk-OG4R3H7L.js";import{a as k,b as U}from"./chunk-CHCY4HII.js";function Ln(i,n){if(i&1){let o=v();a(0,"eld-quantity-details-wrapper",5)(1,"eld-quantity-picker",9),x(2,"unitsLetter"),S("valueChange",function(t){C(o);let r=d(2);return h(r.quantityInputChanged.emit(t.value));}),l()();}if(i&2){let o,e;d(2);let t=T(0),r=T(1);_("hasMaxQuantityError",(o=r.get("quantity"))==null?null:o.getError("max"))("hasMinQuantityError",(e=r.get("quantity"))==null?null:e.getError("min"))("offer",t),s(),_("label",Jt(w(2,8,t.unitSystem)))("disableStepsOnLimitReach",!0)("max",t.quantity)("min",t.minQuantity??1);}}function Vn(i,n){if(i&1&&(a(0,"div",12),F(1,0),x(2,"autoPrecisionCurrency"),l()),i&2){d(3);let o=T(0),e=T(2);s(2),ye(D(2,1,e.discountedPrice,o.pricePerUnit.currency)),Fe(1);}}function $n(i,n){i&1&&f(0,"eld-skeleton",13);}function Gn(i,n){if(i&1&&(a(0,"div",14),F(1,1),x(2,"autoPrecisionCurrency"),l()),i&2){d(3);let o=T(0),e=T(2);s(2),ye(D(2,1,e.discountAmount,o.pricePerUnit.currency)),Fe(1);}}function Un(i,n){if(i&1){let o=v();a(0,"div",16),S("click",function(){C(o);let t=d(3);return h(t.toggleVolumeDiscountSheet());}),f(1,"eld-icon",17),a(2,"div",18),F(3,2),l()();}}function zn(i,n){if(i&1&&(a(0,"div",6)(1,"div",10)(2,"div",11),m(3,Vn,3,4,"div",12)(4,$n,1,0,"eld-skeleton",13),m(5,Gn,3,4,"div",14),l(),m(6,Un,4,0,"div",15),l()()),i&2){let o=d(2),e=T(0),t=T(2);s(3),p(o.platform.browser?3:4),s(2),p(t.discountAmount?5:-1),s(),p(e.volumeDiscounts&&e.volumeDiscounts.length>0?6:-1);}}function Hn(i,n){if(i&1&&f(0,"eld-volume-discount",8),i&2){d(2);let o=T(0),e=T(2);_("discountDetails",e)("discounts",o.volumeDiscounts)("unitSystem",o.unitSystem);}}function jn(i,n){if(i&1){let o=v();a(0,"div",3)(1,"div",4),m(2,Ln,3,10,"eld-quantity-details-wrapper",5),m(3,zn,7,3,"div",6),a(4,"eld-buy-button",7),S("buttonPress",function(){C(o);let t=d();return h(t.buttonClick());}),l(),m(5,Hn,1,3,"eld-volume-discount",8),l()();}if(i&2){let o,e=d(),t=T(0),r=T(1),c=T(2);_("formGroup",r),s(2),p(t.quantity&&t.quantity>1?2:-1),s(),p(c&&t.quantity&&t.quantity>1?3:-1),s(),_("buyNowFormGroup",r)("category",e.CATEGORY.CustomItem)("currentUserProfile",e.currentUserProfile())("discountDetails",c)("offer",t)("quantity",(o=r.get("quantity"))==null?null:o.value),s(),p(e.platform.browser&&t.volumeDiscounts&&t.volumeDiscounts.length>0?5:-1);}}var xt=(()=>{let n=class n{constructor(){this.buyNowFormGroup=b(null),this.currentUserProfile=b(null),this.discountDetails=b.required(),this.offer=b(null),this.userOrderInfo=b(null),this.buttonPress=R(),this.volumeDiscountClick=R(),this.payWithPayPayClick=R(),this.trackScrollToOtherSellers=R(),this.quantityInputChanged=R(),this.platform=g(ge),this.AB_TEST_VARIANT=H,this.CATEGORY=N,this.bottomSheets=g(Ee),this.volumeDiscountBottomSheet=null,this.orderedDiscounts=le(()=>{let e=this.offer();return e?.volumeDiscounts?ki(e.volumeDiscounts,["quantity"],["desc"]):[];});}ngOnDestroy(){this.volumeDiscountBottomSheet?.dismiss();}buttonClick(){this.buyNowFormGroup()?.valid&&this.buttonPress.emit();}toggleVolumeDiscountSheet(){this.volumeDiscountClick.emit(),this.volumeDiscountBottomSheet=this.bottomSheets.display({content:Sn,data:{discounts:this.orderedDiscounts(),offerUnitSystem:this.offer()?.unitSystem}});}scrollToOtherSellers(){ke.scrollToTop("#other-sellers"),this.trackScrollToOtherSellers.emit();}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-item-buy-now-card"]],inputs:{buyNowFormGroup:[1,"buyNowFormGroup"],currentUserProfile:[1,"currentUserProfile"],discountDetails:[1,"discountDetails"],offer:[1,"offer"],userOrderInfo:[1,"userOrderInfo"]},outputs:{buttonPress:"buttonPress",volumeDiscountClick:"volumeDiscountClick",payWithPayPayClick:"payWithPayPayClick",trackScrollToOtherSellers:"trackScrollToOtherSellers",quantityInputChanged:"quantityInputChanged"},decls:4,vars:4,consts:()=>{let e;e="Total";let t;t="Savings";let r;r=" Total: "+"\uFFFD0\uFFFD"+" ";let c;c=" You save: "+"\uFFFD0\uFFFD"+" ";let u;return u="Volume discount",[r,c,u,[3,"formGroup"],[1,"p-5","md:px-6"],[1,"bg-alt-1","block","rounded-lg","px-3.5","py-4",3,"hasMaxQuantityError","hasMinQuantityError","offer"],[1,"my-3.5","flex"],["size","l",3,"buttonPress","buyNowFormGroup","category","currentUserProfile","discountDetails","offer","quantity"],[1,"mt-2.5","block","max-md:hidden",3,"discountDetails","discounts","unitSystem"],["formControlName","quantity","size","xl",3,"valueChange","label","disableStepsOnLimitReach","max","min"],[1,"discount-price-container"],[1,"price"],["aria-label",e,1,"total"],[1,"ml-2","h-8","w-[65px]"],["aria-label",t,1,"saved"],["role","button","tabindex","0",1,"flex","items-center","justify-end","gap-1","md:hidden"],["role","button","tabindex","0",1,"flex","items-center","justify-end","gap-1","md:hidden",3,"click"],["name","discount",1,"text-yellow-1"],[1,"text-secondary","text-sm","underline"]];},template:function(t,r){if(t&1&&(L(0)(1)(2),m(3,jn,6,10,"div",3)),t&2){let c=W(r.offer());s();let u=W(r.buyNowFormGroup());s(),W(r.discountDetails()),s(),p(c&&u?3:-1);}},dependencies:[be,et,Oi,yi,Mi,Wi,B,Ri,wi,un,En,V,tt,ne],styles:["[_nghost-%COMP%]{flex-direction:column;justify-content:flex-start}.discount-price-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:auto}.discount-price-container[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;
3gap:4px}.discount-price-container[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{text-align:right;font-size:20px;font-weight:700}.discount-price-container[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .saved[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:14px}[_nghost-%COMP%] .buy-button .button{font-size:18px;line-height:140%;text-transform:none}eld-quantity-picker[_ngcontent-%COMP%]{--input-autofill-bg: var(--background-base-1);width:100%;margin-bottom:10px}eld-quantity-picker[_ngcontent-%COMP%] .input-wrapper, eld-quantity-picker[_ngcontent-%COMP%] .control, eld-quantity-picker[_ngcontent-%COMP%] input{background-color:var(--background-base-1)!important;border-radius:8px}eld-bottom-sheet[_ngcontent-%COMP%] .discount-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;border-bottom:1px solid var(--divider-border);padding-bottom:14px}eld-bottom-sheet[_ngcontent-%COMP%] .discount-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--text-secondary)}eld-bottom-sheet[_ngcontent-%COMP%] .discount-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--divider-border)}"],changeDetection:0});let i=n;return i;})();function Xn(i,n){if(i&1&&E(0),i&2){let o=d();K(" ",o.humanizedDeliveryAvg()," - ");}}var Ne=(()=>{let n=class n{constructor(){this.deliveryTime=b.required(),this.guaranteedDeliveryTime=b.required(),this.humanizedDeliveryAvg=le(()=>{let e=this.deliveryTime();return e?Qi(e).humanizedDeliveryAvg:null;}),this.showFasterThanGuaranteedRange=le(()=>{let e=this.deliveryTime(),t=this.humanizedDeliveryAvg();return!e?.deliveryTimeMedian||!t?!1:Ki(e.deliveryTimeMedian)<Yi(this.guaranteedDeliveryTime());});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-details-delivery-time"]],inputs:{deliveryTime:[1,"deliveryTime"],guaranteedDeliveryTime:[1,"guaranteedDeliveryTime"]},decls:3,vars:4,template:function(t,r){t&1&&(m(0,Xn,1,1),E(1),x(2,"deliveryTimeLabel")),t&2&&(p(r.showFasterThanGuaranteedRange()?0:-1),s(),K(" ",w(2,2,r.guaranteedDeliveryTime())," "));},dependencies:[Zi],encapsulation:2,changeDetection:0});let i=n;return i;})();var $={Recommended:"Recommended",PriceAsc:"PriceAsc",HighestMs:"HighestMs"};function at(i){let n={offerSortingCriterion:null,isAscending:null};switch(i){case $.PriceAsc:return U(k({},n),{offerSortingCriterion:"Price",isAscending:!0});case $.HighestMs:return U(k({},n),{offerSortingCriterion:"Attribute",isAscending:!1,attributeId:it});default:return n;}}var De=(()=>{let n=class n{transform(e){return e.find(t=>t.id===it&&t.type==="Numeric");}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=me({name:"findSabNumeric",type:n,pure:!0});let i=n;return i;})();function qn(i,n){i&1&&(a(0,"div",5),f(1,"eld-skeleton",6)(2,"eld-skeleton",7),l(),a(3,"div",8),f(4,"eld-skeleton",9)(5,"eld-skeleton",10),l(),a(6,"div",8),f(7,"eld-skeleton",11)(8,"eld-skeleton",12),l(),a(9,"div",13),f(10,"eld-skeleton",6)(11,"eld-skeleton",14),l(),a(12,"div",8),f(13,"eld-skeleton",11)(14,"eld-skeleton",10),l());}function Wn(i,n){if(i&1&&f(0,"eld-order-signals",15),i&2){d(2);let o=T(0);_("orderCounts",o.orderCounts);}}function Yn(i,n){i&1&&(E(0," / "),a(1,"span",28),F(2,3),l());}function Qn(i,n){if(i&1&&(a(0,"div",8)(1,"div",20),E(2),l(),a(3,"div",29),E(4),l()()),i&2){d(2);let o=T(0),e=1;s(2),O(o.tradeEnvironmentValues[e].name),s(2),O(o.tradeEnvironmentValues[e].value);}}function Kn(i,n){if(i&1&&(L(0),x(1,"sabOfferMsUnits"),a(2,"div",19)(3,"div",20),E(4),l(),a(5,"div",17),E(6),x(7,"sabMsValue"),l()()),i&2){let o=n;d(2);let e=T(0),t=D(1,2,e.attributes,o.name);s(4),O(t),s(2),O(D(7,5,o,t));}}function Zn(i,n){if(i&1){let o=v();a(0,"div",27)(1,"button",30),S("click",function(){C(o);let t=d(2);return h(t.descriptionExpanded=!t.descriptionExpanded);}),a(2,"span",31),F(3,4),l(),f(4,"eld-icon",32),l(),a(5,"div",33)(6,"div",34)(7,"div",35),E(8),l()()()();}if(i&2){let o=d(2),e=T(0);s(),pe("aria-expanded",o.descriptionExpanded),s(3),G("-rotate-90",o.descriptionExpanded)("rotate-90",!o.descriptionExpanded),_("size",18),s(),qt("grid-template-rows",o.descriptionExpanded?"1fr":"0fr"),pe("aria-hidden",!o.descriptionExpanded),s(3),O(e.description);}}function Jn(i,n){if(i&1){let o=v();m(0,Wn,1,1,"eld-order-signals",15),a(1,"div",5)(2,"div",16),F(3,0),l(),a(4,"div",17)(5,"span",18),E(6),x(7,"autoPrecisionCurrency"),l(
3),m(8,Yn,3,0),l()(),m(9,Qn,5,2,"div",8),m(10,Kn,8,8,"div",19),x(11,"findSabNumeric"),a(12,"div",13)(13,"div",20),F(14,1),l(),a(15,"div",21)(16,"span",22),E(17),l(),f(18,"eld-icon",23),a(19,"span",24),E(20),x(21,"number"),l(),a(22,"span",25),S("click",function(){C(o);let t=d();return h(t.reviewCountClick.emit());}),E(23),l()()(),a(24,"div",8)(25,"div",20),F(26,2),l(),f(27,"eld-sab-offer-details-delivery-time",26),l(),m(28,Zn,9,10,"div",27);}if(i&2){let o,e,t,r,c=d(),u=T(0);p(c.recentOrdersExperiment?0:-1),s(6),O(D(7,12,u.pricePerUnit.amount,u.pricePerUnit.currency)),s(2),p(u.quantity&&u.quantity>1?8:-1),s(),p(u.tradeEnvironmentValues?9:-1),s(),p((o=w(11,15,u.attributes))?10:-1,o),s(7),O((e=c.user())==null?null:e.username),s(),_("size",14),s(2),K("",D(21,17,(t=c.userOrderInfo())==null?null:t.feedbackScore,"1.0-1"),"%"),s(3),K("(",(r=c.userOrderInfo())==null?null:r.ratingCount,")"),s(4),_("deliveryTime",c.deliveryTime())("guaranteedDeliveryTime",u.guaranteedDeliveryTime),s(),p(u.description&&!c.noContentExperiment()?28:-1);}}var Be=(()=>{let n=class n{constructor(){this.offer=b.required(),this.deliveryTime=b(null),this.userOrderInfo=b(null),this.user=b(null),this.loading=b(!1),this.noContentExperiment=b(!1),this.reviewCountClick=R(),this.abTests=g(Ye),this.descriptionExpanded=!1,this.recentOrdersExperiment=!1;}ngOnInit(){this.recentOrdersExperiment=this.abTests.getTestVariant(Z.IT_RECENT_ORDERS)===H.EXPERIMENT;}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-item-offer-details-inner"]],inputs:{offer:[1,"offer"],deliveryTime:[1,"deliveryTime"],userOrderInfo:[1,"userOrderInfo"],user:[1,"user"],loading:[1,"loading"],noContentExperiment:[1,"noContentExperiment"]},outputs:{reviewCountClick:"reviewCountClick"},decls:3,vars:2,consts:()=>{let e;e="Price";let t;t="Seller";let r;r="Delivery time";let c;c=" unit ";let u;return u="Offer description",[e,t,r,c,u,[1,"offer-details-row","flex","h-13.5","flex-wrap","items-center","gap-2"],[1,"block","h-5","w-16","flex-1"],[1,"block","h-7","w-24"],[1,"offer-details-row","flex","flex-wrap","items-center","gap-2"],[1,"block","h-5","w-20","flex-1"],[1,"block","h-5","w-32"],[1,"block","h-5","w-24","flex-1"],[1,"block","h-5","w-24"],[1,"offer-details-row","flex","flex-wrap","items-center","gap-2","md:hidden"],[1,"block","h-5","w-40"],[1,"block","px-2.5","pt-4","pb-3","sm:px-6",3,"orderCounts"],[1,"text-secondary","md:text-primary","min-w-fit","flex-1","text-base"],[1,"wrap-anywhere"],[1,"text-xl","font-bold"],[1,"default-row","offer-details-row","flex","flex-wrap","items-center","gap-2"],[1,"text-secondary","min-w-fit","flex-1","text-base"],[1,"flex","items-center","wrap-anywhere"],[1,"mr-1"],["name","badge",1,"text-emerald",3,"size"],[1,"mr-1","ml-2"],[1,"text-link","cursor-pointer",3,"click"],[1,"text-base","wrap-anywhere",3,"deliveryTime","guaranteedDeliveryTime"],[1,"border-divider","border-b","md:hidden"],[1,"text-sm"],[1,"value","wrap-anywhere"],[1,"offer-details-row","flex","w-full","cursor-pointer","items-center","justify-between","gap-1","py-2",3,"click"],[1,"text-base"],["name","sign-right",1,"transition-transform","duration-300",3,"size"],[1,"grid","transition-[grid-template-rows]","duration-300"],[1,"overflow-hidden"],[1,"text-secondary","px-4","pt-2","pb-4","text-base","whitespace-pre-wrap"]];},template:function(t,r){t&1&&(L(0),m(1,qn,15,0)(2,Jn,29,20)),t&2&&(W(r.offer()),s(),p(r.loading()?1:2));},dependencies:[Ne,B,Mn,V,ne,qe,nt,ot,De],styles:[".offer-details-row[_ngcontent-%COMP%]{min-height:42px;padding:4px 14px;border-bottom:1px solid var(--divider-border)}.offer-details-row[_ngcontent-%COMP%]:last-of-type{border-bottom:none}@media(min-width:961px){.offer-details-row[_ngcontent-%COMP%]:last-of-type{border-bottom:1px solid var(--divider-border)}}@media(min-width:601px){.offer-details-row[_ngcontent-%COMP%]{padding:4px 24px}}.value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:400;font-size:12px;line-height:14px}"],changeDetection:0});let i=n;return i;})();var eo=["descriptionText"];function to(i,n){if(i&1){let o=v();a(0,"eld-button",6),S("buttonClick",function(){C(o);let t=d(2);return h(t.readMoreToggle());}),l();}if(i&2){let o=d(2);_("text",o.readMoreButtonText);}}function io(i,n){if(i&1&&(a(0,"div",1)(1,"div",2)(2,"span",3),E(3),l(),a(4,"p",4,0),E(6),l(),m(7,to,1,1,"eld-button",5),l()()),i&2){let o=d();s(3),O(o.OFFER_DESCRIPTION_LABEL),s(),G("description-collapsed",o.isDescriptionPartlyHidden)("description-expanded",!o.isDescriptionPartlyHidden),s(2),O(o.description()),s(),p(o.showReadMoreButton?7:-1);}}var Ot=(()=>{let n=class n{constructor(){this.descriptionRef=ei("descriptionText"),this.title=b(),this.description=b(),this.readMoreClick=R(),this.cdr=g(je),this.OFFER_TITLE_LABEL="Offer title",this.OFFER_DESCRIPTION_LABEL="Offer description",this.READ_MORE_TEXT="Read more",this.READ_LESS_TEXT="Read less",this.isDescriptionPartlyHidden=!0,this.readMoreButtonText=this.READ_MORE_TEXT,this.showReadMoreButton=!1;}ngAfterViewChecked(){let e=this.descriptionRef()?.nativeElement;if(!e)return;let t=e.scrollHeight>e.offsetHeight,r=this.isDescriptionPartlyHidden?t:!0;r!==this.showReadMoreButton&&(this.showReadMoreButton=r,this.cdr.detectChanges());}readMoreToggle(){if(this.isDescriptionPartlyHidden=!this.isDescriptionPartlyHidden,!this.isDescriptionPartlyHidden){this.readMoreButtonText=this.READ_LESS_TEXT,this.readMoreClick.emit();return;}this.readMoreButtonText=this.READ_MORE_TEXT;}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-description"]],viewQuery:function(t,r){t&1&&jt(r.descriptionRef,eo,5),t&2&&Xt();},inputs:{title:[1,"title"],description:[1,"description"]},outputs:{readMoreClick:"readMoreClick"},decls:1,vars:1,consts:[["descriptionText",""],[1,"offer-description-card"],[1,"section"],[1,"label"],[1,"description"],["size","s","theme","secondary",1,"mt-2","w-fit",3,"text"],["size","s","theme","secondary",1,"mt-2","w-fit",3,"buttonClick","text"]],template:function(t,r){t&1&&m(0,io,8,7,"div",1),t&2&&p(r.description()?0:-1);},dependencies:[Ze],styles:[".offer-description-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:24px;background-color:var(--color-base-1);border-radius:8px;box-shadow:var(--shadow-base)}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.label[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:.16px;color:var(--text-secondary)}@media(min-width:961px){.label[_ngcontent-%COMP%]{font-size:16px}}.title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;line-height:1.5;letter-spacing:.16px;color:var(--text-primary)}@media(min-width:961px){.title[_ngcontent-%COMP%]{font-size:16px}}.description[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:1.5;color:var(--text-primary);white-space:pre-wrap;margin:0}@media(min-width:961px){.description[_ngcontent-%COMP%]{font-size:16px}}.description-collapsed[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.description-expanded[_ngcontent-%COMP%]{overflow:visible;-webkit-line-clamp:unset}"],changeDetection:0});let i=n;return i;})();var se=(()=>{let n=class n{constructor(){this.analytics=g(Se),this.category=N.CustomItem;}trackFilterOpened(e,t){this.trackEvent("filter_opened",{game_id:t,category:this.category,filter_type:e});}trackFilterApplied(e,t,r){this.trackEvent("filter_applied",{game_id:r,category:this.category,filter_type:e,filter_value:t});}
3trackClickChangeFilter(e,t,r,c){this.trackEvent("click_change_filter",{game_id:e,category:this.category,trade_environment_name:t,filter_name:r,filter_value:c});}trackEvent(e,t){this.analytics.trackEvent({name:e,params:t,deliveryMethod:ie.STANDARD});}};n.ɵfac=function(t){return new(t||n)();},n.ɵprov=ee({token:n,factory:n.ɵfac,providedIn:"root"});let i=n;return i;})();function no(i,n){if(i&1&&(a(0,"span",4),E(1),l()),i&2){d(2);let o=T(0);s(),O(o);}}function oo(i,n){if(i&1&&(a(0,"div",0)(1,"div",2)(2,"p",3),E(3),l(),m(4,no,2,1,"span",4),l(),f(5,"eld-icon",5),l()),i&2){let o=d(),e=T(0);s(3),O(o.title()),s(),p(e?4:-1),s(),_("size",18);}}function ro(i,n){if(i&1&&(a(0,"div",1)(1,"span",6),E(2),l(),a(3,"div",7)(4,"span",8),E(5),l(),f(6,"eld-icon",9),l()()),i&2){let o=d(),e=T(0);s(2),O(o.title()),s(3),O(e);}}var Le=(()=>{let n=class n{constructor(){this.title=b(),this.value=b(),this.variant=b("dropdown");}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-mobile-filter-button"]],inputs:{title:[1,"title"],value:[1,"value"],variant:[1,"variant"]},decls:3,vars:2,consts:[[1,"card-container"],[1,"flex","flex-col","gap-1"],[1,"card-content"],[1,"card-title"],[1,"card-value"],["name","sign-right",3,"size"],[1,"text-base"],[1,"dropdown-trigger"],[1,"trigger-text"],["name","chevron-down",1,"text-input-text-placeholder"]],template:function(t,r){t&1&&(L(0),m(1,oo,6,3,"div",0)(2,ro,7,2,"div",1)),t&2&&(W(r.value()),s(),p(r.variant()==="card"?1:2));},dependencies:[B],styles:[".dropdown-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;min-height:3rem;padding:.75rem .875rem;border-radius:var(--corner-medium);background:var(--input-bg-default);cursor:pointer}.dropdown-trigger[_ngcontent-%COMP%]:hover{box-shadow:inset 0 0 0 2px var(--divider-border)}.trigger-text[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px;margin:0 10px;height:62px;cursor:pointer;background-color:var(--background-card);border-radius:4px}.card-content[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;height:100%;gap:10px}.card-title[_ngcontent-%COMP%]{font-size:18px;line-height:22px;color:var(--text-primary)}.card-value[_ngcontent-%COMP%]{display:flex;align-items:center;width:fit-content;background:var(--background-base-1);border-radius:4px;padding:3px 10px;height:100%}"],changeDetection:0});let i=n;return i;})();var Ve=(()=>{let n=class n{constructor(){this.isOpenSubject=new pt(!1),this.selectedFilterIndexSubject=new pt(null),this.isOpen$=this.isOpenSubject.asObservable(),this.selectedFilterIndex$=this.selectedFilterIndexSubject.asObservable();}open(e=null){this.selectedFilterIndexSubject.next(e),this.isOpenSubject.next(!0);}close(){this.isOpenSubject.next(!1);}};n.ɵfac=function(t){return new(t||n)();},n.ɵprov=ee({token:n,factory:n.ɵfac,providedIn:"root"});let i=n;return i;})();var Fn=(()=>{let n=class n{transform(e,t){return t.find(r=>r.value===e)?.label||"";}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=me({name:"selectedLabel",type:n,pure:!0});let i=n;return i;})();var wn=(i,n)=>n.value;function ao(i,n){if(i&1){let o=v();a(0,"button",5),S("click",function(){C(o);let t=d();return h(t.resetExpandedFilter());}),f(1,"eld-icon",6),l();}}function lo(i,n){if(i&1){let o=v();a(0,"eld-sab-mobile-filter-button",11),x(1,"selectedLabel"),S("click",function(){C(o);let t=d(2);return h(t.expandFilter(0,t.firstFilterName()));}),l();}if(i&2){let o=d(2);_("title",o.firstFilterName())("value",D(1,2,o.level0Value(),o.level0Options()));}}function so(i,n){if(i&1){let o=v();a(0,"eld-sab-mobile-filter-button",11),x(1,"selectedLabel"),S("click",function(){C(o);let t=d(2);return h(t.expandFilter(1,t.secondFilterName()));}),l();}if(i&2){let o=d(2);_("title",o.secondFilterName())("value",D(1,2,o.level1Value(),o.level1Options()));}}function co(i,n){if(i&1){let o=v();a(0,"div",7),m(1,lo,2,5,"eld-sab-mobile-filter-button",8),m(2,so,2,5,"eld-sab-mobile-filter-button",8),l(),a(3,"eld-modal-actions",9)(4,"eld-button",10),S("buttonClick",function(){C(o);let t=d();return h(t.onViewResults());}),l()();}if(i&2){let o=d();s(),p(o.level0Options().length>0?1:-1),s(),p(o.level1Options().length>0?2:-1),s(),_("showDivider",!1);}}function fo(i,n){if(i&1){let o=v();a(0,"div",13),S("click",function(){let t=C(o).$implicit,r=d(2);return h(r.selectFilterOption(0,t.value));}),E(1),l();}if(i&2){let o=n.$implicit,e=d(2);G("bg-alt-1",e.level0Value()===o.value),pe("aria-selected",e.level0Value()===o.value),s(),K(" ",o.label," ");}}function mo(i,n){if(i&1&&(a(0,"eld-scroller"),X(1,fo,2,4,"div",12,wn),l()),i&2){let o=d();s(),q(o.level0Options());}}function po(i,n){if(i&1){let o=v();a(0,"div",13),S("click",function(){let t=C(o).$implicit,r=d(2);return h(r.selectFilterOption(1,t.value));}),E(1),l();}if(i&2){let o=n.$implicit,e=d(2);G("bg-alt-1",e.level1Value()===o.value),pe("aria-selected",e.level1Value()===o.value),s(),K(" ",o.label," ");}}function _o(i,n){if(i&1&&(a(0,"eld-scroller"),X(1,po,2,4,"div",12,wn),l()),i&2){let o=d();s(),q(o.level1Options());}}var Rn=(()=>{let n=class n{constructor(){this.analyticsService=g(se),this.firstFilterName=I(""),this.secondFilterName=I(""),this.expandedFilterIndex=I(null),this.level0Value=I(null),this.level1Value=I(null),this.level0Options=I([]),this.level1Options=I([]),this.titleText=le(()=>{let e=this.expandedFilterIndex();return e===null?"Filters":e===0?this.firstFilterName():this.secondFilterName();}),this.filterOptions=[],this.gameId="",this.dismiss=()=>{};}setData(e){this.filterOptions=e.filterOptions,this.gameId=e.gameId,this.firstFilterName.set(e.firstFilterName),this.secondFilterName.set(e.secondFilterName),this.level0Value.set(e.level0Value),this.level1Value.set(e.level1Value),this.expandedFilterIndex.set(e.initialExpandedIndex),this.buildLevel0Options(),e.level0Value&&this.updateLevel1Options(e.level0Value);}registerDismiss(e){this.dismiss=e;}onViewResults(){this.dismiss({level0:this.level0Value(),level1:this.level1Value()});}expandFilter(e,t){this.expandedFilterIndex.set(e),this.analyticsService.trackFilterOpened(t,this.gameId);}resetExpandedFilter(){this.expandedFilterIndex.set(null);}selectFilterOption(e,t){let r=this.getFilterValueLabel(t),c=e===0?this.firstFilterName():this.secondFilterName();this.analyticsService.trackFilterApplied(c,r,this.gameId),e===0?(this.level0Value.set(t),this.updateLevel1Options(t),this.level1Options().some(M=>M.value===this.level1Value())||this.level1Value.set(this.level1Options()[0]?.value??null)):this.level1Value.set(t),this.expandedFilterIndex.set(null);}buildLevel0Options(){this.level0Options.set(this.filterOptions.map(e=>({label:e.name,value:e.attributeValueId})));}updateLevel1Options(e){let t=this.filterOptions.find(r=>r.attributeValueId===e);this.level1Options.set((t?.attributeValues??[]).map(r=>({label:r.name,value:r.attributeValueId})));}getFilterValueLabel(e){let t=this.filterOptions.find(r=>r.attributeValueId===e);if(t)return t.name;for(let r of this.filterOptions){let c=r.attributeValues?.find(u=>u.attributeValueId===e);if(c)return c.name;}return"";}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-filters-modal"]],decls:10,vars:3,consts:()=>{let e;e="Back to filters";let t;t="Close";let r;return r="View results",[[1,"relative","flex","items-center","justify-center","px-3.5","py-3"],["type","button","aria-label",e,1,"absolute","left-3.5","cursor-pointer"],[1,"text-base","font-bold","capitalize"],["type","button","aria-label",t,1,"absolute","right-3.5","cursor-pointer",3,"click"],["name","close"],["type","button","aria-label",e,1,"absolute","left-3.5","cursor-pointer",3,"click"],["name","sign-left"],[1,"flex","flex-col","gap-2.5"],["variant","card",3,"title","value"],[3,"showDivider"],["size","l","text",r,1,"w-full",3,"buttonClick"],["variant","card",3,"click","title","value"],["role","option",1,"text-primary","cursor-pointer","px-3.5","py-3","text-base",3,"bg-alt-1"],["role","option",1,"text-primary","cursor-pointer","px-3.5","py-3","text-base",3,"click"]];},template:function(t,r){t&1&&(a(0,"eld-medium-modal-layout")(1,"div",0),m(2,ao,2,0,"button",1),a(3,"h2",2),E(4),l(),a(5,"button",3),S("click",function(){return r.dismiss();}),f(6,"eld-icon",4),l()(),m(7,co,5,3)(8,mo,3,0,"eld-scroller")(9,_o,3,0,"eld-scroller"),l()),t&2&&(s(2),p(r.expandedFilterIndex()!==null?2:-1),s(2),O(r.titleText()),s(3),p(r.expandedFilterIndex()===null?7:r.expandedFilterIndex()===0?8:r.expandedFilterIndex()===1?9:-1));},dependencies:[Ze,B,bi,xi,Le,qi,Fn],encapsulation:2,changeDetection:0});let i=n;return i;})();var Q="SabOfferFilters",Tt={filterOptions:[],filterOptionsLoading:!1,filterOptionsError:null,storedParams:null};var Oe=Ce(`[${Q}] Load Filter Options`,Qe()),lt=Ce(`[${Q}] Load Filter Options Success`,Qe()),st=Ce(`[${Q}] Load Filter Options Failure`,Qe()),Te=Ce(`[${Q}] Reset Filter Options`),Ie=Ce(`[${Q}] Other Offers Empty Result`);var dt=ai(Q),It=Re(dt,i=>i.filterOptions),tl=Re(dt,i=>i.filterOptionsLoading),il=Re(dt,i=>i.filterOptionsError),ct=Re(dt,i=>i.storedParams);function uo(i,n){if(i&1){let o=v();a(0,"div",4)(1,"span",3),E(2),l(),a(3,"eld-dropdown",5),S("opened",function(){C(o);let t=d(2);return h(t.trackFilterOpened(t.firstFilterName()));}),l()();}if(i&2){let o=d(2);s(2),O(o.firstFilterName()),s(),_("clearable",!1)("formControl",o.filterForm.controls.level0)("options",o.level0Options)("searchable",o.level0Options.length>10);}}function go(i,n){if(i&1){let o=v();a(0,"div",4)(1,"span",3),E(2),l(),a(3,"eld-dropdown",5),S("opened",function(){C(o);let t=d(2);return h(t.trackFilterOpened(t.secondFilterName()));}),l()();}if(i&2){let o=d(2);s(2),O(o.secondFilterName()),s(),_("clearable",!1)("formControl",o.filterForm.controls.level1)("options",o.level1Options)("searchable",o.level1Options.length>10);}}function Co(i,n){if(i&1&&(a(0,"div",2)(1,"div",3),F(2,0),l(),m(3,uo,4,5,"div",4),m(4,go,4,5,"div",4),l()),i&2){let o=d();s(3),p(o.level0Options.length>0?3:-1),s(),p(o.level1Options.length>0?4:-1);}}function ho(i,n){i&1&&(a(0,"div",2),f(1,"eld-skeleton",6),a(2,"div",4),f(3,"eld-skeleton",7)(4,"eld-skeleton",8),l(),a(5,"div",4),f(6,"eld-skeleton",9)(7,"eld-skeleton",8),l()());}var Mt=(()=>{let n=class n{constructor(){this.selectionChange=R(),this.destroyRef=g(fe),this.store=g(Y),this.mobileFiltersService=g(Ve),this.bottomSheets=g(Ee),this.cdr=g(je),this.analyticsService=g(se),this.firstFilterName=I(""),this.secondFilterName=I(""),this.level0Options=[],this.level1Options=[],this.filterForm=new Ti({level0:new ht(null),level1:new ht(null)}),this.filterOptions$=this.store.select(It),this.offerDetails$=this.store.select(xe).pi
3pe(J(e=>e.offer)),this.filterOptions=[],this.gameId="",this.isFirstLoad=!0;}ngOnInit(){this.setupLevel0Changes(),this.setupFormValueChanges(),this.subscribeToStore(),this.subscribeToMobileFiltersService();}subscribeToMobileFiltersService(){de([this.mobileFiltersService.isOpen$,this.mobileFiltersService.selectedFilterIndex$]).pipe(z(([e])=>e),A(this.destroyRef)).subscribe(([e,t])=>{this.openFiltersModal(t);});}openFiltersModal(e){this.bottomSheets.display({content:Rn,data:{filterOptions:this.filterOptions,level0Value:this.filterForm.controls.level0.value,level1Value:this.filterForm.controls.level0.value,firstFilterName:this.firstFilterName(),secondFilterName:this.secondFilterName(),initialExpandedIndex:e,gameId:this.gameId},onDismiss:t=>{this.mobileFiltersService.close(),t&&(this.filterForm.patchValue({level0:t.level0,level1:t.level1},{emitEvent:!1}),this.selectionChange.emit([t.level0,t.level1].filter(Boolean)));}});}subscribeToStore(){let e=this.store.select(xe).pipe(J(t=>t.offer),z(t=>!!t),Ue((t,r)=>t.id===r.id));e.pipe(A(this.destroyRef)).subscribe(t=>{this.isFirstLoad=!0,this.gameId=t.gameId;let r=this.buildParams(t);this.store.dispatch(Oe({params:r}));}),de([e,this.store.select(It),this.store.select(ct)]).pipe(z(([t,r,c])=>{if(r.length===0||!c)return!1;let u=this.buildParams(t);return u.gameId===c.gameId&&u.tradeEnvironmentValue0===c.tradeEnvironmentValue0&&u.tradeEnvironmentValue1===c.tradeEnvironmentValue1&&u.tradeEnvironmentValue2===c.tradeEnvironmentValue2;}),A(this.destroyRef)).subscribe(([t,r])=>{this.filterOptions=r,this.setFilterNames(t),this.buildLevel0Options(),this.cdr.detectChanges(),this.isFirstLoad&&(this.setDefaultSelections(t),this.isFirstLoad=!1);});}setFilterNames(e){let t=this.getOrderedOfferAttributes(e);this.firstFilterName.set(t[0]?.name),this.secondFilterName.set(t[1]?.name);}buildParams(e){return{gameId:e.gameId,attributesLevels:[oe,re],tradeEnvironmentValue0:e.tradeEnvironmentValues?.[0]?.value||"",tradeEnvironmentValue1:e.tradeEnvironmentValues?.[1]?.value||"",tradeEnvironmentValue2:e.tradeEnvironmentValues?.[2]?.value||""};}buildLevel0Options(){this.level0Options=this.filterOptions.map(e=>({label:e.name,value:e.attributeValueId}));}setDefaultSelections(e){if(this.filterOptions.length===0)return;let t=e.attributes.find(r=>r.id===oe)?.values[0]?.id??this.filterOptions[0]?.attributeValueId;if(t){this.filterForm.patchValue({level0:t},{emitEvent:!1}),this.updateLevel1Options(t),this.cdr.detectChanges();let r=e.attributes.find(c=>c.id===re)?.values[0]?.id??this.level1Options[0]?.value??null;r&&this.filterForm.patchValue({level1:r},{emitEvent:!1});}this.isFirstLoad=!1;}setupLevel0Changes(){this.filterForm.get("level0")?.valueChanges.pipe(Lt(this.filterForm.get("level0")?.value),Dt(),A(this.destroyRef)).subscribe(([e,t])=>{if(t&&t!==e){this.updateLevel1Options(t);let r=this.filterForm.value.level1;if(!this.level1Options.some(u=>u.value===r)){let u=this.level1Options[0]?.value||null;this.filterForm.patchValue({level1:u},{emitEvent:!1});}this.cdr.detectChanges();}});}updateLevel1Options(e){let t=this.filterOptions.find(r=>r.attributeValueId===e);this.level1Options=(t?.attributeValues||[]).map(r=>({label:r.name,value:r.attributeValueId}));}setupFormValueChanges(){this.filterForm.valueChanges.pipe(A(this.destroyRef)).subscribe(e=>{this.isFirstLoad||(setTimeout(()=>this.trackDesktopFilterApplied(e)),this.selectionChange.emit([e.level0,e.level1].filter(Boolean)));});}async trackFilterOpened(e){let t=await _t(this.offerDetails$);t&&this.analyticsService.trackFilterOpened(e,t.gameId);}async trackDesktopFilterApplied(e){let t=await _t(this.offerDetails$);if(!t)return;let r=this.level0Options.find(Me=>Me.value===e.level0)?.label||"",c=this.level1Options.find(Me=>Me.value===e.level1)?.label||"",M=this.getOrderedOfferAttributes(t).map(Me=>Me.name).filter(Boolean).join(", "),j=[r,c].filter(Boolean).join(", ");this.analyticsService.trackFilterApplied(M,j,t.gameId);}getOrderedOfferAttributes(e){return[e.attributes.find(t=>t.id===oe),e.attributes.find(t=>t.id===re)].filter(t=>!!t);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-filters"]],outputs:{selectionChange:"selectionChange"},decls:5,vars:3,consts:()=>{let e;return e="Select your options:",[e,[1,"hidden","md:block"],[1,"flex","w-full","max-w-full","flex-col","gap-2.5"],[1,"text-base"],[1,"flex","flex-col","gap-1"],["bindLabel","label","bindValue","value",3,"opened","clearable","formControl","options","searchable"],[1,"block","h-5","w-32"],[1,"block","h-6","w-16"],[1,"block","h-10","w-full"],[1,"block","h-6","w-20"]];},template:function(t,r){if(t&1&&(L(0),x(1,"async"),a(2,"div",1),m(3,Co,5,2,"div",2)(4,ho,8,0,"div",2),l()),t&2){let c=w(1,1,r.filterOptions$);s(3),p(c!=null&&c.length?3:4);}},dependencies:[be,et,Ii,ji,V,ue],encapsulation:2,changeDetection:0});let i=n;return i;})();var An=(()=>{let n=class n{constructor(){this.apiService=g(_i);}loadFilterOptions(e){let t=ui(e);return this.apiService.get("v1/item-management/offers-library/nested-attributes",t);}};n.ɵfac=function(t){return new(t||n)();},n.ɵprov=ee({token:n,factory:n.ɵfac,providedIn:"root"});let i=n;return i;})();var Pn=(()=>{let n=class n{constructor(){this.actions$=g(di),this.apiService=g(An),this.store=g(Y),this.loadFilterOptions$=gt(()=>this.actions$.pipe(Ct(Oe),Vt(this.store.select(ct)),ce(([{params:e},t])=>
3this.paramsMatch(e,t)?$e:this.apiService.loadFilterOptions(e).pipe(J(r=>lt({filterOptions:r.nestedAttributes,params:e})),kt(r=>At(st({error:r}))))))),this.showEmptyResultToast$=gt(()=>this.actions$.pipe(Ct(Ie),J(()=>pi({payload:"No offers available with these selections"}))));}paramsMatch(e,t){return t?e.gameId===t.gameId&&e.tradeEnvironmentValue0===t.tradeEnvironmentValue0&&e.tradeEnvironmentValue1===t.tradeEnvironmentValue1&&e.tradeEnvironmentValue2===t.tradeEnvironmentValue2:!1;}};n.ɵfac=function(t){return new(t||n)();},n.ɵprov=ee({token:n,factory:n.ɵfac});let i=n;return i;})();var kn=si(Tt,Ae(Oe,i=>U(k({},i),{filterOptionsLoading:!0,filterOptionsError:null})),Ae(lt,(i,{filterOptions:n,params:o})=>U(k({},i),{filterOptions:n,filterOptionsLoading:!1,storedParams:o})),Ae(st,(i,{error:n})=>U(k({},i),{filterOptionsLoading:!1,filterOptionsError:n})),Ae(Te,()=>Tt));var ft=(()=>{let n=class n{};n.ɵfac=function(t){return new(t||n)();},n.ɵmod=zt({type:n}),n.ɵinj=$t({imports:[li.forFeature(Q,kn),ci.forFeature([Pn])]});let i=n;return i;})();function So(i,n){i&1&&(f(0,"eld-skeleton",6),a(1,"div",7),f(2,"eld-skeleton",8),a(3,"div",9),f(4,"eld-skeleton",10)(5,"eld-skeleton",11),l(),a(6,"div",9),f(7,"eld-skeleton",12)(8,"eld-skeleton",11),l()());}function Eo(i,n){if(i&1){let o=v();f(0,"eld-image",13),x(1,"offerTitle"),a(2,"eld-sab-offer-filters",14),S("selectionChange",function(t){C(o);let r=d(2);return h(r.filterSelectionChange.emit(t));}),l();}if(i&2){let o=d(2),e=T(2);_("alt",w(1,8,e))("assetsType",o.ASSETS.Offers)("filePath",e.mainOfferImage.largeImage)("height",255)("lightbox",0)("priority",!0)("quality",80)("width",255);}}function vo(i,n){if(i&1&&(a(0,"div",1)(1,"div",3),E(2),l(),f(3,"hr",4),a(4,"div",5),m(5,So,9,0)(6,Eo,3,10),l()()),i&2){let o=d(),e=T(2);s(2),O(e.tradeEnvironmentValues[2].value),s(3),p(o.loadingNewOffer()?5:6);}}function bo(i,n){i&1&&f(0,"eld-skeleton",18)(1,"eld-skeleton",19);}function xo(i,n){if(i&1&&(f(0,"eld-image",20),x(1,"offerTitle"),a(2,"div",21)(3,"div",22),E(4),l()()),i&2){let o=d(2),e=T(2);_("alt",w(1,7,e))("assetsType",o.ASSETS.Offers)("filePath",e.mainOfferImage.originalSizeImage)("height",64)("lightbox",0)("width",64),s(4),O(e.tradeEnvironmentValues[2].value);}}function Oo(i,n){if(i&1){let o=v();a(0,"div")(1,"div",15),m(2,bo,2,0)(3,xo,5,9),l(),a(4,"eld-sab-item-offer-details-inner",16),S("reviewCountClick",function(){C(o);let t=d();return h(t.reviewCountClick.emit());}),l(),a(5,"eld-sab-offer-filters",17),S("selectionChange",function(t){C(o);let r=d();return h(r.filterSelectionChange.emit(t));}),l()();}if(i&2){let o=d(),e=T(2);s(2),p(o.loadingNewOffer()?2:3),s(2),_("deliveryTime",o.deliveryTime())("loading",o.loadingNewOffer())("noContentExperiment",o.noContentExperiment())("offer",e)("user",o.user())("userOrderInfo",o.userOrderInfo());}}function To(i,n){if(i&1){let o=v();a(0,"eld-sab-offer-description",23),x(1,"offerTitle"),S("readMoreClick",function(){C(o);let t=d();return h(t.readMoreClick.emit());}),l();}if(i&2){d();let o=T(2);_("description",o.description)("title",w(1,2,o));}}var yt=(()=>{let n=class n{constructor(){this.offer=b.required(),this.user=b(null),this.userOrderInfo=b(null),this.deliveryTime=b(null),this.gameHeaderData=b(null),this.loadingNewOffer=b(!1),this.noContentExperiment=b(!1),this.readMoreClick=R(),this.backToAllOffersClick=R(),this.filterSelectionChange=R(),this.reviewCountClick=R(),this.platform=g(ge),this.store=g(Y),this.gallery=g(Ui),this.cloudimageService=g(Ei),this.desktop$=this.store.select(ve),this.CATEGORY=N,this.ASSETS=Ke,Gt(()=>this.loadGalleryOnOfferChange());}loadGalleryOnOfferChange(){let e=this.offer().mainOfferImage,t=new Gi({src:this.cloudimageService.getCloudimageUrl(e.originalSizeImage,Ke.Offers),thumb:this.cloudimageService.getCloudimageUrl(e.smallImage,Ke.Offers)});this.gallery.ref().load([t]);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-details"]],inputs:{offer:[1,"offer"],user:[1,"user"],userOrderInfo:[1,"userOrderInfo"],deliveryTime:[1,"deliveryTime"],gameHeaderData:[1,"gameHeaderData"],loadingNewOffer:[1,"loadingNewOffer"],noContentExperiment:[1,"noContentExperiment"]},outputs:{readMoreClick:"readMoreClick",backToAllOffersClick:"backToAllOffersClick",filterSelectionChange:"filterSelectionChange",reviewCountClick:"reviewCountClick"},features:[He([ne])],decls:7,vars:5,consts:[[1,"offer-details","flex","flex-col","gap-6"],[1,"bg-base-1","shadow-base","rounded-lg","p-0"],[1,"max-md:hidden",3,"description","title"],[1,"p-6","text-2xl"],[1,"border-divider"],[1,"flex","flex-wrap","items-start","gap-5","p-6"],[1,"h-[255px]","w-[255px]","rounded-xl"],[1,"flex","flex-1","flex-col","gap-2.5"],[1,"block","h-5","w-32"],[1,"flex","flex-col","gap-1"],[1,"block","h-6","w-16"],[1,"block","h-10","w-full"],[1,"block","h-6","w-20"],[1,"rounded-xl",3,"alt","assetsType","filePath","height","lightbox","priority","quality","width"],[1,"flex-1",3,"selectionChange"],[1,"border-divider","flex","items-center","gap-4","border-b","px-3.5","py-4"],[3,"reviewCountClick","deliveryTime","loading","noContentExperiment","offer","user","userOrderInfo"],[3,"selectionChange"],[1,"h-16","w-16","rounded-xl"],[1,"h-6","w-40"],[1,"rounded-xl",3,"alt","assetsType","filePath","height","lightbox","width"],[1,"flex","flex-col","items-start","justify-center","gap-1"],[1,"text-xl","font-bold","wrap-anywhere"],[1,"max-md:hidden",3,"readMoreClick","description","title"]],template:function(t,r){if(t&1&&(L(0),x(1,"async"),L(2),a(3,"div",0),m(4,vo,7,2,"div",1)(5,Oo,6,7,"div"),m(6,To,2,4,"eld-sab-offer-description",2),l()),t&2){let c=w(1,2,r.desktop$);s(2),W(r.offer()),s(2),p(c?4:5),s(2),p(r.noContentExperiment()?-1:6);}},dependencies:[Ot,vi,Mt,bn,vn,Be,V,ue,on],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-start;flex-direction:column}.offer-details[_ngcontent-%COMP%]{width:100%}.offer-details-header[_ngcontent-%COMP%]{font-weight:400;font-size:18px;line-height:23px;color:var(--text-primary)}@media(min-width:601px){.offer-details-header[_ngcontent-%COMP%]{font-size:24px;line-height:29px}}.offer-attributes[_ngcontent-%COMP%]{margin-top:10px;color:var(--text-primary)}.offer-seller[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:0;padding-bottom:20px}.offer-seller-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.offer-seller-head[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;font-size:14px;color:var(--brand-marine)}.offer-seller-head[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration:underline}.contact-seller[_ngcontent-%COMP%]{display:flex;margin-top:10px}.offer-details-description[_ngcontent-%COMP%]{position:relative}.offer-details-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{white-space:pre-wrap;color:var(--text-primary)}.offer-details-description[_ngcontent-%COMP%] .read-more[_ngcontent-%COMP%]{display:none}
3.separator[_ngcontent-%COMP%]{margin:0 5px}.read-buttons[_ngcontent-%COMP%]{display:flex}.offer-details-description.description-partly-hidden[_ngcontent-%COMP%] .read-more[_ngcontent-%COMP%]{position:absolute;bottom:0;display:block}.read-more[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .read-less[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;color:var(--brand-marine);cursor:pointer}.read-more[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover, .read-less[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration:underline}.read-less[_ngcontent-%COMP%]{margin-top:15px}.description-partly-hidden[_ngcontent-%COMP%]{max-height:91px;overflow-y:hidden}.first-row[_ngcontent-%COMP%]{width:100%;padding:20px 30px;display:flex;flex-direction:column}@media(min-width:481px){.first-row[_ngcontent-%COMP%]{flex-direction:row}}.extra-images[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-right:10px}.extra-image[_ngcontent-%COMP%]{width:47px;height:48px;display:flex;justify-content:center;align-items:center;overflow:hidden;margin-bottom:4px}.extra-image[_ngcontent-%COMP%]:last-child{margin-bottom:0}.extra-image[_ngcontent-%COMP%] eld-image[_ngcontent-%COMP%]{display:flex;max-height:44px;border-radius:3px;overflow:hidden;opacity:.6;cursor:pointer}.extra-image[_ngcontent-%COMP%] eld-image[_ngcontent-%COMP%]:hover{opacity:1}.zoom-offer-image[_ngcontent-%COMP%]{cursor:pointer}.zoom-offer-image[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:13px;right:13px;color:var(--brand-white);z-index:1}.offer-details-description-wrapper[_ngcontent-%COMP%]{padding:0 30px 20px}.offer-details-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:650px}.delivery-skeleton[_ngcontent-%COMP%]{display:flex}.offer-details[_ngcontent-%COMP%]{width:100%;max-width:100%}.offer-details[_ngcontent-%COMP%] .offer-label{margin-bottom:0!important}.offer-details[_ngcontent-%COMP%] eld-offer-details-header[_ngcontent-%COMP%]{border-bottom:none}@media(min-width:961px){.offer-details[_ngcontent-%COMP%] eld-offer-details-header[_ngcontent-%COMP%]{border-bottom:1px solid var(--divider-border)}}@media(min-width:961px){.offer-details[_ngcontent-%COMP%]{max-width:none}}.offer-details__row[_ngcontent-%COMP%]{min-height:42px;padding:4px 14px}.offer-details__row.default-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.offer-details__row[_ngcontent-%COMP%]:first-child{padding:10px}@media(min-width:601px){.offer-details__row[_ngcontent-%COMP%]:first-child{padding:10px 24px}}.offer-details__row[_ngcontent-%COMP%]:last-child{border-bottom:1px solid var(--divider-border)}@media(min-width:601px){.offer-details__row[_ngcontent-%COMP%]:last-child{border-bottom:none}}@media(min-width:601px){.offer-details__row[_ngcontent-%COMP%]{padding:4px 24px}}.offer-details[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:19px;color:var(--text-secondary)}@media(min-width:961px){.offer-details[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:16px}}.offer-details[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:700;font-size:14px;line-height:140%;letter-spacing:.03em;color:var(--text-primary)}@media(min-width:961px){.offer-details[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:16px}}.offer-details[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:400;font-size:12px;line-height:14px}.offer-details[_ngcontent-%COMP%] .price-row[_ngcontent-%COMP%]{display:flex}.offer-details[_ngcontent-%COMP%] .price-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:18px;font-weight:700;line-height:normal}@media(min-width:961px){.offer-details[_ngcontent-%COMP%] .price-row[_ngcontent-%COMP%]{display:none}}@media(min-width:601px){.offer-details[_ngcontent-%COMP%] .price-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700;font-size:24px;line-height:29px}}.skeleton-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:6px 0;min-height:110px;font-weight:400;font-size:16px;line-height:150%;color:var(--text-secondary);white-space:pre-wrap}.offer-details__row[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding-top:6px}"],changeDetection:0});let i=n;return i;})();var Nn=(()=>{let n=class n{transform(e){switch(e){case $.PriceAsc:return"Cheapest first";
3case $.HighestMs:return"Highest M/s";default:return"Recommended";}}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=me({name:"sabOfferSortLabel",type:n,pure:!0});let i=n;return i;})();var Io=i=>({"bg-yellow-1/[16%] hover:bg-yellow-1/[16%] focus-visible:bg-yellow-1/[16%] border-yellow-1 border-2 px-[11px] py-[9px] font-bold":i}),Mo=i=>({"pl-6 md:pl-5":i});function yo(i,n){if(i&1&&(f(0,"eld-icon",4),x(1,"async")),i&2){let o=d(2);_("size",w(1,1,o.desktop$)?16:20);}}function Fo(i,n){if(i&1){let o=v();a(0,"div",2),S("click",function(t){let r=C(o).$implicit,c=d();return h(c.selectSort(r,t));}),a(1,"div",3),m(2,yo,2,3,"eld-icon",4),a(3,"span",5),E(4),x(5,"sabOfferSortLabel"),l()()();}if(i&2){let o=n.$implicit,e=d().offerSortingCriterion()===o;G("hover:bg-alt-1",!e),_("ngClass",ut(8,Io,e)),s(),_("ngClass",ut(10,Mo,e)),s(),p(e?2:-1),s(2),O(w(5,6,o));}}var Ft=(()=>{let n=class n{constructor(){this.offerSortingCriterion=b.required(),this.sortSelection=R(),this.store=g(Y),this.router=g(We),this.activatedRoute=g(ri),this.destroyRef=g(fe),this.desktop$=this.store.select(ve),this.sortTypes=Object.values($);}ngOnInit(){this.syncSortingWithBrowserHistory();}selectSort(e,t){this.sortSelection.emit(e),t.currentTarget.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"});}syncSortingWithBrowserHistory(){this.router.events.pipe(z(e=>e instanceof oi&&e.navigationTrigger==="popstate"),ce(()=>this.activatedRoute.queryParams.pipe(Bt(1),Ge(1))),A(this.destroyRef)).subscribe(e=>{let t=e.offerSortingCriterion,r=Object.values($).includes(t);this.sortSelection.emit(r?t:$.Recommended);});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-offer-sort"]],inputs:{offerSortingCriterion:[1,"offerSortingCriterion"]},outputs:{sortSelection:"sortSelection"},decls:3,vars:0,consts:[[1,"overflow-scrolling-touch","scrollbar-none","flex","gap-3","overflow-x-auto","sm:m-0","md:gap-4","md:overflow-x-hidden"],["role","button","tabindex","0",1,"border-divider-alt","hover:bg-alt-1","focus-visible:bg-alt-1","box-border","min-w-[48px]","flex-shrink-0","cursor-pointer","rounded-lg","border","px-3","py-2.5","text-base","last:mr-2.5","md:text-sm",3,"hover:bg-alt-1","ngClass"],["role","button","tabindex","0",1,"border-divider-alt","hover:bg-alt-1","focus-visible:bg-alt-1","box-border","min-w-[48px]","flex-shrink-0","cursor-pointer","rounded-lg","border","px-3","py-2.5","text-base","last:mr-2.5","md:text-sm",3,"click","ngClass"],[1,"relative",3,"ngClass"],["name","check",1,"absolute","top-1/2","left-0","-translate-y-1/2",3,"size"],[1,"px-1"]],template:function(t,r){t&1&&(a(0,"div",0),X(1,Fo,6,12,"div",1,Ht),l()),t&2&&(s(),q(r.sortTypes));},dependencies:[ti,B,ue,Nn],encapsulation:2,changeDetection:0});let i=n;return i;})();var wo=(i,n)=>n.id;function Ro(i,n){i&1&&f(0,"eld-skeleton",6);}function Ao(i,n){if(i&1&&X(0,Ro,1,0,"eld-skeleton",6,ze),i&2){let o=d();q(o.skeletonRows);}}function Po(i,n){i&1&&(a(0,"span",10),F(1,3),l());}function ko(i,n){i&1&&(a(0,"span",18),F(1,4),l());}function No(i,n){if(i&1&&(a(0,"eld-tooltip",24,0),f(2,"eld-item-discounts-tooltip-content",25),l(),a(3,"div",26),f(4,"eld-icon",27),l()),i&2){let o=ae(1),e=d().$implicit;s(2),_("discounts",e.volumeDiscounts)("unitSystem",e.unitSystem),s(),_("eldTooltip",o),s(),_("size",20);}}function Do(i,n){if(i&1&&(a(0,"span",22),E(1),x(2,"sabOfferMsUnits"),x(3,"sabMsValue"),l()),i&2){let o=n,e=d().$implicit;s(),O(D(3,4,o,D(2,1,e.attributes,o.name)));}}function Bo(i,n){if(i&1){let o=v();a(0,"div",8),S("click",function(t){let r=C(o),c=r.$implicit,u=r.$index,M=d(2);return M.trackOtherOfferClick(u,c.gameId),h(M.onOtherOfferClick(t,c,u));}),a(1,"div",9),m(2,Po,2,0,"span",10),a(3,"div",11),f(4,"eld-user-profile",12),a(5,"div",13)(6,"span",14),F(7,1),l(),a(8,"div",15),E(9),x(10,"number"),x(11,"unitsLetter"),l()(),L(12),x(13,"sabOfferMsUnits"),L(14),x(15,"findSabNumeric"),a(16,"div",13)(17,"span",14),E(18),l(),a(19,"span",15),E(20),x(21,"sabMsValue"),l()(),a(22,"div",13)(23,"span",14),F(24,2),l(),f(25,"eld-sab-offer-details-delivery-time",16),l(),a(26,"div",17),m(27,ko,2,0,"span",18),a(28,"div",19)(29,"div",20),m(30,No,5,4),a(31,"span",21),E(32),x(33,"autoPrecisionCurrency"),l(
3)(),m(34,Do,4,7,"span",22),x(35,"findSabNumeric"),f(36,"eld-sab-offer-details-delivery-time",23),l()()()()();}if(i&2){let o,e=n.$implicit,t=d(2),r=e.id===t.currentOfferId();G("current-offer",r),s(2),p(r?2:-1),s(),G("shadow-base",!r),s(),_("category",t.CATEGORY.CustomItem)("gameId",e.gameId)("isClickable",!0)("ordersInfo",e.userOrderInfo)("userInfo",e.user),s(5),Yt(" ",w(10,22,e.quantity)," ",w(11,24,e.unitSystem)," ");let c=w(13,26,e.attributes),u=w(15,28,e.attributes);s(9),O(c),s(2),O(D(21,30,u,c)||"-"),s(5),_("deliveryTime",e.deliveryTime)("guaranteedDeliveryTime",e.guaranteedDeliveryTime),s(2),p(r?27:-1),s(3),p(e.volumeDiscounts&&e.volumeDiscounts.length>0?30:-1),s(2),O(D(33,33,e.pricePerUnit.amount,e.pricePerUnit.currency)),s(2),p((o=w(35,36,e.attributes))?34:-1,o),s(2),_("deliveryTime",e.deliveryTime)("guaranteedDeliveryTime",e.guaranteedDeliveryTime);}}function Lo(i,n){if(i&1&&X(0,Bo,37,38,"div",7,wo),i&2){let o=d();q(o.otherOffersList());}}var wt=(()=>{let n=class n{constructor(){this.otherOffersList=b.required(),this.currentOfferId=b(""),this.loading=b(!1),this.navigateToOffer=R(),this.analyticsService=g(Se),this.CATEGORY=N,this.skeletonRows=Array.from({length:10});}onOtherOfferClick(e,t,r){if(t.id===this.currentOfferId())return;e.target.localName!=="a"&&this.navigateToOffer.emit({offer:t,offerIndex:r});}trackOtherOfferClick(e,t){let r=e+2;this.analyticsService.trackEvent({name:"click_item_other_offer",params:{gameId:t,position:r},deliveryMethod:ie.STANDARD});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-other-offers"]],inputs:{otherOffersList:[1,"otherOffersList"],currentOfferId:[1,"currentOfferId"],loading:[1,"loading"]},outputs:{navigateToOffer:"navigateToOffer"},decls:3,vars:1,consts:()=>{let e;e="In stock";let t;t="Delivery Time";let r;r="Current offer";let c;return c="Current offer",[["discountTooltip",""],e,t,r,c,[1,"flex","flex-col","gap-2"],[1,"shadow-base","block","h-22","rounded-lg","md:h-19"],[3,"current-offer"],[3,"click"],[1,"offer-seller-card-container","flex","flex-col","rounded-lg"],[1,"bg-badge-blue-gradient","ml-3.5","self-start","rounded-b-lg","px-2","pb-1","text-sm","font-bold","text-white","md:hidden"],[1,"offer-seller-card","relative","flex","items-center","justify-between","gap-3","p-3","px-4","md:grid","md:items-end","md:gap-4","md:px-6","md:py-4"],["size","small",3,"category","gameId","isClickable","ordersInfo","userInfo"],[1,"desktop--md-2","detail"],[1,"label"],[1,"value"],[1,"value","block","text-base",3,"deliveryTime","guaranteedDeliveryTime"],[1,"self-center","justify-self-end","text-right","md:self-end"],[1,"bg-badge-blue-gradient","absolute","top-0","right-6","hidden","rounded-b-lg","px-2","pt-0.5","pb-1","text-sm","font-bold","text-white","md:flex"],[1,"flex","flex-col","items-end"],[1,"flex","items-center","gap-1"],[1,"text-lg","font-bold","md:text-xl"],[1,"text-primary","text-sm","md:hidden"],[1,"text-secondary","text-sm","md:hidden","md:text-base",3,"deliveryTime","guaranteedDeliveryTime"],["placement","top-right","tooltipStyle","plain"],[3,"discounts","unitSystem"],[1,"discount",3,"eldTooltip"],["name","discount",3,"size"]];},template:function(t,r){t&1&&(a(0,"div",5),m(1,Ao,2,0)(2,Lo,2,0),l()),t&2&&(s(),p(r.loading()?1:2));},dependencies:[Ne,V,rt,B,nn,tn,On,qe,nt,ot,tt,ne,De],styles:[".offer-seller-card-container[_ngcontent-%COMP%]{background:var(--background-base-1)}.offer-seller-card-container[_ngcontent-%COMP%]:hover{background:var(--background-alt-1);box-shadow:var(--shadow-base);transition:all .2s ease;cursor:pointer}.detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.detail[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:14px;line-height:140%;color:var(--text-secondary)}.detail[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:150%;color:var(--text-primary)}.discount[_ngcontent-%COMP%] .icon:before{color:var(--brand-yellow-1)}.current-offer[_ngcontent-%COMP%]{border:2px solid transparent;border-radius:8px;background-image:linear-gradient(0deg,var(--background-base-1),var(--background-base-1)),var(--background-image-badge-blue-gradient);background-origin:padding-box,border-box;background-clip:padding-box,border-box}@media(min-width:961px){.offer-seller-card[_ngcontent-%COMP%]{grid-template-columns:280px 120px 120px 1fr auto}}"],changeDetection:0});let i=n;return i;})();function Vo(i,n){i&1&&_e(0);}function $o(i,n){i&1&&_e(0);}function Go(i,n){i&1&&_e(0);}function Uo(i,n){if(i&1&&(a(0,"div",45),f(1,"eld-skeleton",46)(2,"eld-skeleton"),l()),i&2){let o=n.$implicit;s(2),Wt(o);}}function zo(i,n){if(i&1&&X(0,Uo,3,2,"div",45,ze),i&2){let o=d();q(o.DETAIL_ROW_VALUE_WIDTHS);}}function Ho(i,n){i&1&&(a(0,"div",47),f(1,"eld-skeleton",48),a(2,"div",49),f(3,"eld-skeleton",50)(4,"eld-skeleton",51),l()());}var Dn=(()=>{let n=class n{constructor(){this.DETAIL_ROW_VALUE_WIDTHS=["h-5 w-20","h-5 w-16","h-5 w-24","h-5 w-28","h-5 w-24"];}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-item-offer-skeleton"]],decls:52,vars:4,consts:[["detailRows",""],["userFeedback",""],[1,"game-header"],[1,"game-header-container"],[1,"h-7","w-7"],[1,"ml-2.5","h-5","w-[145px]"],[1,"primary-container","p-0","pt-4","md:px-6"],[1,"hidden","gap-6","md:grid","md:grid-cols-[1fr_444px]","md:justify-between"],[1,"back-button","mb-3.5","block","h-9","sm:mb-4"],["name","chevron-left",1,"text-link",3,"size"],[1,"h-4","w-32"],[1,"bg-base-1","mb-6","grid","grid-cols-2","gap-3","rounded-lg","px-3.5","py-4","sm:mx-6","md:hidden"],[1,"h-12","w-full","rounded-lg"],[1,"gap-6","md:grid","md:grid-cols-[minmax(0,1fr)_444px]","md:justify-between"],[1,"bg-base-1","shadow-base","mb-6","rounded-lg","sm:mx-6","md:contents"],[1,"flex","flex-col","gap-6"],[1,"md:bg-base-1","md:shadow-base","md:rounded-lg"],[1,"hidden","p-6","md:block"],[1,"h-7","w-2/3"],[1,"border-divider","hidden","md:block"],[1,"hidden","flex-wrap","items-start","gap-5","p-6","md:flex"],[1,"h-[255px]","w-[255px]","rounded-xl"],[1,"flex","flex-1","flex-col","gap-2.5"],[1,"block","h-5","w-32"],[1,"flex","flex-col","gap-1"],[1,"block","h-6","w-16"],[1,"block","h-10","w-full"],[1,"block","h-6","w-20"],[1,"md:hidden"],[1,"border-divider","flex","items-center","gap-4","border-b","px-3.5","py-4"],[1,"h-16","w-16","rounded-xl"],[1,"h-6","w-40"],[4,"ngTemplateOutlet"],[1,"bg-base-1","shadow-base","hidden","flex-col","gap-3","rounded-lg","p-6","md:flex"],[1,"h-5","w-44"],[1,"h-4","w-full"],[1,"h-4","w-5
3/6"],[1,"h-4","w-4/6"],[1,"top-27","flex","flex-col","gap-6","self-start"],[1,"md:bg-base-1","md:shadow-base","md:rounded-lg","md:pt-2"],[1,"hidden","md:block"],[1,"p-5","md:px-6","md:pb-6"],[1,"block","h-12","w-full","rounded-lg","md:h-14"],[1,"bg-base-1","shadow-base","flex","flex-col","gap-2.5","rounded-lg","px-4","py-3","max-md:hidden","md:px-6"],[1,"h-4","w-16"],[1,"border-divider","flex","h-13.5","items-center","justify-between","gap-2","border-b","px-4","last:border-b-0","md:px-6"],[1,"h-5","w-20"],[1,"flex","items-center","gap-2.5"],[1,"h-12","w-12","rounded-full"],[1,"flex","flex-col","gap-2"],[1,"h-[17px]","w-[77px]"],[1,"h-[17px]","w-[140px]"]],template:function(t,r){if(t&1&&(a(0,"div",2)(1,"div",3),f(2,"eld-skeleton",4)(3,"eld-skeleton",5),l()(),a(4,"section",6)(5,"div",7)(6,"div",8),f(7,"eld-icon",9)(8,"eld-skeleton",10),l()(),a(9,"div",11),f(10,"eld-skeleton",12)(11,"eld-skeleton",12),l(),a(12,"div",13)(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17),f(17,"eld-skeleton",18),l(),f(18,"hr",19),a(19,"div",20),f(20,"eld-skeleton",21),a(21,"div",22),f(22,"eld-skeleton",23),a(23,"div",24),f(24,"eld-skeleton",25)(25,"eld-skeleton",26),l(),a(26,"div",24),f(27,"eld-skeleton",27)(28,"eld-skeleton",26),l()()(),a(29,"div",28)(30,"div",29),f(31,"eld-skeleton",30)(32,"eld-skeleton",31),l(),te(33,Vo,1,0,"ng-container",32),l()(),a(34,"div",33),f(35,"eld-skeleton",34)(36,"eld-skeleton",35)(37,"eld-skeleton",36)(38,"eld-skeleton",37),l()(),a(39,"div",38)(40,"div",39)(41,"div",40),te(42,$o,1,0,"ng-container",32),l(),a(43,"div",41),f(44,"eld-skeleton",42),l()(),a(45,"div",43),f(46,"eld-skeleton",44),te(47,Go,1,0,"ng-container",32),l()()()()(),te(48,zo,2,0,"ng-template",null,0,we)(50,Ho,5,0,"ng-template",null,1,we)),t&2){let c=ae(49),u=ae(51);s(7),_("size",18),s(26),_("ngTemplateOutlet",c),s(9),_("ngTemplateOutlet",c),s(5),_("ngTemplateOutlet",u);}},dependencies:[B,Xe,V],styles:[".game-header[_ngcontent-%COMP%]{width:100%;background-color:var(--background-alt-1)}.game-header-container[_ngcontent-%COMP%]{max-width:1208px;min-height:56px;padding:7px 10px;display:flex;align-items:center;margin:0 auto;width:100%}@media(min-width:601px){.game-header-container[_ngcontent-%COMP%]{padding:7px 24px}}.back-button[_ngcontent-%COMP%]{display:flex;align-items:center;width:max-content;cursor:default}"],changeDetection:0});let i=n;return i;})();function jo(i,n){if(i&1){let o=v();a(0,"eld-back-button",22),S("backClick",function(t){C(o);let r=d(4);return r.trackBackButtonClick(t),h(r.onBackToAllOffersClick());}),l();}if(i&2){let o=d(4);_("forceBackToAllOffers",!0)("listingQueryParams",o.offersPageQueryParams)("listingUrl",o.gameLandingUrl);}}function Xo(i,n){if(i&1){let o=v();a(0,"div",23),S("click",function(){C(o);let t=d(4);return t.trackBackButtonClick("allOffers"),h(t.onBackToAllOffersClick());}),f(1,"eld-icon",24),a(2,"span"),F(3,1),l()();}i&2&&(s(),_("size",18));}function qo(i,n){if(i&1&&m(0,jo,1,3,"eld-back-button",20)(1,Xo,4,1,"div",21),i&2){let o=d(3);p(o.backNavExperiment?0:1);}}function Wo(i,n){i&1&&f(0,"eld-skeleton",25)(1,"eld-skeleton",25);}function Yo(i,n){if(i&1){let o=v();a(0,"eld-sab-mobile-filter-button",27),S("click",function(){C(o);let t=d(4);return h(t.openMobileFilters(0));}),l();}if(i&2){let o=d(3);_("title",o.offerAttributeIdValues[0].name)("value",o.offerAttributeIdValues[0].value);}}function Qo(i,n){if(i&1){let o=v();a(0,"eld-sab-mobile-filter-button",27),S("click",function(){C(o);let t=d(4);return h(t.openMobileFilters(1));}),l();}if(i&2){let o=d(3);_("title",o.offerAttributeIdValues[1].name)("value",o.offerAttributeIdValues[1].value);}}function Ko(i,n){if(i&1&&(m(0,Yo,1,2,"eld-sab-mobile-filter-button",26),m(1,Qo,1,2,"eld-sab-mobile-filter-button",26)),i&2){let o=d(2);p(o.offerAttributeIdValues[0]?0:-1),s(),p(o.offerAttributeIdValues[1]?1:-1);}}function Zo(i,n){if(i&1&&f(0,"eld-item-value-proposition",28),i&2){let o=d(3);_("isRobloxGame",!0)("offer",o);}}function Jo(i,n){if(i&1&&f(0,"eld-value-proposition",29),i&2){let o=d(3),e=d();_("category",e.CategoryEnum.CustomItem)("offer",o);}}function er(i,n){if(i&1&&m(0,Zo,1,2,"eld-item-value-proposition",28)(1,Jo,1,2,"eld-value-proposition",29),i&2){let o=d(3);p(o.valuePropositionExperiment()?0:1);}}function tr(i,n){i&1&&_e(0);}
3function ir(i,n){if(i&1){let o=v();a(0,"div",9),m(1,qo,2,1),l(),a(2,"div",10),m(3,Wo,2,0)(4,Ko,2,2),l(),a(5,"div",11)(6,"div",12)(7,"eld-sab-offer-details",13),S("backToAllOffersClick",function(){C(o);let t=d(2);return h(t.onBackToAllOffersClick());})("filterSelectionChange",function(t){C(o);let r=d(2);return h(r.updateFilterChange(t));})("readMoreClick",function(){C(o);let t=d(2);return h(t.trackReadMoreClick());})("reviewCountClick",function(){C(o);let t=d(2);return h(t.onSellerReviewCountClick());}),l(),a(8,"div",14)(9,"div",15)(10,"eld-sab-item-offer-details-inner",16),S("reviewCountClick",function(){C(o);let t=d(2);return h(t.onSellerReviewCountClick());}),l(),a(11,"eld-sab-item-buy-now-card",17),S("buttonPress",function(){C(o);let t=d(2);return h(t.onCheckout());}),l(),m(12,er,2,1),l(),a(13,"div",18),te(14,tr,1,0,"ng-container",19),l()()()();}if(i&2){let o=d(),e=d(),t=ae(5);s(),p(e.gameHeaderData()?1:-1),s(2),p(e.offerSwitching()?3:4),s(4),_("deliveryTime",e.deliveryTime())("gameHeaderData",e.gameHeaderData())("loadingNewOffer",e.offerSwitching())("noContentExperiment",e.noContentExperiment())("offer",o)("user",e.user())("userOrderInfo",e.userOrderInfo()),s(3),_("deliveryTime",e.deliveryTime())("loading",e.offerSwitching())("offer",o)("user",e.user())("userOrderInfo",e.userOrderInfo()),s(),_("buyNowFormGroup",e.buyNowFormGroup())("currentUserProfile",e.currentUserProfile())("discountDetails",e.discountDetails())("offer",o)("userOrderInfo",e.userOrderInfo()),s(),p(e.platform.browser?12:-1),s(2),_("ngTemplateOutlet",t);}}function nr(i,n){if(i&1&&(a(0,"div",6)(1,"section",8),m(2,ir,15,21),l()()),i&2){let o=d();s(2),p(n.offerState===o.OFFER_STATUS.Active?2:-1);}}function or(i,n){i&1&&f(0,"eld-sab-item-offer-skeleton");}function rr(i,n){if(i&1){let o=v();a(0,"span",36),S("click",function(){C(o);let t=d(2);return h(t.scrollToOtherSellersSection());}),F(1,3),l();}}function ar(i,n){if(i&1){let o=v();a(0,"eld-item-seller-profile",37),S("reviewCountClick",function(){C(o);let t=d(2);return h(t.onSellerReviewCountClick());})("reviewCountTrackClick",function(){C(o);let t=d(2);return h(t.trackSellerReviewCountClick());}),l();}if(i&2){let o,e,t=d(2);_("canOpenReviews",!t.desktop())("gameId",((o=t.offer())==null?null:o.gameId)??null)("groupRatingCountThousands",t.isCopyFixExperiment)("guaranteedDeliveryTime",((e=t.offer())==null?null:e.guaranteedDeliveryTime)??null)("ordersInfo",t.platform.browser?t.userOrderInfo():null)("userInfo",t.platform.browser?t.user():null);}}function lr(i,n){if(i&1){let o=v();a(0,"eld-user-profile",38),S("reviewCountClick",function(){C(o);let t=d(2);return h(t.onSellerReviewCountClick());})("reviewCountTrackClick",function(){C(o);let t=d(2);return h(t.trackSellerReviewCountClick());}),l();}if(i&2){let o,e=d(2);_("canOpenReviews",!e.desktop())("category",e.CategoryEnum.CustomItem)("gameId",(o=e.offer())==null?null:o.gameId)("groupRatingCountThousands",e.isCopyFixExperiment)("isClickable",!0)("ordersInfo",e.platform.browser?e.userOrderInfo():null)("userInfo",e.platform.browser?e.user():null);}}function sr(i,n){if(i&1&&(a(0,"div",30)(1,"div",31)(2,"span",32),F(3,2),l(),m(4,rr,2,0,"span",33),l(),m(5,ar,1,6,"eld-item-seller-profile",34)(6,lr,1,7,"eld-user-profile",35),l()),i&2){let o=d();s(4),p(o.otherOffers().length>0?4:-1),s(),p(o.recentOrdersExperiment()?5:6);}}function dr(i,n){if(i&1&&(a(0,"p",39),F(1,4),l()),i&2){let o=d(2);s(),ye(o.otherOffersRecordCount()),Fe(1);}}function cr(i,n){i&1&&f(0,"eld-skeleton",40);}function fr(i,n){if(i&1){let o=v();a(0,"eld-pagination",44),Zt("activePageChange",function(t){C(o);let r=d(2);return Kt(r.otherOffersPageIndex,t)||(r.otherOffersPageIndex=t),h(t);}),S("paginationEvent",function(t){C(o);let r=d(2);return h(r.onOtherOffersPageChange(t));}),l();}if(i&2){let o=d(2);_("pageSize",o.otherOffersPageSize)("recordCount",o.otherOffersRecordCount()),Qt("activePage",o.otherOffersPageIndex);}}function mr(i,n){if(i&1){let o=v();a(0,"section",7),m(1,dr,2,1,"p",39)(2,cr,1,0,"eld-skeleton",40),a(3,"eld-sab-offer-sort",41),S("sortSelection",function(t){C(o);let r=d();return h(r.onSortSelection(t));}),l(),a(4,"eld-sab-other-offers",42),S("navigateToOffer",function(t){C(o);let r=d();return h(r.onNavigateToOtherOffer(t));}),l(),m(5,fr,1,3,"eld-pagination",43),l();}if(i&2){let o,e=d();s(),p(e.otherOffersRecordCount()?1:2),s(2),_("offerSortingCriterion",e.offerSortingCriterion),s(),_("currentOfferId",((o=e.offer())==null?null:o.id)??"")("loading",e.otherOffersLoading())("otherOffersList",e.otherOffers()),s(),p(e.otherOffersRecordCount()>e.otherOffersPageSize?5:-1);}}var pr=(()=>{let n=class n{constructor(){this.platform=g(ge),this.router=g(We),this.fb=g(Fi),this.destroyRef=g(fe),this.abTestsService=g(Ye),this.scrollToOfferPosition=g(Si),this.analyticsService=g(Se),this.store=g(Y),this.guestUserService=g(gi),this.itemsApi=g(Li),this.mobileFiltersService=g(Ve),this.sabFilterAnalyticsService=g(se),this.recentlyViewedOfferStorageService=g(en),this.recentlyViewedGamesStorageService=g(Ji),this.quantityAnalyticsService=g(hn),this.userSegmentationSurveyService=g(Et),this.bottomSheets=g(Ee),this.sellerFeedbackBottomSheet=null,this.buyNowFormGroup=I(null),this.currentUserProfile=I(null),this.userProfileLoading=!1,this.discountDetails=I({discountPercentage:0,discountAmount:0,discountedPrice:0}),this.offer=I(null),this.user=I(null),this.userOrderInfo=I(null),this.deliveryTime=I(null),this.pageIndex=1,this.gameHeaderData=I(null),this.isPrivate=null,this.isFeedbackLoading=!1,this.offerTitle=null,this.otherOffers=I([]),this.otherOffersRecordCount=I(0),this.otherOffersPageIndex=I(1),this.offerSortingCriterion=$.Recommended,this.feedback$=this.store.select(mn),this.feedbackLoading$=this.store.select(pn),this.offerDetails$=this.store.select(xe),this.userProfile$=this.store.select(Ci),this.userProfileLoading$=this.store.select(hi),this.library$=this.store.select(Ni),this.valuePropositionExperiment=I(!1),this.recentOrdersExperiment=I(!1),this.noContentExperiment=I(!1),this.offerSwitching=I(!1),this.otherOffersLoading=I(!1),this.desktop=this.store.selectSignal(ve),this.eventParam
3s=null,this.filterChange$=new Rt(),this.skipOtherOffersReload=!1,this.CategoryEnum=N,this.AB_TEST_VARIANT=H,this.OFFER_STATUS=rn,this.FEEDBACK_PAGE_SIZE=bt,this.TRANSPARENT_CITY_BANNER_IMAGES=zi,this.offerImagePath=ni.offerImagePath.fullPath,this.otherOffersPageSize=10,this.backNavExperiment=this.abTestsService.getTestVariant(Z.IT_BACK)===H.EXPERIMENT,this.isCopyFixExperiment=this.abTestsService.getTestVariant(Z.IT_COPY_FIX)===H.EXPERIMENT,this.offersPageQueryParams=this.router.currentNavigation()?.previousNavigation?.finalUrl?.queryParams;}get gameLandingUrl(){let e=this.gameHeaderData();return e?Pe.getLandingUrl(e.seoAlias,e.category,e.legacyUrlId,e.gameId):"";}onBrowserBackPress(){let e=this.offer();e&&this.scrollToOfferPosition.save(e.id);}ngOnInit(){this.guestUserService.sendGuestCheckoutEvent(N.CustomItem),this.platform.browser&&(this.ensureOfferLoaded(),this.initOfferAndProfile(),this.setFeedbackVariables(),this.prepareAnalyticsOfferEventData(),this.subscribeToFilterChanges()),this.abTestsService.getTestVariant(Z.IT_PRODUCT_AA),this.recentOrdersExperiment.set(this.abTestsService.getTestVariant(Z.IT_RECENT_ORDERS)===H.EXPERIMENT),this.noContentExperiment.set(this.abTestsService.getTestVariant(Z.IT_NO_CONTENT)===H.EXPERIMENT),this.userSegmentationSurveyService.displaySurvey();}ngOnDestroy(){this.resetPageState(),this.sellerFeedbackBottomSheet?.dismiss();}onCheckout(){this.offer()&&(this.trackCheckoutClick(),this.goToCheckout());}goToCheckout(){let e=this.offer();if(!e)return;let t=this.router.lastSuccessfulNavigation()?.extras.state?.offerPosition||1;this.store.dispatch(new Pi({offerId:e.id,category:N.CustomItem,gameId:e.gameId,position:t,quantity:this.buyNowFormGroup()?.get("quantity")?.value,guaranteedDeliveryTime:e.guaranteedDeliveryTime}));}onSellerReviewCountClick(e){this.loadUserFeedback(e??this.user()?.id),e?this.sellerReviewCountClick(e):(this.otherSellerOfferDetails=void 0,this.showSellerFeedbackBottomSheet()),this.eventParams&&this.eventTrack("click_seller_review_count",this.eventParams);}onOtherSellerReviewCountClick(e){this.loadUserFeedback(e.user?.id),this.otherSellerOfferDetails=e,this.showSellerFeedbackBottomSheet();}trackCheckoutClick(){this.eventParams&&this.eventTrack("click_buy",this.eventParams);}trackSellerReviewCountClick(){this.desktop()&&this.eventParams&&this.eventTrack("click_seller_review_count",this.eventParams);}goToUserReviews(e){this.store.dispatch(new he({path:[`/users/${e}/reviews`]}));}onBackToAllOffersClick(){let e=this.offer();e&&this.gameHeaderData()&&(this.scrollToOfferPosition.save(e.id),this.backNavExperiment||this.goBackToAllOffers(this.gameLandingUrl,this.offersPageQueryParams));}trackBackButtonClick(e){this.analyticsService.trackEvent({name:"click_back_button",params:{backTo:e},deliveryMethod:ie.STANDARD});}scrollToOtherSellersSection(){ke.scrollToTop("#other-sellers-section");}trackReadMoreClick(){this.eventParams&&this.eventTrack("click_read_more",this.eventParams);}loadUserFeedback(e){e&&this.dispatchLoadUserFeedback(e);}updateFilterChange(e){this.offerSwitching.set(!0),this.filterChange$.next(e);}openMobileFilters(e){this.mobileFiltersService.open(e);}onChangeFiltersClick(){this.trackChangeFilter(),this.mobileFiltersService.open(null);}onNavigateToOtherOffer(e){let t=this.gameHeaderData();if(!t)return;this.skipOtherOffersReload=!0,this.offerSwitching.set(!0);let r=Pe.getOfferUrl(t.seoAlias,t.category,e.offer.id);window.scrollTo({top:0,behavior:"smooth"}),this.store.dispatch(new he({path:[r],extras:{state:{offerPosition:e.offerIndex+1}}}));}onSortSelection(e){this.offerSortingCriterion=e,this.loadOtherOffers(this.getOfferAttributeValueIds());}onOtherOffersPageChange(e){ke.scrollToTop("#other-sellers-section"),this.loadOtherOffers(this.getOfferAttributeValueIds(),e.nextPage),this.analyticsService.trackEvent({name:"click_pagination",params:{gameId:this.offer()?.gameId,category:N.CustomItem,page:e.nextPage,navigationType:e.navigationType},deliveryMethod:ie.STANDARD});}showSellerFeedbackBottomSheet(){this.sellerFeedbackBottomSheet=this.bottomSheets.display({content:yn,data:{feedbackOffer:{sellerInfo:{userOrderInfo:this.otherSellerOfferDetails?.userOrderInfo||this.userOrderInfo(),user:this.otherSellerOfferDetails?.user||this.user()}}}});}getOfferAttributeValueIds(){let e=this.offer();return e?this.getOrderedOfferAttributes(e).filter(t=>t.type==="Select").map(t=>t.values[0]).filter(t=>t!=null).map(t=>
3t.id):[];}loadOtherOffers(e,t=1){let r=this.offer();if(!r)return;this.otherOffersPageIndex.set(t);let c=k(U(k(k({gameId:r.gameId,category:N.CustomItem},e[0]&&{[oe]:e[0]}),e[1]&&{[re]:e[1]}),{tradeEnvironmentValue0:r.tradeEnvironmentValues[0].value,tradeEnvironmentValue1:r.tradeEnvironmentValues[1].value,tradeEnvironmentValue2:r.tradeEnvironmentValues[2].value,pageSize:this.otherOffersPageSize,pageIndex:t,includeDeliveryMedians:!0}),at(this.offerSortingCriterion));this.otherOffersLoading.set(!0),this.itemsApi.getItemGameOffers(c).pipe(A(this.destroyRef)).subscribe({next:u=>{let M=u.results.map(j=>U(k({},j.offer),{deliveryTime:j.deliveryTime,user:j.user,userOrderInfo:j.userOrderInfo}));this.otherOffers.set(M),this.otherOffersRecordCount.set(u.recordCount),this.otherOffersLoading.set(!1);},error:()=>this.otherOffersLoading.set(!1)});}subscribeToFilterChanges(){this.filterChange$.pipe(ce(e=>{let t=this.offer();if(!t)return $e;let r=k(U(k(k({gameId:t.gameId,category:N.CustomItem},e[0]&&{[oe]:e[0]}),e[1]&&{[re]:e[1]}),{tradeEnvironmentValue0:t.tradeEnvironmentValues[0].value,tradeEnvironmentValue1:t.tradeEnvironmentValues[1].value,tradeEnvironmentValue2:t.tradeEnvironmentValues[2].value,pageSize:1,pageIndex:1,includeDeliveryMedians:!0}),at(this.offerSortingCriterion));return this.itemsApi.getItemGameOffers(r).pipe(J(c=>({response:c,attributeValueIds:e})));}),A(this.destroyRef)).subscribe(({response:e,attributeValueIds:t})=>{let r=e.results.find(c=>c.offer.id!==this.offer()?.id);r?this.navigateToMatchingOffer(r.offer):(this.offerSwitching.set(!1),e.results.length===0?this.store.dispatch(Ie()):this.loadOtherOffers(t));});}navigateToMatchingOffer(e){let t=this.gameHeaderData();if(!t)return;let r=Pe.getOfferUrl(t.seoAlias,t.category,e.id);this.store.dispatch(new he({path:[r]}));}sellerReviewCountClick(e){this.loadUserFeedback(e),this.otherSellerOfferDetails=void 0,this.showSellerFeedbackBottomSheet();}resetPageState(){this.store.dispatch(new dn()),this.store.dispatch(new ln()),this.store.dispatch(fn()),this.store.dispatch(Te());}eventTrack(e,t){this.analyticsService.trackEvent({name:e,params:t,deliveryMethod:ie.STANDARD});}trackChangeFilter(){let e=this.offer();if(!e)return;let r=this.getOrderedOfferAttributes(e).map(u=>u.name).filter(Boolean).join(", "),c=e.offerAttributeIdValues?.map(u=>u.value).join(", ")||"";this.sabFilterAnalyticsService.trackClickChangeFilter(e.gameId,e.tradeEnvironmentValues[2]?.name||"",r,c);}goBackToAllOffers(e,t){this.store.dispatch(new he({path:[e],query:k({},t)}));}goToErrorPage(e){this.store.dispatch(new he({path:["error"],query:e}));}dispatchLoadUserFeedback(e){this.store.dispatch(cn({userId:e,params:{cursorV
3alue:vt.cursorValue,cursorColumn:null,pageSize:bt,pageDirection:vt.pageDirection,feedbackRating:null,category:N.CustomItem}}));}getOfferAvailability(e){return e?e.offerState==="Offline"?{status:"unavailable",reason:"offer offline"}:e.offerState!=="Active"?{status:"unavailable",reason:"inactive item offer"}:{status:"available"}:{status:"available"};}handleUnavailableOffer(e,t){let r=this.gameHeaderData();if(fi(this.router.routerState.snapshot.root.queryParams)&&r){this.store.dispatch(mi(r));return;}this.navigateToErrorPage(e,t);}navigateToErrorPage(e,t){let r="The offer is no longer available. Pick another one.",c={category:encodeURIComponent(e.category),gameId:encodeURIComponent(e.gameId),price:encodeURIComponent(e.pricePerUnit.amount),errorMessage:encodeURIComponent(r)};t==="offer offline"?c.headerText=encodeURIComponent("Shop is offline"):t==="inactive item offer"&&(c.headerText=encodeURIComponent("Sorry, offer has been modified"),this.gameHeaderData()&&(c.buttonText=encodeURIComponent("Browse offers"),c.buttonLink=encodeURIComponent(this.gameLandingUrl))),this.goToErrorPage(c);}setFeedbackVariables(){this.feedback$.pipe(z(e=>!!e),A(this.destroyRef)).subscribe(e=>this.feedback=e),this.feedbackLoading$.pipe(A(this.destroyRef)).subscribe(e=>this.isFeedbackLoading=e);}ensureOfferLoaded(){let e=this.router.url.split("?")[0],{offerId:t}=Pe.getOfferUrlComponents(e);this.store.select(xe).pipe(Ge(1)).subscribe(r=>{r?.offer?.id!==t&&this.store.dispatch(new Ai(t));});}initOfferAndProfile(){de([this.offerDetails$,this.library$]).pipe(z(([e,t])=>!!e?.offer&&!!t),Ue(([e],[t])=>e?.offer?.id===t?.offer?.id),A(this.destroyRef)).subscribe(([e,t])=>{if(e?.offer&&t){this.offerSwitching.set(!1);let r=e.offer;this.offer.set(r);let c=t.getByGameIdAndCategory(r.gameId,r.category)??null;this.gameHeaderData.set(c),this.recentlyViewedGamesStorageService.saveGame(r.gameId);let u=this.getOfferAvailability(r);if(u.status==="unavailable"){this.handleUnavailableOffer(r,u.reason);return;}this.valuePropositionExperiment.set(this.abTestsService.getTestVariant(Z.IT_ROBLOX_VP)===H.EXPERIMENT),this.user.set(e.user),this.userOrderInfo.set(e.userOrderInfo),this.deliveryTime.set(e.deliveryTime),this.offerTitle=Bi.getOfferTitle(r),this.initBuyNowForm(r),this.loadUserFeedback(),this.skipOtherOffersReload?this.skipOtherOffersReload=!1:this.loadOtherOffers(this.getOfferAttributeValueIds()),this.saveOfferToRecentlyViewed();}}),this.userProfile$.pipe(z(e=>!!e),A(this.destroyRef)).subscribe(e=>this.currentUserProfile.set(e)),this.userProfileLoading$.pipe(A(this.destroyRef)).subscribe(e=>this.userProfileLoading=e);}initBuyNowForm(e){let t=e.minQuantity??1;e.quantity&&this.buyNowFormGroup.set(this.fb.group({quantity:[t,[Je.required,Je.min(t),Je.max(e.quantity)]],unitPrice:e.pricePerUnit.amount,price:e.pricePerUnit.amount})),this.initDiscountDetails(),this.handleQuantityChanges(),this.subscribeInvalidQuantity();}initDiscountDetails(){this.discountDetails.set({discountedPrice:this.buyNowFormGroup()?.get("price")?.value,discountAmount:0,discountPercentage:0});}handleQuantityChanges(){let e=this.buyNowFormGroup();if(!e)return;let t=e.get("quantity");t&&(this.offer()?.minQuantity&&this.updatePrice(this.offer()?.minQuantity??1),t.valueChanges.pipe(A(this.destroyRef)).subscribe(r=>this.updatePrice(r)));}updatePrice(e){let t=this.offer()?.volumeDiscounts;if(!t)return;let r=Vi(t,e,this.buyNowFormGroup()?.get("unitPrice")?.value);this.discountDetails.set(r),this.buyNowFormGroup()?.get("price")?.setValue(r.discountedPrice);}prepareAnalyticsOfferEventData(){de([this.offerDetails$,this.userProfileLoading$]).pipe(A(this.destroyRef)).subscribe(([e,t])=>{e.offer&&!t&&(this.eventParams=this.generateAnalyticsEventData(e.offer));});}generateAnalyticsEventData(e){let t=[...e.tradeEnvironmentValues].sort((r,c)=>St(r.id)-St(c.id));return{offerId:e.id,category:N.CustomItem,gameId:Number(e.gameId),tradeEnvironments:e.tradeEnvironmentValues,tags:e.offerAttributeIdValues,price:e.pricePerUnit.amount,currency:e.pricePerUnit.currency,sellerId:e.userId,position:this.router.lastSuccessfulNavigation()?.extras.state?.offerPosition||1,TE1:t[0]?.value??null,TE2:t[1]?.value??null,TE3:t[2]?.value??null};}saveOfferToRecentlyViewed(){let e=this.offer();if(!e)return;this.removeSavedSabOffer();let t=e.tradeEnvironmentValues;this.recentlyViewedOfferStorageService.saveOffer(k({gameId:e.gameId,category:e.category,offerId:e.id,pricePerUnitInUSD:e.pricePerUnitInUSD},t?.[2]?.id&&{tradeEnvironmentValue2:t[2].id}));}removeSavedSabOffer(){let e=this.offer();if(!e)return;let{gameId:t,category:r,tradeEnvironmentValues:c}=e,u=c?.[2]?.id;if(!u)return;let M=this.recentlyViewedOfferStorageService.getOffers().find(j=>j.gameId===t&&j.category===r&&j.tradeEnvironmentValue2===u);M&&this.recentlyViewedOfferStorageService.removeOffer(M);}getOrderedOfferAttributes(e){return[e.attributes.find(t=>
3t.id===oe),e.attributes.find(t=>t.id===re)].filter(t=>!!t);}subscribeInvalidQuantity(){this.buyNowFormGroup()?.get("quantity")?.valueChanges.pipe(Nt(()=>Pt(1e3)),A(this.destroyRef),z(Boolean)).subscribe(()=>{let e=this.offer();this.buyNowFormGroup()?.get("quantity")?.invalid&&e&&this.quantityAnalyticsService.trackQuantityError(e.category,e.gameId);});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=y({type:n,selectors:[["eld-sab-item-offer-page"]],hostBindings:function(t,r){t&1&&S("popstate",function(){return r.onBrowserBackPress();},Ut);},features:[He([Et])],decls:7,vars:3,consts:()=>{let e;e="banner background image";let t;t="BACK TO ALL OFFERS";let r;r="Seller";let c;c="Other sellers";let u;return u="All offers ("+"\uFFFD0\uFFFD"+")",[["seller",""],t,r,c,u,["alt",e,3,"bannerImages"],[1,"game-offer-page"],["id","other-sellers-section",1,"primary-container","pt-12"],[1,"primary-container","p-0","pt-4","md:px-6"],[1,"hidden","gap-6","md:grid","md:grid-cols-[1fr_444px]","md:justify-between"],[1,"bg-base-1","mb-6","grid","grid-cols-2","gap-3","rounded-lg","px-3.5","py-4","sm:mx-6","md:hidden"],[1,"gap-6","md:grid","md:grid-cols-[minmax(0,1fr)_444px]","md:justify-between"],[1,"bg-base-1","shadow-base","mb-6","rounded-lg","sm:mx-6","md:contents"],[1,"md:pb-0",3,"backToAllOffersClick","filterSelectionChange","readMoreClick","reviewCountClick","deliveryTime","gameHeaderData","loadingNewOffer","noContentExperiment","offer","user","userOrderInfo"],[1,"top-27","flex","flex-col","gap-6","self-start"],[1,"md:bg-base-1","md:shadow-base","md:rounded-lg","md:pt-2"],[1,"hidden","md:block",3,"reviewCountClick","deliveryTime","loading","offer","user","userOrderInfo"],[3,"buttonPress","buyNowFormGroup","currentUserProfile","discountDetails","offer","userOrderInfo"],[1,"max-md:hidden"],[4,"ngTemplateOutlet"],[1,"mb-3.5","block","h-9","sm:mb-4",3,"forceBackToAllOffers","listingQueryParams","listingUrl"],["role","button","tabindex","0",1,"back-button","mb-3.5","block","h-9","sm:mb-4"],[1,"mb-3.5","block","h-9","sm:mb-4",3,"backClick","forceBackToAllOffers","listingQueryParams","listingUrl"],["role","button","tabindex","0",1,"back-button","mb-3.5","block","h-9","sm:mb-4",3,"click"],["name","chevron-left",1,"text-link",3,"size"],[1,"h-12","w-full","rounded-lg"],[3,"title","value"],[3,"click","title","value"],[1,"block","px-4","pb-4","sm:px-6","sm:pb-6",3,"isRobloxGame","offer"],[1,"block","px-4","pb-4","sm:px-6","sm:pb-6",3,"category","offer"],[1,"bg-base-1","shadow-base","flex","flex-col","gap-2.5","rounded-lg","px-4","py-3","md:px-6"],[1,"text-secon","flex","justify-between"],[1,"text-secondary"],[1,"cursor-pointer","text-base","underline","md:hidden"],[3,"canOpenReviews","gameId","groupRatingCountThousands","guaranteedDeliveryTime","ordersInfo","userInfo"],["size","small",3,"canOpenReviews","category","gameId","groupRatingCountThousands","isClickable","ordersInfo","userInfo"],[1,"cursor-pointer","text-base","underline","md:hidden",3,"click"],[3,"reviewCountClick","reviewCountTrackClick","canOpenReviews","gameId","groupRatingCountThousands","guaranteedDeliveryTime","ordersInfo","userInfo"],["size","small",3,"reviewCountClick","reviewCountTrackClick","canOpenReviews","category","gameId","groupRatingCountThousands","isClickable","ordersInfo","userInfo"],[1,"text-lg","font-bold","max-sm:px-4","sm:mb-4","md:text-xl"],[1,"mb-4","block","h-7","w-40","max-sm:mx-4"],[1,"my-4","block","max-sm:px-4",3,"sortSelection","offerSortingCriterion"],[3,"navigateToOffer","currentOfferId","loading","otherOffersList"],[1,"mt-4",3,"pageSize","recordCount","activePage"],[1,"mt-4",3,"activePageChange","paginationEvent","pageSize","recordCount","activePage"]];},template:function(t,r){if(t&1&&(f(0,"eld-game-offer-header")(1,"eld-banner",5),m(2,nr,3,1,"div",6)(3,or,1,0,"eld-sab-item-offer-skeleton"),te(4,sr,7,2,"ng-template",null,0,we),m(6,mr,6,6,"section",7)),t&2){let c;s(),_("bannerImages",r.TRANSPARENT_CITY_BANNER_IMAGES),s(),p((c=r.platform.browser&&r.offer())?2:3,c),s(4),p(r.otherOffersLoading()||r.otherOffersRecordCount()?6:-1);}},dependencies:[ii,Xe,be,_n,an,Di,$i,Dn,Cn,Hi,B,yt,Be,xt,xn,rt,In,Xi,ft,wt,sn,Tn,Le,Ft,V,gn],styles:["[_nghost-%COMP%]{display:block;padding-bottom:50px;line-height:normal}@media(min-width:1025px){[_nghost-%COMP%]{padding-bottom:150px}}.game-offer-page[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:top center;background-size:100%;width:100%;min-height:490px}.back-button[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;width:max-content}.back-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{letter-spacing:.03em;font-size:12px;font-weight:700;color:var(--text-link)}"],changeDetection:0});let i=n;return i;})();export{pr as SabItemOfferPageComponent};/**i18n:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855*/ 4//# debugId=ed2fbfa0-82dc-556e-8627-e7aae4d5f6d7
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.