(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{"/bYn":function(n,t,l){"use strict";l.d(t,"a",(function(){return o}));var e=l("0JMs"),i=l("sDGj");class o{constructor(n,t){this.elRef=n,this.control=t}onInputChange(n){const t=Number(this.inputName.maxLength);let l;l=this.inputName.inputDefault?Object(e.p)(n.target.value):this.inputName.stockType?Object(e.r)(n.target.value.replace(i.e,"")):Object(e.p)(n.target.value.replace(i.d,"")),this.inputName.isLowerCaseValid||(l=this.filterUppercaseCharacters(l)),l=l.replace(/ +/g," "),l=l.length>t?l.substring(0,t):l,this.elRef.nativeElement.value=l,this.control.control.setValue(l)}onPaste(n){n.preventDefault();const t=n.clipboardData.getData("text/plain");let l;l=this.inputName.inputDefault?Object(e.p)(t):this.inputName.stockType?Object(e.r)(t.replace(i.e,"")):Object(e.p)(t.replace(i.d,"")),this.inputName.isLowerCaseValid||(l=this.filterUppercaseCharacters(l)),l=l.replace(/ +/g," "),document.execCommand("insertText",!1,l)}filterUppercaseCharacters(n){let t=n.replace(i.d,"");t=n.toUpperCase();const l=t.length;return" "===t.substring(t.length-2,l)&&(t=t.substring(0,l-1)),t}}},"6iyd":function(n,t,l){"use strict";l.d(t,"a",(function(){return e}));class e{constructor(n){this.elementRef=n,this.appAutoFocus=!0,this.focusDelay=0}ngOnChanges(){this.checkFocus()}checkFocus(){this.appAutoFocus&&document.activeElement!==this.elementRef.nativeElement&&setTimeout(()=>{this.elementRef.nativeElement.focus()},this.focusDelay)}}},AKYT:function(n,t,l){"use strict";l.r(t);var e=l("8Y7J");class i{}var o=l("pMnS"),a=l("SVse"),c=l("TSSN"),u=l("6spI"),r=l("dOKT"),s=l("0JMs");class g{constructor(){this.isShowBtn=!1}ngOnInit(){this.imageDisplay="data:image/png;base64,"+this.image,this.pointDisplay=Object(s.e)(this.point.toString())}onHandleError(){this.imageDisplay="assets/images/default_gift.jpg"}}var h=e.pb({encapsulation:0,styles:[[".gift-info[_ngcontent-%COMP%]{display:flex}.gift-info[_ngcontent-%COMP%] .gift-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:90px}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%]{margin-left:15px;width:100%}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;line-height:1.54;color:#42236a;margin-bottom:4px}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .partner[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:1.43;color:#ad8ad8;margin-bottom:4px}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%]{display:flex}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%] .point[_ngcontent-%COMP%]{font-size:16px;font-weight:500;line-height:1.57;color:#42236a}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%] .point[_ngcontent-%COMP%] .point-txt[_ngcontent-%COMP%]{font-size:14px;font-weight:400}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%] .exchange-gift[_ngcontent-%COMP%]{line-height:normal;text-align:right;margin:0 0 0 auto}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%] .exchange-gift[_ngcontent-%COMP%] .common-image[_ngcontent-%COMP%]{height:20px;width:20px}.gift-info[_ngcontent-%COMP%] .gift-detail[_ngcontent-%COMP%] .wrap-button[_ngcontent-%COMP%] .exchange-gift[_ngcontent-%COMP%] .text-link-size[_ngcontent-%COMP%]{font-size:14px;font-weight:500;-webkit-text-decoration-line:underline;text-decoration-line:underline}"]],data:{}});function d(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,4,"div",[["class","exchange-gift"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,3,"span",[["class","text-link text-link-size"]],null,null,null,null,null)),(n()(),e.Lb(2,null,[" "," "])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(4,0,null,null,0,"img",[["class","common-image"],["src","assets/icons/right.svg"]],null,null,null,null,null))],null,(function(n,t){n(t,2,0,e.Mb(t,2,0,e.Db(t,3).transform("loyalty.detail.gift_exchange_btn")))}))}function p(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,15,"div",[["class","gift-info"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"div",[["class","gift-image"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,0,"img",[["alt",""]],[[8,"src",4]],[[null,"error"]],(function(n,t,l){var e=!0;return"error"===t&&(e=!1!==n.component.onHandleError()&&e),e}),null,null)),(n()(),e.rb(3,0,null,null,12,"div",[["class","gift-detail"]],null,null,null,null,null)),(n()(),e.rb(4,0,null,null,1,"div",[["class","title"]],null,null,null,null,null)),(n()(),e.Lb(5,null,["",""])),(n()(),e.rb(6,0,null,null,1,"div",[["class","partner"]],null,null,null,null,null)),(n()(),e.Lb(7,null,["",""])),(n()(),e.rb(8,0,null,null,7,"div",[["class","wrap-button"]],null,null,null,null,null)),(n()(),e.rb(9,0,null,null,4,"div",[["class","point"]],null,null,null,null,null)),(n()(),e.Lb(10,null,["",""])),(n()(),e.rb(11,0,null,null,2,"span",[["class","point-txt"]],null,null,null,null,null)),(n()(),e.Lb(12,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,d)),e.qb(15,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null)],(function(n,t){n(t,15,0,t.component.isShowBtn)}),(function(n,t){var l=t.component;n(t,2,0,e.vb(1,"",l.imageDisplay,"")),n(t,5,0,l.title),n(t,7,0,l.partner),n(t,10,0,l.pointDisplay+" "),n(t,12,0,e.Mb(t,12,0,e.Db(t,13).transform("loyalty.exchange.gift_point_title")))}))}var b=l("s7LF"),f=l("aJGe"),m=l("VgyV"),_=l("olOy"),C=l("Fo8p"),P=l("Xwc5"),O=function(n){return n.ASC="0",n.DESC="1",n}({}),M=function(n){return n.ASC="POINT_ASC",n.DESC="POINT_DESC",n}({});class x{constructor(n,t,l){this.commonService=n,this.translateService=t,this.formBuilder=l,this.backHomePage=new e.m,this.clickItem=new e.m,this.filterOptions=[{id:0,name:"loyalty.list.exchange.gift_all",type:"ALL"},{id:1,name:"loyalty.list.exchange.gift_enough",type:"ENOUGH"}],this.sortOptions=[{id:0,name:"loyalty.list.exchange.sort_asc"},{id:1,name:"loyalty.list.exchange.sort_desc"}],this.selectionOptions=[{name:"loyalty.home.category_all",icon_default:"assets/icons/loyalty/ic_gift.svg",icon_active:"assets/icons/loyalty/ic_gift_active.svg",isActive:!0,category:"ALL"},{name:"loyalty.home.category_shopping",icon_default:"assets/icons/loyalty/ic_shopping.svg",icon_active:"assets/icons/loyalty/ic_shopping_active.svg",isActive:!1,category:"SHOPPING"},{name:"loyalty.home.category_cuisine",icon_default:"assets/icons/loyalty/ic_cuisine.svg",icon_active:"assets/icons/loyalty/ic_cuisine_active.svg",isActive:!1,category:"CUISINE"},{name:"loyalty.home.category_utilities",icon_default:"assets/icons/loyalty/ic_utility.svg",icon_active:"assets/icons/loyalty/ic_utility_active.svg",isActive:!1,category:"UTILITIES"},{name:"loyalty.home.category_service",icon_default:"assets/icons/loyalty/ic_service.svg",icon_active:"assets/icons/loyalty/ic_service_active.svg",isActive:!1,category:"SERVICE"},{name:"loyalty.home.category_travel",icon_default:"assets/icons/loyalty/ic_travel.svg",icon_active:"assets/icons/loyalty/ic_travel_active.svg",isActive:!1,category:"TRAVEL"}],this.bodyData={giftCategory:"ALL",giftPoint:"ENOUGH",pagingIndex:0,pagingSize:10,orderBy:M.ASC},this.throttle=20,this.scrollDistance=1,this.scrollUpDistance=2,this.direction="",this.listGifts=[],this.filterResult=[]}ngOnInit(){this.selectDropdown=this.formBuilder.group({filter:new b.f("1"),sort:new b.f("0")}),this.startData.listGift&&this.startData.listGift.length>0?(this.filterResult=this.startData.listGift,this.listGifts=this.startData.listGift,this.selectDropdown.controls.filter.setValue(this.startData.filter),this.selectDropdown.controls.sort.setValue(this.startData.sort),this.selectedItem=this.startData.giftCategory,this.bodyData.giftCategory=this.selectionOptions[this.selectedItem].category,this.setSelectedOption(this.startData.giftCategory),this.bodyData.pagingIndex=this.startData.pagingIndex,this.bodyData.giftPoint=this.startData.giftPoint,this.totalRowDisplay=this.translateService.instant("loyalty.list.exchange.gift_total_row",{result:this.filterResult.length})):(this.selectedItem=this.startData.giftCategory,this.fetchListGift(!1)),this.selectDropdown.controls.filter.valueChanges.subscribe(n=>{this.bodyData.giftPoint=this.filterOptions[n].type,this.bodyData.pagingIndex=0,this.scrollContainer.nativeElement.scrollTop=0,this.fetchListGift(!1)}),this.selectDropdown.controls.sort.valueChanges.subscribe(n=>{this.scrollContainer.nativeElement.scrollTop=0,this.bodyData.pagingIndex=0,this.bodyData.orderBy=n===O.ASC?M.ASC:M.DESC,this.fetchListGift(!1)})}onItemSelected(n){this.selectedGiftCode=n,this.startData.giftCode=n,this.startData.listGift=this.filterResult,this.startData.filter=this.selectDropdown.controls.filter.value,this.startData.sort=this.selectDropdown.controls.sort.value,this.startData.pagingIndex=this.bodyData.pagingIndex,this.startData.giftCategory=this.selectedItem,this.startData.giftPoint=this.bodyData.giftPoint,this.clickItem.emit(this.startData)}setSelectedOption(n){this.selectionOptions.forEach(n=>{n.isActive=!1}),this.selectionOptions[n].isActive=!0}fetchListGift(n){this.commonService.callApi({method:C.a.POST,url:P.a.GET_LIST_GIFT,data:this.bodyData,success:t=>{n?this.listGifts.push(...t.gifts):this.listGifts=t.gifts,this.totalRowDisplay=this.translateService.instant("loyalty.list.exchange.gift_total_row",{result:t.totalRow}),this.sortGifts(this.selectDropdown.controls.filter.value,this.selectDropdown.controls.sort.value)}})}sortGifts(n,t){this.filterResult=this.listGifts.slice(),O.ASC===t?this.filterResult.sort((n,t)=>n.point-t.point):O.DESC===t&&this.filterResult.sort((n,t)=>t.point-n.point),this.totalRowDisplay=this.translateService.instant("loyalty.list.exchange.gift_total_row",{result:this.filterResult.length})}onOptionSelected(n){this.setSelectedOption(n),this.selectedItem=n,this.bodyData.giftCategory=this.selectionOptions[n].category,this.bodyData.pagingIndex=0,this.fetchListGift(!1),this.scrollContainer.nativeElement.scrollTop=0}onScrollDown(n){this.bodyData.pagingIndex+=1,this.fetchListGift(!0)}onUp(n){}}var y=l("oUVn"),v=e.pb({encapsulation:0,styles:[[".list-gift-card[_ngcontent-%COMP%]{width:100%;margin:auto}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%]{justify-content:center;align-items:center;display:flex;padding-bottom:4px;padding-top:4px;border-bottom:1px solid rgba(105,105,105,.14)}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]{display:flex;border-radius:5px;height:48px;background-color:#f6f6fe;justify-content:center;align-items:center;font-size:14px;color:#42236a;margin:10px;padding:14px 8px;border:1px solid #e6e9ee}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{color:#fff;background-color:#ff9800}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover .selection-card-image[_ngcontent-%COMP%]{margin-right:8px}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover .selection-card-image[_ngcontent-%COMP%] .img-hide[_ngcontent-%COMP%]{display:block}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover .selection-card-image[_ngcontent-%COMP%] .img-default[_ngcontent-%COMP%]{display:none}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .selection-card-image[_ngcontent-%COMP%]{margin-right:8px}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .selection-card-image[_ngcontent-%COMP%] .img-hide[_ngcontent-%COMP%]{display:none}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%] .selection-card-image[_ngcontent-%COMP%] .img-default[_ngcontent-%COMP%]{display:block}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{background-color:#ff9800;border:1px solid #e6e9ee;color:#fff;border-radius:5px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%]{display:flex;margin-top:14px;padding-bottom:20px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .total_item[_ngcontent-%COMP%]{margin:auto;font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:1.43;letter-spacing:normal;color:#42236a}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .total_item[_ngcontent-%COMP%] span{font-size:16px;font-weight:500}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .filter-point[_ngcontent-%COMP%]{margin-right:16px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .sort-point[_ngcontent-%COMP%]{margin-right:15px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container{width:200px;max-width:none;min-width:unset}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container .select-container__wrap-top{justify-content:center;background-color:#f6f6fe}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container .select-container__wrap-top .select-container__item-selected{font-weight:400}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container .select-container__wrap-top:active, .list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container .select-container__wrap-top:hover{background-color:#e2d8ee}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%]{margin-right:0;margin-left:0;max-height:320px;overflow-y:auto}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%] .gift-card[_ngcontent-%COMP%]{border-right:1px solid rgba(105,105,105,.14);outline:0;padding:0 15px}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%] .gift-card[_ngcontent-%COMP%] .gift-card-border[_ngcontent-%COMP%]{height:1px;background-color:#e1e3e8;margin-top:15px;margin-bottom:15px;opacity:.55}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(even){border-right:none}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:3px;background:#e2d8ee}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#7b35bb}@media (max-width:767px) and (min-width:576px){.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%] .gift-card[_ngcontent-%COMP%]{border-right:none}}@media only screen and (max-width:575px){.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%]{justify-content:unset;align-items:center;margin-left:5px;margin-right:14px;overflow:scroll;border-bottom:none}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .option[_ngcontent-%COMP%]:hover{color:#42236a;background-color:#f6f6fe}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]:hover{background-color:#ff9800;border:1px solid #e6e9ee;color:#fff;border-radius:5px}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .selection-card-image[_ngcontent-%COMP%] .img-default[_ngcontent-%COMP%]{display:block!important}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .selection-card-image[_ngcontent-%COMP%] .img-hide[_ngcontent-%COMP%]{display:none!important}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%] .selection-card-title[_ngcontent-%COMP%]{width:-webkit-max-content;width:-moz-max-content;width:max-content}.list-gift-card[_ngcontent-%COMP%] .category-section[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%]{display:block;width:100%;margin-top:0}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .total_item[_ngcontent-%COMP%]{margin-bottom:10px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%]{display:block}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .filter-point[_ngcontent-%COMP%]{margin-right:0;margin-bottom:16px}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .sort-point[_ngcontent-%COMP%]{margin-right:0}.list-gift-card[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .select-dropdown[_ngcontent-%COMP%] .select-container{width:100%}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%] .gift-card[_ngcontent-%COMP%]{border-right:none}.list-gift-card[_ngcontent-%COMP%] .list-gift-section[_ngcontent-%COMP%]::-webkit-scrollbar{display:block}}"]],data:{}});function w(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,11,"div",[["class","option"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onOptionSelected(n.context.index)&&e),e}),null,null)),e.Ib(512,null,a.B,a.C,[e.q,e.r,e.k,e.C]),e.qb(2,278528,null,0,a.l,[a.B],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),e.Gb(3,{active:0}),(n()(),e.rb(4,0,null,null,2,"div",[["class","selection-card-image"]],null,null,null,null,null)),(n()(),e.rb(5,0,null,null,0,"img",[["alt",""],["class","img-default"]],[[8,"src",4]],null,null,null,null)),(n()(),e.rb(6,0,null,null,0,"img",[["alt",""],["class","img-hide"]],[[8,"src",4]],null,null,null,null)),(n()(),e.rb(7,0,null,null,4,"div",[["class","selection-card-title"]],null,null,null,null,null)),(n()(),e.rb(8,0,null,null,2,"span",[],null,null,null,null,null)),(n()(),e.Lb(9,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),e.Cb(null,0)],(function(n,t){var l=n(t,3,0,t.context.$implicit.isActive);n(t,2,0,"option",l)}),(function(n,t){n(t,5,0,e.vb(1,"",t.context.$implicit.isActive?t.context.$implicit.icon_active:t.context.$implicit.icon_default,"")),n(t,6,0,e.vb(1,"",t.context.$implicit.icon_active,"")),n(t,9,0,e.Mb(t,9,0,e.Db(t,10).transform(t.context.$implicit.name)))}))}function D(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,4,"select-option",[],null,null,null,u.b,u.a)),e.qb(1,114688,[[2,4]],0,r.a,[],{value:[0,"value"],name:[1,"name"]},null),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.Lb(3,0,[" "," "])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,1,0,e.vb(1,"",t.context.$implicit.id,""),e.vb(1,"",e.Mb(t,1,1,e.Db(t,2).transform(t.context.$implicit.name)),""))}),(function(n,t){n(t,3,0,e.Mb(t,3,0,e.Db(t,4).transform(t.context.$implicit.name)))}))}function k(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,4,"select-option",[],null,null,null,u.b,u.a)),e.qb(1,114688,[[3,4]],0,r.a,[],{value:[0,"value"],name:[1,"name"]},null),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.Lb(3,0,[" "," "])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,1,0,e.vb(1,"",t.context.$implicit.id,""),e.vb(1,"",e.Mb(t,1,1,e.Db(t,2).transform(t.context.$implicit.name)),""))}),(function(n,t){n(t,3,0,e.Mb(t,3,0,e.Db(t,4).transform(t.context.$implicit.name)))}))}function S(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,3,"div",[["class","gift-card col-md-6"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onItemSelected(n.context.$implicit.giftCode)&&e),e}),null,null)),(n()(),e.rb(1,0,null,null,1,"gift-card",[],null,null,null,p,h)),e.qb(2,114688,null,0,g,[],{image:[0,"image"],title:[1,"title"],partner:[2,"partner"],point:[3,"point"],isShowBtn:[4,"isShowBtn"]},null),(n()(),e.rb(3,0,null,null,0,"div",[["class","gift-card-border"]],null,null,null,null,null))],(function(n,t){n(t,2,0,t.context.$implicit.urlImage,t.context.$implicit.title,t.context.$implicit.partnerCode,t.context.$implicit.point,!0)}),null)}function I(n){return e.Nb(0,[e.Jb(671088640,1,{scrollContainer:0}),(n()(),e.rb(1,0,null,null,31,"div",[["class","list-gift-card"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,2,"div",[["class","category-section"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,w)),e.qb(4,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(5,0,null,null,23,"div",[["class","filter-section"]],null,null,null,null,null)),(n()(),e.rb(6,0,null,null,0,"div",[["class","total_item col-md-4"]],[[8,"innerHTML",1]],null,null,null,null)),(n()(),e.rb(7,0,null,null,21,"div",[["class","select-dropdown col-md-8"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(n,t,l){var i=!0;return"submit"===t&&(i=!1!==e.Db(n,8).onSubmit(l)&&i),"reset"===t&&(i=!1!==e.Db(n,8).onReset()&&i),i}),null,null)),e.qb(8,540672,null,0,b.i,[[8,null],[8,null]],{form:[0,"form"]},null),e.Ib(2048,null,b.c,null,[b.i]),e.qb(10,16384,null,0,b.q,[[4,b.c]],null,null),(n()(),e.rb(11,0,null,null,8,"div",[["class","filter-point"]],null,null,null,null,null)),(n()(),e.rb(12,0,null,null,7,"select-container",[["formControlName","filter"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[["document","click"]],(function(n,t,l){var i=!0;return"document:click"===t&&(i=!1!==e.Db(n,16).withoutClickComponent(l)&&i),i}),f.b,f.a)),e.qb(13,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[8,null],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(15,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(16,6012928,null,1,m.a,[[6,b.o],e.h,e.k],null,null),e.Jb(603979776,2,{items:1}),(n()(),e.gb(16777216,null,null,1,null,D)),e.qb(19,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(20,0,null,null,8,"div",[["class","sort-point"]],null,null,null,null,null)),(n()(),e.rb(21,0,null,null,7,"select-container",[["formControlName","sort"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[["document","click"]],(function(n,t,l){var i=!0;return"document:click"===t&&(i=!1!==e.Db(n,25).withoutClickComponent(l)&&i),i}),f.b,f.a)),e.qb(22,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[8,null],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(24,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(25,6012928,null,1,m.a,[[6,b.o],e.h,e.k],null,null),e.Jb(603979776,3,{items:1}),(n()(),e.gb(16777216,null,null,1,null,k)),e.qb(28,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(29,0,[[1,0],["scrollGift",1]],null,3,"div",[["class","list-gift-section row "],["infinite-scroll",""]],null,[[null,"scrolled"],[null,"scrolledUp"]],(function(n,t,l){var e=!0,i=n.component;return"scrolled"===t&&(e=!1!==i.onScrollDown(l)&&e),"scrolledUp"===t&&(e=!1!==i.onUp(l)&&e),e}),null,null)),e.qb(30,4866048,null,0,_.a,[e.k,e.x],{infiniteScrollDistance:[0,"infiniteScrollDistance"],infiniteScrollUpDistance:[1,"infiniteScrollUpDistance"],infiniteScrollThrottle:[2,"infiniteScrollThrottle"],scrollWindow:[3,"scrollWindow"]},{scrolled:"scrolled",scrolledUp:"scrolledUp"}),(n()(),e.gb(16777216,null,null,1,null,S)),e.qb(32,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null)],(function(n,t){var l=t.component;n(t,4,0,l.selectionOptions),n(t,8,0,l.selectDropdown),n(t,13,0,"filter"),n(t,16,0),n(t,19,0,l.filterOptions),n(t,22,0,"sort"),n(t,25,0),n(t,28,0,l.sortOptions),n(t,30,0,l.scrollDistance,l.scrollUpDistance,l.throttle,!1),n(t,32,0,l.filterResult)}),(function(n,t){n(t,6,0,t.component.totalRowDisplay),n(t,7,0,e.Db(t,10).ngClassUntouched,e.Db(t,10).ngClassTouched,e.Db(t,10).ngClassPristine,e.Db(t,10).ngClassDirty,e.Db(t,10).ngClassValid,e.Db(t,10).ngClassInvalid,e.Db(t,10).ngClassPending),n(t,12,0,e.Db(t,15).ngClassUntouched,e.Db(t,15).ngClassTouched,e.Db(t,15).ngClassPristine,e.Db(t,15).ngClassDirty,e.Db(t,15).ngClassValid,e.Db(t,15).ngClassInvalid,e.Db(t,15).ngClassPending),n(t,21,0,e.Db(t,24).ngClassUntouched,e.Db(t,24).ngClassTouched,e.Db(t,24).ngClassPristine,e.Db(t,24).ngClassDirty,e.Db(t,24).ngClassValid,e.Db(t,24).ngClassInvalid,e.Db(t,24).ngClassPending)}))}var q=l("aafk"),N=l("FFVN");class G{constructor(n){this.translateService=n}ngOnInit(){this.historyTime=Number(this.historyGift.registCreatetimeFM);let n=this.historyGift.registTotalpoint.replace(/\B(?=(\d{3})+(?!\d))/g,",");this.pointText=this.translateService.instant("loyalty.history_exchange_gift_point",{point:n}),this.quantityText=this.translateService.instant("loyalty.history_exchange_gift_quantity",{quantity:this.historyGift.detailRegistnumber})}}var T=e.pb({encapsulation:0,styles:[[".history-card[_ngcontent-%COMP%] .point-section[_ngcontent-%COMP%]{margin-top:20px}.history-card[_ngcontent-%COMP%] .point-section[_ngcontent-%COMP%] .total-point[_ngcontent-%COMP%]{font-size:16px;font-weight:500;line-height:normal;color:#ff3b30}.history-card[_ngcontent-%COMP%] .point-section[_ngcontent-%COMP%] .total-num[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:normal;letter-spacing:.24px;text-align:right;color:#42236a}.history-card[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%]{margin-top:5px}.history-card[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .gift-name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:normal;letter-spacing:.24px;color:#42236a}.history-card[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .partner-code[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:normal;letter-spacing:normal;color:#ad8ad8;text-transform:uppercase}.history-card[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-top:5px}@media only screen and (max-width:575px){.history-card[_ngcontent-%COMP%] .point-section[_ngcontent-%COMP%] .total-num[_ngcontent-%COMP%], .history-card[_ngcontent-%COMP%] .point-section[_ngcontent-%COMP%] .total-point[_ngcontent-%COMP%]{width:50%}}"]],data:{}});function F(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,13,"div",[["class","history-card"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,2,"div",[["class","date-card"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,1,"app-date",[],null,null,null,q.b,q.a)),e.qb(3,638976,null,0,N.a,[c.j],{dateInput:[0,"dateInput"]},null),(n()(),e.rb(4,0,null,null,4,"div",[["class","point-section row"]],null,null,null,null,null)),(n()(),e.rb(5,0,null,null,1,"span",[["class","total-point col-md-6"]],null,null,null,null,null)),(n()(),e.Lb(6,null,["-",""])),(n()(),e.rb(7,0,null,null,1,"span",[["class","total-num col-md-6"]],null,null,null,null,null)),(n()(),e.Lb(8,null,["",""])),(n()(),e.rb(9,0,null,null,4,"div",[["class","info-section row"]],null,null,null,null,null)),(n()(),e.rb(10,0,null,null,1,"span",[["class","gift-name col-md-12"]],null,null,null,null,null)),(n()(),e.Lb(11,null,["",""])),(n()(),e.rb(12,0,null,null,1,"span",[["class","partner-code col-md-12"]],null,null,null,null,null)),(n()(),e.Lb(13,null,["",""]))],(function(n,t){n(t,3,0,t.component.historyTime)}),(function(n,t){var l=t.component;n(t,6,0,l.pointText),n(t,8,0,l.quantityText),n(t,11,0,l.historyGift.giftName),n(t,13,0,l.historyGift.detailGiftcode)}))}var E=l("4Rf3"),L=l("Ou8G"),j=l("f8ks"),A=l("wd/R");class z{constructor(n,t){this.commonService=n,this.translateService=t}ngOnInit(){this.fetchHistoryListGift()}fetchHistoryListGift(){this.commonService.callApi({method:C.a.GET,url:P.a.GET_HISTORY_EXCHANGE_GIFT,success:n=>{this.historyListGift=n.historyGifts,this.sortHistoryGifts()}})}sortHistoryGifts(){this.historyListGift.sort((n,t)=>{const l=new Date(n.registCreatetimeFM/100).getTime(),e=new Date(t.registCreatetimeFM/100).getTime();return l===e?n.giftName.localeCompare(t.giftName):e-l})}onClickHistoryItem(n){if(this.isShowDetail=!0,this.historyDetail=this.historyListGift[n],this.historyDetail){this.fetchGiftDetail(this.historyDetail.detailGiftcode);const n=Object(s.e)(this.historyDetail.registTotalpoint.toString()),t=new Date(+this.historyDetail.registCreatetimeFM),l=A.unix(this.historyDetail.registCreatetimeFM/1e3).format("DD/MM/YYYY");this.historyDate=(t.getDay()+1===1?this.translateService.instant("txt_ft_sunday"):this.translateDays(t.getDay()+1))+", "+l,this.historyDetailPoint=this.translateService.instant("loyalty.history_exchange_gift_point",{point:n})}}translateDays(n){let t=null;switch(n){case 2:t=this.translateService.instant("txt_ft_monday");break;case 3:t=this.translateService.instant("txt_ft_tuesday");break;case 4:t=this.translateService.instant("txt_ft_wednesday");break;case 5:t=this.translateService.instant("txt_ft_thursday");break;case 6:t=this.translateService.instant("txt_ft_friday");break;case 7:t=this.translateService.instant("txt_ft_saturday")}return t}fetchGiftDetail(n){this.commonService.callApi({method:C.a.POST,url:P.a.GET_GIFT_DETAIL,data:{giftCode:n},success:n=>{this.historyProvider=n.giftDetail.partnerCode}})}}var R=e.pb({encapsulation:0,styles:[[".history-exchange-gift[_ngcontent-%COMP%]{margin-right:0;margin-left:0;margin-top:20px;max-height:463px;overflow-y:auto}.history-exchange-gift[_ngcontent-%COMP%] .history-card[_ngcontent-%COMP%]{border-right:1px solid rgba(105,105,105,.14);padding:0 15px}.history-exchange-gift[_ngcontent-%COMP%] .history-card[_ngcontent-%COMP%] .history-card-border[_ngcontent-%COMP%]{height:1px;background-color:#e1e3e8;margin-top:15px;margin-bottom:20px;opacity:.55}.history-exchange-gift[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(even){border-right:none}.history-exchange-gift[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.history-exchange-gift[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:3px;background:#e2d8ee}.history-exchange-gift[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#7b35bb}.history-detail[_ngcontent-%COMP%]{color:#42236a;word-break:break-word}.history-detail[_ngcontent-%COMP%] .modal>.modal-content-wrapper .modal-body{padding:0!important}.history-detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%]{padding:25px 30px;font-size:20px;font-weight:500;text-align:center;position:relative;text-transform:capitalize;border-bottom:1px solid #e6e9ee}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute;right:30px;cursor:pointer}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .account-balance[_ngcontent-%COMP%]{padding:25px 30px;border-bottom:1px solid #e6e9ee}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .account-balance[_ngcontent-%COMP%] .balance-title[_ngcontent-%COMP%]{font-size:14px;color:#ad8ad8;text-align:center;text-transform:uppercase}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .account-balance[_ngcontent-%COMP%] .balance-value[_ngcontent-%COMP%]{font-size:45px;text-align:center;font-weight:300;color:#42236a}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .account-balance[_ngcontent-%COMP%] .balance-value.plus[_ngcontent-%COMP%]{color:#27ae60}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-contact[_ngcontent-%COMP%]{padding:20px 30px;border-top:1px solid #e6e9ee}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-contact[_ngcontent-%COMP%] .contact-title[_ngcontent-%COMP%]{color:#ad8ad8}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-contact[_ngcontent-%COMP%] .contact-phone[_ngcontent-%COMP%]{font-size:14px;font-weight:500;margin:.5em 0}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-contact[_ngcontent-%COMP%] .contact-address[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-info[_ngcontent-%COMP%]{margin:0 30px;padding:15px 0}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-info[_ngcontent-%COMP%] .info-line[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1em}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-info[_ngcontent-%COMP%] .info-line[_ngcontent-%COMP%] .line-left[_ngcontent-%COMP%]{width:30%;font-size:14px}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-info[_ngcontent-%COMP%] .info-line[_ngcontent-%COMP%] .line-right[_ngcontent-%COMP%]{font-size:16px;font-weight:500;text-align:right}.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exchange-info[_ngcontent-%COMP%] .info-line[_ngcontent-%COMP%] .line-right.description[_ngcontent-%COMP%]{text-transform:uppercase}@media (max-width:767px) and (min-width:576px){.history-exchange-gift[_ngcontent-%COMP%] .history-card[_ngcontent-%COMP%]{border-right:none}}@media only screen and (max-width:575px){.history-detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%}.history-exchange-gift[_ngcontent-%COMP%] .history-card[_ngcontent-%COMP%]{border-right:none}}"]],data:{}});function B(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,3,"div",[["class","history-card col-md-6"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onClickHistoryItem(n.context.index)&&e),e}),null,null)),(n()(),e.rb(1,0,null,null,1,"history-card",[],null,null,null,F,T)),e.qb(2,114688,null,0,G,[c.j],{historyGift:[0,"historyGift"]},null),(n()(),e.rb(3,0,null,null,0,"div",[["class","history-card-border"]],null,null,null,null,null))],(function(n,t){n(t,2,0,t.context.$implicit)}),null)}function U(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(2,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(4,0,null,null,1,"span",[["class","line-right text-uppercase"]],null,null,null,null,null)),(n()(),e.Lb(5,null,["",""]))],null,(function(n,t){var l=t.component;n(t,2,0,e.Mb(t,2,0,e.Db(t,3).transform("loyalty.exchange.gift_partner_code"))),n(t,5,0,l.historyDetail.partnerCode)}))}function H(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,54,"app-modal",[["class","history-detail"]],null,[[null,"showChange"]],(function(n,t,l){var e=!0;return"showChange"===t&&(e=!1!==(n.component.isShowDetail=l)&&e),e}),E.b,E.a)),e.qb(1,638976,null,0,L.a,[],{show:[0,"show"]},{showChange:"showChange"}),(n()(),e.rb(2,0,null,0,52,"div",[["class","content"]],null,null,null,null,null)),(n()(),e.rb(3,0,null,null,3,"div",[["class","content-title"]],null,null,null,null,null)),(n()(),e.Lb(4,null,[" "," "])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(6,0,null,null,0,"img",[["src","assets/icons/Icons_Close_Line.svg"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=0!=(n.component.isShowDetail=!1)&&e),e}),null,null)),(n()(),e.rb(7,0,null,null,5,"div",[["class","account-balance"]],null,null,null,null,null)),(n()(),e.rb(8,0,null,null,2,"p",[["class","balance-title"]],null,null,null,null,null)),(n()(),e.Lb(9,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(11,0,null,null,1,"p",[["class","balance-value minus"]],null,null,null,null,null)),(n()(),e.Lb(12,null,[" -"," "])),(n()(),e.rb(13,0,null,null,32,"div",[["class","exchange-info"]],null,null,null,null,null)),(n()(),e.rb(14,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(15,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(16,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(18,0,null,null,1,"span",[["class","line-right"]],null,null,null,null,null)),(n()(),e.Lb(19,null,["",""])),(n()(),e.gb(16777216,null,null,1,null,U)),e.qb(21,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(22,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(23,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(24,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(26,0,null,null,1,"span",[["class","line-right"]],null,null,null,null,null)),(n()(),e.Lb(27,null,["",""])),(n()(),e.rb(28,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(29,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(30,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(32,0,null,null,1,"span",[["class","line-right description"]],null,null,null,null,null)),(n()(),e.Lb(33,null,["",""])),(n()(),e.rb(34,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(35,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(36,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(38,0,null,null,1,"span",[["class","line-right"]],null,null,null,null,null)),(n()(),e.Lb(39,null,["",""])),(n()(),e.rb(40,0,null,null,5,"div",[["class","info-line"]],null,null,null,null,null)),(n()(),e.rb(41,0,null,null,2,"span",[["class","line-left"]],null,null,null,null,null)),(n()(),e.Lb(42,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(44,0,null,null,1,"span",[["class","line-right"]],null,null,null,null,null)),(n()(),e.Lb(45,null,["",""])),(n()(),e.rb(46,0,null,null,8,"div",[["class","exchange-contact"]],null,null,null,null,null)),(n()(),e.rb(47,0,null,null,2,"p",[["class","contact-title"]],null,null,null,null,null)),(n()(),e.Lb(48,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(50,0,null,null,2,"p",[["class","contact-phone"]],null,null,null,null,null)),(n()(),e.Lb(51,null,["",""])),e.Hb(52,1),(n()(),e.rb(53,0,null,null,1,"p",[["class","contact-address"]],null,null,null,null,null)),(n()(),e.Lb(54,null,["",""]))],(function(n,t){var l=t.component;n(t,1,0,l.isShowDetail),n(t,21,0,l.historyDetail.partnerCode)}),(function(n,t){var l=t.component;n(t,4,0,e.Mb(t,4,0,e.Db(t,5).transform("loyalty.history.exchange.gift_detail"))),n(t,9,0,e.Mb(t,9,0,e.Db(t,10).transform("loyalty.history.exchange_exchange_point"))),n(t,12,0,l.historyDetailPoint),n(t,16,0,e.Mb(t,16,0,e.Db(t,17).transform("loyalty.exchange.gift_name"))),n(t,19,0,l.historyDetail.giftName),n(t,24,0,e.Mb(t,24,0,e.Db(t,25).transform("loyalty.history.exchange_provider"))),n(t,27,0,l.historyProvider),n(t,30,0,e.Mb(t,30,0,e.Db(t,31).transform("loyalty.history.exchange_gift_code"))),n(t,33,0,l.historyDetail.detailGiftcode),n(t,36,0,e.Mb(t,36,0,e.Db(t,37).transform("loyalty.exchange_gift_quantity"))),n(t,39,0,l.historyDetail.detailRegistnumber),n(t,42,0,e.Mb(t,42,0,e.Db(t,43).transform("loyalty.history.exchange_exchange_date"))),n(t,45,0,l.historyDate),n(t,48,0,e.Mb(t,48,0,e.Db(t,49).transform("loyalty.exchange.gift_contact")));var i=e.Mb(t,51,0,n(t,52,0,e.Db(t.parent,0),l.historyDetail.registMobileContact));n(t,51,0,i),n(t,54,0,l.historyDetail.registReceiveaddress)}))}function V(n){return e.Nb(0,[e.Fb(0,j.a,[]),(n()(),e.rb(1,0,null,null,2,"div",[["class","history-exchange-gift row"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,B)),e.qb(3,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.gb(16777216,null,null,1,null,H)),e.qb(5,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null)],(function(n,t){var l=t.component;n(t,3,0,l.historyListGift),n(t,5,0,l.historyDetail)}),null)}var $=l("DqX5"),K=l("nGrN"),Y=l("4lR6"),X=l("i2XX");class J{constructor(n,t,l,e){this.translateService=n,this.commonService=t,this.authService=l,this.loyaltyService=e}ngOnInit(){this.fetchCustomerRank(),this.cusName=this.authService.getUserInfo().fullName}fetchCustomerRank(){this.commonService.callApi({method:C.a.GET,url:P.a.GET_CUSTOMER_RANK,success:n=>{if(n.customerRank){this.customerRank=n.customerRank,this.loyaltyService.setCustomerRank(n.customerRank);const t=Object(s.e)(this.customerRank.expirePoint.toString()),l=Object(s.e)(this.customerRank.totalPoint.toString());this.cusRank=this.customerRank.rank,this.availablePoint=this.translateService.instant("loyalty.history_exchange_gift_point",{point:l});let e=A.unix(this.customerRank.expireDate/1e3).format("DD/MM/YYYY");this.expiredPoint=this.translateService.instant("loyalty.home.point_expired",{point:t,date:e})}else{this.cusRank="CLASSIC",this.availablePoint=this.translateService.instant("loyalty.history_exchange_gift_point",{point:0});const n="31/12/"+(new Date).getFullYear();this.expiredPoint=this.translateService.instant("loyalty.home.point_expired",{point:0,date:n})}}})}}var W=l("7dP1");let Q=(()=>{class n{setCustomerRank(n){this.customerRank=n}getCustomerRank(){return this.customerRank}}return n.ngInjectableDef=e.Rb({factory:function(){return new n},token:n,providedIn:"root"}),n})();var Z=e.pb({encapsulation:0,styles:[[".point-card[_ngcontent-%COMP%]{width:100%;border-radius:5px;background-color:#fff;display:flex;position:relative;margin:auto}.point-card[_ngcontent-%COMP%] .point-detail[_ngcontent-%COMP%]{width:80%;padding:24px 25px;text-align:left}.point-card[_ngcontent-%COMP%] .point-detail[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:1.71;color:#42236a}.point-card[_ngcontent-%COMP%] .point-detail[_ngcontent-%COMP%] .point[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:1.4;margin-top:5px;color:#42236a}.point-card[_ngcontent-%COMP%] .point-detail[_ngcontent-%COMP%] .expired_point[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:1.71;margin-top:5px;color:#ad8ad8}.point-card[_ngcontent-%COMP%] .point-image[_ngcontent-%COMP%]{width:25%;height:100%;display:block;text-align:center;margin:auto}.point-card[_ngcontent-%COMP%] .point-image[_ngcontent-%COMP%] .rank[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.5;margin-top:15px;color:#ff9800}.point-card[_ngcontent-%COMP%] .point-image[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{display:inline-block}"]],data:{}});function nn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,15,"div",[["class","point-card"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,8,"div",[["class","point-detail"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,2,"div",[["class","title"]],null,null,null,null,null)),(n()(),e.Lb(3,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(5,0,null,null,1,"div",[["class","point"]],null,null,null,null,null)),(n()(),e.Lb(6,null,["",""])),(n()(),e.rb(7,0,null,null,1,"div",[["class","expired_point"]],null,null,null,null,null)),(n()(),e.Lb(8,null,["",""])),e.Cb(null,0),(n()(),e.rb(10,0,null,null,5,"div",[["class","point-image"]],null,null,null,null,null)),(n()(),e.rb(11,0,null,null,2,"div",[["class","avatar"]],null,null,null,null,null)),(n()(),e.rb(12,0,null,null,1,"app-avatar",[],null,null,null,Y.b,Y.a)),e.qb(13,114688,null,0,X.a,[],{size:[0,"size"],name:[1,"name"]},null),(n()(),e.rb(14,0,null,null,1,"div",[["class","rank"]],null,null,null,null,null)),(n()(),e.Lb(15,null,["",""]))],(function(n,t){n(t,13,0,45,t.component.cusName)}),(function(n,t){var l=t.component;n(t,3,0,e.Mb(t,3,0,e.Db(t,4).transform("loyalty.home.point_available"))),n(t,6,0,l.availablePoint),n(t,8,0,l.expiredPoint),n(t,15,0,l.cusRank)}))}var tn=l("lI48"),ln=l("7XOY"),en=l("sDGj");class on{constructor(n,t){this.elRef=n,this.control=t}onInputChanged(n){let t=n.target.value.replace(en.m,"");const l=this.appInputCustomer?Number(this.appInputCustomer):25;t=Object(s.p)(t),t=t.replace(/[ ]/g,""),t=t.length>l?t.substring(0,l):t,this.elRef.nativeElement.value=t,this.control.control.setValue(t)}}class an{constructor(){this.value=0,this.change=new e.m,this.sizeInput="30px"}ngOnInit(){}decreaseValue(){this.value>0&&(this.value--,this.change.emit(this.value)),this.isDecreasePressed=0===this.value,this.handleSizeInput()}increaseValue(){this.value++,this.change.emit(this.value),this.isDecreasePressed=0===this.value,this.handleSizeInput()}handleSizeInput(){this.sizeInput=this.value&&this.value.toString().length>3?10*(this.value.toString().length-3)+30+"px":"30px"}}var cn=e.pb({encapsulation:0,styles:[[".quantity-form[_ngcontent-%COMP%]{display:flex;align-items:center}.quantity-form[_ngcontent-%COMP%] .value-button[_ngcontent-%COMP%]{display:inline-block;border:1px solid #ddd;margin:0;width:20px;height:20px;text-align:center;vertical-align:middle;padding:5px;background:#eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.quantity-form[_ngcontent-%COMP%] .value-button[_ngcontent-%COMP%]:hover{cursor:pointer}.quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:3px;border:1px solid #afb5bf;background-color:#fff;display:inline-flex;align-items:center;justify-content:center;outline:0}.quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%] .minu[_ngcontent-%COMP%]{font-size:33px;font-weight:400;font-style:normal;color:#42236a;line-height:normal;margin-top:-40px;height:0}.quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%] [disabled][_ngcontent-%COMP%], .quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%]:disabled{border:none;background-color:#e2d8ee}.quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%] [disabled][_ngcontent-%COMP%] .minu[_ngcontent-%COMP%], .quantity-form[_ngcontent-%COMP%] .btn-decrease[_ngcontent-%COMP%]:disabled .minu[_ngcontent-%COMP%]{background-color:#e2d8ee}.quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:3px;border:1px solid #afb5bf;background-color:#fff;display:inline-flex;align-items:center;justify-content:center;outline:0}.quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%] .plus[_ngcontent-%COMP%]{font-size:22px;font-weight:400;font-style:normal;color:#42236a;line-height:normal}.quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%] [disabled][_ngcontent-%COMP%], .quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%]:disabled{border:none;background-color:#e2d8ee}.quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%] [disabled][_ngcontent-%COMP%] .plus[_ngcontent-%COMP%], .quantity-form[_ngcontent-%COMP%] .btn-increase[_ngcontent-%COMP%]:disabled .plus[_ngcontent-%COMP%]{color:#fff}form[_ngcontent-%COMP%] #input-wrap[_ngcontent-%COMP%]{margin:0;padding:0}input#number[_ngcontent-%COMP%]{text-align:center;border:none;margin:0 18.8px;outline:0;height:24px;vertical-align:middle;font-size:16px;font-weight:500;font-style:normal;font-stretch:normal;line-height:1.5;letter-spacing:normal;background-color:#fff;color:#42236a!important;-webkit-text-fill-color:#42236a;opacity:1;-webkit-appearance:none;box-sizing:content-box}input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}"]],data:{}});function un(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,17,"form",[["class","quantity-form"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(n,t,l){var i=!0;return"submit"===t&&(i=!1!==e.Db(n,2).onSubmit(l)&&i),"reset"===t&&(i=!1!==e.Db(n,2).onReset()&&i),i}),null,null)),e.qb(1,16384,null,0,b.A,[],null,null),e.qb(2,4210688,null,0,b.r,[[8,null],[8,null]],null,null),e.Ib(2048,null,b.c,null,[b.r]),e.qb(4,16384,null,0,b.q,[[4,b.c]],null,null),(n()(),e.rb(5,0,null,null,2,"button",[["class","btn-decrease"]],[[8,"disabled",0]],[[null,"keydown.space"],[null,"click"]],(function(n,t,l){var e=!0,i=n.component;return"keydown.space"===t&&(e=!1!==l.preventDefault()&&e),"click"===t&&(e=!1!==i.decreaseValue()&&e),e}),null,null)),(n()(),e.rb(6,0,null,null,1,"span",[["class","minu"]],null,null,null,null,null)),(n()(),e.Lb(-1,null,["-"])),(n()(),e.rb(8,0,null,null,6,"input",[["disabled",""],["id","number"],["name","quant"],["style","color: #42236a !important;"],["type","number"]],[[4,"width",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],(function(n,t,l){var i=!0,o=n.component;return"input"===t&&(i=!1!==e.Db(n,9)._handleInput(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,9).onTouched()&&i),"compositionstart"===t&&(i=!1!==e.Db(n,9)._compositionStart()&&i),"compositionend"===t&&(i=!1!==e.Db(n,9)._compositionEnd(l.target.value)&&i),"change"===t&&(i=!1!==e.Db(n,10).onChange(l.target.value)&&i),"input"===t&&(i=!1!==e.Db(n,10).onChange(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,10).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(o.value=l)&&i),i}),null,null)),e.qb(9,16384,null,0,b.d,[e.C,e.k,[2,b.a]],null,null),e.qb(10,16384,null,0,b.t,[e.C,e.k],null,null),e.Ib(1024,null,b.n,(function(n,t){return[n,t]}),[b.d,b.t]),e.qb(12,671744,null,0,b.s,[[2,b.c],[8,null],[8,null],[6,b.n]],{name:[0,"name"],isDisabled:[1,"isDisabled"],model:[2,"model"]},{update:"ngModelChange"}),e.Ib(2048,null,b.o,null,[b.s]),e.qb(14,16384,null,0,b.p,[[4,b.o]],null,null),(n()(),e.rb(15,0,null,null,2,"button",[["class","btn-increase"]],[[8,"disabled",0]],[[null,"keydown.space"],[null,"click"]],(function(n,t,l){var e=!0,i=n.component;return"keydown.space"===t&&(e=!1!==l.preventDefault()&&e),"click"===t&&(e=!1!==i.increaseValue()&&e),e}),null,null)),(n()(),e.rb(16,0,null,null,1,"i",[["class","plus"]],null,null,null,null,null)),(n()(),e.Lb(-1,null,["+"]))],(function(n,t){n(t,12,0,"quant","",t.component.value)}),(function(n,t){var l=t.component;n(t,0,0,e.Db(t,4).ngClassUntouched,e.Db(t,4).ngClassTouched,e.Db(t,4).ngClassPristine,e.Db(t,4).ngClassDirty,e.Db(t,4).ngClassValid,e.Db(t,4).ngClassInvalid,e.Db(t,4).ngClassPending),n(t,5,0,l.isDecreasePressed),n(t,8,0,l.sizeInput,e.Db(t,14).ngClassUntouched,e.Db(t,14).ngClassTouched,e.Db(t,14).ngClassPristine,e.Db(t,14).ngClassDirty,e.Db(t,14).ngClassValid,e.Db(t,14).ngClassInvalid,e.Db(t,14).ngClassPending),n(t,15,0,l.isIncreasePressed)}))}class rn{constructor(n,t,l,i){this.commonService=n,this.translateService=t,this.formBuilder=l,this.loyaltyService=i,this.clickChangeContact=new e.m,this.resultVerifyGift=new e.m,this.cancelExchangeInput=new e.m,this.availablePoint=0,this.redeemPoint=0,this.isEnoughPoint=!0,this.isEnoughGift=!0,this.pattern=/^[a-zA-Z0-9]*$/}ngOnInit(){this.formCustomer=this.formBuilder.group({customer:["",b.w.required]}),this.isShowCustomerCode="Y"===this.currentGift.giftHaspartnercode,this.remainGiftError=this.translateService.instant("loyalty.exchange.gift_error_not_enough_gift",{remain:this.currentGift.giftRemaining}),this.quantity=this.requestData.giftNumber,this.customerRank=this.loyaltyService.getCustomerRank(),this.customerRank?(this.availablePoint=this.customerRank.totalPoint,this.availablePointDisplay=Object(s.e)(this.customerRank.totalPoint.toString())):(this.availablePoint=0,this.availablePointDisplay="0"),this.redeemPoint=this.currentGift.point*this.quantity,this.redeemPointDisplay=Object(s.e)(this.redeemPoint.toString()),this.isEnoughPoint=!(this.redeemPoint>this.availablePoint),this.isEnoughGift=!(this.quantity===this.currentGift.giftRemaining)}changeQuantity(n){this.quantity=n,this.redeemPoint=n*this.currentGift.point,this.redeemPointDisplay=Object(s.e)(this.redeemPoint.toString()),this.isEnoughPoint=!(this.redeemPoint>this.availablePoint),this.isEnoughGift=!(this.quantity===this.currentGift.giftRemaining)}keyPress(n){const t=String.fromCharCode(n.charCode);8===n.keyCode||this.pattern.test(t)||n.preventDefault()}onChangeContact(){this.clickChangeContact.emit(this.quantity)}onCancelClicked(){this.cancelExchangeInput.emit("")}sendRequestVerify(){const n={address:this.requestData.address,mobileNo:this.requestData.mobileNo.replace(en.i,""),giftCode:this.currentGift.giftCode,giftNumber:this.quantity,partnerCode:this.formCustomer.controls.customer.value};this.commonService.callApi({method:C.a.POST,url:P.a.VERIFY_EXCHANGE_GIFT,data:n,success:n=>{this.requestData.giftNumber=this.quantity,this.requestData.refNo=n.refNo,this.requestData.exchangePoint=this.redeemPoint,this.requestData.partnerCode=this.formCustomer.controls.customer.value,this.requestData.remainPoint=this.availablePoint-this.redeemPoint,this.resultVerifyGift.emit(this.requestData)}})}onContinueClicked(){this.requestData.address?this.sendRequestVerify():this.commonService.showGlobalError({title:"",description:"txt_loyalty_address_required"})}}var sn=e.pb({encapsulation:0,styles:[['.title-common[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#ad8ad8}.contact-common[_ngcontent-%COMP%]{font-size:16px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#42236a}.input-style[_ngcontent-%COMP%]{height:45px;border-radius:5px;border:1px solid #e2d8ee;background-color:#fcfcfc;font-weight:500}.input-style[_ngcontent-%COMP%]::-webkit-input-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::-moz-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::-ms-input-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::placeholder{font-weight:400}.text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.exchange-gift-input[_ngcontent-%COMP%]{width:100%;justify-content:center;display:grid}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%]{width:496px;background-color:#fff;border-radius:5px}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .gift-card[_ngcontent-%COMP%]{width:100%;padding:25px 25px 24px;border-bottom:1px solid rgba(225,227,232,.6)}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%]{width:100%;padding:20px 25px;margin-right:15px;margin-left:15px;word-break:break-word}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .exchange-info-content[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:1.71;letter-spacing:normal;color:#42236a}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%]{margin-bottom:5px}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:normal;letter-spacing:normal;color:#ad8ad8;text-align:left;padding-left:0}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .change-link[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:normal;letter-spacing:normal;color:#ff9800;text-align:right;padding-right:0;cursor:pointer}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%]{width:496px;border-radius:5px;background-color:#fff;margin-top:24px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .content-section[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%]{padding:21px 25px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .error-responsive[_ngcontent-%COMP%]{margin-left:25px;margin-top:8px;margin-bottom:8px;display:none}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .error-responsive[_ngcontent-%COMP%] .app-error{width:100%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%]{width:100%;margin:21px 15px 26px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .title-common[_ngcontent-%COMP%]{width:30%;margin-left:15px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%]{width:calc(70% - 30px);display:flex;justify-content:flex-end;margin-right:15px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:130px;display:block}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%] .point-available[_ngcontent-%COMP%]{font-size:16px;font-weight:500;line-height:normal;letter-spacing:normal;text-align:right;color:#42236a;margin-left:37px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%] .point-available[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%] .app-error{width:100%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%]{width:100%;margin-right:15px;margin-left:15px;margin-bottom:24px;align-items:center}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%] .title-common[_ngcontent-%COMP%]{width:45%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%] .point-redeem[_ngcontent-%COMP%]{width:55%;font-size:20px;font-weight:500;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;text-align:right;color:#42236a}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%] .point-redeem[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:block}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%] .point-redeem[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:16px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%]{width:100%;margin-right:30px;margin-left:30px;margin-bottom:20px;align-items:center}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .title-common[_ngcontent-%COMP%]{width:30%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .amount-validate[_ngcontent-%COMP%]{width:70%;display:flex;justify-content:flex-end;align-items:center}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .amount-validate[_ngcontent-%COMP%] .app-error{width:100%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .amount-validate[_ngcontent-%COMP%] .quantity[_ngcontent-%COMP%]{margin-left:15px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .text-align-right[_ngcontent-%COMP%]{text-align:right}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%]{width:496px}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:45px;border-radius:5px;border:1px solid #e2d8ee;background-color:#fcfcfc;width:100%;padding:15px 9px 15px 15px;margin-top:24px}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:auto;border-radius:5px;width:90%;border:none;background:0 0;font-weight:500;color:#42236a}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:0}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .customer-code[_ngcontent-%COMP%]{width:90%;font-size:14px;font-weight:500;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#42236a}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .icon-question[_ngcontent-%COMP%]{width:16px;height:16px;margin-right:5px;cursor:pointer}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%]{cursor:pointer;position:relative}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%] .tooltip-text[_ngcontent-%COMP%]{visibility:hidden;width:345px;opacity:.9;box-shadow:0 0 40px 0 rgba(0,0,0,.1);background-color:#42236a;color:#fcfcfc;border-radius:6px;padding:15px 20px 10px;position:absolute;z-index:1;bottom:130%;right:-40%}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%] .tooltip-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:14px;font-weight:400;margin-bottom:10px}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%] .tooltip-text[_ngcontent-%COMP%]::after{content:" ";position:absolute;top:100%;border-width:6px;border-style:solid;right:3.5%;border-color:#42236a transparent transparent}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%]:hover .tooltip-text[_ngcontent-%COMP%]{visibility:visible}.exchange-gift-input[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;margin-top:24px}.exchange-gift-input[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:12px;margin-right:12px}@media only screen and (max-width:575px){.exchange-gift-input[_ngcontent-%COMP%]{display:block}.exchange-gift-input[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%]{width:100%;margin-left:0;margin-right:0}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .text-align-right[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input2[_ngcontent-%COMP%] .text-align-right[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .text-align-right[_ngcontent-%COMP%]{width:50%}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .error-responsive[_ngcontent-%COMP%]{display:block;margin-top:-16px;margin-bottom:16px}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%]{display:flex}.exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input1[_ngcontent-%COMP%] .point-validate[_ngcontent-%COMP%] .error[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .input3[_ngcontent-%COMP%] .amount-validate[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:none}.exchange-gift-input[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .change-link[_ngcontent-%COMP%], .exchange-gift-input[_ngcontent-%COMP%] .receive-info[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{width:50%}.exchange-gift-input[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{flex-direction:column-reverse}.exchange-gift-input[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:20px}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%]{width:100%;margin-right:0;margin-left:0}.exchange-gift-input[_ngcontent-%COMP%] .input-partner-code[_ngcontent-%COMP%] .input-code[_ngcontent-%COMP%] .content-tooltip[_ngcontent-%COMP%] .tooltip-text[_ngcontent-%COMP%]{width:340px}}']],data:{}});function gn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,3,"app-error",[],null,null,null,tn.b,tn.a)),e.qb(1,114688,null,0,ln.a,[],null,null),(n()(),e.Lb(2,0,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,1,0)}),(function(n,t){n(t,2,0,e.Mb(t,2,0,e.Db(t,3).transform("loyalty.exchange.gift_error_not_enough_point")))}))}function hn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,3,"app-error",[],null,null,null,tn.b,tn.a)),e.qb(1,114688,null,0,ln.a,[],null,null),(n()(),e.Lb(2,0,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,1,0)}),(function(n,t){n(t,2,0,e.Mb(t,2,0,e.Db(t,3).transform("loyalty.exchange.gift_error_not_enough_point")))}))}function dn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"app-error",[],null,null,null,tn.b,tn.a)),e.qb(1,114688,null,0,ln.a,[],null,null),(n()(),e.Lb(2,0,["",""]))],(function(n,t){n(t,1,0)}),(function(n,t){n(t,2,0,t.component.remainGiftError)}))}function pn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"app-error",[],null,null,null,tn.b,tn.a)),e.qb(1,114688,null,0,ln.a,[],null,null),(n()(),e.Lb(2,0,["",""]))],(function(n,t){n(t,1,0)}),(function(n,t){n(t,2,0,t.component.remainGiftError)}))}function bn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,21,"div",[["class","input-partner-code row"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,20,"div",[["class","input-code"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,7,"input",[["appInputCustomer",""],["formControlName","customer"],["type","text"]],[[8,"placeholder",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"keydown.space"],[null,"keypress"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(n,t,l){var i=!0,o=n.component;return"input"===t&&(i=!1!==e.Db(n,3)._handleInput(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,3).onTouched()&&i),"compositionstart"===t&&(i=!1!==e.Db(n,3)._compositionStart()&&i),"compositionend"===t&&(i=!1!==e.Db(n,3)._compositionEnd(l.target.value)&&i),"input"===t&&(i=!1!==e.Db(n,8).onInputChanged(l)&&i),"keydown.space"===t&&(i=!1!==l.preventDefault()&&i),"keypress"===t&&(i=!1!==o.keyPress(l)&&i),i}),null,null)),e.qb(3,16384,null,0,b.d,[e.C,e.k,[2,b.a]],null,null),e.Ib(1024,null,b.n,(function(n){return[n]}),[b.d]),e.qb(5,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[6,b.n],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(7,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(8,16384,null,0,on,[e.k,b.o],{appInputCustomer:[0,"appInputCustomer"]},null),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(10,0,null,null,11,"div",[["class","content-tooltip"]],null,null,null,null,null)),(n()(),e.rb(11,0,null,null,0,"img",[["alt",""],["class","icon-question"],["src","assets/icons/icons-question-fill.svg"]],null,null,null,null,null)),(n()(),e.rb(12,0,null,null,9,"div",[["class","tooltip-text"]],null,null,null,null,null)),(n()(),e.rb(13,0,null,null,2,"h4",[],null,null,null,null,null)),(n()(),e.Lb(14,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(16,0,null,null,2,"h4",[],null,null,null,null,null)),(n()(),e.Lb(17,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(19,0,null,null,2,"h4",[],null,null,null,null,null)),(n()(),e.Lb(20,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,5,0,"customer"),n(t,8,0,"")}),(function(n,t){n(t,2,0,e.vb(1,"",e.Mb(t,2,0,e.Db(t,9).transform("loyalty.exchange.gift_partner_code")),""),e.Db(t,7).ngClassUntouched,e.Db(t,7).ngClassTouched,e.Db(t,7).ngClassPristine,e.Db(t,7).ngClassDirty,e.Db(t,7).ngClassValid,e.Db(t,7).ngClassInvalid,e.Db(t,7).ngClassPending),n(t,14,0,e.Mb(t,14,0,e.Db(t,15).transform("loyalty.exchange.gift_partner_code_desc1"))),n(t,17,0,e.Mb(t,17,0,e.Db(t,18).transform("loyalty.exchange.gift_partner_code_desc2"))),n(t,20,0,e.Mb(t,20,0,e.Db(t,21).transform("loyalty.exchange.gift_partner_code_desc3")))}))}function fn(n){return e.Nb(0,[e.Fb(0,j.a,[]),(n()(),e.rb(1,0,null,null,68,"div",[["class","exchange-gift-input"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(n,t,l){var i=!0;return"submit"===t&&(i=!1!==e.Db(n,2).onSubmit(l)&&i),"reset"===t&&(i=!1!==e.Db(n,2).onReset()&&i),i}),null,null)),e.qb(2,540672,null,0,b.i,[[8,null],[8,null]],{form:[0,"form"]},null),e.Ib(2048,null,b.c,null,[b.i]),e.qb(4,16384,null,0,b.q,[[4,b.c]],null,null),(n()(),e.rb(5,0,null,null,16,"div",[["class","info-section row"]],null,null,null,null,null)),(n()(),e.rb(6,0,null,null,2,"div",[["class","gift-card"]],null,null,null,null,null)),(n()(),e.rb(7,0,null,null,1,"gift-card",[],null,null,null,p,h)),e.qb(8,114688,null,0,g,[],{image:[0,"image"],title:[1,"title"],partner:[2,"partner"],point:[3,"point"]},null),(n()(),e.rb(9,0,null,null,12,"div",[["class","receive-info"]],null,null,null,null,null)),(n()(),e.rb(10,0,null,null,6,"div",[["class","title-section row"]],null,null,null,null,null)),(n()(),e.rb(11,0,null,null,2,"span",[["class","title title-common col-md-6"]],null,null,null,null,null)),(n()(),e.Lb(12,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(14,0,null,null,2,"span",[["class","change-link col-md-6"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onChangeContact()&&e),e}),null,null)),(n()(),e.Lb(15,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(17,0,null,null,2,"span",[["class","exchange-info-content row"]],null,null,null,null,null)),(n()(),e.Lb(18,null,["",""])),e.Hb(19,1),(n()(),e.rb(20,0,null,null,1,"span",[["class","exchange-info-content row"]],null,null,null,null,null)),(n()(),e.Lb(21,null,["",""])),(n()(),e.rb(22,0,null,null,38,"div",[["class","input-section row"]],null,null,null,null,null)),(n()(),e.rb(23,0,null,null,12,"div",[["class","input1 row"]],null,null,null,null,null)),(n()(),e.rb(24,0,null,null,2,"span",[["class","title-common"]],null,null,null,null,null)),(n()(),e.Lb(25,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(27,0,null,null,8,"div",[["class","point-validate"]],null,null,null,null,null)),(n()(),e.rb(28,0,null,null,2,"div",[["class","error"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,gn)),e.qb(30,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(31,0,null,null,4,"span",[["class","point-available"]],null,null,null,null,null)),(n()(),e.Lb(32,null,[""," "])),(n()(),e.rb(33,0,null,null,2,"a",[],null,null,null,null,null)),(n()(),e.Lb(34,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(36,0,null,null,2,"div",[["class","error-responsive"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,hn)),e.qb(38,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(39,0,null,null,8,"div",[["class","input2 row"]],null,null,null,null,null)),(n()(),e.rb(40,0,null,null,2,"span",[["class","title-common col-md-6"]],null,null,null,null,null)),(n()(),e.Lb(41,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(43,0,null,null,4,"span",[["class","col-md-6 point-redeem"]],null,null,null,null,null)),(n()(),e.Lb(44,null,[""," "])),(n()(),e.rb(45,0,null,null,2,"a",[],null,null,null,null,null)),(n()(),e.Lb(46,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(48,0,null,null,9,"div",[["class","input3 row"]],null,null,null,null,null)),(n()(),e.rb(49,0,null,null,2,"span",[["class","title-common"]],null,null,null,null,null)),(n()(),e.Lb(50,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(52,0,null,null,5,"div",[["class","amount-validate"]],null,null,null,null,null)),(n()(),e.rb(53,0,null,null,2,"div",[["class","error"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,dn)),e.qb(55,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(56,0,null,null,1,"app-quantity",[["class","quantity"]],null,[[null,"change"]],(function(n,t,l){var e=!0;return"change"===t&&(e=!1!==n.component.changeQuantity(l)&&e),e}),un,cn)),e.qb(57,114688,null,0,an,[],{value:[0,"value"],isIncreasePressed:[1,"isIncreasePressed"]},{change:"change"}),(n()(),e.rb(58,0,null,null,2,"div",[["class","error-responsive"]],null,null,null,null,null)),(n()(),e.gb(16777216,null,null,1,null,pn)),e.qb(60,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.gb(16777216,null,null,1,null,bn)),e.qb(62,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(63,0,null,null,6,"div",[["class","wrap-btn"]],null,null,null,null,null)),(n()(),e.rb(64,0,null,null,2,"button",[["class","btn btn-secondary"],["type","button"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onCancelClicked()&&e),e}),null,null)),(n()(),e.Lb(65,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(67,0,null,null,2,"button",[["class","btn btn-primary"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onContinueClicked()&&e),e}),null,null)),(n()(),e.Lb(68,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){var l=t.component;n(t,2,0,l.formCustomer),n(t,8,0,l.currentGift.urlImage,l.currentGift.title,l.currentGift.partnerCode,l.currentGift.point),n(t,30,0,!l.isEnoughPoint),n(t,38,0,!l.isEnoughPoint),n(t,55,0,!l.isEnoughGift),n(t,57,0,l.quantity,!l.isEnoughPoint||!l.isEnoughGift),n(t,60,0,!l.isEnoughGift),n(t,62,0,l.isShowCustomerCode)}),(function(n,t){var l=t.component;n(t,1,0,e.Db(t,4).ngClassUntouched,e.Db(t,4).ngClassTouched,e.Db(t,4).ngClassPristine,e.Db(t,4).ngClassDirty,e.Db(t,4).ngClassValid,e.Db(t,4).ngClassInvalid,e.Db(t,4).ngClassPending),n(t,12,0,e.Mb(t,12,0,e.Db(t,13).transform("loyalty.exchange.gift_contact"))),n(t,15,0,e.Mb(t,15,0,e.Db(t,16).transform("general.btn_change")));var i=e.Mb(t,18,0,n(t,19,0,e.Db(t,0),l.requestData.mobileNo));n(t,18,0,i),n(t,21,0,l.requestData.address),n(t,25,0,e.Mb(t,25,0,e.Db(t,26).transform("loyalty.home.point_available"))),n(t,32,0,l.availablePointDisplay),n(t,34,0,e.Mb(t,34,0,e.Db(t,35).transform("loyalty.exchange.gift_point_title"))),n(t,41,0,e.Mb(t,41,0,e.Db(t,42).transform("loyalty.exchange.gift_will_exchange_point"))),n(t,44,0,l.redeemPointDisplay),n(t,46,0,e.Mb(t,46,0,e.Db(t,47).transform("loyalty.exchange.gift_point_title"))),n(t,50,0,e.Mb(t,50,0,e.Db(t,51).transform("loyalty.exchange_gift_quantity"))),n(t,65,0,e.Mb(t,65,0,e.Db(t,66).transform("general.btn_cancel"))),n(t,67,0,!!l.isShowCustomerCode&&l.formCustomer.controls.customer.invalid||!l.isEnoughPoint||0===l.quantity),n(t,68,0,e.Mb(t,68,0,e.Db(t,69).transform("general.btn_next")))}))}class mn{constructor(n,t){this.elRef=n,this.control=t}onInputChange(n){const t=Number(this.inputEmail.maxLength);let l=Object(s.q)(n.target.value);l=Object(s.s)(l),l=l.replace(/[!#$%^&*()?><~`]/g,""),l=l.replace(/ +/g,""),l=l.length>t?l.substring(0,t):l,this.elRef.nativeElement.value=l,this.control.control.setValue(l)}onPaste(n){const t=Number(this.inputEmail.maxLength);n.preventDefault();const l=n.clipboardData.getData("text/plain");let e=Object(s.q)(l);e=Object(s.s)(e),e=e.replace(/[!#$%^&*()?><~`]/g,""),e=e.replace(/ +/g,""),e=e.length>t?e.substring(0,t):e,document.execCommand("insertText",!1,e)}}var _n=l("/bYn"),Cn=l("6iyd"),Pn=l("bB9G"),On=l("/uUt"),Mn=l("XpjX");class xn{constructor(n,t,l){this.fb=n,this.commonService=t,this.langService=l,this.newUserContact=new e.m,this.provinces=[],this.districts=[],this.wards=[]}ngOnInit(){this.isChangeEmail=this.userContact.giftType===Mn.m.E_VOUCHER||this.userContact.giftType===Mn.m.DIEM_THUONG,this.currentLang=this.langService.getLang(),this.commonService.setPageTitle("loyalty.exchange.gift.change_contact_title"),this.isChangeEmail?this.changeContactForm=this.fb.group({phone:new b.f("",[b.w.required,b.w.pattern(/(^0+)|^\d{2}\s\d{3}\s\d{4}$/)]),email:new b.f("",[b.w.required,b.w.pattern(en.f)])}):(this.fetchProvinces(),this.changeContactForm=this.fb.group({phone:new b.f("",[b.w.required,b.w.pattern(/(^0+)|^\d{2}\s\d{3}\s\d{4}$/)]),province:new b.f("",[b.w.required]),district:new b.f("",[b.w.required]),ward:new b.f("",[b.w.required]),address:new b.f("",[b.w.required])}),this.changeContactForm.controls.province.valueChanges.pipe(Object(On.a)()).subscribe(n=>{n&&(this.fetchDistricts(n),this.changeContactForm.controls.district.reset(),this.changeContactForm.controls.ward.reset(),this.wards=[],this.districts=[])}),this.changeContactForm.controls.district.valueChanges.pipe(Object(On.a)()).subscribe(n=>{n&&(this.fetchWards(n),this.changeContactForm.controls.ward.reset(),this.wards=[])}))}onSubmit(){let n={phone:this.changeContactForm.controls.phone.value.replace(en.i,""),address:this.isChangeEmail?this.changeContactForm.controls.email.value:this.formatAddress()};this.newUserContact.emit(n)}fetchProvinces(){this.commonService.callApi({method:C.a.GET,url:P.a.PROVINCES,progress:!1,success:n=>{this.provinces=n.provinces}})}fetchDistricts(n){this.commonService.callApi({method:C.a.GET,url:P.a.PROVINCES+"/"+n,progress:!1,success:n=>{this.districts=n.districts}})}fetchWards(n){this.commonService.callApi({method:C.a.GET,url:P.a.DISTRICTS+"/"+n,progress:!1,success:n=>{this.wards=n.wards}})}formatAddress(){return this.getAddressById(this.changeContactForm.value)}getAddressById(n){const t=this.wards.find(t=>t.id===n.ward),l=this.districts.find(t=>t.id===n.district),e=this.provinces.find(t=>t.id===n.province),i="vi"===this.currentLang?"vietnameseName":"englishName";return`${n.address}, ${t[i]}, ${l[i]}, ${e[i]}`}}var yn=l("WmRU"),vn=e.pb({encapsulation:0,styles:[[".title-common[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#ad8ad8}.contact-common[_ngcontent-%COMP%]{font-size:16px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#42236a}.input-style[_ngcontent-%COMP%]{height:45px;border-radius:5px;border:1px solid #e2d8ee;background-color:#fcfcfc;font-weight:500}.input-style[_ngcontent-%COMP%]::-webkit-input-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::-moz-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::-ms-input-placeholder{font-weight:400}.input-style[_ngcontent-%COMP%]::placeholder{font-weight:400}.text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.change-contact-container[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column}.change-contact-container[_ngcontent-%COMP%] .current-info[_ngcontent-%COMP%]{width:496px;margin:auto;display:flex;flex-direction:column}.change-contact-container[_ngcontent-%COMP%] .current-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-top:5px}.change-contact-container[_ngcontent-%COMP%] .current-info[_ngcontent-%COMP%] .change-title[_ngcontent-%COMP%]{margin-bottom:3px}.change-contact-container[_ngcontent-%COMP%] .current-info[_ngcontent-%COMP%] .current-contact[_ngcontent-%COMP%]{word-break:break-word}.change-contact-container[_ngcontent-%COMP%] .edit-info[_ngcontent-%COMP%]{width:496px;margin:24px auto}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info[_ngcontent-%COMP%]{font-size:14px}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info__email-title[_ngcontent-%COMP%]{color:#ad8ad8;margin-bottom:10px}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info__current-email[_ngcontent-%COMP%]{font-size:16px;margin-bottom:30px;word-break:break-word}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info__new-email[_ngcontent-%COMP%]{color:#ad8ad8;margin-bottom:15px}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info__btn[_ngcontent-%COMP%]{width:345px;margin:0 auto}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info__input-email[_ngcontent-%COMP%]{padding-left:15px;margin-bottom:25px;color:#42236a}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-email[_ngcontent-%COMP%], .change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-phone[_ngcontent-%COMP%]{width:100%;padding-left:15px;margin-bottom:25px;color:#42236a}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-phone[_ngcontent-%COMP%]:focus{outline:0}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-info-note[_ngcontent-%COMP%]{text-align:center;margin:0 auto;font-size:16px}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .edit-email[_ngcontent-%COMP%]:focus{outline:0}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%]{text-align:center}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]{width:100%;padding-left:15px;margin-bottom:25px;font-weight:500;padding-right:15px}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]:focus{outline:0}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]::-webkit-input-placeholder{font-weight:400}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]::-moz-placeholder{font-weight:400}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]::-ms-input-placeholder{font-weight:400}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .edit-address__input-address[_ngcontent-%COMP%]::placeholder{font-weight:400}.change-contact-container[_ngcontent-%COMP%] .edit-info__form[_ngcontent-%COMP%] .wrap-input[_ngcontent-%COMP%] .select-container{margin-bottom:20px}.change-contact-container[_ngcontent-%COMP%] .btn-change[_ngcontent-%COMP%]{width:345px;margin:24px auto}@media only screen and (max-width:575px){.change-contact-container[_ngcontent-%COMP%] .current-info[_ngcontent-%COMP%], .change-contact-container[_ngcontent-%COMP%] .edit-info[_ngcontent-%COMP%]{width:100%}.btn-change[_ngcontent-%COMP%]{width:100%!important;min-width:unset}}"]],data:{}});function wn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,11,"div",[["class","wrap-input"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,7,"input",[["class","input-style edit-email"],["formControlName","email"],["type","text"]],[[8,"placeholder",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"paste"]],(function(n,t,l){var i=!0;return"input"===t&&(i=!1!==e.Db(n,2)._handleInput(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,2).onTouched()&&i),"compositionstart"===t&&(i=!1!==e.Db(n,2)._compositionStart()&&i),"compositionend"===t&&(i=!1!==e.Db(n,2)._compositionEnd(l.target.value)&&i),"input"===t&&(i=!1!==e.Db(n,7).onInputChange(l)&&i),"paste"===t&&(i=!1!==e.Db(n,7).onPaste(l)&&i),i}),null,null)),e.qb(2,16384,null,0,b.d,[e.C,e.k,[2,b.a]],null,null),e.Ib(1024,null,b.n,(function(n){return[n]}),[b.d]),e.qb(4,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[6,b.n],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(6,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(7,16384,null,0,mn,[e.k,b.o],{inputEmail:[0,"inputEmail"]},null),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(9,0,null,null,2,"span",[["class","title-common edit-info-note"]],null,null,null,null,null)),(n()(),e.Lb(10,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,4,0,"email"),n(t,7,0,250)}),(function(n,t){n(t,1,0,e.vb(1,"",e.Mb(t,1,0,e.Db(t,8).transform("loyalty.exchange.gift.input_contact_email")),""),e.Db(t,6).ngClassUntouched,e.Db(t,6).ngClassTouched,e.Db(t,6).ngClassPristine,e.Db(t,6).ngClassDirty,e.Db(t,6).ngClassValid,e.Db(t,6).ngClassInvalid,e.Db(t,6).ngClassPending),n(t,10,0,e.Mb(t,10,0,e.Db(t,11).transform("loyalty.exchange.gift_note")))}))}function Dn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"select-option",[],null,null,null,u.b,u.a)),e.qb(1,114688,[[1,4]],0,r.a,[],{value:[0,"value"],name:[1,"name"]},null),(n()(),e.Lb(2,0,[" "," "]))],(function(n,t){n(t,1,0,t.context.$implicit.id,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}),(function(n,t){n(t,2,0,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}))}function kn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"select-option",[],null,null,null,u.b,u.a)),e.qb(1,114688,[[2,4]],0,r.a,[],{value:[0,"value"],name:[1,"name"]},null),(n()(),e.Lb(2,0,[" "," "]))],(function(n,t){n(t,1,0,t.context.$implicit.id,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}),(function(n,t){n(t,2,0,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}))}function Sn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"select-option",[],null,null,null,u.b,u.a)),e.qb(1,114688,[[3,4]],0,r.a,[],{value:[0,"value"],name:[1,"name"]},null),(n()(),e.Lb(2,0,[" "," "]))],(function(n,t){n(t,1,0,t.context.$implicit.id,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}),(function(n,t){n(t,2,0,"vi"===t.component.currentLang?t.context.$implicit.vietnameseName:t.context.$implicit.englishName)}))}function In(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,39,"div",[["class","wrap-input"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,8,"select-container",[["formControlName","province"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[["document","click"]],(function(n,t,l){var i=!0;return"document:click"===t&&(i=!1!==e.Db(n,5).withoutClickComponent(l)&&i),i}),f.b,f.a)),e.qb(2,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[8,null],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(4,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(5,6012928,null,1,m.a,[[6,b.o],e.h,e.k],{placeholder:[0,"placeholder"]},null),e.Jb(603979776,1,{items:1}),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,Dn)),e.qb(9,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(10,0,null,null,8,"select-container",[["formControlName","district"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[["document","click"]],(function(n,t,l){var i=!0;return"document:click"===t&&(i=!1!==e.Db(n,14).withoutClickComponent(l)&&i),i}),f.b,f.a)),e.qb(11,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[8,null],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(13,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(14,6012928,null,1,m.a,[[6,b.o],e.h,e.k],{placeholder:[0,"placeholder"],isDisabled:[1,"isDisabled"],districts:[2,"districts"]},null),e.Jb(603979776,2,{items:1}),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,kn)),e.qb(18,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(19,0,null,null,8,"select-container",[["formControlName","ward"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[["document","click"]],(function(n,t,l){var i=!0;return"document:click"===t&&(i=!1!==e.Db(n,23).withoutClickComponent(l)&&i),i}),f.b,f.a)),e.qb(20,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[8,null],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(22,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(23,6012928,null,1,m.a,[[6,b.o],e.h,e.k],{placeholder:[0,"placeholder"],isDisabled:[1,"isDisabled"],wards:[2,"wards"]},null),e.Jb(603979776,3,{items:1}),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,Sn)),e.qb(27,278528,null,0,a.m,[e.N,e.K,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.rb(28,0,null,null,8,"input",[["class","input-style edit-email"],["formControlName","address"],["type","text"]],[[8,"placeholder",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"paste"]],(function(n,t,l){var i=!0;return"input"===t&&(i=!1!==e.Db(n,29)._handleInput(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,29).onTouched()&&i),"compositionstart"===t&&(i=!1!==e.Db(n,29)._compositionStart()&&i),"compositionend"===t&&(i=!1!==e.Db(n,29)._compositionEnd(l.target.value)&&i),"input"===t&&(i=!1!==e.Db(n,34).onInputChange(l)&&i),"paste"===t&&(i=!1!==e.Db(n,34).onPaste(l)&&i),i}),null,null)),e.qb(29,16384,null,0,b.d,[e.C,e.k,[2,b.a]],null,null),e.Ib(1024,null,b.n,(function(n){return[n]}),[b.d]),e.qb(31,671744,null,0,b.h,[[3,b.c],[8,null],[8,null],[6,b.n],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(33,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(34,16384,null,0,_n.a,[e.k,b.o],{inputName:[0,"inputName"]},null),e.Gb(35,{isLowerCaseValid:0,maxLength:1,inputDefault:2}),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(37,0,null,null,2,"span",[["class","title-common edit-info-note"]],null,null,null,null,null)),(n()(),e.Lb(38,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){var l=t.component;n(t,2,0,"province"),n(t,5,0,e.vb(1,"",e.Mb(t,5,0,e.Db(t,7).transform("txt_setting_placeholder_province")),"")),n(t,9,0,l.provinces),n(t,11,0,"district"),n(t,14,0,e.vb(1,"",e.Mb(t,14,0,e.Db(t,16).transform("txt_setting_placeholder_district")),""),!(null!=l.districts&&l.districts.length),l.districts),n(t,18,0,l.districts),n(t,20,0,"ward"),n(t,23,0,e.vb(1,"",e.Mb(t,23,0,e.Db(t,25).transform("txt_setting_placeholder_ward")),""),!(null!=l.wards&&l.wards.length),l.wards),n(t,27,0,l.wards),n(t,31,0,"address");var i=n(t,35,0,!0,250,!0);n(t,34,0,i)}),(function(n,t){n(t,1,0,e.Db(t,4).ngClassUntouched,e.Db(t,4).ngClassTouched,e.Db(t,4).ngClassPristine,e.Db(t,4).ngClassDirty,e.Db(t,4).ngClassValid,e.Db(t,4).ngClassInvalid,e.Db(t,4).ngClassPending),n(t,10,0,e.Db(t,13).ngClassUntouched,e.Db(t,13).ngClassTouched,e.Db(t,13).ngClassPristine,e.Db(t,13).ngClassDirty,e.Db(t,13).ngClassValid,e.Db(t,13).ngClassInvalid,e.Db(t,13).ngClassPending),n(t,19,0,e.Db(t,22).ngClassUntouched,e.Db(t,22).ngClassTouched,e.Db(t,22).ngClassPristine,e.Db(t,22).ngClassDirty,e.Db(t,22).ngClassValid,e.Db(t,22).ngClassInvalid,e.Db(t,22).ngClassPending),n(t,28,0,e.vb(1,"",e.Mb(t,28,0,e.Db(t,36).transform("txt_setting_profile_address")),""),e.Db(t,33).ngClassUntouched,e.Db(t,33).ngClassTouched,e.Db(t,33).ngClassPristine,e.Db(t,33).ngClassDirty,e.Db(t,33).ngClassValid,e.Db(t,33).ngClassInvalid,e.Db(t,33).ngClassPending),n(t,38,0,e.Mb(t,38,0,e.Db(t,39).transform("loyalty.exchange.gift_note")))}))}function qn(n){return e.Nb(0,[e.Fb(0,j.a,[]),(n()(),e.rb(1,0,null,null,37,"span",[["class","change-contact-container"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,8,"div",[["class","current-info"]],null,null,null,null,null)),(n()(),e.rb(3,0,null,null,2,"span",[["class","change-title title-common"]],null,null,null,null,null)),(n()(),e.Lb(4,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(6,0,null,null,2,"span",[["class","current-contact contact-common"]],null,null,null,null,null)),(n()(),e.Lb(7,null,["",""])),e.Hb(8,1),(n()(),e.rb(9,0,null,null,1,"span",[["class","current-contact contact-common"]],null,null,null,null,null)),(n()(),e.Lb(10,null,["",""])),(n()(),e.rb(11,0,null,null,27,"div",[["class","edit-info"]],null,null,null,null,null)),(n()(),e.rb(12,0,null,null,26,"form",[["class","edit-info__form"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],(function(n,t,l){var i=!0,o=n.component;return"submit"===t&&(i=!1!==e.Db(n,14).onSubmit(l)&&i),"reset"===t&&(i=!1!==e.Db(n,14).onReset()&&i),"ngSubmit"===t&&(i=!1!==o.onSubmit()&&i),i}),null,null)),e.qb(13,16384,null,0,b.A,[],null,null),e.qb(14,540672,null,0,b.i,[[8,null],[8,null]],{form:[0,"form"]},{ngSubmit:"ngSubmit"}),e.Ib(2048,null,b.c,null,[b.i]),e.qb(16,16384,null,0,b.q,[[4,b.c]],null,null),(n()(),e.rb(17,0,null,null,2,"span",[["class","edit-info__new-email"]],null,null,null,null,null)),(n()(),e.Lb(18,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(20,0,null,null,11,"input",[["class","input-style edit-phone"],["formControlName","phone"],["maxlength","12"],["minlength","12"],["phoneMask",""],["type","text"]],[[8,"placeholder",0],[1,"minlength",0],[1,"maxlength",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(n,t,l){var i=!0;return"input"===t&&(i=!1!==e.Db(n,21)._handleInput(l.target.value)&&i),"blur"===t&&(i=!1!==e.Db(n,21).onTouched()&&i),"compositionstart"===t&&(i=!1!==e.Db(n,21)._compositionStart()&&i),"compositionend"===t&&(i=!1!==e.Db(n,21)._compositionEnd(l.target.value)&&i),i}),null,null)),e.qb(21,16384,null,0,b.d,[e.C,e.k,[2,b.a]],null,null),e.qb(22,540672,null,0,b.l,[],{minlength:[0,"minlength"]},null),e.qb(23,540672,null,0,b.k,[],{maxlength:[0,"maxlength"]},null),e.Ib(1024,null,b.m,(function(n,t){return[n,t]}),[b.l,b.k]),e.Ib(1024,null,b.n,(function(n){return[n]}),[b.d]),e.qb(26,671744,null,0,b.h,[[3,b.c],[6,b.m],[8,null],[6,b.n],[2,b.z]],{name:[0,"name"]},null),e.Ib(2048,null,b.o,null,[b.h]),e.qb(28,16384,null,0,b.p,[[4,b.o]],null,null),e.qb(29,540672,null,0,Cn.a,[e.k],{appAutoFocus:[0,"appAutoFocus"]},null),e.qb(30,212992,null,0,Pn.a,[e.k],{phoneControl:[0,"phoneControl"],preValue:[1,"preValue"]},null),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,wn)),e.qb(33,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.gb(16777216,null,null,1,null,In)),e.qb(35,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.rb(36,0,null,null,2,"button",[["class","btn btn-change btn-primary"],["type","submit"]],[[8,"disabled",0]],null,null,null,null)),(n()(),e.Lb(37,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){var l=t.component;n(t,14,0,l.changeContactForm),n(t,22,0,"12"),n(t,23,0,"12"),n(t,26,0,"phone"),n(t,29,0,!0),n(t,30,0,l.changeContactForm.controls.phone,l.changeContactForm.value.phone),n(t,33,0,l.isChangeEmail),n(t,35,0,!l.isChangeEmail)}),(function(n,t){var l=t.component;n(t,4,0,e.Mb(t,4,0,e.Db(t,5).transform("loyalty.exchange.gift.current_info")));var i=e.Mb(t,7,0,n(t,8,0,e.Db(t,0),l.userContact.mobileNo));n(t,7,0,i),n(t,10,0,l.userContact.address),n(t,12,0,e.Db(t,16).ngClassUntouched,e.Db(t,16).ngClassTouched,e.Db(t,16).ngClassPristine,e.Db(t,16).ngClassDirty,e.Db(t,16).ngClassValid,e.Db(t,16).ngClassInvalid,e.Db(t,16).ngClassPending),n(t,18,0,e.Mb(t,18,0,e.Db(t,19).transform("loyalty.exchange.gift.new_info"))),n(t,20,0,e.vb(1,"",e.Mb(t,20,0,e.Db(t,31).transform("loyalty.exchange.gift.input_contact_phone")),""),e.Db(t,22).minlength?e.Db(t,22).minlength:null,e.Db(t,23).maxlength?e.Db(t,23).maxlength:null,e.Db(t,28).ngClassUntouched,e.Db(t,28).ngClassTouched,e.Db(t,28).ngClassPristine,e.Db(t,28).ngClassDirty,e.Db(t,28).ngClassValid,e.Db(t,28).ngClassInvalid,e.Db(t,28).ngClassPending),n(t,36,0,l.changeContactForm.invalid),n(t,37,0,e.Mb(t,37,0,e.Db(t,38).transform("general.btn_change")))}))}class Nn{constructor(n){this.translateService=n}ngOnInit(){let n=Object(s.e)(this.requestData.exchangePoint.toString());this.remainPoint=Object(s.e)(this.requestData.remainPoint.toString()),this.redeemPoint=this.translateService.instant("loyalty.history_exchange_gift_point",{point:n})}}var Gn=e.pb({encapsulation:0,styles:[[".exchange-gift-confirm[_ngcontent-%COMP%]{border-radius:5px;background-color:#fff;display:flex}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-border[_ngcontent-%COMP%]{border-right:1px solid #e6e9ee}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-point-section[_ngcontent-%COMP%]{padding:24px;border-bottom:1px solid #e6e9ee}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-point-section[_ngcontent-%COMP%] .exchange-point-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;font-style:normal;font-stretch:normal;line-height:1.71;letter-spacing:normal;color:#ad8ad8;text-transform:uppercase}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-point-section[_ngcontent-%COMP%] .exchange-point-content[_ngcontent-%COMP%]{font-size:30px;font-weight:300;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#42236a}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-info-section[_ngcontent-%COMP%]{padding:24px}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-info-section[_ngcontent-%COMP%] .exchange-info-content[_ngcontent-%COMP%]{font-size:14px;font-weight:500;font-style:normal;font-stretch:normal;line-height:1.71;letter-spacing:normal;color:#42236a;word-break:break-word}.exchange-gift-confirm[_ngcontent-%COMP%] .title-common[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#ad8ad8}.exchange-gift-confirm[_ngcontent-%COMP%] .content-common[_ngcontent-%COMP%]{display:block;font-size:16px;font-weight:500;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#42236a}.exchange-gift-confirm[_ngcontent-%COMP%] .content-common[_ngcontent-%COMP%] .point-txt[_ngcontent-%COMP%]{font-size:14px}.exchange-gift-confirm[_ngcontent-%COMP%] .gift-amount[_ngcontent-%COMP%], .exchange-gift-confirm[_ngcontent-%COMP%] .gift-name[_ngcontent-%COMP%]{padding:24px;border-bottom:1px solid #e6e9ee}.exchange-gift-confirm[_ngcontent-%COMP%] .gift-point-remain[_ngcontent-%COMP%]{padding:24px}.exchange-gift-confirm[_ngcontent-%COMP%] .partner-code[_ngcontent-%COMP%]{border-top:1px solid #e6e9ee;padding:24px}.margin-bottom5[_ngcontent-%COMP%]{margin-bottom:5px}.margin-bottom7[_ngcontent-%COMP%]{margin-bottom:7px}@media only screen and (max-width:575px){.exchange-gift-confirm[_ngcontent-%COMP%]{display:block}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-border[_ngcontent-%COMP%]{border-right:none}.exchange-gift-confirm[_ngcontent-%COMP%] .exchange-info-section[_ngcontent-%COMP%]{border-bottom:1px solid #e6e9ee}}"]],data:{}});function Tn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,5,"div",[["class","partner-code"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,2,"span",[["class","title-common margin-bottom7 row"]],null,null,null,null,null)),(n()(),e.Lb(2,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(4,0,null,null,1,"span",[["class","content-common row"]],null,null,null,null,null)),(n()(),e.Lb(5,null,["",""]))],null,(function(n,t){var l=t.component;n(t,2,0,e.Mb(t,2,0,e.Db(t,3).transform("loyalty.exchange.gift_partner_code"))),n(t,5,0,null==l.requestData?null:l.requestData.partnerCode)}))}function Fn(n){return e.Nb(0,[e.Fb(0,j.a,[]),(n()(),e.rb(1,0,null,null,41,"div",[["class","exchange-gift-confirm"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,15,"div",[["class","exchange-border col-md-6"]],null,null,null,null,null)),(n()(),e.rb(3,0,null,null,5,"div",[["class","exchange-point-section"]],null,null,null,null,null)),(n()(),e.rb(4,0,null,null,2,"span",[["class","exchange-point-title margin-bottom5 row"]],null,null,null,null,null)),(n()(),e.Lb(5,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(7,0,null,null,1,"span",[["class","exchange-point-content row"]],null,null,null,null,null)),(n()(),e.Lb(8,null,["",""])),(n()(),e.rb(9,0,null,null,8,"div",[["class","exchange-info-section"]],null,null,null,null,null)),(n()(),e.rb(10,0,null,null,2,"span",[["class","title-common margin-bottom5 row"]],null,null,null,null,null)),(n()(),e.Lb(11,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(13,0,null,null,2,"span",[["class","exchange-info-content margin-bottom5 row"]],null,null,null,null,null)),(n()(),e.Lb(14,null,["",""])),e.Hb(15,1),(n()(),e.rb(16,0,null,null,1,"span",[["class","exchange-info-content row"]],null,null,null,null,null)),(n()(),e.Lb(17,null,["",""])),(n()(),e.rb(18,0,null,null,23,"div",[["class","col-md-6"]],null,null,null,null,null)),(n()(),e.rb(19,0,null,null,5,"div",[["class","gift-name"]],null,null,null,null,null)),(n()(),e.rb(20,0,null,null,2,"span",[["class","title-common margin-bottom7 row"]],null,null,null,null,null)),(n()(),e.Lb(21,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(23,0,null,null,1,"span",[["class","content-common row"]],null,null,null,null,null)),(n()(),e.Lb(24,null,["",""])),(n()(),e.rb(25,0,null,null,5,"div",[["class","gift-amount"]],null,null,null,null,null)),(n()(),e.rb(26,0,null,null,2,"span",[["class","title-common margin-bottom7 row"]],null,null,null,null,null)),(n()(),e.Lb(27,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(29,0,null,null,1,"span",[["class","content-common row"]],null,null,null,null,null)),(n()(),e.Lb(30,null,["",""])),(n()(),e.rb(31,0,null,null,8,"div",[["class","gift-point-remain"]],null,null,null,null,null)),(n()(),e.rb(32,0,null,null,2,"span",[["class","title-common margin-bottom7 row"]],null,null,null,null,null)),(n()(),e.Lb(33,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(35,0,null,null,4,"div",[["class","content-common row"]],null,null,null,null,null)),(n()(),e.Lb(36,null,["",""])),(n()(),e.rb(37,0,null,null,2,"span",[["class","point-txt"]],null,null,null,null,null)),(n()(),e.Lb(38,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,Tn)),e.qb(41,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),e.Cb(null,0)],(function(n,t){n(t,41,0,t.component.requestData.partnerCode)}),(function(n,t){var l=t.component;n(t,5,0,e.Mb(t,5,0,e.Db(t,6).transform("loyalty.exchange.gift_will_exchange_point"))),n(t,8,0,l.redeemPoint),n(t,11,0,e.Mb(t,11,0,e.Db(t,12).transform("loyalty.exchange.gift_contact")));var i=e.Mb(t,14,0,n(t,15,0,e.Db(t,0),null==l.requestData?null:l.requestData.mobileNo));n(t,14,0,i),n(t,17,0,l.requestData.address),n(t,21,0,e.Mb(t,21,0,e.Db(t,22).transform("loyalty.exchange.gift_name"))),n(t,24,0,l.requestData.giftName),n(t,27,0,e.Mb(t,27,0,e.Db(t,28).transform("loyalty.exchange_gift_quantity"))),n(t,30,0,l.requestData.giftNumber),n(t,33,0,e.Mb(t,33,0,e.Db(t,34).transform("loyalty.exchange.gift_remaining_point"))),n(t,36,0,l.remainPoint+" "),n(t,38,0,e.Mb(t,38,0,e.Db(t,39).transform("loyalty.exchange.gift_point_title")))}))}var En=l("+Gek"),Ln=l("mj0y"),jn=l("iInd"),An=function(n){return n[n.VIEW_DETAIL_GIFT=0]="VIEW_DETAIL_GIFT",n[n.INPUT_AMOUNT_GIFT=1]="INPUT_AMOUNT_GIFT",n[n.CHANGE_CONTACT=2]="CHANGE_CONTACT",n[n.CONFIRM_EXCHANGE_GIFT=3]="CONFIRM_EXCHANGE_GIFT",n[n.FINISH_SUCCESSFUL=4]="FINISH_SUCCESSFUL",n[n.FINISH_FAILED=5]="FINISH_FAILED",n}({});class zn{constructor(n,t,l){this.commonService=n,this.loyaltyService=t,this.authService=l,this.backHomePage=new e.m,this.STEPS=An,this.currentStep=An.VIEW_DETAIL_GIFT,this.requestData={giftType:"",address:"",mobileNo:"",giftCode:"",giftNumber:1,exchangePoint:0,giftName:"",remainPoint:0,refNo:"",partnerCode:""}}ngOnInit(){window.scrollTo({top:0,behavior:"smooth"}),this.userInfo=this.authService.getUserInfo(),this.requestData.mobileNo=this.userInfo.phoneNumber,this.requestData.address=this.userInfo.fullAddress,this.fetchGiftDetail(this.selectedGiftCode),this.customerRank=this.loyaltyService.getCustomerRank()||{},this.commonService.showBackButton(this.backPageOnTitle.bind(this))}fetchGiftDetail(n){this.commonService.callApi({method:C.a.POST,url:P.a.GET_GIFT_DETAIL,data:{giftCode:n},success:n=>{this.currentGift=n.giftDetail,this.requestData.giftCode=n.giftDetail.giftCode,this.requestData.giftName=n.giftDetail.title,this.requestData.giftType=n.giftDetail.giftType,this.currentGift.giftType!==Mn.m.DIEM_THUONG&&this.currentGift.giftType!==Mn.m.E_VOUCHER||(this.requestData.address=this.userInfo.emailAddress),this.isShowExchangeBtn=Number(n.giftDetail.giftRemaining)>0,this.giftPoint=Object(s.e)(n.giftDetail.point.toString()),this.commonService.setPageTitle(this.currentGift.title)}})}handleNextChangeContact(n){window.scrollTo({top:0,behavior:"smooth"}),this.requestData.giftNumber=n,this.currentStep=An.CHANGE_CONTACT,this.commonService.showBackButton(this.backPageOnTitle.bind(this))}handleChangContactFinish(n){this.requestData.address=n.address,this.requestData.mobileNo=n.phone,this.currentStep=An.INPUT_AMOUNT_GIFT,window.scrollTo({top:0,behavior:"smooth"})}backPageOnTitle(){switch(this.currentStep){case An.VIEW_DETAIL_GIFT:this.backHomePage.emit("");break;case An.INPUT_AMOUNT_GIFT:this.commonService.setPageTitle(this.currentGift.title),this.currentStep=An.VIEW_DETAIL_GIFT;break;case An.CONFIRM_EXCHANGE_GIFT:case An.CHANGE_CONTACT:this.commonService.setPageTitle("loyalty.exchange_gift_input_title"),this.currentStep=An.INPUT_AMOUNT_GIFT}}onExchangeGiftClicked(){window.scrollTo({top:0,behavior:"smooth"}),this.commonService.setPageTitle("loyalty.exchange_gift_input_title"),this.commonService.showBackButton(this.backPageOnTitle.bind(this)),this.currentStep=An.INPUT_AMOUNT_GIFT}handleResultVerifyGift(n){this.requestData=n,this.commonService.setPageTitle("loyalty.exchange_gift_input_title"),this.commonService.showBackButton(this.backPageOnTitle.bind(this)),this.currentStep=An.CONFIRM_EXCHANGE_GIFT,window.scrollTo({top:0,behavior:"smooth"})}handleCancelExchangeInput(){this.backHomePage.emit("")}onConfirmClicked(){this.sendRequestConfirm()}sendRequestConfirm(){this.commonService.callApi({method:C.a.POST,url:P.a.CONFIRM_EXCHANGE_GIFT,data:{refNo:this.requestData.refNo},success:n=>{window.scrollTo({top:0,behavior:"smooth"}),this.commonService.setPageTitle("loyalty.exchange_gift_input_title"),this.commonService.showBreadcrumb(!1),this.currentStep=An.FINISH_SUCCESSFUL},error:n=>{window.scrollTo({top:0,behavior:"smooth"}),this.commonService.setPageTitle("loyalty.exchange_gift_input_title"),this.currentStep=An.FINISH_FAILED,this.commonService.showBreadcrumb(!1)}})}onCancelClicked(){this.currentStep=An.INPUT_AMOUNT_GIFT,window.scrollTo({top:0,behavior:"smooth"})}onClickAgain(){this.backHomePage.emit(!0)}onClickFinish(){this.backHomePage.emit(!0)}}var Rn=e.pb({encapsulation:0,styles:[[".view-gift-detail[_ngcontent-%COMP%]{display:flex}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%]{padding:0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:200px;border-radius:5px}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%]{width:100%;height:287px;border-radius:5px;background-color:#fff;margin-top:16px}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .gift-common[_ngcontent-%COMP%]{border-bottom:1px solid rgba(225,227,232,.6);padding:24px 24px 16px}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .gift-common[_ngcontent-%COMP%] .point[_ngcontent-%COMP%]{height:24px;font-size:16px;font-weight:500;line-height:1.71;color:#42236a;margin:0;display:block}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .gift-common[_ngcontent-%COMP%] .point[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .gift-common[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-1[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .remove-border[_ngcontent-%COMP%]{border-bottom:none}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%]{padding:0 30px 0 0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .gift-content[_ngcontent-%COMP%]{width:100%;height:400px;border-radius:5px;background-color:#fff;margin-left:24px}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .gift-content[_ngcontent-%COMP%] .gift-content-title[_ngcontent-%COMP%]{justify-content:center;padding:24px;text-transform:uppercase;border-bottom:1px solid rgba(225,227,232,.6);font-size:16px;font-weight:700;line-height:1.75;color:#42236a}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .gift-content[_ngcontent-%COMP%] .gift-content-detail[_ngcontent-%COMP%]{padding:24px;font-size:16px;font-weight:400;line-height:1.5;text-align:justify;color:#42236a}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .gift-content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .btn-change-gift[_ngcontent-%COMP%]{width:80%;height:48px;margin-left:65px;margin-top:24px}.exchange-gift-confirm[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;margin-top:24px}.exchange-gift-confirm[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] .btn-default[_ngcontent-%COMP%]{margin-left:12px;margin-right:12px}.wrap-action-successfully[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.wrap-action-successfully[_ngcontent-%COMP%] .action-success{color:#ad8ad8!important}.wrap-action-successfully[_ngcontent-%COMP%] .action-success span{color:#42236a!important}.wrap-action-successfully[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{justify-content:space-between;margin-top:24px}.wrap-action-successfully[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:344px}.wrap-action-successfully[_ngcontent-%COMP%] .action-result__content{width:300px}.wrap-action-failed[_ngcontent-%COMP%]{margin-top:30px;display:flex;justify-content:center}.wrap-action-failed[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{margin-top:24px}.wrap-action-failed[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin:0 12px}.txt-title[_ngcontent-%COMP%]{height:24px;font-size:14px;font-weight:400;line-height:1.71;color:#ad8ad8}.txt-content[_ngcontent-%COMP%]{height:24px;font-size:14px;font-weight:500;line-height:1.71;color:#42236a}@media only screen and (max-width:575px){.view-gift-detail[_ngcontent-%COMP%]{display:block}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%]{margin-right:0;margin-top:20px;padding-right:0;padding-left:0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .gift-content[_ngcontent-%COMP%]{margin-left:0}.view-gift-detail[_ngcontent-%COMP%] .detail-section-2[_ngcontent-%COMP%] .btn-change-gift[_ngcontent-%COMP%]{width:100%;margin-left:0}.exchange-gift-confirm[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{flex-direction:column-reverse}.exchange-gift-confirm[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] .btn-default[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:16px}.wrap-action-successfully[_ngcontent-%COMP%]{width:100%;display:block}.wrap-action-successfully[_ngcontent-%COMP%] .action-result__content-custom{width:100%}.wrap-action-successfully[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.wrap-action-failed[_ngcontent-%COMP%] .action-result__content-custom{width:100%}.wrap-action-failed[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;width:100%}.wrap-action-failed[_ngcontent-%COMP%] .wrap-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin:0 0 16px}.btn[_ngcontent-%COMP%]{width:100%!important}}"]],data:{}});function Bn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,34,"div",[["class","view-gift-detail"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,23,"div",[["class","detail-section-1 col-md-5"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,0,"img",[["alt",""]],[[8,"src",4]],null,null,null,null)),(n()(),e.rb(3,0,null,null,21,"div",[["class","gift-info"]],null,null,null,null,null)),(n()(),e.rb(4,0,null,null,8,"div",[["class","gift-common"]],null,null,null,null,null)),(n()(),e.rb(5,0,null,null,2,"span",[["class","txt-title row"]],null,null,null,null,null)),(n()(),e.Lb(6,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(8,0,null,null,4,"div",[["class","point row"]],null,null,null,null,null)),(n()(),e.Lb(9,null,["",""])),(n()(),e.rb(10,0,null,null,2,"span",[],null,null,null,null,null)),(n()(),e.Lb(11,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(13,0,null,null,5,"div",[["class","gift-common"]],null,null,null,null,null)),(n()(),e.rb(14,0,null,null,2,"span",[["class","txt-title row"]],null,null,null,null,null)),(n()(),e.Lb(15,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(17,0,null,null,1,"span",[["class","txt-content text-uppercase row"]],null,null,null,null,null)),(n()(),e.Lb(18,null,["",""])),(n()(),e.rb(19,0,null,null,5,"div",[["class","gift-common remove-border"]],null,null,null,null,null)),(n()(),e.rb(20,0,null,null,2,"span",[["class","txt-title row"]],null,null,null,null,null)),(n()(),e.Lb(21,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(23,0,null,null,1,"span",[["class","txt-content row"]],null,null,null,null,null)),(n()(),e.Lb(24,null,["",""])),(n()(),e.rb(25,0,null,null,9,"div",[["class","detail-section-2 col-md-7"]],null,null,null,null,null)),(n()(),e.rb(26,0,null,null,5,"div",[["class","gift-content"]],null,null,null,null,null)),(n()(),e.rb(27,0,null,null,2,"span",[["class","gift-content-title row"]],null,null,null,null,null)),(n()(),e.Lb(28,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(30,0,null,null,1,"span",[["class","gift-content-detail row"]],null,null,null,null,null)),(n()(),e.Lb(31,null,["",""])),(n()(),e.rb(32,0,null,null,2,"button",[["class","btn btn-primary btn-change-gift"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onExchangeGiftClicked()&&e),e}),null,null)),(n()(),e.Lb(33,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],null,(function(n,t){var l=t.component;n(t,2,0,e.vb(1,"","data:image/png;base64,"+(null==l.currentGift?null:l.currentGift.urlImageDetail),"")),n(t,6,0,e.Mb(t,6,0,e.Db(t,7).transform("loyalty.detail.gift_point_of_gift"))),n(t,9,0,l.giftPoint+" "),n(t,11,0,e.Mb(t,11,0,e.Db(t,12).transform("loyalty.exchange.gift_point_title"))),n(t,15,0,e.Mb(t,15,0,e.Db(t,16).transform("loyalty.history.exchange_gift_code"))),n(t,18,0,null==l.currentGift?null:l.currentGift.giftCode),n(t,21,0,e.Mb(t,21,0,e.Db(t,22).transform("loyalty.detail.gift_remain_gift"))),n(t,24,0,null==l.currentGift?null:l.currentGift.giftRemaining),n(t,28,0,e.Mb(t,28,0,e.Db(t,29).transform("loyalty.detail.gift_content_incentives"))),n(t,31,0,null==l.currentGift?null:l.currentGift.description),n(t,32,0,!l.isShowExchangeBtn),n(t,33,0,e.Mb(t,33,0,e.Db(t,34).transform("loyalty.detail.gift_exchange_btn")))}))}function Un(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"div",[["class","exchange-gift-input"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"exchange-gift-input",[],null,[[null,"clickChangeContact"],[null,"resultVerifyGift"],[null,"cancelExchangeInput"]],(function(n,t,l){var e=!0,i=n.component;return"clickChangeContact"===t&&(e=!1!==i.handleNextChangeContact(l)&&e),"resultVerifyGift"===t&&(e=!1!==i.handleResultVerifyGift(l)&&e),"cancelExchangeInput"===t&&(e=!1!==i.handleCancelExchangeInput()&&e),e}),fn,sn)),e.qb(2,114688,null,0,rn,[y.a,c.j,b.e,Q],{currentGift:[0,"currentGift"],requestData:[1,"requestData"]},{clickChangeContact:"clickChangeContact",resultVerifyGift:"resultVerifyGift",cancelExchangeInput:"cancelExchangeInput"})],(function(n,t){var l=t.component;n(t,2,0,l.currentGift,l.requestData)}),null)}function Hn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"div",[["class","change-contact"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"change-contact",[],null,[[null,"newUserContact"]],(function(n,t,l){var e=!0;return"newUserContact"===t&&(e=!1!==n.component.handleChangContactFinish(l)&&e),e}),qn,vn)),e.qb(2,114688,null,0,xn,[b.e,y.a,yn.a],{userContact:[0,"userContact"]},{newUserContact:"newUserContact"})],(function(n,t){n(t,2,0,t.component.requestData)}),null)}function Vn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,9,"div",[["class","exchange-gift-confirm"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"exchange-gift-confirm",[],null,null,null,Fn,Gn)),e.qb(2,114688,null,0,Nn,[c.j],{requestData:[0,"requestData"]},null),(n()(),e.rb(3,0,null,null,6,"div",[["class","wrap-btn"]],null,null,null,null,null)),(n()(),e.rb(4,0,null,null,2,"button",[["class","btn-default btn btn-secondary"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onCancelClicked()&&e),e}),null,null)),(n()(),e.Lb(5,null,[" ",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(7,0,null,null,2,"button",[["class","btn-default btn btn-primary"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onConfirmClicked()&&e),e}),null,null)),(n()(),e.Lb(8,null,[" ",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,2,0,t.component.requestData)}),(function(n,t){n(t,5,0,e.Mb(t,5,0,e.Db(t,6).transform("general.btn_cancel"))),n(t,8,0,e.Mb(t,8,0,e.Db(t,9).transform("general.btn_confirm")))}))}function $n(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,9,"div",[["class","wrap-action-successfully"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,8,"action-result",[],null,null,null,En.b,En.a)),e.qb(2,638976,null,0,Ln.a,[],{title:[0,"title"],content:[1,"content"]},null),e.Fb(131072,c.i,[c.j,e.h]),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(5,0,null,0,4,"div",[["class","content-successfully"]],null,null,null,null,null)),(n()(),e.rb(6,0,null,null,3,"div",[["class","wrap-btn"]],null,null,null,null,null)),(n()(),e.rb(7,0,null,null,2,"button",[["class","btn btn-default btn-primary"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onClickFinish()&&e),e}),null,null)),(n()(),e.Lb(8,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,2,0,e.vb(1,"",e.Mb(t,2,0,e.Db(t,3).transform("loyalty.finish.successful_title")),""),e.vb(1,"",e.Mb(t,2,1,e.Db(t,4).transform("loyalty.finish.successful_content")),""))}),(function(n,t){n(t,8,0,e.Mb(t,8,0,e.Db(t,9).transform("general.btn_done")))}))}function Kn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,14,"div",[["class","wrap-action-failed"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,13,"action-result",[],null,null,null,En.b,En.a)),e.qb(2,638976,null,0,Ln.a,[],{title:[0,"title"],content:[1,"content"],success:[2,"success"]},null),e.Fb(131072,c.i,[c.j,e.h]),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(5,0,null,0,9,"div",[["class","content-failed"]],null,null,null,null,null)),(n()(),e.rb(6,0,null,null,8,"div",[["class","wrap-btn"]],null,null,null,null,null)),(n()(),e.rb(7,0,null,null,2,"button",[["class","btn-default btn btn-secondary"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onClickAgain()&&e),e}),null,null)),(n()(),e.Lb(8,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(10,0,null,null,4,"button",[["class","btn-default btn btn-primary"]],null,[[null,"click"]],(function(n,t,l){var i=!0;return"click"===t&&(i=!1!==e.Db(n,11).onClick()&&i),i}),null,null)),e.qb(11,16384,null,0,jn.n,[jn.m,jn.a,[8,null],e.C,e.k],{routerLink:[0,"routerLink"]},null),e.Eb(12,1),(n()(),e.Lb(13,null,["",""])),e.Fb(131072,c.i,[c.j,e.h])],(function(n,t){n(t,2,0,e.vb(1,"",e.Mb(t,2,0,e.Db(t,3).transform("loyalty.finish.failed_title")),""),e.vb(1,"",e.Mb(t,2,1,e.Db(t,4).transform("txt_common_error-1")),""),!1);var l=n(t,12,0,"/main");n(t,11,0,l)}),(function(n,t){n(t,8,0,e.Mb(t,8,0,e.Db(t,9).transform("general.btn_retry"))),n(t,13,0,e.Mb(t,13,0,e.Db(t,14).transform("menu.home")))}))}function Yn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,13,"div",[],null,null,null,null,null)),e.qb(1,16384,null,0,a.r,[],{ngSwitch:[0,"ngSwitch"]},null),(n()(),e.gb(16777216,null,null,1,null,Bn)),e.qb(3,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,Un)),e.qb(5,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,Hn)),e.qb(7,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,Vn)),e.qb(9,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,$n)),e.qb(11,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,Kn)),e.qb(13,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null)],(function(n,t){var l=t.component;n(t,1,0,l.currentStep),n(t,3,0,l.STEPS.VIEW_DETAIL_GIFT),n(t,5,0,l.STEPS.INPUT_AMOUNT_GIFT),n(t,7,0,l.STEPS.CHANGE_CONTACT),n(t,9,0,l.STEPS.CONFIRM_EXCHANGE_GIFT),n(t,11,0,l.STEPS.FINISH_SUCCESSFUL),n(t,13,0,l.STEPS.FINISH_FAILED)}),null)}function Xn(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,1,"app-gift-detail",[],null,null,null,Yn,Rn)),e.qb(1,114688,null,0,zn,[y.a,Q,W.a],null,null)],(function(n,t){n(t,1,0)}),null)}var Jn=e.nb("app-gift-detail",zn,Xn,{selectedGiftCode:"selectedGiftCode"},{backHomePage:"backHomePage"},[]),Wn=function(n){return n[n.HOME_PAGE=0]="HOME_PAGE",n[n.DETAIL_PAGE=1]="DETAIL_PAGE",n}({});class Qn{constructor(n){this.commonService=n,this.currentPage=Wn.HOME_PAGE,this.PAGE=Wn,this.isShowHistoryExchangeGift=!1,this.originTransferData={filter:1,sort:0,giftCategory:0,giftCode:"",pagingIndex:0,giftPoint:"ENOUGH",listGift:[]}}ngOnInit(){this.commonService.showBreadcrumb(!0),this.commonService.setPageTitle("menu.home.loyalty"),this.fetchPolicy()}onShowHistoryExchangeGift(n){this.isShowHistoryExchangeGift=n}handleSelectedGift(n){this.originTransferData=n,this.currentPage=this.PAGE.DETAIL_PAGE}handleBackPage(n){this.currentPage=this.PAGE.HOME_PAGE,this.commonService.showBreadcrumb(!0),this.commonService.setPageTitle("menu.home.loyalty"),n&&(this.originTransferData={filter:1,sort:0,giftCategory:0,giftCode:"",pagingIndex:0,giftPoint:"ENOUGH",listGift:[]})}fetchPolicy(){this.commonService.callApi({method:C.a.GET,url:P.a.LOYALTY_POLICY,success:n=>{this.policyUrl=n.url}})}}var Zn=e.pb({encapsulation:0,styles:[[".loyalty[_ngcontent-%COMP%] .icon-rule[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:8px;margin-bottom:3px;margin-right:8px;cursor:pointer}.loyalty[_ngcontent-%COMP%] .txt-rule[_ngcontent-%COMP%]{font-size:16px;font-weight:400;font-style:normal;font-stretch:normal;line-height:1.5;letter-spacing:normal;text-align:right;color:#ff9800}.loyalty[_ngcontent-%COMP%] .point-info[_ngcontent-%COMP%]{width:496px;position:relative;margin:auto}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%]{position:relative;margin-top:24px;border-radius:5px;width:100%;background-color:#fff;justify-content:center}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%]{display:flex;justify-content:center;padding-top:25px;border-bottom:1px solid rgba(105,105,105,.14)}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button[_ngcontent-%COMP%]{cursor:pointer;font-size:16px;line-height:19px;text-align:center;padding-bottom:21px;color:#c5ccd6;outline:0;width:50%}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.search[_ngcontent-%COMP%]{text-align:right}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.search[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0 54px 20px}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.detail[_ngcontent-%COMP%]{text-align:left}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.detail[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0 70px 20px}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.active[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100%;border-bottom:2px solid #7b35bb;color:#42236a;font-weight:500}@media only screen and (max-width:575px){.loyalty[_ngcontent-%COMP%] .point-info[_ngcontent-%COMP%]{width:100%}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.search[_ngcontent-%COMP%]{text-align:center}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.search[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0 10px 20px}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.detail[_ngcontent-%COMP%]{text-align:center}.loyalty[_ngcontent-%COMP%] .gift-info[_ngcontent-%COMP%] .tab-section[_ngcontent-%COMP%] .nav-tab-button.detail[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0 26px 20px}}"]],data:{}});function nt(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"div",[],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"list-gift-card",[],null,[[null,"clickItem"]],(function(n,t,l){var e=!0;return"clickItem"===t&&(e=!1!==n.component.handleSelectedGift(l)&&e),e}),I,v)),e.qb(2,114688,null,0,x,[y.a,c.j,b.e],{startData:[0,"startData"]},{clickItem:"clickItem"})],(function(n,t){n(t,2,0,t.component.originTransferData)}),null)}function tt(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"div",[],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"history-exchange-gift",[],null,null,null,V,R)),e.qb(2,114688,null,0,z,[y.a,c.j],null,null)],(function(n,t){n(t,2,0)}),null)}function lt(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,23,"div",[["class","loyalty show-header-button"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,5,"app-header-button",[],null,null,null,$.b,$.a)),e.qb(2,114688,null,0,K.a,[],null,null),(n()(),e.rb(3,0,null,0,2,"a",[["class","txt-rule"],["target","_blank"]],[[8,"href",4]],null,null,null,null)),(n()(),e.Lb(4,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(6,0,null,0,0,"img",[["alt",""],["class","icon-rule"],["src","assets/icons/icons-question-fill.svg"]],null,null,null,null,null)),(n()(),e.rb(7,0,null,null,2,"div",[["class","point-info"]],null,null,null,null,null)),(n()(),e.rb(8,0,null,null,1,"point-card",[],null,null,null,nn,Z)),e.qb(9,114688,null,0,J,[c.j,y.a,W.a,Q],null,null),(n()(),e.rb(10,0,null,null,13,"div",[["class","gift-info"]],null,null,null,null,null)),(n()(),e.rb(11,0,null,null,8,"div",[["class","tab-section"]],null,null,null,null,null)),(n()(),e.rb(12,0,null,null,3,"div",[["class","nav-tab-button search"]],[[2,"active",null]],[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onShowHistoryExchangeGift(!1)&&e),e}),null,null)),(n()(),e.rb(13,0,null,null,2,"span",[],null,null,null,null,null)),(n()(),e.Lb(14,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.rb(16,0,null,null,3,"div",[["class","nav-tab-button detail"]],[[2,"active",null]],[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.onShowHistoryExchangeGift(!0)&&e),e}),null,null)),(n()(),e.rb(17,0,null,null,2,"span",[],null,null,null,null,null)),(n()(),e.Lb(18,null,["",""])),e.Fb(131072,c.i,[c.j,e.h]),(n()(),e.gb(16777216,null,null,1,null,nt)),e.qb(21,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null),(n()(),e.gb(16777216,null,null,1,null,tt)),e.qb(23,16384,null,0,a.n,[e.N,e.K],{ngIf:[0,"ngIf"]},null)],(function(n,t){var l=t.component;n(t,2,0),n(t,9,0),n(t,21,0,!l.isShowHistoryExchangeGift),n(t,23,0,l.isShowHistoryExchangeGift)}),(function(n,t){var l=t.component;n(t,3,0,e.vb(1,"",l.policyUrl,"")),n(t,4,0,e.Mb(t,4,0,e.Db(t,5).transform("loyalty.home_rule"))),n(t,12,0,!l.isShowHistoryExchangeGift),n(t,14,0,e.Mb(t,14,0,e.Db(t,15).transform("loyalty.home.list_exchange_tab_title"))),n(t,16,0,l.isShowHistoryExchangeGift),n(t,18,0,e.Mb(t,18,0,e.Db(t,19).transform("loyalty.home.history_exchange_tab_title")))}))}function et(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,2,"div",[],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"app-gift-detail",[],null,[[null,"backHomePage"]],(function(n,t,l){var e=!0;return"backHomePage"===t&&(e=!1!==n.component.handleBackPage(l)&&e),e}),Yn,Rn)),e.qb(2,114688,null,0,zn,[y.a,Q,W.a],{selectedGiftCode:[0,"selectedGiftCode"]},{backHomePage:"backHomePage"})],(function(n,t){n(t,2,0,t.component.originTransferData.giftCode)}),null)}function it(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,5,"div",[],null,null,null,null,null)),e.qb(1,16384,null,0,a.r,[],{ngSwitch:[0,"ngSwitch"]},null),(n()(),e.gb(16777216,null,null,1,null,lt)),e.qb(3,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),e.gb(16777216,null,null,1,null,et)),e.qb(5,278528,null,0,a.s,[e.N,e.K,a.r],{ngSwitchCase:[0,"ngSwitchCase"]},null)],(function(n,t){var l=t.component;n(t,1,0,l.currentPage),n(t,3,0,l.PAGE.HOME_PAGE),n(t,5,0,l.PAGE.DETAIL_PAGE)}),null)}function ot(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,1,"app-loyalty",[],null,null,null,it,Zn)),e.qb(1,114688,null,0,Qn,[y.a],null,null)],(function(n,t){n(t,1,0)}),null)}var at=e.nb("app-loyalty",Qn,ot,{},{},[]),ct=l("t68o"),ut=l("zbXB"),rt=l("QQfA"),st=l("IP0z"),gt=l("s6ns"),ht=l("POq0"),dt=l("821u"),pt=l("Xd0L"),bt=l("/HVE"),ft=l("tE3g"),mt=l("IheW");class _t{}var Ct=l("cUpR"),Pt=l("Fwaw"),Ot=l("zMNK"),Mt=l("hOhj"),xt=l("5GAg"),yt=l("HsOI"),vt=l("oapL"),wt=l("ZwOa"),Dt=l("LSHg"),kt=l("PCNd");l.d(t,"LoyaltyModuleNgFactory",(function(){return St}));var St=e.ob(i,[],(function(n){return e.Ab([e.Bb(512,e.j,e.Z,[[8,[o.a,at,Jn,ct.a,ut.b,ut.a]],[3,e.j],e.v]),e.Bb(4608,a.p,a.o,[e.s,[2,a.G]]),e.Bb(4608,b.y,b.y,[]),e.Bb(4608,b.e,b.e,[]),e.Bb(4608,rt.a,rt.a,[rt.g,rt.c,e.j,rt.f,rt.d,e.p,e.x,a.d,st.b,[2,a.i]]),e.Bb(5120,rt.h,rt.i,[rt.a]),e.Bb(5120,gt.b,gt.c,[rt.a]),e.Bb(135680,gt.d,gt.d,[rt.a,e.p,[2,a.i],[2,gt.a],gt.b,[3,gt.d],rt.c]),e.Bb(4608,ht.b,ht.b,[]),e.Bb(4608,dt.i,dt.i,[]),e.Bb(5120,dt.a,dt.b,[rt.a]),e.Bb(4608,pt.b,pt.b,[]),e.Bb(4608,pt.a,pt.l,[[2,pt.e],bt.a]),e.Bb(5120,c.f,ft.b,[mt.c]),e.Bb(4608,c.c,c.e,[]),e.Bb(4608,c.h,c.d,[]),e.Bb(4608,c.b,c.a,[]),e.Bb(4608,c.j,c.j,[c.k,c.f,c.c,c.h,c.b,c.l,c.m]),e.Bb(1073742336,a.b,a.b,[]),e.Bb(1073742336,jn.q,jn.q,[[2,jn.v],[2,jn.m]]),e.Bb(1073742336,_t,_t,[]),e.Bb(1073742336,b.x,b.x,[]),e.Bb(1073742336,b.j,b.j,[]),e.Bb(1073742336,b.v,b.v,[]),e.Bb(1073742336,c.g,c.g,[]),e.Bb(1073742336,st.a,st.a,[]),e.Bb(1073742336,pt.h,pt.h,[[2,pt.c],[2,Ct.f]]),e.Bb(1073742336,bt.b,bt.b,[]),e.Bb(1073742336,pt.k,pt.k,[]),e.Bb(1073742336,Pt.c,Pt.c,[]),e.Bb(1073742336,Ot.f,Ot.f,[]),e.Bb(1073742336,Mt.b,Mt.b,[]),e.Bb(1073742336,rt.e,rt.e,[]),e.Bb(1073742336,gt.g,gt.g,[]),e.Bb(1073742336,ht.c,ht.c,[]),e.Bb(1073742336,xt.a,xt.a,[]),e.Bb(1073742336,dt.j,dt.j,[]),e.Bb(1073742336,yt.b,yt.b,[]),e.Bb(1073742336,vt.b,vt.b,[]),e.Bb(1073742336,wt.b,wt.b,[]),e.Bb(1073742336,pt.m,pt.m,[]),e.Bb(1073742336,pt.i,pt.i,[]),e.Bb(1073742336,Dt.a,Dt.a,[]),e.Bb(1073742336,kt.a,kt.a,[]),e.Bb(1073742336,ft.a,ft.a,[]),e.Bb(1073742336,i,i,[]),e.Bb(1024,jn.k,(function(){return[[{path:"",component:Qn,pathMatch:"full"},{path:":code",component:zn}]]}),[]),e.Bb(256,pt.d,pt.f,[]),e.Bb(256,c.m,void 0,[]),e.Bb(256,c.l,void 0,[])])}))},DqX5:function(n,t,l){"use strict";var e=l("8Y7J");l("nGrN"),l.d(t,"a",(function(){return i})),l.d(t,"b",(function(){return o}));var i=e.pb({encapsulation:0,styles:[[".show-header-button{position:relative} .show-header-button .button-right-header{position:absolute;top:-55px;right:0;color:#ff9800;font-size:16px;z-index:99;width:100%} .show-header-button .button-right-header:hover{color:#f58220} .show-header-button .button-right-header .content{display:flex;justify-content:flex-end;align-items:center;width:100%;max-width:800px} .show-header-button.top-40 .button-right-header{top:-95px}@media screen and (max-width:1129px) and (min-width:575px){ .show-header-button .button-right-header{top:-32px}}@media screen and (max-width:1439px) and (min-width:1130px){ .show-header-button .button-right-header{top:-43px} .show-header-button.top-40 .button-right-header{top:-83px}}@media screen and (max-width:832px){ .show-header-button .button-right-header{margin-right:32px} .show-header-button .button-right-header .content{width:100%;max-width:unset}}@media screen and (max-width:575px){ .show-header-button{padding-top:24px} .show-header-button .button-right-header{margin-left:32px;margin-right:0;top:-16px} .show-header-button .button-right-header .content{width:100%;max-width:unset;justify-content:flex-start;padding-bottom:16px;background:#ebebfa} .show-header-button.top-40 .button-right-header{top:-13px}.modal-guide[_ngcontent-%COMP%] .modal-guide-body[_ngcontent-%COMP%]{max-height:68vh;overflow-y:auto;padding-right:8px}}"]],data:{}});function o(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,3,"div",[["class","button-right-header"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,2,"div",[["class","content"]],null,null,null,null,null)),(n()(),e.rb(2,0,null,null,1,"div",[["style","cursor: pointer;"]],null,[[null,"click"]],(function(n,t,l){var e=!0;return"click"===t&&(e=!1!==n.component.clickButton.emit()&&e),e}),null,null)),e.Cb(null,0)],null,null)}},FFVN:function(n,t,l){"use strict";l.d(t,"a",(function(){return e}));class e{constructor(n){this.translateService=n,this.day="",this.date="",this.month="",this.year=""}ngOnChanges(){if(!this.dateInput)return;console.log(this.dateInput);const n=new Date(this.dateInput);console.log(n),this.year=n.getFullYear()+"",this.date=n.getDate()+"",this.day=this.translateDays(n.getDay()+1),this.month=this.translateService.instant("txt_ft_month")+" "+(n.getMonth()+1)}ngOnInit(){}translateDays(n){let t="";switch(n){case 1:t=this.translateService.instant("txt_ft_sunday");break;case 2:t=this.translateService.instant("txt_ft_monday");break;case 3:t=this.translateService.instant("txt_ft_tuesday");break;case 4:t=this.translateService.instant("txt_ft_wednesday");break;case 5:t=this.translateService.instant("txt_ft_thursday");break;case 6:t=this.translateService.instant("txt_ft_friday");break;case 7:t=this.translateService.instant("txt_ft_saturday")}return t}}},aafk:function(n,t,l){"use strict";var e=l("8Y7J");l("FFVN"),l("TSSN"),l.d(t,"a",(function(){return i})),l.d(t,"b",(function(){return o}));var i=e.pb({encapsulation:0,styles:[[".date-content[_ngcontent-%COMP%]{display:flex;align-items:center}.date-content[_ngcontent-%COMP%] .date-left[_ngcontent-%COMP%]{width:2.09em;height:2.09em;border-radius:5px;background-color:#f6f6fe;display:flex;align-items:center;justify-content:center;font-size:24px;line-height:17px;margin-right:10px}.date-content[_ngcontent-%COMP%] .date-right[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:4px 0;font-size:14px;line-height:16px}.date-content[_ngcontent-%COMP%] .date-right[_ngcontent-%COMP%] .day-bold[_ngcontent-%COMP%]{font-weight:500}"]],data:{}});function o(n){return e.Nb(0,[(n()(),e.rb(0,0,null,null,7,"div",[["class","date-content"]],null,null,null,null,null)),(n()(),e.rb(1,0,null,null,1,"div",[["class","date-left"]],null,null,null,null,null)),(n()(),e.Lb(2,null,["",""])),(n()(),e.rb(3,0,null,null,4,"div",[["class","date-right"]],null,null,null,null,null)),(n()(),e.rb(4,0,null,null,1,"p",[["class","day-bold"]],null,null,null,null,null)),(n()(),e.Lb(5,null,["",""])),(n()(),e.rb(6,0,null,null,1,"p",[],null,null,null,null,null)),(n()(),e.Lb(7,null,["","/",""]))],null,(function(n,t){var l=t.component;n(t,2,0,l.date),n(t,5,0,l.day),n(t,7,0,l.month,l.year)}))}},nGrN:function(n,t,l){"use strict";l.d(t,"a",(function(){return i}));var e=l("8Y7J");class i{constructor(){this.clickButton=new e.m}ngOnInit(){}}}}]);