PageSourceSearch

https://toolineo.de/quoting.97934da5b23e6ff5.js

js toolineo.de collected 2026-10-06 21:49:02 UTC 59,757 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunktoolineo_eshop_pwa=self.webpackChunktoolineo_eshop_pwa||[]).push([[304],{26511:(k,S,o)=>{o.d(S,{Hm:()=>g,I$:()=>C,u2:()=>R});var n=o(11439),i=o(38093),t=o(70271),q=o(2435),e=o(91817),a=o(36647),F=o(98764),P=o(2515),$=o(51567),y=o(71663),x=o(37929),c=o(12907),r=o(68559);const C=m=>m.pipe((0,t.T)(v=>Date.now()>v.entityAsQuote?.validFromDate)),g=m=>m.pipe((0,t.T)(v=>Date.now()<v.entityAsQuote?.validToDate&&Date.now()>v.entityAsQuote?.validFromDate));let R=(()=>{class m extends i.Yz{constructor(O){super(),this.store=O,O.pipe((0,q.$)()).subscribe(B=>{(0,c.Q8)(B)||this.store.dispatch((0,c.AR)())}),this.connect("loading",this.store.pipe((0,n.Lt)(c.qt))),this.connect("error",this.store.pipe((0,n.Lt)(c.uK))),this.connect("entity",this.select("id").pipe((0,y.zV)(),(0,e.F)(),(0,a.n)(B=>this.store.pipe((0,n.Lt)((0,c.JO)(B)),(0,y.zV)(),(0,F.M)(Q=>{"Detail"!==Q?.completenessLevel&&this.store.dispatch((0,c.vh)({entity:Q,level:"Detail"}))}),(0,P.X)(this.select("loading").pipe((0,y.IH)())),(0,$.p)(Q=>"Detail"===Q?.completenessLevel),(0,t.T)(Q=>Q))),(0,y.zV)())),this.connect("entityAsQuoteRequest",this.select("entity").pipe((0,t.T)(x.o.asQuoteRequest))),this.connect("entityAsQuote",this.select("entity").pipe((0,t.T)(x.o.asQuote))),this.connect("state",this.select("entity").pipe((0,t.T)(x.o.state),(0,e.F)())),this.connect("editable",this.select("state").pipe((0,t.T)(B=>"New"===B)))}updateItem(O){O.quantity?this.store.dispatch((0,c.n5)({id:this.get("entity","id"),changes:[{type:"change-item",itemId:O.itemId,quantity:O.quantity}]})):this.deleteItem(O.itemId)}deleteItem(O){this.store.dispatch((0,c.n5)({id:this.get("entity","id"),changes:[{type:"remove-item",itemId:O}]}))}reject(){this.store.dispatch((0,c.Ic)({id:this.get("entity","id")}))}copy(){"Quote"===this.get("entity","type")?this.store.dispatch((0,c.Yh)({id:this.get("entity","id")})):this.store.dispatch((0,c.xO)({id:this.get("entity","id")}))}addToBasket(){this.store.dispatch((0,c.R3)({id:this.get("entity","id")}))}update(O){this.store.dispatch((0,c.n5)({id:this.get("entity","id"),changes:[{type:"meta-data",...O}]}))}submit(){this.set("justSubmitted",()=>!0),this.store.dispatch((0,c.iW)({id:this.get("entity","id")}))}static{this.\u0275fac=function(B){return new(B||m)(r.KVO(n.il))}}static{this.\u0275prov=r.jDH({token:m,factory:m.\u0275fac})}}return m})()},90752:(k,S,o)=>{o.d(S,{s:()=>C});var n=o(11439),i=o(75797),t=o(1440),q=o(14876),e=o(64334),a=o(2515),F=o(98764),P=o(70271),$=o(36647),y=o(71663),x=o(37929),c=o(12907),r=o(68559);let C=(()=>{class g{constructor(m,v){this.store=m,this.isStable$=new i.t(!1),this.loading$=this.store.pipe((0,n.Lt)(c.qt)),v.isStable.pipe((0,y.zV)(),(0,e.s)(1)).subscribe(O=>this.isStable$.next(O))}quotingEntities$(m={automaticRefresh:!0}){return this.loadQuoting(),this.store.pipe((0,n.Lt)(c.XH),(0,a.X)(this.loading$.pipe((0,y.IH)())),m?.automaticRefresh?this.automaticQuoteRefresh():t.D,(0,F.M)(v=>{v.filter(x.o.isStub).forEach(O=>{this.store.dispatch((0,c.vh)({entity:O,level:"List"}))})}),(0,P.T)(v=>v.filter(x.o.isNotStub)))}state$(m){return this.store.pipe((0,n.Lt)((0,c.JO)(m)),(0,P.T)(x.o.state))}name$(m){return this.store.pipe((0,n.Lt)((0,c.JO)(m)),(0,P.T)(v=>v?.displayName))}delete(m){this.store.dispatch((0,c.Iy)({entity:m}))}createQuoteRequestFromBasket(){this.store.dispatch((0,c.kE)())}loadQuoting(){this.store.dispatch((0,c.AR)())}deleteQuoteFromBasket(m){this.store.dispatch((0,c.GK)({id:m}))}automaticQuoteRefresh(){return m=>m.pipe((0,y.sv)(this.isStable$.pipe((0,y.zV)())),(0,$.n)(v=>(0,q.O)(0,6e4).pipe((0,F.M)(O=>{O&&this.loadQuoting()}),(0,P.T)(()=>v))))}static{this.\u0275fac=function(v){return new(v||g)(r.KVO(n.il),r.KVO(r.o8S))}}static{this.\u0275prov=r.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}}return g})()},61963:(k,S,o)=>{o.d(S,{w:()=>W});var n=o(68559),i=o(7047),t=o(11439),q=o(95072),e=o(51567),a=o(12907),F=o(26511);let P=(()=>{class T extends F.u2{constructor(d){super(d),this.connect("id",d.pipe((0,t.Lt)(a.Tb)))}static{this.\u0275fac=function(h){return new(h||T)(n.KVO(t.il))}}static{this.\u0275prov=n.jDH({token:T,factory:T.\u0275fac})}}return T})();var $=o(20750),y=o(71803),x=o(60316),c=o(12993),r=o(84843),C=o(92075),g=o(48503);const R=()=>["/account/quotes"];function m(T,_){1&T&&(n.qex(0),n.EFF(1),n.nI1(2,"translate"),n.bVm()),2&T&&(n.R7$(),n.Sp
1I(" ",n.bMT(2,1,"quote.edit.submitted.heading")," "))}function v(T,_){if(1&T&&(n.EFF(0),n.nI1(1,"translate")),2&T){const d=n.XpG(2).ngIf;n.Lme(" ",n.bMT(1,2,"quote.edit.unsubmitted.quote_request_details.text")," - ",d.displayName||d.number," ")}}function O(T,_){1&T&&(n.qex(0),n.nrm(1,"ish-quote-edit"),n.bVm())}function B(T,_){1&T&&n.nrm(0,"ish-quote-view")}function Q(T,_){if(1&T){const d=n.RV6();n.qex(0),n.j41(1,"div",3)(2,"h2",4),n.DNE(3,m,3,3,"ng-container",5)(4,v,2,4,"ng-template",null,0,n.C5r),n.k0s(),n.j41(6,"button",6),n.nI1(7,"translate"),n.bIt("click",function(){n.eBV(d);const E=n.XpG(2);return n.Njj(E.hide())}),n.j41(8,"span",7),n.EFF(9,"\xd7"),n.k0s()()(),n.j41(10,"div",8),n.nrm(11,"ish-error-message",9),n.nI1(12,"async"),n.DNE(13,O,2,0,"ng-container",5)(14,B,1,0,"ng-template",null,1,n.C5r),n.k0s(),n.j41(16,"div",10)(17,"a",11),n.EFF(18),n.nI1(19,"translate"),n.k0s(),n.nrm(20,"ish-quote-interactions"),n.k0s(),n.bVm()}if(2&T){const d=_.ngIf,h=n.sdS(5),E=n.sdS(15),L=n.XpG(2);n.R7$(3),n.Y8G("ngIf","Submitted"===d)("ngIfElse",h),n.R7$(3),n.Y8G("title",n.bMT(7,8,"dialog.close.text")),n.R7$(5),n.Y8G("error",n.bMT(12,10,L.error$)),n.R7$(2),n.Y8G("ngIf","New"===d)("ngIfElse",E),n.R7$(4),n.Y8G("routerLink",n.lJ4(14,R)),n.R7$(),n.JRh(n.bMT(19,12,"account.quotes.widget.view_all_quotes.link"))}}function Y(T,_){if(1&T&&(n.qex(0),n.DNE(1,Q,21,15,"ng-container",2),n.nI1(2,"async"),n.bVm()),2&T){const d=n.XpG();n.R7$(),n.Y8G("ngIf",n.bMT(2,1,d.state$))}}function f(T,_){1&T&&n.nrm(0,"ish-loading")}let X=(()=>{class T{constructor(d,h){this.context=d,this.router=h}ngOnInit(){this.activeQuoteRequest$=this.context.select("entity"),this.loading$=this.context.select("loading"),this.state$=this.context.select("state"),this.error$=this.context.select("error"),this.context.hold(this.router.events.pipe((0,e.p)(d=>d instanceof q.wF)),()=>this.hide())}hide(){this.modalRef.dismiss()}static{this.\u0275fac=function(h){return new(h||T)(n.rXU(F.u2),n.rXU(q.Ix))}}static{this.\u0275cmp=n.VBU({type:T,selectors:[["ish-product-add-to-quote-dialog"]],features:[n.Jv_([{provide:F.u2,useClass:P}])],decls:4,vars:6,consts:[["quoteTitle",""],["elseTemplate",""],[4,"ngIf"],[1,"modal-header"],[1,"modal-title"],[4,"ngIf","ngIfElse"],["type","button",1,"close",3,"click","title"],["aria-hidden","true"],[1,"modal-body"],[3,"error"],[1,"modal-footer"],[1,"btn","btn-link","mr-auto",3,"routerLink"]],template:function(h,E){1&h&&(n.DNE(0,Y,3,3,"ng-container",2),n.nI1(1,"async"),n.DNE(2,f,1,0,"ish-loading",2),n.nI1(3,"async")),2&h&&(n.Y8G("ngIf",n.bMT(1,2,E.activeQuoteRequest$)),n.R7$(2),n.Y8G("ngIf",n.bMT(3,4,E.loading$)))},dependencies:[$.f,y.q,x.bT,q.Wk,c.o,r.P,C.p,x.Jj,g.D9],encapsulation:2,changeDetection:0})}}return T})();function W(T){const _=(0,n.WQX)(i.Bq);(0,n.WQX)(t.il).dispatch((0,a.H_)({sku:T.queryParamMap.get("sku"),quantity:+T.queryParamMap.get("quantity")}));const h=_.open(X,{centered:!0,size:"lg"});return h.componentInstance.modalRef=h,!1}},37929:(k,S,o)=>{o.d(S,{o:()=>n});class n{static isStub(t){return!t?.completenessLevel||"Stub"===t.completenessLevel}static isNotStub(t){return!n.isStub(t)}static sort(t,q){return n.isStub(t)!==n.isStub(q)?n.isStub(t)?1:-1:n.isNotStub(t)&&n.isNotStub(q)?q.creationDate-t.creationDate:0}static state(t){return n.isNotStub(t)?n.isQuote(t)?t.rejected?"Rejected":t.validToDate<(new Date).getTime()?"Expired":"Responded":t.submittedDate?"Submitted":"New":"Unknown"}static itemCount(t){return t.items?.length??t?.itemCount}static asQuote(t){return t}static asQuoteRequest(t){return t}static isQuote(t){return n.isNotStub(t)&&"Quote"===t.type}}},22351:(k,S,o)=>{o.r(S),o.d(S,{QuoteListPageModule:()=>tt});var n=o(95072),i=o(87426),t=o(84205),q=o(33900),e=o(68559),a=o(90752),F=o(71803),P=o(60316),$=o(37929),y=o(85180),x=o(48503);const c=(u,p)=>({0:u,1:p});
1function r(u,p){if(1&u&&(e.j41(0,"span",3),e.EFF(1),e.nI1(2,"ishDate"),e.nI1(3,"ishDate"),e.nI1(4,"translate"),e.k0s()),2&u){const D=e.XpG();e.R7$(),e.JRh(e.i5U(4,7,"quote.edit.submitted.your_quote_expired.text",e.l_i(10,c,e.i5U(2,1,D.quote.validToDate,"shortDate"),e.i5U(3,4,D.quote.validToDate,"mediumTime"))))}}function C(u,p){if(1&u&&(e.EFF(0),e.nI1(1,"ishDate")),2&u){const D=e.XpG();e.JRh(e.i5U(1,1,D.quote.validToDate,"shortDate"))}}function g(u,p){1&u&&e.EFF(0,"-")}let R=(()=>{class u{constructor(D){this.quotingFacade=D}ngOnChanges(){this.state$=this.quotingFacade.state$(this.quote?.id)}static{this.\u0275fac=function(s){return new(s||u)(e.rXU(a.s))}}static{this.\u0275cmp=e.VBU({type:u,selectors:[["ish-quote-expiration-date"]],inputs:{quote:"quote"},features:[e.OA$],decls:5,vars:5,consts:[[3,"ngSwitch"],[3,"ngSwitchCase"],["ngSwitchDefault",""],[1,"text-danger"]],template:function(s,l){1&s&&(e.qex(0,0),e.nI1(1,"async"),e.DNE(2,r,5,13,"ng-template",1)(3,C,2,4,"ng-template",1)(4,g,1,0,"ng-template",2),e.bVm()),2&s&&(e.Y8G("ngSwitch",e.bMT(1,3,l.state$)),e.R7$(2),e.Y8G("ngSwitchCase","Expired"),e.R7$(),e.Y8G("ngSwitchCase","Responded"))},dependencies:[P.ux,P.e1,P.fG,P.Jj,y.v,x.D9],encapsulation:2,changeDetection:0})}}return u})();var m=o(19553),v=o(81487),O=o(80329);const B=(u,p,D)=>({titleText:u,confirmText:p,rejectText:D}),Q=u=>({0:u}),Y=u=>[u];function f(u,p){1&u&&(e.j41(0,"th",23),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.quote_no")," "))}function X(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.j41(2,"a",25),e.EFF(3),e.k0s()()),2&u){const D=p.$implicit;e.BMQ("data-label",e.bMT(1,3,"quote.list.table.quote_no")),e.R7$(2),e.Y8G("routerLink",e.eq3(5,Y,D.id)),e.R7$(),e.JRh(D.number)}}function W(u,p){1&u&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.name")," "))}function T(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.j41(2,"a",25),e.EFF(3),e.k0s()()),2&u){const D=p.$implicit;e.BMQ("data-label",e.bMT(1,3,"quote.list.table.name")),e.R7$(2),e.Y8G("routerLink",e.eq3(5,Y,D.id)),e.R7$(),e.JRh(D.displayName)}}function _(u,p){1&u&&(e.j41(0,"th",27),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.line_items")," "))}function d(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.EFF(2),e.k0s()),2&u){const D=p.$implicit,s=e.XpG(2);e.BMQ("data-label",e.bMT(1,2,"quote.list.table.line_items")),e.R7$(2),e.SpI(" ",s.itemCount(D)," ")}}function h(u,p){1&u&&(e.j41(0,"th",28),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.creation_date")," "))}function E(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.EFF(2),e.nI1(3,"ishDate"),e.k0s()),2&u){const D=p.$implicit;e.BMQ("data-label",e.bMT(1,2,"quote.list.table.creation_date")),e.R7$(2),e.SpI(" ",e.i5U(3,4,D.creationDate,"shortDate")," ")}}function L(u,p){1&u&&(e.j41(0,"th",29),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.expiration_date")," "))}function K(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.nrm(2,"ish-quote-expiration-date",30),e.k0s()),2&u){const D=p.$implicit;e.BMQ("data-label",e.bMT(1,2,"quote.list.table.expiration_date")),e.R7$(2),e.Y8G("quote",D)}}function Z(u,p){1&u&&(e.j41(0,"th",31),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"quote.list.table.status")," "))}function w(u,p){if(1&u&&(e.j41(0,"td",24),e.nI1(1,"translate"),e.nrm(2,"ish-quote-state",32),e.k0s()),2&u){const D=p.$implicit;e.BMQ("data-label",e.bMT(1,2,"quote.list.table.status")),e.R7$(2),e.Y8G("quoteId",D.id)}}function I(u,p){1&u&&e.nrm(0,"th",33)}function U(u,p){if(1&u){const D=e.RV6();e.j41(0,"td",34)(1,"button",35),e.nI1(2,"translate"),e.bIt("click",function(){const l=e.eBV(D).$implicit;e.XpG();const G=e.sdS(26);return e.Njj(G.show(l))}),e.nrm(3,"span",36),e.k0s()()}2&u&&(e.R7$(),e.Y8G("title",e.bMT(2,1,"quote.list.delete.button.delete.label")))}function b(u,p){1&u&&e.nrm(0,"tr",37)}function V(u,p){1&u&&e.nrm(0,"tr",38)}function N(u,p){if(1&u){const D=e.RV6();e.qex(0),e.j41(1,"table",3),e.qex(2,4),e.DNE(3,f,3,3,"th",5)(4,X,4,7,"td",6),e.bVm(),e.qex(5,7),e.DNE(6,W,3,3,"th",8)(7,T,4,7,"td",6),e.bVm(),e.qex(8,9),e.DNE(9,_,3,3,"th",10)(10,d,3,4,"td",6),e.bVm(),e.qex(11,11),e.DNE(12,h,3,3,"th",12)(13,E,4,7,"td",6),e.bVm(),e.qex(14,13),e.DNE(15,L,3,3,"th",14)(16,K,3,4,"td",6),e.bVm(),e.qex(17,15),e.DNE(18,Z,3,3,"th",16)(19,w,3,4,"td",6),e.bVm(),e.qex(20,17),e.DNE(21,I,1,0,"th",18)(22,U,4,3,"td",19),e.bVm(),e.DNE(23,b,1,0,"tr",20)(24,V,1,0,"tr",21),e.k0s(),e.j41(25,"ish-modal-dialog",22,1),e.nI1(27,"translate"),e.nI1(28,"translate"),e.nI1(29,"translate"),e.bIt("confirmed",function(l){e.eBV(D);const G=e.XpG();return e.Njj(G.onDeleteItem(l))}),e.j41(30,"p"),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.j41(33,"p"),e.EFF(34),e.nI1(35,"translate"),e.k0s()(),e.bVm()}if(2&u){let D;const s=e.sdS(26),l=e.XpG();e.R7$(),e.Y8G("dataSource",l.quotes),e.R7$(22),e.Y8G("cdkHeaderRowDef",l.columnsToDisplay),e.R7$(),e.Y8G("cdkRowDefColumns",l.columnsToDisplay),e.R7$(),e.Y8G("options",e.sMw(17,B,e.bMT(27,6,"quote.list.modaldialog.title"),e.bMT(28,8,"quote.list.delete.button.yes.label"),e.bMT(29,10,"quote.list.delete.button.no.label"))),e.R7$(6),e.JRh(e.i5U(32,12,"quote.list.delete.heading",e.eq3(21,Q,null==(D=l.asQuote(s.data))?null:D.displayName))),e.R7$(3),e.JRh(e.bMT(35,15,"quote.list.delete.do_you_really_want_to_delete.text"))}}function z(u,p){1&u&&(e.j41(0,"p",39),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&u&&(e.R7$(),e.JRh(e.bMT(2,1,"quote.list.empty")))}let ot=(()=>{class u{constructor(D){this.quotingFacade=D,this.quotes=[],this.columnsToDisplay=["quoteNo","displayName","lineItems","creationDate","expirationDate","status","actions"],this.asQuote=$.o.asQuote,this.itemCount=$.o.itemCount}onDeleteItem(D){this.quotingFacade.delete(D)}static{this.\u0275fac=function(s){return new(s||u)(e.rXU(a.s))}}static{this.\u0275cmp=e.VBU({type:u,selectors:[["ish-quote-list"]],inputs:{quotes:"quotes",columnsToDisplay:"columnsToDisplay"},decls:3,vars:2,consts:[["emptyBlock",""],["modalDialog",""],[4,"ngIf","ngIfElse"],["cdk-table","","data-testing-id","quote-list",1,"table","table-lg","mobile-optimized",3,"dataSource"],["cdkColumnDef","quoteNo"],["cdk-header-cell","","data-testing-id","th-quote-number",4,"cdkHeaderCellDef"],["cdk-cell","",4,"cdkCellDef"],["cdkColumnDef","displayName"],["cdk-header-cell","","data-testing-id","th-quote-name",4,"cdkHeaderCellDef"],["cdkColumnDef","lineItems"],["cdk-header-cell","","data-testing-id","th-quote-line-items",4,"cdkHeaderCellDef"],["cdkColumnDef","creationDate"],["cdk-header-cell","","data-testing-id","th-quote-creation-date",4,"cdkHeaderCellDef"],["cdkColumnDef","expirationDate"],["cdk-header-cell","","data-testing-id","th-quote-expiration-date",4,"cdkHeaderCellDef"],["cdkColumnDef","status"],["cdk-header-cell","","data-testing-id","th-quote-status",4,"cdkHeaderCellDef"],["cdkColumnDef","actions"],["cdk-header-cell","","data-testing-id","th-quote-actions",4,"cdkHeaderCellDef"],["cdk-cell","","class","column-price",4,"cdkCellDef"],["cdk-header-row","",4,"cdkHeaderRowDef"],["cdk-row","","data-testing-id","quotes-list-item",4,"cdkRowDef","cdkRowDefColumns"],[3,"confirmed","options"],["cdk-header-cell","","data-testing-id","th-quote-number"],["cdk-cell",""],[3,"routerLink"],["cdk-header-cell","","data-testing-id","th-quote-name"],["cdk-header-cell","","data-testing-id","th-quote-line-items"],["cdk-header-cell","","data-testing-id","th-quote-creation-date"],["cdk-header-cell","","data-testing-id","th-quote-expiration-date"],[3,"quote"],["cdk-header-cell","","data-testing-id","th-quote-status"],[3,"quoteId"],["cdk-header-cell","","data-testing-id","th-quote-actions"],["cdk-cell","",1,"column-price"],["type","button",1,"btn-tool","btn-link",3,"click","title"],[1,"tln-icon","icon-trash-can"],["cdk-header-row",""],["cdk-row","","data-testing-id","quotes-list-item"],["data-testing-id","emptyList"]],template:function(s,l){if(1&s&&e.DNE(0,N,36,23,"ng-container",2)(1,z,3,3,"ng-template",null,0,e.C5r),2&s){const G=e.sdS(2);e.Y8G("ngIf",l.quotes.length>0)("ngIfElse",G)}},dependencies:[R,m.L,v.Rk,v.oh,v.cO,v.n5,v.AL,v.VP,v.hc,v.sY,v.wA,v.hi,P.bT,n.Wk,O.p,y.v,x.D9],encapsulation:2,changeDetection:0})}}return u})();function it(u,p){if(1&u&&e.nrm(0,"ish-quote-list",2),2&u){const D=e.XpG();e.Y8G("quotes",D.quotes)}}function et(u,p){1&u&&e.nrm(0,"ish-loading")}const nt=[{path:"",component:(()=>{class u{constructor(D,s){this.quotingFacade=D,this.cd=s,this.destroy$=new t.B}ngOnInit(){this.quotingFacade.quotingEntities$().pipe((0,q.Q)(this.destroy$)).subscribe(D=>{this.quotes=D,this.cd.detectChanges()}),this.loading$=this.quotingFacade.loading$}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(s){return new(s||u)(e.rXU(a.s),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:u,selectors:[["ish-quote-list-page"]],decls:6,vars:7,consts:[[3,"quotes",4,"ngIf"],[4,"ngIf"],[3,"quotes"]],template:function(s,l){1&s&&(e.j41(0,"h1"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.DNE(3,it,1,1,"ish-quote-list",0)(4,et,1,0,"ish-loading",1),e.nI1(5,"async")),2&s&&(e.R7$(),e.JRh(e.bMT(2,3,"quote.list.heading")),e.R7$(2),e.Y8G("ngIf",l.quotes),e.R7$(),e.Y8G("ngIf",e.bMT(5,5,l.loading$)))},dependencies:[F.q,P.bT,ot,P.Jj,x.D9],encapsulation:2,changeDetection:0})}}return u})()},{path:":quoteId",loadChildren:()=>Promise.all([o.e(76),o.e(304)]).then(o.bind(o,98814)).then(u=>u.QuotePageModule)}];let tt=(()=>{class u{static{this.\u0275fac=function(s){return new(s||u)}}static{this.\u0275mod=e.$C({type:u})}static{this.\u0275inj=e.G2t({imports:[i.I,n.iI.forChild(nt)]})}}return u})()},98814:(k,S,o)=>{o.r(S),o.d(S,{QuotePageModule:()=>T});var n=o(95072),i=o(87426),t=o(26511),q=o(11439),e=o(32034),a=o(68559);let F=(()=>{class _ extends t.u2{constructor(h){super(h),this.connect("id",h.pipe((0,q.Lt)((0,e.NL)("quoteId"))))}static{this.\u0275fac=function(E){return new(E||_)(a.KVO(q.il))}}static{this.\u0275prov=a.jDH({token:_,factory:_.\u0275fac})}}return _})();var P=o(12993),$=o(84843),y=o(92075),x=o(20750),c=o(71803),r=o(60316),C=o(48503);const g=()=>["/account/quotes"];function R(_,d){1&_&&(a.EFF(0),a.nI1(1,"translate")),2&_&&a.JRh(a.bMT(1,1,"quote.edit.submitted.heading"))}function m(_,d){if(1&_&&(a.EFF(0),a.nI1(1,"translate")),2&_){const h=a.XpG(2).ngIf;a.Lme(" ",a.bMT(1,2,"quote.edit.responded.quote_details.text")," - ",h.displayName||h.number," ")}}function v(_,d){if(1&_&&(a.EFF(0),a.nI1(1,"translate")),2&_){const h=a.XpG(2).ngIf;a.Lme(" ",a.bMT(1,2,"quote.edit.unsubmitted.quote_request_details.text")," - ",h.displayName||h.number," ")}}function O(_,d){1&_&&(a.qex(0),a.nrm(1,"ish-quote-edit"),a.bVm())}function B(_,d){1&_&&a.nrm(0,"ish-quote-view")}function Q(_,d){if(1&_&&(a.qex(0),a.j41(1,"h1",2),a.DNE(2,R,2,3,"ng-template",3),a.nI1(3,"async"),a.DNE(4,m,2,4,"ng-template",3)(5,v,2,4,"ng-template",4),a.k0s(),a.nrm(6,"ish-error-message",5),a.nI1(7,"async"),a.DNE(8,O,2,0,"ng-container",6)(9,B,1,0,"ng-template",null,0,a.C5r),a.nrm(11,"ish-quote-interactions"),a.j41(12,"a",7),a.EFF(13),a.nI1(14,"translate"),a.k0s(),a.bVm()),2&_){const h=d.ngIf,E=a.sdS(10),L=a.XpG(2);a.R7$(),a.Y8G("ngSwitch",!0),a.R7$(),a.Y8G("ngSwitchCase","Submitted"===h&&a.bMT(3,8,L.justSubmitted$)),a.R7$(2),a.Y8G("ngSwitchCase","Responded"===h),a.R7$(2),a.Y8G("error",a.bMT(7,10,L.error$)),a.R7$(2),a.Y8G("ngIf","New"===h)("ngIfElse",E),a.R7$(4),a.Y8G("routerLink",a.lJ4(14,g)),a.R7$(),a.JRh(a.bMT(14,12,"quote.edit.back_to_quotes.link"))}}function Y(_,d){if(1&_&&(a.qex(0),a.DNE(1,Q,15,15,"ng-container",1),a.nI1(2,"async"),a.bVm()),2&_){const h=a.XpG();a.R7$(),a.Y8G("ngIf",a.bMT(2,1,h.state$))}}function f(_,d){1&_&&a.nrm(0,"ish-loading")}const W=[{path:"",component:(()=>{class _{constructor(h){this.context=h}ngOnInit(){this.selectedQuote$=this.context.select("entity"),this.loading$=this.context.select("loading"),this.state$=this.context.select("state"),this.error$=this.context.select("error"),this.justSubmitted$=this.context.select("justSubmitted")}static{this.\u0275fac=function(E){return new(E||_)(a.rXU(t.u2))}}static{this.\u0275cmp=a.VBU({type:_,selectors:[["ish-quote-page"]],features:[a.Jv_([{provide:t.u2,useClass:F}])],decls:4,vars:6,consts:[["elseTemplate",""],[4,"ngIf"],[3,"ngSwitch"],[3,"ngSwitchCase"],["ngSwitchDefault",""],[3,"error"],[4,"ngIf","ngIfElse"],[1,"btn","btn-link",3,"routerLink"]],template:function(E,L){1&E&&(a.DNE(0,Y,3,3,"ng-container",1),a.nI1(1,"async"),a.DNE(2,f,1,0,"ish-loading",1),a.nI1(3,"async")),2&E&&(a.Y8G("ngIf",a.bMT(1,2,L.selectedQuote$)),a.R7$(2),a.Y8G("ngIf",a.bMT(3,4,L.loading$)))},dependencies:[P.o,$.P,y.p,x.f,c.q,r.bT,r.ux,r.e1,r.fG,n.Wk,r.Jj,C.D9],encapsulation:2,changeDetection:0})}}return _})()}];let T=(()=>{class _{static{this.\u0275fac=function(E){return new(E||_)}}static{this.\u0275mod=a.$C({type:_})}static{this.\u0275inj=a.G2t({imports:[i.I,n.iI.forChild(W)]})}}return _})()},87426:(k,S,o)=>{o.d(S,{I:()=>t});var n=o(42932),i=o(68559);let t=(()=>{class q{static{this.\u0275fac=function(F){return new(F||q)}}static{this.\u0275mod=i.$C({type:q})}static{this.\u0275inj=i.G2t({imports:[n.SharedModule,n.SharedModule]})}}return q})()},12993:(k,S,o)=>{o.d(S,{o:()=>r});var n=o(34456),i=o(71292),t=o(68559),q=o(26511),e=o(38547),a=o(60316),F=o(49422),P=o(19553),$=o(48503);const y=C=>({"font-italic":C});function x(C,g){1&C&&t.nrm(0,"ish-quote-line-item-list")}function c(C,g){if(1&C){const R=t.RV6();t.qex(0),t.j41(1,"form",1)(2,"div",2)(3,"div",3),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"div",4)(7,"p",5),t.EFF(8),t.k0s()()(),t.j41(9,"div",2)(10,"div",3),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"div",4)(14,"p",5),t.nrm(15,"ish-quote-state",6),t.k0s()()(),t.j41(16,"div",7)(17,"div",2)(18,"label",8),t.EFF(19),t.nI1(20,"translate"),t.k0s(),t.j41(21,"div",4)(22,"
1ish-in-place-edit",9),t.bIt("edited",function(){t.eBV(R);const v=t.XpG();return t.Njj(v.update())})("aborted",function(){t.eBV(R);const v=t.XpG();return t.Njj(v.reset())}),t.j41(23,"p",10),t.EFF(24),t.nI1(25,"translate"),t.k0s(),t.nrm(26,"input",11),t.k0s()()(),t.j41(27,"div",2)(28,"label",12),t.EFF(29),t.nI1(30,"translate"),t.k0s(),t.j41(31,"div",4)(32,"ish-in-place-edit",9),t.bIt("edited",function(){t.eBV(R);const v=t.XpG();return t.Njj(v.update())})("aborted",function(){t.eBV(R);const v=t.XpG();return t.Njj(v.reset())}),t.j41(33,"p",10),t.EFF(34),t.nI1(35,"translate"),t.k0s(),t.j41(36,"textarea",13),t.EFF(37," "),t.k0s()()()()(),t.j41(38,"div",7)(39,"h3"),t.EFF(40),t.nI1(41,"translate"),t.k0s(),t.DNE(42,x,1,0,"ish-quote-line-item-list",0),t.k0s()(),t.bVm()}if(2&C){const R=g.ngIf,m=t.XpG();t.R7$(),t.Y8G("formGroup",m.form),t.R7$(3),t.SpI(" ",t.bMT(5,13,"quote.edit.unsubmitted.quote_no.label")," "),t.R7$(4),t.JRh(R.number),t.R7$(3),t.JRh(t.bMT(12,15,"quote.edit.unsubmitted.status.label")),t.R7$(4),t.Y8G("quoteId",R.id),t.R7$(4),t.JRh(t.bMT(20,17,"quote.edit.unsubmitted.name.label")),t.R7$(4),t.Y8G("ngClass",t.eq3(27,y,!m.form.get("displayName").value)),t.R7$(),t.SpI(" ",t.bMT(25,19,m.form.get("displayName").value||"quote.edit.unsubmitted.enter_an_optional_name.text")," "),t.R7$(5),t.JRh(t.bMT(30,21,"quote.edit.unsubmitted.comment.label")),t.R7$(4),t.Y8G("ngClass",t.eq3(29,y,!m.form.get("description").value)),t.R7$(),t.SpI(" ",t.bMT(35,23,m.form.get("description").value||"quote.edit.unsubmitted.provide_comment.text")," "),t.R7$(6),t.JRh(t.bMT(41,25,"quote.items.table.heading")),t.R7$(2),t.Y8G("ngIf",R.items)}}let r=(()=>{class C{constructor(R){this.context=R,this.form=new n.J3({displayName:new n.hs(""),description:new n.hs("")})}get valuesFromQuote(){return(0,i.A)(this.context.get("entity"),"displayName","description")}ngOnInit(){this.quote$=this.context.select("entityAsQuoteRequest"),this.context.hold(this.quote$,()=>this.reset())}update(){const R=this.form.value,m=this.valuesFromQuote;(R.displayName!==m.displayName||R.description!=m.description)&&this.context.update(R)}reset(){this.form.reset(this.valuesFromQuote)}static{this.\u0275fac=function(m){return new(m||C)(t.rXU(q.u2))}}static{this.\u0275cmp=t.VBU({type:C,selectors:[["ish-quote-edit"]],decls:2,vars:3,consts:[[4,"ngIf"],[1,"form-horizontal",3,"formGroup"],[1,"row"],[1,"col-4","col-md-3","col-xl-2","col-form-label"],[1,"col-8","col-md-9","col-xl-10"],[1,"form-control-plaintext"],[3,"quoteId"],[1,"section"],["for","quote-displayname",1,"col-4","col-md-3","col-xl-2","col-form-label"],[3,"edited","aborted"],[1,"form-control-plaintext","w-auto",3,"ngClass"],["type","text","formControlName","displayName","id","quote-displayname",1,"form-control"],["for","quote-description",1,"col-4","col-md-3","col-xl-2","col-form-label"],["formControlName","description","id","quote-description",1,"form-control"]],template:function(m,v){1&m&&(t.DNE(0,c,43,31,"ng-container",0),t.nI1(1,"async")),2&m&&t.Y8G("ngIf",t.bMT(1,1,v.quote$))},dependencies:[e.o,a.YU,a.bT,n.qT,n.me,n.BC,n.cb,n.j4,n.JD,F.h,P.L,a.Jj,$.D9],encapsulation:2,changeDetection:0})}}return C})()},84843:(k,S,o)=>{o.d(S,{P:()=>c});var n=o(26511),i=o(68559),t=o(60316),q=o(48503);function e(r,C){if(1&r){const g=i.RV6();i.j41(0,"button",7),i.bIt("click",function(){i.eBV(g);const m=i.XpG(4);return i.Njj(m.submit())}),i.EFF(1),i.nI1(2,"translate"),i.k0s()}if(2&r){const g=i.XpG(3).ngIf;i.Y8G("disabled",0===g.items.length),i.R7$(),i.SpI(" ",i.bMT(2,2,"quote.edit.button.submit.label")," ")}}function a(r,C){if(1&r){const g=i.RV6();i.j41(0,"button",8),i.bIt("click",function(){i.eBV(g);const m=i.XpG(4);return i.Njj(m.addToBasket())}),i.EFF(1),i.nI1(2,"translate"),i.k0s()}2&r&&(i.R7$(),i.SpI(" ",i.bMT(2,1,"quote.edit.button.add_quote_to_cart.label")," "))}function F(r,C){if(1&r){const g=i.RV6();i.j41(0,"button",9),i.bIt("click",function(){i.eBV(g);const m=i.XpG(4);return i.Njj(m.copy())}),i.EFF(1),i.nI1(2,"translate"),i.k0s()}2&r&&(i.R7$(),i.SpI(" ",i.bMT(2,1,"quote.edit.button.create_new_from_quote.label")," "))}
1function P(r,C){if(1&r){const g=i.RV6();i.j41(0,"button",10),i.bIt("click",function(){i.eBV(g);const m=i.XpG(4);return i.Njj(m.reject())}),i.EFF(1),i.nI1(2,"translate"),i.k0s()}2&r&&(i.R7$(),i.SpI(" ",i.bMT(2,1,"quote.edit.reject.button.reject.label")," "))}function $(r,C){if(1&r&&(i.j41(0,"div",2),i.DNE(1,e,3,4,"button",3)(2,a,3,3,"button",4),i.nI1(3,"async"),i.DNE(4,F,3,3,"button",5)(5,P,3,3,"button",6),i.k0s()),2&r){const g=i.XpG().ngIf,R=i.XpG().ngIf,m=i.XpG();i.R7$(),i.Y8G("ngIf","New"===g),i.R7$(),i.Y8G("ngIf","Responded"===g&&i.bMT(3,4,m.isQuoteValid$)),i.R7$(2),i.Y8G("ngIf","Quote"===R.type||"Submitted"===g),i.R7$(),i.Y8G("ngIf","Responded"===g)}}function y(r,C){if(1&r&&(i.qex(0),i.DNE(1,$,6,6,"div",1),i.bVm()),2&r){const g=i.XpG().ngIf;i.R7$(),i.Y8G("ngIf",g.items)}}function x(r,C){if(1&r&&(i.qex(0),i.DNE(1,y,2,1,"ng-container",0),i.nI1(2,"async"),i.bVm()),2&r){const g=i.XpG();i.R7$(),i.Y8G("ngIf",i.bMT(2,1,g.state$))}}let c=(()=>{class r{constructor(g){this.context=g}ngOnInit(){this.quote$=this.context.select("entity"),this.state$=this.context.select("state"),this.isQuoteValid$=this.context.select(n.Hm)}reject(){this.context.reject()}copy(){this.context.copy()}addToBasket(){this.context.addToBasket()}submit(){this.context.submit()}static{this.\u0275fac=function(R){return new(R||r)(i.rXU(n.u2))}}static{this.\u0275cmp=i.VBU({type:r,selectors:[["ish-quote-interactions"]],decls:2,vars:3,consts:[[4,"ngIf"],["class","clearfix",4,"ngIf"],[1,"clearfix"],["data-testing-id","submit-quote-request","type","submit","class","btn btn-primary float-right",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-primary float-right","name","add2cart",3,"click",4,"ngIf"],["data-testing-id","copy-quote-request","class","btn btn-secondary","name","copy","type","submit",3,"click",4,"ngIf"],["type","submit","id","button-reject","class","btn btn-secondary float-right","name","refuse",3,"click",4,"ngIf"],["data-testing-id","submit-quote-request","type","submit",1,"btn","btn-primary","float-right",3,"click","disabled"],["type","submit","name","add2cart",1,"btn","btn-primary","float-right",3,"click"],["data-testing-id","copy-quote-request","name","copy","type","submit",1,"btn","btn-secondary",3,"click"],["type","submit","id","button-reject","name","refuse",1,"btn","btn-secondary","float-right",3,"click"]],template:function(R,m){1&R&&(i.DNE(0,x,3,3,"ng-container",0),i.nI1(1,"async")),2&R&&i.Y8G("ngIf",i.bMT(1,1,m.quote$))},dependencies:[t.bT,t.Jj,q.D9],encapsulation:2,changeDetection:0})}}return r})()},49422:(k,S,o)=>{o.d(S,{h:()=>w});var n=o(19999),i=o(70271),t=o(68559),q=o(26511),e=o(60316),a=o(23081),F=o(93920),P=o(65945),$=o(28948),y=o(95860),x=o(61137),c=o(66904),r=o(4564),C=o(65895),g=o(56529),R=o(18180),m=o(68066),v=o(39096),O=o(48503);const B=I=>({"text-right":I});function Q(I,U){if(1&I){const b=t.RV6();t.j41(0,"div",19),t.nrm(1,"ish-lazy-product-add-to-order-template",20)(2,"ish-lazy-product-add-to-wishlist",20),t.j41(3,"button",21),t.nI1(4,"translate"),t.bIt("click",function(){t.eBV(b);const N=t.XpG();return t.Njj(N.onDeleteItem())}),t.nrm(5,"span",22),t.k0s()()}if(2&I){const b=t.XpG();t.R7$(),t.Y8G("cssClass","btn-link btn-tool add-to-order-template"),t.R7$(),t.Y8G("cssClass","btn-link btn-tool ml-0"),t.R7$(),t.FS9("title",t.bMT(4,5,"toolineo.shopping_cart.remove.item.button.label")),t.BMQ("data-testing-id","remove-line-item")("data-id",b.lineItem.id)}}function Y(I,U){if(1&I&&t.nrm(0,"ish-product-quantity",23),2&I){const b=t.XpG();t.Y8G("elementId","quote-quantity_"+b.lineItem.id)}}function f(I,U){if(1&I&&(t.EFF(0),t.nI1(1,"number")),2&I){const b=t.XpG();t.SpI(" ",t.bMT(1,1,b.lineItem.quantity.value)," ")}}function X(I,U){1&I&&t.nrm(0,"ish-product-quantity")}function W(I,U){if(1&I&&(t.EFF(0),t.nI1(1,"number")),2&I){const b=t.XpG();t.SpI(" ",t.bMT(1,1,b.lineItem.quantity.value)," ")}}function T(I,U){if(1&I&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"translate"),t.nI1(3,"ishPrice"),t.k0s()),2&I){const b=t.XpG();t.R7$(),t.Lme(" ",t.bMT(2,2,"quote.items.original_price.label")," ",t.bMT(3,4,b.lineItem.originSingleBasePrice)," ")}}function _(I,U){1&I&&(t.qex(0),t.EFF(1),t.nI1(2,"translate"),t.bVm()),2&I&&(t.R
17$(),t.JRh(t.bMT(2,1,"quote.items.suggested_price.label")))}function d(I,U){if(1&I&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"ishPrice"),t.k0s()),2&I){const b=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,b.lineItem.originTotal))}}function h(I,U){1&I&&(t.j41(0,"span",24),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&I&&(t.R7$(),t.JRh(t.bMT(2,1,"quote.items.suggested_price.label")))}let E=(()=>{class I{constructor(b,V){this.quoteContext=b,this.productContext=V}ngOnInit(){this.editable$=this.quoteContext.select("editable"),this.productContext.hold(this.productContext.validDebouncedQuantityUpdate$(),b=>{this.quoteContext.updateItem({itemId:this.lineItem?.id,quantity:b})})}onDeleteItem(){this.quoteContext.deleteItem(this.lineItem.id)}static{this.\u0275fac=function(V){return new(V||I)(t.rXU(q.u2),t.rXU(F.v))}}static{this.\u0275cmp=t.VBU({type:I,selectors:[["ish-quote-line-item-list-element"]],inputs:{lineItem:"lineItem"},decls:39,vars:28,consts:[["readonlyQuantity",""],["data-testing-id","product-list-item",1,"row","list-item-row"],[1,"col-2","list-item"],["imageType","S",3,"link"],[1,"col-7","col-md-6","col-xl-4","list-item"],[1,"pli-description"],["class","d-flex align-items-center",4,"ngIf"],[1,"quantity","d-xl-none"],[1,"form-group"],["translationKey","shopping_cart.pli.qty.label",3,"for"],[3,"elementId",4,"ngIf","ngIfElse"],[1,"quantity","col-xl-2","list-item","d-none","d-xl-flex"],[1,"form-group","w-100",3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"col-md-2","d-none","d-md-block","list-item","column-price","single-price"],[4,"ngIf"],[1,"col-3","col-md-2","list-item","column-price"],["class","d-md-none",4,"ngIf"],["data-testing-id","total-price"],[1,"d-flex","align-items-center"],["displayType","icon",3,"cssClass"],["type","button",1,"btn-tool","btn-link",3,"click","title"],[1,"tln-icon","icon-trash-can"],[3,"elementId"],[1,"d-md-none"]],template:function(V,N){if(1&V&&(t.j41(0,"div",1)(1,"div",2),t.nrm(2,"ish-product-image",3),t.k0s(),t.j41(3,"div",4)(4,"div",5),t.nrm(5,"ish-product-name")(6,"ish-product-id")(7,"ish-product-variation-display")(8,"ish-product-bundle-display")(9,"ish-product-inventory"),t.DNE(10,Q,6,7,"div",6),t.nI1(11,"async"),t.k0s(),t.j41(12,"div",7)(13,"div",8),t.nrm(14,"ish-product-quantity-label",9),t.DNE(15,Y,1,1,"ish-product-quantity",10),t.nI1(16,"async"),t.DNE(17,f,2,3,"ng-template",null,0,t.C5r),t.k0s()()(),t.j41(19,"div",11)(20,"div",12),t.nI1(21,"async"),t.DNE(22,X,1,0,"ish-product-quantity",13),t.nI1(23,"async"),t.DNE(24,W,2,3,"ng-template",null,0,t.C5r),t.k0s()(),t.j41(26,"div",14),t.DNE(27,T,4,6,"p",15),t.j41(28,"p"),t.DNE(29,_,3,3,"ng-container",15),t.EFF(30),t.nI1(31,"ishPrice"),t.k0s()(),t.j41(32,"div",16)(33,"div"),t.DNE(34,d,3,3,"p",15)(35,h,3,3,"span",17),t.j41(36,"div",18),t.EFF(37),t.nI1(38,"ishPrice"),t.k0s()()()()),2&V){const z=t.sdS(18);t.R7$(2),t.Y8G("link",!0),t.R7$(8),t.Y8G("ngIf",t.bMT(11,14,N.editable$)),t.R7$(4),t.Y8G("for","quote-quantity_"+N.lineItem.id),t.R7$(),t.Y8G("ngIf",t.bMT(16,16,N.editable$))("ngIfElse",z),t.R7$(5),t.Y8G("ngClass",t.eq3(26,B,t.bMT(21,18,N.editable$))),t.R7$(2),t.Y8G("ngIf",t.bMT(23,20,N.editable$))("ngIfElse",z),t.R7$(5),t.Y8G("ngIf",N.lineItem.originSingleBasePrice),t.R7$(2),t.Y8G("ngIf",N.lineItem.originSingleBasePrice),t.R7$(),t.SpI(" ",t.bMT(31,22,N.lineItem.singleBasePrice)," "),t.R7$(4),t.Y8G("ngIf",N.lineItem.originTotal),t.R7$(),t.Y8G("ngIf",N.lineItem.originTotal),t.R7$(2),t.JRh(t.bMT(38,24,N.lineItem.total))}},dependencies:[P.b,$.a,y.y,x.r,c.U,r.C,C.c,g.Q,e.YU,e.bT,R.z,m.m,e.Jj,e.QX,v.O,O.D9],encapsulation:2,changeDetection:0})}}return I})();const L=I=>({"justify-content-end":I});function K(I,U){if(1&I&&t.nrm(0,"ish-quote-line-item-list-element",8),2&I){const b=U.$implicit;t.Y8G("lineItem",b)("allowZeroQuantity",!0)("sku",b.productSKU)("quantity",null==b.quantity?null:b.quantity.value)}}function Z(I,U){if(1&I&&(t.j41(0,"div",9)(1,"div",10)(2,"div",11),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",12)(6,"div",13),t.EFF(7),t.nI1(8,"async"),t.nI1(9,"ishPrice"),t.k0s()()()()),2&I){const b=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"quote.items.total.label")),t.R7$(4),t.JRh(t.bMT(9,6,t.bMT(8,4,b.total$)))}}let w=(()=>{class I{constructor(b){this.context=b}ngOnInit(){this.total$=this.context.select("entity","total"),this.lineItems$=this.context.select("entity","items"),this.displayTotal$=(0,n.z)([this.total$,this.lineItems$]).pipe((0,i.T)(([b,V])=>!!b&&!!V?.length)),this.editable$=this.context.select("editable")}trackByFn(b,V){return V.productSKU}static{this.\u0275fac=function(V){return new(V||I)(t.rXU(q.u2))}}static{this.\u0275cmp=t.VBU({type:I,selectors:[["ish-quote-line-item-list"]],decls:20,vars:24,consts:[[1,"container"],[1,"row","list-header","d-none","d-md-flex"],[1,"col-md-8","col-xl-6","list-header-item","list-header-item-descr"],[1,"col-xl-2","d-none","d-xl-flex","list-header-item",3,"ngClass"],[1,"col-md-2","list-header-item","column-price"],[1,"list-body"],["ishProductContext","",3,"lineItem","allowZeroQuantity","sku","quantity",4,"ngFor","ngForOf","ngForTrackBy"],["class","clearfix section",4,"ngIf"],["ishProductContext","",3,"lineItem","allowZeroQuantity","sku","quantity"],[1,"clearfix","section"],[1,"row","justify-content-end","list-body"],[1,"col-sm-4","col-md-3","col-lg-2","text-right","pr-0"],[1,"col-sm-4","col-md-2","pr-0"],[1,"total-price","text-right"]],template:function(V,N){1&V&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",3),t.nI1(6,"async"),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"div",4),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"div",4),t.EFF(13),t.nI1(14,"translate"),t.k0s()(),t.j41(15,"div",5),t.DNE(16,K,1,4,"ish-quote-line-item-list-element",6),t.nI1(17,"async"),t.k0s(),t.DNE(18,Z,10,8,"div",7),t.nI1(19,"async"),t.k0s()),2&V&&(t.R7$(3),t.SpI(" ",t.bMT(4,8,"shopping_cart.product_description.heading")," "),t.R7$(2),t.Y8G("ngClass",t.eq3(22,L,t.bMT(6,10,N.editable$))),t.R7$(2),t.SpI(" ",t.bMT(8,12,"shopping_cart.qty.heading")," "),t.R7$(3),t.JRh(t.bMT(11,14,"shopping_cart.price.heading")),t.R7$(3),t.JRh(t.bMT(14,16,"shopping_cart.total.heading")),t.R7$(3),t.Y8G("ngForOf",t.bMT(17,18,N.lineItems$))("ngForTrackBy",N.trackByFn),t.R7$(2),t.Y8G("ngIf",t.bMT(19,20,N.displayTotal$)))},dependencies:[e.YU,e.Sq,e.bT,a.i,E,e.Jj,v.O,O.D9],encapsulation:2,changeDetection:0})}}return I})()},19553:(k,S,o)=>{o.d(S,{L:()=>x});var n=o(68559),i=o(90752),t=o(60316),q=o(48503);function e(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.new"))}function a(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.submitted"))}function F(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.responded"))}function P(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.expired"))}function $(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.rejected"))}function y(c,r){1&c&&(n.EFF(0),n.nI1(1,"translate")),2&c&&n.JRh(n.bMT(1,1,"quote.state.unknown"))}let x=(()=>{class c{constructor(C){this.quotingFacade=C}ngOnChanges(){this.state$=this.quotingFacade.state$(this.quoteId)}static{this.\u0275fac=function(g){return new(g||c)(n.rXU(i.s))}}static{this.\u0275cmp=n.VBU({type:c,selectors:[["ish-quote-state"]],inputs:{quoteId:"quoteId"},features:[n.OA$],decls:8,vars:8,consts:[[3,"ngSwitch"],[3,"ngSwitchCase"],["ngSwitchDefault",""]],template:function(g,R){1&g&&(n.qex(0,0),n.nI1(1,"async"),n.DNE(2,e,2,3,"ng-template",1)(3,a,2,3,"ng-template",1)(4,F,2,3,"ng-template",1)(5,P,2,3,"ng-template",1)(6,$,2,3,"ng-template",1)(7,y,2,3,"ng-template",2),n.bVm()),2&g&&(n.Y8G("ngSwitch",n.bMT(1,6,R.state$)),n.R7$(2),n.Y8G("ngSwitchCase","New"),n.R7$(),n.Y8G("ngSwitchCase","Submitted"),n.R7$(),n.Y8G("ngSwitchCase","Responded"),n.R7$(),n.Y8G("ngSwitchCase","Expired"),n.R7$(),n.Y8G("ngSwitchCase","Rejected"))},dependencies:[t.ux,t.e1,t.fG,t.Jj,q.D9],encapsulation:2,changeDetection:0})}}return c})()},92075:(k,S,o)=>{o.d(S,{p:()=>_});var n=o(26511),i=o(37929),t=o(68559),q=o(20175),e=o(77040),a=o(60316),F=o(39143),P=o(95072),$=o(49422),y=o(19553),x=o(85180),c=o(48503);const r=d=>["/account/quotes",d],C=()=>({0:"route://account/quotes",1:"route://account"}),g=d=>({0:d});
1function R(d,h){if(1&d&&(t.qex(0),t.j41(1,"p"),t.EFF(2),t.nI1(3,"translate"),t.j41(4,"a",13),t.EFF(5),t.k0s()(),t.nrm(6,"p",14),t.nI1(7,"translate"),t.j41(8,"p"),t.EFF(9),t.nI1(10,"async"),t.nI1(11,"translate"),t.k0s(),t.bVm()),2&d){const E=t.XpG(3).ngIf,L=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,5,"quote.edit.submitted.your_quote_number.text")," "),t.R7$(2),t.Y8G("routerLink",t.eq3(15,r,E.id)),t.R7$(),t.JRh(E.number),t.R7$(),t.Y8G("ishServerHtml",t.i5U(7,7,"quote.edit.submitted.your_quote_request.text",t.lJ4(17,C))),t.R7$(3),t.JRh(t.i5U(11,12,"quote.edit.submitted.we_will_email.text",t.eq3(18,g,t.bMT(10,10,L.userEmail$))))}}function m(d,h){if(1&d&&(t.nrm(0,"ish-info-message",15),t.nI1(1,"ishDate"),t.nI1(2,"translate")),2&d){const E=t.XpG(3).ngIf,L=t.XpG();t.FS9("message",t.i5U(2,5,"quote.edit.submitted.your_quote_request_has_been_submitted.text",t.eq3(8,g,t.i5U(1,2,L.asQuoteRequest(E).submittedDate||E.creationDate,"shortDate")))),t.Y8G("toast",!1)}}function v(d,h){if(1&d&&(t.qex(0),t.DNE(1,R,12,20,"ng-container",3),t.nI1(2,"async"),t.DNE(3,m,3,10,"ng-template",null,1,t.C5r),t.bVm()),2&d){const E=t.sdS(4),L=t.XpG(3);t.R7$(),t.Y8G("ngIf",t.bMT(2,2,L.justSubmitted$))("ngIfElse",E)}}function O(d,h){1&d&&t.nrm(0,"ish-info-message",17),2&d&&t.Y8G("toast",!1)}function B(d,h){if(1&d&&(t.DNE(0,O,1,1,"ish-info-message",16),t.nI1(1,"async")),2&d){const E=t.XpG().ngIf,L=t.XpG(2);t.Y8G("ngIf","Responded"===E&&!1===t.bMT(1,1,L.isQuoteStarted$))}}function Q(d,h){if(1&d&&(t.j41(0,"div",4)(1,"div",5),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",6)(5,"p",8),t.EFF(6),t.nI1(7,"ishDate"),t.nI1(8,"ishDate"),t.k0s()()()),2&d){const E=t.XpG(2).ngIf,L=t.XpG();t.R7$(2),t.JRh(t.bMT(3,3,"quote.edit.unsubmitted.valid.label")),t.R7$(4),t.Lme(" ",t.i5U(7,5,L.asQuote(E).validFromDate,"shortDate")," - ",t.i5U(8,8,L.asQuote(E).validToDate,"shortDate")," ")}}function Y(d,h){if(1&d&&(t.j41(0,"div",4)(1,"div",5),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",6)(5,"p",8),t.EFF(6),t.k0s()()()),2&d){const E=t.XpG(2).ngIf;t.R7$(2),t.SpI(" ",t.bMT(3,2,"quote.edit.unsubmitted.comment.label")," "),t.R7$(4),t.JRh(E.description)}}function f(d,h){if(1&d&&(t.j41(0,"div",4)(1,"div",5),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",6)(5,"p",8),t.EFF(6),t.k0s()()()),2&d){const E=t.XpG(2).ngIf,L=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,2,"quote.edit.unsubmitted.seller_comment.label")," "),t.R7$(4),t.JRh(L.asQuote(E).sellerComment)}}function X(d,h){1&d&&t.nrm(0,"ish-quote-line-item-list")}function W(d,h){if(1&d&&(t.qex(0),t.DNE(1,v,5,4,"ng-container",3)(2,B,2,3,"ng-template",null,0,t.C5r),t.j41(4,"div",4)(5,"div",5),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"div",6)(9,"p",7),t.EFF(10),t.k0s()()(),t.j41(11,"div",4)(12,"div",5),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"div",6)(16,"p",8),t.nrm(17,"ish-quote-state",9),t.k0s()()(),t.DNE(18,Q,9,11,"div",10),t.j41(19,"div",11)(20,"div",12)(21,"div",5),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.j41(24,"div",6)(25,"p",8),t.EFF(26),t.k0s()()(),t.DNE(27,Y,7,4,"div",10)(28,f,7,4,"div",10),t.k0s(),t.j41(29,"div",11)(30,"h3"),t.EFF(31),t.nI1(32,"translate"),t.k0s(),t.DNE(33,X,1,0,"ish-quote-line-item-list",2),t.k0s(),t.bVm()),2&d){const E=h.ngIf,L=t.sdS(3),K=t.XpG().ngIf,Z=t.XpG();t.R7$(),t.Y8G("ngIf","Submitted"===E)("ngIfElse",L),t.R7$(5),t.SpI(" ",t.bMT(7,14,"quote.edit.unsubmitted.quote_no.label")," "),t.R7$(3),t.BMQ("data-quote-id",K.id),t.R7$(),t.SpI(" ",K.number," "),t.R7$(3),t.JRh(t.bMT(14,16,"quote.edit.unsubmitted.status.label")),t.R7$(4),t.Y8G("quoteId",K.id),t.R7$(),t.Y8G("ngIf","Responded"===E),t.R7$(4),t.JRh(t.bMT(23,18,"quote.edit.unsubmitted.name.label")),t.R7$(4),t.JRh(K.displayName),t.R7$(),t.Y8G("ngIf",K.description),t.R7$(),t.Y8G("ngIf",Z.asQuote(K).sellerComment),t.R7$(3),t.JRh(t.bMT(32,20,"quote.items.table.heading")),t.R7$(2),t.Y8G("ngIf",K.items)}}function T(d,h){if(1&d&&(t.qex(0),t.DNE(1,W,34,22,"ng-container",2),t.nI1(2,"async"),t.bVm()),2&d){const E=t.XpG();t.R7$(),t.Y8G("ngIf",t.bMT(2,1,E.state$))}}let _=(()=>{class d{constructor(E,L){this.accountFacade=E,this.context=L,this.asQuote=i.o.asQuote,this.asQuoteRequest=i.o.asQuoteRequest}ngOnInit(){this.quote$=this.context.select("entity"),this.state$=this.context.select("state"),this.userEmail$=this.accountFacade.userEmail$,this.isQuoteStarted$=this.context.select(n.I$),this.justSubmitted$=this.context.select("justSubmitted")}static{this.\u0275fac=function(L){return new(L||d)(t.rXU(q.K),t.rXU(n.u2))}}static{this.\u0275cmp=t.VBU({type:d,selectors:[["ish-quote-view"]],decls:2,vars:3,consts:[["quotePending",""],["previouslySubmitted",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"row"],[1,"col-4","col-md-3","col-xl-2","col-form-label"],[1,"col-8","col-md-9","col-xl-10"],["data-testing-id","quoteId",1,"form-control-plaintext"],[1,"form-control-plaintext"],[3,"quoteId"],["class","row",4,"ngIf"],[1,"section"],[1,"row","has-feedback"],[3,"routerLink"],[3,"ishServerHtml"],[3,"message","toast"],["message","quote.error.not_started",3,"toast",4,"ngIf"],["message","quote.error.not_started",3,"toast"]],template:function(L,K){1&L&&(t.DNE(0,T,3,3,"ng-container",2),t.nI1(1,"async")),2&L&&t.Y8G("ngIf",t.bMT(1,1,K.quote$))},dependencies:[e.N,a.bT,F.Y,P.Wk,$.h,y.L,a.Jj,x.v,c.D9],encapsulation:2,changeDetection:0})}}return d})()},85994:(k,S,o)=>{o.r(S),o.d(S,{QUOTING_STORE_CONFIG:()=>tt,QuotingStoreConfig:()=>nt,QuotingStoreModule:()=>u});var n=o(68559),i=o(97624),t=o(11439),q=o(71292),e=o(71907),a=o(72743),F=o(59452),P=o(89835),$=o(47697),y=o(59400),x=o(13255),c=o(70271),r=o(51903),C=o(2435),g=o(36647),R=o(51567),m=o(13725),v=o(32034),O=o(65123),B=o(78078),Q=o(71663),Y=o(37929),f=o(5233),X=o(8479),W=o(95072),T=o(46443),_=o(61873),d=o(137),h=o(77919),E=o(23513),L=o(98445),K=o(64334),Z=o(90778),w=o(22157),I=o(40735),U=o(86692),b=o(59449);let V=(()=>{class p{fromData(s,l){if(s){if("Link"===s.type)return this.fromLinkData(s,l);if(s.type!==l)throw new Error(`expected type '${l}' but received '${s.type}'`);if("Quote"===s?.type)return this.fromQuoteData(s);if("QuoteRequest"===s?.type)return this.fromQuoteRequestData(s)}throw new Error("valid quoteData is required")}fromLinkData(s,l){return s.attributes&&("Quote"===l&&U.Z.getAttributeByAttributeName(s.attributes,"rejected")||"QuoteRequest"===l)?{type:l,id:s.title,completenessLevel:"List",number:U.Z.getAttributeValueByAttributeName(s.attributes,"number"),displayName:U.Z.getAttributeValueByAttributeName(s.attributes,"name"),creationDate:U.Z.getAttributeValueByAttributeName(s.attributes,"creationDate"),validFromDate:U.Z.getAttributeValueByAttributeName(s.attributes,"validFromDate"),validToDate:U.Z.getAttributeValueByAttributeName(s.attributes,"validToDate"),itemCount:U.Z.getAttributeValueByAttributeName(s.attributes,"lineItems"),submittedDate:U.Z.getAttributeValueByAttributeName(s.attributes,"submittedDate"),rejected:U.Z.getAttributeValueByAttributeName(s.attributes,"rejected")}:{type:l,id:s.title,completenessLevel:"Stub"}}fromQuoteData(s){const l=s;return{type:"Quote",id:l.id,completenessLevel:"Detail",number:l.number,dis
1playName:l.displayName,description:l.description,creationDate:l.creationDate,total:b.B.fromData(l.total),rejected:l.rejected,validFromDate:l.validFromDate,validToDate:l.validToDate,sellerComment:l.sellerComment,originTotal:b.B.fromData(l.originTotal),items:l.items?.map(A=>({id:void 0,productSKU:A.productSKU,quantity:A.quantity,originQuantity:A.originQuantity,singleBasePrice:b.B.fromData(A.singlePrice),originSingleBasePrice:b.B.fromData(A.originSinglePrice),total:b.B.fromData(A.totalPrice),originTotal:b.B.fromData(A.originTotalPrice)}))}}fromQuoteRequestData(s){const l=s;return{type:"QuoteRequest",id:l.id,completenessLevel:l.items?.some(A=>"Link"===A.type)?"List":"Detail",number:l.number,displayName:l.displayName,description:l.description,creationDate:l.creationDate,total:b.B.fromData(l.total),submittedDate:l.submittedDate,items:l.items?.map(A=>{if("Link"===A.type)return{id:A.title};{const J=A;return{id:J.id,productSKU:J.productSKU,quantity:J.quantity,singleBasePrice:b.B.fromData(J.singlePrice),total:b.B.fromData(J.totalPrice)}}})}}static{this.\u0275fac=function(l){return new(l||p)}}static{this.\u0275prov=n.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})(),N=(()=>{class p{constructor(s,l){this.apiService=s,this.quoteMapper=l}getQuotes(){return(0,_.p)([this.apiService.b2bUserEndpoint().get("quoterequests",{params:(new T.Nl).set("attrs","number,name,lineItems,creationDate,submittedDate")}).pipe((0,I.b6)(),(0,c.T)(s=>s.reverse()),(0,c.T)(s=>s.map(l=>this.quoteMapper.fromData(l,"QuoteRequest")))),this.apiService.b2bUserEndpoint().get("quotes",{params:(new T.Nl).set("attrs","number,name,lineItems,creationDate,validFromDate,validToDate,rejected")}).pipe((0,I.b6)(),(0,c.T)(s=>s.reverse()),(0,c.T)(s=>s.map(l=>this.quoteMapper.fromData(l,"Quote"))))]).pipe((0,c.T)(s=>s.flat()))}getQuoteDetails(s,l,G){return"Stub"===G?(0,F.of)({id:s,type:l,completenessLevel:G}):"Quote"===l?this.apiService.b2bUserEndpoint().get(`quotes/${this.apiService.encodeResourceId(s)}`).pipe((0,c.T)(A=>this.quoteMapper.fromData(A,"Quote"))):this.apiService.b2bUserEndpoint().get(`quoterequests/${this.apiService.encodeResourceId(s)}`).pipe((0,r.H)(A=>(0,$.T)(()=>"Detail"===G,(0,d.v)(()=>(0,F.of)(A).pipe((0,I.b6)("items"),this.apiService.resolveLinks(),(0,c.T)(J=>({...A,items:J})))),(0,F.of)(A))),(0,c.T)(A=>this.quoteMapper.fromData(A,"QuoteRequest")))}deleteQuote(s){return this.apiService.b2bUserEndpoint().delete(`${"Quote"===s.type?"quotes":"quoterequests"}/${this.apiService.encodeResourceId(s.id)}`).pipe((0,c.T)(()=>s.id))}rejectQuote(s){return this.apiService.b2bUserEndpoint().put(`quotes/${this.apiService.encodeResourceId(s)}`,{rejected:!0}).pipe((0,c.T)(l=>this.quoteMapper.fromData(l,"Quote")))}createQuoteRequestFromQuote(s){return this.apiService.b2bUserEndpoint().post("quoterequests",void 0,{params:(new T.Nl).set("quoteID",s)}).pipe((0,c.T)(l=>this.quoteMapper.fromData(l,"QuoteRequest")))}createQuoteRequestFromQuoteRequest(s){return this.apiService.b2bUserEndpoint().post("quoterequests",void 0,{params:(new T.Nl).set("quoteRequestID",s)}).pipe((0,c.T)(l=>this.quoteMapper.fromData(l,"QuoteRequest")))}createQuoteRequestFromBasket(s){return this.apiService.b2bUserEndpoint().post("quoterequests",void 0,{params:(new T.Nl).set("basketID",s)}).pipe((0,c.T)(l=>this.quoteMapper.fromData(l,"QuoteRequest")))}submitQuoteRequest(s){return this.apiService.b2bUserEndpoint().post("quotes",{quoteRequestID:s}).pipe((0,c.T)(()=>s))}createQuoteRequest(){return this.apiService.b2bUserEndpoint().post("quoterequests").pipe((0,c.T)(s=>this.quoteMapper.fromData(s,"QuoteRequest")))}expansion(s){return s?.length?("List"===s[0].completenessLevel?(0,F.of)(s[0]):this.getQuoteDetails(s[0].id,s[0].type,"List")).pipe((0,c.T)(l=>({quoteRequest:l,next:s.slice(1)}))):y.w}getOrCreateActiveQuoteRequest(){return this.apiService.b2bUserEndpoint().get("quoterequests",{params:(new T.Nl).set("attrs","submittedDate,editable")}).pipe((0,I.b6)(),(0,c.T)(s=>s.reverse()),(0,c.T)(s=>s.map(l=>this.quoteMapper.fromData(l,"QuoteRequest"))),(0,r.H)(s=>this.expansion(s)),(0,L.f)(({next:s})=>this.expansion(s)),(0,c.T)(({quoteRequest:s})=>s),(0,R.p)(s=>"New"===Y.o.state(s)),(0,K.s)(1),(0,Z.U)(void 0)).pipe((0,r.H)(s=>s?(0,F.of)(s):this.createQuoteRequest()),(0,c.T)(Y.o.asQuoteRequest))}addProductToQuoteRequest(s,l){return this.getOrCreateActiveQuoteRequest().pipe((0,r.H)(G=>this.apiService.b2bUserEndpoint().post(`quoterequests/${this.apiService.encodeResourceId(G.id)}/items`,{productSKU:s,quantity:{value:l}}).pipe((0,c.T)(()=>G.id))))}updateQuoteRequest(s,l){return l?.length?(0,E.x)(...l.map(G=>"meta-data"===G.type?this.apiService.b2bUserEndpoint().put(`quoterequests/${this.apiService.encodeResourceId(s)}`,(0,q.A)(G,"description","displayName")):"change-item"===G.type?this.apiService.b2bUserEndpoint().put(`quoterequests/${this.apiService.encodeResourceId(s)}/items/${this.apiService.encodeResourceId(G.itemId)}`,{quantity:{value:G.quantity}}):this.apiService.b2bUserEndpoint().delete(`quoterequests/${this.apiService.encodeResourceId(s)}/items/${this.apiService.encodeResourceId(G.itemId)}`))).pipe((0,w.H)(),(0,c.T)(()=>s)):(0,h.$)(()=>new Error("updateQuoteRequest called without changes"))}static{this.\u0275fac=function(l){return new(l||p)(n.KVO(I.Gf),n.KVO(V))}}static{this.\u0275prov=n.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})();var z=o(39318);let ot=(()=>{class p{constructor(s,l,G,A,J){this.actions$=s,this.store=l,this.router=G,this.quotingService=A,this.basketService=J,this.loadQuoting$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.AR),(0,x.Z)(()=>this.quotingService.getQuotes().pipe((0,c.T)(M=>(0,f.vm)({quoting:M})),(0,Q.qt)(f.MZ))))),this.loadQuotingDetail$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.vh),(0,Q.aV)(),(0,x.Z)(({entity:{id:M,type:j},level:H})=>this.quotingService.getQuoteDetails(M,j,H).pipe((0,c.T)(at=>(0,f.Yv)({entity:at})),(0,Q.qt)(f.MZ))))),this.deleteQuoting$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.Iy),(0,Q.hh)("entity"),(0,x.Z)(M=>this.quotingService.deleteQuote(M).pipe((0,c.T)(j=>(0,f.JG)({id:j})),(0,Q.qt)(f.c4,{id:M.id}))))),this.deleteSuccessMessage$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.JG),(0,c.T)(()=>(0,m.T0)({message:"quote.delete.message"})))),this.rejectQuote$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.Ic),(0,Q.hh)("id"),(0,r.H)(M=>this.quotingService.rejectQuote(M).pipe((0,c.T)(j=>(0,f.Yv)({entity:j})),(0,Q.qt)(f.Cl,{id:M}))))),this.deleteQuoteFromBasket$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.GK),(0,Q.hh)("id"),(0,Q.zV)(),(0,r.H)(M=>this.basketService.deleteQuoteFromBasket(M)),(0,x.Z)(M=>[(0,B.hL)({}
1),(0,f.VR)(),(0,m.T0)({message:M?.[0]?.message})]),(0,Q.qt)(f.cd))),this.addQuoteToBasket$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.R3),(0,Q.hh)("id"),(0,r.H)(M=>this.store.pipe((0,t.Lt)(B.Fn),(0,C.$)(),(0,g.n)(j=>j?(0,F.of)(j):this.basketService.createBasket().pipe((0,c.T)(H=>H.id))),(0,r.H)(()=>this.basketService.addQuoteToBasket(M)),(0,x.Z)(j=>[(0,B.E8)({lineItems:[],info:j}),(0,B.hL)({}),(0,f.Qw)({id:M})]),(0,Q.qt)(f.MZ))))),this.createQuoteRequestFromQuote$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.Yh),(0,Q.hh)("id"),(0,r.H)(M=>this.quotingService.createQuoteRequestFromQuote(M).pipe((0,c.T)(j=>(0,f.NH)({entity:j})),(0,Q.qt)(f.MZ))))),this.createQuoteRequestFromQuoteRequest$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.xO),(0,Q.hh)("id"),(0,r.H)(M=>this.quotingService.createQuoteRequestFromQuoteRequest(M).pipe((0,c.T)(j=>(0,f.kD)({entity:j})),(0,Q.qt)(f.MZ))))),this.createQuoteRequestFromBasket$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.kE),(0,a.YQ)(()=>this.store.pipe((0,t.Lt)(B.Fn))),(0,r.H)(([,M])=>this.quotingService.createQuoteRequestFromBasket(M).pipe((0,c.T)(j=>(0,f.TN)({entity:j})),(0,Q.qt)(f.MZ))))),this.redirectToNewQuoteRequest$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.NH,f.TN),(0,Q.hh)("entity"),(0,Q.h2)("id"),(0,r.H)(M=>(0,P.H)(this.router.navigateByUrl(`/account/quotes/${M}`)))),{dispatch:!1}),this.redirectToNewQuoteRequestCopy$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.kD),(0,Q.hh)("entity"),(0,Q.h2)("id"),(0,a.YQ)(()=>this.store.pipe((0,t.Lt)(v.Am))),(0,R.p)(([,M])=>M.startsWith("/account/quotes")),(0,r.H)(([M])=>(0,P.H)(this.router.navigateByUrl(`/account/quotes/${M}`)))),{dispatch:!1}),this.submitQuoteRequest$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.iW),(0,Q.hh)("id"),(0,r.H)(M=>this.quotingService.submitQuoteRequest(M).pipe((0,r.H)(j=>this.quotingService.getQuoteDetails(j,"QuoteRequest","Detail")),(0,c.T)(j=>(0,f.vA)({entity:j})),(0,Q.qt)(f.MZ))))),this.addProductToQuoteRequest$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.H_),(0,Q.aV)(),(0,r.H)(({sku:M,quantity:j})=>this.quotingService.addProductToQuoteRequest(M,j).pipe((0,r.H)(H=>this.quotingService.getQuoteDetails(H,"QuoteRequest","Detail")),(0,c.T)(H=>(0,f.Ct)({entity:H})),(0,Q.qt)(f.MZ))))),this.setQuotingBreadcrumb$=(0,i.EH)(()=>this.store.pipe((0,t.Lt)((0,v.NL)("quoteId")),(0,g.n)(M=>this.store.pipe((0,t.Lt)((0,X.JO)(M))))).pipe((0,g.n)(M=>(0,$.T)(()=>!!M,(0,F.of)(M).pipe((0,c.T)(Y.o.state),(0,c.T)(j=>[{key:"quote.quotes.link",link:"/account/quotes"},{key:"New"===j?"quote.edit.unsubmitted.quote_request_details.text":"quote.quote_details.link"}]),(0,c.T)(j=>(0,O.Eo)({breadcrumbData:j}))),y.w)))),this.updateQuoteRequest$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.n5),(0,Q.aV)(),(0,r.H)(({id:M,changes:j})=>this.quotingService.updateQuoteRequest(M,j).pipe((0,r.H)(H=>this.quotingService.getQuoteDetails(H,"QuoteRequest","Detail")),(0,c.T)(H=>(0,f.sx)({entity:H})),(0,Q.qt)(f.MZ))))),this.updateQuoteRequestSuccessMessage$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(f.sx),(0,Q.hh)("entity"),(0,c.T)(Y.o.asQuoteRequest),(0,a.YQ)(()=>this.store.pipe((0,t.Lt)(v.Am))),(0,R.p)(([,M])=>M.startsWith("/account/quotes")),(0,c.T)(([M])=>(0,m.T0)({message:"quote.edit.saved.your_quote_request_has_been_saved.text",messageParams:{0:M.displayName||M.number}}))))}static{this.\u0275fac=function(l){return new(l||p)(n.KVO(i.En),n.KVO(t.il),n.KVO(W.Ix),n.KVO(N),n.KVO(z.S))}}static{this.\u0275prov=n.jDH({token:p,factory:p.\u0275fac})}}return p})();const et={quoting:o(9482).w},st=[ot];let nt=(()=>{class p{constructor(){this.metaReducers=[e.aX]}static{this.\u0275fac=function(l){return new(l||p)}}static{this.\u0275prov=n.jDH({token:p,factory:p.\u0275fac})}}return p})();const tt=new n.nKC("quotingStoreConfig");let u=(()=>{class p{static forTesting(...s){return t.md.forFeature("quoting",(0,q.A)(et,s))}static{this.\u0275fac=function(l){return new(l||p)}}static{this.\u0275mod=n.$C({type:p})}static{this.\u0275inj=n.G2t({providers:[{provide:tt,useClass:nt}],imports:[i.Vm.forFeature(st),t.md.forFeature("quoting",et,tt)]})}}return p})()},12907:(k,S,o)=>{o.d(S,{AR:()=>n.AR,GK:()=>n.GK,H_:()=>n.H_,Ic:()=>n.Ic,Iy:()=>n.Iy,JO:()=>i.JO,Q8:()=>i.Q8,R3:()=>n.R3,Tb:()=>i.Tb,XH:()=>i.XH,Yh:()=>n.Yh,iW:()=>n.iW,kE:()=>n.kE,n5:()=>n.n5,qt:()=>i.qt,uK:()=>i.uK,vh:()=>n.vh,xO:()=>n.xO});var n=o(5233),i=o(8479)},5233:(k,S,o)=>{o.d(S,{AR:()=>t,Cl:()=>g,Ct:()=>_,GK:()=>x,H_:()=>T,Ic:()=>C,Iy:()=>P,JG:()=>y,MZ:()=>q,NH:()=>O,Qw:()=>m,R3:()=>R,TN:()=>W,VR:()=>c,Yh:()=>v,Yv:()=>F,c4:()=>$,cd:()=>r,iW:()=>Y,kD:()=>Q,kE:()=>X,n5:()=>d,sx:()=>h,vA:()=>f,vh:()=>a,vm:()=>e,xO:()=>B});var n=o(11439),i=o(8615);const t=(0,n.VP)("[Quoting] Load Quoting"),q=(0,n.VP)("[Quoting API] Load Quoting Fail",(0,i.p2)()),e=(0,n.VP)("[Quoting API] Load Quoting Success",(0,i.lM)()),a=(0,n.VP)("[Quoting] Load Quoting Detail",(0,i.lM)()),F=(0,n.VP)("[Quoting API] Load Quoting Detail Success",(0,i.lM)()),P=(0,n.VP)("[Quoting] Delete Quoting Entity",(0,i.lM)()),$=(0,n.VP)("[Quoting API] Delete Quoting Entity Fail",(0,i.p2)()),y=(0,n.VP)("[Quoting API] Delete Quoting Entity Success",(0,i.lM)()),x=(0,n.VP)("[Quoting] Delete Quote From Basket",(0,i.lM)()),c=(0,n.VP)("[Quoting API] Delete Quote From Basket Success"),r=(0,n.VP)("[Quoting API] Delete Quote From Basket Fail"),C=(0,n.VP)("[Quoting] Reject Quote",(0,i.lM)()),g=(0,n.VP)("[Quoting API] Reject Quote Fail",(0,i.p2)()),R=(0,n.VP)("[Quoting] Add Quote To Basket",(0,i.lM)()),m=(0,n.VP)("[Quoting API] Add Quote To Basket Success",(0,i.lM)()),v=(0,n.VP)("[Quoting] Create Quote Request From Quote",(0,i.lM)()),O=(0,n.VP)("[Quoting API] Create Quote Request From Quote Success",(0,i.lM)()),B=(0,n.VP)("[Quoting] Create Quote Request From Quote Request",(0,i.lM)()),Q=(0,n.VP)("[Quoting API] Create Quote Request From Quote Request Success",(0,i.lM)()),Y=(0,n.VP)("[Quoting] Submit Quote Request",(0,i.lM)()),f=(0,n.VP)("[Quoting API] Submit Quote Request Success",(0,i.lM)()),X=(0,n.VP)("[Quoting] Create Quote Request From Basket"),W=(0,n.VP)("[Quoting API] Create Quote Request From Basket Success",(0,i.lM)()),T=(0,n.VP)("[Quoting] Add Product To Quote Request",(0,i.lM)()),_=(0,n.VP)("[Quoting API] Add Product To Quote Request Success",(0,i.lM)()),d=(0,n.VP)("[Quoting] Update Quote Request",(0,i.lM)()),h=(0,n.VP)("[Quoting API] Update Quote Request Success",(0,i.lM)())},9482:(k,S,o)=>{o.d(S,{$:()=>a,w:()=>P});var n=o(72351),i=o(11439),t=o(8615),q=o(37929),e=o(5233);const a=(0,n.p)({sortComparer:q.o.sort}),F=a.getInitialState({loading:0,error:void 0,activeQuoteRequest:void 0,initialized:!1}),P=(0,i.vy)(F,(0,t.KI)(e.AR,e.vh,e.Iy,e.Ic,e.R3,e.Yh,e.xO,e.kE,e.iW,e.H_,e.n5),(0,t.qj)(e.vm,e.Yv,e.JG,e.Qw,e.NH,e.kD,e.TN,e.vA,e.Ct,e.
1sx),(0,t.Qe)(e.MZ,e.c4,e.Cl),(0,i.on)(e.vm,$=>({...$,initialized:!0})),(0,i.on)(e.vm,($,y)=>y.payload.quoting.reduce((x,c)=>x.entities[c.id]?x.entities[c.id].type!==c.type?a.setOne(c,x):x:a.addOne(c,x),$)),(0,i.on)(e.Yv,e.NH,e.kD,e.TN,e.vA,e.Ct,e.sx,($,y)=>a.upsertOne(y.payload.entity,$)),(0,i.on)(e.JG,($,y)=>a.removeOne(y.payload.id,$)),(0,i.on)(e.H_,$=>({...$,activeQuoteRequest:void 0})),(0,i.on)(e.Ct,e.kD,($,y)=>({...$,activeQuoteRequest:y.payload.entity.id})))},8479:(k,S,o)=>{o.d(S,{Tb:()=>x,XH:()=>$,JO:()=>y,uK:()=>a,qt:()=>e,Q8:()=>c});var n=o(11439);const i=(0,n.UX)("quoting");var t=o(9482);const q=(0,n.Mz)(i,r=>r.quoting),e=(0,n.Mz)(q,r=>!!r.loading),a=(0,n.Mz)(q,r=>r.error),{selectAll:F,selectEntities:P}=t.$.getSelectors(q),$=F,y=r=>(0,n.Mz)(P,C=>C[r]),x=(0,n.Mz)(q,r=>r.activeQuoteRequest),c=(0,n.Mz)(q,r=>r.initialized)}}]);
2//# sourceMappingURL=quoting.97934da5b23e6ff5.js.map

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.