1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1f575dd8-7911-5622-9458-8b7e75d6747a")}catch(e){}}(); 3import{a as re}from"./chunk-KF65IJ4Y.js";import{a as J}from"./chunk-JNG5TW3D.js";import{a as ie}from"./chunk-PTCY42A2.js";import{c as te}from"./chunk-IZXVSY3V.js";import"./chunk-VCOW63QY.js";import"./chunk-T53CQOLO.js";import"./chunk-SQ6QCZLB.js";import{a as ne}from"./chunk-HB6TEBN2.js";import"./chunk-LPDIMKNY.js";import{A as W,H as X,P as Z,Q as ee}from"./chunk-B66XJD43.js";import{a as oe}from"./chunk-3ZW6N2JT.js";import{c as Q}from"./chunk-3EZXP5PH.js";import{w as H}from"./chunk-ZKOLBV74.js";import{o as q}from"./chunk-O5XMNMBG.js";import{j as V,m as z}from"./chunk-6B4PNQXG.js";import{i as G}from"./chunk-PFCSHK6N.js";import{g as K,m as F,p as y}from"./chunk-RKPJ2UTN.js";import"./chunk-PJHPQLZ6.js";import{Cb as f,Ic as x,J as L,Jc as u,Nc as Y,Qb as v,R as O,Rb as n,Sb as r,T as D,Tb as S,Xb as _,Yb as w,_b as $,dc as N,e as E,ea as I,fc as h,gb as p,mc as U,o as B,p as P,rc as e,tb as c,tc as m,uc as j,xa as R,xb as A,ya as M}from"./chunk-ZNCIH3CQ.js";import{h as se}from"./chunk-HFPSG5IV.js";var ae=se(oe());function de(s,i){if(s&1&&(_(0),e(1,` 4 `),n(2,"div",10),e(3,` 5 `),n(4,"div",11),e(5,` 6 `),n(6,"h2",12),e(7),r(),e(8,` 7 `),r(),e(9,` 8 `),n(10,"div",13),e(11),r(),e(12,` 9 `),n(13,"div",14),e(14),r(),e(15,` 10 `),n(16,"div",13),e(17),r(),e(18,` 11 `),S(19,"div",15),e(20,` 12 `),r(),e(21,` 13 `),w()),s&2){let t=h().ngIf,o=h();p(7),m(` 14 `,t.previousBasket.deliverymode==="dinein"?"Dine-in":"Takeout",` Order Placed 15 `),p(4),m(` 16 Your `,t.previousBasket.deliverymode==="dinein"?"dine-in":"takeout",` order has been placed for 17 `),p(3),j(` 18 `,t.billingInfo.firstname," ",t.billingInfo.lastname,` 19 `),p(3),m(` 20 Order will be ready by 21 `,t.previousBasket.deliverymode==="dinein"?o.getTime(t.manualFireTime):o.getTime(t.previousBasket.readytime),`. 22 `)}}function pe(s,i){if(s&1&&(n(0,"div",13),e(1,` 23 `),n(2,"div",16),e(3,"Discount"),r(),e(4,` 24 `),n(5,"div",17),e(6),x(7,"currency"),r(),e(8,` 25 `),r()),s&2){let t=h(2).ngIf;p(6),m("-",u(7,1,t.previousBasket.discounts[0].amount))}}function le(s,i){if(s&1&&(_(0),e(1,` 26 `),n(2,"div",13),e(3,` 27 `),n(4,"div",16),e(5,"Change Due"),r(),e(6,` 28 `),n(7,"div",17),e(8),x(9,"currency"),r(),e(10,` 29 `),r(),e(11,` 30 `),w()),s&2){let t=h(2).ngIf;p(8),m(` 31 `,u(9,1,t.change),` 32 `)}}function ce(s,i){if(s&1&&(_(0),e(1,` 33 `),n(2,"div",13),e(3,` 34 `),n(4,"div",16),e(5,"Subtotal"),r(),e(6,` 35 `),n(7,"div",17),e(8),x(9,"currency"),r(),e(10,` 36 `),r(),e(11,` 37 `),f(12,pe,9,3,"div",18),e(13,` 38 `),n(14,"div",13),e(15,` 39 `),n(16,"div",16),e(17,"Tax"),r(),e(18,` 40 `),n(19,"div",17),e(20),x(21,"currency"),r(),e(22,` 41 `),r(),e(23,` 42 `),n(24,"div",13),e(25,` 43 `),n(26,"div",16),e(27,"Total"),r(),e(28,` 44 `),n(29,"div",19),e(30),x(31,"currency"),r(),e(32,` 45 `),r(),e(33,` 46 `),f(34,le,12,3,"ng-container",3),e(35,` 47 `),w()),s&2){let t=h().ngIf;p(8),m(` 48 `,u(9,5,t.previousBasket.subtotal),` 49 `),p(4),v("ngIf",t.previousBasket.discounts&&t.previousBasket.discounts.length>0),p(8),m(` 50 `,u(21,7,t.previousBasket.salestax),` 51 `),p(10),m(` 52 `,u(31,9,t.previousBasket.total),` 53 `),p(4),v("ngIf",t.change&&t.change>0)}}function me(s,i){s&1&&(e(0,` 54 `),n(1,"div",20),e(2,` 55 `),n(3,"div",21),e(4,` 56 `),S(5,"div",22),e(6,` 57 `),r(),e(7,` 58 `),r(),e(8,` 59 `))}function fe(s,i){if(s&1){let t=$();n(0,"div",2),e(1,` 60 `),f(2,de,22,5,"ng-container",3),e(3,` 61 `),n(4,"div",4),e(5,` 62 `),e(6,` 63 `),f(7,ce,36,11,"ng-container",5),e(8,` 64 65 `),f(9,me,9,0,"ng-template",null,0,Y),e(11,` 66 67 `),n(12,"div",6),e(13,` 68 `),n(14,"button",7),N("click",function(){R(t);let d=h();return M(d.startNewOrder())}),e(15,"Start New Order"),r(),e(16,` 69 `),r(),e(17,` 70 `),r(),e(18,` 71 72 `),n(19,"div",8),e(20,` 73 `),S(21,"canvas",9),e(22,` 74 `),r(),e(23,` 75`),r()}if(s&2){let t=i.ngIf,o=U(10);p(2),v("ngIf",t.previousBasket),p(5),v("ngIf",t.previousBasket)("ngIfElse",o)}}var T=class s{constructor(i,t,o,d,g,l,a,k,C){this.fb=i,this.router=t,this.store=o,this.toastr=d,this.printer=g,this.currencyPipe=l,this.expo=a,this.email=k,this.truncatePipe=C,this.expoOrder=null,this.receiptPrinted=!1,this.pendingEmailAddress=null,this.subscriptions=[],this.store.dispatch(new Q("CONFIRMATION",!0,!1,""))}ngAfterViewInit(){this.subscriptions.push(this.basket$.pipe(L(i=>i.previousBasket!==null),D((i,t)=>i.previousBasket?.id===t.previousBasket?.id),I(i=>(this.basket=i,this.pendingEmailAddress=localStorage.getItem("emailAddress"),localStorage.removeItem("emailAddress"),this.expo.getExpoOrderByOrderId(i.previousBasket.id,i.previousBasket.basket_id).pipe(O(1))))).subscribe(i=>{this.expoOrder=i?.[0]||null;let t=this.expoOrder,o=this.pendingEmailAddress;this.pendingEmailAddress=null,t&&(o&&o!==""&&!t.confirmation_email_sent&&this.subscriptions.push(this.email.postConfirmation({expoOrder:t,basket:this.basket,emailAddress:o}).pipe(I(()=>
75this.expo.updateExpoOrder({id:t.id,confirmation_email_sent:!0}))).subscribe({error:d=>console.error("Failed to send kiosk confirmation email",d)})),this.receiptPrinted||(this.printer.onSendMessageCanvas(this.generateReceipt.bind(this)),this.receiptPrinted=!0))}))}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe()),this.store.dispatch(new Z),this.store.dispatch(new X),this.store.dispatch(new ee),this.store.dispatch(new W)}startNewOrder(){this.router.navigateByUrl("/kiosk/start-order")}getTime(i){return ne.fromOlo(i).time}generateReceipt(){let i=(0,ae.default)(this.basket.previousBasket.deliverymode==="dinein"?this.expoOrder.ready_time:this.basket.previousBasket.readytime,"YYYY-MM-DD HH:mm:ss").format("M/D/YYYY - h:mm a"),t=this.store.selectSnapshot(a=>a.basket.trancloudInfo),o=this.currencyPipe.transform(this.basket.previousBasket.subtotal,"USD"),d="";this.basket.previousBasket.discounts&&this.basket.previousBasket.discounts.length&&(d=this.currencyPipe.transform(this.basket.previousBasket.discounts[0].amount,"USD"));let g=this.currencyPipe.transform(this.basket.previousBasket.salestax,"USD"),l=this.currencyPipe.transform(this.basket.previousBasket.total,"USD");if(this.printer.drawLineSpace(3),this.printer.drawAlignedText("center",this.basket.previousBasket.vendorname),this.printer.drawLineSpace(2),this.printer.drawAlignedText("center",this.basket.billingInfo.firstname+" "+this.basket.billingInfo.lastname),this.printer.drawLineSpace(1),this.printer.drawAlignedText("center","Order #"+this.basket.previousBasket.oloid),this.printer.drawLineSpace(1),this.printer.drawAlignedText("center",i),this.printer.drawLineSpace(3),this.basket.previousBasket.products.forEach(a=>{let k=this.truncatePipe.transform(a.name,27),C=this.currencyPipe.transform(a.totalcost,"USD");this.printer.drawLeftRightText(`${a.quantity} - ${k}`,C),this.printer.drawLineSpace(1),a.choices&&a.choices.length&&a.choices.forEach(b=>{!b.name.includes("Included")&&b.name!=="Additional Toppings"&&b.name!=="Additional Ingredients"&&b.name!=="Mozzarella (Standard, No Charge)"&&(this.printer.drawAlignedText("left",` * ${this.truncatePipe.transform(b.name,30)}`),this.printer.drawLineSpace(1))})}),this.printer.drawLineSpace(1),this.printer.drawLineSpace(2),this.printer.drawLeftRightText("Subtotal:",o),this.printer.drawLineSpace(1),this.basket.previousBasket.discounts&&this.basket.previousBasket.discounts.length&&(this.printer.drawLeftRightText("Discount:","-"+d),this.printer.drawLineSpace(1)),this.printer.drawLeftRightText("Tax:",g),this.printer.drawLineSpace(1),this.basket.previousBasket.tip&&(this.printer.drawLeftRightText("Tip:",this.currencyPipe.transform(this.basket.previousBasket.tip,"USD")),this.printer.drawLineSpace(1)),this.printer.drawLeftRightText("Total:",l),this.printer.drawLineSpace(3),console.log(this.basket.billingInfo),this.basket.billingInfo.billingaccounts&&this.basket.billingInfo.billingaccounts.length>0)this.basket.billingInfo.billingaccounts.forEach(a=>{this.printPaymentMethodDetails(a)});else{let a={billingmethod:this.basket.billingInfo.billingmethod,amount:this.basket.previousBasket.total,cardtype:this.basket.billingInfo.cardtype,cardlastfour:this.basket.billingInfo.cardlastfour,billingfields:this.basket.billingInfo.billingfields};this.printPaymentMethodDetails(a)}this.printer.drawLineSpace(1)}printPaymentMethodDetails(i){let t=this.currencyPipe.transform(i.amount,"USD");switch(i.billingmethod){case"storedvalue":if(i.billingfields&&i.billingfields.length>0){let a=(i.billingfields.find(k=>k.name==="number")?.value||"").slice(-4);a?this.printer.drawLeftRightText(`Gift card ending in ${a}:`,t):this.printer.drawLeftRightText("Gift card:",t)}else this.printer.drawLeftRightText("Gift card:",t);this.printer.drawLineSpace(1);break;case"creditcard":let o="Credit card";i.cardnumber?o=`Credit card ending in ${i.cardnumber.slice(-4)}`:i.cardlastfour&&(o=`Credit card ending in ${i.cardlastfour}`),this.printer.drawLeftRightText(`${o}:`,t),this.printer.drawLineSpace(1);break;case"paymentsession":case"prepaid":let d=this.store.selectSnapshot(l=>l.basket.trancloudInfo);if(d){let l=d.cardType||"Card",a=d.cardNumber?d.cardNumber.slice(-4):"";a?this.printer.drawLeftRightText(`${l} ending in ${a}:`,t):this.printer.drawLeftRightText(`${l}:`,t),this.printer.drawLineSpace(1),d.authCode&&(this.printer.drawLeftRightText(` Auth: ${d.authCode}`,""),this.printer.drawLineSpace(1)),d.refNo&&(this.printer.drawLeftRightText(` Ref #: ${d.refNo}`,""),this.printer.drawLineSpace(1))}else this.printer.drawLeftRightText("Credit card:",t),this.printer.drawLineSpace(1);break;case"cash":this.printer.drawCashDetails(t,this.currencyPipe.transform(this.expoOrder?.cash_given,"USD"),this.currencyPipe.transform(this.expoOrder?.change_amount,"USD"));break;case"digitalwallet":let g=i.cardtype?.includes("Apple")?"Apple Pay":"Google Pay";i.cardlastfour?this.printer.drawLeftRightText(`${g} ending in ${i.cardlastfour}:`,t):this.printer.drawLeftRightText(`${g}:`,t),this.printer.drawLineSpace(1);break;default:this.printer.drawLeftRightText("Payment:",t),this.printer.drawLineSpace(1);break}}static{this.\u0275fac=function(t){return new(t||s)(c(H),c(G),c(V),c(q),c(ie),c(y),c(te),c(re),c(J))}}static{this.\u0275cmp=A({type:s,selectors:[["app-confirmation"]],decls:3,vars:3,consts:[["showLoader",""],["class","kiosk-conf",4,"ngIf"],[1,"kiosk-conf"],[4,"ngIf"],[1,"payment-info"],[4,"ngIf","ngIfElse"],[1,"pt-4","px-3"],[1,"btn","btn-primary","text-white","largeButton","py-2",3,"click"],["id","canvasFrame",2,"display","none"],["id","canvasPaper","width","576","height","640"],[1,"conf-heading","d-flex","flex-column","justify-content-center","align-items-center"],[1,"d-flex"],["color","primary"],[1,"d-flex","flex-row","py-2"],[1,"d-flex","flex-row","bold","f-18","py-2","name"],[1,"kiosk-conf-divider"],[1,"col","text-start"],[1,"col","text-end"],["class","d-flex flex-row py-2",4,"ngIf"],[1,"col","text-end","bold"],[1,"d-flex","flex-row"],[1,"col"],[1,"spin-loader-heat-map"]],template:function(t,o){t&1&&(f(0,fe,24,3,"div",1),x(1,"async"),e(2,` 76`)),t&2&&v("ngIf",u(1,1,o.basket$))},dependencies:[K,F,y],styles:[".kiosk-conf[_ngcontent-%COMP%]{margin:160px 20px 20px;background-color:#fff;border-radius:5px;padding:40px}.kiosk-conf[_ngcontent-%COMP%] .conf-heading[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{justify-content:center}.kiosk-conf[_ngcontent-%COMP%] .conf-heading[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-decoration:underline}.kiosk-conf[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{text-transform:uppercase;color:#f04e29;font-size:30pt;font-family:brandonBold}.payment-info[_ngcontent-%COMP%]{padding:20px 80px}.kiosk-conf-divider[_ngcontent-%COMP%]{margin-top:30px;width:100%;border-bottom:1px solid grey}"]})}};B([z(),P("design:type",E)],T.prototype,"basket$",void 0);
76export{T as KioskConfirmationComponent}; 77 78//# debugId=1f575dd8-7911-5622-9458-8b7e75d6747a
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.