1"use strict";(self.webpackChunktv3=self.webpackChunktv3||[]).push([[6761],{86761:(jo,ve,l)=>{l.r(ve),l.d(ve,{ReviewsModule:()=>Yo});var T=l(36362),V=l(52816),I=l(63904),N=l(43740),r=l(12933),re=l(27541),p=l(92938),Tt=l(92218),Pe=l(19193),k=l(86942),q=l(80823),Oe=l(88759),z=l(59095),se=l(36857),B=l(42321),Ct=l(6322),Ee=l(44661),A=l(90587),e=l(3184),Ve=l(95758);let he=(()=>{class i{constructor(t){this.dialogRef=t}ngOnInit(){}close(){this.dialogRef.close()}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(Ve.so))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-reviews-dialog"]],hostAttrs:[1,"modal-content"],decls:13,vars:5,consts:function(){let o;return o="Reviews",[[1,"modal-header"],[1,"modal-title"],o,["type","button","aria-label","Close",1,"close",3,"click"],[1,"far","fa-times"],[1,"modal-body","mt-0","mb-3","p-0","bg-none"],[1,"d-flex"],[1,"flex-fill"],[1,"my-3",3,"filtersChange"],["filtersComponent",""],["title","Reviews",3,"filters","pager","showHeader","repliable","canSeeReply"],["reviews",""]]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"h5",1),e.\u0275\u0275i18n(2,2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"button",3),e.\u0275\u0275listener("click",function(){return n.close()}),e.\u0275\u0275elementStart(4,"span"),e.\u0275\u0275element(5,"i",4),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(6,"div",5)(7,"div",6),e.\u0275\u0275element(8,"div",7),e.\u0275\u0275elementStart(9,"app-reviews-filters",8,9),e.\u0275\u0275listener("filtersChange",function(a){return n.filters=a}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(11,"app-recent-reviews",10,11),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275advance(11),e.\u0275\u0275property("filters",n.filters)("pager",!0)("showHeader",!1)("repliable",!0)("canSeeReply",!0))},styles:[""]}),i})();var ce=l(61208),H=l(95841),ee=l(10486),te=l(45526),Me=l(43365),At=l(11307),h=l(80767),be=l(44770),de=l(8461),ut=l(43416),ne=l(72125),ie=l(43106),F=l(40032),It=l(41666),Se=l(2182),we=l(18290);function ft(i,o){}const pe=function(i){return{review:i}};function Nt(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275template(1,ft,0,0,"ng-template",8),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(6);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngTemplateOutlet",n)("ngTemplateOutletContext",e.\u0275\u0275pureFunction1(2,pe,t))}}function vt(i,o){1&i&&e.\u0275\u0275element(0,"app-loading-section")}function Pt(i,o){if(1&i&&e.\u0275\u0275element(0,"app-empty-table",12),2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("type",t.emptyType)}}function Ot(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",13)(1,"a",14),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).onLoadMore()}),e.\u0275\u0275elementContainerStart(2),e.\u0275\u0275i18n(3,15),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()()}if(2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" (",t.totalCount-t.reviews.length,")")}}function Vt(i,o){if(1&i&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,vt,1,0,"app-loading-section",9),e.\u0275\u0275template(2,Pt,1,1,"app-empty-table",10),e.\u0275\u0275template(3,Ot,5,1,"div",11),e.\u0275\u0275elementContainerEnd()),2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(t.isLoading||null!=t.reviews&&t.reviews.length)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.isLoading&&t.totalCount>t.reviews.length)}}function ht(i,o){1&i&&e.\u0275\u0275element(0,"app-loading-section",18)}function Mt(i,o){if(1&i&&e.\u0275\u0275element(0,"app-empty-table",12),2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("type",t.emptyType)}}const bt=function(){return[10,20,50]};function wt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-paginator2",19,20),e.\u0275\u0275listener("page",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).onPageChange(_)}),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("length",t.totalCount)("pageSize",10)("pageSizeOptions",e.\u0275\u0275pureFunction0(4,bt))("showFirstLastButtons",!0)}}function yt(i,o){if(1&i&&(e.\u0275\u0275template(0,ht,1,0,"app-loading-section",16),e.\u0275\u0275template(1,Mt,1,1,"app-empty-table",10),e.\u0275\u0275template(2,wt,2,5,"mat-paginator2",17)),2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("ngIf",t.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null!=t.reviews&&t.reviews.length)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.totalCount>0)}}function Wt(i,o){}function $t(i,o){}function Lt(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",23),e.\u0275\u0275template(1,$t,0,0,"ng-template",8),e.\u0275\u0275elementEnd()),2&i){const t=e.\u0275\u0275nextContext().review;e.\u0275\u0275nextContext();const n=e.\u0275\u0275reference(10);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngTemplateOutlet",n)("ngTemplateOutletContext",e.\u0275\u0275pureFunction1(2,pe,t))}}function xt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-form-field2",24),e.\u0275\u0275element(1,"textarea",25),e.\u0275\u0275elementStart(2,"button",26),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().review,a=e.\u0275\u0275nextContext();return a.onReply(a.replyCtrl,_)}),e.\u0275\u0275element(3,"i",27),e.\u0275\u0275text(4," Send "),e.\u0275\u0275elementEnd()()}if(2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("showLabel",!1),e.\u0275\u0275advance(1),e.\u0275\u0275property("formControl",t.replyCtrl),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",t.replyCtrl.invali
1d)}}function Dt(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,Wt,0,0,"ng-template",8),e.\u0275\u0275template(2,Lt,2,4,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,xt,5,3,"mat-form-field2",22)),2&i){const t=o.review,n=e.\u0275\u0275nextContext(),_=e.\u0275\u0275reference(8);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngTemplateOutlet",_)("ngTemplateOutletContext",e.\u0275\u0275pureFunction1(4,pe,t)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.canSeeReply&&t.response&&!n.collapsedReviewIds.has(t.reviewId)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.isReplyingReviewId===t.reviewId)}}function Gt(i,o){if(1&i&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"hr"),e.\u0275\u0275elementStart(2,"div")(3,"span",40),e.\u0275\u0275elementContainerStart(4),e.\u0275\u0275i18n(5,41),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275text(6,":"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&i){const t=e.\u0275\u0275nextContext().review;e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1(" ",t.privateFeedback," ")}}function Bt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",46),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext(2).review;return e.\u0275\u0275nextContext().isReplyingReviewId=_.reviewId}),e.\u0275\u0275element(1,"i",47),e.\u0275\u0275elementContainerStart(2),e.\u0275\u0275i18n(3,48),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}}function Xt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",49),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext(2).review;return e.\u0275\u0275nextContext().onCollapseReview(_)}),e.\u0275\u0275element(1,"i",50),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext(2).review,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",n.collapsedReviewIds.has(t.reviewId)?"fa-angle-down":"fa-angle-up"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.collapsedReviewIds.has(t.reviewId)?"View Review":"Hide Review"," ")}}function kt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",51),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(3).isReplyingReviewId=null}),e.\u0275\u0275i18n(1,52),e.\u0275\u0275elementEnd()}}function zt(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",42),e.\u0275\u0275template(1,Bt,4,0,"a",43),e.\u0275\u0275pipe(2,"call"),e.\u0275\u0275template(3,Xt,3,2,"a",44),e.\u0275\u0275template(4,kt,2,0,"a",45),e.\u0275\u0275elementEnd()),2&i){const t=e.\u0275\u0275nextContext().review,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.repliable&&n.isReplyingReviewId!=t.reviewId&&e.\u0275\u0275pipeBind2(2,3,n.canReply,t)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",n.canSeeReply&&t.response),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.isReplyingReviewId===t.reviewId)}}function Ht(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",28)(1,"div",29)(2,"div",30),e.\u0275\u0275element(3,"app-rental-image",31)(4,"app-avatar",32),e.\u0275\u0275pipe(5,"channelIcon"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",33)(7,"div",34)(8,"div",35),e.\u0275\u0275element(9,"app-rental-name",36),e.\u0275\u0275elementStart(10,"div",37),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"epoch"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(13,"app-rating",38),e.\u0275\u0275pipe(14,"call"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"div"),e.\u0275\u0275text(16),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(17,Gt,8,1,"ng-container",9),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(18,zt,5,6,"div",39),e.\u0275\u0275elementEnd()),2&i){const t=o.review,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275property("rentalId",t.rentalId)("size",40)("circle",!0)("clickable",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("text",t.source)("image",e.\u0275\u0275pipeBind1(5,18,t.source))("border",1)("size",20),e.\u0275\u0275advance(5),e.\u0275\u0275property("rentalId",t.rentalId)("clickable",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",n.repliable||n.canSeeReply?"ml-2":"ml-auto"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(12,20,t.submittedAt)," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("maxRating",e.\u0275\u0275pipeBind2(14,22,n.getMaxRating,t))("rating",t.channelOverallRating)("showLevelColor",!0),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",t.text," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!!t.privateFeedback),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.repliable||n.canSeeReply)}}function Ft(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",53),e.\u0275\u0275element(1,"app-avatar",54),e.\u0275\u0275elementStart(2,"div",55)(3,"div",35)(4,"div",56),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"titleCase"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",57),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"epoch"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div"),e.\u0275\u0275text(11),e.\u0275\u0275elementEnd()()()),2&i){const t=o.review;e.\u0275\u0275advance(1),e.\u0275\u0275property("text",t.reviewee.name||t.reviewee.role||"Unknown")("size",24),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(6,5,t.reviewee.name||t.reviewee.role||"Unknown")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(9,7,t.response.respondedAt)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",null==t.response?null:t.response.text," ")}}class x extends r.VZT{constructor(o,t,n,_){super(),this.store=o,this.toaster=t,this.reviewService=n,this.dialog=_,this.title="Latest Reviews",this.pager=!1,this.showHeader=!0,this.canSeeReply=!1,this.repliable=!1,this.isLoading=!0,this.reviews=[],this.totalCount=0,this.limit=10,this.pageIndex=1,this.emptyType=Ct.N.Reviews,this.rentalsById={},this.currentEpoch=Date.now()/1e3,this.collapsedReviewIds=new Set,this.replyCtrl=new A.NI("",[A.kI.required])}get mergeReviews(){return!this.pager}get isAllCollapsed(){return this.collapsedReviewIds.size===this.reviews.length}ngOnInit(){this.store.pipe((0,I.Ys)(r.jqr),(0,r.sNL)(this)).subscribe(o=>{this.rentalsById=o})}ngOnChanges(o){var t;(null===(t=o.filters)||void 0===t?void 0:t.currentValue)&&(this.reviews=[],this.pageIndex=1,this.refresh())}getMaxRating(o){return(0,N.P5)(o.source)}onToggleCollapseAll(){this.isAllCollapsed?this.collapsedReviewIds.clear():this.collapsedReviewIds=new Set(this.reviews.map(o=>o.reviewId))}onCollapseReview(o){this.collapsedReviewIds.has(o.reviewId)?this.collapsedReviewIds.delete(o.reviewId):this.collapsedReviewIds.add(o.reviewId)}refresh(){this.isLoading=!0,(0,Pe.aj)([this.reviewService.searchReviews(Object.assign(Object.assign({},this.filters),{includeStats:!1,page:this.pageIndex,limit:this.limit}))]).pipe((0,Ee.x)(()=>this.isLoading=!1)).subscribe(([o])=>{var t;this.reviews=p.sortBy(this.mergeReviews?p.uniqBy([...o.reviews,...this.reviews],n=>n.reviewId):o.reviews,n=>n.submittedAt).reverse(),this.totalCount=(null===(t=null==o?void 0:o.counts)||void 0===t?void 0:t.total)||0},o=>{this.store.dispatch((0,r.pix)({error:o}))})}onLoadMore(){this.pageIndex=this.pageIndex+1,this.refresh()}onPageChange(o){this.pageIndex=o.pageIndex+1,this.limit=o.pageSize,this.refresh()}onAllReviews(){this.dialog.openVariableDialog(he,{width:"80%",height:"auto"})}getProperty(o,t){return p.find(o,n=>n.roomId===t)}canReply(o){var t;return"host"!=(null===(t=o.reviewer)||void 0===t?void 0:t.role)&&!o.response&&o.isEligibleForResponse}onReply(o,t){const n=p.trim(o.value);!n||this.reviewService.respondReview(t._id,n).pipe((0,z.w)(_=>this.reviewService.getReview(t._id))).subscribe(_=>{this.reviews=p.map(this.reviews,a=>a.reviewId===_.reviewId?_:a),this.toaster.success("Review replied successfully"),this.isReplyingReviewId=null,this.replyCtrl.reset()},_=>{this.store.dispatch((0,r.pix)({error:_}))})}}x.\u0275fac=function(o){return new(o||x)(e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(r.x7r),e.\u0275\u0275directiveInject(N.Fn),e.\u0275\u0275directiveInject(r.xAy))},x.\u0275cmp=e.\u0275\u0275defineComponent({type:x,selectors:[["app-recent-reviews"]],inputs:{title:"title",pager:"pager",showHeader:"showHeader",canSeeReply:"canSeeReply",repliable:"repliable",filters:"filters"},features:[e.\u0275\u0275InheritDefinitionFeature,e.\u0275\u0275NgOnChangesFeature],decls:11,vars:3,consts:function(){let i,o,t,n,_;return i="Load More",o="Write your response here...",t="Private Feedback",n="Add Review",_="Close",[[1,""],["class","border-bottom review-item",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["pagerTmpl",""],["reviewItem",""],["reviewContent",""],["reviewResponse",""],[1,"border-bottom","review-item"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[3,"type",4,"ngIf"],["class","p-3 text-center",4,"ngIf"],[3,"type"],[1,"p-3","text-center"],["href","javascript:;",3,"click"],i,["class","position-absolute","style","top: 0; bottom: 0; right: 0; left: 0",4,"ngIf"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",4,"ngIf"],[1,"position-absolute",2,"top","0","bottom","0","right","0","left","0"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["paginator",""],["class","review-reply border-top",4,"ngIf"],["class","m-3 ml-5",3,"showLabel",4,"ngIf"],[1,"review-reply","border-top"],[1,"m-3","ml-5",3,"showLabel"],["matInput","","placeholder",o,"cdkTextareaAutosize","",3,"formControl"],["matSuffix","","type","button",1,"btn","btn-secondary-info",2,"margin-right","-0.75rem",3,"disabled","click"],[1,"cs-icon","cs-icon-send"],[1,"d-flex","align-items-center"],[1,"d-flex","p-3","pr-0","flex-fill"],[1,"position-relative"],[3,"rentalId","size","circle","clickable"],["backgroundColor","white","borderColor","#D4DFE3",1,"position-absolute",2,"padding","3px","right","-10px","top","1rem",3,"text","image","border","size"],[1,"ml-3","flex-fill"],[1,"text-bold"],[1,"d-flex"],[3,"rentalId","clickable"],[1,"text-light","text-normal-bold",3,"ngClass"],[3,"maxRating","rating","showLevelColor"],["class","mr-3 text-nowrap",4,"ngIf"],[1,"text-semi-bold"],t,[1,"mr-3","text-nowrap"],["href","javascript:;","class","text-sm text-info",3,"click",4,"ngIf"],["href","javascript:;","class","text-sm text-primary",3,"click",4,"ngIf"],["href","javascript:;","class","text-danger text-semi-bold text-sm",3,"click",4,"ngIf"],["href","javascript:;",1,"text-sm","text-info",3,"click"],[1,"far","fa-plus"],n,["href","javascript:;",1,"text-sm","text-primary",3,"click"],[1,"far",3,"ngClass"],["href","javascript:;",1,"text-danger","text-semi-bold","text-sm",3,"click"],_,[1,"d-flex","p-3","pl-5"],[1,"rental-avatar",3,"text","size"],[1,"ml-3"],[1,"text-info","text-bold"],[1,"ml-2","text-light"]]},template:function(o,t){if(1&o&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,Nt,2,4,"div",1),e.\u0275\u0275template(2,Vt,4,3,"ng-container",2),e.\u0275\u0275template(3,yt,3,3,"ng-template",null,3,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(5,Dt,4,6,"ng-template",null,4,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(7,Ht,19,25,"ng-template",null,5,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(9,Ft,12,9,"ng-template",null,6,e.\u0275\u0275templateRefExtractor)),2&o){const n=e.\u0275\u0275reference(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",t.reviews),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.pager)("ngIfElse",n)}},directives:[T.NgForOf,T.NgTemplateOutlet,T.NgIf,ce.Q,H.T,ee.o,te.J,Me.Nt,At.IC,A.Fj,A.JJ,A.oH,h.bc,h.YE,be.R9,de.H,ut.A,ne.n,T.NgClass,ie.A],pipes:[F.a,It.Y,Se.l,we.r],styles:['.text-primary[_ngcontent-%COMP%]{color:#12a398!important}.text-secondary[_ngcontent-%COMP%]{color:#7e9da6!important}.text-small[_ngcontent-%COMP%]{font-size:.8rem}.review-item[_ngcontent-%COMP%]:last-child{border-bottom:none!important}.review-reply[_ngcontent-%COMP%]{position:relative;background-color:#f7fdfd}.review-reply[_ngcontent-%COMP%]:before{content:"";position:absolute;right:70px;top:-10px;width:0;height:0;border-style:solid;border-width:0 10px 10px 10px;border-color:transparent transparent #f7fdfd transparent;z-index:2}.review-reply[_ngcontent-%COMP%]:after{content:"";position:absolute;right:69px;top:-11px;width:0;height:0;border-style:solid;border-width:0 11px 11px;border-color:transparent transparent #dee2e6 transparent;z-index:1}']}),(0,B.gn)([(0,r.CIN)(),(0,B.w6)("design:type",Function),(0,B.w6)("design:paramtypes",[A.NI,Object]),(0,B.w6)("design:returntype",void 0)],x.prototype,"onReply",null);var Yt=l(25765),jt=l(64086),oe=l(11371),X=l(69715),_e=l(25722),M=l(97281),ae=l(52881),Re=l(80182),ye=l(62769),We=l(59964),me=l(93035),ge=l(33
1095);function Kt(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ul",8),e.\u0275\u0275listener("click",function(_){return _.stopPropagation()}),e.\u0275\u0275elementStart(1,"li")(2,"app-rental-select",9),e.\u0275\u0275listener("openedChange",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().autoCloseDropdownFilters=!_}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"li")(4,"app-select-search",10),e.\u0275\u0275listener("openedChange",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().autoCloseDropdownFilters=!_}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"li")(6,"app-select-search",11),e.\u0275\u0275listener("openedChange",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().autoCloseDropdownFilters=!_}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"li")(8,"app-select-search",12),e.\u0275\u0275listener("openedChange",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().autoCloseDropdownFilters=!_}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"li")(10,"app-select-search",13),e.\u0275\u0275listener("openedChange",function(_){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().autoCloseDropdownFilters=!_}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"li")(12,"mat-form-field2",14),e.\u0275\u0275element(13,"app-mat-daterange-input",15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"li")(15,"app-form-switch",16),e.\u0275\u0275i18n(16,17),e.\u0275\u0275elementEnd()()()}if(2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("showCloseButton",!0)("ctrl",t.form.get("rentals")),e.\u0275\u0275advance(2),e.\u0275\u0275property("inline",!1)("showCloseButton",!0)("items",t.sourceOptions)("ctrl",t.form.get("sources")),e.\u0275\u0275advance(2),e.\u0275\u0275property("inline",!1)("multiple",!1)("showCloseButton",!0)("hasBlank",!0)("items",t.reviewerRolesOptions)("ctrl",t.form.get("reviewerRole")),e.\u0275\u0275advance(2),e.\u0275\u0275property("inline",!1)("multiple",!1)("showCloseButton",!0)("hasBlank",!0)("items",t.ratingCategoryOptions)("ctrl",t.form.get("category")),e.\u0275\u0275advance(2),e.\u0275\u0275property("inline",!1)("showCloseButton",!0)("items",t.ratingValueOptions)("ctrl",t.form.get("ratings")),e.\u0275\u0275advance(3),e.\u0275\u0275property("formControl",t.form.get("submitted")),e.\u0275\u0275advance(2),e.\u0275\u0275property("formControl",t.form.get("includeDeletedInquiries"))}}const Qt=function(){return["includeDeletedInquiries"]};let $e=(()=>{class i extends r.VZT{constructor(t,n,_){super(),this.store=t,this.fb=n,this.reviewService=_,this.filtersChange=new e.EventEmitter,this.refresh=new e.EventEmitter,this.sourceOptions=N.l1,this.form=this.fb.group({sources:[[]],rentals:[[]],submitted:[],includeDeletedInquiries:[!1],responded:[],category:[],ratings:[[]],reviewerRole:[]}),this.rentals$=this.store.pipe((0,I.Ys)(r.z8T)),this.autoCloseDropdownFilters=!0,this.ratingCategoryOptions=[],this.ratingValueOptions=[5,4,3,2,1].map(a=>({value:a,name:1===a?`${a} Star`:`${a} Stars`})),this.reviewerRolesOptions=[{value:"host",name:"Host"},{value:"guest",name:"Guest"}]}ngOnInit(){this.loadRatingCategories(),this.form.valueChanges.pipe((0,_e.O)(this.form.getRawValue()),(0,q.b)(1e3),(0,k.U)(t=>{var{submitted:n,category:_,ratings:a}=t,s=(0,B._T)(t,["submitted","category","ratings"]);const c=Object.assign(Object.assign({},s),{submittedAfter:null==n?void 0:n.from,submittedBefore:null==n?void 0:n.to});_&&(0,r.JG8)(a)?c.categoryRating={category:_,ratings:a}:(0,r.JG8)(a)&&(c.overallRating=a);const R=p.fromPairs(p.toPairs(c).filter(([S,d])=>!(p.isNil(d)||p.isArray(d)&&!d.length)));return Object.assign({},R)}),(0,Oe.b)(t=>{this.filtersChange.emit(t)}),(0,r.sNL)(this)).subscribe()}ngOnChanges(t){t.source&&this.form.patchValue({sources:this.source?[this.source]:[]})}onRefresh(){this.refresh.emit()}onReplied(t){const n=this.form.get("isReplied");n.value===t?n.reset():n.setValue(t)}
1loadRatingCategories(){this.reviewService.getRatingCategories().pipe((0,r.sNL)(this)).subscribe(t=>{this.ratingCategoryOptions=p.sortBy(t,n=>{var _;return(null===(_=n.name)||void 0===_?void 0:_.toLowerCase())||n.name||""})})}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(A.qu),e.\u0275\u0275directiveInject(N.Fn))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-reviews-filters"]],inputs:{source:"source"},outputs:{filtersChange:"filtersChange",refresh:"refresh"},features:[e.\u0275\u0275InheritDefinitionFeature,e.\u0275\u0275NgOnChangesFeature],decls:11,vars:11,consts:function(){let o,t,n,_,a,s,c,R,S,d;return o="Filters",t="Refresh List",n="Rental",_="Channel",a="Review by",s="Category",c="Ratings",R="Date Range",S="Include reviews for deleted bookings",d="Include Deleted Bookings",[["dropdown","",1,"btn-group","dropdown-filters",3,"autoClose"],["type","button","dropdownToggle","",1,"btn","btn-secondary-primary","dropdown-toggle"],[1,"fal","fa-filter"],o,["class","dropdown-menu dropdown-menu-right","style","width: 300px",3,"click",4,"dropdownMenu"],[3,"isFiltering","filterControl"],["matTooltip",t,"matTooltipPosition","above",1,"btn","btn-secondary-primary",3,"click"],[1,"far","fa-sync"],[1,"dropdown-menu","dropdown-menu-right",2,"width","300px",3,"click"],["placeholder",n,1,"w-auto",3,"showCloseButton","ctrl","openedChange"],["bindValue","value","bindLabel","name","placeholder",_,1,"w-auto",3,"inline","showCloseButton","items","ctrl","openedChange"],["blankLabel","All","bindValue","value","bindLabel","name","placeholder",a,1,"w-auto",3,"inline","multiple","showCloseButton","hasBlank","items","ctrl","openedChange"],["blankLabel","All","bindValue","value","bindLabel","name","placeholder",s,1,"w-auto",3,"inline","multiple","showCloseButton","hasBlank","items","ctrl","openedChange"],["bindValue","value","bindLabel","name","placeholder",c,1,"w-auto",3,"inline","showCloseButton","items","ctrl","openedChange"],[1,"mat-block"],["placeholder",R,3,"formControl"],["matTooltip",S,3,"formControl"],d]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"button",1),e.\u0275\u0275pipe(2,"isFiltering"),e.\u0275\u0275element(3,"span",2),e.\u0275\u0275elementContainerStart(4),e.\u0275\u0275i18n(5,3),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(6,Kt,17,24,"ul",4),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(7,"app-cancel-filters",5),e.\u0275\u0275pipe(8,"isFiltering"),e.\u0275\u0275elementStart(9,"button",6),e.\u0275\u0275listener("click",function(){return n.onRefresh()}),e.\u0275\u0275element(10,"i",7),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275property("autoClose",n.autoCloseDropdownFilters),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("btn-filters-active",e.\u0275\u0275pipeBind2(2,5,n.form,e.\u0275\u0275pureFunction0(10,Qt))),e.\u0275\u0275advance(6),e.\u0275\u0275property("isFiltering",e.\u0275\u0275pipeBind1(8,8,n.form))("filterControl",n.form))},directives:[M.TO,M.Mq,M.Hz,ae.m,Re.h,te.J,ye.d,A.JJ,A.oH,h.bc,h.YE,We.M,X.gM,me.V],pipes:[ge.b],styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:1rem}"]}),i})();var Y=l(56908);let Ut=(()=>{class i{constructor(){this.sourceChange=new e.EventEmitter,this.sources=N.H_,this.channelNames=r.Dtc}get lastXDays(){var t,n;const _=null===(t=this.filters)||void 0===t?void 0:t.submittedAfter,a=null===(n=this.filters)||void 0===n?void 0:n.submittedBefore;return _&&a?`in ${Y(1e3*a).diff(1e3*_,"day")+1} days`:""}get totalAvarageRating(){var t,n;const _=Object.keys((null===(t=this.data)||void 0===t?void 0:t.averageRating)||{}).length;return _?p.sumBy(p.values(null===(n=this.data)||void 0===n?void 0:n.averageRating),a=>a.averageRating||0)/_:0}ngOnInit(){}onChangeSource(t){this.source=t,this.sourceChange.emit(t)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-reviews-stats"]],inputs:{data:"data",filters:"filters"},outputs:{sourceChange:"sourceChange"},decls:50,vars:32,consts:function(){let o,t,n,_;return o="Reviews",t="Reviews",n="Reviews",_="Reviews",[[1,"container-box","shadow"],["alt","",1,"channel-icon",3,"src"],[1,"stats-info"],[1,"count"],o,t,n,_]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"ul")(2,"li")(3,"div")(4,"div"),e.\u0275\u0275element(5,"img",1),e.\u0275\u0275pipe(6,"channelIcon"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",2),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"number"),e.\u0275\u0275elementStart(10,"div",3),e.\u0275\u0275text(11),e.\u0275\u0275elementContainerStart(12),e.\u0275\u0275i18
1n(13,4),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(14,"li")(15,"div")(16,"div"),e.\u0275\u0275element(17,"img",1),e.\u0275\u0275pipe(18,"channelIcon"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(19,"div",2),e.\u0275\u0275text(20),e.\u0275\u0275pipe(21,"number"),e.\u0275\u0275elementStart(22,"div",3),e.\u0275\u0275text(23),e.\u0275\u0275elementContainerStart(24),e.\u0275\u0275i18n(25,5),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(26,"li")(27,"div")(28,"div"),e.\u0275\u0275element(29,"img",1),e.\u0275\u0275pipe(30,"channelIcon"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(31,"div",2),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"number"),e.\u0275\u0275elementStart(34,"div",3),e.\u0275\u0275text(35),e.\u0275\u0275elementContainerStart(36),e.\u0275\u0275i18n(37,6),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(38,"li")(39,"div")(40,"div"),e.\u0275\u0275element(41,"img",1),e.\u0275\u0275pipe(42,"channelIcon"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(43,"div",2),e.\u0275\u0275text(44),e.\u0275\u0275pipe(45,"number"),e.\u0275\u0275elementStart(46,"div",3),e.\u0275\u0275text(47),e.\u0275\u0275elementContainerStart(48),e.\u0275\u0275i18n(49,7),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()()()()),2&t&&(e.\u0275\u0275advance(5),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind1(6,12,n.channelNames.AirBnBV2API),e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(9,14,(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Airbnb]?null:n.data.averageRating[n.sources.Airbnb].channelAverageRating)||0,"0.1-2")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Airbnb]?null:n.data.averageRating[n.sources.Airbnb].reviewsCount)||0," "),e.\u0275\u0275advance(6),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind1(18,17,n.channelNames.BookingAPI),e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(21,19,(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.BookingCom]?null:n.data.averageRating[n.sources.BookingCom].channelAverageRating)||0,"0.1-2")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.BookingCom]?null:n.data.averageRating[n.sources.BookingCom].reviewsCount)||0," "),e.\u0275\u0275advance(6),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind1(30,22,n.channelNames.ExpediaAPI),e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(33,24,(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Expedia]?null:n.data.averageRating[n.sources.Expedia].channelAverageRating)||0,"0.1-2")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Expedia]?null:n.data.averageRating[n.sources.Expedia].reviewsCount)||0," "),e.\u0275\u0275advance(6),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind1(42,27,n.channelNames.Homeaway),e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(45,29,(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Vrbo]?null:n.data.averageRating[n.sources.Vrbo].channelAverageRating)||0,"0.1-2")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",(null==n.data||null==n.data.averageRating||null==n.data.averageRating[n.sources.Vrbo]?null:n.data.averageRating[n.sources.Vrbo].reviewsCount)||0," "))},pipes:[F.a,T.DecimalPipe],styles:["ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;gap:1rem;overflow-x:auto;overflow-y:hidden}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:1rem;align-items:center}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px}
1ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .stats-info[_ngcontent-%COMP%]{font-weight:600;color:#4f4f4f;margin-left:.5rem;font-size:1.5rem}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .stats-info[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{color:#878a99;font-size:.8rem;font-weight:400;white-space:nowrap}"]}),i})();var Jt=l(37942),Zt=l(51719),qt=l.n(Zt);function en(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",8),e.\u0275\u0275element(1,"app-rating",9),e.\u0275\u0275elementStart(2,"div",2)(3,"div",1),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",4),e.\u0275\u0275text(6),e.\u0275\u0275elementContainerStart(7),e.\u0275\u0275i18n(8,10),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("rating",t.value)("showLevelColor",!0),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(t.label),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("",n.getLevelCount(n.item,t.range)," ")}}l(22057);let tn=(()=>{class i{constructor(){this.ratingCategories=[{label:"0 - 1.9",range:"0-1.9",value:1},{label:"2 - 2.9",range:"2-2.9",value:2},{label:"3 - 3.9",range:"3-3.9",value:3},{label:"4 - 4.4",range:"4-4.4",value:4},{label:"4.5 - 4.7",range:"4.5-4.7",value:4.5},{label:"4.8 - 5",range:"4.8-5",value:5}].reverse()}ngOnInit(){}getTotalCount(t){return p.sumBy(null==t?void 0:t.ratings,n=>n.count)}getLevelCount(t,n){var _;return(null===(_=p.find(null==t?void 0:t.ratings,a=>a.range===n))||void 0===_?void 0:_.count)||0}isRatingDown(){var t,n;const _=(null===(t=this.item)||void 0===t?void 0:t.averageOverallRating)||0,a=(null===(n=this.previousItem)||void 0===n?void 0:n.averageOverallRating)||0;return!(!_||_>=a)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-review-montly-avg-rating-tooltip"]],hostAttrs:[1,"dropdown-shadow"],inputs:{previousItem:"previousItem",item:"item",monthLabel:"monthLabel"},decls:16,vars:9,consts:function(){let o,t;return o="reviews",t="reviews",[[1,"px-3","py-2","d-flex","align-items-center","justify-content-between","border-bottom"],[1,"text-bold"],[1,"text-sm"],[1,"text-xs",3,"ngClass"],[1,"text-muted"],o,[1,"p-3"],["class","d-flex align-items-center justify-content-between",4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","justify-content-between"],[1,"text-xxl",2,"letter-spacing","5px",3,"rating","showLevelColor"],t]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",2)(4,"div")(5,"span",3),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"span",1),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"number"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",4),e.\u0275\u0275text(11),e.\u0275\u0275elementContainerStart(12),e.\u0275\u0275i18n(13,5),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(14,"div",6),e.\u0275\u0275template(15,en,9,4,"div",7),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",n.monthLabel," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngClass",n.isRatingDown()?"text-danger":"text-success"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",n.isRatingDown()?"\u2b07":"\u2b06"," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind2(9,6,null==n.item?null:n.item.averageOverallRating,"0.0-2")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("",n.getTotalCount(n.item)," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",n.ratingCategories))},directives:[T.NgClass,T.NgForOf,ie.A],pipes:[T.DecimalPipe],styles:["[_nghost-%COMP%]{background:white;border:1px solid #e8eaf0;border-radius:6px;width:250px;position:absolute;z-index:1000;display:block;left:-100%;transition:all .1s ease-in}"]}),i})();var j=l(61471);const nn=["ctx"],on=["chartContainer"],_n=["tooltipContainer"];function an(i,o){1&i&&e.\u0275\u0275element(0,"app-loading-section")}function ln(i,o){1&i&&(e.\u0275\u0275elementStart(0,"app-empty-table"),e.\u0275\u0275element(1,"img",19),e.\u0275\u0275elementStart(2,"h6"),e.\u0275\u0275i18
1n(3,20),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"p"),e.\u0275\u0275i18n(5,21),e.\u0275\u0275elementEnd()())}function rn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,22),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementStart(3,"span",23),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(6),e.\u0275\u0275i18n(7,24),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&i){const t=e.\u0275\u0275nextContext().ngIf;e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\u2b06 ",e.\u0275\u0275pipeBind2(5,1,t,"0.1-2"),"%")}}function sn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,25),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementStart(3,"span",26),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(6),e.\u0275\u0275i18n(7,27),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&i){const t=e.\u0275\u0275nextContext().ngIf;e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\u2b07 ",e.\u0275\u0275pipeBind2(5,1,t,"0.1-2"),"%")}}function En(i,o){if(1&i&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,rn,8,4,"div",8),e.\u0275\u0275template(2,sn,8,4,"div",8),e.\u0275\u0275elementContainerEnd()),2&i){const t=o.ngIf;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t<0)}}const Te={drawTime:"afterDatasetsDraw",type:"line",borderColor:"gray",borderWidth:.5,mode:"horizontal",scaleID:"y-axis-0",value:0,label:{backgroundColor:"whiteSmoke",cornerRadius:6,content:"No Reviews",fontSize:40,fontStyle:"normal",xPadding:5,yPadding:5,enabled:!1}};let cn=(()=>{class i extends r.VZT{constructor(t,n){super(),this.resolver=t,this.renderer=n,this.tooltipComRef=null,this.isLoading=!1,this.currentYear=Y().year(),this.globalRating=0,this.statsByMonth={},this.statsByYear={},this.ratingCategories=["2-2.9","0-1.9","3-3.9","4-4.4","4.5-4.7","4.8-5"],this.labels=p.range(0,12).map(_=>{const a=Y().locale((0,j.K)()).subtract(_,"month");return{date:a,key:a.format("YYYY-M"),label:a.format(a.isSame(Y(),"year")?"MMM":"MMM,YYYY")}}).reverse()}set data(t){t&&this.refresh(t)}ngOnInit(){}ngAfterViewInit(){this.init(),this.draw()}getCurrentYear5StarInc(){var t,n;const _=(null===(t=this.statsByYear[this.currentYear])||void 0===t?void 0:t.count)||0,a=(null===(n=this.statsByYear[this.currentYear-1])||void 0===n?void 0:n.count)||0;return(_-a)/(a||1)*100}refresh(t){this.statsByMonth=p.keyBy(null==t?void 0:t.monthlyRatingDistribution,n=>n.month),this.statsByYear=p.keyBy(null==t?void 0:t.yearlyFiveStarRating,n=>n.year),this.globalRating=p.sumBy(p.toPairs(null==t?void 0:t.averageRating),([n,_])=>+_.averageRating)/(Object.keys(null==t?void 0:t.averageRating).length||1),this.chart&&this.draw()}getChartData(){return{labels:[...this.labels.map(t=>t.label)],datasets:this.ratingCategories.map((t,n)=>({label:t,data:p.map(this.labels,_=>{var a,s;return(null===(s=p.find(null===(a=this.statsByMonth[_.key])||void 0===a?void 0:a.ratings,c=>c.range==t))||void 0===s?void 0:s.count)||0}).map(_=>n<2?-_:_),backgroundColor:["#E29E8A","#CB6A4D","#74BBE2","#46A4D9","#188DCF","#188DCF"][n],barPercentage:.99,categoryPercentage:1}))}}isDatasetEmpty(){var t,n;return!p.find(null===(n=null===(t=this.chart)||void 0===t?void 0:t.data)||void 0===n?void 0:n.datasets,_=>p.some(_.data,a=>!!a))}draw(){this.chart.data=this.getChartData(),Te.label.enabled=!!this.isDatasetEmpty(),this.chart.options.annotation.annotations=[Te],this.chart.update()}init(){const t=this.resolver.resolveComponentFactory(tn);this.tooltipComRef=this.tooltipContainer.createComponent(t),this.chartContainer.nativeElement.addEventListener("mouseleave",()=>{this.renderer.setStyle(this.tooltipComRef.location.nativeElement,"display","none")});const n=this;this.chart=new Jt(this.ctx.nativeElement,{type:"bar",data:{}
1,plugins:[qt()],options:{legend:{display:!1},layout:{padding:{top:30,bottom:0,left:0,right:0}},scales:{xAxes:[{stacked:!0,gridLines:{display:!1}}],yAxes:[{stacked:!0,display:!1,gridLines:{display:!1}}]},tooltips:{enabled:!1,mode:"index",custom:_=>{var a,s;const c=this.tooltipComRef.location.nativeElement,R=null===(s=null===(a=_.dataPoints)||void 0===a?void 0:a[0])||void 0===s?void 0:s.xLabel,S=this.labels.find(v=>v.label===R);if(0===_.opacity||!S)return void this.renderer.setStyle(c,"display","none");this.renderer.setStyle(c,"display","block");const d=S.date,g=d.clone().locale((0,j.K)()).subtract(1,"month").format("YYYY-M");this.tooltipComRef.instance.monthLabel=d.locale((0,j.K)()).format("MMMM - YYYY"),this.tooltipComRef.instance.item=this.statsByMonth[null==S?void 0:S.key],this.tooltipComRef.instance.previousItem=this.statsByMonth[g],this.renderer.setStyle(c,"left",`${_.caretX}px`),this.renderer.setStyle(c,"top",`${_.caretY}px`)}},annotation:{annotations:[]},plugins:{datalabels:{align:"end",anchor:"end",color:function(_){var a,s;if(_.datasetIndex!==n.ratingCategories.length-1)return"";const c=n.labels[_.dataIndex],R=(null===(a=n.statsByMonth[c.key])||void 0===a?void 0:a.averageOverallRating)||0,S=(null===(s=n.statsByMonth[c.date.clone().locale((0,j.K)()).subtract(1,"month").format("YYYY-M")])||void 0===s?void 0:s.averageOverallRating)||0;return R?R>=S?"#03A99D":"#E95124":""},font:function(_){return{size:_.chart.width<512?12:14}},formatter:function(_,a){var s,c;if(a.datasetIndex!==n.ratingCategories.length-1)return"";const R=n.labels[a.dataIndex];let S=(null===(s=n.statsByMonth[R.key])||void 0===s?void 0:s.averageOverallRating)||0;S=+Number(S).toFixed(2);const d=(null===(c=n.statsByMonth[R.date.clone().locale((0,j.K)()).subtract(1,"month").format("YYYY-M")])||void 0===c?void 0:c.averageOverallRating)||0;return S?S>=d?`\u2b06${S}`:`\u2b07${S}`:""}}}}})}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(e.ComponentFactoryResolver),e.\u0275\u0275directiveInject(e.Renderer2))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-review-montly-avg-rating"]],viewQuery:function(t,n){if(1&t&&(e.\u0275\u0275viewQuery(nn,7),e.\u0275\u0275viewQuery(on,7),e.\u0275\u0275viewQuery(_n,5,e.ViewContainerRef)),2&t){let _;e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.ctx=_.first),e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.chartContainer=_.first),e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.tooltipContainer=_.first)}},inputs:{data:"data",isLoading:"isLoading"},features:[e.\u0275\u0275InheritDefinitionFeature],decls:30,vars:10,consts:function(){let o,t,n,_,a,s,c,R,S,d;return o="Overall Average for past 12 months",t="out of 5",n=" 5-star rating",_="reviews",a="No Reviews Yet",s=" You haven\u2019t received any guest or host reviews yet. Once reviews come in, you\u2019ll be able to view, respond, and track your ratings here. ",c="Increased by",R="this year!",S="Decreased by",d="this year!",[[1,"card"],[1,"card-body"],["chartContainer",""],[1,"text-black","text-bold"],o,[1,"graph"],["ctx",""],["tooltipContainer",""],[4,"ngIf"],[1,"card-footer","d-flex","p-0"],[1,"d-flex","flex-column","align-items-center","p-3","border-right"],[1,"text-xl","text-bold"],[1,"text-muted","text-uppercase","text-xs"],t,[1,"p-3","d-flex","flex-column","justify-content-center"],[1,"text-semi-bold"],n,[1,"text-info"],_,["src","/assets/images/empty_icons/overall-rating.svg","alt",""],a,s,c,[1,"text-success"],R,S,[1,"text-danger"],d]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1,2)(3,"div",3),e.\u0275\u0275i18n(4,4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div")(6,"div",5),e.\u0275\u0275element(7,"canvas",null,6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainer(9,null,7),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(11,an,1,0,"app-loading-section",8),e.\u0275\u0275template(12,ln,6,0,"app-empty-table",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"div",9)(14,"div",10)(15,"div",11),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",12),e.\u0275\u0275i18
1n(19,13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(20,"div",14)(21,"div",15)(22,"span"),e.\u0275\u0275i18n(23,16),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(24," \u2022 "),e.\u0275\u0275elementStart(25,"span",17),e.\u0275\u0275text(26),e.\u0275\u0275elementContainerStart(27),e.\u0275\u0275i18n(28,18),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(29,En,3,2,"ng-container",8),e.\u0275\u0275elementEnd()()()),2&t&&(e.\u0275\u0275advance(5),e.\u0275\u0275classProp("d-none",!n.isLoading&&n.isDatasetEmpty()),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",n.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!n.isLoading&&n.isDatasetEmpty()),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind2(17,7,n.globalRating,"0.1-2")),e.\u0275\u0275advance(10),e.\u0275\u0275textInterpolate1("",(null==n.statsByYear[n.currentYear]?null:n.statsByYear[n.currentYear].count)||0," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",n.getCurrentYear5StarInc()))},directives:[T.NgIf,ce.Q,H.T],pipes:[T.DecimalPipe],styles:[""]}),i})();var D=l(64316),m=l(67939),dn=l(17242),Sn=l(75836);const pn=["paginator"];function Rn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",23),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,24),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function mn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275element(1,"app-rental-name",25),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("rentalId",t.rentalId)("image",!0)("imageCircle",!0)("clickable",!0)}}function gn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",23),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,26),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Tn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"date"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(2,1,null==t.latestReview?null:t.latestReview.submittedAt,"dd - MMM - yyyy")," ")}}function Cn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",23),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,27),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function An(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",28),e.\u0275\u0275pipe(1,"number"),e.\u0275\u0275element(2,"app-rating",29),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("matTooltip",e.\u0275\u0275pipeBind2(1,4,t.channelAverageOverallRating,"0.0-2")),e.\u0275\u0275advance(2),e.\u0275\u0275property("maxRating",n.maxRating(t))("rating",t.channelAverageOverallRating)("showLevelColor",!0)}}function un(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",23),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,30),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function In(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275element(1,"img",31),e.\u0275\u0275pipe(2,"channelIcon"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind2(2,2,t.source,!1),e.\u0275\u0275sanitizeUrl)("alt",t.source)}}function fn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,32),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Nn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell")(1,"div",33),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("matTooltip",null==t.latestReview?null:t.latestReview.text),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t.latestReview?null:t.latestReview.text," ")}}function vn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18
1n(2,34),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Pn(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-cell",35)(1,"a",36),e.\u0275\u0275listener("click",function(){const a=e.\u0275\u0275restoreView(t).$implicit;return e.\u0275\u0275nextContext(2).onInsights(a)}),e.\u0275\u0275element(2,"i",37),e.\u0275\u0275elementEnd()()}}function On(i,o){1&i&&e.\u0275\u0275element(0,"mat-header-row")}function Vn(i,o){1&i&&e.\u0275\u0275element(0,"mat-row")}function hn(i,o){1&i&&(e.\u0275\u0275elementStart(0,"app-empty-table"),e.\u0275\u0275element(1,"img",38),e.\u0275\u0275elementStart(2,"h6"),e.\u0275\u0275i18n(3,39),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"p"),e.\u0275\u0275i18n(5,40),e.\u0275\u0275elementEnd()())}const Mn=function(){return[5,10,20,50,75,100]};function bn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div")(1,"div",5)(2,"mat-table",6,7),e.\u0275\u0275elementContainerStart(4,8),e.\u0275\u0275template(5,Rn,3,0,"mat-header-cell",9),e.\u0275\u0275template(6,mn,2,4,"mat-cell",10),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(7,11),e.\u0275\u0275template(8,gn,3,0,"mat-header-cell",9),e.\u0275\u0275template(9,Tn,3,4,"mat-cell",10),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(10,12),e.\u0275\u0275template(11,Cn,3,0,"mat-header-cell",9),e.\u0275\u0275template(12,An,3,7,"mat-cell",13),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(13,14),e.\u0275\u0275template(14,un,3,0,"mat-header-cell",9),e.\u0275\u0275template(15,In,3,5,"mat-cell",10),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(16,15),e.\u0275\u0275template(17,fn,3,0,"mat-header-cell",16),e.\u0275\u0275template(18,Nn,3,2,"mat-cell",10),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(19,17),e.\u0275\u0275template(20,vn,3,0,"mat-header-cell",16),e.\u0275\u0275template(21,Pn,3,0,"mat-cell",18),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275template(22,On,1,0,"mat-header-row",19),e.\u0275\u0275template(23,Vn,1,0,"mat-row",20),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"mat-paginator2",21,22),e.\u0275\u0275pipe(26,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(27,hn,6,0,"app-empty-table",4),e.\u0275\u0275pipe(28,"async"),e.\u0275\u0275elementEnd()()),2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("dataSource",t.dataSource),e.\u0275\u0275advance(20),e.\u0275\u0275property("matHeaderRowDef",t.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275property("matRowDefColumns",t.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("hidden",e.\u0275\u0275pipeBind1(26,10,t.isEmpty$)),e.\u0275\u0275property("length",t.dataSource.data.length)("pageSize",10)("pageSizeOptions",e.\u0275\u0275pureFunction0(14,Mn))("showFirstLastButtons",!0),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(28,12,t.isEmpty$))}}function wn(i,o){1&i&&e.\u0275\u0275element(0,"app-loading-section")}let yn=(()=>{class i{constructor(t){this.rentalReviewInsightsDialogService=t,this.displayedColumns=["rentalId","latestReview.submittedAt","averageOverallRating","source","latestReview.text","insights"],this.dataSource=new m.by,this.isEmpty$=(0,r.a$l)(this.dataSource),this.isLoading=!1}set paginator(t){this.dataSource.paginator=t}set sort(t){this.dataSource.sort=t}set data(t){this.dataSource.data=(null==t?void 0:t.rentalAverageOverallRating)||[]}ngOnInit(){}onInsights(t){this.rentalReviewInsightsDialogService.open({rentalId:t.rentalId,rentalAverageOverallRating:[t]})}maxRating(t){return(0,N.P5)((0,N.Kw)(t.source))}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(dn.X))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-rental-avg-rating"]],viewQuery:function(t,n){if(1&t&&(e.\u0275\u0275viewQuery(pn,5),e.\u0275\u0275viewQuery(D.YE,5)),2&t){let _;e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.paginator=_.first),e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.sort=_.first)}},inputs:{data:"data",isLoading:"isLoading"},decls:6,vars:2,consts:function(){let o,t,n,_,a,s,c,R,S;return o="Overall Average Rating for Rentals",t="Rental",n="Date",_="Rating",a="Channels",s="Review",c="AI Review Insights",R="No Rating Available",S=" You haven\u2019t received any reviews for your rentals yet. As reviews come in from supported channels, they\u2019ll appear here to help you track guest feedback and performance. ",[[1,"card"],[1,"card-header","bg-white","py-3"],[1,"m-0","text-black","text-bold"],o,[4,"ngIf"],["tableContentSize","",1,"table-holder","table-responsive"],["matSort","","matSortActive","latestReview.submittedAt","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","rentalId"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","latestReview.submittedAt"],["matColumnDef","averageOverallRating"],[3,"matTooltip",4,"matCellDef"],["matColumnDef","source"],["matColumnDef","latestReview.text"],[4,"matHeaderCellDef"],["matColumnDef","insights"],["class","justify-content-center",4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons"],["paginator",""],["mat-sort-header",""],t,[1,"text-semi-bold","text-link",3,"rentalId","image","imageCircle","clickable"],n,_,[3,"matTooltip"],[3,"maxRating","rating","showLevelColor"],a,["height","25",3,"src","alt"],s,[1,"text-truncate",3,"matTooltip"],c,[1,"justify-content-center"],["href","javascript:void(0)",3,"click"],[1,"cs-icon","cs-icon-file-chart-stars","text-xxl"],["src","/assets/images/empty_icons/overall-rental-rating.svg","alt",""],R,S]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),e.\u0275\u0275i18
1n(3,3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(4,bn,29,15,"div",4),e.\u0275\u0275template(5,wn,1,0,"app-loading-section",4),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!n.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.isLoading))},directives:[T.NgIf,Sn.G,m.BZ,D.YE,m.w1,m.fO,m.ge,D.nU,m.Dz,m.ev,ne.n,X.gM,ie.A,m.as,m.XQ,m.nj,m.Gk,ee.o,H.T,ce.Q],pipes:[T.DatePipe,T.DecimalPipe,F.a,T.AsyncPipe],styles:[".mat-column-source[_ngcontent-%COMP%], .mat-column-latestReview-submittedAt[_ngcontent-%COMP%]{flex:0 0 135px}.mat-column-averageOverallRating[_ngcontent-%COMP%]{flex:0 0 160px}.mat-column-rentalId[_ngcontent-%COMP%]{flex:0 0 250px}.mat-column-insights[_ngcontent-%COMP%]{flex:0 0 80px}"]}),i})();var Le=l(38069),Wn=l(23097),$n=l(65089),xe=l(37286),Ce=l(9108);const Ln=["reviews"];function xn(i,o){}function Dn(i,o){if(1&i&&e.\u0275\u0275element(0,"app-recent-reviews",37,38),2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("filters",t.filters)}}function Gn(i,o){if(1&i&&e.\u0275\u0275element(0,"app-rental-review-insights",40),2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("data",null==t.data?null:t.data.rentalAverageOverallRating)}}function Bn(i,o){1&i&&e.\u0275\u0275element(0,"app-unlock-rental-review-insights")}function Xn(i,o){if(1&i&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Gn,1,1,"app-rental-review-insights",39),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275template(3,Bn,1,0,"app-unlock-rental-review-insights",33),e.\u0275\u0275pipe(4,"async"),e.\u0275\u0275elementContainerEnd()),2&i){const t=e.\u0275\u0275nextContext();let n,_;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==(n=e.\u0275\u0275pipeBind1(2,2,t.isAISubscribed$))?null:n.isValid),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!(null!=(_=e.\u0275\u0275pipeBind1(4,4,t.isAISubscribed$))&&_.isValid))}}function kn(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",41),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddAutomation()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",42),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,43),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}function zn(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",44),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddChannel()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",45),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,46),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}function Hn(i,o){}function Fn(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"app-setup-layer",47),e.\u0275\u0275element(1,"img",48),e.\u0275\u0275elementStart(2,"h6"),e.\u0275\u0275i18n(3,49),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"ol",50)(5,"li")(6,"div")(7,"b"),e.\u0275\u0275i18n(8,51),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(9),e.\u0275\u0275text(10,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(11),e.\u0275\u0275i18n(12,52),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"li")(14,"div")(15,"b"),e.\u0275\u0275i18n(16,53),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(17),e.\u0275\u0275text(18,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(19),e.\u0275\u0275i18n(20,54),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"li")(22,"div")(23,"b"),e.\u0275\u0275i18n(24,55),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(25),e.\u0275\u0275text(26,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(27),e.\u0275\u0275i18
1n(28,56),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(29,"li")(30,"div")(31,"b"),e.\u0275\u0275i18n(32,57),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(33),e.\u0275\u0275text(34,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(35),e.\u0275\u0275i18n(36,58),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(37,"li")(38,"div")(39,"b"),e.\u0275\u0275i18n(40,59),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(41),e.\u0275\u0275text(42,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(43),e.\u0275\u0275i18n(44,60),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(45,"li")(46,"div")(47,"b"),e.\u0275\u0275i18n(48,61),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(49),e.\u0275\u0275text(50,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(51),e.\u0275\u0275i18n(52,62),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(53,"li")(54,"div")(55,"b"),e.\u0275\u0275i18n(56,63),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(57),e.\u0275\u0275text(58,"\xa0"),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(59),e.\u0275\u0275i18n(60,64),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(61,"div",65)(62,"button",66),e.\u0275\u0275i18n(63,67),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(64,Hn,0,0,"ng-template",16),e.\u0275\u0275elementEnd()()),2&i){const t=e.\u0275\u0275nextContext(),n=e.\u0275\u0275reference(40);e.\u0275\u0275property("loading",null==t.reviews?null:t.reviews.isLoading),e.\u0275\u0275advance(62),e.\u0275\u0275property("category",!0),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngTemplateOutlet",n)}}const Yn=function(){return{exact:!0}};let jn=(()=>{class i extends r.VZT{constructor(t,n,_,a){super(),this.store=t,this.dialog=n,this.channelHelperService=_,this.reviewService=a,this.reviewTab="recent",this.isLoading=!1,this.refresh$=new Tt.xQ,this.isAnyChannelConnected$=(0,Pe.aj)([this.store.pipe((0,I.Ys)((0,r.rjj)(r.Dtc.AirBnBV2API))),this.store.pipe((0,I.Ys)((0,r.rjj)(r.Dtc.BookingAPI))),this.store.pipe((0,I.Ys)((0,r.rjj)(r.Dtc.ExpediaAPI))),this.store.pipe((0,I.Ys)((0,r.rjj)(r.Dtc.Homeaway)))]).pipe((0,k.U)(s=>p.some(s))),this.isAISubscribed$=this.store.pipe((0,I.Ys)((0,Yt.BE)(jt.cq.TokeetAI)),(0,k.U)(s=>s||{}))}ngOnInit(){this.refresh$.pipe((0,q.b)(250),(0,r.sNL)(this),(0,Oe.b)(()=>this.isLoading=!0),(0,z.w)(t=>this.reviewService.getReviewStats(t))).subscribe(t=>{this.isLoading=!1,this.data=t})}onAddChannel(){this.channelHelperService.connectChannel()}onAddAutomation(){this.dialog.openDrawer(se.K,{panelClass:"drawer-full-70"})}onFiltersChange(t){p.isEqual(t,this.filters)||(this.filters=t,this.refresh$.next(t))}onRefresh(){var t;this.refresh$.next(this.filters),null===(t=this.reviews)||void 0===t||t.refresh()}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(r.xAy),e.\u0275\u0275directiveInject(re.ChannelHelperService),e.\u0275\u0275directiveInject(N.Fn))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-reviews-dashboard"]],viewQuery:function(t,n){if(1&t&&e.\u0275\u0275viewQuery(Ln,5),2&t){let _;e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.reviews=_.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:45,vars:19,consts:function(){let o,t,n,_,a,s,c,R,S,d,g,v,P,O,f,b,w,y,W,$,L,u,K,Q,U,J,Z;return o="Reviews",t="Dashboard",n="Reviews",_="Bookings",a="Latest Reviews",s="Get AI-powered tips to improve your property and increase revenue based on the guest review.",c="AI Review insights",R="Click here to see the associated help article.",S="Define rules to create your reviews automatically",d="Automation",g="Connect Channel",v="Optimize Your Listing with Insightful Guest Reviews!",P="Overview:",O="Access a comprehensive view of Airbnb reviews received for your listings.",f="Review Count:",b="At the top, see the total number of guest reviews. Filter reviews by Airbnb to streamline your focus.",w="Recent Reviews:",y="Browse the latest guest reviews and ratings, displayed first. View and manage your responses directly from this section.",W="Review Filters:",$="Easily filter reviews by specific listings to better manage your responses and insights.",L="Unreplied Reviews:",u="Quickly spot and reply to reviews awaiting your response right from the dashboard.",K="Ratings Distribution:",Q="Explore the median ratings across categories like Accuracy, Checkin, Cleanliness, and more, visualized with a pie chart for overall ratings.",U="Monthly Breakdown:",J="Review the monthly review trends with a bar chart, highlighting the range from lowest to highest ratings.",Z="Learn More",[[1,"d-flex","align-items-center","mb-3","gap-3"],[1,"d-flex","align-items-center","gap-2"],[1,"mb-0","page-title"],o,["articleId","qqWCoKgyAYQwGs5j6ozTqa","videoId","-"],[1,"internal-module-switcher","ml-3"],["routerLinkActive","active","matTooltip",t,1,"module-item",3,"routerLinkActiveOptions"],["routerLink","/reviews"],[1,"cs-icon","cs-icon-dashboard2","text-xl"],["routerLinkActive","active","matTooltip",n,1,"module-item"],["routerLink","/reviews/list"],[1,"cs-icon","cs-icon-chat-star2","text-xl"],["routerLinkActive","active","matTooltip",_,1,"module-item"],["routerLink","/reviews/bookings"],[1,"cs-icon","cs-icon-calendar-alt","text-xl"],[1,"flex-fill"],[3,"ngTemplateOutlet"],[3,"source","filtersChange","refresh"],["filtersComponent",""],[1,"row"],[1,"col-lg-8","d-flex","flex-column","gap-3"],[3,"filters","data","sourceChange"],[3,"isLoading","data"],[1,"col-lg-4","pl-lg-0"],[1,"container-box","h-100"],[1,"nav","top-navbar","border-bottom","pt-2"],["href","javascript:;",3,"click"],a,["matTooltip",s],c,["openArticleId","vRftdGeWVMM3t19BEZkmrT","matTooltip",R,1,"text-dark"],[1,"cs-icon","cs-icon-question-circle"],[3,"filters",4,"ngIf"],[4,"ngIf"],["automationBtn",""],["addBtn",""],[3,"loading",4,"ngIf"],[3,"filters"],["reviews",""],[3,"data",4,"ngIf"],[3,"data"],["matTooltip",S,1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-automations"],d,[1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-plug"],g,[3,"loading"],["src","/assets/images/empty_images/reviews.png","alt","",2,"width","360px"],v,[1,"w-100",2,"max-width","600px"],P,O,f,b,w,y,W,$,L,u,K,Q,U,J,[1,"d-flex","align-items-center","justify-content-center","gap-3"],["openArticleId","reviews",1,"btn","btn-secondary-primary",3,"category"],Z]},template:function(t,n){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"h6",2),e.\u0275\u0275i18
1n(3,3),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"app-page-help",4),e.\u0275\u0275elementStart(5,"ul",5)(6,"li",6)(7,"a",7),e.\u0275\u0275element(8,"i",8),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"li",9)(10,"a",10),e.\u0275\u0275element(11,"i",11),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"li",12)(13,"a",13),e.\u0275\u0275element(14,"i",14),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(15,"div",15),e.\u0275\u0275template(16,xn,0,0,"ng-template",16),e.\u0275\u0275elementStart(17,"app-reviews-filters",17,18),e.\u0275\u0275listener("filtersChange",function(a){return n.onFiltersChange(a)})("refresh",function(){return n.onRefresh()}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",19)(20,"div",20)(21,"app-reviews-stats",21),e.\u0275\u0275listener("sourceChange",function(a){return n.source=a}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(22,"app-review-montly-avg-rating",22)(23,"app-rental-avg-rating",22),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"div",23)(25,"div",24)(26,"ul",25)(27,"li")(28,"a",26),e.\u0275\u0275listener("click",function(){return n.reviewTab="recent"}),e.\u0275\u0275elementContainerStart(29),e.\u0275\u0275i18n(30,27),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"li")(32,"a",26),e.\u0275\u0275listener("click",function(){return n.reviewTab="insights"}),e.\u0275\u0275elementStart(33,"span",28),e.\u0275\u0275i18n(34,29),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"a",30),e.\u0275\u0275element(36,"i",31),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(37,Dn,2,1,"app-recent-reviews",32),e.\u0275\u0275template(38,Xn,5,6,"ng-container",33),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(39,kn,5,3,"ng-template",null,34,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(41,zn,5,3,"ng-template",null,35,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(43,Fn,65,3,"app-setup-layer",36),e.\u0275\u0275pipe(44,"async")),2&t){const _=e.\u0275\u0275reference(40);e.\u0275\u0275advance(6),e.\u0275\u0275property("routerLinkActiveOptions",e.\u0275\u0275pureFunction0(18,Yn)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngTemplateOutlet",_),e.\u0275\u0275advance(1),e.\u0275\u0275property("source",n.source),e.\u0275\u0275advance(4),e.\u0275\u0275property("filters",n.filters)("data",n.data),e.\u0275\u0275advance(1),e.\u0275\u0275property("isLoading",n.isLoading)("data",n.data),e.\u0275\u0275advance(1),e.\u0275\u0275property("isLoading",n.isLoading)("data",n.data),e.\u0275\u0275advance(4),e.\u0275\u0275classProp("active","recent"===n.reviewTab),e.\u0275\u0275advance(4),e.\u0275\u0275classProp("active","insights"===n.reviewTab),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf","recent"===n.reviewTab),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","insights"===n.reviewTab),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",!e.\u0275\u0275pipeBind1(44,16,n.isAnyChannelConnected$))}},directives:[oe.G,V.Od,X.gM,V.yS,T.NgTemplateOutlet,$e,Ut,cn,yn,Le.R,T.NgIf,x,Wn.$,$n.C,xe.k],pipes:[T.AsyncPipe,Ce.T],styles:["[_nghost-%COMP%]{display:block}"]}),i})();var Ae=l(93676),le=l(99530),De=l(64941),Kn=l(93222),G=l(70213),Ge=l(6185),Be=l(13226),Qn=l(32899);let Xe=(()=>{class i{constructor(t,n){this.dialog=t,this.store=n,this.rentalsById={},this.store.pipe((0,I.Ys)(r.jqr)).subscribe(_=>this.rentalsById=_)}getConfig(t){const n=new T.DatePipe("en-US");return{title:"Download Reviews to CSV",description:"You are about to download all tasks within your current filter.",columns:[{name:"Review of",field:_=>{var a;return null===(a=this.rentalsById[_.rentalId])||void 0===a?void 0:a.name}},{name:"Date",field:_=>n.transform(_.submittedAt,"dd - MMM - yyyy")},{name:"Rating",field:_=>`${_.channelOverallRating}/${(0,N.P5)(_.source)}`},{name:"Channels",field:"source"},{name:"Review",field:"text"},{name:"Publish",field:_=>_.published?"Published":""}],exportData:t,filename:"Reviews"+` - ${Y().format("MM_DD_YYYY")}`,columnCustomizable:!1}}open(t){const n={width:"650px",panelClass:["variable-modal"],data:{config:this.getConfig(t)}};return this.dialog.open(Qn.D,n)}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275inject(Ve.uw),e.\u0275\u0275inject(I.yh))},i.\u0275prov=e.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac}),i})();var ke=l(39184),ue=l(37498),Un=l(67096),Jn=l(28104),ze=l(63955),Zn=l(18123),qn=l(28500),ei=l(81322),He=l(85868);const ti=["paginator"];function ni(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",71),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onDraftTasks()}),e.\u0275\u0275elementStart(1,"span",72),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(4),e.\u0275\u0275i18
1n(5,73),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,1,t.pendingTasks$).length)}}function ii(i,o){}function oi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ul",74)(1,"li",75)(2,"button",76),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onImport()}),e.\u0275\u0275element(3,"i",77),e.\u0275\u0275elementContainerStart(4),e.\u0275\u0275i18n(5,78),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"li",79)(7,"button",76),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onDownload()}),e.\u0275\u0275element(8,"i",80),e.\u0275\u0275elementContainerStart(9),e.\u0275\u0275i18n(10,81),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()}}function _i(i,o){1&i&&e.\u0275\u0275element(0,"mat-header-cell")}function ai(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",84),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onExpandRow(_)}),e.\u0275\u0275element(1,"i",85),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext().$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",t.reviewId===n.expandedReviewId?"fa-angle-down":"fa-angle-right")}}function li(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",82),e.\u0275\u0275listener("click",function(n){return n.stopPropagation()}),e.\u0275\u0275template(1,ai,2,1,"div",83),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==t.response?null:t.response.text)}}function ri(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,87),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function si(i,o){1&i&&(e.\u0275\u0275elementStart(0,"span",98),e.\u0275\u0275element(1,"i",99),e.\u0275\u0275elementEnd())}function Ei(i,o){1&i&&(e.\u0275\u0275elementStart(0,"span",100),e.\u0275\u0275element(1,"i",101),e.\u0275\u0275elementEnd())}function ci(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,si,2,0,"span",96),e.\u0275\u0275template(2,Ei,2,0,"span",97),e.\u0275\u0275elementEnd()),2&i){const t=o.ngIf;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","guest"==t),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","host"==t)}}function di(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",102),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onGuest(_.guestId)}),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()}if(2&i){const t=o.ngIf;e.\u0275\u0275property("matTooltip",null==t?null:t.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t?null:t.name," ")}}function Si(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",104),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&i){const t=o.ngIf;e.\u0275\u0275property("matTooltip",null==t?null:t.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t?null:t.name," ")}}function pi(i,o){if(1&i&&e.\u0275\u0275template(0,Si,2,2,"div",103),2&i){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("ngIf",t.reviewee)}}function Ri(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",105),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onBooking(_.inquiryId)}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"epochUTC"),e.\u0275\u0275pipe(3,"epochUTC"),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind2(2,2,t.checkIn,"MMM DD, YYYY")," - ",e.\u0275\u0275pipeBind2(3,5,t.checkOut,"MMM DD, YYYY")," ")}}function mi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",88)(1,"div",89),e.\u0275\u0275element(2,"app-rental-image",90),e.\u0275\u0275template(3,ci,3,2,"div",91),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div"),e.\u0275\u0275element(5,"app-rental-name",92),e.\u0275\u0275template(6,di,2,2,"div",93),e.\u0275\u0275template(7,pi,1,1,"ng-template",null,94,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(9,Ri,4,8,"div",95),e.\u0275\u0275elementEnd()()),2&i){const t=o.$implicit,n=e.\u0275\u0275reference(8),_=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("rentalId",t.rentalId)("circle",!0)("clickable",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==t.reviewer?null:t.reviewer.role),e.\u0275\u0275advance(2),e.\u0275\u0275property("rentalId",t.rentalId)("clickable",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",_.guestsById[t.guestId])("ngIfElse",n),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.checkIn)}}function gi(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18
1n(2,106),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Ti(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"date"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(2,1,t.submittedAt,"dd - MMM - yyyy")," ")}}function Ci(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,107),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Ai(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275element(1,"app-rating",108),e.\u0275\u0275pipe(2,"call"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("maxRating",e.\u0275\u0275pipeBind2(2,3,n.getMaxRating,t))("rating",t.channelOverallRating)("showLevelColor",!0)}}function ui(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,109),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Ii(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275element(1,"img",110),e.\u0275\u0275pipe(2,"channelIcon"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind2(2,2,t.source,!1),e.\u0275\u0275sanitizeUrl)("alt",t.source)}}function fi(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,111),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Ni(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",112)(1,"div"),e.\u0275\u0275element(2,"app-review-category-tags",113)(3,"app-show-more",114),e.\u0275\u0275elementEnd()()),2&i){const t=o.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275property("review",t),e.\u0275\u0275advance(1),e.\u0275\u0275property("content",t.text)}}function vi(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell",86),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,115),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Pi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-cell")(1,"app-form-switch",116),e.\u0275\u0275listener("valueChange",function(){const a=e.\u0275\u0275restoreView(t).$implicit;return e.\u0275\u0275nextContext().onTogglePublish(a)}),e.\u0275\u0275elementEnd()()}if(2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("inline",!0)("checked",t.published)}}function Oi(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,117),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Vi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",121),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onReply(_)}),e.\u0275\u0275element(1,"i",122),e.\u0275\u0275elementEnd()}}function hi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",123),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onExpandRow(_)}),e.\u0275\u0275element(1,"i",124),e.\u0275\u0275elementEnd()}}function Mi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",118),e.\u0275\u0275template(1,Vi,2,0,"a",119),e.\u0275\u0275pipe(2,"call"),e.\u0275\u0275template(3,hi,2,0,"a",120),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind2(2,2,n.canReply,t)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.response)}}function bi(i,o){1&i&&(e.\u0275\u0275element(0,"app-avatar-name",131),e.\u0275\u0275pipe(1,"titleCase")),2&i&&e.\u0275\u0275property("name",e.\u0275\u0275pipeBind1(1,1,o.$implicit))}function wi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",132),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"date"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(2,1,t,"medium")," ")}}function yi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",127)(1,"div",128),e.\u0275\u0275template(2,bi,2,3,"app-avatar-name",129),e.\u0275\u0275template(3,wi,3,4,"div",130),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div"),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()()),2&i){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==t.reviewee?null:t.reviewee.name)||(null==t.reviewee?null:t.reviewee.role)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==t.response?null:t.response.respondedAt)||(null==t.response?null:t.response.last
1ChangeAt)),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",null==t.response?null:t.response.text," ")}}function Wi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",125),e.\u0275\u0275template(1,yi,6,3,"div",126),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275attribute("colspan",n.displayedColumns.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",n.expandedReviewId===t.reviewId)}}function $i(i,o){1&i&&e.\u0275\u0275element(0,"mat-header-row")}function Li(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-row",133),e.\u0275\u0275listener("click",function(){const a=e.\u0275\u0275restoreView(t).$implicit;return e.\u0275\u0275nextContext().onReview(a)}),e.\u0275\u0275elementEnd()}}function xi(i,o){if(1&i&&e.\u0275\u0275element(0,"mat-row"),2&i){const t=o.$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275classProp("d-none",t.reviewId!==n.expandedReviewId)}}const Di=function(){return["includeDeletedInquiries"]};function Gi(i,o){if(1&i&&(e.\u0275\u0275element(0,"app-empty-table",134),e.\u0275\u0275pipe(1,"isFiltering")),2&i){const t=e.\u0275\u0275nextContext(),n=e.\u0275\u0275reference(45);e.\u0275\u0275property("isFiltering",e.\u0275\u0275pipeBind2(1,1,t.filtersForm,e.\u0275\u0275pureFunction0(4,Di))||!n.isEmpty)}}function Bi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",135),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddAutomation()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",136),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,137),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}function Xi(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",138),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddChannel()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",139),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,140),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}function ki(i,o){}function zi(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"app-setup-layer",141),e.\u0275\u0275element(1,"img",142),e.\u0275\u0275elementStart(2,"h6"),e.\u0275\u0275i18n(3,143),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"ol",144)(5,"li")(6,"div")(7,"b"),e.\u0275\u0275i18n(8,145),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(9),e.\u0275\u0275i18n(10,146),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"li")(12,"div")(13,"b"),e.\u0275\u0275i18n(14,147),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(15),e.\u0275\u0275i18n(16,148),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"li")(18,"div")(19,"b"),e.\u0275\u0275i18n(20,149),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(21,"\xa0"),e.\u0275\u0275elementContainerStart(22),e.\u0275\u0275i18n(23,150),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(24,"li")(25,"div")(26,"b"),e.\u0275\u0275i18n(27,151),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(28,"\xa0"),e.\u0275\u0275elementContainerStart(29),e.\u0275\u0275i18n(30,152),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"li")(32,"div")(33,"b"),e.\u0275\u0275i18n(34,153),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(35,"\xa0"),e.\u0275\u0275elementContainerStart(36),e.\u0275\u0275i18n(37,154),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(38,"li")(39,"div")(40,"b"),e.\u0275\u0275i18n(41,155),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(42,"\xa0"),e.\u0275\u0275elementContainerStart(43),e.\u0275\u0275i18n(44,156),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(45,"li")(46,"div")(47,"b"),e.\u0275\u0275i18
1n(48,157),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerStart(49),e.\u0275\u0275i18n(50,158),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(51,"div",159)(52,"button",160),e.\u0275\u0275i18n(53,161),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(54,ki,0,0,"ng-template",19),e.\u0275\u0275elementEnd()()),2&i){const t=e.\u0275\u0275nextContext(),n=e.\u0275\u0275reference(85);e.\u0275\u0275property("loading",t.isLoading),e.\u0275\u0275advance(52),e.\u0275\u0275property("category",!0),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngTemplateOutlet",n)}}const Hi=function(){return{exact:!0}},Fi=function(){return["canApproveTasks"]},Yi=function(){return["response"]},ji=function(){return[5,10,20,50,75,100]};let Ki=(()=>{class i extends r.VZT{constructor(t,n,_,a,s,c,R,S){super(),this.fb=t,this.store=n,this.toaster=_,this.reviewService=a,this.channelHelperService=s,this.exportDialog=c,this.dialog=R,this.amplitudeService=S,this.displayedColumns=["select","reviewer.name","submittedAt","overallRating","source","text","action"],this.nameOptions=Object.assign([],De.l),this.dataSource=new m.by,this.isEmpty$=(0,r.a$l)(this.dataSource),this.isLoading=!0,this.isReviewEmpty=!0,this.sourceOptions=N.l1,this.filters={},this.totalCount=0,this.pagination={pageIndex:0,pageSize:10},this.filtersForm=this.fb.group({sources:[[]],rentals:[[]],submitted:[],includeDeletedInquiries:[!1],responded:[],category:[],ratings:[[]],reviewerRole:[]}),this.rentals$=this.store.pipe((0,I.Ys)(r.z8T)),this.rentalsById={},this.guestsById={},this.pendingTasks$=this.store.pipe((0,I.Ys)(ue.Mb)),this.ratingCategoryOptions=[],this.ratingValueOptions=[5,4,3,2,1].map(d=>({value:d,name:1===d?`${d} Star`:`${d} Stars`})),this.reviewerRolesOptions=[{value:"host",name:"Host"},{value:"guest",name:"Guest"}]}ngOnInit(){this.dataSource.sort=this.sort,this.dataSource.sortData=r.l4y,this.store.pipe((0,I.Ys)(r.jqr),(0,r.sNL)(this)).subscribe(t=>{this.rentalsById=t}),this.store.pipe((0,I.Ys)(Be.pO),(0,r.sNL)(this)).subscribe(t=>{this.guestsById=t}),this.loadRatingCategories(),this.filtersForm.valueChanges.pipe((0,_e.O)(this.filtersForm.getRawValue()),(0,q.b)(1e3),(0,k.U)(t=>{var{submitted:n,category:_,ratings:a}=t,s=(0,B._T)(t,["submitted","category","ratings"]);const c=Object.assign(Object.assign({},s),{submittedAfter:null==n?void 0:n.from,submittedBefore:null==n?void 0:n.to});_&&(null==a?void 0:a.length)?c.categoryRating={category:_,ratings:a}:(null==a?void 0:a.length)&&(c.overallRating=a);const R=p.fromPairs(p.toPairs(c).filter(([S,d])=>!(p.isNil(d)||p.isArray(d)&&!d.length)));return Object.assign({},R)}),(0,r.sNL)(this)).subscribe(t=>{this.filters=t,this.paginator.firstPage(),this.onRefresh()})}loadRatingCategories(){this.reviewService.getRatingCategories().pipe((0,r.sNL)(this)).subscribe(t=>{this.ratingCategoryOptions=p.sortBy(t,n=>{var _;return(null===(_=n.name)||void 0===_?void 0:_.toLowerCase())||n.name||""})})}onPageChange(t){this.pagination=t,this.onRefresh()}onRefresh(){this.reviewService.searchReviews(Object.assign(Object.assign({},this.filters),{includeStats:!1,page:this.pagination.pageIndex+1,limit:this.pagination.pageSize})).pipe((0,Ee.x)(()=>this.isLoading=!1)).subscribe(t=>{var n,_;if(this.dataSource.data=t.reviews,this.totalCount=(null===(n=null==t?void 0:t.counts)||void 0===n?void 0:n.total)||0,this.isReviewEmpty&&(this.isReviewEmpty=!this.totalCount),null===(_=t.reviews)||void 0===_?void 0:_.length){const a=p.uniq(p.compact(p.map(t.reviews,s=>s.guestId)));this.store.dispatch((0,Ge.t2)({ids:a}))}},t=>{this.store.dispatch((0,r.pix)({error:t}))})}onImport(){this.reviewService.importReviews({connectedProperties:!0}).subscribe(()=>{this.toaster.success("Reviews imported successfully."),this.onRefresh()},t=>{this.store.dispatch((0,r.pix)({error:t}))})}getMaxRating(t){return(0,N.P5)(t.source)}onSearch(t){this.paginator.firstPage(),this.dataSource.filter=(t+"").trim().toLowerCase()}onExpandRow(t){this.expandedReviewId=this.expandedReviewId===t.reviewId?null:t.reviewId}onReview(t){}canReply(t){var n;return"host"!==(null===(n=t.reviewer)||void 0===n?void 0:n.role)&&!t.response&&t.isEligibleForResponse}onReply(t){this.dialog.openVariableDialog(Kn.T,{width:"800px",data:{review:t}}).afterClosed().pipe((0,z.w)(()=>this.reviewService.getReview(t._id))).subscribe(n=>{this.dataSource.data=this.dataSource.data.map(_=>_._id===n._id?n:_)})}onTogglePublish(t){this.reviewService.updateReview(t._id,{published:!t.published}).subscribe(n=>{this.toaster.success("Review "+(n.published?"published":"unpublished")+" successfully")},n=>this.store.dispatch((0,r.pix)({error:n})))}onBooking(t){this.store.dispatch((0,G.Gn)({inquiryId:t}))}onGuest(t){this.store.dispatch((0,G._W)({guestId:t}))}onRental(t){this.store.dispatch((0,G.i2)({rentalId:t}))}onAddChannel(){this.channelHelperService.connectChannel()}onAddAutomation(){this.dialog.openDrawer(se.K,{panelClass:"drawer
1-full-70"})}onDownload(){this.exportDialog.open(this.dataSource.filteredData).afterClosed().subscribe(()=>{this.amplitudeService.logEvent("download-review-list")})}onDraftTasks(){this.store.dispatch((0,G.Pj)({data:{tab:Un.M.Review}}))}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(A.qu),e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(r.x7r),e.\u0275\u0275directiveInject(N.Fn),e.\u0275\u0275directiveInject(re.ChannelHelperService),e.\u0275\u0275directiveInject(Xe),e.\u0275\u0275directiveInject(r.xAy),e.\u0275\u0275directiveInject(ke.Q))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-reviews-table"]],viewQuery:function(t,n){if(1&t&&(e.\u0275\u0275viewQuery(ti,7),e.\u0275\u0275viewQuery(D.YE,7)),2&t){let _;e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.paginator=_.first),e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.sort=_.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:89,vars:50,consts:function(){let o,t,n,_,a,s,c,R,S,d,g,v,P,O,f,b,w,y,W,$,L,u,K,Q,U,J,Z,C,Ne,je,Ke,Qe,Ue,Je,Ze,qe,et,tt,nt,it,ot,_t,at,lt,rt,st,Et,ct,dt,St,pt,Rt,mt,gt;return o="Reviews",t="Dashboard",n="Reviews",_="Bookings",a="The tasks created from incidents and requires approval",s="You can perform multiple actions using this button.",c="Actions",R="Rental",S="Only show reviews with the selected rental.",d="Channel",g="Only show reviews with the selected channel.",v="Review by",P="Category",O="Only show reviews matching the selected category.",f="Ratings",b="Only show reviews matching the selected ratings.",w="Date Range",y="Only show reviews within the selected date range",W="Include reviews for deleted bookings",$="Include Deleted Bookings",L="Refresh List",u="Pending Task Approval",K="Import reviews from all connected properties",Q="Import",U="Download reviews to CSV file",J="Download",Z="Review Of",C="Review from the guest.",Ne="Review from the host.",je="Date",Ke="Rating",Qe="Channels",Ue="Review",Je="Publish",Ze="Action",qe="Define rules to create your reviews automatically",et="Automation",tt="Connect Channel",nt="Optimize Your Listing with Insightful Guest Reviews!",it="Overview:",ot="Access a comprehensive view of Airbnb reviews received for your listings.",_t="Review Count:",at="At the top, see the total number of guest reviews. Filter reviews by Airbnb to streamline your focus.",lt="Recent Reviews:",rt="Browse the latest guest reviews and ratings, displayed first. View and manage your responses directly from this section.",st="Review Filters:",Et="Easily filter reviews by specific listings to better manage your responses and insights.",ct="Unreplied Reviews:",dt="Quickly spot and reply to reviews awaiting your response right from the dashboard.",St="Ratings Distribution:",pt="Explore the median ratings across categories like Accuracy, Checkin, Cleanliness, and more, visualized with a pie chart for overall ratings.",Rt="Monthly Breakdown:",mt="Review the monthly review trends with a bar chart, highlighting the range from lowest to highest ratings.",gt="Learn More",[[1,""],[1,"clearfix","title-holder","has-btn"],[1,"d-flex","align-items-center","gap-3","mb-3"],[1,"d-flex","align-items-center","gap-2"],[1,"mb-0","page-title"],o,["articleId","mCsbvsEe4iQQiPDFWxVBPR","videoId","-"],[1,"internal-module-switcher","ml-3"],["routerLinkActive","active","matTooltip",t,1,"module-item",3,"routerLinkActiveOptions"],["routerLink","/reviews"],[1,"cs-icon","cs-icon-dashboard2","text-xl"],["routerLinkActive","active","matTooltip",n,1,"module-item"],["routerLink","/reviews/list"],[1,"cs-icon","cs-icon-chat-star2","text-xl"],["routerLinkActive","active","matTooltip",_,1,"module-item"],["routerLink","/reviews/bookings"],[1,"cs-icon","cs-icon-calendar-alt","text-xl"],[1,"flex-fill"],["class","btn btn-secondary-warning","matTooltip",a,3,"click",4,"ngxPermissionsOnly"],[3,"ngTemplateOutlet"],["dropdown","",1,"btn-group",3,"isDisabled"],["dropdownToggle","","type","button","matTooltip",s,1,"btn","btn-secondary-warning","dropdown-toggle"],[1,"cs-icon","cs-icon-bolt"],c,["class","dropdown-menu dropdown-menu-right",4,"dropdownMenu"],[1,"container-box"],[1,"filters-box"],["placeholder",R,"matTooltip",S,3,"inline","ctrl"],["bindValue","value","bindLabel","name","placeholder",d,"matTooltip",g,3,"items","ctrl"],["blankLabel","All","bindValue","value","bindLabel","name","placeholder",v,1,"w-auto",3,"multiple","showCloseButton","hasBlank","items","ctrl"],["bindValue","value","bindLabel","name","blankLabel","All","placeholder",P,"matTooltip",O,3,"multiple","hasBlank","items","ctrl"],["bindValue","value","bindLabel","name","placeholder",f,"matTooltip",b,3,"items","ctrl"],["matTooltipPosition","above",3,"showLabel"],["placeholder",w,"matTooltip",y,3,"formControl"],["matTooltip",W,3,"inline","formControl"],$,[3,"isFiltering","filterControl","searchCom"],["matTooltip",L,"matTooltipPosition","above",1,"btn","btn-secondary-primary",3,"click"],[1,"far","fa-sync"],[3,"search"],["searchCom",""],[1,"table-holder","table-responsive"],[1,"table","table-default","table-striped"],["matSort","","matSortActive","submittedAt","matSortDirection","desc","multiTemplateDataRows","",3,"dataSource"],["table",""],["matColumnDef","select"],[4,"matHeaderCellDef"],[3,"click",4,"matCellDef"],["matColumnDef","reviewer.name"],["mat-sort-header","",4,"matHeaderCellDef"],["class","gap-2 py-2",4,"matCellDef"],["matColumnDef","submittedAt"],[4,"matCellDef"],["matColumnDef","overallRating"],["matColumnDef","source"],["matColumnDef","text"],["class","py-2",4,"matCellDef"],["matColumnDef","publish"],["matColumnDef","action"],["class","py-3",4,"matCellDef"],["matColumnDef","response"],["class","px-0",4,"matCellDef"],[4,"matHeaderRowDef"],["class","clickable",3,"click",4,"matRowDef","matRowDefColumns"],[3,"d-none",4,"matRowDef","matRowDefColumns"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["paginator",""],["type","Reviews",3,"isFiltering",4,"ngIf"],["automationBtn",""],["addBtn",""],[3,"loading",4,"ngIf"],["matTooltip",a,1,"btn","btn-secondary-warning",3,"click"],[1,"badge","badge-circle","badge-warning",2,"--size","1rem"],u,[1,"dropdown-menu","dropdown-menu-right"],["matTooltip",K,"matTooltipPosition","left"],["type","button",3,"click"],[1,"cs-icon","cs-icon-refresh"],Q,["matTooltip",U,"matTooltipPosition","left"],["aria-hidden","true",1,"cs-icon","cs-icon-download"],J,[3,"click"],["class","p-3",3,"click",4,"ngIf"],[1,"p-3",3,"click"],[1,"far",3,"ngClass"],["mat-sort-header",""],Z,[1,"gap-2","py-2"],[1,"d-flex","flex-column","align-items-center","gap-1"],[3,"rentalId","circle","clickable"],["class","",4,"ngIf"],[1,"text-semi-bold","text-link",3,"rentalId","clickable"],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"matTooltip","click",4,"ngIf","ngIfElse"],["reviewee",""],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"click",4,"ngIf"],["class","badge badge-circle badge-secondary-info","matTooltip",C,"style","--size: 1.1rem",4,"ngIf"],["class","badge badge-circle badge-secondary-success","matTooltip",Ne,"style","--size: 1.1rem",4,"ngIf"],["matTooltip",C,1,"badge","badge-circle","badge-secondary-info",2,"--size","1.1rem"],[1,"fas","fa-user"],["matTooltip",Ne,1,"badge","badge-circle","badge-secondary-success",2,"--size","1.1rem"],[1,"cs-icon","cs-icon-building"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"matTooltip","click"],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"matTooltip",4,"ngIf"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"matTooltip"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"click"],je,Ke,[3,"maxRating","rating","showLevelColor"],Qe,["height","25",3,"src","alt"],Ue,[1,"py-2"],[1,"mb-2",3,"review"],[3,"content"],Je,[3,"inline","checked","valueChange"],Ze,[1,"py-3"],["href","javascript:;","class","text-info d-flex","style","font-size: 35px",3,"click",4,"ngIf"],["href","javascript:;","class","text-primary d-flex","style","font-size: 40px",3,"click",4,"ngIf"],["href","javascript:;",1,"text-info","d-flex",2,"font-size","35px",3,"click"],[1,"cs-icon","cs-icon-reply-text"],["href","javascript:;",1,"text-primary","d-flex",2,"font-size","40px",3,"click"],[1,"cs-icon","cs-icon-replied-text"],[1,"px-0"],["class","border m-3 ml-5 w-100 bg-white p-3 rounded",4,"ngIf"],[1,"border","m-3","ml-5","w-100","bg-white","p-3","rounded"],[1,"d-flex","align-items-center","gap-2","mb-3"],[3,"name",4,"ngIf"],["class","text-muted",4,"ngIf"],[3,"name"],[1,"text-muted"],[1,"clickable",3,"click"],["type","Reviews",3,"isFiltering"],["matTooltip",qe,1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-automations"],et,["matTooltip","Manually create a channel",1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-plug"],tt,[3,"loading"],["src","/assets/images/empty_images/reviews.png","alt","",2,"width","360px"],nt,[1,"w-100",2,"max-width","600px"],it,ot,_t,at,lt,rt,st,Et,ct,dt,St,pt,Rt,mt,[1,"d-flex","align-items-center","justify-content-center","gap-3"],["openArticleId","reviews",1,"btn","btn-secondary-primary",3,"category"],gt]},template:function(t,n){if(1&t&&(e.\u0275\u0275elementStart(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h6",4),e.\u0275\u0275i18
1n(5,5),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(6,"app-page-help",6),e.\u0275\u0275elementStart(7,"ul",7)(8,"li",8)(9,"a",9),e.\u0275\u0275element(10,"i",10),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"li",11)(12,"a",12),e.\u0275\u0275element(13,"i",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"li",14)(15,"a",15),e.\u0275\u0275element(16,"i",16),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(17,"div",17),e.\u0275\u0275template(18,ni,6,3,"button",18),e.\u0275\u0275template(19,ii,0,0,"ng-template",19),e.\u0275\u0275elementStart(20,"div",20),e.\u0275\u0275pipe(21,"isReadonlyRole"),e.\u0275\u0275elementStart(22,"button",21),e.\u0275\u0275element(23,"span",22),e.\u0275\u0275elementContainerStart(24),e.\u0275\u0275i18n(25,23),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(26,oi,11,0,"ul",24),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(27,"div",25)(28,"div",26),e.\u0275\u0275element(29,"app-rental-select",27)(30,"app-select-search",28)(31,"app-select-search",29)(32,"app-select-search",30)(33,"app-select-search",31),e.\u0275\u0275elementStart(34,"mat-form-field2",32),e.\u0275\u0275element(35,"app-mat-daterange-input",33),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(36,"app-form-switch",34),e.\u0275\u0275elementContainerStart(37),e.\u0275\u0275i18n(38,35),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(39,"app-cancel-filters",36),e.\u0275\u0275pipe(40,"isFiltering"),e.\u0275\u0275elementStart(41,"button",37),e.\u0275\u0275listener("click",function(){return n.onRefresh()}),e.\u0275\u0275element(42,"i",38),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(43,"div",17),e.\u0275\u0275elementStart(44,"app-table-search",39,40),e.\u0275\u0275listener("search",function(a){return n.onSearch(a)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(46,"div",41)(47,"table",42)(48,"mat-table",43,44),e.\u0275\u0275elementContainerStart(50,45),e.\u0275\u0275template(51,_i,1,0,"mat-header-cell",46),e.\u0275\u0275template(52,li,2,1,"mat-cell",47),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(53,48),e.\u0275\u0275template(54,ri,3,0,"mat-header-cell",49),e.\u0275\u0275template(55,mi,10,9,"mat-cell",50),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(56,51),e.\u0275\u0275template(57,gi,3,0,"mat-header-cell",49),e.\u0275\u0275template(58,Ti,3,4,"mat-cell",52),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(59,53),e.\u0275\u0275template(60,Ci,3,0,"mat-header-cell",49),e.\u0275\u0275template(61,Ai,3,6,"mat-cell",52),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(62,54),e.\u0275\u0275template(63,ui,3,0,"mat-header-cell",49),e.\u0275\u0275template(64,Ii,3,5,"mat-cell",52),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(65,55),e.\u0275\u0275template(66,fi,3,0,"mat-header-cell",49),e.\u0275\u0275template(67,Ni,4,2,"mat-cell",56),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(68,57),e.\u0275\u0275template(69,vi,3,0,"mat-header-cell",49),e.\u0275\u0275template(70,Pi,2,2,"mat-cell",52),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(71,58),e.\u0275\u0275template(72,Oi,3,0,"mat-header-cell",46),e.\u0275\u0275template(73,Mi,4,5,"mat-cell",59),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(74,60),e.\u0275\u0275template(75,Wi,2,2,"mat-cell",61),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275template(76,$i,1,0,"mat-header-row",62),e.\u0275\u0275template(77,Li,1,0,"mat-row",63),e.\u0275\u0275template(78,xi,1,2,"mat-row",64),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(79,"mat-paginator2",65,66),e.\u0275\u0275listener("page",function(a){return n.onPageChange(a)}),e.\u0275\u0275pipe(81,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(82,Gi,2,5,"app-empty-table",67),e.\u0275\u0275pipe(83,"async"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(84,Bi,5,3,"ng-template",null,68,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(86,Xi,5,3,"ng-template",null,69,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(88,zi,55,3,"app-setup-layer",70)),2&t){const _=e.\u0275\u0275reference(45),a=e.\u0275\u0275reference(85);e.\u0275\u0275advance(8),e.\u0275\u0275property("routerLinkActiveOptions",e.\u0275\u0275pureFunction0(46,Hi)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngxPermissionsOnly",e.\u0275\u0275pureFunction0(47,Fi)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngTemplateOutlet",a),e.\u0275\u0275advance(1),e.\u0275\u0275property("isDisabled",e.\u0275\u0275pipeBind1(21,38,1)),e.\u0275\u0275advance(9),e.\u0275\u0275property("inline",!0)("ctrl",n.filtersForm.get("rentals")),e.\u0275\u0275advance(1),e.\u0275\u0275property("items",n.sourceOptions)("ctrl",n.filtersForm.get("sources")),e.\u0275\u0275advance(1),e.\u0275\u0275property("multiple",!1)("showCloseButton",!0)("hasBlank",!0)("items",n.reviewerRolesOptions)("ctrl",n.filtersForm.get("reviewerRole")),e.\u0275\u0275advance(1),e.\u0275\u0275property("multiple",!1)("hasBlank",!0)("items",n.ratingCategoryOptions)("ctrl",n.filtersForm.get("category")),e.\u0275\u0275advance(1),e.\u0275\u0275property("items",n.ratingV
1alueOptions)("ctrl",n.filtersForm.get("ratings")),e.\u0275\u0275advance(1),e.\u0275\u0275property("showLabel",!1),e.\u0275\u0275advance(1),e.\u0275\u0275property("formControl",n.filtersForm.get("submitted")),e.\u0275\u0275advance(1),e.\u0275\u0275property("inline",!0)("formControl",n.filtersForm.get("includeDeletedInquiries")),e.\u0275\u0275advance(3),e.\u0275\u0275property("isFiltering",e.\u0275\u0275pipeBind1(40,40,n.filtersForm))("filterControl",n.filtersForm)("searchCom",_),e.\u0275\u0275advance(9),e.\u0275\u0275property("dataSource",n.dataSource),e.\u0275\u0275advance(28),e.\u0275\u0275property("matHeaderRowDef",n.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275property("matRowDefColumns",n.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275property("matRowDefColumns",e.\u0275\u0275pureFunction0(48,Yi)),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("hidden",e.\u0275\u0275pipeBind1(81,42,n.isEmpty$)),e.\u0275\u0275property("length",n.totalCount)("pageSize",10)("pageSizeOptions",e.\u0275\u0275pureFunction0(49,ji))("showFirstLastButtons",!0),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(83,44,n.isEmpty$)),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",n.isReviewEmpty)}},directives:[oe.G,V.Od,X.gM,V.yS,Jn.gE,T.NgTemplateOutlet,M.TO,M.Mq,M.Hz,ae.m,Re.h,te.J,ye.d,A.JJ,A.oH,h.bc,h.YE,We.M,me.V,ze.S,m.BZ,D.YE,m.w1,m.fO,m.ge,m.Dz,m.ev,T.NgIf,T.NgClass,D.nU,de.H,ne.n,ie.A,Zn.S,qn.M,ei.E,m.as,m.XQ,m.nj,m.Gk,ee.o,H.T,xe.k,Le.R],pipes:[T.AsyncPipe,Ce.T,ge.b,He.y,T.DatePipe,Se.l,F.a,we.r],styles:[".mat-column-publish[_ngcontent-%COMP%], .mat-column-action[_ngcontent-%COMP%]{flex:0 0 100px}.mat-column-source[_ngcontent-%COMP%], .mat-column-submittedAt[_ngcontent-%COMP%]{flex:0 0 135px}.mat-column-overallRating[_ngcontent-%COMP%]{flex:0 0 160px}"]}),i})();var Ie=l(99760),Qi=l(78218),Ui=l(98773),Ji=l(50318),Zi=l(7038),qi=l(65590),eo=l(91434),to=l(1130),no=l(36292);function io(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-option",57),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275property("value",t),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t," ")}}function oo(i,o){if(1&i&&e.\u0275\u0275element(0,"iframe",58),2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("srcdoc",t.trustedWidgetCode,e.\u0275\u0275sanitizeHtml)}}const _o=function(){return{exact:!0}};let ao=(()=>{class i{constructor(t,n,_,a,s,c){this.store=t,this.sanitizer=n,this.fb=_,this.toast=a,this.auth=s,this.amplitudeService=c,this.widgetCode="",this.rentals$=this.store.pipe((0,I.Ys)(r.z8T)),this.borderRadiusOpts=[0,1,2,3,4,5,6,7,8,9,10],this.form=this.fb.group({rental:[void 0],source:[void 0],color:["#fff",[A.kI.required]],backgroundColor:["#127add",[A.kI.required]],borderColor:["#c1c1c1",[A.kI.required]],borderWidth:[0,[A.kI.required]],borderRadius:[4,[A.kI.required]]})}ngOnInit(){this.form.valueChanges.pipe((0,_e.O)(this.form.getRawValue())).subscribe(t=>{this.buildCode(t)})}buildCode(t){let n=(t.source||"").trim();n=`${n} widget`.trim(),t.rental&&n&&(this.widgetCode=`<a class="tokeet-review-widget" href="https://www.tokeet.com"\n data-rental-account="${this.auth.user.account}"\n data-rental-id="${t.rental}"\n data-name="${n}"\n data-color="${t.color}"\n data-background-color="${t.backgroundColor}"\n data-border-width="${t.borderWidth}px"\n data-border-color="${t.borderColor}"\n data-border-radius="${t.borderRadius}px"\n data-environment="${"production"===Ui.N.environment?"prod":"dev"}"\n ></a>\n <script src="https://widgets.tokeet.com/setup.min.js"><\/script>`,this.trustedWidgetCode=this.sanitizer.bypassSecurityTrustHtml(this.widgetCode))}onCopied(){this.amplitudeService.logEvent("widget-review-copied")}onColorSelected(t,n){this.form.patchValue({[t]:n})}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(Ji.DomSanitizer),e.\u0275\u0275directiveInject(A.qu),e.\u0275\u0275directiveInject(r.x7r),e.\u0275\u0275directiveInject(Qi.e8),e.\u0275\u0275directiveInject(ke.Q))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-review-widget"]],decls:69,vars:28,consts:function(){let o,t,n,_,a,s,c,R,S,d,g,v,P,O;return o="Request a Review Widget",t="Dashboard",n="Reviews",_="Widget",a=" Note: Review widgets allow you to collect guest reviews on any website seamlessly. Simply copy and paste the widget code to your site, and start showcasing valuable feedback from your guests. ",s="Rental",c="Button Style",R="Font Color",S="Backgroun
1d Color",d="Border Color",g="Border Width (px)",v="Copy Code",P=" Copy and paste the desired widget code onto your website. ",O="Widget Preview",[[1,"widget-page"],[1,"d-flex","align-items-center","gap-3","mb-3"],[1,"d-flex","align-items-center","gap-2"],[1,"mb-0","page-title"],o,["articleId","-","videoId","-"],[1,"internal-module-switcher","ml-3"],["routerLinkActive","active","matTooltip",t,1,"module-item",3,"routerLinkActiveOptions"],["routerLink","/reviews"],[1,"cs-icon","cs-icon-dashboard2","text-xl"],["routerLinkActive","active","matTooltip",n,1,"module-item"],["routerLink","/reviews/list"],[1,"cs-icon","cs-icon-chat-star2","text-xl"],["routerLinkActive","active","matTooltip",_,1,"module-item"],["routerLink","/reviews/widget"],[1,"cs-icon","cs-icon-cubes","text-xl"],[1,"flex-fill"],[1,"main-content"],[1,"details-box"],[1,"box-body"],[1,"row"],[1,"col-lg-6","col-xl-5"],[1,"widget-holder","p-3","container-box"],[1,"alert","alert-secondary-info"],[1,"cs-icon","cs-icon-info-circle","alert-icon"],[1,"aler-content"],a,[3,"formGroup"],["placeholder",s,3,"multiple","ctrl"],[1,"text-light","text-uppercase","text-semi-bold","mb-2"],c,[1,"col-sm-3"],[1,"mat-block"],["matInput","","placeholder",R,"required","",3,"value","colorPicker","cpOutputFormat","cpPosition","colorPickerChange"],["matSuffix","","fontSet","fas","fontIcon","fa-circle",1,"color-picker-value-indicator"],["matInput","","placeholder",S,"required","",3,"value","colorPicker","cpOutputFormat","cpPosition","colorPickerChange"],["matInput","","placeholder",d,"required","",3,"value","colorPicker","cpOutputFormat","cpPosition","colorPickerChange"],["type","number","matInput","","required","","placeholder",g,"formControlName","borderWidth"],["placeholder","Border Radius","formControlName","borderRadius","required",""],[3,"value",4,"ngFor","ngForOf"],[1,"widget-box"],[1,"tab-content"],[1,"tab-pane","fade","show","active"],[1,"alert","alert-dark"],[1,"widget-code",3,"innerText"],[1,""],["type","button","ngxClipboard","",1,"btn","btn-secondary-info",3,"disabled","cbContent","cbOnSuccess"],[1,"cs-icon","cs-icon-copy"],v,[1,"text-sm","text-light","mt-3"],P,[1,"col-lg-6","col-xl-7"],[1,"widget-preview","d-flex","align-items-center","flex-column","h-100","p-3"],[1,"title","text-light"],O,[1,"preview-box","flex-fill","w-100"],["frameborder","0","class","w-100 h-100",3,"srcdoc",4,"ngIf"],[3,"value"],["frameborder","0",1,"w-100","h-100",3,"srcdoc"]]},template:function(t,n){1&t&&(e.\u0275\u0275elementStart(0,"section",0)(1,"div",1)(2,"div",2)(3,"h6",3),e.\u0275\u0275i18n(4,4),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(5,"app-page-help",5),e.\u0275\u0275elementStart(6,"ul",6)(7,"li",7)(8,"a",8),e.\u0275\u0275element(9,"i",9),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"li",10)(11,"a",11),e.\u0275\u0275element(12,"i",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"li",13)(14,"a",14),e.\u0275\u0275element(15,"i",15),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(16,"div",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",17)(18,"div",18)(19,"div",19)(20,"div",20)(21,"div",21)(22,"div",22)(23,"div",23),e.\u0275\u0275element(24,"i",24),e.\u0275\u0275elementStart(25,"div",25),e.\u0275\u0275i18n(26,26),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(27,"form",27),e.\u0275\u0275element(28,"app-rental-select",28),e.\u0275\u0275elementStart(29,"h6",29),e.\u0275\u0275i18n(30,30),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(31,"div",20)(32,"div",31)(33,"mat-form-field2",32)(34,"input",33),e.\u0275\u0275listener("colorPickerChange",function(a){return n.onColorSelected("color",a)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(35,"mat-icon",34),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(36,"div",31)(37,"mat-form-field2",32)(38,"input",35),e.\u0275\u0275listener("colorPickerChange",function(a){return n.onColorSelected("backgroundColor",a)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(39,"mat-icon",34),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(40,"div",31)(41,"mat-form-field2",32)(42,"input",36),e.\u0275\u0275listener("colorPickerChange",function(a){return n.onColorSelected("borderColor",a)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(43,"mat-icon",34),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(44,"div",31)(45,"mat-form-field2",32),e.\u0275\u0275element(46,"input",37),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(47,"div",31)(48,"mat-form-field2",32)(49,"mat-select",38),e.\u0275\u0275template(50,io,2,2,"mat-option",39),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(51,"div",40)(52,"div",41)(53,"div",42)(54,"div",43),e.\u0275\u0275element(55,"p",44),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(56,"div",45)(57,"button",46),e.\u0275\u0275listener("cbOnSuccess",function(){return n.onCopied()}),e.\u0275\u0275element(58,"span",47),e.\u0275\u0275elementContainerStart(59),e.\u0275\u0275i18
1n(60,48),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(61,"div",49),e.\u0275\u0275i18n(62,50),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(63,"div",51)(64,"div",52)(65,"h5",53),e.\u0275\u0275i18n(66,54),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(67,"div",55),e.\u0275\u0275template(68,oo,1,1,"iframe",56),e.\u0275\u0275elementEnd()()()()()()()()),2&t&&(e.\u0275\u0275advance(7),e.\u0275\u0275property("routerLinkActiveOptions",e.\u0275\u0275pureFunction0(27,_o)),e.\u0275\u0275advance(20),e.\u0275\u0275property("formGroup",n.form),e.\u0275\u0275advance(1),e.\u0275\u0275property("multiple",!1)("ctrl",n.form.get("rental")),e.\u0275\u0275advance(6),e.\u0275\u0275property("value",n.form.get("color").value)("colorPicker",n.form.get("color").value)("cpOutputFormat","hex")("cpPosition","bottom"),e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("color",n.form.get("color").value),e.\u0275\u0275advance(3),e.\u0275\u0275property("value",n.form.get("backgroundColor").value)("colorPicker",n.form.get("backgroundColor").value)("cpOutputFormat","hex")("cpPosition","bottom"),e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("color",n.form.get("backgroundColor").value),e.\u0275\u0275advance(3),e.\u0275\u0275property("value",n.form.get("borderColor").value)("colorPicker",n.form.get("borderColor").value)("cpOutputFormat","hex")("cpPosition","bottom"),e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("color",n.form.get("borderColor").value),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngForOf",n.borderRadiusOpts),e.\u0275\u0275advance(5),e.\u0275\u0275property("innerText",n.widgetCode),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",!n.widgetCode)("cbContent",n.widgetCode),e.\u0275\u0275advance(11),e.\u0275\u0275property("ngIf",n.trustedWidgetCode))},directives:[oe.G,V.Od,X.gM,V.yS,A._Y,A.JL,A.sg,h.VP,ae.m,te.J,Me.Nt,Zi.Kk,qi.Hw,be.R9,A.wV,A.Fj,A.Q7,A.JJ,A.u,h.bc,h.YE,eo.gD,T.NgForOf,to.ey,no.yb,T.NgIf],styles:[""]}),i})();var fe=l(37362),lo=l(39304),Fe=l(96037),Ye=l(49653),ro=l(85661),so=l(64139),Eo=l(58962);const co=["paginator"];function So(i,o){}function po(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,48),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Ro(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",55),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onGuest(_.guestId)}),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()}if(2&i){const t=o.ngIf;e.\u0275\u0275property("matTooltip",null==t?null:t.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t?null:t.name," ")}}function mo(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"div",57),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&i){const t=o.ngIf;e.\u0275\u0275property("matTooltip",null==t?null:t.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t?null:t.name," ")}}function go(i,o){if(1&i&&e.\u0275\u0275template(0,mo,2,2,"div",56),2&i){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("ngIf",t.reviewee)}}function To(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",58),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onBooking(_.inquiryId)}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"epochUTC"),e.\u0275\u0275pipe(3,"epochUTC"),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2(" ",e.\u0275\u0275pipeBind2(2,2,t.checkIn,"MMM DD, YYYY")," - ",e.\u0275\u0275pipeBind2(3,5,t.checkOut,"MMM DD, YYYY")," ")}}function Co(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",49),e.\u0275\u0275element(1,"app-rental-image",50),e.\u0275\u0275elementStart(2,"div"),e.\u0275\u0275element(3,"app-rental-name",51),e.\u0275\u0275template(4,Ro,2,2,"div",52),e.\u0275\u0275template(5,go,1,1,"ng-template",null,53,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(7,To,4,8,"div",54),e.\u0275\u0275elementEnd()()),2&i){const t=o.$implicit,n=e.\u0275\u0275reference(6),_=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("rentalId",t.rentalId)("circle",!0)("clickable",!0),e.\u0275\u0275advance(2),e.\u0275\u0275property("rentalId",t.rentalId)("clickable",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",_.guestsById[t.guestId])("ngIfElse",n),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.checkIn)}}function Ao(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18
1n(2,59),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function uo(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"date"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(2,1,t.reviewerCanSubmitUntil,"dd - MMM - yyyy HH:mm")," ")}}function Io(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,60),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function fo(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",t.reservationId," ")}}function No(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,61),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function vo(i,o){if(1&i&&(e.\u0275\u0275elementStart(0,"mat-cell"),e.\u0275\u0275element(1,"img",62),e.\u0275\u0275pipe(2,"channelIcon"),e.\u0275\u0275elementEnd()),2&i){const t=o.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("src",e.\u0275\u0275pipeBind2(2,2,t.source,!1),e.\u0275\u0275sanitizeUrl)("alt",t.source)}}function Po(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-header-cell"),e.\u0275\u0275elementContainerStart(1),e.\u0275\u0275i18n(2,63),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd())}function Oo(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"li",75)(1,"button",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext(2).$implicit;return e.\u0275\u0275nextContext().onReview(_)}),e.\u0275\u0275element(2,"i",76),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,77),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()}}function Vo(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ul",69),e.\u0275\u0275template(1,Oo,5,0,"li",70),e.\u0275\u0275pipe(2,"call"),e.\u0275\u0275elementStart(3,"li",71)(4,"button",72),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const _=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().onRateBooking(_)}),e.\u0275\u0275element(5,"i",73),e.\u0275\u0275elementContainerStart(6),e.\u0275\u0275i18n(7,74),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()()()}if(2&i){const t=e.\u0275\u0275nextContext().$implicit,n=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind2(2,1,n.isGuestReviewable,t))}}function ho(i,o){1&i&&(e.\u0275\u0275elementStart(0,"mat-cell",0)(1,"div",64),e.\u0275\u0275pipe(2,"isReadonlyRole"),e.\u0275\u0275elementStart(3,"div",65),e.\u0275\u0275listener("click",function(n){return n.stopPropagation()}),e.\u0275\u0275elementStart(4,"a",66),e.\u0275\u0275element(5,"i",67),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(6,Vo,8,4,"ul",68),e.\u0275\u0275elementEnd()()),2&i&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("isDisabled",e.\u0275\u0275pipeBind1(2,1,1)))}function Mo(i,o){1&i&&e.\u0275\u0275element(0,"mat-header-row")}function bo(i,o){1&i&&e.\u0275\u0275element(0,"mat-row")}function wo(i,o){if(1&i&&(e.\u0275\u0275element(0,"app-empty-table",78),e.\u0275\u0275pipe(1,"isFiltering")),2&i){const t=e.\u0275\u0275nextContext(),n=e.\u0275\u0275reference(29);e.\u0275\u0275property("isFiltering",e.\u0275\u0275pipeBind1(1,1,t.filtersForm)||!n.isEmpty)}}function yo(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",79),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddAutomation()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",80),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18n(4,81),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}function Wo(i,o){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",82),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().onAddChannel()}),e.\u0275\u0275pipe(1,"isReadonlyRole"),e.\u0275\u0275element(2,"span",83),e.\u0275\u0275elementContainerStart(3),e.\u0275\u0275i18
1n(4,84),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(1,1,1))}const $o=function(){return{exact:!0}},Lo=function(){return[5,10,20,50,75,100]},Do=[{path:"",component:jn,canActivate:[le.h,Ae.o,Ie.t,fe.C]},{path:"list",component:Ki,canActivate:[le.h,ue.Oo,Ae.o,Ie.t,fe.C]},{path:"widget",component:ao,canActivate:[le.h]},{path:"bookings",component:(()=>{class i extends r.VZT{constructor(t,n,_,a,s,c,R,S){super(),this.fb=t,this.store=n,this.reviewService=_,this.channelHelperService=a,this.dialog=s,this.bookingRatingDialog=c,this.reviewAirbnbGuestDialog=R,this.reviewVrboGuestDialog=S,this.displayedColumns=["reviewee.name","reviewerCanSubmitUntil","reservationId","source","edit"],this.nameOptions=Object.assign([],De.l),this.dataSource=new m.by,this.isEmpty$=(0,r.a$l)(this.dataSource),this.isLoading=!0,this.sourceOptions=N.l1.filter(d=>d.reviewable),this.filters={},this.totalCount=0,this.pagination={pageIndex:0,pageSize:10},this.filtersForm=this.fb.group({sources:[[]],rentals:[[]]}),this.rentals$=this.store.pipe((0,I.Ys)(r.z8T)),this.rentalsById={},this.guestsById={}}ngOnInit(){this.dataSource.sort=this.sort,this.dataSource.sortData=r.l4y,this.store.pipe((0,I.Ys)(r.jqr),(0,r.sNL)(this)).subscribe(t=>{this.rentalsById=t}),this.store.pipe((0,I.Ys)(Be.pO),(0,r.sNL)(this)).subscribe(t=>{this.guestsById=t}),this.filtersForm.valueChanges.pipe((0,_e.O)(this.filtersForm.getRawValue()),(0,q.b)(1e3),(0,k.U)(t=>(t=p.fromPairs(p.toPairs(t).filter(([n,_])=>!(p.isNil(_)||p.isArray(_)&&!_.length))),Object.assign({},t))),(0,r.sNL)(this)).subscribe(t=>{this.filters=t,this.paginator.firstPage(),this.onRefresh()})}onPageChange(t){this.pagination=t,this.onRefresh()}onRefresh(){this.reviewService.searchReviews(Object.assign(Object.assign({},this.filters),{includeStats:!1,reviewerRole:"host",reviewerCanSubmit:!0,page:this.pagination.pageIndex+1,limit:this.pagination.pageSize})).pipe((0,Ee.x)(()=>this.isLoading=!1)).subscribe(t=>{var n,_;if(this.dataSource.data=t.reviews,this.totalCount=(null===(n=null==t?void 0:t.counts)||void 0===n?void 0:n.total)||0,null===(_=t.reviews)||void 0===_?void 0:_.length){const a=p.uniq(p.compact(p.map(t.reviews,s=>s.guestId)));this.store.dispatch((0,Ge.t2)({ids:a}))}},t=>{this.store.dispatch((0,r.pix)({error:t}))})}getMaxRating(t){return(0,N.P5)(t.source)}onSearch(t){this.paginator.firstPage(),this.dataSource.filter=(t+"").trim().toLowerCase()}isGuestReviewable(t){return(0,N.HQ)(t)}onReview(t){this.store.dispatch((0,Ye.tN)({ids:[t.inquiryId]})),this.store.pipe((0,r.vF2)((0,Fe.W_)([t.inquiryId])),(0,z.w)(([n])=>(/airbnb/.test(n.inquirySource)?this.reviewAirbnbGuestDialog.open(n):/vrbo/.test(n.inquirySource)&&this.reviewVrboGuestDialog.open(n),(0,so.of)(null)))).subscribe()}onRateBooking(t){this.store.dispatch((0,Ye.tN)({ids:[t.inquiryId]})),this.store.pipe((0,r.vF2)((0,Fe.W_)([t.inquiryId])),(0,z.w)(([n])=>this.bookingRatingDialog.open(n).afterClosed())).subscribe()}onBooking(t){this.store.dispatch((0,G.Gn)({inquiryId:t}))}onGuest(t){this.store.dispatch((0,G._W)({guestId:t}))}onRental(t){this.store.dispatch((0,G.i2)({rentalId:t}))}onAddChannel(){this.channelHelperService.connectChannel()}onAddAutomation(){this.dialog.openDrawer(se.K,{panelClass:"drawer-full-70"})}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(A.qu),e.\u0275\u0275directiveInject(I.yh),e.\u0275\u0275directiveInject(N.Fn),e.\u0275\u0275directiveInject(re.ChannelHelperService),e.\u0275\u0275directiveInject(r.xAy),e.\u0275\u0275directiveInject(Eo.V),e.\u0275\u0275directiveInject(lo.z),e.\u0275\u0275directiveInject(ro.X))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["app-review-bookings-table"]],viewQuery:function(t,n){if(1&t&&(e.\u0275\u0275viewQuery(co,7),e.\u0275\u0275viewQuery(D.YE,7)),2&t){let _;e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.paginator=_.first),e.\u0275\u0275queryRefresh(_=e.\u0275\u0275loadQuery())&&(n.sort=_.first)}},features:[e.\u0275\u0275InheritDefinitionFeature],decls:60,vars:27,consts:function(){let o,t,n,_,a,s,c,R,S,d,g,v,P,O,f,b,w,y,W,$,L;return o="Reviews to Write",t="Dashboard",n="Reviews",_="Bookings",a="Rental",s="Only show reviews with the selected rental.",c="Channel",R="Only show reviews with the selected channel.",S="Refresh List",d="Reviewee",g="Expired At",v="Reservation #",P="Channels",O="Edit",f="Add review manually",b="Assign booking rating for automated review",w="Rate Booking",y="Add Review",W="Define rules to create your reviews automatically",$="Automation",L="Connect Channel",[[1,""],[1,"clearfix","title-holder","has-btn"],[1,"d-flex","align-items-center","gap-3","mb-3"],[1,"d-flex","align-items-center","gap-2"],[1,"mb-0","page-title"],o,["articleId","v1ZFtAp9KDaYNxmauTv4kS","videoId","-"],[1,"internal-module-switcher","ml-3"],["routerLinkActive","active","matTooltip",t,1,"module-item",3,"routerLinkActiveOptions"],["routerLink","/reviews"],[1,"cs-icon","cs-icon-dashboard2","text-xl"],["routerLinkActive","active","matTooltip",n,1,"module-item"],["routerLink","/reviews/list"],[1,"cs-icon","cs-icon-chat-star2","text-xl"],["routerLinkActive","active","matTooltip",_,1,"module-item"],["routerLink","/reviews/bookings"],[1,"cs-icon","cs-icon-calendar-alt","text-xl"],[1,"flex-fill"],[3,"ngTemplateOutlet"],[1,"container-box"],[1,"filters-box"],["placeholder",a,"matTooltip",s,3,"inline","ctrl"],["bindValue","value","bindLabel","name","placeholder",c,"matTooltip",R,3,"items","ctrl"],[3,"isFiltering","filterControl","searchCom"],["matTooltip",S,"matTooltipPosition","above",1,"btn","btn-secondary-primary",3,"click"],[1,"far","fa-sync"],[3,"search"],["searchCom",""],[1,"table-holder","table-responsive"],[1,"table","table-default","table-striped"],["multiTemplateDataRows","",3,"dataSource"],["table",""],["matColumnDef","reviewee.name"],[4,"matHeaderCellDef"],["class","gap-2 py-2",4,"matCellDef"],["matColumnDef","reviewerCanSubmitUntil"],[4,"matCellDef"],["matColumnDef","reservationId"],["matColumnDef","source"],["matColumnDef","edit"],["class","",4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["paginator",""],["type","ReviewBookings",3,"isFiltering",4,"ngIf"],["automationBtn",""],["addBtn",""],d,[1,"gap-2","py-2"],[3,"rentalId","circle","clickable"],[1,"text-semi-bold","text-link",3,"rentalId","clickable"],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"matTooltip","click",4,"ngIf","ngIfElse"],["reviewee",""],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"click",4,"ngIf"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"matTooltip","click"],["class","text-truncate text-link text-sm","style","opacity: 0.7",3,"matTooltip",4,"ngIf"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"matTooltip"],[1,"text-truncate","text-link","text-sm",2,"opacity","0.7",3,"click"],g,v,P,["height","25",3,"src","alt"],O,["dropdown","","placement","bottom right","container","body",3,"isDisabled"],["dropdownToggle","",1,"btn-group","btn-ellips-holder",3,"click"],[1,"btn-ellips"],[1,"fas","fa-ellipsis-v"],["class","dropdown-menu dropdown-menu-right",4,"dropdownMenu"],[1,"dropdown-menu","dropdown-menu-right"],["matTooltip",f,"matTooltipPosition","left",4,"ngIf"],["matTooltip",b,"matTooltipPosition","left"],["type","button",3,"click"],[1,"far","fa-calendar-star"],w,["matTooltip",f,"matTooltipPosition","left"],[1,"fas","fa-star-half-alt"],y,["type","ReviewBookings",3,"isFiltering"],["matTooltip",W,1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-automations"],$,["matTooltip","Manually create a channel",1,"btn","btn-secondary-info",3,"disabled","click"],[1,"cs-icon","cs-icon-plug"],L]},template:function(t,n){if(1&t&&(e.\u0275\u0275elementStart(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h6",4),e.\u0275\u0275i18
1n(5,5),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(6,"app-page-help",6),e.\u0275\u0275elementStart(7,"ul",7)(8,"li",8)(9,"a",9),e.\u0275\u0275element(10,"i",10),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"li",11)(12,"a",12),e.\u0275\u0275element(13,"i",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"li",14)(15,"a",15),e.\u0275\u0275element(16,"i",16),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(17,"div",17),e.\u0275\u0275template(18,So,0,0,"ng-template",18),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",19)(20,"div",20),e.\u0275\u0275element(21,"app-rental-select",21)(22,"app-select-search",22)(23,"app-cancel-filters",23),e.\u0275\u0275pipe(24,"isFiltering"),e.\u0275\u0275elementStart(25,"button",24),e.\u0275\u0275listener("click",function(){return n.onRefresh()}),e.\u0275\u0275element(26,"i",25),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(27,"div",17),e.\u0275\u0275elementStart(28,"app-table-search",26,27),e.\u0275\u0275listener("search",function(a){return n.onSearch(a)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(30,"div",28)(31,"table",29)(32,"mat-table",30,31),e.\u0275\u0275elementContainerStart(34,32),e.\u0275\u0275template(35,po,3,0,"mat-header-cell",33),e.\u0275\u0275template(36,Co,8,8,"mat-cell",34),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(37,35),e.\u0275\u0275template(38,Ao,3,0,"mat-header-cell",33),e.\u0275\u0275template(39,uo,3,4,"mat-cell",36),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(40,37),e.\u0275\u0275template(41,Io,3,0,"mat-header-cell",33),e.\u0275\u0275template(42,fo,2,1,"mat-cell",36),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(43,38),e.\u0275\u0275template(44,No,3,0,"mat-header-cell",33),e.\u0275\u0275template(45,vo,3,5,"mat-cell",36),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementContainerStart(46,39),e.\u0275\u0275template(47,Po,3,0,"mat-header-cell",33),e.\u0275\u0275template(48,ho,7,3,"mat-cell",40),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275template(49,Mo,1,0,"mat-header-row",41),e.\u0275\u0275template(50,bo,1,0,"mat-row",42),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(51,"mat-paginator2",43,44),e.\u0275\u0275listener("page",function(a){return n.onPageChange(a)}),e.\u0275\u0275pipe(53,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(54,wo,2,3,"app-empty-table",45),e.\u0275\u0275pipe(55,"async"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(56,yo,5,3,"ng-template",null,46,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(58,Wo,5,3,"ng-template",null,47,e.\u0275\u0275templateRefExtractor)),2&t){const _=e.\u0275\u0275reference(29),a=e.\u0275\u0275reference(57);e.\u0275\u0275advance(8),e.\u0275\u0275property("routerLinkActiveOptions",e.\u0275\u0275pureFunction0(25,$o)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngTemplateOutlet",a),e.\u0275\u0275advance(3),e.\u0275\u0275property("inline",!0)("ctrl",n.filtersForm.get("rentals")),e.\u0275\u0275advance(1),e.\u0275\u0275property("items",n.sourceOptions)("ctrl",n.filtersForm.get("sources")),e.\u0275\u0275advance(1),e.\u0275\u0275property("isFiltering",e.\u0275\u0275pipeBind1(24,19,n.filtersForm))("filterControl",n.filtersForm)("searchCom",_),e.\u0275\u0275advance(9),e.\u0275\u0275property("dataSource",n.dataSource),e.\u0275\u0275advance(17),e.\u0275\u0275property("matHeaderRowDef",n.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275property("matRowDefColumns",n.displayedColumns),e.\u0275\u0275advance(1),e.\u0275\u0275classProp("hidden",e.\u0275\u0275pipeBind1(53,21,n.isEmpty$)),e.\u0275\u0275property("length",n.totalCount)("pageSize",10)("pageSizeOptions",e.\u0275\u0275pureFunction0(26,Lo))("showFirstLastButtons",!0),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(55,23,n.isEmpty$))}},directives:[oe.G,V.Od,X.gM,V.yS,T.NgTemplateOutlet,ae.m,Re.h,me.V,ze.S,m.BZ,m.w1,m.fO,m.ge,m.Dz,m.ev,de.H,ne.n,T.NgIf,M.TO,M.Mq,M.Hz,m.as,m.XQ,m.nj,m.Gk,ee.o,H.T],pipes:[ge.b,He.y,T.DatePipe,F.a,Ce.T,Se.l,T.AsyncPipe],styles:[".mat-column-publish[_ngcontent-%COMP%], .mat-column-action[_ngcontent-%COMP%]{flex:0 0 100px}.mat-column-source[_ngcontent-%COMP%], .mat-column-submittedAt[_ngcontent-%COMP%], .mat-column-overallRating[_ngcontent-%COMP%]{flex:0 0 135px}"]}),i})(),canActivate:[le.h,Ae.o,Ie.t,fe.C]}];let Go=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.\u0275\u0275defineNgModule({type:i}),i.\u0275inj=e.\u0275\u0275defineInjector({imports:[[V.Bz.forChild(Do)],V.Bz]}),i})();
1var Bo=l(99552),Xo=l(16449),ko=l(37500),zo=l(49675),Ho=l(71583),Fo=l(63006);let Yo=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.\u0275\u0275defineNgModule({type:i}),i.\u0275inj=e.\u0275\u0275defineInjector({providers:[Xe],imports:[[T.CommonModule,Bo.m,Go,Xo.ZQ,ko.ReviewAutomationsModule,Ho.ChannelSharedModule,zo.C,ue.Zf]]}),i})();e.\u0275\u0275setComponentScope(he,[Fo.J,$e,x],[])}}]); 2//# sourceMappingURL=6761.db2091fa29a3fcbf.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.