PageSourceSearch

https://cdn-mp.dmarket.com/prod/static/chunk-CBX37W4G.js

js dmarket.com collected 2026-09-24 09:43:10 UTC 27,082 bytes, 1 lines download raw bytes

1import{a as rt}from"./chunk-EL6TJPT5.js";import{b as at}from"./chunk-QTNEGV7N.js";import{a as ot}from"./chunk-THR3IH3T.js";import{a as it}from"./chunk-QSBWHB5D.js";import{a as nt}from"./chunk-SVS4NEKZ.js";import{a as q}from"./chunk-VJNXJZA2.js";import"./chunk-L3GRK753.js";import"./chunk-2VU3FAP7.js";import"./chunk-DQTIYKIX.js";import"./chunk-5WK7J4J7.js";import{a as et}from"./chunk-KOCODH7G.js";import{a as tt}from"./chunk-NPCUS4GS.js";import"./chunk-5ZBVBBQV.js";import"./chunk-EGRHWZRV.js";import{b as H}from"./chunk-2LXA6S3C.js";import{a as x}from"./chunk-UOXXNKQG.js";import{a as Ze}from"./chunk-WULVQVO6.js";import"./chunk-IXWCIEBZ.js";import"./chunk-QUYU242Z.js";import"./chunk-EGRHWZRV.js";import"./chunk-S5KJSCGZ.js";import{b as Ke,i as Qe}from"./chunk-CYUA5BPC.js";import"./chunk-YJ6K5RYG.js";import{a as Je}from"./chunk-XSFMF4X2.js";import{g as Xe}from"./chunk-B27ECYZZ.js";import"./chunk-PULQSFXN.js";import{b as ze}from"./chunk-LMZCTOBT.js";import"./chunk-BSKQTWNX.js";import"./chunk-UCMUDDQI.js";import"./chunk-2N6HA2XW.js";import"./chunk-5UR6MYPE.js";import"./chunk-W3IUIJ3O.js";import{e as $e,g as Ye}from"./chunk-XK4COTEC.js";import{l as re,m as qe}from"./chunk-GRHSFXF5.js";import"./chunk-5P32XLDJ.js";import"./chunk-65HJ6XVZ.js";import"./chunk-RIWPQ7MQ.js";import"./chunk-H3QKNTDZ.js";import"./chunk-CTSE7KJZ.js";import"./chunk-JYJTFWLR.js";import"./chunk-WM2AJE2G.js";import"./chunk-ZEHFGYTK.js";import"./chunk-EGRHWZRV.js";import"./chunk-62PU7AVU.js";import"./chunk-V4HZXMQP.js";import"./chunk-46KMFL7A.js";import"./chunk-A72JYMYQ.js";import"./chunk-3LLHS7GX.js";import"./chunk-R7FBI6FH.js";import"./chunk-JNTRY3G2.js";import{c as U}from"./chunk-4BOWCGAG.js";import{d as We}from"./chunk-VWNNN3FM.js";import{l as Ue}from"./chunk-X5BKZFF2.js";import{b as Be}from"./chunk-MAEC2WHL.js";import"./chunk-QVMKGEGH.js";import"./chunk-6K4RRW4O.js";import{E as He}from"./chunk-L3S54EBT.js";import"./chunk-DEY2U3UG.js";import"./chunk-5D3MFCZF.js";import{i as $,j as Y,k as K}from"./chunk-I5EPNETH.js";import"./chunk-YYYPO2AY.js";import{Xa as je,i as Ge}from"./chunk-NPLYHJWT.js";import{R as Le,a as R,m as ae,u as F}from"./chunk-DQCMG7P5.js";import"./chunk-4P64UJ3G.js";import"./chunk-XRRSVFIP.js";import"./chunk-TESBNNM5.js";import"./chunk-OXTXAH2Z.js";import"./chunk-YZJZMDE2.js";import{e as Ve}from"./chunk-42LPZUQ7.js";import"./chunk-3HE6RCYU.js";import"./chunk-XDYCEF6A.js";import"./chunk-GZT7DTI7.js";import{b as Re,h as De}from"./chunk-D7ZWZD6W.js";import"./chunk-YOLZNQ4M.js";import{W as Ne,ga as Ae,ha as Me}from"./chunk-QGNTHXV5.js";import{Ab as o,Cc as A,Dc as M,Ec as be,Fc as T,Fd as y,Gd as b,Ha as C,Ia as S,Ld as ve,Mc as h,N as ge,Oc as a,Rb as D,Rd as B,Ta as O,Wb as xe,Wd as Fe,Xb as k,Xd as Ee,Y as Ce,Ya as he,Yb as Pe,Yc as Oe,bd as c,cd as v,dd as u,ed as ne,fc as Te,fd as ie,fe as ke,gd as oe,ic as we,l as ue,oc as p,pc as Ie,qc as m,sc as ye,ta as Se,tc as G,u as te,uc as L,vc as _,vd as V,wc as l,wd as j,xc as s,xd as g,y as fe,ya as f,yc as w}from"./chunk-HSO33GGI.js";import{a as Z,b as ee}from"./chunk-CJN3JB5D.js";var st="p2p",se=(()=>{class e{#e=f(De);#t=f(Be);get#n(){return this.#t.exchangeApiUrl()}createP2PListing(t){let n={objects:t.objects.map(r=>({type:st,itemId:r.itemId,price:r.price}))};return te(this.#e.post(`${this.#n}/offers`,n))}getFee(t,n){let r=new Re().set("offerType",st).set("sellingPrice",t).set("currency",n);return te(this.#e.get(`${this.#n}/fee`,{params:r}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Se({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ft(e){return e.invalidateQueries({queryKey:Xe.all})}var ct=()=>{let e=f(se),i=f($e);return Ye(()=>({mutationFn:t=>e.createP2PListing(t),onError:t=>{throw t instanceof Error?t:new Error("P2P create listing failed")},onSuccess:()=>ft(i)}))};var gt={LISTING_REJECT_REASON_TRADE_URL_REQUIRED:"Add a valid Steam trade URL to list P2P items.",LISTING_REJECT_REASON_SELLER_NOT_TRADABLE:"Your Steam account can't trade right now. Check for trade holds or Mobile Authenticator restrictions, then try again.",LISTING_REJECT_REASON_UNSUPPORTED_GAME:"This item isn't eligible for P2P. Only supported games can be listed.",LISTING_REJECT_REASON_UNAVAILABLE:"This item is no longer available and can\u2019t be put on sale.",P2P_CLIENT_REQUIRED:"A supported client with trade tracking is required to list P2P items.",P2P_MOBILE_AUTH_TOO_NEW:"Your Steam Mobile Authenticator must be active for 15+ days to list P2P items.",P2P_ITEM_NOT_ELIGIBLE:"This item isn't eligible for P2P. Only supported games can be listed.",P2P_TRADE_HOLD:"This item has an active Steam trade hold and can't be listed yet.",P2P_TRADE_URL_INVALID:"Add a valid Steam trade URL to list P2P items.",P2P_ITEM_NOT_IN_INVENTORY:"This item is no longer in your Steam inventory and can't be listed."};function _t(e){return gt[e]}var Ct={AssetNotFound:"This item is no longer available and can\u2019t be put on sale.",FailedAssetLocked:"This item was received through an exchange and is temporarily locked."}
1,St="Something went wrong. Please try again or contact support.",Q=e=>({itemId:e.itemId??e.ID??"",code:e.code??e.Code??"",message:e.message??e.Message??""}),z=(e,i)=>{let t=_t(e);if(t)return{copyKey:t,rawMessage:i};let n=Ct[e];return n?{copyKey:n,rawMessage:i}:i?{copyKey:void 0,rawMessage:i}:{copyKey:St,rawMessage:""}};var E=(function(e){return e.Idle="idle",e.Submitting="submitting",e.AllSuccess="all-success",e.AllRejected="all-rejected",e.Mixed="mixed",e})(E||{});var xt=()=>["p2pGate","close"],Pt=()=>["p2pGate","createdSummary"],Tt=e=>({count:e}),wt=()=>["p2pGate","rejections"],It=e=>["p2pGate","rejection",e],yt=e=>["p2pGate","gateCopy",e],bt=e=>["p2pGate","rawMessage",e],Ot=(e,i)=>i.itemId;function vt(e,i){if(e&1&&(l(0,"p",3),c(1),s()),e&2){let t=a().$implicit,n=a();_("testId",j(2,Pt)),o(),u(" ",t("{ count, plural, =1 {Item was put on sale successfully. You can manage it in the On Sale section of your Inventory} other{Items were put on sale successfully. You can manage them in the On Sale section of your Inventory} }",g(3,Tt,n.result().createdCount)),". ")}}function Ft(e,i){if(e&1&&(l(0,"span",7),c(1),s()),e&2){let t=a().$implicit;o(),u("",t.title,": ")}}function Et(e,i){if(e&1&&(l(0,"span",6),c(1),s()),e&2){let t=a().$implicit,n=a(2).$implicit;_("testId",g(2,yt,t.itemId)),o(),v(n(t.copyKey))}}function kt(e,i){if(e&1&&(l(0,"span",6),c(1),s()),e&2){let t=a().$implicit;_("testId",g(2,bt,t.itemId)),o(),v(t.rawMessage)}}function Nt(e,i){if(e&1&&(l(0,"li",6),p(1,Ft,2,1,"span",7),p(2,Et,2,4,"span",6)(3,kt,2,4,"span",6),s()),e&2){let t=i.$implicit;_("testId",g(3,It,t.itemId)),o(),m(t.title?1:-1),o(),m(t.copyKey?2:3)}}function At(e,i){if(e&1&&(l(0,"ul",3),G(1,Nt,4,5,"li",6,Ot),s()),e&2){let t=a(2);_("testId",j(1,wt)),o(),L(t.result().rejections)}}function Mt(e,i){if(e&1){let t=T();A(0),l(1,"flow-step-notificator",1)(2,"div",2),p(3,vt,2,5,"p",3),p(4,At,3,2,"ul",3),s(),l(5,"div",4)(6,"button",5),h("click",function(){C(t);let r=a();return S(r.onClose())}),c(7),s()()(),M()}if(e&2){let t=i.$implicit,n=a();o(),_("type",n.notificatorType()),o(2),m(n.hasCreated()?3:-1),o(),m(n.hasRejections()?4:-1),o(2),_("testId",j(5,xt)),o(),u(" ",t("Close")," ")}}var pt=(()=>{class e{constructor(){this.result=Ee.required(),this.closeGate=Fe(),this.STEP_NOTIFICATIONS_TYPES=x,this.P2pGateStateEnum=E,this.hasCreated=B(()=>this.result().createdCount>0),this.hasRejections=B(()=>this.result().rejections.length>0),this.notificatorType=B(()=>this.result().state===E.AllSuccess?x.success:x.warning)}onClose(){this.closeGate.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["p2p-gate-result"]],inputs:{result:[1,"result"]},outputs:{closeGate:"closeGate"},features:[V([{provide:$,useValue:"flows"}])],decls:1,vars:1,consts:[[4,"transloco","translocoPrefix"],[3,"type"],[1,"c-dialogStatus__content"],[1,"c-dialogStatus__text",3,"testId"],[1,"c-dialogStatus__buttons"],["aria-label","Close",1,"c-dialog__button","o-dmButton",3,"click","testId"],[3,"testId"],[1,"c-dialogStatus__text--small"]],template:function(n,r){n&1&&k(0,Mt,8,6,"ng-container",0),n&2&&_("translocoPrefix","flows")},dependencies:[K,Y,H,U],encapsulation:2,changeDetection:0})}}return e})();var Rt=(e,i)=>i.find(t=>t.itemId===e)?.title??"",Dt=(e,i)=>(e.failReason??[]).map(t=>{let n=Q(t),{copyKey:r,rawMessage:d}=z(n.code,n.message);return{itemId:n.itemId,title:Rt(n.itemId,i),copyKey:r,rawMessage:d}}),Gt=(e,i)=>e>0&&i>0?E.Mixed:i>0?E.AllRejected:E.AllSuccess,mt=(e,i)=>{let t=Dt(e,i),n=e.created?.length??e.success?.length??0;return{state:Gt(n,t.length),createdCount:n,rejections:t}};var jt=()=>[import("./chunk-YBO4MIKH.js").then(e=>e.FlowStepHeaderComponent)],Bt=e=>({"c-dialog__body--f2f":e}),dt=e=>({count:e}),le=e=>[e,"goToOnSale"],ce=e=>[e,"close"],$t=e=>[e,"rejectionReason"];function Yt(e,i){if(e&1){let t=T();l(0,"flow-step-header",8),h("close",function(){C(t);let r=a(3);return S(r.closeFlow())}),s()}if(e&2){let t=a(3);_("flowConfig",t.flowConfig)("allowClose",t.currNotificationStep!==t.STEP_NOTIFICATIONS_TYPES.loading)}}function Kt(e,i){e&1&&w(0,"div")}function Ut(e,i){}function Ht(e,i){if(e&1&&(l(0,"flow-step-notificator",5)(1,"div",9)(2,"p",10)(3,"span"),c(4),s()()()()),e&2){let t=a().$implicit,n=a(2);_("type",n.STEP_NOTIFICATIONS_TYPES.loading),o(4),v(t("Publishing sale offers"))}}function qt(e,i){if(e&1){let t=T();l(0,"p2p-gate-result",11),h("closeGate",function(){C(t);let r=a(3);return S(r.closeFlow())}),s()}e&2&&_("result",i)}function Qt(e,i){if(e&1&&c(0),e&2){let t=a(3).$implicit,n=a(2);
1ne(" ",t("{ count, plural, =1 {Face2Face item was put on sale successfully} other{Face2Face items were put on sale successfully} }",g(2,dt,n.totalOffersToCreate)),". ",t("Please proceed with selling items via DMarket bot that remained selected.")," ")}}function zt(e,i){if(e&1&&c(0),e&2){let t=a(3).$implicit;u(" ",t("The chosen items were put on sale successfully. Please proceed with selling the remaining items using different sell option.")," ")}}function Jt(e,i){e&1&&w(0,"f2f-scam-alert")}function Wt(e,i){if(e&1){let t=T();l(0,"button",15),y(1,"async"),h("click",function(){C(t);let r=a(5);return S(r.goToOnSale())}),c(2),s()}if(e&2){let t=a(3).$implicit,n=a(2);_("testId",g(4,le,b(1,2,n.activeSellTypeTab$))),o(2),u(" ",t("Go to On Sale")," ")}}function Xt(e,i){if(e&1){let t=T();l(0,"div",9)(1,"p",10),p(2,Qt,1,4),y(3,"async"),Ie(4,zt,1,1),s(),p(5,Jt,1,0,"f2f-scam-alert"),y(6,"async"),s(),l(7,"div",12),p(8,Wt,3,6,"button",13),l(9,"button",14),h("click",function(){C(t);let r=a(4);return S(r.restartFlow())}),c(10),s()()}if(e&2){let t=a(2).$implicit,n=a(2);o(2),m(b(3,4,n.activeSellTypeTab$)===n.FlowTypeEnum.F2fSell?2:4),o(3),m(b(6,6,n.isF2fFlow)?5:-1),o(3),m(n.isExchangePage?8:-1),o(2),u(" ",t("Sell remaining items")," ")}}function Zt(e,i){e&1&&w(0,"f2f-scam-alert")}function en(e,i){if(e&1){let t=T();l(0,"button",19),y(1,"async"),h("click",function(){C(t);let r=a(5);return S(r.goToOnSale())}),c(2),s()}if(e&2){let t=a(3).$implicit,n=a(2);_("testId",g(4,le,b(1,2,n.activeSellTypeTab$))),o(2),u(" ",t("Go to On Sale")," ")}}function tn(e,i){if(e&1){let t=T();l(0,"div",9)(1,"p",10),c(2),s(),p(3,Zt,1,0,"f2f-scam-alert"),y(4,"async"),s(),l(5,"div",12)(6,"div",16)(7,"dm-trustpilot-button",17),h("clickEvent",function(){C(t);let r=a(4);return S(r.openTrustpilot())}),s(),p(8,en,3,6,"button",18),s()()}if(e&2){let t=a(2).$implicit,n=a(2);o(2),u(" ",t("{ count, plural, =1 {Item was put on sale successfully. You can manage it in the On Sale section of your Inventory} other{Items were put on sale successfully. You can manage them in the On Sale section of your Inventory} }",g(5,dt,n.totalOffersToCreate)),". "),o(),m(b(4,3,n.isF2fFlow)?3:-1),o(5),m(n.isExchangePage?8:-1)}}function nn(e,i){if(e&1&&(l(0,"flow-step-notificator",5),p(1,Xt,11,8)(2,tn,9,7),s()),e&2){let t=a(3);_("type",t.STEP_NOTIFICATIONS_TYPES.success),o(),m(t.allItemsSold?2:1)}}function on(e,i){e&1&&w(0,"f2f-scam-alert")}function an(e,i){if(e&1){let t=T();l(0,"flow-step-notificator",7)(1,"div",9)(2,"p",10),c(3),w(4,"br"),c(5),s(),p(6,on,1,0,"f2f-scam-alert"),y(7,"async"),s(),l(8,"div",12)(9,"button",20),y(10,"async"),h("click",function(){C(t);let r=a(3);return S(r.closeFlow())}),c(11),s(),l(12,"button",21),y(13,"async"),h("click",function(){C(t);let r=a(3);return S(r.goToOnSale())}),c(14),s()()()}if(e&2){let t=a().$implicit,n=a(2);_("type",n.STEP_NOTIFICATIONS_TYPES.progress)("progressConfig",n.progressConfig),o(3),oe(" ",n.responseCreate.success.length," ",t("of")," ",n.totalOffersToCreate," ",t("sale offers were created successfully.")," "),o(2),ie(" ",t("The remained")," ",n.totalOffersToCreate-n.responseCreate.success.length," ",t("are in the selected area")," "),o(),m(b(7,14,n.isF2fFlow)?6:-1),o(3),_("testId",g(20,ce,b(10,16,n.activeSellTypeTab$))),o(2),u(" ",t("Close")," "),o(),_("testId",g(22,le,b(13,18,n.activeSellTypeTab$))),o(2),u(" ",t("Go to On Sale")," ")}}function rn(e,i){if(e&1&&c(0),e&2){let t=a(4).$implicit,n=a();ie(" ",t("and")," ",n.totalLockedAssets()," ",t("more items")," ")}}function sn(e,i){if(e&1&&c(0),e&2){let t=a(4).$implicit;u(" ",t("Please wait a few seconds and try again")," ")}}function ln(e,i){e&1&&w(0,"countdown",26),e&2&&_("endTime",i)("showHours",!1)("alwaysVisible",!0)}function cn(e,i){if(e&1&&p(0,ln,1,3,"countdown",26),e&2){let t,n=a(5);m((t=n.lockedAssetTime())?0:-1,t)}}function _n(e,i){if(e&1){let t=T();l(0,"flow-step-notificator",5),w(1,"i",22),l(2,"p",10),c(3),p(4,rn,1,3),c(5),s(),l(6,"p",23),c(7),s(),l(8,"div",24),p(9,sn,1,1)(10,cn,1,1),s()(),l(11,"div",12)(12,"dm-button",25),h("click",function(){C(t);let r=a(4);return S(r.closeFlow())}),c(13),s()()}if(e&2){let t=a(2).$implicit,n=a(2);_("type",n.STEP_NOTIFICATIONS_TYPES.timeUp),o(3),ne(" ",t("Offer for")," ",n.lockedAssetName()," "),o(),m(n.totalLockedAssets()?4:-1),o(),u(" ",t("can\u2019t be currently created/updated")," "),o(2),u(" ",t("New time limits are applied from now on - after creating/updating an offer, you can make any changes only after the time limit expired")," "),o(2),m(n.lockedAssetSoonMessageShown()?9:10),o(4),u("",t("Cancel")," ")}}function pn(e,i){e&1&&be(0)}function mn(e,i){if(e&1&&k(0,pn,1,0,"ng-container",27),e&2){a();let t=Oe(3);_("ngTemplateOutlet",t)}}function dn(e,i){if(e&1&&(l(0,"span"),c(1),s()),e&2){let t=a(3).$implicit,n=a(2);o(),oe(" ",n.responseCreate.success.length," ",t("of")," ",n.totalOffersToCreate," ",t("sale offers were published successfully. The rest of them could not be published because they have already been bought")," . ")}}function un(e,i){if(e&1&&(l(0,"span",29),c(1),s(),w(2,"br")),e&2){let t=i.$implicit,n=a(7);_("testId",g(2,$t,n.FlowTypeEnum.MarketSell)),o(),v(t)}}function fn(e,i){if(e&1&&G(0,un,3,4,null,null,ye),e&2){let t=a(6);L(t.rejectionReasons())}}function gn(e,i){if(e&1&&(l(0,"span"),c(1),s()),e&2){let t=a(4).$implicit;o(),v(t("Your item(s) wasn\u2019t placed on sale. Please try again."))}}function Cn(e,i){if(e&1&&(l(0,"span"),c(1),s(),w(2,"br"),p(3,fn,2,0)(4,gn,2,1,"span")),e&2){let t=a(3).$implicit,n=a(2);o(),v(t("Something went wrong!")),o(2),m(n.rejectionReasons().length?3:4)}}function Sn(e,i){e&1&&w(0,"f2f-scam-alert")}function hn(e,i){if(e&1){let t=T();l(0,"flow-step-notificator",5)(1,"div",9)(2,"p",10),p(3,dn,2,4,"span"),p(4,Cn,5,2),s(),p(5,Sn,1,0,"f2f-scam-alert"),y(6,"async"),s(),l(7,"div",12)(8,"button",20),h("click",function(){C(t);let r=a(4);return S(r.closeFlow())}),c(9),s(),l(10,"button",28),h("click",function(){C(t);let r=a(4);return S(r.tryAgainSellItems())}),c(11),s()()()}if(e&2){let t=a(2).$implicit,n=a(2);_("type",n.STEP_NOTIFICATIONS_TYPES.warning),o(3),m((n.responseCreate==null||n.responseCreate.success==null?null:n.responseCreate.success.length)>0?3:-1),o(),m(!(!(n.responseCreate==null||n.responseCreate.success==null)&&n.responseCreate.success.length)&&(!(n.responseCreate==null||n.responseCreate.fail==null)&&n.responseCreate.fail.length)?4:-1),o(),m(b(6,7,n.isF2fFlow)?5:-1),o(3),_("testId",g(9,ce,n.FlowTypeEnum.MarketSell)),o(),u(" ",t("Close")," "),o(2),u(" ",t("Try again")," ")}}function xn(e,i){if(e&1&&(p(0,_n,14,8)(1,mn,1,1,"ng-container"),k(2,hn,12,11,"ng-template",null,0,ve)),e&2){let t=a(3);m(t.isAtLeastOneOfferAssetLocked()?0:1)}}function Pn(e,i){if(e&1){let t=T();l(0,"flow-step-notificator",5)(1,"div",9)(2,"p",10)(3,"span"),c(4),s(),w(5,"br"),l(6,"span"),c(7),s()()(),l(8,"div",12)(9,"button",30),h("click",function(){C(t);let r=a(3);return S(r.closeFlow())}),c(10),s()()()}if(e&2){let t=a().$implicit,n=a().$implicit,r=a();_("type",r.STEP_NOTIFICATIONS_TYPES.error),o(4),v(n("Something went wrong.")),o(3),u("",n("Please try again or c
1ontact support"),"."),o(2),_("testId",g(5,ce,r.FlowTypeEnum.MarketSell)),o(),u(" ",t("Close")," ")}}function Tn(e,i){if(e&1&&(A(0),l(1,"div",3),Pe(2,Yt,1,2)(3,Kt,1,0)(4,Ut,0,0),Te(5,2,jt,null,3,4),we(0,-1),l(7,"div",4),y(8,"async"),p(9,Ht,5,2,"flow-step-notificator",5),p(10,qt,1,1,"p2p-gate-result",6),p(11,nn,3,2,"flow-step-notificator",5),p(12,an,15,24,"flow-step-notificator",7),p(13,xn,4,1),p(14,Pn,11,7,"flow-step-notificator",5),s()(),M()),e&2){let t,n=a(2);o(7),_("ngClass",g(9,Bt,b(8,7,n.isF2fFlow))),o(2),m(n.currNotificationStep===n.STEP_NOTIFICATIONS_TYPES.loading?9:-1),o(),m((t=n.p2pGateResult())?10:-1,t),o(),m(!n.p2pGateResult()&&n.currNotificationStep===n.STEP_NOTIFICATIONS_TYPES.success?11:-1),o(),m(n.currNotificationStep===n.STEP_NOTIFICATIONS_TYPES.progress?12:-1),o(),m(n.currNotificationStep===n.STEP_NOTIFICATIONS_TYPES.warning?13:-1),o(),m(n.currNotificationStep===n.STEP_NOTIFICATIONS_TYPES.error&&n.error?14:-1)}}function wn(e,i){e&1&&(A(0),k(1,Tn,15,11,"ng-container",2),M()),e&2&&(o(),_("translocoPrefix","flows"))}var In="#ff6464",yn=e=>{if(!e||e.length===0)return 0;let i=e.map(t=>{let[n,r]=t.Message.split(":").map(Number);return n*60+r});return Math.max(...i)},ao=(()=>{class e extends et{constructor(){super(...arguments),this.setPriceService=f(q),this.notificationsService=f(We),this.flowStateStore=f(Qe),this.sellTypeTabsService=f(tt),this.cdr=f(ke),this.sellFlowAnalyticsService=f(nt),this.router=f(Ge),this.hotjarService=f(qe),this.exchangeTabsUpdatesService=f(Je),this.googleAnalyticsService=f(ze),this.#e=f(Ue),this.#t=ct(),this.STEP_NOTIFICATIONS_TYPES=x,this.FlowTypeEnum=F,this.loading=!1,this.currNotificationStep=x.loading,this.totalOffersToCreate=0,this.isExchangePage=!1,this.activeSellTypeTab$=this.sellTypeTabsService.activeSellTypeTab$,this.allItemsSold=!1,this.isAtLeastOneOfferAssetLocked=O(!1),this.lockedAssetName=O(""),this.totalLockedAssets=O(0),this.lockedAssetTime=O(null),this.lockedAssetSoonMessageShown=O(!1),this.p2pSubmitting=O(!1),this.p2pGateResult=O(null),this.rejectionReasons=O([]),this.isF2fFlow=this.flowStateStore.getActiveState().pipe(fe(t=>t.flow===F.F2fSell))}#e;#t;ngOnInit(){this.isExchangePage=this.router.url.includes(ot),this.sellItems()}ngOnDestroy(){this.flowStateStore.resetCustomFlowDialogHeader(),this.flowStateStore.resetCustomFlowDialogHeaderClasses()}sellItems(){if(!this.checkFlowDataItems())return;if(this.isP2pSellFlow()){this.sellP2pItems();return}let t=this.flowStateStore.cachedState().items.user;this.setCurrentNotificationStep(x.loading),this.totalOffersToCreate=t.length;let n=this.flowStateStore.cachedState().startItems.user[0]??t[0],r=n?He(n):Le.GameTypeEnum.Steam,d=this.isManageOffersFlow();(d?this.setPriceService.updateOffers({objects:q.buildOffersToUpdate(t)}):this.setPriceService.createOffers({objects:q.buildOffersToCreate(t)})).pipe(ge(P=>(this.error=P,this.sendFailSellFlowAnalytics(P?.message??P.toString(),this.flowStateStore.cachedState().items.user),this.initHotjarSuccessPoll(d),this.setCurrentNotificationStep(x.error),ue)),Ce(()=>this.cdr.detectChanges())).subscribe(P=>{if(this.sellFlowAnalyticsService.sellItemsSuccess(P,r,t,d),this.responseCreate=P,this.allItemsSold=this.areAllItemsSold(P),this.rejectionReasons.set(this.buildRejectionReasons(P)),P.fail&&P.fail.length){let ut=this.flowStateStore.cachedState().items.user.filter(I=>P.fail.includes(I.offerId??I.itemId));this.sendFailSellFlowAnalytics("",ut);let _e=P.failReason.filter(I=>I.Code==="FailedAssetLocked"),pe=this.flowStateStore.cachedState().items.user.filter(I=>_e.find(X=>X.ID===(I.offerId??I.itemId))),me=!!pe.length;this.isAtLeastOneOfferAssetLocked.set(me),me&&(this.flowStateStore.setCustomFlowDialogHeader("offer"),this.flowStateStore.setCustomFlowDialogHeaderClasses("text-orange-350"));let J=pe.map(({title:I})=>I),W=4;this.lockedAssetName.set(J.slice(0,W).join(", ")),J.length>W&&this.totalLockedAssets.set(J.length-W);let de=yn(_e);if(de===0)this.lockedAssetSoonMessageShown.set(!0);else{let I=new Date().getTime(),X=Math.round(I/1e3+de);this.lockedAssetTime.set(X)}}this.manageCreateResponse(d)})}tryAgainSellItems(){if(!this.checkFlowDataItems())return;let t=this.flowStateStore.cachedState().items;t.user=t.user.filter(n=>this.responseCreate.fail.includes(n.itemId)),this.flowStateStore.updateState({items:t}).subscribe(),this.sellItems()}goToOnSale(){this.closeFlow(ae.Offers)}openTrustpilot(){this.completeStep$.emit()}closeFlow(t){let n=this.getSuccessfullyProcessedIds(this.responseCreate),r=this.buildCompleteFlowData(n,t);n.length?this.completeFlow$.emit(r):this.endFlow$.emit()}restartFlow(){if(this.responseCreate.success&&this.responseCreate.success.length){let t=this.flowStateStore.cachedState().startItems.user.filter(r=>!this.responseCreate.success.includes(r.itemId)),n={flowStartSource:Ke.AnotherFlow,startItems:{[R.user]:t,[R.market]:[]}};
1this.completeFlow$.emit({preventRefreshInventories:!1,newFlowType:F.MarketSell,startConfig:n})}}isP2pSellFlow(){return this.flowStateStore.cachedState().flow===F.P2pSell}sellP2pItems(){let t=this.flowStateStore.cachedState().items.user;this.totalOffersToCreate=t.length,this.p2pGateResult.set(null),this.p2pSubmitting.set(!0),this.setCurrentNotificationStep(x.loading);let n=t.map(d=>({itemId:d.itemId,price:{amount:d.price.amount,currency:d.price.currency}})),r=t.map(d=>({itemId:d.itemId,title:d.title}));this.#t.mutateAsync({objects:n}).then(d=>this.handleP2pResponse(d,r)).catch(()=>{this.p2pSubmitting.set(!1),this.error={code:"P2P_CREATE_FAILED",message:"P2P create listing failed"},this.setCurrentNotificationStep(x.error)})}handleP2pResponse(t,n){this.p2pSubmitting.set(!1);let r=mt(t,n);this.allItemsSold=r.rejections.length===0,this.p2pGateResult.set(r),this.setCurrentNotificationStep(x.success)}isManageOffersFlow(){return this.flowStateStore.cachedState().flow===F.OffersManage}areAllItemsSold(t){return this.getSuccessfullyProcessedIds(t).length===this.flowStateStore.cachedState().startItems.user.length}getSuccessfullyProcessedIds(t){return t&&t.success&&t.success.length?this.responseCreate.success:[]}buildCompleteFlowData(t,n){return{preventRefreshInventories:!1,newFlowState:this.buildNewFlowState(t),newExchangeTab:n}}buildNewFlowState(t){let n=this.flowStateStore.cachedState(),r=n.startItems.user,d={[R.user]:r.filter(N=>this.isItemSuccessfullyProcessed(N,t)),[R.market]:[]};return ee(Z({},n),{startItems:d})}isItemSuccessfullyProcessed(t,n){return!n.includes(t.itemId)}setWarningNotificationStep(t){this.setCurrentNotificationStep(x.warning),t||this.hotjarService.initPoll(re.SellFail)}setProgressStep(){this.progressConfig={totalAmount:this.totalOffersToCreate,completedAmount:this.responseCreate.success.length,colorSecondary:In},this.setCurrentNotificationStep(x.progress)}setSuccessStep(t){this.initHotjarSuccessPoll(t),this.setCurrentNotificationStep(x.success),this.exchangeTabsUpdatesService.markAsUpdated(ae.Offers),this.notificationsService.pushNotification({text:this.totalOffersToCreate===1?this.#e.translate("Item was put on sale successfully",{},"flows"):this.#e.translate("Items were put on sale successfully",{},"flows")}),this.sendSuccessSellFlowAnalytics(),this.cdr.detectChanges()}sendSuccessSellFlowAnalytics(){let t=this.flowStateStore.cachedState(),n=F.F2fSell===t.flow,r=this.googleAnalyticsService.prepareSellFlowBasicData(t);for(let d of r)this.googleAnalyticsService.sendSellFlowData(n?"f2f_successfully_put_on_sale":"item_successfully_put_on_sale",d.data,d.flow,d.flowProps)}sendFailSellFlowAnalytics(t,n){let d=F.F2fSell===this.flowStateStore.cachedState().flow?"F2fSell flow errors":"MarketSell flow errors";this.googleAnalyticsService.sendSellFlowData("flow_error",{items:{user:n,market:null}},"sell flow",{flow_error_message:d+" - "+t})}manageCreateResponse(t){let n=this.responseCreate.fail&&this.responseCreate.fail.length>0;this.responseCreate.success&&this.responseCreate.success.length>0&&n?this.setProgressStep():n?this.setWarningNotificationStep(t):this.setSuccessStep(t)}buildRejectionReasons(t){return(t.failReason??[]).map(n=>{let{code:r,message:d}=Q(n),{copyKey:N,rawMessage:P}=z(r,d);return N?this.#e.translate(N,{},"flows"):P}).filter(n=>!!n)}checkFlowDataItems(){return!!this.flowStateStore.cachedState()}setCurrentNotificationStep(t){this.currNotificationStep=t,this.cdr.detectChanges()}initHotjarSuccessPoll(t){t||this.hotjarService.initPoll(re.SellSuccess)}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=he(e)))(r||e)}})()}static{this.\u0275cmp=D({type:e,selectors:[["p2p-publish-on-market"]],features:[V([{provide:$,useValue:"flows"}]),xe],decls:1,vars:0,consts:[["warningBaseNotificationView",""],[4,"transloco"],[4,"transloco","translocoPrefix"],[1,"c-dialog__inner"],[1,"c-dialog__body",3,"ngClass"],[3,"type"],[3,"result"],[3,"type","progressConfig"],[3,"close","flowConfig","allowClose"],[1,"c-dialogStatus__content"],[1,"c-dialogStatus__text"],[3,"closeGate","result"],[1,"c-dialogStatus__buttons"],["aria-label","Go to On Sale",1,"c-dialog__button","o-dmButton",3,"testId"],["aria-label","Sell remaining items",1,"c-dialog__button","o-dmButton","o-dmButton--green",3,"click"],["aria-label","Go to On Sale",1,"c-dialog__button","o-dmButton",3,"click","testId"],[1,"c-dialog__buttons","c-dialog__buttons--vertical"],[3,"clickEvent"],["aria-label","Go to On Sale",1,"c-dialog__button","o-dmButton","o-dmButton--gray",3,"testId"],["aria-label","Go to On Sale",1,"c-dialog__button","o-dmButton","o-dmButton--gray",3,"click","testId"],["aria-label","Close",1,"c-dialog__button","o-dmButton",3,"click","testId"],["aria-label","Go to On Sale",1,"c-dialog__button","o-dmButton","o-dmButton--green",3,"click","testId"],["inlineSVG","icon-clock.svg",1,"o-icon","c-flowStepNotificator__icon","text-orange-350"],[1,"c-dialogStatus__text","c-dialogStatus__text--small","c-dialogStatus__text--gray"],[1,"c-dialogStatus__text--countdown","text-orange-350"],["color","gray","size","fluid","matRipple","",1,"c-dialog__button",3,"click"],[3,"endTime","showHours","alwaysVisible"],[4,"ngTemplateOutlet"],["aria-label","Try again",1,"c-dialog__button","o-dmButton","o-dmButton--green",3,"click"],[3,"testId"],["aria-label","close",1,"c-dialog__button","o-dmButton",3,"click","testId"]],template:function(n,r){n&1&&k(0,wn,2,1,"ng-container",1)},dependencies:[K,Y,Ne,Ae,H,rt,U,it,at,Ze,je,Ve,pt,Me],encapsulation:2,changeDetection:0})}}return e})();export{ao as P2pPublishOnMarketComponent};

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.