1"use strict";(self.webpackChunkclient=self.webpackChunkclient||[]).push([[4363],{83307:(re,I,a)=>{a.d(I,{z:()=>G});var C=a(27969),e=a(98046),r=a(64537);let f=(()=>{class c extends e.AE{constructor(){super(...arguments),this.document=e.Ps` 2 query ( 3 $sellOrderId: ID! 4 $before: String 5 $after: String 6 $first: Int 7 $last: Int 8 ) { 9 sellOrderBids ( 10 sellOrderId: $sellOrderId 11 before: $before 12 after: $after 13 first: $first 14 last: $last 15 ) { 16 pageInfo { 17 hasNextPage 18 hasPreviousPage 19 startCursor 20 endCursor 21 } 22 totalCount 23 edges { 24 node { 25 created 26 bidder { 27 id 28 pk 29 iban 30 accountId 31 } 32 pricePerEyecon 33 currency 34 status 35 id 36 accessible 37 globalPrivacy 38 pk 39 transaction { 40 transactionId 41 } 42 } 43 } 44 } 45 } 46 `}}return c.\u0275fac=function(){let v;return function(x){return(v||(v=r.n5z(c)))(x||c)}}(),c.\u0275prov=r.Yz7({token:c,factory:c.\u0275fac,providedIn:"any"}),c})();var d=a(88692),P=a(21671),D=a(15472);let R=(()=>{class c extends e.mm{constructor(){super(...arguments),this.document=e.Ps` 47 mutation ($pk: ID!) { 48 cancelAcceptedSellOrderBid(pk: $pk) { 49 success 50 errors 51 } 52 } 53 `}}return c.\u0275fac=function(){let v;return function(x){return(v||(v=r.n5z(c)))(x||c)}}(),c.\u0275prov=r.Yz7({token:c,factory:c.\u0275fac,providedIn:"any"}),c})();var w=a(14503),b=a(34501),L=a(29790),N=a(80404),U=a(27339),_=a(48292),T=a(68017),h=a(23345);function E(c,v){1&c&&(r.ynx(0),r._uU(1," | "),r.TgZ(2,"strong"),r._uU(3),r.ALo(4,"translate"),r.qZA(),r.BQk()),2&c&&(r.xp6(3),r.hij("(",r.lcZ(4,1,"MY_BID"),")"))}function J(c,v){if(1&c){const m=r.EpF();r.TgZ(0,"a",7),r.NdJ("click",function(){r.CHM(m);const Z=r.oxw(2).$implicit,O=r.oxw(3);return r.KtG(O.onCancelAcceptedBid(Z))}),r._uU(1),r.ALo(2,"translate"),r.qZA()}2&c&&(r.xp6(1),r.Oqu(r.lcZ(2,1,"CANCEL")))}function q(c,v){if(1&c&&(r.ynx(0),r._uU(1," \xa0 "),r.YNc(2,J,3,3,"a",6),r.BQk()),2&c){const m=r.oxw(4);r.xp6(2),r.Q6J("ngIf",m.isSuperAdmin&&!m.isDeletedEyeventure)}}const F=function(c){return{payForTransaction:c}};function Q(c,v){if(1&c&&(r.TgZ(0,"a",9),r._uU(1),r.ALo(2,"translate"),r.qZA()),2&c){const m=r.oxw(2).$implicit;r.MGl("routerLink","/accounts/",null==m.bidder?null:m.bidder.accountId,""),r.Q6J("queryParams",r.VKq(5,F,m.transaction.transactionId)),r.xp6(1),r.Oqu(r.lcZ(2,3,"PAY"))}}function $(c,v){if(1&c&&(r.ynx(0),r._uU(1," | "),r.YNc(2,Q,3,7,"a",8),r.BQk()),2&c){const m=r.oxw(4);r.xp6(2),r.Q6J("ngIf",!m.isDeletedEyeventure)}}function M(c,v){if(1&c&&(r.TgZ(0,"li"),r._uU(1),r.ALo(2,"translateCurrency"),r.ALo(3,"currency"),r.ALo(4,"translate"),r.ALo(5,"translate"),r.ALo(6,"date"),r.YNc(7,E,5,3,"ng-container",3),r.YNc(8,q,3,1,"ng-container",3),r.YNc(9,$,3,1,"ng-container",3),r.qZA()),2&c){const m=v.$implicit,x=r.oxw(3);r.xp6(1),r.HOy(" ",r.lcZ(2,7,r.gM2(3,9,(m.pricePerEyecon||0)/100,"EUR","symbol","1.2-2"))," ",r.lcZ(4,14,"PER_EYECON")," | ",r.lcZ(5,16,"ON")," ",r.xi3(6,18,m.created,"dd-MM-y h:mm a")," "),r.xp6(6),r.Q6J("ngIf",m.isMyBid),r.xp6(1),r.Q6J("ngIf","BID_ACCEPTED"===x.sellOrder.status&&(null==x.sellOrder.lastActiveBid?null:x.sellOrder.lastActiveBid.pk)===m.pk),r.xp6(1),r.Q6J("ngIf","BID_ACCEPTED"===x.sellOrder.status&&(null==x.sellOrder.lastActiveBid?null:x.sellOrder.lastActiveBid.pk)===m.pk&&m.isMyBid)}}function H(c,v){if(1&c&&(r.TgZ(0,"ul",4),r.YNc(1,M,10,21,"li",5),r.qZA()),2&c){const m=r.oxw().ngIf;r.xp6(1),r.Q6J("ngForOf",m)}}function k(c,v){1&c&&(r.TgZ(0,"p"),r._uU(1),r.ALo(2,"translate"),r.qZA()),2&c&&(r.xp6(1),r.Oqu(r.lcZ(2,1,"NO_BID_FOR_ORDER")))}function j(c,v){if(1&c&&(r.ynx(0),r.YNc(1,H,2,1,"ul",2),r.YNc(2,k,3,3,"p",3),r.BQk()),2&c){const m=v.ngIf;r.xp6(1),r.Q6J("ngIf",m.length),r.xp6(1),r.Q6J("ngIf",!m.length)}}function V(c,v){1&c&&(r.TgZ(0,"p"),r._uU(1),r.ALo(2,"translate"),r.qZA()),2&c&&(r.xp6(1),r.hij("",r.lcZ(2,1,"LOADING_BID_HISTORY"),"..."))}let G=(()=>{class c{constructor(m,x,Z,O,B,W,K,X,z){this.sellOrderBidsFetchingGraphql=m,this.cancelAcceptedSellOrderBidGraphql=x,this.meService=Z,this.confirmDialogService=O,this.translateService=B,this.ngxLoaderService=W,this.errorsService=K,this.toasterService=X,this.eventEmittersService=z,this.isDeletedEyeventure=!1,this.isSuperAdmin=!1}ngOnInit(){this.isSuperAdmin=this.meService.isSuperUser(),this._queryRef=this.sellOrderBidsFetchingGraphql.wat
53ch({sellOrderId:this.sellOrder.pk}),this.sellOrderBids$=this._queryRef.valueChanges.pipe((0,C.U)(m=>m.data.sellOrderBids.edges.map(({node:x})=>{const Z=this.myEyeventureAccounts.some(({pk:O})=>O===x.bidder?.pk);return{...x,isMyBid:Z}})))}onCancelAcceptedBid(m){this.confirmDialogService.openConfirmDialog({verb:this.translateService.instant("CANCEL"),actionName:this.translateService.instant("BID")}).afterClosed().subscribe(x=>{x&&(this.ngxLoaderService.ngxLoading=!0,this.cancelAcceptedSellOrderBidGraphql.mutate({pk:m.pk}).subscribe(({data:Z})=>{const O=Z.cancelAcceptedSellOrderBid;this.ngxLoaderService.ngxLoading=!1,O?.success?(this.toasterService.success(this.translateService.instant("BID_CANCELLED_SUCCESSFULLY")),this.eventEmittersService.reloadSellOrderEventEmitter.emit()):O?.errors&&this.errorsService.showToastForNonFieldErrors(this.errorsService.getNonFieldErrors(O.errors))},Z=>{this.ngxLoaderService.ngxLoading=!1,this.errorsService.showInternalServerError(Z)}))})}}return c.\u0275fac=function(m){return new(m||c)(r.Y36(f),r.Y36(R),r.Y36(w.w),r.Y36(b.D),r.Y36(L.sK),r.Y36(N.b),r.Y36(U.r),r.Y36(_._W),r.Y36(T.r))},c.\u0275cmp=r.Xpm({type:c,selectors:[["app-sell-order-bids"]],inputs:{sellOrder:"sellOrder",myEyeventureAccounts:"myEyeventureAccounts",isDeletedEyeventure:"isDeletedEyeventure"},standalone:!0,features:[r._Bn([f]),r.jDz],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],["class","pl-3",4,"ngIf"],[4,"ngIf"],[1,"pl-3"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"],[3,"routerLink","queryParams",4,"ngIf"],[3,"routerLink","queryParams"]],template:function(m,x){if(1&m&&(r.YNc(0,j,3,2,"ng-container",0),r.ALo(1,"async"),r.YNc(2,V,3,3,"ng-template",null,1,r.W1O)),2&m){const Z=r.MAs(3);r.Q6J("ngIf",r.lcZ(1,2,x.sellOrderBids$))("ngIfElse",Z)}},dependencies:[d.ez,d.sg,d.O5,d.Ov,d.H9,d.uU,P.m,L.X$,h.y,D.Bz,D.yS]}),c})()},96475:(re,I,a)=>{a.d(I,{C:()=>pe});var C=a(8239),e=a(64537),r=a(88692),f=a(20092),d=a(21671),P=a(38023),D=a(54121),R=a(13528),w=a(51927),b=a(98046);let L=(()=>{class i extends b.mm{constructor(){super(...arguments),this.document=b.Ps`mutation ( 54 $eyeventure: ID! 55 $buyer: ID! 56 $amount: Int! 57 $pricePerEyecon: Int! 58 $currency: String! 59 $blpSubdomain: String 60 ) { 61 createBuyOrder ( 62 eyeventure: $eyeventure 63 buyer: $buyer 64 amount: $amount 65 pricePerEyecon: $pricePerEyecon 66 currency: $currency 67 ) { 68 success, 69 errors 70 } 71 }`}}return i.\u0275fac=function(){let p;return function(u){return(p||(p=e.n5z(i)))(u||i)}}(),i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"any"}),i})();var N=a(87075),U=a(35776),_=a(11677),T=a(37979),h=a(8954),E=a(75728),J=a(48292),q=a(29790),F=a(27339),Q=a(96599),$=a(80404),M=a(68017),H=a(19729),k=a(83331);function j(i,p){if(1&i&&(e.TgZ(0,"option",21),e._uU(1),e.qZA()),2&i){const o=p.$implicit;e.Q6J("value",o.pk),e.xp6(1),e.Oqu(o.iban)}}function V(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}function G(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ACCOUNT_MARKETPLACE_OFF_VALIDATION_ERROR_MESSAGE")," "))}function c(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"BUY_ORDER_DRAWER.ACCOUNT_MAXED_OUT_ERROR")," "))}function v(i,p){if(1&i&&(e.TgZ(0,"small",22),e.YNc(1,V,3,3,"strong",23),e.YNc(2,G,3,3,"strong",23),e.YNc(3,c,3,3,"strong",23),e.qZA()),2&i){const o=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.isMarketplaceOn),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.isBalanceMaxedOut)}}function m(i,p){if(1&i&&(e.TgZ(0,"div",16)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"p",17),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"select",18),e.YNc(8,j,2,2,"option",19),e.qZA(),e.YNc(9,v,4,3,"small",20),e.qZA()),2&i){const o=p.ngIf,u=e.oxw();
71e.xp6(2),e.Oqu(e.lcZ(3,4,"ACCOUNT")),e.xp6(3),e.Oqu(e.lcZ(6,6,"BUY_EYECONS_DRAWER.TO.ACCOUNT.HELP_TEXT")),e.xp6(3),e.Q6J("ngForOf",u.myEyeventureAccounts),e.xp6(1),e.Q6J("ngIf",o.invalid&&(o.touched||o.dirty))}}function x(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}const Z=function(){return{min:1}};function O(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MIN",e.DdM(4,Z))," "))}const B=function(i){return{max:i}};function W(i,p){if(1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const o=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MAX",e.VKq(4,B,o.maxBalance))," ")}}function K(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.DECIMAL_POINT_NOT_ALLOWED")," "))}function X(i,p){if(1&i&&(e.TgZ(0,"small",22),e.YNc(1,x,3,3,"strong",23),e.YNc(2,O,3,5,"strong",23),e.YNc(3,W,3,6,"strong",23),e.YNc(4,K,3,3,"strong",23),e.qZA()),2&i){const o=e.oxw().ngIf,u=e.oxw();e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.min),e.xp6(1),e.Q6J("ngIf",u.maxBalance&&(null==o.errors?null:o.errors.max)),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.absoluteNumber)}}const z=function(i,p){return{min:1,total:i,percentage:p}};function oe(i,p){if(1&i){const o=e.EpF();e.TgZ(0,"div",16)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"p",7),e.ALo(5,"translate"),e.TgZ(6,"input",24,25),e.NdJ("mousewheel",function(){e.CHM(o);const y=e.MAs(7);return e.KtG(y.blur())}),e.qZA(),e.YNc(8,X,5,4,"small",20),e.qZA()}if(2&i){const o=p.ngIf,u=e.oxw();e.ekj("disabled",!u.form.controls.buyer.value),e.xp6(2),e.Oqu(e.lcZ(3,6,"NUMBER_OF_EYECONS")),e.xp6(2),e.Q6J("innerHTML",e.xi3(5,8,"CREATE_ORDER_DRAWER.FORM.NUMBER_OF_EYECONS.HELP_TEXT",e.WLB(11,z,u.eyeventure.eyevalue,(o.value||0)/u.eyeventure.eyevalue*100)),e.oJD),e.xp6(2),e.Q6J("allowDecimal",!1),e.xp6(2),e.Q6J("ngIf",o.invalid&&(o.touched||o.dirty))}}const ae=function(i,p){return{min:i,max:p}};function le(i,p){if(1&i&&(e._UZ(0,"p",7),e.ALo(1,"translate")),2&i){const o=e.oxw(2);e.Q6J("innerHTML",e.xi3(1,1,"CREATE_ORDER_DRAWER.FORM.PRICE_PER_EYECON.HELP_TEXT",e.WLB(4,ae,o.minPrice,o.maxPrice)),e.oJD)}}const ne=function(i){return{min:i}};function ee(i,p){if(1&i&&(e._UZ(0,"p",7),e.ALo(1,"translate")),2&i){const o=e.oxw(2);e.Q6J("innerHTML",e.xi3(1,1,"CREATE_ORDER_DRAWER.FORM.PRICE_PER_EYECON.HELP_TEXT.WITHOUT_MAX",e.VKq(4,ne,o.minPrice)),e.oJD)}}function ie(i,p){1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}function ce(i,p){if(1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const o=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MIN",e.VKq(4,ne,o.minPrice))," ")}}function se(i,p){if(1&i&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const o=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MAX",e.VKq(4,B,o.maxPrice))," ")}}function ue(i,p){if(1&i&&(e.TgZ(0,"small",22),e.YNc(1,ie,3,3,"strong",23),e.YNc(2,ce,3,6,"strong",23),e.YNc(3,se,3,6,"strong",23),e.qZA()),2&i){const o=e.oxw().ngIf,u=e.oxw();e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.min),e.xp6(1),e.Q6J("ngIf",u.maxPrice&&(null==o.errors?null:o.errors.max))}}function me(i,p){if(1&i){const o=e.EpF();e.TgZ(0,"div",16)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,le,2,7,"p",26),e.YNc(5,ee,2,6,"p",26),e.TgZ(6,"div",8)(7,"mat-icon"),e._uU(8,"euro_symbol"),e.qZA(),e.TgZ(9,"input",27,28),e.NdJ("mousewheel",function(){e.CHM(o);const y=e.MAs(10);return e.KtG(y.blur())}),e.qZA()(),e.YNc(11,ue,4,3,"small",20),e.qZA()}if(2&i){const o=p.ngIf,u=e.oxw();e.xp6(2),e.hij("",e.lcZ(3,4,"PRICE_PER_EYECON")," *"),e.xp6(2),e.Q6J("ngIf",u.maxPrice),e.xp6(1),e.Q6J("ngIf",!u.maxPrice),e.xp6(6),e.Q6J("ngIf",o.invalid&&(o.touched||o.dirty))}}let pe=(()=>{class i{constructor(o,u,y,S,Y,de,ge,_e,fe,he){this.fb=o,this.modalRef=u,this.toastr=y,this.translator=S,this.createBuyOrderGraphql=Y,this.errorService=de,this.errorMessageService=ge,this.ngxLoaderService=_e,this.eventEmittersService=fe,this.partnerBleService=he,this.ngUnsubscribe$=new P.x,this.form=this.fb.group({eyeventure:this.fb.control(null,f.kI.required),buyer:this.fb.control(null,f.kI.required),amount:this.fb.control(null,this.getAmountDefaultValidators()),currency:this.fb.nonNullable.control("EUR",f.kI.required),pricePerEyecon:this.fb.control(null,f.kI.required)}),this.total$=new D.X(0),this.maxBalance=0,this.minPrice=.01,this.maxPrice=0,this.myEyeventureAccounts=[],this.buyOrderCreated=new e.vpe}ngOnInit(){this.form.controls.eyeventure.setValue(this.eyeventure.pk),this.marketplace.switchOnPriceBandwidth&&this.marketplace.priceBandwidth?.basePrice&&this.form.controls.pricePerEyecon.setValue(Number((this.marketplace.priceBandwidth.basePrice/100).toFixed(2))),this.setPriceValidations(),this.form.controls.buyer.addValidators([(0,U.j)(this.myEyeventureAccounts),(0,_.e)(this.myEyeventureAccounts,this.eyeventure)]),this.watchForBuyerAccountChange(),this.selectedAccountPk&&this.myEyeventureAccounts.find(({pk:o})=>o===this.selectedAccountPk)?this.form.controls.buyer.setValue(this.selectedAccountPk):1===this.myEyeventureAccounts.length&&this.form.controls.buyer.setValue(this.myEyeventureAccounts[0].pk),this.form.valueChanges.pipe((0,R.R)(this.ngUnsubscribe$),(0,w.O)(this.form.value)).subscribe(({amount:o,pricePerEyecon:u})=>{this.total$.next(((o||0)*(u||0)).toFixed(2))})}getAmountDefaultValidators(){return[f.kI.required,f.kI.min(1),h.h]}setPriceValidations(){const o=this.marketplace.priceBandwidth,{pricePerEyecon:u}=this.form.controls;this.minPrice=o?.minPrice?o.minPrice/100:.01,this.maxPrice=(o?.maxPrice||0)/100,u.addValidators(f.kI.min(this.minPrice)),this.maxPrice&&u.addValidators(f.kI.max(this.maxPrice))}watchForBuyerAccountChange(){const{buyer:o,amount:u}=this.form.controls;o.valueChanges.pipe((0,R.R)(this.ngUnsubscribe$)).subscribe(y=>{const S=this.myEyeventureAccounts.find(({pk:Y})=>Y==y);u.clearValidators(),u.setValidators(this.getAmountDefaultValidators()),S?(this.maxBalance=Math.floor(S.role.getMaxBalance(this.eyeventure)-S.balance),u.addValidators(f.kI.max(this.maxBalance))):this.maxBalance=void 0,u.updateValueAndValidity()})}onSubmit(){var o=this;
71return(0,C.Z)(function*(){if(o.form.invalid)return void o.translator.get("INVALID_DATA_PLEASE_FILL_THE_FORM_WITH_VALID_INFORMATION").subscribe(y=>{o.errorMessageService.showErrorMessage(y)});const u=JSON.parse(JSON.stringify(o.form.value));u.pricePerEyecon&&(u.pricePerEyecon=Math.round(100*Number(u.pricePerEyecon.toFixed(2)))),o.form.disable({onlySelf:!0}),o.ngxLoaderService.ngxLoading=!0,o.createBuyOrderGraphql.mutate({...u,...yield(0,N.b)(o.partnerBleService)}).pipe((0,R.R)(o.ngUnsubscribe$)).subscribe({next:({data:y})=>{if(o.ngxLoaderService.ngxLoading=!1,y?.createBuyOrder?.success)return o.translator.get("SHARED.CREATE_ORDER_DRAWER.BUY_ORDER_CREATED.SUCCESS.TOASTER_MESSAGE").subscribe(S=>{o.toastr.success(S)}),o.buyOrderCreated.emit(),o.eventEmittersService.reloadAccountEyecons(),void o.modalRef.hide();o.form.enable({onlySelf:!0}),y?.createBuyOrder?.errors?.nonFieldErrors?.length?o.errorService.showToastForNonFieldErrors(o.errorService.getNonFieldErrors(y.createBuyOrder.errors)):o.errorService.showInternalServerError()},error:y=>{o.form.enable({onlySelf:!0}),o.errorService.showInternalServerError(y),o.ngxLoaderService.ngxLoading=!1}})})()}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}}return i.\u0275fac=function(o){return new(o||i)(e.Y36(f.qu),e.Y36(E.UZ),e.Y36(J._W),e.Y36(q.sK),e.Y36(L),e.Y36(F.r),e.Y36(Q.G),e.Y36($.b),e.Y36(M.r),e.Y36(H.J))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-create-order-drawer"]],inputs:{eyeventure:"eyeventure",marketplace:"marketplace",myEyeventureAccounts:"myEyeventureAccounts",selectedAccountPk:"selectedAccountPk"},outputs:{buyOrderCreated:"buyOrderCreated"},standalone:!0,features:[e._Bn([L]),e.jDz],decls:35,vars:29,consts:[["href","javascript:void(0)",1,"d-table","mb-3",3,"click"],[1,"sub-heading-1","mb-1"],[1,"mb-3","pb-2"],[1,"add-safe-area-inset-bottom",3,"formGroup","ngSubmit"],["class","form-group mb-3 pb-2",4,"ngIf"],["class","form-group mb-3 pb-2",3,"disabled",4,"ngIf"],[1,"form-group","mb-3","pb-2","disabled"],[1,"help-text",3,"innerHTML"],[1,"position-relative","has-icon-left"],["type","number",1,"form-control",3,"value","mousewheel"],["inputTotal",""],[1,"pb-5"],["type","submit",1,"btn","btn-lg","btn-success","d-inline-flex","align-items-center",3,"disabled"],["viewBox","0 0 16 16","width","16"],["href","assets/sprite.svg#icon-check"],["type","button",1,"btn","btn-lg","btn-link","btn-link-2",3,"click"],[1,"form-group","mb-3","pb-2"],[1,"help-text"],["formControlName","buyer",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["class","form-text text-danger",4,"ngIf"],[3,"value"],[1,"form-text","text-danger"],[4,"ngIf"],["type","number","formControlName","amount","appAllowDecimal","",1,"form-control",3,"allowDecimal","mousewheel"],["inputAmount",""],["class","help-text",3,"innerHTML",4,"ngIf"],["type","number","formControlName","pricePerEyecon",1,"form-control",3,"mousewheel"],["inputPricePerEyecon",""]],template:function(o,u){if(1&o){const y=e.EpF();e.TgZ(0,"a",0),e.NdJ("click",function(){return u.modalRef.hide()}),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"h2",1),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"p",2),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"form",3),e.NdJ("ngSubmit",function(){return u.onSubmit()}),e.YNc(10,m,10,8,"div",4),e.YNc(11,oe,9,14,"div",5),e.YNc(12,me,12,6,"div",4),e.TgZ(13,"div",6)(14,"label"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e._UZ(17,"p",7),e.ALo(18,"translate"),e.TgZ(19,"div",8)(20,"mat-icon"),e._uU(21,"euro_symbol"),e.qZA(),e.TgZ(22,"input",9,10),e.NdJ("mousewheel",function(){e.CHM(y);const Y=e.MAs(23);return e.KtG(Y.blur())}),e.ALo(24,"async"),e.qZA()()(),e.TgZ(25,"div",11)(26,"button",12),e.O4$(),e.TgZ(27,"svg",13),e._UZ(28,"use",14),e.qZA(),e._uU(29),e.ALo(30,"translate"),e.qZA(),e._uU(31," \xa0\xa0 "),e.kcU(),e.TgZ(32,"button",15),e.NdJ("click",function(){return u.modalRef.hide()}),e._uU(33),e.ALo(34,"translate"),e.qZA()()()}2&o&&(e.xp6(1),e.hij(" ",e.lcZ(2,13,"BUTTONS.CLOSE"),"\n"),e.xp6(3),e.Oqu(e.lcZ(5,15,"CREATE_ORDER")),e.xp6(3),e.Oqu(e.lcZ(8,17,"CREATE_ORDER_DRAWER.DESCRIPTION")),e.xp6(2),e.Q6J("formGroup",u.form),e.xp6(1),e.Q6J("ngIf",u.form.controls.buyer),e.xp6(1),e.Q6J("ngIf",u.form.controls.amount),e.xp6(1),e.Q6J("ngIf",u.form.controls.pricePerEyecon),e.xp6(3),e.hij("",e.lcZ(16,19,"TOTAL")," *"),e.xp6(2),e.Q6J("innerHTML",e.lcZ(18,21,"EYECONS_FOR_SALE_DRAWER.FORM.PRICE_PER_EYECON.HELP_TEXT"),e.oJD),e.xp6(
715),e.Q6J("value",e.lcZ(24,23,u.total$)),e.xp6(4),e.Q6J("disabled",u.form.invalid||u.form.disabled||u.ngxLoaderService.ngxLoading),e.xp6(3),e.hij("\xa0 ",e.lcZ(30,25,"CREATE_ORDER")," "),e.xp6(4),e.hij(" ",e.lcZ(34,27,"CANCEL")," "))},dependencies:[r.ez,r.sg,r.O5,r.Ov,d.m,f._Y,f.YN,f.Kr,f.Fj,f.wV,f.EJ,f.JJ,f.JL,f.sg,f.u,k.Hw,q.X$,T.D]}),i})()},67524:(re,I,a)=>{a.d(I,{a:()=>Se});var C=a(8239),e=a(64537),r=a(88692),f=a(21671),d=a(20092),P=a(38023),D=a(51927),R=a(27969),w=a(82781),b=a(13528),L=a(57445),N=a(98046);let U=(()=>{class n extends N.mm{constructor(){super(...arguments),this.document=N.Ps`mutation ( 72 $eyeventure: ID! 73 $source: ID! 74 $amount: Int! 75 $pricePerEyecon: Int! 76 $currency: String! 77 $priceStep: Int! 78 $blpSubdomain: String 79 ) { 80 createSellOrder ( 81 eyeventure: $eyeventure 82 source: $source 83 amount: $amount 84 pricePerEyecon: $pricePerEyecon 85 currency: $currency 86 priceStep: $priceStep 87 ) { 88 success, 89 errors 90 } 91 }`}}return n.\u0275fac=function(){let s;return function(l){return(s||(s=e.n5z(n)))(l||n)}}(),n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"any"}),n})();var _=a(87075),T=a(35776),h=a(95486),E=a(9588),J=a(2958),q=a(37979),F=a(8954),Q=a(75728),$=a(48292),M=a(29790),H=a(27339),k=a(96599),j=a(95289),V=a(67278),G=a(80404),c=a(68017),v=a(19729),m=a(83331),x=a(23345);function Z(n,s){if(1&n&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.pk),e.xp6(1),e.Oqu(t.iban)}}function O(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}function B(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ACCOUNT_MARKETPLACE_OFF_VALIDATION_ERROR_MESSAGE")," "))}function W(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.ACCOUNT_HAS_BALANCE")," "))}function K(n,s){if(1&n&&(e.TgZ(0,"small",35),e.YNc(1,O,3,3,"strong",36),e.YNc(2,B,3,3,"strong",36),e.YNc(3,W,3,3,"strong",36),e.qZA()),2&n){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.isMarketplaceOn),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.hasAccountBalance)}}function X(n,s){if(1&n&&(e.TgZ(0,"div",29)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"p",30),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"select",31),e.YNc(8,Z,2,2,"option",32),e.qZA(),e.YNc(9,K,4,3,"small",33),e.qZA()),2&n){const t=s.ngIf,l=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,4,"ACCOUNT")),e.xp6(3),e.Oqu(e.lcZ(6,6,"SELL_EYECONS_DRAWER.FORM.ACCOUNT.HELP_TEXT")),e.xp6(3),e.Q6J("ngForOf",l.accounts),e.xp6(1),e.Q6J("ngIf",t.invalid&&(t.touched||t.dirty))}}const z=function(n){return{min:1,max:n}};function oe(n,s){if(1&n&&(e._UZ(0,"p",40),e.ALo(1,"translate")),2&n){const t=e.oxw(2);e.Q6J("innerHTML",e.xi3(1,1,"SELL_EYECONS_DRAWER.FORM.AMOUNT.HELP_TEXT",e.VKq(4,z,t.selectedAccount.getAvailableBalance())),e.oJD)}}function ae(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}const le=function(){return{min:1}};function ne(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MIN",e.DdM(4,le))," "))}const ee=function(n){return{max:n}};function ie(n,s){if(1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MAX",e.VKq(4,ee,t.selectedAccount.getAvailableBalance()))," ")}}function ce(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.DECIMAL_POINT_NOT_ALLOWED")," "))}function se(n,s){if(1&n&&(e.TgZ(0,"small",35),e.YNc(1,ae,3,3,"strong",36),e.YNc(2,ne,3,5,"strong",36),e.YNc(3,ie,3,6,"strong",36),e.YNc(4,ce,3,3,"strong",36),e.qZA()),2&n){const t=e.oxw().ngIf,l=e.oxw();e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.min),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.max)&&l.selectedAccount),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.absoluteNumber)}}
91function ue(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",29)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,oe,2,6,"p",37),e.TgZ(5,"input",38,39),e.NdJ("mousewheel",function(){e.CHM(t);const g=e.MAs(6);return e.KtG(g.blur())}),e.qZA(),e.YNc(7,se,5,4,"small",33),e.qZA()}if(2&n){const t=s.ngIf,l=e.oxw();e.ekj("disabled",!l.form.controls.source.valid||l.isSellingAllEyecons),e.xp6(2),e.Oqu(e.lcZ(3,6,"AMOUNT")),e.xp6(2),e.Q6J("ngIf",l.selectedAccount&&l.form.controls.source.valid),e.xp6(1),e.Q6J("allowDecimal",!1),e.xp6(2),e.Q6J("ngIf",t.invalid&&(t.touched||t.dirty))}}function me(n,s){if(1&n&&(e.TgZ(0,"p",30),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,"FROM_FIELD.SELL_ALL_EYECONS.HELP_TEXT",e.VKq(4,ee,t.selectedAccount.getAvailableBalance())))}}const pe=function(n,s){return{min:n,max:s}};function i(n,s){if(1&n&&(e._UZ(0,"p",40),e.ALo(1,"translate"),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.ALo(4,"translateCurrency"),e.ALo(5,"currency")),2&n){const t=e.oxw(2);e.Q6J("innerHTML",e.xi3(1,1,"CREATE_ORDER_DRAWER.FORM.PRICE_PER_EYECON.HELP_TEXT",e.WLB(18,pe,e.lcZ(2,4,e.gM2(3,6,t.minPrice,t.form.controls.currency.value,"symbol","1.2-2")),e.lcZ(4,11,e.gM2(5,13,t.maxPrice,t.form.controls.currency.value,"symbol","1.2-2")))),e.oJD)}}const p=function(n){return{min:n}};function o(n,s){if(1&n&&(e._UZ(0,"p",40),e.ALo(1,"translate"),e.ALo(2,"translateCurrency"),e.ALo(3,"currency")),2&n){const t=e.oxw(2);e.Q6J("innerHTML",e.xi3(1,1,"CREATE_ORDER_DRAWER.FORM.PRICE_PER_EYECON.HELP_TEXT.WITHOUT_MAX",e.VKq(11,p,e.lcZ(2,4,e.gM2(3,6,t.minPrice,t.form.controls.currency.value,"symbol","1.2-2")))),e.oJD)}}function u(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}function y(n,s){if(1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translateCurrency"),e.ALo(4,"currency"),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MIN",e.VKq(11,p,e.lcZ(3,4,e.gM2(4,6,t.minPrice,t.form.controls.currency.value,"symbol","1.2-2"))))," ")}}function S(n,s){if(1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translateCurrency"),e.ALo(4,"currency"),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MAX",e.VKq(11,ee,e.lcZ(3,4,e.gM2(4,6,t.maxPrice,t.form.controls.currency.value,"symbol","1.2-2"))))," ")}}function Y(n,s){if(1&n&&(e.TgZ(0,"small",35),e.YNc(1,u,3,3,"strong",36),e.YNc(2,y,5,13,"strong",36),e.YNc(3,S,5,13,"strong",36),e.qZA()),2&n){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.min),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.max)}}function de(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",29)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,i,6,21,"p",37),e.YNc(5,o,4,13,"p",37),e.TgZ(6,"div",41)(7,"mat-icon"),e._uU(8,"euro_symbol"),e.qZA(),e.TgZ(9,"input",42,43),e.NdJ("mousewheel",function(){e.CHM(t);const g=e.MAs(10);return e.KtG(g.blur())}),e.qZA()(),e.YNc(11,Y,4,3,"small",33),e.qZA()}if(2&n){const t=s.ngIf,l=e.oxw();e.xp6(2),e.hij("",e.lcZ(3,4,"PRICE_PER_EYECON")," *"),e.xp6(2),e.Q6J("ngIf",l.maxPrice),e.xp6(1),e.Q6J("ngIf",!l.maxPrice),e.xp6(6),e.Q6J("ngIf",t.invalid&&(t.touched||t.dirty))}}function ge(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM_ERRORS.REQUIRED")," "))}function _e(n,s){1&n&&(e.TgZ(0,"strong"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translateCurrency"),e.ALo(4,"number"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"FORM_ERRORS.MIN",e.VKq(8,p,e.lcZ(3,4,e.lcZ(4,6,.01))))," "))}function fe(n,s){if(1&n&&(e.TgZ(0,"small",35),e.YNc(1,ge,3,3,"strong",36),e.YNc(2,_e,5,10,"strong",36),e.qZA()),2&n){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.min)}}function he(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",29)(1,"label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"p",40),e.ALo(5,"translate"),e.TgZ(6,"div",41)(7,"mat-icon"),e._uU(8,"euro_symbol"),e.qZA(),e.TgZ(9,"input",44,45),e.NdJ("mousewheel",function(){e.CHM(t);const g=e.MAs(10);return e.KtG(g.blur())}),e.qZA()(),e.YNc(11,fe,3,2,"small",33),e.qZA()}if(2&n){const t=s.ngIf;
91e.xp6(2),e.Oqu(e.lcZ(3,3,"PRICE_STEP")),e.xp6(2),e.Q6J("innerHTML",e.lcZ(5,5,"SELL_EYECONS_DRAWER.FORM.PRICE_STEP.HELP_TEXT"),e.oJD),e.xp6(7),e.Q6J("ngIf",t.invalid&&(t.touched||t.dirty))}}function Ae(n,s){1&n&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"BUYER_PAYS")," "))}function ve(n,s){1&n&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"SELLER_PAYS")," "))}function xe(n,s){1&n&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"BOTH_PAYS")," "))}function Ee(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0),t.form.value.currency,"symbol","1.2-2"))," ")}}function ye(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)+t.chargeRate,t.form.value.currency,"symbol","1.2-2"))," ")}}function Ce(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)+t.chargeRate/2,t.form.value.currency,"symbol","1.2-2"))," ")}}function Te(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)-(t.chargeRate+t.partnerCharge),t.form.value.currency,"symbol","1.2-2"))," ")}}function Ze(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0),t.form.value.currency,"symbol","1.2-2"))," ")}}function Oe(n,s){if(1&n&&(e.TgZ(0,"th",18),e._uU(1),e.ALo(2,"translateCurrency"),e.ALo(3,"currency"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)-t.chargeRate/2-t.partnerCharge,t.form.value.currency,"symbol","1.2-2"))," ")}}let Se=(()=>{class n{constructor(t,l,g,A,te,Re,be,Le,Ie,De,Ne,Ue){this.fb=t,this.modalRef=l,this.toastr=g,this.translator=A,this.createSellOrderGraphql=te,this.errorService=Re,this.errorMessageService=be,this.transactionService=Le,this.utilityService=Ie,this.ngxLoaderService=De,this.eventEmittersService=Ne,this.partnerBleService=Ue,this.ngUnsubscribe$=new P.x,this.form=this.fb.group({eyeventure:this.fb.control(null,d.kI.required),source:this.fb.control(null,d.kI.required),amount:this.fb.control(null,this.getAmountDefaultValidators()),currency:this.fb.nonNullable.control("EUR",d.kI.required),pricePerEyecon:this.fb.control(null,d.kI.required),priceStep:this.fb.control(null,[d.kI.required,d.kI.min(.01)])}),this.isSellingAllEyecons=!1,this.minPrice=.01,this.maxPrice=0,this.accounts=[],this.sellOrderCreated=new e.vpe,this.chargeRate=0,this.partnerCharge=0}ngOnInit(){var t=this;return(0,C.Z)(function*(){t.form.controls.eyeventure.setValue(t.eyeventure.pk),t.form.controls.source.addValidators([(0,T.j)(t.accounts),(0,J.U)(t.accounts)]),t.setPricePerEyeconValidations(),t.watchForAccountChange(),t.watchForChargeRateChange(),t.selectedAccountPk&&t.accounts.find(({pk:l})=>l===t.selectedAccountPk)?t.form.controls.source.setValue(t.selectedAccountPk):1===t.accounts.length&&t.form.controls.source.setValue(t.accounts[0].pk)})()}getAmountDefaultValidators(){return[d.kI.required,d.kI.min(1),F.h]}watchForChargeRateChange(){const{amount:t,pricePerEyecon:l}=this.form.controls,g=this.eyeventure?.eyeventureplan.plan?.chargerates.find(A=>"saleOrder"===A.transactionType);!g||t.valueChanges.pipe((0,D.O)(t.value),(0,R.U)(A=>A||0),(0,w.V)(l.valueChanges.pipe((0,D.O)(l.value),(0,R.U)(A=>A||0))),(0,b.R)(this.ngUnsubscribe$)).subscribe(([A,te])=>{this.chargeRate=Number(this.transactionService.calculateTransactionCharge(g,{amount:A,pricePerEyecon:te}))})}setPricePerEyeconValidations(){const t=this.marketplace.priceBandwidth,{pricePerEyecon:l}=this.form.controls;this.minPrice=t?.minPrice?t.minPrice/100:.01,this.maxPrice=(t?.maxPrice||0)/100,t?.basePrice&&l.setValue(Number((t?.basePrice/100).toFixed(2))),l.addValidators(d.kI.min(this.minPrice)),this.maxPrice&&l.addValidators(d.kI.max(this.maxPrice))}watchForAccountChange(){this.form.controls.source.valueChanges.pipe((0,b.R)(this.ngUnsubscribe$)).subscribe(t=>{const{amount:l}=this.form.controls;this.selectedAccount=this.accounts.find(({pk:g})=>g==t),l.clearValidators(),l.setValidators(this.getAmountDefaultValidators()),this.selectedAccount&&l.addValidators(d.kI.max(this.selectedAccount.getAvailableBalance())),l.updateValueAndValidity()})}setAllEyeconsForSale(t){const{checked:l}=t.target;this.isSellingAllEyecons=l,l&&this.selectedAccount&&this.form.controls.amount.setValue(this.selectedAccount.balance)}gotoConfirmationStep(){var t=this;return(0,C.Z)(function*(){t.calculateCharges();const l=t.chargeRate+t.partnerCharge;if((t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)<=l){const A=t.utilityService.transformByPipe(t.utilityService.transformByPipe(l,"currency",t.form.controls.currency.value),"translateCurrency");t.errorMessageService.showErrorMessage(yield(0,L.z)(t.translator.get("CHARGE_RATE_ERROR_MESSAGE",{charge:A})))}else t.drawerConfirmationContainer.openConfirmation()})()}calculateCharges(){const{source:t}=this.form.controls,g=this.accounts.filter(A=>(A.pk??0).toString()===(t.value??0).toString())[0]?.partnerChargeRates.filter(A=>"buyOrder"===A.transactionType);this.partnerCharge=g?.length?Number(this.transactionService.calculateTransactionCharge(g[0],this.form.getRawValue())):0}onSubmit(){var t=this;
91return(0,C.Z)(function*(){if(t.form.invalid)return void t.translator.get("INVALID_DATA_PLEASE_FILL_THE_FORM_WITH_VALID_INFORMATION").subscribe(A=>{t.errorMessageService.showErrorMessage(A)});if(t.chargeRate>=(t.form.value.amount||0)*(t.form.value.pricePerEyecon||0)){const A=t.utilityService.transformByPipe(t.utilityService.transformByPipe(t.chargeRate,"currency",t.form.value.currency||"EUR"),"translateCurrency");return void t.errorMessageService.showErrorMessage(yield(0,L.z)(t.translator.get("CHARGE_RATE_ERROR_MESSAGE",{charge:A})))}const g=JSON.parse(JSON.stringify(t.form.value));g.pricePerEyecon&&(g.pricePerEyecon=Math.round(100*Number(g.pricePerEyecon.toFixed(2)))),g.priceStep&&(g.priceStep=100*Number(g.priceStep.toFixed(2))),t.form.disable({onlySelf:!0}),t.ngxLoaderService.ngxLoading=!0,t.createSellOrderGraphql.mutate({...g,...yield(0,_.b)(t.partnerBleService)}).pipe((0,b.R)(t.ngUnsubscribe$)).subscribe({next:({data:A})=>{t.ngxLoaderService.ngxLoading=!1,A?.createSellOrder?.success?(t.translator.get("SHARED.SELL_EYECONS_DRAWER.CREATE_SELL_ORDER.SUCCESS.TOASTER_MESSAGE").subscribe(te=>{t.toastr.success(te)}),t.sellOrderCreated.emit(),t.eventEmittersService.reloadAccountEyecons(),t.modalRef.hide()):(t.form.enable({onlySelf:!0}),A?.createSellOrder?.errors?.nonFieldErrors?t.errorService.showToastForNonFieldErrors(t.errorService.getNonFieldErrors(A.createSellOrder.errors)):t.errorService.showInternalServerError())},error:A=>{t.ngxLoaderService.ngxLoading=!1,t.form.enable({onlySelf:!0}),t.errorService.showInternalServerError(A)}})})()}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.qu),e.Y36(Q.UZ),e.Y36($._W),e.Y36(M.sK),e.Y36(U),e.Y36(H.r),e.Y36(k.G),e.Y36(j.p),e.Y36(V.t),e.Y36(G.b),e.Y36(c.r),e.Y36(v.J))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-sell-eyecons-drawer"]],viewQuery:function(t,l){if(1&t&&e.Gf(h.y,5),2&t){let g;e.iGM(g=e.CRH())&&(l.drawerConfirmationContainer=g.first)}},inputs:{eyeventure:"eyeventure",marketplace:"marketplace",accounts:"accounts",selectedAccountPk:"selectedAccountPk"},outputs:{sellOrderCreated:"sellOrderCreated"},standalone:!0,features:[e._Bn([U]),e.jDz],decls:139,vars:138,consts:[["href","javascript:void(0)",1,"d-table","mb-3",3,"click"],["appDrawerConfirmationContainer","",3,"formGroup","ngSubmit"],[1,"drawer-confirmation-section"],[1,"sub-heading-1","mb-2","pb-1"],[1,"mb-3","pb-2"],["class","form-group mb-3 pb-2",4,"ngIf"],["class","form-group mb-3 pb-2",3,"disabled",4,"ngIf"],["hidden","",1,"form-group","mb-3","pb-2"],["class","help-text",4,"ngIf"],[1,"theme-v2-switch","mb-0","d-table"],["type","checkbox","hidden","",3,"change"],["sellAllEyecon",""],[1,"pb-5"],["type","button",1,"btn","btn-lg","btn-success",3,"disabled","click"],["type","button",1,"btn","btn-lg","btn-link","btn-link-2",3,"click"],[1,"sub-heading-2","mb-3","pb-2"],[1,"table","response_detail-table","mb-4"],[2,"border-top","hidden"],["scope","row"],["scope","row",3,"ngSwitch"],[4,"ngSwitchCase"],["scope","row",4,"ngIf"],[1,"d-flex","pb-5"],["type","button","appDrawerConfirmationClose","",1,"btn","btn-link","d-inline-flex","align-items-center"],["viewBox","0 0 14 14","width","14"],["href","assets/sprite.svg#icon-angle-left"],["type","submit",1,"btn","btn-primary","d-inline-flex","align-items-center","ml-3",3,"disabled"],["viewBox","0 0 16 16","width","14"],["href","assets/sprite.svg#icon-check"],[1,"form-group","mb-3","pb-2"],[1,"help-text"],["formControlName","source",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["class","form-text text-danger",4,"ngIf"],[3,"value"],[1,"form-text","text-danger"],[4,"ngIf"],["class","help-text",3,"innerHTML",4,"ngIf"],["type","number","formControlName","amount","appAllowDecimal","",1,"form-control",3,"allowDecimal","mousewheel"],["inputAmount",""],[1,"help-text",3,"innerHTML"],[1,"position-relative","has-icon-left"],["type","number","formControlName","pricePerEyecon",1,"form-control",3,"mousewheel"],["inputPricePerEyecon",""],["type","number","formControlName","priceStep",1,"form-control",3,"mousewheel"],["inputPriceStep",""]],template:function(t,l){if(1&t&&(e.TgZ(0,"a",0),e.NdJ("click",function(){return l.modalRef.hide()}),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"form",1),e.NdJ("ngSubmit",function(){return l.onSubmit()}),e.TgZ(4,"div",2)(5,"h2",3),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"p",4),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.YNc(11,X,10,8,"div",5),e.YNc(12,ue,8,8,"div",6),e.TgZ(13,"div",7)(14,"label"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.YNc(17,me,3,6,"p",8),e.TgZ(18,"label",9)(19,"input",10,11),e.NdJ("change",function(A){return l.setAllEyeconsForSale(A)}),e.qZA(),e._UZ(21,"span"),e.qZA()(),e.YNc(22,de,12,6,"div",5),e.YNc(23,he,12,7,"div",5),e.TgZ(24,"div",12)(25,"button",13),e.NdJ("click",function(){return l.gotoConfirmationStep()}),e._uU(26),e.ALo(27,"translate"),e.qZA(),e._uU(28," \xa0\xa0 "),e.TgZ(29,"button",14),e.NdJ("click",function(){return l.modalRef.hide()}),e._uU(30),e.ALo(31,"translate"),e.qZA()()(),e.TgZ(32,"div",2)(33,"h2",15),e._uU(34),e.ALo(35,"translate"),e.qZA(),e.TgZ(36,"table",16)(37,"tr",17)(38,"td"),e._uU(39),e.ALo(40,"translate"),e.qZA(),e.TgZ(41,"th",18),e._uU(42),e.qZA()(),e.TgZ(43,"tr")(44,"td"),e._uU(45),e.ALo(46,"translate"),e.qZA(),e.TgZ(47,"th",18),e._uU(48),e.ALo(49,"translate"),e.qZA()(),e.TgZ(50,"tr")(51,"td"),e._uU(52),e.ALo(53,"translate"),e.qZA(),e.TgZ(54,"th",18),e._uU(55),e.ALo(56,"translateCurrency"),e.ALo(57,"number"),e.qZA()(),e.TgZ(58,"tr")(59,"td"),e._uU(60),e.ALo(61,"translate"),e.qZA(),e.TgZ(62,"th",18),e._uU(63),e.ALo(64,"translate"),e.qZA()(),e.TgZ(65,"tr")(66,"td"),e._uU(67),e.ALo(68,"translate"),e.qZA(),e.TgZ(69,"th",18),e._uU(70),e.ALo(71,"translateCurrency"),e.ALo(72,"currency"),e.qZA()(),e.TgZ(73,"tr")(74,"td"),e._uU(75),e.ALo(76,"translate"),e.qZA(),e.TgZ(77,"th",18),e._uU(78),e.ALo(79,"translateCurrency"),e.ALo(80,"currency"),e.qZA()(),e.TgZ(81,"tr")(82,"td"),e._uU(83),e.ALo(84,"translate"),e.qZA(),e.TgZ(85,"th",18),e._uU(86),e.ALo(87,"translateCurrency"),e.ALo(88,"currency"),e.qZA()(),e.TgZ(89,"tr")(90,"td"),e._uU(91),e.ALo(92,"translate"),e.qZA(),e.TgZ(93,"th",18),e._uU(94),e.ALo(95,"translateCurrency"),e.ALo(96,"currency"),e.qZA()(),e.TgZ(97,"tr")(98,"td"),e._uU(99),e.ALo(100,"translate"),e.qZA(),e.TgZ(101,"th",19),e.YNc(102,Ae,3,3,"ng-container",20),e.YNc(103,ve,3,3,"ng-container",20),e.YNc(104,xe,3,3,"ng-container",20),e.qZA()(),e.TgZ(105,"tr")(106,"td"),e._uU(107),e.ALo(108,"translate"),e.qZA(),e.TgZ(109,"th",18),e._uU(110),e.ALo(111,"translateCurrency"),e.ALo(112,"currency"),e.ALo(113,"translate"),e.qZA()(),e.TgZ(114,"tr")(115,"td"),e._uU(116),e.ALo(117,"translate"),e.qZA(),e.YNc(118,Ee,4,8,"th",21),e.YNc(119,ye,4,8,"th",21),e.YNc(120,Ce,4,8,"th",21),e.qZA(),e.TgZ(121,"tr")(122,"td"),e._uU(123),e.ALo(124,"translate"),e.qZA(),e.YNc(125,Te,4,8,"th",21),e.YNc(126,Ze,4,8,"th",21),e.YNc(127,Oe,4,8,"th",21),e.qZA()(),e.TgZ(128,"div",22)(129,"button",23),e.O4$(),e.TgZ(130,"svg",24),e._UZ(131,"use",25),e.qZA(),e._uU(132),e.ALo(133,"translate"),e.qZA(),e.kcU(),e.TgZ(134,"button",26),e.O4$(),e.TgZ(135,"svg",27),e._UZ(136,"use",28),e.qZA(),e._uU(137),e.ALo(138,"translate"),e.qZA()()()()),2&t){const g=e.MAs(20);e.xp6(1),e.hij(" ",e.lcZ(2,51,"BUTTONS.CLOSE"),"\n"),e.xp6(2),e.Q6J("formGroup",l.form),e.xp6(3),e.Oqu(e.l
91cZ(7,53,"EYECONS_FOR_SALE")),e.xp6(3),e.Oqu(e.lcZ(10,55,"SELL_EYECONS_DRAWER.DESCRIPTION")),e.xp6(2),e.Q6J("ngIf",l.form.controls.source),e.xp6(1),e.Q6J("ngIf",l.form.controls.amount),e.xp6(1),e.ekj("disabled",!l.form.controls.source.value),e.xp6(2),e.Oqu(e.lcZ(16,57,"SELL_ALL_EYECONS")),e.xp6(2),e.Q6J("ngIf",l.selectedAccount),e.xp6(5),e.Q6J("ngIf",l.form.controls.pricePerEyecon),e.xp6(1),e.Q6J("ngIf",l.form.controls.priceStep),e.xp6(2),e.Q6J("disabled",l.form.invalid||l.form.disabled||l.ngxLoaderService.ngxLoading),e.xp6(1),e.hij(" ",e.lcZ(27,59,"SELL")," "),e.xp6(4),e.hij(" ",e.lcZ(31,61,"CANCEL")," "),e.xp6(4),e.Oqu(e.lcZ(35,63,"CONFIRM_SELL_ORDER")),e.xp6(5),e.Oqu(e.lcZ(40,65,"EYEVENTURE")),e.xp6(3),e.Oqu(l.eyeventure.ctId),e.xp6(3),e.Oqu(e.lcZ(46,67,"TYPE")),e.xp6(3),e.Oqu(e.lcZ(49,69,"ACTION_BUTTON.OFFER")),e.xp6(4),e.Oqu(e.lcZ(53,71,"AMOUNT")),e.xp6(3),e.Oqu(e.lcZ(56,73,e.lcZ(57,75,l.form.value.amount))),e.xp6(5),e.Oqu(e.lcZ(61,77,"SELL_ALL_EYECONS")),e.xp6(3),e.Oqu(e.lcZ(64,79,g.checked?"BUTTONS.YES":"BUTTONS.NO")),e.xp6(4),e.Oqu(e.lcZ(68,81,"PRICE_PER_EYECON")),e.xp6(3),e.Oqu(e.lcZ(71,83,e.gM2(72,85,l.form.value.pricePerEyecon,l.form.value.currency,"symbol","1.2-2"))),e.xp6(5),e.Oqu(e.l
91cZ(76,90,"PRICE_STEP")),e.xp6(3),e.Oqu(e.lcZ(79,92,e.gM2(80,94,l.form.value.priceStep,l.form.value.currency,"symbol","1.2-2"))),e.xp6(5),e.Oqu(e.lcZ(84,99,"TOTAL")),e.xp6(3),e.Oqu(e.lcZ(87,101,e.gM2(88,103,(l.form.value.pricePerEyecon||0)*(l.form.value.amount||0),l.form.value.currency,"symbol","1.2-2"))),e.xp6(5),e.Oqu(e.lcZ(92,108,"CHARGE")),e.xp6(3),e.Oqu(e.lcZ(95,110,e.gM2(96,112,l.chargeRate,l.form.value.currency,"symbol","1.2-2"))),e.xp6(5),e.Oqu(e.lcZ(100,117,"CHARGE_TO_BE_PAID_BY")),e.xp6(2),e.Q6J("ngSwitch",l.eyeventure.marketplacePaymentParty),e.xp6(1),e.Q6J("ngSwitchCase","buyer"),e.xp6(1),e.Q6J("ngSwitchCase","seller"),e.xp6(1),e.Q6J("ngSwitchCase","both"),e.xp6(3),e.Oqu(e.lcZ(108,119,"OTHER_CHARGE")),e.xp6(3),e.AsE("",e.lcZ(111,121,e.gM2(112,123,l.partnerCharge,"EUR","symbol","1.2-2"))," (",e.lcZ(113,128,"seller"===l.eyeventure.marketplacePaymentParty?"SELLER_PAYS":"BUYER_PAYS"),")"),e.xp6(6),e.Oqu(e.lcZ(117,130,"TOTAL_AMOUNT_TO_PAY_BY_BUYER")),e.xp6(2),e.Q6J("ngIf","seller"===l.eyeventure.marketplacePaymentParty),e.xp6(1),e.Q6J("ngIf","buyer"===l.eyeventure.marketplacePaymentParty),e.xp6(1),e.Q6J("ngIf","both"===l.eyeventure.marketplacePaymentParty),e.xp6(3),e.Oqu(e.lcZ(124,132,"TOTAL_AMOUNT_TO_RECEIVE_BY_YOU")),e.xp6(2),e.Q6J("ngIf","seller"===l.eyeventure.marketplacePaymentParty),e.xp6(1),e.Q6J("ngIf","buyer"===l.eyeventure.marketplacePaymentParty),e.xp6(1),e.Q6J("ngIf","both"===l.eyeventure.marketplacePaymentParty),e.xp6(5),e.hij(" \xa0 ",e.lcZ(133,134,"SIGNUP.BACK")," "),e.xp6(2),e.Q6J("disabled",l.form.invalid||l.form.disabled||l.ngxLoaderService.ngxLoading),e.xp6(3),e.hij(" \xa0 ",e.lcZ(138,136,"BUTTONS.CONFIRM")," ")}},dependencies:[r.ez,r.sg,r.O5,r.RF,r.n9,r.JJ,r.H9,f.m,d._Y,d.YN,d.Kr,d.Fj,d.wV,d.EJ,d.JJ,d.JL,d.sg,d.u,m.Hw,M.X$,x.y,h.y,E.i,q.D]}),n})()},35776:(re,I,a)=>{a.d(I,{j:()=>C});const C=e=>({value:r})=>{const f=e.find(({pk:d})=>d==r);return f&&!f.role.isMarketplaceOn?{isMarketplaceOn:!0}:null}},34501:(re,I,a)=>{a.d(I,{D:()=>U});var C=a(54536),e=a(64537),r=a(88692),f=a(9638),d=a(83331),P=a(29790);function D(_,T){if(1&_&&e._UZ(0,"h2",13),2&_){const h=e.oxw();e.Q6J("innerHTML",h.heading,e.oJD)}}function R(_,T){1&_&&(e.TgZ(0,"h2",14),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&_&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"CONFIRM")))}function w(_,T){if(1&_&&e._UZ(0,"p",15),2&_){const h=e.oxw();e.Q6J("innerHTML",h.message,e.oJD)}}function b(_,T){if(1&_&&(e.TgZ(0,"span",17),e._UZ(1,"br"),e._uU(2),e.qZA()),2&_){const h=e.oxw(2);e.xp6(2),e.hij("(",h.warningText,") ")}}function L(_,T){if(1&_&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.YNc(4,b,3,1,"span",16),e.qZA()),2&_){const h=e.oxw();e.xp6(1),e.HOy(" ",e.lcZ(2,5,"ARE_YOU_SURE_YOU_WANT_TO")," ",h.verb," ",e.lcZ(3,7,"THIS")," ",h.actionName,"? "),e.xp6(3),e.Q6J("ngIf",h.warningText)}}let N=(()=>{class _{constructor(h,E){this.dialogRef=h,this.data=E,this.verb="perform",this.actionName="action",this.yesButtonText="YES",this.noButtonText="NO"}ngOnInit(){this.heading=this.data.heading||this.heading,this.message=this.data.message||this.message,this.warningText=this.data.warningText||this.warningText,this.verb=this.data.verb||this.verb,this.actionName=this.data.actionName||this.actionName}}return _.\u0275fac=function(h){return new(h||_)(e.Y36(C.so),e.Y36(C.WI))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-confirm-dialog"]],inputs:{heading:"heading",message:"message",warningText:"warningText",verb:"verb",actionName:"actionName",yesButtonText:"yesButtonText",noButtonText:"noButtonText"},decls:21,vars:14,consts:[["mat-dialog-title","",3,"innerHTML",4,"ngIf"],["mat-dialog-title","",4,"ngIf"],[1,"d-flex"],[1,"p-2","flex-shrink-1"],["aria-hidden","false","aria-label","Warning","color","accent"],[1,"p-2","w-100"],[3,"innerHTML",4,"ngIf"],[4,"ngIf"],[1,"pb-3","pb-md-0"],["align","end",1,"pb-4","pb-md-2"],["mat-raised-button","","color","primary",3,"mat-dialog-close"],["mat-raised-button","",3,"mat-dialog-close"],["mat-icon-button","","aria-label","Close",3,"mat-dialog-close","ngClass"],["mat-dialog-title","",3,"innerHTML"],["mat-dialog-title",""],[3,"innerHTML"],["class","text-danger small",4,"ngIf"],[1,"text-danger","small"]],template:function(h,E){1&h&&(e.YNc(0,D,1,1,"h2",0),e.YNc(1,R,3,3,"h2",1),e.TgZ(2,"mat-dialog-content")(3,"div",2)(4,"div",3)(5,"mat-icon",4),e._uU(6,"warning"),e.qZA()(),e.TgZ(7,"div",5),e.YNc(8,w,1,1,"p",6),e.YNc(9,L,5,9,"p",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"mat-dialog-actions",9)(12,"button",10),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.TgZ(15,"button",11),e._uU(16),e.ALo(17,"translate"),e.qZA()()(),e.TgZ(18,"button",12)(19,"mat-icon"),e._uU(20,"close"),e.qZA()()),2&h&&(e.Q6J("ngIf",E.heading),e.xp6(1),e.Q6J("ngIf",!E.heading),e.xp6(7),e.Q6J("ngIf",E.message),e.xp6(1),e.Q6J("ngIf",!E.message),e.xp6(3),e.Q6J("mat-dialog-close",!0),e.xp6(1),e.Oqu(e.l
91cZ(14,10,E.yesButtonText)),e.xp6(2),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(e.lcZ(17,12,E.noButtonText)),e.xp6(2),e.Q6J("mat-dialog-close",!1)("ngClass","modal-close-btn"))},dependencies:[r.mk,r.O5,f.lW,d.Hw,C.ZT,C.uh,C.xY,C.H8,P.X$],styles:["mat-dialog-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px}h2.mat-dialog-title[_ngcontent-%COMP%]{background:#eb5850;color:#fff;margin-left:-24px;margin-right:-24px;margin-top:-24px;padding:5px 15px;font-size:1rem}.modal-close-btn[_ngcontent-%COMP%]{color:#fff;top:0}[_nghost-%COMP%] p h3{font-size:1.25rem}@media (min-width: 768px){[_nghost-%COMP%] p h3{font-size:1.75rem}}"]}),_})(),U=(()=>{class _{constructor(h){this.dialog=h}openConfirmDialog(h){const E=new C.vA;return E.data=h,E.disableClose=!0,E.minWidth=400,E.maxWidth=600,this.dialog.open(N,E)}}return _.\u0275fac=function(h){return new(h||_)(e.LFG(C.uw))},_.\u0275prov=e.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})()}}]);
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.