PageSourceSearch

https://app.lettsart.com/7093.6faa1bf592d2464c.js

js lettsart.com collected 2026-10-01 06:17:04 UTC 26,145 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkLettsArtFirebase=self.webpackChunkLettsArtFirebase||[]).push([[7093],{7093:(_t,P,c)=>{c.r(P),c.d(P,{OrdersModule:()=>wt});var O=c(9808),C=c(2666),g=c(8653),Q=c(8654),j=c(8835),U=c(9378),X=c(2846),Z=c(655),T=c(3078),v=c(5620),J=c(9554),m=c(4987),t=c(5e3),H=c(2313),$=c(3229),G=c(8044),k=c(252),B=c(3075),I=c(1492),V=c(7221),F=c(3749),M=c(1273),R=c(870);function z(i,r){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",4),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().setOrder(o)}),t._uU(2),t.qZA(),t.TgZ(3,"div",4),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().setOrder(o)}),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"div",4),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().setOrder(o)}),t._uU(7),t.qZA(),t.TgZ(8,"div",4),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().setOrder(o)}),t._uU(9),t.qZA(),t.TgZ(10,"div",5),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().setOrder(o)}),t._uU(11),t.ALo(12,"currency"),t.qZA(),t.BQk()}if(2&i){const e=r.$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",e.uid==(null==n.currentOrder?null:n.currentOrder.uid)?"selectedRow":"stdRow"),t.xp6(1),t.Oqu(e.uid),t.xp6(1),t.Q6J("ngClass",e.uid==(null==n.currentOrder?null:n.currentOrder.uid)?"selectedRow":"stdRow"),t.xp6(1),t.hij(" ",t.xi3(5,10,e.orderDate,"dd/MM/yyyy")," "),t.xp6(2),t.Q6J("ngClass",e.uid==(null==n.currentOrder?null:n.currentOrder.uid)?"selectedRow":"stdRow"),t.xp6(1),t.Oqu(e.collector),t.xp6(1),t.Q6J("ngClass",e.uid==(null==n.currentOrder?null:n.currentOrder.uid)?"selectedRow":"stdRow"),t.xp6(1),t.Oqu(e.status),t.xp6(1),t.Q6J("ngClass",e.uid==(null==n.currentOrder?null:n.currentOrder.uid)?"selectedRow":"stdRow"),t.xp6(1),t.Oqu(t.xi3(12,13,e.total,e.currencySymbol))}}const{DateTime:K}=c(8087);let S=class{constructor(r,e,n,l,o){this.store=r,this.translocoService=e,this.userService=n,this.logger=l,this.deviceService=o,this._orderStatus="COMPLETE",this.viewOrders=!0,this.orderList=[],this.currencies=[],this.currencySymbol="\xa3",this.store.pipe((0,v.Ys)(I.Ib),(0,m.t)(this)).subscribe(s=>this.currentOrder=s),this.store.pipe((0,v.Ys)(J.J5),(0,m.t)(this)).subscribe(s=>{s&&(this.orderList=[],this.orders=s,this.filterList())}),this.store.pipe((0,v.Ys)(V.z),(0,m.t)(this)).subscribe(s=>{this.currencies=s,s&&this.filterList()}),this.store.pipe((0,v.Ys)(I.Ai),(0,m.t)(this)).subscribe(s=>this.viewOrders=s)}set orderStatus(r){this._orderStatus=r.toUpperCase(),this.filterList()}get orderStatus(){return this._orderStatus}ngOnInit(){}filterList(){var r;if(this.orderList=[],this.orders&&this.orders.length>0){for(let e of this.orders){this.currencySymbol="\xa3";for(let o of e.orderItems)this.currencySymbol=null===(r=this.currencies.find(s=>s.uid==o.currency))||void 0===r?void 0:r.symbol;const n=e.orderItems.reduce((o,s)=>o+s.price,0),l={uid:e.uid,status:e.orderState,isoDate:e.dateCreated,currencySymbol:this.currencySymbol?this.currencySymbol:"\xa3",orderDate:K.fromISO(e.dateCreated).toLocaleString(K.DATETIME_MED),total:n,artist:e.artist_gallery?e.artist_gallery:"",collector:e.user_name?e.user_name:""};this.orderList.push(l)}console.log(this.orderStatus),"ALL"!=this.orderStatus&&(this.orderList=this.orderList.filter(e=>e.status==this.orderStatus)),this.orderList.sort((e,n)=>e.isoDate<n.isoDate?1:-1)}}setOrder(r){var e;const n=null===(e=this.orders)||void 0===e?void 0:e.find(l=>l.uid==r.uid);n&&this.store.dispatch(new T.YX(n))}};S.\u0275fac=function(r){return new(r||S)(t.Y36(v.yh),t.Y36(C.Vn),t.Y36(F.K),t.Y36(M.m),t.Y36(R.x0))},S.\u0275cmp=t.Xpm({type:S,selectors:[["app-artist-order-list-view"]],inputs:{orderStatus:"orderStatus"},decls:13,vars:1,consts:[[1,"orderTable"],[1,"orderHeaderRow"],[1,"orderHeaderRow","orderCellNumber"],[4,"ngFor","ngForOf"],[1,"orderCell",3,"ngClass","click"],[1,"orderCellNumber",3,"ngClass","click"]],template:function(r,e){1&r&&(t.TgZ(0,"div")(1,"div",0)(2,"div",1),t._uU(3,"Order Number"),t.qZA(),t.TgZ(4,"div",1),t._uU(5,"Order Date"),t.qZA(),t.TgZ(6,"div",1),t._uU(7,"Collector"),t.qZA(),t.TgZ(8,"div",1),t._uU(9,"Status"),t.qZA(),t.TgZ(10,"div",2),t._uU(11,"Order Value"),t.qZA(),t.YNc(12,z,13,16,"ng-container",3),t.qZA()()),2&r&&(t.xp6(12),t.Q6J("ngForOf",e.orderList))},directives:[O.sg,O.mk],pipes:[O.uU,O.H9],styles:[".orderTable[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,1fr)}.orderHeaderRow[_ngcontent-%COMP%]{color:#dedede;text-align:left;padding:5px 20px}.orderCellNumber[_ngcontent-%COMP%]{text-align:right;padding:5px 20px}.selectedRow[_ngcontent-%COMP%]{background-color:#dedede;cursor:pointer;font-weight:700}.stdRow[_ngcontent-%COMP%]{background-color:revert;cursor:pointer;font-weight:400}.orderCell[_ngcontent-%COMP%]{padding:5px 20px}"]}
1),S=(0,Z.gn)([(0,m.c)()],S);var p=c(8088),W=c(8967),tt=c(5226),x=c.n(tt),L=c(7275),f=c(2340),et=c(6288),rt=c(4652),it=c(4489),q=c(520),st=c(8232),nt=c(2932),ot=c(130),ct=c(8132),dt=c(1463);function lt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",5),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).delete()}),t._uU(1,"Delete"),t.qZA()}}function at(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",6),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).dispatched()}),t._uU(1,"Dispatch"),t.qZA()}}function ut(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",7),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).complete()}),t._uU(1,"Complete"),t.qZA()}}function ht(i,r){if(1&i&&(t.TgZ(0,"div",1),t.YNc(1,lt,2,0,"button",2),t.YNc(2,at,2,0,"button",3),t.YNc(3,ut,2,0,"button",4),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.canBeDeleted),t.xp6(1),t.Q6J("ngIf",e.canBeDispatched&&e.currentOrder.orderState!=e.environment.orderStatus.pending),t.xp6(1),t.Q6J("ngIf",e.currentOrder.orderState!=e.environment.orderStatus.complete&&e.currentOrder.orderState!=e.environment.orderStatus.pending)}}const{DateTime:D}=c(8087);let A=class{constructor(r,e,n,l,o,s,a,u){this.http=r,this.store=e,this.router=n,this.orderService=l,this.translocoService=o,this._FileSaverService=s,this.deviceService=a,this.logger=u,this.canBeDispatched=!1,this.canBeCanceled=!1,this.canBeDeleted=!1,this.environment=f.N,this.store.pipe((0,v.Ys)(I.Ib),(0,m.t)(this)).subscribe(d=>{var h;switch(this.currentOrder=d,null===(h=this.currentOrder)||void 0===h?void 0:h.orderState){case f.N.orderStatus.inProgress:this.canBeCanceled=!0,this.canBeDeleted=!0,this.canBeDispatched=!0;break;case f.N.orderStatus.canceled:this.canBeCanceled=!1,this.canBeDeleted=!1,this.canBeDispatched=!1;break;case f.N.orderStatus.pending:this.canBeCanceled=!0,this.canBeDeleted=!0,this.canBeDispatched=!0;break;case f.N.orderStatus.complete:this.canBeCanceled=!1,this.canBeDeleted=!1,this.canBeDispatched=!1}})}ngOnInit(){}delete(){if(this.currentOrder){const r=this.translocoService.translate("BASKET.DELETE-TITLE"),e=this.translocoService.translate("BASKET.DELETE-TEXT"),n=this.translocoService.translate("BASKET.DELETE-ITEM-CONFIRM-BUTTON-TEXT"),l=this.translocoService.translate("BASKET.DELETE-ITEM-CANCEL-BUTTON-TEXT");x().fire({title:r,text:e,icon:"question",showCancelButton:!0,customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1,confirmButtonText:n,cancelButtonText:l}).then(o=>{o.value&&this.currentOrder instanceof p.KM&&(this.store.dispatch(new L.Ee(this.currentOrder)),this.store.dispatch(new T.uw),this.store.dispatch(new T.Ff(this.translocoService.translate("BASKET.ORDER-DELETED"))),this.router.navigate(["admin/orders"]))})}}complete(){if(this.currentOrder){const r=this.translocoService.translate("BASKET.ORDER-COMPLETE-TITLE"),e=this.translocoService.translate("BASKET.ORDER-COMPLETE-TEXT"),n=this.translocoService.translate("BASKET.ORDER-COMPLETE-BUTTON-CONFIRM"),l=this.translocoService.translate("BASKET.ORDER-COMPLETE-BUTTON-CANCEL");x().fire({title:r,text:e,icon:"question",showCancelButton:!0,customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1,confirmButtonText:n,cancelButtonText:l}).then(o=>{if(o.value&&this.currentOrder instanceof p.KM){const s=Object.assign(new p.KM,this.currentOrder);let a=[];s.orderItems.forEach(u=>{const d=Object.assign(new p.Dd,u);d.orderItemComplete=D.now().toString(),d.deliveryStatus=f.N.deliveryStatus.deliveryComplete,a.push(d)}),s.orderItems=a,s.orderState=f.N.orderStatus.complete,s.dateUpdated=D.now().toString(),this.store.dispatch(new T.Ff(this.translocoService.translate("BASKET.ITEM-UPDATED"))),this.store.dispatch(new L.qJ(s))}})}}dispatched(){if(this.currentOrder){const r=this.translocoService.translate("BASKET.DISPATCH-ITEM-TITLE"),e=this.translocoService.translate("BASKET.DISPATCH-ITEM-TEXT"),n=this.translocoService.translate("BASKET.DISPATCH-ITEM-CONFIRM-BUTTON-TEXT"),l=this.translocoService.translate("BASKET.DISPATCH-ITEM-CANCEL-BUTTON-TEXT");x().fire({title:r,text:e,icon:"question",input:"text",showCancelButton:!0,customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1,confirmButtonText:n,cancelButtonText:l}).then(o=>{if(o.value&&this.currentOrder instanceof p.KM){const s=Object.assign(new p.KM,this.currentOrder);let a=[];
1s.orderItems.forEach(u=>{const d=Object.assign(new p.Dd,u);d.deliveryStatus!=f.N.deliveryStatus.deliveryDigital&&(d.deliveryStatus=f.N.deliveryStatus.deliveryDispatched,d.deliveryTrackingNumber=o.value,d.orderItemDispatched=D.now().toString()),a.push(d)}),s.orderItems=a,s.orderState=f.N.orderStatus.inProgress,s.dateUpdated=D.now().toString(),this.orderService.orderDispatched(s),this.store.dispatch(new T.Ff(this.translocoService.translate("BASKET.ITEM-UPDATED"))),this.store.dispatch(new L.qJ(s))}})}}};function pt(i,r){if(1&i&&t._UZ(0,"app-order-item-row",7),2&i){const e=r.$implicit,n=t.oxw(2);t.Q6J("item",e)("orderListType","USER")("orderInProcess","IN-PROCESS"==(null==n.currentOrder?null:n.currentOrder.orderState))}}function vt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.name())}}function mt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.addressLineOne)}}function ft(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.addressLineTwo)}}function Tt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.addressCity)}}function Ot(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.addressPostcode)}}function gt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.addressCountry)}}function xt(i,r){if(1&i&&(t.TgZ(0,"div")(1,"a",8),t._uU(2),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(1),t.MGl("href","mailto:",null==e.orderUser?null:e.orderUser.email,"",t.LSH),t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.email)}}function Ct(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(null==e.orderUser?null:e.orderUser.phone)}}function St(i,r){if(1&i&&(t.TgZ(0,"div",4)(1,"div"),t._uU(2,"Order Status"),t.qZA(),t.TgZ(3,"div"),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6,"Order Number"),t.qZA(),t.TgZ(7,"div"),t._uU(8),t.qZA(),t.TgZ(9,"div"),t._uU(10,"Order Date"),t.qZA(),t.TgZ(11,"div"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.TgZ(14,"div"),t._uU(15,"Order Value"),t.qZA(),t.TgZ(16,"div"),t._uU(17),t.ALo(18,"currency"),t.qZA(),t.YNc(19,pt,1,3,"app-order-item-row",5),t.TgZ(20,"div"),t._uU(21,"Shipping address"),t.qZA(),t.TgZ(22,"div"),t.YNc(23,vt,2,1,"div",3),t.YNc(24,mt,2,1,"div",3),t.YNc(25,ft,2,1,"div",3),t.YNc(26,Tt,2,1,"div",3),t.YNc(27,Ot,2,1,"div",3),t.YNc(28,gt,2,1,"div",3),t.YNc(29,xt,3,2,"div",3),t.YNc(30,Ct,2,1,"div",3),t.qZA(),t._UZ(31,"app-order-creator-actions",6),t.qZA()),2&i){const e=t.oxw();
1t.xp6(4),t.hij(" ",null==e.currentOrder?null:e.currentOrder.orderState,""),t.xp6(4),t.hij(" ",null==e.currentOrder?null:e.currentOrder.uid,""),t.xp6(4),t.hij(" ",t.xi3(13,13,null==e.currentOrder?null:e.currentOrder.dateCreated,"dd/MM/yyyy HH:mm"),""),t.xp6(5),t.Oqu(t.xi3(18,16,e.runningTotal,e.activeCurrency)),t.xp6(2),t.Q6J("ngForOf",e.orderArtworks),t.xp6(4),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.name()),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.addressLineOne),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.addressLineTwo),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.addressCity),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.addressPostcode),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.addressCountry),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.email),t.xp6(1),t.Q6J("ngIf",null==e.orderUser?null:e.orderUser.phone)}}function At(i,r){1&i&&(t.TgZ(0,"div")(1,"div",9),t._uU(2),t.ALo(3,"transloco"),t.qZA()()),2&i&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"BASKET.NO-ORDERS")))}A.\u0275fac=function(r){return new(r||A)(t.Y36(q.eN),t.Y36(v.yh),t.Y36(U.F0),t.Y36(ct.p),t.Y36(C.Vn),t.Y36(dt.m9),t.Y36(R.x0),t.Y36(M.m))},A.\u0275cmp=t.Xpm({type:A,selectors:[["app-order-creator-actions"]],decls:1,vars:1,consts:[["class","order-action-buttons",4,"ngIf"],[1,"order-action-buttons"],["status","primary","class","btn btn-secondary","type","button","style","margin: auto 10px auto 10px;",3,"click",4,"ngIf"],["class","btn btn-secondary","type","button","style","margin: auto 10px auto 10px;",3,"click",4,"ngIf"],["class","btn btn-primary","type","button","style","margin: auto 10px auto 10px;",3,"click",4,"ngIf"],["status","primary","type","button",1,"btn","btn-secondary",2,"margin","auto 10px auto 10px",3,"click"],["type","button",1,"btn","btn-secondary",2,"margin","auto 10px auto 10px",3,"click"],["type","button",1,"btn","btn-primary",2,"margin","auto 10px auto 10px",3,"click"]],template:function(r,e){1&r&&t.YNc(0,ht,4,3,"div",0),2&r&&t.Q6J("ngIf",e.currentOrder)},directives:[O.O5],styles:[".order-action-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;gap:10px}@media screen and (max-width: 768px){.order-action-buttons[_ngcontent-%COMP%]{flex-direction:column}}"]}),A=(0,Z.gn)([(0,m.c)()],A);let b=class{constructor(r,e,n,l,o,s,a,u){this.store=r,this.translocoService=e,this.http=n,this.logger=l,this._nftService=o,this.userService=s,this.artworkService=a,this.deviceService=u,this.currencies=[],this.activeCurrency="gbp",this.platform=null,this.artworks=[],this.collections=[],this.firstView=!0,this.orderArtworks=[],this.orderEnabled=!0,this.orderInProcess=!1,this.runningTotal=0,this.viewTotal=!0,this.errMsg=null,this.store.pipe((0,v.Ys)(I.ek),(0,m.t)(this)).subscribe(d=>this.platform=d),this.store.pipe((0,v.Ys)(V.z),(0,m.t)(this)).subscribe(d=>{this.currencies=d,d&&this.store.pipe((0,v.Ys)(I.Ib),(0,m.t)(this)).subscribe(h=>{this.currentOrder=h,this.orderState=void 0,this.currentOrder&&this.currentOrder.orderState&&(this.orderState=this.currentOrder.orderState),h&&(this.store.pipe((0,v.Ys)(W.YP),(0,m.t)(this)).subscribe(N=>{var y;if(this.artists=N,this.artists.length>0){this.currentArtist=this.artists.find(_=>{var Y;return _.uid==(null===(Y=this.currentOrder)||void 0===Y?void 0:Y.artist_id)});const w={artist_uid:null===(y=this.currentArtist)||void 0===y?void 0:y.uid,auth:!1};this.artworkService.getArtistArtwork(w).subscribe({next:_=>{this.artworks=_,_&&this.currentOrder&&this.selectOrder(this.currentOrder)},error:_=>{this.logger.log(_)}})}}),"PENDING"==h.orderState&&(this.currentOrder=Object.assign(new p.KM,h)))})}),this.store.pipe((0,v.Ys)(rt.iG),(0,m.t)(this)).subscribe(d=>{this.collections=d})}ngOnInit(){}selectOrder(r){var e,n;if(this.artworks&&this.artworks.length>0&&(this.firstView=!1),this.orderArtworks=[],this.runningTotal=0,this.orderEnabled=!0,!(null===(e=r.orderItems)||void 0===e?void 0:e.length))return void(this.viewTotal=!1);const l=r.orderItems[0].currency,o=null===(n=this.currencies.find(s=>s.uid===l))||void 0===n?void 0:n.stripeCurrency;o&&(this.activeCurrency=o.toUpperCase()),this.viewTotal=!0,this.currencyCheck(),r.orderItems.forEac
1h(s=>{if(s.currency!=r.orderItems[0].currency&&(this.viewTotal=!1),"Collection"==s.productType){const a=this.collections.find(d=>d.uid==s.productId),u=Object.assign(new p.Cj,a);if(u){const d={orderItem:s,quantity:s.quantity,item:Object.assign(new p.Cj,u)},h=Number(s.price);Number.isFinite(h)&&(this.runningTotal=this.runningTotal+h),this.orderArtworks.push(d),u.availableForSale()||(this.orderEnabled=!1)}}else{const a=this.artworks.find(d=>d.uid==s.productId),u=Object.assign(new p.iB,a);if(u){const d={orderItem:s,quantity:s.quantity,item:Object.assign(new p.iB,u)},h=Number(s.price);Number.isFinite(h)&&(this.runningTotal=this.runningTotal+h),this.orderArtworks.push(d),u.availableForSale()||(this.orderEnabled=!1)}}}),"PENDING"==r.orderState&&!this.orderInProcess&&(this.errMsg=null,this.orderArtworks.forEach(s=>{var a,u,d,h;const N=null===(a=this.currentOrder)||void 0===a?void 0:a.orderItems.filter(y=>{var w;return y.productId==(null===(w=null==s?void 0:s.item)||void 0===w?void 0:w.uid)}).reduce((y,w)=>y+w.quantity,0);N&&s.item&&N>(null===(u=s.item)||void 0===u?void 0:u.availableQuantity)&&"3"!=s.item.editionType&&(this.orderEnabled=!1,this.errMsg=`There are too many '${null===(d=s.item)||void 0===d?void 0:d.title}' items in the basket - maximum is ${null===(h=s.item)||void 0===h?void 0:h.availableQuantity}`)})),this.orderUser=Object.assign(new p.KM,r).shippingUser(),r.user_id&&this.userService.getUser({uid:r.user_id}).subscribe({next:a=>{a&&!Array.isArray(a)&&a.uid&&(this.orderUser=Object.assign(new p.n5,a))},error:()=>{}})}currencyCheck(){if(this.currentOrder&&this.orderEnabled){let r="";for(let e=0;e<this.currentOrder.orderItems.length;e++)if(""==r)r=this.currentOrder.orderItems[e].currency;else if(r!=this.currentOrder.orderItems[e].currency){this.store.dispatch(new T.vX("Mixed Currency items, please remove items with different currencies")),this.orderEnabled=!1;break}}}deleteOrder(){this.currentOrder&&x().fire({title:this.translocoService.translate("BASKET.DELETE-TITLE"),text:this.translocoService.translate("BASKET.DELETE-TEXT"),icon:"warning",showCancelButton:!0,customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1,confirmButtonText:this.translocoService.translate("BASKET.DELETE-CONFIRM-BUTTON-TEXT"),cancelButtonText:this.translocoService.translate("BASKET.DELETE-CANCEL-BUTTON-TEXT")}).then(r=>{r.value?(this.currentOrder instanceof p.KM&&this.store.dispatch(new L.Ee(this.currentOrder)),x().fire({title:this.translocoService.translate("BASKET.DELETE-CONFIRM-DIALOG-TITLE"),text:this.translocoService.translate("BASKET.DELETE-CONFIRM-DIALOG-TEXT"),icon:"success",customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1}),this.store.dispatch(new T.YX(void 0))):r.dismiss===x().DismissReason.cancel&&x().fire({title:this.translocoService.translate("BASKET.DELETE-CANCEL-DIALOG-TITLE"),text:this.translocoService.translate("BASKET.DELETE-CANCEL-DIALOG-TEXT"),icon:"error",customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1})})}buyProduct(){var r,e,n;this.orderInProcess=!0;let l=!1;null===(r=this.currentOrder)||void 0===r||r.orderItems.forEach(o=>{o.deliveryStatus==f.N.deliveryStatus.deliveryNFTPending&&(l=!0)}),l?x().fire({title:this.translocoService.translate("NFT.CREATOR-WALLET-TITLE"),text:this.translocoService.translate("NFT.CREATOR-WALLET-TEXT"),icon:"question",input:"text",inputValue:null!==(n=null===(e=this.orderUser)||void 0===e?void 0:e.walletAddress)&&void 0!==n?n:"",showCancelButton:!0,customClass:{confirmButton:"btn btn-primary swal-button",cancelButton:"btn btn-secondary swal-button"},buttonsStyling:!1,confirmButtonText:this.translocoService.translate("COMMON.SAVE"),cancelButtonText:this.translocoService.translate("COMMON.CANCEL")}).then(o=>{if(o.value){const s=Object.assign(new p.n5,this.orderUser);s.walletAddress=o.value,s.solanaPublicKey=o.value,this._nftService.checkAddress(o.value).subscribe({next:a=>{a&&1==a?(this.store.dispatch(new et.Rl(s)),this.executeOrder()):this.store.dispatch(new T.vX("Solana Wallet Address is not val
1id"))},error:a=>{this.store.dispatch(new T.vX("Solana Wallet Address is not valid"))},complete:()=>{}})}}):this.executeOrder()}executeOrder(){var r,e,n,l,o,s,a;if(null===(r=this.platform)||void 0===r?void 0:r.isBrowser){const u={stripeOrder:{uid:null===(e=this.currentOrder)||void 0===e?void 0:e.uid,artistId:null===(n=this.currentOrder)||void 0===n?void 0:n.artist_id,userId:null===(l=this.currentOrder)||void 0===l?void 0:l.user_id,success_url:`${document.location.origin}/home/stripe-success`,cancel_url:`${document.location.origin}/home/stripe-error`}};sessionStorage.setItem("currentOrder",null===(o=this.currentOrder)||void 0===o?void 0:o.uid),this.logger.log(`${f.N.firebaseFunction}/orders/${null===(s=this.currentOrder)||void 0===s?void 0:s.uid}/buy-stripe-product`),this.http.post(`${f.N.firebaseFunction}/orders/${null===(a=this.currentOrder)||void 0===a?void 0:a.uid}/buy-stripe-product`,u).subscribe({next:d=>{this.orderInProcess=!1,window.location.href=d.url.url},error:d=>{this.orderInProcess=!1,this.logger.info(`Placing Order Error: ${(null==d?void 0:d.status)||(null==d?void 0:d.message)||"unknown"}`),(0,it.tz)(d,this.store)}})}}};b.\u0275fac=function(r){return new(r||b)(t.Y36(v.yh),t.Y36(C.Vn),t.Y36(q.eN),t.Y36(M.m),t.Y36(st._),t.Y36(F.K),t.Y36(nt.O),t.Y36(R.x0))},b.\u0275cmp=t.Xpm({type:b,selectors:[["app-artist-order-detail-view"]],decls:5,vars:2,consts:[[1,"orderDetailView"],[2,"font-size","24px","line-height","24px","font-weight","bold"],["class","mt-5","style","display: grid;\n              grid-template-columns: 20% 80%;\n              gap: 20px; /* Adjust the gap between the columns (and rows) as needed */",4,"ngIf"],[4,"ngIf"],[1,"mt-5",2,"display","grid","grid-template-columns","20% 80%","gap","20px"],["style","grid-column: 1 / 3;",3,"item","orderListType","orderInProcess",4,"ngFor","ngForOf"],[2,"grid-column","1 / 3"],[2,"grid-column","1 / 3",3,"item","orderListType","orderInProcess"],[3,"href"],[1,"mt-5",2,"font-size","24px","line-height","24px","padding-bottom","10px"]],template:function(r,e){1&r&&(t.TgZ(0,"div",0)(1,"span",1),t._uU(2,"Order Details:"),t.qZA(),t.YNc(3,St,32,19,"div",2),t.YNc(4,At,4,3,"div",3),t.qZA()),2&r&&(t.xp6(3),t.Q6J("ngIf",e.currentOrder),t.xp6(1),t.Q6J("ngIf",!e.currentOrder))},directives:[O.O5,O.sg,ot.N,A],pipes:[O.uU,O.H9,C.Ot],styles:[".orderDetailView[_ngcontent-%COMP%]{background-color:#dedede;padding:20px;min-height:100%}"]}),b=(0,Z.gn)([(0,m.c)()],b);let E=class{constructor(r,e,n,l,o){this.translocoService=r,this.store=e,this.titleService=n,this.route=l,this.analyticsService=o,this.orders=[],this._selectedItem="ALL",this.store.pipe((0,v.Ys)(J.sy),(0,m.t)(this)).subscribe(s=>{this.orders=s}),this.titleService.setTitle("LettsArt Orders")}set selectedItem(r){this._selectedItem=r,this.store.dispatch(new T.YX(void 0))}get selectedItem(){return this._selectedItem}ngOnInit(){this.route.params.subscribe(e=>{const n=e.id;if(this.orders){const l=this.orders.find(o=>o.uid==n);l&&this.store.dispatch(new T.YX(l))}}),this.analyticsService.pageView("Collector Orders")}};E.\u0275fac=function(r){return new(r||E)(t.Y36(C.Vn),t.Y36(v.yh),t.Y36(H.Dx),t.Y36(U.gz),t.Y36($.B))},E.\u0275cmp=t.Xpm({type:E,selectors:[["app-orders"]],decls:33,vars:22,consts:[[1,"show-mobile","mb-2","mt-3"],[2,"padding-top","20px"],[3,"title","subtitle"],[1,"p-1","row","full-name-inputs","userProfileForm","mt-3"],[1,"col-12","col-md-6"],[3,"placeholder","ngModel","ngModelChange"],["value","ALL"],["value","PENDING"],["value","IN-PROGRESS"],["value","COMPLETE"],["value","CANCELED"],[1,"orderView","gap-5",2,"flex","0 0 50%"],[3,"orderStatus"],[2,"flex","0 0 50%"]],template:function(r,e){1&r&&(t.TgZ(0,"nb-card")(1,"nb-card-header")(2,"div"),t._UZ(3,"app-search-bar",0),t.qZA(),t.TgZ(4,"div",1),t._UZ(5,"app-title-section",2),t.qZA()(),t.TgZ(6,"nb-card-body")(7,"div")(8,"div")(9,"div",3)(10,"div",4)(11,"nb-select",5),t.NdJ("ngModelChange",function(l){return e.selectedItem=l}),t.ALo(12,"transloco"),t.TgZ(13,"nb-option",6),t._uU(14),t.ALo(15,"transloco"),t.qZA(),t.TgZ(16,"nb-option",7),t._uU(17),t.ALo(18,"transloco"),t.qZA(),t.TgZ(19,"nb-option",8),t._uU(20),t.ALo(21,"transloco"),t.qZA(),t.TgZ(22,"nb-option",9),t._uU(23),t.ALo(24,"transloco"),t.qZA(),t.TgZ(25,"nb-option",10),t._uU(26),t.ALo(27,"transloco"),t.qZA()()()()(),t.TgZ(28,"div",11)(29,"div"),t._UZ(30,"app-artist-order-list-view",12),t.qZA(),t.TgZ(31,"div",13),t._UZ(32,"app-artist-order-detail-view"),t.qZA()()()()()),2&r&&(t.xp6(5),t.Q6J("title",e.translocoService.translate("ORDERS.ARTIST.TITLE"))("subtitle",e.translocoService.translate("ORDERS.ARTIST.SUBTITLE")),t.xp6(6),t.s9C("placeholder",t.lcZ(12,10,"ORDERS.ORDER-STATUS-PLACEHOLDER")),t.Q6J("ngModel",e.selectedItem),t.xp6(3),t.hij(" ",t.lcZ(1
15,12,"ORDERS.STATUS.ALL"),""),t.xp6(3),t.hij(" ",t.lcZ(18,14,"ORDERS.STATUS.PENDING"),""),t.xp6(3),t.hij(" ",t.lcZ(21,16,"ORDERS.STATUS.IN-PROGRESS"),""),t.xp6(3),t.Oqu(t.lcZ(24,18,"ORDERS.STATUS.COMPLETE")),t.xp6(3),t.Oqu(t.lcZ(27,20,"ORDERS.STATUS.CANCELED")),t.xp6(4),t.Q6J("orderStatus",e.selectedItem))},directives:[g.Asz,g.ndF,G.N,k.l,g.yKW,g.rs,B.JJ,B.On,g.q51,S,b],pipes:[C.Ot],styles:[".orderView[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:row;justify-content:space-between}@media screen and (max-width: 768px){.orderView[_ngcontent-%COMP%]{flex-direction:column}}"]}),E=(0,Z.gn)([(0,m.c)()],E);const bt=[{path:"",canActivate:[X.a],component:E}];let Et=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[U.Bz.forChild(bt)],U.Bz]}),i})();var yt=c(6046);let wt=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[O.ez,Et,Q.T,j.b,C.y4,g.oGl,g.x4g,g.IIj,B.u5,yt.W,g.zyh]]}),i})()}}]);

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.