1import{a as kn,c as sn,d as ua,e as da,f as $t,g as fi,h as Ln,i as pa,j as ln,k as ma}from"./chunk-5XBUQ2YZ.js";import{a as aa,b as ra,c as sa,d as la,f as ca,g as Ht,h as Gt}from"./chunk-I2LKHMPM.js";import"./chunk-TMAUIC36.js";import{a as Ye}from"./chunk-5HI72EE4.js";import{a as pi}from"./chunk-U3257QJK.js";import"./chunk-BOKWOCEG.js";import{a as oa}from"./chunk-X7L44UIA.js";import"./chunk-56P23O63.js";import{B as Fe,C as Ko,E as $o,Xa as Xo,Ya as Te,Za as xt,_a as Ct,gb as ia,hb as na,nb as jt,pb as Kt,ua as an,va as gi,ya as zt}from"./chunk-XM5NCJXQ.js";import{a as ue,c as Ho,f as ft,g as Go,i as Pn,j as Zo,m as ea}from"./chunk-SA2BEY37.js";import"./chunk-IKWRQ4GC.js";import"./chunk-5XBU4W6K.js";import"./chunk-AWGSOQ5J.js";import{a as Be}from"./chunk-64DHE6O6.js";import"./chunk-QVRKFDXD.js";import{b as tn}from"./chunk-MQDCJZE3.js";import{A as on,T as Jo,e as Bt,f as Je,h as nn}from"./chunk-DQAAUNNE.js";import{a as gt}from"./chunk-MABY7COI.js";import"./chunk-JXHHNFK4.js";import"./chunk-ZZHFAEJE.js";import{e as ht}from"./chunk-O5EJJVHH.js";import{a as rn}from"./chunk-VON5DLH6.js";import"./chunk-DMB4Z5T6.js";import{f as ta}from"./chunk-VZTWP2YM.js";import"./chunk-YEMXMR2O.js";import"./chunk-7C5JE7JZ.js";import{a as Ji,b as Ft,h as Zi,i as Wo,j as en,k as Yo}from"./chunk-EQBSRMKC.js";import{a as _i}from"./chunk-J5NRK73A.js";import{a as vi}from"./chunk-SPFKRAIK.js";import{a as Ut}from"./chunk-HUERJLW6.js";import"./chunk-K7GGQVIK.js";import{a as Xi}from"./chunk-X3CMEPIE.js";import"./chunk-PGS3JRWZ.js";import"./chunk-MEJZISAX.js";import{a as mi}from"./chunk-JGFUTTST.js";import"./chunk-BQSYM23H.js";import"./chunk-UJLMMLUM.js";import{a as Xe}from"./chunk-5CRQFKDA.js";import"./chunk-EKQL4IFR.js";import"./chunk-JG3VZZY4.js";import"./chunk-WJY6HROL.js";import"./chunk-2GHFED2S.js";import"./chunk-WCL72VCC.js";import"./chunk-BYXBJQAS.js";import"./chunk-7AAUCWQR.js";import{a as jo}from"./chunk-FZ3BTEDS.js";import"./chunk-MNIMTV6A.js";import"./chunk-TEIN3CJU.js";import{a as Bo,c as zo}from"./chunk-4TJQHVPV.js";import"./chunk-XGHI7KS5.js";import"./chunk-SM2ZZ44M.js";import"./chunk-DHGPBOST.js";import"./chunk-7O5KE4XQ.js";import"./chunk-QFG6BXC7.js";import{b as di}from"./chunk-3ITR3TRQ.js";import"./chunk-E3ODSFG7.js";import"./chunk-D4DYXVUU.js";import"./chunk-Q2KUA2HM.js";import"./chunk-JPOZLFY4.js";import"./chunk-LNP67U4I.js";import"./chunk-GX4UVFWP.js";import"./chunk-KH4MM3R3.js";import"./chunk-BVCJYP5M.js";import"./chunk-HJIP32AF.js";import"./chunk-45XUUWBS.js";import"./chunk-JK6VBQRQ.js";import"./chunk-UR7B3SVE.js";import"./chunk-ZOXOJ2SW.js";import"./chunk-75FPLXLX.js";import"./chunk-AQBRTEMP.js";import"./chunk-GCZ3C3HM.js";import"./chunk-QGUVMJOM.js";import"./chunk-G4IDWB6G.js";import"./chunk-N5NDHDLL.js";import"./chunk-VNEWJX7J.js";import"./chunk-MQLXRJLY.js";import"./chunk-UWTSORKH.js";import"./chunk-BCD2KHGG.js";import"./chunk-XMQL2ZPB.js";import"./chunk-YQ2HBBL5.js";import"./chunk-4M3H6OJK.js";import"./chunk-2NWUFIXC.js";import"./chunk-KADQP2XK.js";import"./chunk-ECMF7CC2.js";import"./chunk-C4XHNRNH.js";import"./chunk-ZTBOUZVQ.js";import{a as $e,b as We}from"./chunk-Z36TISWV.js";import"./chunk-V5JHT2G4.js";import"./chunk-XM23J7BA.js";import"./chunk-WH6ILIPS.js";import"./chunk-LKIIPTIG.js";import{O as Uo,P as At,Q as vt,R as Ge}from"./chunk-SRUBCUSW.js";import"./chunk-52TU3IL6.js";import{A as Yi,L as Qi,ca as wt,da as De,n as ci,s as xe}from"./chunk-TDIWFVPA.js";import"./chunk-MN2F2UI2.js";import{qa as Wi}from"./chunk-LJV7ZYHU.js";import{E as Re,H as ui,I as Ro,L as Do,b as No,e as Pe,h as Vo,i as mt,j as _t}from"./chunk-25QDB3SE.js";import{a as Ai,f as pt,i as Ot}from"./chunk-KJ3PV2LN.js";import"./chunk-35M7AFQZ.js";import"./chunk-HCVRNL4G.js";import"./chunk-INMDLS22.js";import{j as qo}from"./chunk-AJZMXFMA.js";import"./chunk-YE7HTOLI.js";import"./chunk-NZ4I6U2Z.js";import"./chunk-23N7CA4O.js";import"./chunk-YI7ZQONV.js";import"./chunk-54IZQ3MU.js";import"./chunk-QUO3WGUK.js";import"./chunk-GZLC4DDF.js";import"./chunk-74YMZKOK.js";import"./chunk-6IH4M65S.js";import"./chunk-NGAT3XSV.js";import{a as re}from"./chunk-6DMACB4X.js";import{a as li}from"./chunk-SXLHBEO2.js";import"./chunk-IUPWKUGB.js";import"./chunk-C5J3HTKX.js";import"./chunk-56FUNJ2L.js";import{a as ce}from"./chunk-KORPXNVS.js";import"./chunk-W4BNGQYG.js";import"./chunk-OSVOK6WL.js";import{k as Fo}from"./chunk-WXXKR7LF.js";import"./chunk-R2NO6V5K.js";import{a as bo}from"./chunk-FV2Q4OA6.js";import{e as Rt,j as Dt}from"./chunk-QPZCEWML.js";import"./chunk-L44SDTPC.js";import{f as Lo}from"./chunk-CLQP3QCS.js";import{b as si}from"./chunk-TWVMK4TV.js";import"./chunk-EGNI2XJ3.js";import{a as ut}from"./chunk-A3N634GV.js";import"./chunk-F457L6VT.js";import"./chunk-6BC3ZOBR.js";import{Aa as ct,Fa as we,a as Ke,b as Oe,s as ai,u as ri,v as Po,w as Nt,x as ko}from"./chunk-4U4PLY73.js";import"./chunk-RQ4F2COW.js";import"./chunk-7RWCIHFI.js";import{a as Ao}from"./chunk-GP7G4HVV.js";import{e as Vt}from"./chunk-X5ROTD3U.js";import{a as J}from"./chunk-V4NS6LW3.js";import"./chunk-VFTYDXHH.js";import"./chunk-LJSWAOQY.js";import"./chunk-RFPVTC6I.js";import{b as qt}from"./chunk-SPFBMSSO.js";import{b as W}from"./chunk-TZOYHBJT.js";import{b as He,c as dt,e as le}from"./chunk-34KEMFZC.js";import{b as Qo,c as Mo,g as Ee,j as X,k as K}from"./chunk-4BUGZAA4.js";import"./chunk-3TCRHIAB.js";import{p as Z}from"./chunk-76JNFTGE.js";import{A as no,Ic as mo,Jb as kt,La as Ie,Lc as _o,Mb as so,Mc as vo,Nc as go,Oc as fo,Pc as ho,Qc as xo,Ra as ne,Rc as Co,Sc as Eo,Tc as So,Uc as wn,V as oo,Va as ni,Vc as Lt,Wc as To,Xc as An,Yc as Qn,Zc as yo,_c as $i,bb as Ve,db as ao,g as b,kd as Se,lb as ro,md as Mn,oc as po,qc as te}from"./chunk-C7VFP4N4.js";import{c as L,d as q}from"./chunk-CYMQMRSQ.js";import{C as Hi,F as Gi,d as lo,f as co,g as zi,m as oi,o as ji,r as uo,s as Ki}from"./chunk-SAPP7HDL.js";import"./chunk-YJOTM47P.js";import{g as Ne,i as ae}from"./chunk-2PJAPLDY.js";import"./chunk-UQ5LDOFJ.js";import{Fb as wo,Ua as Io,vb as Oo}from"./chunk-C2CO7BOS.js";import"./chunk-XAC26MV5.js";import"./chunk-UVTXHEDZ.js";import{f as Mt,g as Bi,h as Pt,i as j,j as lt,k as ve}from"./chunk-3APTCJCW.js";import"./chunk-EMVJM2S7.js";import"./chunk-KDTKTPR2.js";import"./chunk-TPWGF6XO.js";import{$c as io,Ac as D,Ad as je,Bc as R,Cb as r,Cc as z,Dc as S,Ha as be,Ia as g,Ib as v,Ic as x,Ja as f,Jc as l,Mc as he,Nc as nt,Oc as Fi,Qc as U,Rc as F,S as In,Sc as B,Tb as P,
1Ua as k,Wc as w,Xc as C,Yb as E,Yc as M,Zc as T,_c as ot,f as it,g as st,id as se,jd as Y,kd as On,lc as c,nc as A,pd as p,qd as _,ra as G,rd as ee,sc as to,sd as I,u as Jn,v as Zn,wa as $,xa as eo,xc as u,yb as Ui,yc as d,zc as y}from"./chunk-MH4BPXDL.js";import"./chunk-E3LNTQT4.js";import{a as Oi,b as wi,l as N}from"./chunk-CU44V7JF.js";var Mi=function(i){return i.EXIT="EXIT",i.KEEP="KEEP",i.SAVE="SAVE",i}(Mi||{}),_a=(()=>{let a=class a{handleKeyUp(e){e.stopPropagation(),e.key===si&&this.close()}constructor(e){this.breakpointObserver=e,this.isSmall=!1}ngOnInit(){this.listenSize()}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmall=e.matches})}close(){this.onAction(Mi.KEEP)}onAction(e){this.modal?.close({action:e})}};a.\u0275fac=function(t){return new(t||a)(v(Z))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-creation-progress-verification-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},hostBindings:function(t,n){t&1&&x("keyup",function(m){return n.handleKeyUp(m)})},decls:19,vars:22,consts:[[3,"onClose","closeAutomatically"],[1,"evaluation-and-questionnaire-creation-progress-verification-modal"],[1,"title"],[1,"content"],["variant","text","fontFamily","font-family-secundary",3,"size"],[1,"actions"],["variant","secondary",3,"onClick","fullSize"],[3,"onClick","fullSize"]],template:function(t,n){t&1&&(u(0,"vedius-modal",0),x("onClose",function(){return n.close()}),u(1,"div",1)(2,"h1",2),C(3),p(4,"translate"),d(),u(5,"div",3)(6,"vedius-text",4),C(7),p(8,"translate"),d(),u(9,"vedius-text",4),C(10),p(11,"translate"),d()(),u(12,"div",5)(13,"vedius-button",6),x("onClick",function(){return n.onAction("EXIT")}),C(14),p(15,"translate"),d(),u(16,"vedius-button",7),x("onClick",function(){return n.onAction("SAVE")}
1),C(17),p(18,"translate"),d()()()()),t&2&&(c("closeAutomatically",!1),r(),A("is-small",n.isSmall),r(2),T(" ",_(4,12,"EVALUATION_QUESTIONNAIRE_CREATION_PROGRESS_MODAL.TITLE")," "),r(3),c("size",n.isSmall?"md":"sm"),r(),T(" ",_(8,14,"EVALUATION_QUESTIONNAIRE_CREATION_PROGRESS_MODAL.INFO_PART_1"),""),r(2),c("size",n.isSmall?"md":"sm"),r(),T(" ",_(11,16,"EVALUATION_QUESTIONNAIRE_CREATION_PROGRESS_MODAL.INFO_PART_2"),""),r(3),c("fullSize",n.isSmall),r(),M(_(15,18,"EVALUATION_QUESTIONNAIRE_CREATION_PROGRESS_MODAL.EXIT_AND_CLEAR")),r(2),c("fullSize",n.isSmall),r(),M(_(18,20,"EVALUATION_QUESTIONNAIRE_CREATION_PROGRESS_MODAL.SAVE_EVALUATION_QUESTIONNAIRE")))},dependencies:[W,X,K,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-creation-progress-verification-modal{display:flex;flex-direction:column;gap:40px}.evaluation-and-questionnaire-creation-progress-verification-modal .title{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;margin:0;display:flex;align-items:center;gap:16px}.evaluation-and-questionnaire-creation-progress-verification-modal .content{width:100%;display:flex;flex-direction:column;gap:24px;color:#425168;box-sizing:border-box}.evaluation-and-questionnaire-creation-progress-verification-modal .actions{width:100%;height:100%;justify-content:flex-end;align-items:flex-start;gap:16px;display:inline-flex}.evaluation-and-questionnaire-creation-progress-verification-modal.is-small .title{font-size:1.25rem;line-height:1.875rem;margin-top:8px}.evaluation-and-questionnaire-creation-progress-verification-modal.is-small .content{padding:24px;background:#f5f6f8;border-radius:8px}.evaluation-and-questionnaire-creation-progress-verification-modal.is-small .actions{flex-direction:column-reverse}.evaluation-and-questionnaire-creation-progress-verification-modal.is-small .actions vedius-button{width:100%}.evaluation-and-questionnaire-creation-progress-verification-modal.is-small .actions vedius-button .vedius-button.secondary{color:#6d7a8e} 2`],encapsulation:2});let i=a;return i})();function pr(i,a){if(i&1){let o=S();u(0,"div",8)(1,"div",9)(2,"vedius-text",10),C(3),d(),u(4,"vedius-text",11),C(5),d()(),u(6,"div",12)(7,"vedius-button",13),x("click",function(){let t=g(o).$implicit,n=l();return f(n.moveSectionUp(t.sectionNumber))}),d(),u(8,"vedius-button",14),x("click",function(){let t=g(o).$implicit,n=l();return f(n.moveSectionDown(t.sectionNumber))}),d()()()}if(i&2){let o=a.$implicit,e=a.index,t=l();r(3),M(o.title),r(2),ot("Se\xE7\xE3o ",e+1," de ",t.sections.length,""),r(2),c("disabled",e===0),r(),c("disabled",e===t.sections.length-1)}}var va=(()=>{let a=class a{constructor(e,t){this.data=e,this.dialogRef=t,this.modal=null,this.questions=[],this.sectionSize=0,this.sections=[],this.originalSections=[],this.questions=e.questions,this.sectionSize=e.sectionSize,this.sections=e.sections,this.form=e.form,this.originalSections=JSON.parse(JSON.stringify(this.sections))}close(){this.modal?.close()}getControls(e,t){return e.get(t)}moveSectionUp(e){let t=this.sections.findIndex(s=>s.sectionNumber===e),n=this.sections[t-1];this.sections[t-1]=this.sections[t],this.sections[t]=n}moveSectionDown(e){let t=this.sections.findIndex(s=>s.sectionNumber===e),n=this.sections[t+1];this.sections[t+1]=this.sections[t],this.sections[t]=n}onSave(){let e=this.prepareBlocks();this.updateMainSection(),this.updateSubsequentSections(),this.reorderQuestions(e),this.updateQuestionSectionNumbers(),this.dialogRef.close({questions:this.questions})}prepareBlocks(){let e=this.originalSections,t=[...this.questions],n={};for(let s=0;s<e.length;s++){let m=e[s],h=0;m.questionPosition>0&&(h=m.questionPosition+1);let O;s+1<e.length?O=e[s+1].questionPosition:O=t.length,n[m.sectionNumber]=t.slice(h,O)}return this.questions=this.questions.filter(s=>s.get("questionType")?.value==="section"),n}updateMainSection(){let e=this.sections[0];this.form.get("title")?.setValue(e.title),this.form.get("description")?.setValue(e.description),this.form.get("sectionNumber")?.setValue(0)}updateSubsequentSections(){for(let e=0;e<this.questions.length;e++){let t=this.questions[e],n=this.sections[e+1];t.get("questionLabel")?.setValue(n.title),t.get("questionDescription")?.setValue(n.description),t.get("sectionNumber")?.setValue(e+1)}}reorderQuestions(e){let t=0;for(let n=0;n<this.sections.length;n++){let s=this.sections[n];this.questions.splice(t,0,...e[s.sectionNumber]),t+=e[s.sectionNumber].length+1}}updateQuestionSectionNumbers(){let e=0;for(let t of this.questions)t.get("questionType")?.value==="section"?e=t.get("sectionNumber")?.value:t.get("sectionNumber")?.setValue(e)}};a.\u0275fac=function(t){return new(t||a)(v(He),v(dt))},a.\u0275cmp=P({type:a,selectors:[["app-move-section"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:14,vars:7,consts:[[1,"div-container"],[1,"text-display"],["variant","display","size","micro"],[1,"sections-list"],["class","section-item",4,"ngFor","ngForOf"],[1,"modal-actions"],["size","large","variant","tertiary","icon","download-outline","customTitle","Cancelar",3,"onClick"],[3,"onClick"],[1,"section-item"],[1,"section-info"],["variant","text","size","md"],["variant","text","size","sm",1,"subSection"],[1,"section-actions"],["iconType","only","icon","arrow-up-section","size","small","variant","tertiary",3,"click","disabled"],["iconType","only","icon","arrow-down-section","size","small","variant","tertiary",3,"click","disabled"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"div",1)(3,"vedius-text",2),C(4,"Reordenar se\xE7\xF5es"),d()(),u(5,"div",3),E(6,pr,9,5,"div",4),d(),u(7,"div",5)(8,"vedius-button",6),x("onClick",function(){return n.onSave()}),C(9),p(10,"translate"),d(),u(11,"vedius-button",7),x("onClick",function(){return n.onSave()}),C(12),p(13,"translate"),d()()()()),t&2&&(r(6),c("ngForOf",n.sections),r(3),T(" ",_(10,3,"BUTTONS.CANCEL")," "),r(3),T(" ",_(13,5,"BUTTONS.SAVE")," "))},dependencies:[W,X,Pt,K,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
2-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.div-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.div-container[_ngcontent-%COMP%] .text-display[_ngcontent-%COMP%]{padding-top:5px;padding-bottom:30px}.div-container[_ngcontent-%COMP%] .move-section-modal[_ngcontent-%COMP%]{width:100%;padding:20px;background-color:#fff;box-shadow:0 2px 10px #0000001a}.div-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:24px;margin-bottom:20px}.div-container[_ngcontent-%COMP%] .sections-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto;border:1px solid #d3dae5;margin-bottom:20px;border-radius:8px}.div-container[_ngcontent-%COMP%] .section-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:15px;border-bottom:1px solid #d3dae5}.div-container[_ngcontent-%COMP%] .section-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.div-container[_ngcontent-%COMP%] .section-info[_ngcontent-%COMP%] .subSection[_ngcontent-%COMP%]{color:#6d7a8e}.div-container[_ngcontent-%COMP%] .section-actions[_ngcontent-%COMP%]{display:flex;gap:10px}.div-container[_ngcontent-%COMP%] .modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px}"]});let i=a;return i})();function mr(i,a){if(i&1){let o=S();u(0,"vedius-menu",1),x("optionItemSelected",function(t){g(o);let n=l();return f(n.onMenuItemOptionSelected(t))}),d()}if(i&2){let o=l();c("matMenuClass",o.hasHidden()?"limit-section-settings-menu":"all-section-settings-menu")("config",o.menuConfig)}}var Ce=function(i){return i.CLONE_SECTION="CLONE_SECTION",i.MOVE_SECTION="MOVE_SECTION",i.DELETE_SECTION="DELETE_SECTION",i.MERGE_WITH_TOP="MERGE_WITH_TOP",i.MERGE_WITH_BOTTOM="MERGE_WITH_BOTTOM",i}(Ce||{}),ga=(()=>{let a=class a{constructor(e){this.vediusTranslation=e,this.hideMenuKeys=[],this.onMenuItemSelected=new k,this.prevHideMenuKeys=[]}ngOnChanges(e){e.hideMenuKeys.currentValue&&this.hasHideMenuKeysChanged()&&this.loadMenuOptions()}ngOnInit(){this.load()}hasHidden(){return this.hideMenuKeys.length>0}load(){this.loadMenuOptions()}loadMenuOptions(){this.prevHideMenuKeys=this.hideMenuKeys||[];let e=this.filterMenuOptions();this.vediusTranslation.loaded().then(()=>{this.menuConfig={buttonConfig:{icon:"dots",iconType:"only",customTitle:this.translation(b.EvaluationQuestionnaireFormQuestionSettings)},options:[...e]}})}filterMenuOptions(){return[{items:[{key:Ce.CLONE_SECTION,display:this.translation(b.EvaluationQuestionnaireFormSectionCloneSection)},{key:Ce.MOVE_SECTION,display:this.translation(b.EvaluationQuestionnaireFormSectionMoveSection)}]},{items:[{key:Ce.MERGE_WITH_TOP,display:this.translation(b.EvaluationQuestionnaireFormSectionMergeWithTop)},{key:Ce.MERGE_WITH_BOTTOM,display:this.translation(b.EvaluationQuestionnaireFormSectionMergeWithBottom)}]},{items:[{key:Ce.DELETE_SECTION,display:this.translation(b.EvaluationQuestionnaireFormSectionDeleteSection),classes:["delete-menu-option"]}]}].map(n=>({items:n.items.filter(s=>!this.hideMenuKeys.includes(s.key))}))}translation(e){return this.vediusTranslation.get(e)}onMenuItemOptionSelected(e){this.onMenuItemSelected.emit({key:e.key,item:e})}hasHideMenuKeysChanged(){let e=this.hideMenuKeys||[];return JSON.stringify(e)!==JSON.stringify(this.prevHideMenuKeys)}};a.\u0275fac=function(t){return new(t||a)(v(J))},a.\u0275cmp=P({type:a,selectors:[["app-section-settings-menu-button"]],inputs:{hideMenuKeys:"hideMenuKeys"},outputs:{onMenuItemSelected:"onMenuItemSelected"},features:[be],decls:1,vars:1,consts:[[3,"matMenuClass","config","optionItemSelected",4,"ngIf"],[3,"optionItemSelected","matMenuClass","config"]],template:function(t,n){t&1&&E(0,mr,1,2,"vedius-menu",0),t&2&&c("ngIf",n.menuConfig)},dependencies:[j,ri],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
2-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.delete-menu-option .vedius-option-content .option-text{color:#f03838}.all-section-settings-menu.mat-mdc-menu-panel{width:190px!important;max-height:222px!important;overflow:hidden}.limit-section-settings-menu.mat-mdc-menu-panel{width:190px!important;max-height:180px!important;overflow:hidden} 3`],encapsulation:2});let i=a;return i})();function _r(i,a){if(i&1){let o=S();u(0,"vedius-switch",5),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l();return f(n.changeResult("toggleQuestionSubTypeText",t.checked))}),d()}if(i&2){let o=l();c("checked",o.subTextValue)("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.MOBILE_LOW_ANSWER"))}}function vr(i,a){if(i&1){let o=S();u(0,"vedius-switch",5),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l();return f(n.changeResult("toggleQuestionSubTypeChoice",t.checked))}),d()}if(i&2){let o=l();c("checked",o.subChoiceValue)("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.MOBILE_CHECKBOX_OPTION"))}}function gr(i,a){if(i&1){let o=S();u(0,"vedius-switch",5),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l();return f(n.changeResult("questionCondition",t.checked))}),d()}if(i&2){let o=l();c("checked",o.questionConditionValue)("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.CONDITIONAL_QUESTION"))}}var hi=function(i){return i.toggleQuestionSubTypeText="toggleQuestionSubTypeText",i.toggleQuestionSubTypeChoice="toggleQuestionSubTypeChoice",i.questionCondition="questionCondition",i.questionRequired="questionRequired",i}(hi||{}),fa=(()=>{let a=class a{constructor(e,t,n){this.breakpointObserver=e,this.dialogRef=t,this.data=n,this.isMobile=!1,this.changes={},this.showSubText=!1,this.subTextValue=!1,this.showSubChoice=!1,this.subChoiceValue=!1,this.showQuestionCondition=!1,this.questionConditionValue=!1,this.questionRequiredValue=!1}ngOnInit(){this.listenIsMobile(),this.load()}load(){this.showSubText=this.getControls(this.question,"questionType").value==="textarea",this.subTextValue=this.getControls(this.question,"questionSubType").value==="text",this.showSubChoice=this.getControls(this.question,"questionType").value==="choice"||this.getControls(this.question,"questionType").value==="gradecheckbox",this.subChoiceValue=this.getControls(this.question,"questionSubType").value==="checkbox",this.showQuestionCondition=this.data.sectionSize>0&&(this.getControls(this.question,"questionType").value==="choice"||this.getControls(this.question,"questionType").value==="select"),this.questionConditionValue=this.getControls(this.question,"questionConditional").value==="true",this.questionRequiredValue=this.getControls(this.question,"questionRequired").value==="true"}get question(){return this.data.question}getControls(e,t){return e?.get(t)}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}changeResult(e,t){this.changes=wi(Oi({},this.changes),{[e]:t})}close(){this.dialogRef.close(this.changes)}};a.\u0275fac=function(t){return new(t||a)(v(Z),v(dt),v(He))},a.\u0275cmp=P({type:a,selectors:[["app-question-settings-options-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:11,vars:13,consts:[[3,"onClose","closeAutomatically"],[1,"question-settings-options-modal"],[1,"title"],[1,"settings-options-content"],[3,"checked","title","click","onCustomChange",4,"ngIf"],[3,"click","onCustomChange","checked","title"]],template:function(t,n){t&1&&(u(0,"vedius-modal",0),x("onClose",function(){return n.close()}),u(1,"div",1)(2,"h1",2),C(3),p(4,"translate"),d(),u(5,"div",3),E(6,_r,2,4,"vedius-switch",4)(7,vr,2,4,"vedius-switch",4)(8,gr,2,4,"vedius-switch",4),u(9,"vedius-switch",5),p(10,"translate"),x("click",function(m){return m.stopPropagation()})("onCustomChange",function(m){return n.changeResult("questionRequired",m.checked)}),d()()()()),t&2&&(c("closeAutomatically",!1),r(),A("small",n.isMobile),r(2),T(" ",_(4,9,"EVALUATION_QUESTIONNAIRE.SETTINGS_MODAL_TITLE")," "),r(3),c("ngIf",n.showSubText),r(),c("ngIf",n.showSubChoice),r(),c("ngIf",n.showQuestionCondition),r(),c("checked",n.questionRequiredValue)("title",_(10,11,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.REQUIRED")))},dependencies:[W,j,Xi,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
3-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.question-settings-options-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.question-settings-options-modal[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;display:flex;align-items:center;gap:16px}.question-settings-options-modal[_ngcontent-%COMP%] .settings-options-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;margin-bottom:24px}.question-settings-options-modal.small[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.875rem;margin-top:12px}"]});let i=a;return i})();function fr(i,a){if(i&1&&(y(0,"vedius-button",11),p(1,"translate")),i&2){l();let o=w(6);c("icon","settings-cog")("customTitle",_(1,3,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.SETTINGS"))("matMenuTriggerFor",o)}}function hr(i,a){if(i&1){let o=S();u(0,"vedius-button",12),p(1,"translate"),x("onClick",function(){g(o);let t=l(2);return f(t.cloneQuestion())}),d()}i&2&&c("icon","copy")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.CLONE"))}function xr(i,a){if(i&1){let o=S();u(0,"vedius-switch",10),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l(2);return f(n.toggleQuestionSubTypeTextChange(t.checked))}),d()}if(i&2){let o=l(2);c("checked",o.getControls(o.question,"questionSubType").value==="text")("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.LOW_ANSWER"))}}function Cr(i,a){if(i&1){let o=S();u(0,"vedius-switch",10),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l(2);return f(n.toggleQuestionSubTypeChoiceChange(t.checked))}),d()}if(i&2){let o=l(2);c("checked",o.getControls(o.question,"questionSubType").value==="checkbox")("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.CHECKBOX_OPTION"))}}function Er(i,a){if(i&1){let o=S();u(0,"vedius-switch",10),p(1,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l(2);return f(n.questionConditionChange(t.checked))}),d()}if(i&2){let o=l(2);c("checked",o.getControls(o.question,"questionConditional").value==="true")("title",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.CONDITIONAL_QUESTION"))}}function Sr(i,a){if(i&1){let o=S();u(0,"div",3),E(1,fr,2,5,"vedius-button",4)(2,hr,2,4,"vedius-button",5),u(3,"vedius-button",6),p(4,"translate"),x("onClick",function(){g(o);let t=l();return f(t.removeQuestion())}),d(),u(5,"mat-menu",7,0)(7,"div",8),E(8,xr,2,4,"vedius-switch",9)(9,Cr,2,4,"vedius-switch",9)(10,Er,2,4,"vedius-switch",9),u(11,"vedius-switch",10),p(12,"translate"),x("click",function(t){return g(o),f(t.stopPropagation())})("onCustomChange",function(t){g(o);let n=l();return f(n.questionRequiredChange(t.checked))}),d()()()()}if(i&2){let o=l();r(),c("ngIf",o.getControls(o.question,"questionType").value!=="slider"),r(),c("ngIf",!o.hideClone),r(),c("icon","trash")("customTitle",_(4,9,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE")),r(5),c("ngIf",o.getControls(o.question,"questionType").value==="textarea"),r(),c("ngIf",o.getControls(o.question,"questionType").value==="choice"||o.getControls(o.question,"questionType").value==="gradecheckbox"),r(),c("ngIf",o.sectionSize>0&&(o.getControls(o.question,"questionType").value==="choice"||o.getControls(o.question,"questionType").value==="select")),r(),c("checked",o.getControls(o.question,"questionRequired").value==="true")("title",_(12,11,"EVALUATION_QUESTIONNAIRE.FORM.SETTINGS_MENU.REQUIRED"))}}function Tr(i,a){if(i&1){let o=S();u(0,"vedius-menu",14),x("optionItemSelected",function(t){g(o);let n=l(2);return f(n.onMenuItemOptionSelected(t))}),d()}if(i&2){let o=l(2);c("config",o.menuConfig)}}function yr(i,a){if(i&1&&(u(0,"div"),E(1,Tr,1,1,"vedius-menu",13),d()),i&2){let o=l();r(),c("ngIf",o.menuConfig)}}var Et=function(i){return i.SETTINGS="SETTINGS",i.CLONE="CLONE",i.REMOVE="REMOVE",i}(Et||{}),ha=(()=>{let a=class a{constructor(e,t){this.vediusTranslation=e,this.dialog=t,this.sectionSize=0,this.isMenuMode=!1,this.hideClone=!1,this.hideMenuKeys=[],this.onCloneQuestion=new k,this.onRemoveQuestion=new k,this.onToggleQuestionSubTypeTextChange=new k,this.onToggleQuestionSubTypeChoiceChange=new k,this.onQuestionConditionChange=new k,this.onQuestionRequiredChange=new k,this.prevHideMenuKeys=[]}ngOnInit(){this.isMenuMode&&this.loadMenuOptions()}ngOnChanges(e){e.hideMenuKeys.currentValue&&this.isMenuMode&&this.hasHideMenuKeysChanged()&&this.loadMenuOptions()}cloneQuestion(){this.onCloneQuestion.emit()}removeQuestion(){this.onRemoveQuestion.emit()}toggleQuestionSubTypeTextChange(e){this.onToggleQuestionSubTypeTextChange.emit(e)}toggleQuestionSubTypeChoiceChange(e){this.onToggleQuestionSubTypeChoiceChange.emit(e)}questionConditionChange(e){this.onQuestionConditionChange.emit(e)}questionRequiredChange(e){this.onQuestionRequiredChange.emit(e)}getControls(e,t){return e?.get(t)}onMenuItemOptionSelected(e){let t=e.key;t===Et.SETTINGS&&this.openSettingsModal(),t===Et.CLONE?this.cloneQuestion():t===Et.REMOVE&&this.removeQuestion()}openSettingsModal(){this.dialog.open(fa,{disableClose:!0,width:"600px",data:{question:this.question,sectionSize:this.sectionSize}}).afterClosed().subscribe(t=>{t&&Object.keys(t).forEach(n=>
3{n===hi.questionCondition&&this.questionConditionChange(t[n]),n===hi.questionRequired&&this.questionRequiredChange(t[n]),n===hi.toggleQuestionSubTypeChoice&&this.toggleQuestionSubTypeChoiceChange(t[n]),n===hi.toggleQuestionSubTypeText&&this.toggleQuestionSubTypeTextChange(t[n])})})}loadMenuOptions(){this.prevHideMenuKeys=this.hideMenuKeys||[];let e=this.filterMenuOptions();this.vediusTranslation.loaded().then(()=>{this.menuConfig={buttonConfig:{icon:"dots",iconType:"only",size:"small"},options:[...e]}})}filterMenuOptions(){return[{items:[{key:Et.SETTINGS,icon:"settings-cog",display:this.translation(b.EvaluationQuestionnaireFormQuestionSettings)},{key:Et.CLONE,icon:"copy",display:this.translation(b.EvaluationQuestionnaireFormQuestionClone)}]},{items:[{key:Et.REMOVE,icon:"trash",display:this.translation(b.EvaluationQuestionnaireFormQuestionDelete)}]}].map(n=>({items:n.items.filter(s=>!this.hideMenuKeys.includes(s.key))}))}translation(e){return this.vediusTranslation.get(e)}hasHideMenuKeysChanged(){let e=this.hideMenuKeys||[];return JSON.stringify(e)!==JSON.stringify(this.prevHideMenuKeys)}};a.\u0275fac=function(t){return new(t||a)(v(J),v(le))},a.\u0275cmp=P({type:a,selectors:[["app-question-settings-options-button"]],inputs:{question:"question",sectionSize:"sectionSize",isMenuMode:"isMenuMode",hideClone:"hideClone",hideMenuKeys:"hideMenuKeys"},outputs:{onCloneQuestion:"onCloneQuestion",onRemoveQuestion:"onRemoveQuestion",onToggleQuestionSubTypeTextChange:"onToggleQuestionSubTypeTextChange",onToggleQuestionSubTypeChoiceChange:"onToggleQuestionSubTypeChoiceChange",onQuestionConditionChange:"onQuestionConditionChange",onQuestionRequiredChange:"onQuestionRequiredChange"},features:[be],decls:2,vars:2,consts:[["menu","matMenu"],["class","question-settings-options-style-settings",4,"ngIf"],[4,"ngIf"],[1,"question-settings-options-style-settings"],["iconType","only","size","small","variant","tertiary",3,"icon","customTitle","matMenuTriggerFor",4,"ngIf"],["iconType","only","size","small","variant","tertiary",3,"icon","customTitle","onClick",4,"ngIf"],["iconType","only","size","small","variant","tertiary",1,"trash-icon",3,"onClick","icon","customTitle"],["xPosition","before",1,"settings-menu"],[1,"settings-menu"],[3,"checked","title","click","onCustomChange",4,"ngIf"],[3,"click","onCustomChange","checked","title"],["iconType","only","size","small","variant","tertiary",3,"icon","customTitle","matMenuTriggerFor"],["iconType","only","size","small","variant","tertiary",3,"onClick","icon","customTitle"],["matMenuClass","question-settings-options-menu",3,"config","optionItemSelected",4,"ngIf"],["matMenuClass","question-settings-options-menu",3,"optionItemSelected","config"]],template:function(t,n){t&1&&E(0,Sr,13,13,"div",1)(1,yr,2,1,"div",2),t&2&&(c("ngIf",n.question&&!n.isMenuMode),r(),c("ngIf",n.isMenuMode))},dependencies:[j,K,Mo,Qo,Xi,ri,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.question-settings-options-style-settings{width:150px;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-top:-6px}.question-settings-options-menu.mat-mdc-menu-panel{width:160px!important}.question-settings-options-menu .vedius-option-content [ng-reflect-svg-icon=trash]{stroke:none!important} 4`],encapsulation:2});let i=a;return i})();function br(i,a){i&1&&z(0)}function Ir(i,a){if(i&1){let o=S();u(0,"div",5),x("click",function(){g(o);let t=l(2);return f(t.addAttachment())}),y(1,"mat-icon",10),d()}}function Or(i,a){if(i&1){let o=S();u(0,"div",3)(1,"div",4)(2,"div",5),x("click",function(){g(o);let t=l();return f(t.addTitle())}),y(3,"mat-icon",6),d(),u(4,"div",5),x("click",function(){g(o);let t=l();return f(t.addQuestion())}),y(5,"mat-icon",7),d(),u(6,"div",5),x("click",function(){g(o);let t=l();return f(t.addSection())}),y(7,"mat-icon",8),d(),E(8,Ir,2,0,"div",9),d()()}if(i&2){let o=l();r(8),c("ngIf",!o.hideAttachment)}}function wr(i,a){if(i&1){let o=S();u(0,"vedius-button",12),p(1,"translate"),x("onClick",function(){g(o);let t=l(2);return f(t.addAttachment())}),d()}i&2&&c("icon","attachment-2")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.ATTACHMENT.ADD"))}function Ar(i,a){if(i&1){let o=S();u(0,"mat-card",11)(1,"vedius-button",12),p(2,"translate"),x("onClick",function(){g(o);let t=l();return f(t.addQuestion())}),d(),u(3,"vedius-button",12),p(4,"translate"),x("onClick",function(){g(o);let t=l();return f(t.addTitle())}),d(),E(5,wr,2,4,"vedius-button",13),u(6,"vedius-button",12),p(7,"translate"),x("onClick",function(){g(o);let t=l();return f(t.addSection())}),d()()}if(i&2){let o=l();r(),c("icon","add-circle-2")("customTitle",_(2,7,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.ADD")),r(2),c("icon","title")("customTitle",_(4,9,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.ADD")),r(2),c("ngIf",!o.hideAttachment),r(),c("icon","section")("customTitle",_(7,11,"EVALUATION_QUESTIONNAIRE.FORM.SECTION.ADD"))}}var xa=(()=>{let a=class a{constructor(){this.hideAttachment=!1,this.onAddQuestion=new k,this.onAddTitle=new k,this.onAddSection=new k,this.onAddAttachment=ne
4w k}addQuestion(){this.onAddQuestion.emit()}addTitle(){this.onAddTitle.emit()}addSection(){this.onAddSection.emit()}addAttachment(){this.onAddAttachment.emit()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=P({type:a,selectors:[["app-side-question-options-builder"]],inputs:{bottom:"bottom",hideAttachment:"hideAttachment"},outputs:{onAddQuestion:"onAddQuestion",onAddTitle:"onAddTitle",onAddSection:"onAddSection",onAddAttachment:"onAddAttachment"},decls:5,vars:1,consts:[["sideButtomOptionsBuilder",""],["sideOptionsBuilder",""],[4,"ngTemplateOutlet"],[1,"side-bottom-question-options-builder"],[1,"side-builder-content-actions"],["tabindex","0",1,"item-action",3,"click"],["svgIcon","title",1,"action-icon"],["svgIcon","add-circle-2",1,"action-icon"],["svgIcon","section",1,"action-icon"],["tabindex","0","class","item-action",3,"click",4,"ngIf"],["svgIcon","attachment",1,"action-icon"],[1,"side-question-options-builder"],["iconType","only","size","large","variant","tertiary",3,"onClick","icon","customTitle"],["iconType","only","size","large","variant","tertiary",3,"icon","customTitle","onClick",4,"ngIf"]],template:function(t,n){if(t&1&&E(0,br,1,0,"ng-container",2)(1,Or,9,1,"ng-template",null,0,I)(3,Ar,8,13,"ng-template",null,1,I),t&2){let s=w(2),m=w(4);c("ngTemplateOutlet",n.bottom?s:m)}},dependencies:[ve,j,Ee,sn,K,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.side-question-options-builder[_ngcontent-%COMP%]{padding:8px;background-color:#fff;display:flex;flex-direction:column;justify-content:space-around;align-items:center;align-self:center;margin-left:24px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #ffffff;border-left:1px solid #ffffff;border-bottom:1px solid #ffffff;border-right:1px solid #ffffff;border-radius:8px;box-shadow:0 4px 16px -8px #00000029}.side-bottom-question-options-builder[_ngcontent-%COMP%]{position:fixed;bottom:0;z-index:3;width:100%;background-color:#fff}.side-bottom-question-options-builder[_ngcontent-%COMP%] .side-builder-content-actions[_ngcontent-%COMP%]{display:flex;width:100%;height:72px;align-items:flex-start;flex-shrink:0}.side-bottom-question-options-builder[_ngcontent-%COMP%] .side-builder-content-actions[_ngcontent-%COMP%] .item-action[_ngcontent-%COMP%]{display:flex;padding:12px;justify-content:center;align-items:center;gap:12px;flex:1 0 0;align-self:stretch;cursor:pointer}.side-bottom-question-options-builder[_ngcontent-%COMP%] .side-builder-content-actions[_ngcontent-%COMP%] .item-action[_ngcontent-%COMP%] .action-icon[_ngcontent-%COMP%]{stroke:#425168}"]});let i=a;return i})();var Pr=["inputOptions"],kr=()=>({height:"90px"}),Lr=()=>({height:"160px"}),Ca=(i,a)=>({isVisible:i,index:a});function qr(i,a){i&1&&z(0)}function Nr(i,a){i&1&&z(0)}function Vr(i,a){if(i&1&&(D(0),E(1,Nr,1,0,"ng-container",13),R()),i&2){l(2);let o=w(9);r(),c("ngTemplateOutlet",o)}}function Rr(i,a){if(i&1&&(D(0),y(1,"app-evaluation-and-questionnaire-previews",15),R()),i&2){let o=l(2);r(),c("title",o.controls.title.value)("description",o.controls.description.value)("questions",o.questions)("sectionSize",o.sectionSize)("readOnlyMode",!1)("showSaveButton",!1)("isSmall",o.isSmall)}}function Dr(i,a){if(i&1&&(D(0)(1),E(2,qr,1,0,"ng-container",13)(3,Vr,2,1,"ng-container",14),R(),E(4,Rr,2,7,"ng-container",14),R()),i&2){let o=l(),e=w(5);r(),A("builder-hidden-form",o.showPreview),r(),c("ngTemplateOutlet",e),r(),c("ngIf",o.isSmall),r(),c("ngIf",o.showPreview)}}function Ur(i,a){i&1&&y(0,"ngx-skeleton-loader",16)(1,"ngx-skeleton-loader",16),i&2&&(c("count",1)("theme",se(4,kr)),r(),c("count",3)("theme",se(5,Lr)))}function Fr(i,a){if(i&1&&(u(0,"mat-card",26)(1,"vedius-text",27),C(2),p(3,"translate"),d()()),i&2){let o=l(3);r(2),ot(" ",_(3,2,"EVALUATION_QUESTIONNAIRE.FORM.SECTION.SECTION_LABEL")," 1 de ",o.sectionSize+1,"")}}function Br(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.LABEL_ERROR")," "))}function zr(i,a){if(i&1&&E(0,Br,3,3,"ng-container",14),i&2){let o=l(5);c("ngIf",o.controls.title.hasError("required"))}}function jr(i,a){if(i&1){let o=S();u(0,"vedius-button",37),p(1,"translate"),x("onClick",function(){g(o);let t=l(5);return f(t.confirmRemoveSection(t.form))}),d()}i&2&&c("icon","trash")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE"))}function Kr(i,a){if(i&1){let o=S();u(0,"div",30)(1,"div",31)(2,"vedius-input",32),p(3,"translate"),E(4,zr,1,1,"ng-template",null,4,I),d(),u(6,"div",33),E(7,jr,2,4,"vedius-button",34),u(8,"app-section-settings-menu-button",35),x("onMenuItemSelected",function(t){g(o);let n=l(4);return f(n.onFirstSectionSettingsMenuItemSelected(t))}),d()()(),y(9,"vedius-input",36),p(10,"translate"),d()}if(i&2){let o=w(5),e=l(4);r(2),c("maxLength",1e3)("label",_(3,9,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.LABEL"))("control",e.controls.title)("errorTemplate",o),r(5),c("ngIf",e.sectionSize>0),r(),c("hideMenuKeys",e.firstSectionSettingsMenuButtonHideKeys),r(),c("label",_(10,11,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DESCRIPTION"))("maxLength",5e3)("c
4ontrol",e.controls.description)}}function Hr(i,a){if(i&1&&(u(0,"div",41),C(1),d()),i&2){let o=l(5);r(),T(" ",o.controls.description.value," ")}}function Gr(i,a){if(i&1&&(u(0,"div",38)(1,"div",39),C(2),p(3,"translate"),d(),E(4,Hr,2,1,"div",40),d()),i&2){let o=l(4);r(2),T(" ",o.controls.title.value!==""?o.controls.title.value:_(3,2,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," "),r(2),c("ngIf",o.controls.description.value)}}function $r(i,a){if(i&1&&(D(0),E(1,Kr,11,13,"div",28)(2,Gr,5,4,"div",29),R()),i&2){let o=l(3);r(),c("ngIf",o.focusedTitle),r(),c("ngIf",!o.focusedTitle)}}function Wr(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.LABEL_ERROR")," "))}function Yr(i,a){if(i&1&&E(0,Wr,3,3,"ng-container",14),i&2){let o=l(5);c("ngIf",o.controls.title.hasError("required"))}}function Xr(i,a){if(i&1&&(u(0,"div",30)(1,"vedius-input",32),p(2,"translate"),E(3,Yr,1,1,"ng-template",null,4,I),d(),y(5,"vedius-input",36),p(6,"translate"),d()),i&2){let o=w(4),e=l(4);r(),c("maxLength",1e3)("label",_(2,7,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.LABEL"))("control",e.controls.title)("errorTemplate",o),r(4),c("label",_(6,9,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DESCRIPTION"))("maxLength",5e3)("control",e.controls.description)}}function Jr(i,a){if(i&1&&(u(0,"div",41),C(1),d()),i&2){let o=l(5);r(),T(" ",o.controls.description.value," ")}}function Zr(i,a){if(i&1&&(u(0,"div",38)(1,"div",39),C(2),p(3,"translate"),d(),E(4,Jr,2,1,"div",40),d()),i&2){let o=l(4);r(2),T(" ",o.controls.title.value!==""?o.controls.title.value:_(3,2,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," "),r(2),c("ngIf",o.controls.description.value)}}function es(i,a){if(i&1){let o=S();u(0,"vedius-button",37),p(1,"translate"),x("onClick",function(){g(o);let t=l(5);return f(t.confirmRemoveSection(t.form))}),d()}i&2&&c("icon","trash")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE"))}function ts(i,a){if(i&1){let o=S();u(0,"div",33),E(1,es,2,4,"vedius-button",34),u(2,"app-section-settings-menu-button",35),x("onMenuItemSelected",function(t){g(o);let n=l(4);return f(n.onFirstSectionSettingsMenuItemSelected(t))}),d()()}if(i&2){let o=l(4);r(),c("ngIf",o.sectionSize>0),r(),c("hideMenuKeys",o.firstSectionSettingsMenuButtonHideKeys)}}function is(i,a){if(i&1&&(D(0),E(1,Xr,7,11,"div",28)(2,Zr,5,4,"div",29)(3,ts,3,2,"div",42),R()),i&2){let o=l(3);r(),c("ngIf",o.focusedTitle),r(),c("ngIf",!o.focusedTitle),r(),c("ngIf",o.focusedTitle)}}function ns(i,a){i&1&&z(0)}function os(i,a){if(i&1){let o=S();u(0,"div",20),x("click",function(){g(o);let t=l(2);return f(t.setFocusTitle())}),E(1,Fr,4,4,"mat-card",21),u(2,"div",22)(3,"mat-card",23)(4,"form",24),E(5,$r,3,2,"ng-container",14)(6,is,4,3,"ng-container",14),d()(),E(7,ns,1,0,"ng-container",25),d()()}if(i&2){let o=l(2),e=w(7);r(),c("ngIf",o.sectionSize>0),r(2),A("focused",o.focusedTitle),c("ngClass",o.sectionSize===0?"custom-title":"custom-title-section"),r(),c("formGroup",o.form),r(),c("ngIf",o.isSmall),r(),c("ngIf",!o.isSmall),r(),c("ngTemplateOutlet",e)("ngTemplateOutletContext",On(9,Ca,o.focusedTitle,-1))}}function as(i,a){if(i&1&&(u(0,"mat-option",63),C(1),p(2,"translate"),d()),i&2){let o=l(),e=o.$implicit,t=o.index;c("value",e),r(),ot(" ",_(2,3,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.GO_TO_SECTION")," ",t+1," ")}}function rs(i,a){if(i&1&&(D(0),E(1,as,3,5,"mat-option",64),R()),i&2){let o=a.index,e=l(3).index,t=l(2);r(),c("ngIf",t.searchSectionField(e)!==o+1)}}function ss(i,a){if(i&1&&(u(0,"mat-form-field",61)(1,"mat-select",62)(2,"mat-option",63),C(3),p(4,"translate"),d(),E(5,rs,2,1,"ng-container",19),u(6,"mat-option",63),C(7),p(8,"translate"),d()()()),i&2){let o=l(2).$implicit,e=l(2);r(),c("formControl",e.getControls(o,"sectionConditional")),r(),c("value","next"),r(),M(_(4,6,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.NEXT_SECTION")),r(2),c("ngForOf",e.sectionArray),r(),c("value","finish"),r(),M(_(8,8,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.CLOSE_EVALUATION"))}}function ls(i,a){if(i&1&&(u(0,"div",55)(1,"div",56)(2,"vedius-text",57),C(3),p(4,"translate"),d()(),u(5,"div",58)(6,"div",59),E(7,ss,9,10,"mat-form-field",60),d()()()),i&2){let o=l().$implicit,e=l(2);r(3),ot(" ",_(4,3,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.AFTER_SECTION")," ",e.getControls(o,"sectionNumber").value,""),r(4),c("ngIf",e.sectionSize>0)}}function cs(i,a){i&1&&(u(0,"div",66),y(1,"mat-icon",67),d())}function us(i,a){if(i&1&&(u(0,"mat-card",65)(1,"vedius-text",27),C(2),p(3,"translate"),d(),E(4,cs,2,0,"div",49),d()),i&2){let o=l().$implicit,e=l(2);r(2),io(" ",_(3,4,"EVALUATION_QUESTIONNAIRE.FORM.SECTION.SECTION_LABEL")," ",e.getControls(o,"sectionNumber").value+1," de ",e.sectionSize+1,""),r(2),c("ngIf",e.sectionSize>0)}}function ds(i,a){i&1&&(u(0,"div",66),y(1,"mat-icon",67),d())}function ps(i,a){if(i&1){let o=S();u(0,"vedius-filter-dropdown-button",72,5),x("onFilterSelect",function(t){g(o);let n=l(2).$implicit,s=l(2);return f(s.setTypeFilter(n,t))}),d()}if(i&2){let o=l(2).$implicit,e=l(2);c("isMobile",!1)("config",e.getTypeFilterConfigFor(o))("showBadge",!1)("size",e.isSmall?"small":"large")}}function ms(i,a){if(i&1){let o=S();u(0,"div",68)(1,"div",69),E(2,ps,2,4,"vedius-filter-dropdown-button",70),d(),u(3,"app-question-settings-options-button",71),x("onCloneQuestion",function(){g(o);let t=l(),n=t.$implicit,s=t.index,m=l(2);return f(m.cloneQuestion(n,s))})("onRemoveQuestion",function(){g(o);let t=l(),n=t.$implicit,s=t.index,m=l(2);return f(m.removeQuestion(n,s))})("onToggleQuestionSubTypeTextChange",function(t){g(o);let n=l().$implicit,s=l(2);return f(s.onToggleChange(n,"questionSubType",t?"text":"textarea"))})("onToggleQuestionSubTypeChoiceChange",function(t){g(o);let n=l().$implicit,s=l(2);return f(s.onToggleChange(n,"questionSubType",t?"checkbox":"radio"))})("onQuestionConditionChange",function(t){g(o);let n=l().$implicit,s=l(2);return f(s.onToggleChange(n,"questionConditional",t?"true":""))})("onQuestionRequiredChange",function(t){g(o);let n=l().$implicit,s=l(2);return f(s.onToggleChange(n,"questionRequired",t?"true":""))}),d()()}if(i&2){let o=l(),e=o.$implicit,t=o.index,n=l(2);r(2),c("ngIf",n.focusedElement===t),r(),c("isMenuMode",n.isSmall)("hideMenuKeys",n.getQuestionSettingsHideMenuKeys(e))("hideClone",n.getControls(e,"questionType").value==="attachment")("sectionSize",n.sectionSize)("question",e)}}function _s(i,a){if(i&1&&(D(0),C(1),R()),i&2){let o=l(3).$implicit,e=l(2);r(),T(" ",e.getQuestionTextError(o)," ")}}function vs(i,a){if(i&1&&E(0,_s,2,1,"ng-container",14),i&2){let o=l(2).$implicit,e=l(2);c("ngIf",e.getControls(o,"questionLabel").hasError("required"))}}function gs(i,a){if(i&1){let o=S();u(0,"vedius-button",37),p(1,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.removeQuestion(n,s))}),d()}i&2&&c("icon","trash")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE"))}function fs(i,a){if(i&1){let o=S();u(0,"vedius-button",77),p(1,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.cloneQuestion(n,s))}),d()}i&2&&c("icon","copy")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.CLONE"))}function hs(i,a){if(i&1){let o=S();u(0,"div",33)(1,"vedius-button",37),p(2,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.confirmRemoveSection(n,s))}),d(),u(3,"app-section-settings-menu-button",78),x("onMenuItemSelected",function(t){g(o);let n=l(2),s=n.$implicit,m=n.index,h=l(2);return f(h.onSectionSettingsMenuItemSelected(t,s,m))}),d()()}i&2&&(r(),c("icon","trash")("customTitle",_(2,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE")))}function xs(i,a){if(i&1&&(u(0,"div",75),y(1,"vedius-input",79),p(2,"translate"),d()),i&2){let o=l(2),e=o.$implicit,t=o.index,n=l(2);nt("id","label-response-",t,""),r(),c("label",_(2,4,"EVALUATION_QUESTIONNAIRE.ATTACHMENT.MEDICAL_RECORD_TIT
4LE"))("control",n.getControls(e,"medicalRecordTitle"))}}function Cs(i,a){if(i&1&&(D(0),u(1,"div",73)(2,"vedius-input",32),p(3,"translate"),E(4,vs,1,1,"ng-template",null,6,I),d(),E(6,gs,2,4,"vedius-button",34)(7,fs,2,4,"vedius-button",74)(8,hs,4,4,"div",42),d(),u(9,"div",75),y(10,"vedius-input",36),p(11,"translate"),d(),E(12,xs,3,6,"div",76),R()),i&2){let o=w(5),e=l(),t=e.$implicit,n=e.index,s=l(2);r(),nt("id","label-response-",n,""),r(),c("maxLength",1e3)("label",_(3,15,s.getQuestionLabel(t)))("control",s.getControls(t,"questionLabel"))("errorTemplate",o),r(4),c("ngIf",s.getControls(t,"questionType").value==="title"),r(),c("ngIf",s.getControls(t,"questionType").value==="title"),r(),c("ngIf",s.getControls(t,"questionType").value==="section"),r(),nt("id","label-response-",n,""),r(),c("label",_(11,17,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DESCRIPTION"))("maxLength",5e3)("control",s.getControls(t,"questionDescription")),r(2),c("ngIf",s.getControls(t,"questionType").value==="attachment")}}function Es(i,a){if(i&1&&(D(0),C(1),R()),i&2){let o=l(3).$implicit,e=l(2);r(),T(" ",e.getQuestionTextError(o)," ")}}function Ss(i,a){if(i&1&&E(0,Es,2,1,"ng-container",14),i&2){let o=l(2).$implicit,e=l(2);c("ngIf",e.getControls(o,"questionLabel").hasError("required"))}}function Ts(i,a){if(i&1&&(u(0,"div",75),y(1,"vedius-input",79),p(2,"translate"),d()),i&2){let o=l(2),e=o.$implicit,t=o.index,n=l(2);nt("id","label-response-",t,""),r(),c("label",_(2,4,"EVALUATION_QUESTIONNAIRE.ATTACHMENT.MEDICAL_RECORD_TITLE"))("control",n.getControls(e,"medicalRecordTitle"))}}function ys(i,a){if(i&1&&(D(0),u(1,"div",75)(2,"vedius-input",32),p(3,"translate"),E(4,Ss,1,1,"ng-template",null,6,I),d()(),u(6,"div",75),y(7,"vedius-input",36),p(8,"translate"),d(),E(9,Ts,3,6,"div",76),R()),i&2){let o=w(5),e=l(),t=e.$implicit,n=e.index,s=l(2);r(),nt("id","label-response-",n,""),r(),c("maxLength",1e3)("label",_(3,12,s.getQuestionLabel(t)))("control",s.getControls(t,"questionLabel"))("errorTemplate",o),r(4),nt("id","label-response-",n,""),r(),c("label",_(8,14,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DESCRIPTION"))("maxLength",5e3)("control",s.getControls(t,"questionDescription")),r(2),c("ngIf",s.getControls(t,"questionType").value==="attachment")}}function bs(i,a){if(i&1){let o=S();u(0,"vedius-button",37),p(1,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.removeQuestion(n,s))}),d()}i&2&&c("icon","trash")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE"))}function Is(i,a){if(i&1){let o=S();u(0,"vedius-button",77),p(1,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.cloneQuestion(n,s))}),d()}i&2&&c("icon","copy")("customTitle",_(1,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.CLONE"))}function Os(i,a){if(i&1){let o=S();u(0,"div",33)(1,"vedius-button",37),p(2,"translate"),x("onClick",function(){g(o);let t=l(2),n=t.$implicit,s=t.index,m=l(2);return f(m.confirmRemoveSection(n,s))}),d(),u(3,"app-section-settings-menu-button",78),x("onMenuItemSelected",function(t){g(o);let n=l(2),s=n.$implicit,m=n.index,h=l(2);return f(h.onSectionSettingsMenuItemSelected(t,s,m))}),d()()}i&2&&(r(),c("icon","trash")("customTitle",_(2,2,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.DELETE")))}function ws(i,a){if(i&1&&(u(0,"div",80),E(1,bs,2,4,"vedius-button",34)(2,Is,2,4,"vedius-button",74)(3,Os,4,4,"div",42),d()),i&2){let o=l().$implicit,e=l(2);r(),c("ngIf",e.getControls(o,"questionType").value==="title"),r(),c("ngIf",e.getControls(o,"questionType").value==="title"),r(),c("ngIf",e.getControls(o,"questionType").value==="section")}}function As(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MIN_VALUE_ERROR")," "))}function Qs(i,a){if(i&1&&E(0,As,3,3,"ng-container",14),i&2){let o=l(2).$implicit,e=l(2);c("ngIf",e.getControls(o,"minValue").hasError("required"))}}function Ms(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MAX_VALUE_ERROR")," "))}function Ps(i,a){if(i&1&&E(0,Ms,3,3,"ng-container",14),i&2){let o=l(2).$implicit,e=l(2);c("ngIf",e.getControls(o,"maxValue").hasError("required"))}}function ks(i,a){if(i&1&&(u(0,"div")(1,"div",81)(2,"vedius-input",82),p(3,"translate"),E(4,Qs,1,1,"ng-template",null,4,I),d(),u(6,"div",83),C(7,"at\xE9"),d(),u(8,"vedius-input",82),p(9,"translate"),E(10,Ps,1,1,"ng-template",null,4,I),d()(),u(12,"div",30)(13,"div",84)(14,"div",85),C(15),d(),y(16,"vedius-input",86),p(17,"translate"),d(),u(18,"div",84)(19,"div",85),C(20),d(),y(21,"vedius-input",86),p(22,"translate"),d()()()),i&2){let o=l().$implicit,e=l(2);r(2),c("label",_(3,14,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MIN_VALUE"))("maxLength",4)("floatLabel","always")("control",e.getControls(o,"minValue")),r(6),c("label",_(9,16,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MAX_VALUE"))("maxLength",4)("floatLabel","always")("control",e.getControls(o,"maxValue")),r(7),T(" ",e.getControls(o,"minValue").value," "),r(),c("label",_(17,18,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MARKER"))("control",e.getControls(o,"minLabel")),r(4),T(" ",e.getControls(o,"maxValue").value," "),r(),c("label",_(22,20,"EVALUATION_QUESTIONNAIRE.FORM.QUESTION.MARKER"))("control",e.getControls(o,"maxLabel"))}}function Ls(i,a){i&1&&(u(0,"div",99),y(1,"mat-icon",100),d())}function qs(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.OPTION_PLACEHOLDER_ERROR")," "))}function Ns(i,a){if(i&1&&E(0,qs,3,3,"ng-container",14),i&2){let o=l().$implicit,e=l(4);c("ngIf",e.getControls(o,"optionLabel").hasError("required"))}}function Vs(i,a){if(i&1&&(u(0,"mat-option",63),C(1),p(2,"translate"),d()),i&2){let o=l(),e=o.$implicit,t=o.index;c("value",e),r(),ot(" ",_(2,3,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.GO_TO_SECTION")," ",t+1," ")}}function Rs(i,a){if(i&1&&(D(0),E(1,Vs,3,5,"mat-option",64),R()),i&2){let o=a.index,e=l(4).index,t=l(2);r(),c("ngIf",t.searchSectionField(e)!==o+1)}}function Ds(i,a){if(i&1){let o=S();u(0,"div",93)(1,"div",59)(2,"mat-form-field",61)(3,"mat-select",101),x("selectionChange",function(){g(o);let t=l(5);return f(t.emitQuestionChange())}),u(4,"mat-option",63),C(5),p(6,"translate"),d(),E(7,Rs,2,1,"ng-container",19),u(8,"mat-option",63),C(9),p(10,"translate"),d()()()()()}if(i&2){let o=l().$implicit,e=l(4);r(3),c("formControl",e.getControls(o,"optionConditional")),r(),c("value","next"),r(),M(_(6,6,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.NEXT_SECTION")),r(2),c("ngForOf",e.sectionArray),r(),c("value","finish"),r(),M(_(10,8,"EVALUATION_QUESTIONNAIRE.FORM.CONDITIONS.CLOSE_EVALUATION"))}}function Us(i,a){if(i&1){let o=S();u(0,"button",102),x("click",function(){g(o);let t=l().index,n=l(2).$implicit,s=l(2);return f(s.removeOption(n,t,"options"))}),y(1,"mat-icon",103),d()}}function Fs(i,a){if(i&1){let o=S();u(0,"div")(1,"div",92)(2,"div",51)(3,"div",93)(4,"div",84),E(5,Ls,2,0,"div",94),u(6,"div",85),C(7),d(),u(8,"div",95)(9,"vedius-input",96,7),p(11,"translate"),x("onCustomKeyup",function(){g(o);let t=l(4);return f(t.emitQuestionChange())}),E(12,Ns,1,1,"ng-template",null,8,I),d(),E(14,Ds,11,10,"div",97),d()()(),E(15,Us,2,0,"button",98),d()()()}if(i&2){let o,e,t=a.$implicit,n=a.index,s=w(13),m=l(2),h=m.$implicit,O=m.index,Q=l(2);r(5),c("ngIf",((o=h.get("options"))==null||o.value==null?null:o.value.length)>1),r(2),T(" ",Q.getOptionLetter(n)," "),r(2),Fi("key","",O,"-options-",n,""),c("control",Q.getControls(t,"optionLabel"))("placeholder",_(11,
411,"EVALUATION_QUESTIONNAIRE.FORM.OPTION_PLACEHOLDER"))("selectOnFocus",!0)("errorTemplate",s),r(5),c("ngIf",Q.sectionSize>0&&Q.getControls(t,"optionConditional")&&Q.getControls(h,"questionConditional").value==="true"),r(),c("ngIf",((e=h.get("options"))==null?null:e.value.length)>1)}}function Bs(i,a){i&1&&(u(0,"vedius-text",104),C(1),p(2,"translate"),d()),i&2&&(r(),M(_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.OR_OPTION")))}function zs(i,a){if(i&1){let o=S();u(0,"vedius-button",105),x("onClick",function(){g(o);let t=l(2).$implicit,n=l(2);return f(n.addOtherOption(t,n.getTranslation("OTHER_OPTION")))}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),T(" ",_(2,2,"EVALUATION_QUESTIONNAIRE.FORM.OTHER_OPTION")," "))}function js(i,a){if(i&1){let o=S();u(0,"div",87),x("cdkDropListDropped",function(t){g(o);let n=l(3);return f(n.dropQuestion(t))}),E(1,Fs,16,13,"div",19),u(2,"div",88)(3,"vedius-button",89),x("onClick",function(){g(o);let t=l().$implicit,n=l(2);return f(n.addOption(t,"options",n.getTranslation("MATRIX_OPTION")))}),C(4),p(5,"translate"),p(6,"translate"),d(),E(7,Bs,3,3,"vedius-text",90)(8,zs,3,4,"vedius-button",91),d()()}if(i&2){let o,e,t,n=l().$implicit,s=l(2);c("cdkDropListData",(o=n.get("options"))==null?null:o.value),r(),c("ngForOf",(e=n.get("options"))==null?null:e.value),r(),A("margin-left-choise-or-select-option-button",((t=n.get("options"))==null||t.value==null?null:t.value.length)>1),r(),c("fullSize",!0),r(),T(" ",s.isSmall?_(5,8,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.ADD_OPTION_MOBILE"):_(6,10,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.ADD_OPTION")," "),r(3),c("ngIf",!s.isOtherItemInQuestionOptions(n)),r(),c("ngIf",!s.isOtherItemInQuestionOptions(n))}}function Ks(i,a){i&1&&(u(0,"div",113),y(1,"mat-icon",100),d())}function Hs(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.OPTION_PLACEHOLDER_ERROR")," "))}function Gs(i,a){if(i&1&&E(0,Hs,3,3,"ng-container",14),i&2){let o=l().$implicit,e=l(4);c("ngIf",e.getControls(o,"optionLabel").hasError("required"))}}function $s(i,a){if(i&1){let o=S();u(0,"button",102),x("click",function(){g(o);let t=l().index,n=l(2).$implicit,s=l(2);return f(s.removeOption(n,t,"rows"))}),y(1,"mat-icon",103),d()}}function Ws(i,a){if(i&1&&(u(0,"div")(1,"div",110)(2,"div",84),E(3,Ks,2,0,"div",111),u(4,"vedius-input",112,7),E(6,Gs,1,1,"ng-template",null,9,I),d(),E(8,$s,2,0,"button",98),d()()()),i&2){let o,e,t=a.$implicit,n=a.index,s=w(7),m=l(2),h=m.$implicit,O=m.index,Q=l(2);r(3),c("ngIf",((o=h.get("rows"))==null||o.value==null?null:o.value.length)>1),r(),Fi("key","",O,"-rows-",n,""),c("control",Q.getControls(t,"optionLabel"))("selectOnFocus",!0)("errorTemplate",s),r(4),c("ngIf",((e=h.get("rows"))==null?null:e.value.length)>1)}}function Ys(i,a){i&1&&(u(0,"div",113),y(1,"mat-icon",100),d())}function Xs(i,a){i&1&&(D(0),C(1),p(2,"translate"),R()),i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE.FORM.OPTION_PLACEHOLDER_ERROR")," "))}function Js(i,a){if(i&1&&E(0,Xs,3,3,"ng-container",14),i&2){let o=l().$implicit,e=l(4);c("ngIf",e.getControls(o,"optionLabel").hasError("required"))}}function Zs(i,a){if(i&1){let o=S();u(0,"button",102),x("click",function(){g(o);let t=l().index,n=l(2).$implicit,s=l(2);return f(s.removeOption(n,t,"columns"))}),y(1,"mat-icon",103),d()}}function el(i,a){if(i&1&&(u(0,"div")(1,"div",110)(2,"div",84),E(3,Ys,2,0,"div",111),u(4,"vedius-input",112,7),E(6,Js,1,1,"ng-template",null,10,I),d(),E(8,Zs,2,0,"button",98),d()()()),i&2){let o,e,t=a.$implicit,n=a.index,s=w(7),m=l(2),h=m.$implicit,O=m.index,Q=l(2);r(3),c("ngIf",((o=h.get("columns"))==null||o.value==null?null:o.value.length)>1),r(),Fi("key","",O,"-columns-",n,""),c("control",Q.getControls(t,"optionLabel"))("selectOnFocus",!0)("errorTemplate",s),r(4),c("ngIf",((e=h.get("columns"))==null?null:e.value.length)>1)}}function tl(i,a){if(i&1){let o=S();u(0,"div",30)(1,"div",106)(2,"div",107),x("cdkDropListDropped",function(t){g(o);let n=l(3);return f(n.dropQuestion(t))}),u(3,"vedius-text",108),C(4),p(5,"translate"),d(),E(6,Ws,9,8,"div",19),u(7,"vedius-button",109),x("onClick",function(){g(o);let t=l().$implicit,n=l(2);return f(n.addOption(t,"rows",n.getTranslation("MATRIX_LINE")))}),C(8),p(9,"translate"),d()(),u(10,"div",107),x("cdkDropListDropped",function(t){g(o);let n=l(3);return f(n.dropQuestion(t))}),u(11,"vedius-text",108),C(12),p(13,"translate"),d(),E(14,el,9,8,"div",19),u(15,"vedius-button",109),x("onClick",function(){g(o);let t=l().$implicit,n=l(2);return f(n.addOption(t,"columns",n.getTranslation("MATRIX_COLUMN")))}),C(16),p(17,"translate"),d()()()()}if(i&2){let o,e,t,n,s,m,h=l().$implicit,O=l(2);r(),c("ngClass",O.isSmall?"div-style-column":"div-style-row"),r(),c("cdkDropListData",(o=h.get("rows"))==null?null:o.value),r(2),T(" ",_(5,13,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.LINES")," "),r(2),c("ngForOf",(e=h.get("rows"))==null?null:e.value),r(),A("margin-left-option-button",((t=h.get("rows"))==null||t.value==null?null:t.value.length)>1),r(),T(" ",_(9,15,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.ADD_LINE")," "),r(2),c("cdkDropListData",(n=h.get("columns"))==null?null:n.value),r(2),T(" ",_(13,17,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.COLUMNS")," "),r(2),c("ngForOf",(s=h.get("columns"))==null?null:s.value),r(),A("margin-left-option-button",((m=h.get("columns"))==null||m.value==null?null:m.value.length)>1),r(),T(" ",_(17,19,"EVALUATION_QUESTIONNAIRE.FORM.MATRIX.ADD_COLUMN")," ")}}function il(i,a){if(i&1&&(u(0,"div",30),y(1,"app-evaluation-and-questionnaire-preview",114),d()),i&2){let o=l().$implicit,e=l(2);r(),c("isSmall",e.isSmall)("question",o)("sectionSize",e.sectionSize)("readOnlyMode",!1)}}function nl(i,a){i&1&&z(0)}function ol(i,a){if(i&1){let o=S();D(0),u(1,"div",43),y(2,"vedius-select",44),E(3,ls,8,5,"div",45),u(4,"div",46),x("click",function(){let t=g(o).index,n=l(2);return f(n.setFocus(t))}),E(5,us,5,6,"mat-card",47),u(6,"div",48)(7,"mat-card",48),E(8,ds,2,0,"div",49),u(9,"form",24)(10,"div",48),E(11,ms,4,6,"div",50),u(12,"div",51)(13,"div",52),E(14,Cs,13,19,"ng-container",14)(15,ys,10,16,"ng-container",14),d(),E(16,ws,4,3,"div",53),d(),E(17,ks,23,22,"div",14)(18,js,9,12,"div",54)(19,tl,18,21,"div",28),d(),E(20,il,2,4,"div",28),d()(),E(21,nl,1,0,"ng-container",25),d()()(),R()}if(i&2){let o=a.$implicit,e=a.index,t=l(2),n=w(7);r(),A("small",t.isSmall),c("cdkDragDisabled",t.isDragQuestionDisabled()),r(),c("hidden",!0),r(),c("ngIf",t.getControls(o,"questionType").value==="section"),r(2),c("ngIf",t.getControls(o,"questionType").value==="section"),r(),c("ngClass",t.getControls(o,"questionType").value!=="section"?"div-style-row padding-top":"div-style-row"),r(),A("focused",t.focusedElement===e),c("ngClass",t.getControls(o,"questionType").value!=="section"?"custom-card":"custom-card-section"),r(),c("ngIf",t.getControls(o,"questionType").value!=="section"&&t.questions&&t.questions.length>1),r(),c("formGroup",t.form),r(),c("ngClass",t.focusedElement===e?"form":"builder-hidden-form"),r(),c("ngIf",t.getControls(o,"questionType").value!=="section"&&t.getControls(o,"questionType").value!=="title"),r(3),c("ngIf",t.isSmall),r(),c("ngIf",!t.isSmall),r(),c("ngIf",(t.getControls(o,"questionType").value==="section"||t.getControls(o,"questionType").value==="title")&&!t.isSmall),r(),c("ngIf",t.getControls(o,"questionType").value==="numericscale"||t.getControls(o,"questionType").value==="slider"),r(),c("ngIf",t.getControls(o,"questionType").value==="select"||t.getControls(o,"questionType").value==="choice"),r(),c("ngIf",t.getControls(o,"questionType").value==="gradecheckbox"),r(),c("ngIf",t.focusedElement!==e),r(),c("ngTemplateOutlet",n)("ngTemplateOutletContext",On(23,Ca,t.focusedElement===e,e))}}function al(i,a){if(i&1){let o=S();E(0,os,8,12,"div",17),u(1,"div",18),x("cdkDropListDropped",function(t){g(o);let n=l();return f(n.dropQuestion(t))}),E(2,ol,22,26,"ng-container",19),d()}if(i&2){let o=l();c("ngIf",!o.showPreview),r(),A("builder-hidden-form",o.showPreview),c("cdkDropListData",o.questions),r(),c("ngForOf",o.questions)}}function rl(i,a){if(i&1){let o=S();u(0,"app-side-question-options-builder",116),x("onAddQuestion",function(){g(o);let t=l().index,n=l();return f(n.addQuestion("textarea",t))})("onAddTitle",function(){g(o);let t=l().index,n=l();return f(n.addQuestion("title",t))})("onAddSection",function(){g(o);let t=l().index,n=l();return f(n.addQuestion("section",t))})("onAddAttachment",function(){g(o);let t=l().index,n=l();return f(n.addQuestion("attachment",t))}),d()}if(i&2){let o=l(2);c("hideAttachment",o.shouldHideAttachmentOption)}}function sl(i,a){if(i&1&&E(0,rl,1,1,"app-side-question-options-builder",115),i&2){let o=a.isVisible,e=l();c("ngIf",o&&!e.isSmall&&e.showOptionBuilder)}}function ll(i,a){if(i&1){let o=S();u(0,"app-side-question-options-builder",118),x("onAddQuestion",function(){g(o);let t=l(2);return f(t.addQuestion("textarea"))})("onAddTitle",function(){g(o);let t=l(2);return f(t.addQuestion("title"))})("onAddSection",function(){g(o);let t=l(2);return f(t.addQuestion("section"))})("onAddAttachment",function(){g(o);let t=l(2);return f(t.addQuestion("attachment"))}),d()}if(i&2){let o=l(2);c("bottom",!0)("hideAttachment",o.shouldHideAttachmentOption)}}function cl(i,a){if(i&1&&E(0,ll,1,2,"app-side-question-options-builder",117),i&2){let o=l();c("ngIf",o.isSmall&&o.showOptionBuilder)}}var qn=(()=>{let a=class a{constructor(e,t,n,s,m){this.formBuilder=e,this.translateService=t,this.dialog=n,this.toastService=s,this.appContext=m,this.isLoading=!1,this.isSmall=!1,this.showOptionBuilder=!0,this.titleChange=new k,this.descriptionChange=new k,this.questionChange=new k,this.duplicateQuestionIdsDetected=new k,this.translationMapping={MATRIX_LINE:b.EvaluationQuestionnaireFormMatrixLine,MATRIX_OPTION:b.EvaluationQuestionnaireFormMatrixOption,MATRIX_COLUMN:b.EvaluationQuestionnaireFormMatrixColumn,OTHER_OPTION:b.EvaluationQuestionnaireFormMatrixOtherOption,LABEL_TITLE_ERROR:b.EvaluationQuestionnaireFormTitleLabelError,LABEL_QUESTION_ERROR:b.EvaluationQuestionnaireFormQuestionLabelError,LABEL_QUESTION:b.EvaluationQuestionnaireFormQuestionLabel,LABEL_TITLE:b.EvaluationQuestionnaireFormTitleLabel},this.sectionSettingsMenuItemActions=new Map([[Ce.CLONE_SECTION,(h,O)=>this.cloneSection(h,O)],[Ce.DELETE_SECTION,(h,O)=>this.confirmRemoveSection(h,O)],[Ce.MERGE_WITH_BOTTOM,(h,O)=>this.mergeWithNextSection(h,O)],[Ce.MERGE_WITH_TOP,(h,O)=>this.removeQuestion(h,O)],[Ce.MOVE_SECTION,()=>this.moveSection()]]),this.questions=[],this.focusedElement=-1,this.focusedTitle=!0,this.sectionSize=0,this.conditionalQuestionOption="",this.showPreview=!1,this.isBackFromPreview=!1,this.typeModel=te.EVALUATION,this.typeFilterConfig={type:"single",label:"Texto livre",showArrowIcon:!0,buttonIcon:"text",buttonIconSide:"left",showSelectedOptionLabel:!0,showCounterQty:!1,sections:[{options:[{label:"Texto livre",value:"textarea",icon:"text"},{value:"choice",label:"M\xFAltipla escolha",icon:"choice"},{value:"select",label:"Lista suspensa",icon:"select"}]},{options:[{value:"slider",label:"Escala linear",icon:"linear-scale"},{value:"numericscale",label:"Escala num\xE9rica",icon:"numeric-scale"},{value:"gradecheckbox",label:"Grade de sele\xE7\xE3o",icon:"grade"}]},{options:[{value:"date",label:"Data",icon:"menu-date"},{value:"time",label:"Hor\xE1rio",icon:"menu-time"}]},{options:[{value:"painmap",label:"Mapa de dor",icon:"painmap"}]},{options:[{value:"attachment",label:"Anexos",icon:"attachment"}]}]},this.form=this.getForm()}get isTrial(){return!!this.appContext.getUserCredential()?.userVedius?.settings?.platformAccess?.isTrial}get shouldHideAttachmentOption(){return this.isTrial||this.hasAttachmentQuestion()}get firstSectionSettingsMenuButtonHideKeys(){return this.sectionSize>0?[Ce.MERGE_WITH_TOP]:[Ce.MERGE_WITH_TOP,Ce.MERGE_WITH_BOTTOM,Ce.DELETE_SECTION,Ce.MOVE_SECTION]}getTypeFilterConfigFor(e){let t=e.get("questionType")?.value,n=this.isTrial||t!=="attachment"&&this.hasAttachmentQuestion();return t==="attachment"||!n?this.typeFilterConfig:this.getTypeFilterConfigWithoutAttachment()}getTypeFilterConfigWithoutAttachment(){return this.typeFilterConfigWithoutAttachment||(this.t
4ypeFilterConfigWithoutAttachment=wi(Oi({},this.typeFilterConfig),{sections:this.typeFilterConfig.sections.map(e=>wi(Oi({},e),{options:e.options.filter(t=>t.value!=="attachment")})).filter(e=>e.options.length>0)})),this.typeFilterConfigWithoutAttachment}ngOnChanges(e){if(e.evaluationQuestionnaire?.currentValue){let t=e.evaluationQuestionnaire?.currentValue;this.setEvaluationQuestionnaireFormData(t,!0),this.typeModel=t.type,this.emitDuplicateQuestionIdsDetected(t.questions),this.subscriptions?.forEach(n=>{n.unsubscribe()}),this.subscriptions=this.listenChanges()}}ngOnInit(){this.translateService.loaded().then(()=>{this.setTranslations(),this.initialOptionsValue&&!this.evaluationQuestionnaire&&(this.setInitialEvaluationQuestionnaireOptionsFormData(this.initialOptionsValue),this.startListenFormChange())})}clearCurrentQuestionValues(){this.evaluationQuestionnaire?.questions?.forEach(e=>{e.currentQuestionValue=""}),this.questions.forEach(e=>{e.value&&e.value.currentQuestionValue!==void 0&&(e.value.currentQuestionValue="");let t=e.get("currentQuestionValue");t&&t.setValue(""),e.controls&&e.controls.currentQuestionValue&&e.controls.currentQuestionValue.setValue("")})}ngAfterViewInit(){this.startListenFormChange()}listenChanges(){let e=[],t=(n,s)=>{if(n){let m=n.valueChanges.pipe(In(200)).subscribe(h=>{this.isLoading||s(h)});e.push(m)}};return t(this.controls.title,n=>{this.showPreview||this.titleChange.emit(n)}),t(this.controls.description,n=>{this.showPreview||this.descriptionChange.emit(n)}),this.questions.forEach(n=>{let s=n.valueChanges.pipe(In(300)).subscribe(()=>{this.isLoading||this.emitQuestionChange()});e.push(s)}),e}get controls(){return this.form.controls}formHasErrors(){Ai(this.form);let e=this.questions.some(n=>{if(Ai(n),n.value?.questionType==="gradecheckbox"){let m=n.get("rows").value.some(Q=>!Q.valid),O=n.get("columns").value.some(Q=>!Q.valid);return m||O}return n.value?.questionType==="select"?n.get("options").value.some(h=>!h.valid):n.value.questionType==="choice"?n.get("options").value.some(h=>!h.valid):!n.valid}),t=!this.form.valid||e;return t&&this.controls.title?.invalid&&(this.focusedElement=-1,this.focusedTitle=!0),t}hasErrorQuestion(e){if(e.value?.questionType==="gradecheckbox"){let n=e.get("rows").value.some(h=>!h.valid),m=e.get("columns").value.some(h=>!h.valid);return n||m}return e.value?.questionType==="select"?e.get("options").value.some(s=>!s.valid):e.value.questionType==="choice"?e.get("options").value.some(s=>!s.valid):!e.valid}getForm(){return Co(this.formBuilder)}startListenFormChange(){this.subscriptions=this.listenChanges()}emitQuestionChange(){this.showPreview||this.isBackFromPreview||this.questionChange.emit(this.questions)}createQuestionFormGroup(e,t,n){return ho(t,n,e,this.formBuilder)}createOptionFormGroup(e){return xo(e,this.formBuilder)}getControls(e,t){return e?.get(t)}addQuestion(e,t=this.focusedElement){if(e==="attachment"&&this.hasAttachmentQuestion()){this.toastService.showError({title:this.translateService.get(b.EvaluationQuestionnaireAttachmentOnlyOneAllowed)});return}let n=0;t>-1&&(n=this.questions[t].get("sectionNumber")?.value);let s=this.createQuestionFormGroup(n,e,"");this.questions.splice(t+1,0,s),e==="section"&&(this.sectionSize++,Lt(this.questions));let m=25;this.updateFilterDropdownQuestionOptions(m),setTimeout(()=>{this.setFocus(t+1),this.subscriptions=this.listenChanges()},m)}getQuestionLabel(e){let t=e.get("questionType")?.value;return t!=="section"&&t!=="title"?b.EvaluationQuestionnaireFormQuestionLabel:b.EvaluationQuestionnaireFormTitleLabel}getTitleTextLabel(){return this.getTranslation("LABEL_QUESTION")}getQuestionTextError(e){return e.get("questionType")?.value!=="section"&&e.get("questionType")?.value!=="title"?this.getTranslation("LABEL_QUESTION_ERROR"):this.getTranslation("LABEL_TITLE_ERROR")}onFirstSectionSettingsMenuItemSelected(e){let n={[Ce.CLONE_SECTION]:()=>this.cloneSection(this.form),[Ce.MOVE_SECTION]:()=>this.moveSection(),[Ce.MERGE_WITH_BOTTOM]:()=>this.mergeWithNextSection(this.form),[Ce.DELETE_SECTION]:()=>this.confirmRemoveSection(this.form)}[e.key];n&&n()}onSectionSettingsMenuItemSelected(e,t,n){let s=this.sectionSettingsMenuItemActions.get(e.key);s&&s(t,n)}removeQuestion(e,t){this.questions.splice(t,1),e.get("questionType")?.value==="section"&&(this.sectionSize--,e.get("sectionNumber")?.value===1&&To(0,0,this.questions),Lt(this.questions)),$i(this.questions),this.emitQuestionChange(),this.applyFocus(t)}confirmRemoveSection(e,t){this.dialog.open(an,{width:"600px",data:{title:this.translateService.get(b.EvaluationQuestionnaireDeleteSectionTitle)}}).afterClosed().subscribe(s=>{s?.isConfirmed&&this.removeSection(e,t)})}removeSection(e,t){let n=!t,s=e.get("sectionNumber")?.value,m=t||0,h=this.questions[m];for(;h&&h.get("sectionNumber")?.value===s;)this.questions.splice(m,1),h=this.questions[m];this.sectionSize--,Lt(this.questions),n&&this.removeFirstSection(),$i(this.questions),this.applyFocus(t??0),this.emitQuestionChange(),this.listenChanges()}removeFirstSection(){let e=this.questions.findIndex(t=>t.controls.questionType?.value==="section"&&t.controls.sectionNumber?.value===1);if(e!==-1){let t=this.questions.slice(0,e);this.questions.splice(0,t.length);let n=this.questions[e];this.form.controls.title.setValue(n.controls.questionLabel?.value??""),this.form.controls.description.setValue(n.controls.questionDescription?.value??"");for(let s=e+1;s<this.questions.length;s++){let m=this.questions[s];if(m.get("sectionNumber")?.value===1)m.controls.sectionNumber?.setValue(0);else break}this.questions.splice(e,1)}}mergeWithNextSection(e,t=0){let n=e.get("sectionNumber")?.value,s=0;for(let m=t+1;m<this.questions.length;m++)if(this.questions[m].get("questionType")?.value==="section"){s=m;break}for(let m=t+1;m<s;m++)this.questions[m].get("sectionNumber")?.setValue(n);this.questions.splice(s,1),this.sectionSize--,Lt(this.questions),$i(this.questions),this.applyFocus(t),this.emitQuestionChange(),this.listenChanges()}cloneQuestion(e,t){if(e.get("questionType")?.value==="attachment"){this.toastService.showError({title:this.translateService.get(b.EvaluationQuestionnaireAttachmentOnlyOneAllowed)});return}let n=this.cloneFormGroup(e);this.questions.splice(t,0,n),e.get("questionType")?.value==="section"&&(this.sectionSize++,Lt(this.questions)),this.emitQuestionChange(),this.listenChanges()}cloneSection(e,t){let n=!t,s=e.get("sectionNumber")?.value,m=e.get("questionType")?.value==="section"||n,h=t||0,O=this.questions[h],Q=[];for(;O&&(!m||m&&O.get("sectionNumber")?.value===s);)Q.push(this.cloneFormGroup(O)),h++,O=this.questions[h];if(n){let H=this.createQuestionFormGroup(s,"section","");H.controls.questionLabel?.setValue(e.get("title")?.value??""),H.controls.questionDescription?.setValue(e.get("description")?.value??""),Q.push(H)}this.questions.splice(t||0,0,...Q),m&&(this.sectionSize++,Lt(this.questions)),this.emitQuestionChange(),this.listenChanges()}applyFocus(e){setTimeout(()=>{e==0?this.questions.length==0?this.setFocusTitle():this.setFocus(e):this.setFocus(e-1)},25)}cloneFormGroup(e){return vo(e)}removeOption(e,t,n){e.get(n)?.value.splice(t,1),this.emitQuestionChange()}addOption(e,t,n){let s=this.isOtherItemInQuestionOptions(e),m=this.createOptionFormGroup(`${n} ${e.get(t)?.value.length+1}`);s?e.get(t)?.value.splice(e.get(t)?.value.length-1,0,m):e.get(t)?.value.push(m),this.updateQuestionState(e),this.focusOnLastOptionInput(e,t)}focusOnLastOptionInput(e,t,n=100){clearTimeout(this.focusInterval);let s=e.get("questionId")?.value,h=this.isOtherItemInQuestionOptions(e)?e.get(t)?.value?.length-2:e.get(t)?.value?.length-1,Q=`${this.questions.findIndex(H=>H.get("questionId")?.value===s)}-${t}-${h}`;this.focusInterval=setTimeout(()=>{this.inputOptions?.forEach(H=>{if(H.key===Q&&(H.selectText(),H.inputElementRef)){H.inputElementRef?.
4nativeElement?.scrollIntoView({behavior:"smooth",block:"center"});return}})},n)}addOtherOption(e,t){let n=this.createOptionFormGroup(t);e.get("options")?.value.push(n),this.updateQuestionState(e),setTimeout(()=>{let s=e.get("options")?.value;s[s.length-1]?.setValue({optionConditional:"next",optionLabel:t})},1e3)}isOtherItemInQuestionOptions(e){let t=this.translateService.get(b.EvaluationQuestionnaireFormMatrixOtherOption);return e.get("options")?.value.findIndex(s=>s.get("optionLabel")?.value===t)!==-1}ensureOtherIsLast(e){let t=e.get("options")?.value,n=this.translateService.get(b.EvaluationQuestionnaireFormMatrixOtherOption);if(t){let s=t.findIndex(m=>m.get("optionLabel")?.value===n);if(s!==-1&&s!==t.length-1){let m=t.splice(s,1)[0];t.push(m)}}}updateQuestionState(e){this.emitQuestionChange(),this.startListenFormChange(),this.disableControlOption(e)}disableControlOption(e){if(this.isOtherItemInQuestionOptions(e)){let n=this.translateService.get(b.EvaluationQuestionnaireFormMatrixOtherOption),s=e.get("options")?.value.findIndex(m=>m.get("optionLabel")?.value===n);s!==-1&&e.get("options")?.value[s]?.get("optionLabel")?.disable()}}setFocus(e){!this.showPreview&&this.focusedElement!==e&&(this.focusedElement=e,this.focusedTitle=!1,this.disableControlOption(this.questions[e]),this.scrollAfterFocused(),this.updateFilterDropdownQuestionOptions())}scrollAfterFocused(){setTimeout(()=>{let e=document.querySelector(".focused");e&&ro(e,0)})}removeFocus(){this.focusedElement=-1}setFocusTitle(){this.showPreview||(this.focusedElement=-1,this.focusedTitle=!0)}onToggleChange(e,t,n){e.get(t)?.setValue(n),t==="questionConditional"&&yo(e)}getOptionLetter(e){return String.fromCharCode(65+e)}getParseMatrixChoise(e){return _o(e)}hasAttachmentQuestion(e){return this.questions.some(t=>t.get("questionType")?.value==="attachment"&&t.get("questionId")?.value!==e)}setTypeFilter(e,t){let n=t,s=e.get("questionId")?.value;if(n.value==="attachment"&&this.hasAttachmentQuestion(s)){this.toastService.showError({title:this.translateService.get(b.EvaluationQuestionnaireAttachmentOnlyOneAllowed)});return}n.value===po.PAIN_MAP&&this.questions.some(m=>m!==e&&m.get("questionId")?.value===s)&&e.get("questionId")?.setValue(mo.new().value),e.get("questionType")?.setValue(n.value),n.value!=="attachment"&&e.get("medicalRecordTitle")?.setValue(""),n.value=="gradecheckbox"?(e.get("rows")?.setValue([]),e.get("columns")?.setValue([]),this.addOption(e,"rows",this.getTranslation("MATRIX_LINE")),this.addOption(e,"columns",this.getTranslation("MATRIX_COLUMN"))):(n.value=="select"||n.value=="choice")&&(e.get("options")?.setValue([]),this.addOption(e,"options",this.getTranslation("MATRIX_OPTION"))),this.emitQuestionChange(),this.startListenFormChange()}setTranslations(){for(let e in this.translationMapping)Object.prototype.hasOwnProperty.call(this.translationMapping,e)&&(this[e]=this.translateService.get(this.translationMapping[e]))}getTranslation(e){return this[e]}setEvaluationQuestionnaireFormData(e,t){So(e,this.formBuilder,this.questions,this.form,t),this.sectionSize=wn(this.questions),this.updateFilterDropdownQuestionOptions()}setInitialEvaluationQuestionnaireOptionsFormData(e){Eo(e.title??"",e?.description??"",e?.question??[],this.formBuilder,this.questions,this.form),this.sectionSize=wn(this.questions),this.updateFilterDropdownQuestionOptions(),this.emitDuplicateQuestionIdsDetected(e?.question??[])}emitDuplicateQuestionIdsDetected(e){this.duplicateQuestionIdsDetected.emit(go(e))}updateFilterDropdownQuestionOptions(e=25){setTimeout(()=>{let t=this.questions;this.filterDropdownComponents.forEach(n=>{let s=t[this.focusedElement];if(s){let m=s.get("questionType")?.value;if(m){let h=this.typeFilterConfig.sections.map(O=>O.options).flat().find(O=>O.value===m);h&&n?.onItemClick(h,!1)}}})},e)}previewForm(e){if(e){this.focusedElement=-1,this.focusedTitle=!1;let t=!1;this.questions.forEach(n=>{An(n,t),Qn(n)})}else{this.focusedTitle=!0,this.isBackFromPreview=!0;let t=!0;this.questions.forEach(n=>{An(n,t),Qn(n)}),this.backFromPreviewTimer&&clearTimeout(this.backFromPreviewTimer),this.backFromPreviewTimer=setTimeout(()=>{this.isBackFromPreview=!1},1e3)}this.showPreview=e}moveSection(){this.openModal(va)}searchSectionField(e){let t=0;for(let n=e;n>0;n--){let s=this.questions[n];if(s.get("questionType")?.value==="section"){t=s.get("sectionNumber")?.value;break}}return t}get sectionArray(){return Array.from({length:this.sectionSize+1},(e,t)=>t)}findQuestionConditional(e){return this.questions.find(t=>t.get("questionType")?.value!=="section"&&t.get("sectionNumber")?.value===e&&t.get("questionConditional")?.value==="true")}findOptionConditional(e){return this.questions.find(t=>t.get("questionType")?.value!=="section"&&t.get("sectionNumber")?.value===e&&t.get("questionConditional")?.value==="true")}isDragQuestionDisabled(){return this.sectionSize===0&&this.questions.length<=1}openModal(e){let t=[],n={title:this.form.get("title")?.value,description:this.form.get("description")?.value,sectionNumber:this.form.get("sectionNumber")?.value,questionPosition:0};t.push(n),this.questions.forEach((m,h)=>{m.get("questionType")?.value=="section"&&(n={title:m.get("questionLabel")?.value,description:m.get("questionDescription")?.value,sectionNumber:m.get("sectionNumber")?.value,questionPosition:h},t.push(n))}),this.dialog.open(e,{width:"600px",data:{questions:this.questions,isMobile:!1,sectionSize:this.sectionSize,sections:t,form:this.form}}).afterClosed().subscribe(m=>{m&&m.questions&&(this.questions=m.questions,this.emitQuestionChange(),this.startListenFormChange())})}
4ngOnDestroy(){this.subscriptions?.forEach(e=>e.unsubscribe())}dropQuestion(e){e.previousContainer===e.container?aa(e.container.data,e.previousIndex,e.currentIndex):ra(e.previousContainer.data,e.container.data,e.previousIndex,e.currentIndex),this.focusedElement>=0&&this.ensureOtherIsLast(this.questions[this.focusedElement]),Lt(this.questions)}getQuestionSettingsHideMenuKeys(e){let t=this.getControls(e,"questionType").value,n=[];return this.isSmall&&t==="slider"&&n.push(Et.SETTINGS),t==="attachment"&&n.push(Et.CLONE),n}};a.\u0275fac=function(t){return new(t||a)(v(Hi),v(J),v(le),v(ut),v(ct))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-builder"]],viewQuery:function(t,n){if(t&1&&(U(Wi,5),U(Pr,5)),t&2){let s;F(s=B())&&(n.filterDropdownComponents=s),F(s=B())&&(n.inputOptions=s)}},inputs:{initialOptionsValue:"initialOptionsValue",evaluationQuestionnaire:"evaluationQuestionnaire",isLoading:"isLoading",isSmall:"isSmall",showOptionBuilder:"showOptionBuilder"},outputs:{titleChange:"titleChange",descriptionChange:"descriptionChange",questionChange:"questionChange",duplicateQuestionIdsDetected:"duplicateQuestionIdsDetected"},features:[be],decls:10,vars:10,consts:[["loading",""],["evaluationQuestionnaireBuilderView",""],["sideQuestionOptionsBuilder",""],["questionOptionsBuilderBottomBar",""],["titleError",""],["filterDropdown",""],["descriptionError",""],["inputOptions",""],["inputOptionsTemplate",""],["inputCheckboxOptionsTemplate",""],["inputCheckbox2OptionsTemplate",""],[1,"evaluation-and-questionnaire-builder-component"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"title","description","questions","sectionSize","readOnlyMode","showSaveButton","isSmall"],[1,"loader",3,"count","theme"],["class","div-style-column","tabindex","0",3,"click",4,"ngIf"],["cdkDropList","",1,"div-style-column","question-initial-container",3,"cdkDropListDropped","cdkDropListData"],[4,"ngFor","ngForOf"],["tabindex","0",1,"div-style-column",3,"click"],["class","custom-top-section",4,"ngIf"],[1,"div-style-row"],[1,"first-card-section",3,"ngClass"],[3,"formGroup"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"custom-top-section"],["variant","text","size","xl","weight","normal",1,"text-sections"],["class","form",4,"ngIf"],["class","builder-div-title",4,"ngIf"],[1,"form"],[1,"content-with-action"],["type","textarea",1,"title-input-textarea",3,"maxLength","label","control","errorTemplate"],[1,"section-settings-button-actions"],["class","trash-icon","iconType","only","size","small","variant","tertiary",3,"icon","customTitle","onClick",4,"ngIf"],[3,"onMenuItemSelected","hideMenuKeys"],["type","textarea",3,"label","maxLength","control"],["iconType","only","size","small","variant","tertiary",1,"trash-icon",3,"onClick","icon","customTitle"],[1,"builder-div-title"],[1,"title-text"],["class","description-text",4,"ngIf"],[1,"description-text"],["class","section-settings-button-actions",4,"ngIf"],["cdkDrag","",1,"evaluation-questionnaire-card-cdk-drag",3,"cdkDragDisabled"],[3,"hidden"],["class","conditions",4,"ngIf"],["tabindex","0",3,"click"],["class","custom-top-section question",4,"ngIf"],[3,"ngClass"],["cdkDragHandle","","class","evaluation-and-questionnaire-drag-handle-container",4,"ngIf"],["class","div-style-header",4,"ngIf"],[1,"div-style-row","gap-3"],[1,"div-style-column","gap-3"],["class","div-style-column gap-4",4,"ngIf"],["class","form evaluation-questionnaire-options-cdk-drag","cdkDropList","",3,"cdkDropListData","cdkDropListDropped",4,"ngIf"],[1,"conditions"],[1,"condition-section-div-text"],["variant","text","size","md","weight","normal",1,"condition-sections-text"],[1,"conditions-select"],[1,"vedius-select-container"],["appearance","outline",4,"ngIf"],["appearance","outline"],[3,"formControl"],[3,"value"],[3,"value",4,"ngIf"],[1,"custom-top-section","question"],["cdkDragHandle","",1,"evaluation-and-questionnaire-drag-handle-container"],["svgIcon","drag-drop-vertical"],[1,"div-style-header"],[1,"div-style-select"],[3,"isMobile","config","showBadge","size","onFilterSelect",4,"ngIf"],[3,"onCloneQuestion","onRemoveQuestion","onToggleQuestionSubTypeTextChange","onToggleQuestionSubTypeChoiceChange","onQuestionConditionChange","onQuestionRequiredChange","isMenuMode","hideMenuKeys","hideClone","sectionSize","question"],[3,"onFilterSelect","isMobile","config","showBadge","size"],[1,"content-with-action",3,"id"],["iconType","only","size","small","variant","tertiary",3,"icon","customTitle","onClick",4,"ngIf"],[3,"id"],[3,"id",4,"ngIf"],["iconType","only","size","small","variant","tertiary",3,"onClick","icon","customTitle"],[3,"onMenuItemSelected"],[3,"label","control"],[1,"div-style-column","gap-4"],[1,"div-style-slider-values"],["type","number",1,"vedius-style-number-input",3,"label","maxLength","floatLabel","control"],[1,"div-style-text"],[1,"div-style-text-label"],[1,"radio-label"],["type","text",1,"vedius-style-input-label",3,"label","control"],["cdkDropList","",1,"form","evaluation-questionnaire-options-cdk-drag",3,"cdkDropListDropped","cdkDropListData"],[1,"add-question-button-container"],["size","small","variant","secondary",1,"add-question-button",3,"onClick","fullSize"],["variant","text","size","md","class","neutral-darker-color",4,"ngIf"],["class","other-question-button","size","small","variant","secondary",3,"fullSize","onClick",4,"ngIf"],["cdkDrag","",1,"form","evaluation-questionnaire-options-cdk-drag-container"],[1,"div-style-column","gap-2"],["cdkDragHandle","","class","evaluation-and-questionnaire-option-drag-handle-container",4,"ngIf"],[1,"input-with-condition"],["type","text",1,"vedius-style-input-label",3,"onCustomKeyup","key","control","placeholder","selectOnFocus","errorTemplate"],["class","div-style-column gap-2",4,"ngIf"],["class","close",3,"click",4,"ngIf"],["cdkDragHandle","",1,"evaluation-and-questionnaire-option-drag-handle-container"],["svgIcon","drag-drop"],[3,"selectionChange","formControl"],[1,"close",3,"click"],["svgIcon","close",1,"icon-close"],["variant","text","size","md",1,"neutral-darker-color"],["size","small","variant","secondary",1,"other-question-button",3,"onClick","fullSize"],[1,"gap-3",3,"ngClass"],["cdkDropList","",1,"div-style-column","gap-2","evaluation-questionnaire-gradecheckbox-cdk-drag",3,"cdkDropListDropped","cdkDropListData"],["variant","text","size","md","weight","normal",1,"text-options"],["size","small","variant","secondary",3,"onClick"],["cdkDrag","",1,"form","evaluation-questionnaire-gradecheckbox-cdk-drag-container"],["cdkDragHandle","","class","evaluation-and-questionnaire-gradecheckbox-drag-handle-container",4,"ngIf"],["type","text",1,"vedius-style-input-label",3,"key","control","selectOnFocus","errorTemplate"],["cdkDragHandle","",1,"evaluation-and-questionnaire-gradecheckbox-drag-handle-container"],[3,"isSmall","question","sectionSize","readOnlyMode"],[3,"hideAttachment","onAddQuestion","onAddTitle","onAddSection","onAddAttachment",4,"ngIf"],[3,"onAddQuestion","onAddTitle","onAddSection","onAddAttachment","hideAttachment"],[3,"bottom","hideAttachment","onAddQuestion","onAddTitle","onAddSection","onAddAttachment",4,"ngIf"],[3,"onAddQuestion","onAddTitle","onAddSection","onAddAttachment","bottom","hideAttachment"]],template:function(t,n){if(t&1&&(u(0,"div",11),E(1,Dr,5,5,"ng-container",12),d(),E(2,Ur,2,6,"ng-template",null,0,I)(4,al,3,5,"ng-template",null,1,I)(6,sl,1,1,"ng-template",null,2,I)(8,cl,1,1,"ng-template",null,3,I)),t&2){let s=w(3);A("single-section",n.sectionSize===0)("loading",n.isLoading)("small",n.isSmall)("show-option-builder",n.showOptionBuilder),r(),c("ngIf",!n.isLoading)("ngIfElse",s)}},dependencies:[j,ve,$t,We,$e,sn,X,Bi,Gi,ji,co,zi,uo,Ki,pt,K,ga,ca,Pt,la,zo,qo,Bo,Fo,sa,Ee,Wi,ha,ua,xa,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
4-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-builder-component{padding:32px 0;width:940px;box-sizing:border-box}.evaluation-and-questionnaire-builder-component .title-input-textarea .vedius-input-container .mat-mdc-form-field.vedius-input textarea,.evaluation-and-questionnaire-builder-component .title-input-textarea .vedius-input-container .mat-form-field.mat-form-field-disabled.vedius-input textarea{height:auto}.evaluation-and-questionnaire-builder-component .question-initial-container{margin-bottom:10%}.evaluation-and-questionnaire-builder-component .evaluation-and-questionnaire-drag-handle-container{position:absolute;top:8px;left:50%;cursor:move}.evaluation-and-questionnaire-builder-component .neutral-darker-color{color:#425168}.evaluation-and-questionnaire-builder-component .evaluation-questionnaire-options-cdk-drag-container .evaluation-and-questionnaire-option-drag-handle-container,.evaluation-and-questionnaire-builder-component .evaluation-questionnaire-gradecheckbox-cdk-drag-container .evaluation-and-questionnaire-gradecheckbox-drag-handle-container{cursor:move}.evaluation-and-questionnaire-builder-component .add-question-button-container{display:flex;align-items:center;gap:12px;align-self:stretch}.evaluation-and-questionnaire-builder-component.loading .loader{width:100%}.evaluation-and-questionnaire-builder-component .margin-left-option-button{margin-left:35px}.evaluation-and-questionnaire-builder-component .margin-left-choise-or-select-option-button{margin-left:65px}.evaluation-and-questionnaire-builder-component .section-settings-button-actions{display:flex;flex-direction:column;align-items:center;gap:4px}.evaluation-and-questionnaire-builder-component .trash-icon mat-icon{stroke:none}.evaluation-and-questionnaire-builder-component app-side-question-options-builder{position:relative}.evaluation-and-questionnaire-builder-component app-side-question-options-builder .side-question-options-builder{position:absolute;top:0}.evaluation-and-questionnaire-builder-component .div-style-row{display:flex;flex-direction:row}.evaluation-and-questionnaire-builder-component .div-style-row .first-card-section form{flex-direction:row;display:flex;align-items:flex-start;gap:24px}.evaluation-and-questionnaire-builder-component .div-style-row .first-card-section form .form{width:100%}.evaluation-and-questionnaire-builder-component .div-style-row .custom-title{width:100%;height:100%;max-width:858px;border-top:8px solid #0d7180!important;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px}.evaluation-and-questionnaire-builder-component .div-style-row .custom-title-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.evaluation-and-questionnaire-builder-component .div-style-row .custom-card{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px;position:relative}.evaluation-and-questionnaire-builder-component .div-style-row .custom-card-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.evaluation-and-questionnaire-builder-component .div-style-row .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}
4.evaluation-and-questionnaire-builder-component .div-style-row .icon-close{width:20px}.evaluation-and-questionnaire-builder-component .div-style-column{display:flex;flex-direction:column}.evaluation-and-questionnaire-builder-component .div-style-column .custom-top-section{width:100%;height:62px;max-width:858px;background-color:#0d7180;padding:16px 24px;border-radius:8px 8px 0 0}.evaluation-and-questionnaire-builder-component .div-style-column .text-options{color:#6d7a8e}.evaluation-and-questionnaire-builder-component .conditions{padding-top:16px;padding-bottom:24px;display:flex;flex-direction:row}.evaluation-and-questionnaire-builder-component .conditions .conditions-select{width:328px}.evaluation-and-questionnaire-builder-component .conditions .condition-sections-text{color:#192840}.evaluation-and-questionnaire-builder-component .conditions .condition-section-div-text{align-items:center;display:flex;padding-right:24px}.evaluation-and-questionnaire-builder-component .focused{border:1px solid #0d7180!important;cursor:default!important}.evaluation-and-questionnaire-builder-component .form{display:flex;flex-direction:column;gap:24px}.evaluation-and-questionnaire-builder-component .form .input-group{display:flex;align-items:flex-start;gap:24px;margin-bottom:40px}.evaluation-and-questionnaire-builder-component .form .input-group vedius-input,.evaluation-and-questionnaire-builder-component .form .input-group vedius-datepicker{width:100%}.evaluation-and-questionnaire-builder-component .form .input-group vedius-input.limit-width,.evaluation-and-questionnaire-builder-component .form .input-group vedius-datepicker.limit-width{width:160px}.evaluation-and-questionnaire-builder-component .form .input-with-condition{display:inline-flex;flex-direction:row;gap:12px;width:100%}.evaluation-and-questionnaire-builder-component .form .div-style-text-label{display:flex;flex-direction:row;align-items:center;gap:12px}.evaluation-and-questionnaire-builder-component .form .div-style-text-label .vedius-style-input-label{color:#192840;height:500;width:100%}.evaluation-and-questionnaire-builder-component .form .div-style-text-label .radio-label{display:flex;justify-content:center;align-items:center;width:24px;height:18px;font-family:DM Sans;font-weight:500;font-size:.75rem;text-align:center;background-color:#f5f6f8;border-radius:4px;color:#6d7a8e}.radio-option.selected .evaluation-and-questionnaire-builder-component .form .div-style-text-label .radio-label{background-color:#0d7180;color:#c6eef7}.evaluation-and-questionnaire-builder-component .form .div-style-text-label .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.evaluation-and-questionnaire-builder-component .form .div-style-text-label .icon-close{width:20px}.evaluation-and-questionnaire-builder-component .form .div-style-header{display:flex;flex-direction:row;justify-content:space-between}.evaluation-and-questionnaire-builder-component .form .div-style-header .div-style-select{width:220px}.evaluation-and-questionnaire-builder-component .form .div-style-slider-values{display:flex;flex-direction:row;align-items:center;padding-bottom:24px}.evaluation-and-questionnaire-builder-component .form .div-style-slider-values .vedius-style-number-input{width:80px}.evaluation-and-questionnaire-builder-component .form .div-style-slider-values .div-style-text{padding:10px;color:#6d7a8e}.evaluation-and-questionnaire-builder-component .padding-top{padding-top:24px}.evaluation-and-questionnaire-builder-component .gap-3{width:100%;gap:24px}.evaluation-and-questionnaire-builder-component .gap-2{gap:12px;width:100%}.evaluation-and-questionnaire-builder-component .gap-4{gap:8px}.evaluation-and-questionnaire-builder-component .description-text{font-family:DM Sans;font-style:normal;font-weight:500;color:#192840;line-height:1.5rem;word-wrap:break-word}.evaluation-and-questionnaire-builder-component .question-label{font-size:16px;font-weight:500;word-wrap:break-word}.evaluation-and-questionnaire-builder-component .description-text{font-size:.875rem;color:#6d7a8e}
4.evaluation-and-questionnaire-builder-component .builder-div-title{flex-direction:column;display:flex;gap:8px;word-break:break-word;overflow-wrap:break-word;width:100%;box-sizing:border-box}.evaluation-and-questionnaire-builder-component .builder-div-title .title-text{line-height:30px;font-size:1.5rem;font-weight:500;color:#192840;font-family:DM Sans}.evaluation-and-questionnaire-builder-component .builder-div-title .description-text{font-size:.875rem;font-weight:500;color:#6d7a8e}.evaluation-and-questionnaire-builder-component .text-sections{color:#fff}.evaluation-and-questionnaire-builder-component.small{width:100%;padding:16px 0}.evaluation-and-questionnaire-builder-component.small.show-option-builder{padding:16px 0 88px}.evaluation-and-questionnaire-builder-component.small .add-question-button-container vedius-button{width:100%}.evaluation-and-questionnaire-builder-component.small .add-question-button-container .add-question-button{max-width:130px}.evaluation-and-questionnaire-builder-component.small .add-question-button-container .other-question-button{min-width:145px}.evaluation-and-questionnaire-builder-component.small .div-style-slider-values .vedius-style-number-input{width:100%}.evaluation-and-questionnaire-builder-component.small .margin-left-choise-or-select-option-button{margin-left:0}.evaluation-and-questionnaire-builder-component.small .div-style-row .custom-title,.evaluation-and-questionnaire-builder-component.small .div-style-row .custom-card,.evaluation-and-questionnaire-builder-component.small .div-style-row .custom-title-section,.evaluation-and-questionnaire-builder-component.small .div-style-row .custom-card-section{max-width:100%;padding:40px 24px;border-radius:0}.evaluation-and-questionnaire-builder-component.small .div-style-column .custom-top-section{padding:16px 24px;border-radius:0}.evaluation-and-questionnaire-builder-component.small .section-settings-button-actions{flex-direction:row}.evaluation-and-questionnaire-builder-component.small .form .content-with-action{display:flex;flex-direction:row;justify-content:space-between;gap:24px;align-items:center}.evaluation-and-questionnaire-builder-component.small .form .content-with-action vedius-input{width:100%}.evaluation-and-questionnaire-builder-component.small .form .input-with-condition{display:inline-flex;flex-direction:column;gap:12px;width:100%}.evaluation-and-questionnaire-builder-component.small .form .div-style-header{align-items:center}.evaluation-and-questionnaire-builder-component.small .conditions{padding:24px;flex-direction:column;gap:8px}.evaluation-and-questionnaire-builder-component.single-section .focused{border:1px solid #70bbc8!important}.evaluation-and-questionnaire-builder-component.single-section .custom-title{border-top:8px solid #70bbc8!important}.settings-menu{display:flex;flex-direction:column;padding:12px;gap:12px}.builder-hidden-form{display:none!important}.mat-mdc-text-field-wrapper{min-height:55px;margin:0;background-color:#fff}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex{height:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag{box-sizing:border-box;margin-top:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .evaluation-and-questionnaire-drag-handle-container{position:absolute;top:8px;left:50%;cursor:move}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .add-question-button-container{display:flex;align-items:center;gap:12px;align-self:stretch}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .section-settings-button-actions{display:flex;flex-direction:column;align-items:center;gap:4px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .trash-icon mat-icon{stroke:none}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag app-side-question-options-builder{position:relative}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag app-side-question-options-builder .side-question-options-builder{position:absolute;top:0}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-row{display:flex;flex-direction:row;padding-bottom:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-row .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-row .icon-close{width:20px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .custom-title{width:100%;height:100%;max-width:858px;border-top:8px solid #0d7180!important;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .custom-title-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .custom-card{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px;position:relative}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .custom-card-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-column{display:flex;flex-direction:column}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .custom-top-section{width:100%;height:62px;max-width:858px;background-color:#0d7180;padding:16px 24px;border-radius:8px 8px 0 0}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .text-options{color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .conditions{padding-top:16px;padding-bottom:24px;display:flex;flex-direction:row;background-color:#f5f6f8;z-index:2}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .conditions .conditions-select{width:328px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .conditions .condition-sections-text{color:#192840}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .conditions .condition-section-div-text{align-items:center;display:flex;padding-right:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .focused{border:1px solid #0d7180!important;cursor:default!important}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .input-group{dis
4play:flex;align-items:flex-start;gap:24px;margin-bottom:40px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .input-group vedius-input,.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .input-group vedius-datepicker{width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .input-group vedius-input.limit-width,.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .input-group vedius-datepicker.limit-width{width:160px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-text-label{display:flex;flex-direction:row;align-items:center;gap:12px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-text-label .vedius-style-input-label{color:#192840;height:500;width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-text-label .radio-label{display:flex;justify-content:center;align-items:center;width:24px;height:18px;font-family:DM Sans;font-weight:500;font-size:.75rem;text-align:center;background-color:#f5f6f8;border-radius:4px;color:#6d7a8e}.radio-option.selected .cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-text-label .radio-label{background-color:#0d7180;color:#c6eef7}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .icon-close{width:20px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-header{display:flex;flex-direction:row;justify-content:space-between}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-header .div-style-select{width:220px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-header .div-style-settings{width:150px;display:flex;flex-direction:row;justify-content:space-around;align-items:center;margin-top:-6px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-slider-values{display:flex;flex-direction:row;align-items:center;padding-bottom:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-slider-values .vedius-style-number-input{width:80px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .div-style-slider-values .div-style-text{padding:10px;color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .padding-top{padding-top:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .gap-3{width:100%;gap:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .gap-2{gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .gap-4{gap:8px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .description-text{font-family:DM Sans;font-style:normal;font-weight:500;color:#192840;line-height:1.5rem;word-wrap:break-word}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .question-label{font-size:16px;font-weight:500;word-wrap:break-word}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .description-text{font-size:.875rem;color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .builder-div-title{flex-direction:column;display:flex;gap:8px;word-break:break-word;overflow-wrap:break-word;width:100%;box-sizing:border-box}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .builder-div-title .title-text{line-height:30px;font-family:DM Sans;font-size:1.5rem;font-weight:500;color:#192840}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .builder-div-title .description-text{font-size:.875rem;font-weight:500;color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .text-sections{color:#fff}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag .form{display:flex;flex-direction:column;gap:24px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small{width:100%;padding:16px 0 88px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .add-question-button-container vedius-button{width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .add-question-button-container .add-question-button{max-width:130px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .add-question-button-container .other-question-button{min-width:145px}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-slider-values .vedius-style-number-input{width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .margin-left-choise-or-select-option-button{margin-left:0}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-row .custom-title,.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-row .custom-card,.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-row .custom-title-section,.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-row .custom-card-section{max-width:100%;padding:40px 24px;border-radius:0}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .div-style-column .custom-top-section{padding:16px 24px;border-radius:0}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .section-settings-button-actions{flex-direction:row}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .form .content-with-action{dis
4play:flex;flex-direction:row;justify-content:space-between;gap:24px;align-items:center}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .form .content-with-action vedius-input{width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .form .input-with-condition{display:inline-flex;flex-direction:column;gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .form .div-style-header{align-items:center}.cdk-drag-preview.evaluation-questionnaire-card-cdk-drag.small .conditions{padding:24px;flex-direction:column;gap:8px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container,.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .form{display:flex;flex-direction:column;gap:24px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .form .input-with-condition{display:inline-flex;flex-direction:row;gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-column{display:flex;flex-direction:column}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-column .custom-top-section{width:100%;height:62px;max-width:858px;background-color:#0d7180;padding:16px 24px;border-radius:8px 8px 0 0}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-column .text-options{color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row{display:flex;flex-direction:row}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .first-card-section form{flex-direction:row;display:flex;align-items:flex-start;gap:24px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .first-card-section form .form{width:100%}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .custom-title{width:100%;height:100%;max-width:858px;border-top:8px solid #0d7180!important;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .custom-title-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .custom-card{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px;position:relative}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .custom-card-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-row .icon-close{width:20px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .add-question-button-container{display:flex;align-items:center;gap:12px;align-self:stretch}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .gap-2{gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .gap-3{width:100%;gap:24px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .vedius-style-input-label{color:#192840;height:500;width:100%}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .div-style-text-label{display:flex;flex-direction:row;align-items:center;gap:12px}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .radio-label{display:flex;justify-content:center;align-items:center;width:24px;height:18px;font-family:DM Sans;font-weight:500;font-size:.75rem;text-align:center;background-color:#f5f6f8;border-radius:4px;color:#6d7a8e}.radio-option.selected .cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .radio-label{background-color:#0d7180;color:#c6eef7}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-options-cdk-drag-container .icon-close{width:20px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container,.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .form{display:flex;flex-direction:column;gap:24px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .form .input-with-condition{dis
4play:inline-flex;flex-direction:row;gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-column{display:flex;flex-direction:column}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-column .custom-top-section{width:100%;height:62px;max-width:858px;background-color:#0d7180;padding:16px 24px;border-radius:8px 8px 0 0}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-column .text-options{color:#6d7a8e}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row{display:flex;flex-direction:row}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .first-card-section form{flex-direction:row;display:flex;align-items:flex-start;gap:24px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .first-card-section form .form{width:100%}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .custom-title{width:100%;height:100%;max-width:858px;border-top:8px solid #0d7180!important;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .custom-title-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .custom-card{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;cursor:pointer;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:8px;position:relative}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .custom-card-section{width:100%;height:100%;max-width:858px;background-color:#fff;padding:40px;--mdc-elevated-card-container-elevation: none;border-top:1px solid #d3dae5;border-left:1px solid #d3dae5;border-bottom:1px solid #d3dae5;border-right:1px solid #d3dae5;border-radius:0 0 8px 8px/0px 0px 8px 8px;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-row .icon-close{width:20px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .gap-2{gap:12px;width:100%}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .gap-3{width:100%;gap:24px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .vedius-style-input-label{color:#192840;height:500;width:100%}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .div-style-text-label{display:flex;flex-direction:row;align-items:center;gap:12px}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .radio-label{display:flex;justify-content:center;align-items:center;width:24px;height:18px;font-family:DM Sans;font-weight:500;font-size:.75rem;text-align:center;background-color:#f5f6f8;border-radius:4px;color:#6d7a8e}.radio-option.selected .cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .radio-label{background-color:#0d7180;color:#c6eef7}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .close{padding:0;border:0;background-color:transparent;stroke:#425168;position:relative;z-index:1;cursor:pointer}.cdk-drag-preview.evaluation-questionnaire-gradecheckbox-cdk-drag-container .icon-close{width:20px}.cdk-drag-preview{box-sizing:border-box}.cdk-drag-placeholder{opacity:0}
4.div-style-column.cdk-drop-list-dragging .evaluation-questionnaire-card-cdk-drag:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.evaluation-questionnaire-options-cdk-drag.cdk-drop-list-dragging .evaluation-questionnaire-options-cdk-drag-container:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.evaluation-questionnaire-gradecheckbox-cdk-drag.cdk-drop-list-dragging .evaluation-questionnaire-gradecheckbox-cdk-drag-container:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)} 5`],encapsulation:2});let i=a;return i})();var at=class{constructor(a,o){this.evaluationQuestionnaire=a,this.details=o}setEvaluationQuestionnaire(a){this.evaluationQuestionnaire=a}setDetails(a){this.details=a}get title(){return this.details?.title??this.evaluationQuestionnaire?.title}},St=class{constructor(a,o,e){this.title=a,this.description=o,this.questions=e}};var Ea=i=>({selected:i}),Sa=i=>({client_treatment_type:i});function ul(i,a){i&1&&y(0,"mat-icon",16)}function dl(i,a){i&1&&y(0,"mat-icon",16)}var Ta=(()=>{let a=class a{constructor(e,t,n,s){this.userContext=e,this.breakpointObserver=t,this.data=n,this.dialogRef=s,this.modal=null,this.selected=te.EVALUATION,this.questions=[],this.isMobile=!1,this.questions=n.questions,this.form=n.form,this.selected=n.type,this.title=this.form.get("title")?.value}get userVedius(){return this.userContext.current}ngOnInit(){this.listenIsMobile()}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}selectItem(e){this.selected=e}close(){this.modal?.close()}onSave(){this.dialogRef.close({type:this.selected})}};a.\u0275fac=function(t){return new(t||a)(v(re),v(Z),v(He),v(dt))},a.\u0275cmp=P({type:a,selectors:[["app-save-set-type"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:48,vars:59,consts:[[1,"div-container"],[1,"text-display"],[3,"variant","size"],[1,"form-info"],["variant","text","size","lg"],["variant","text","size","sm",1,"info-questions"],[1,"save-set-options-container"],["variant","text","size","sm","weight","bold"],["tabindex","-1",1,"form-option",3,"click","ngClass"],[1,"option-texts"],["variant","text","size","sm",1,"info-option"],[1,"select-icon-content"],["class","check-icon","svgIcon","check-filled-circle",4,"ngIf"],[1,"modal-actions"],["variant","tertiary",3,"onClick","fullSize"],[3,"onClick","fullSize"],["svgIcon","check-filled-circle",1,"check-icon"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"div",1)(3,"vedius-text",2),C(4),p(5,"translate"),d()(),u(6,"div",3)(7,"vedius-text",4),C(8),p(9,"translate"),d(),u(10,"vedius-text",5),C(11),p(12,"translate"),d()(),u(13,"div",6)(14,"vedius-text",7),C(15),p(16,"translate"),d(),u(17,"div",8),x("click",function(){return n.selectItem("EVALUATION")}),u(18,"div",9)(19,"vedius-text",4),C(20),p(21,"translate"),d(),u(22,"vedius-text",10),C(23),p(24,"translate"),p(25,"translate"),p(26,"translate"),d()(),u(27,"div",11),E(28,ul,1,0,"mat-icon",12),d()(),u(29,"div",8),x("click",function(){return n.selectItem("QUESTIONNAIRE")}),u(30,"div",9)(31,"vedius-text",4),C(32),p(33,"translate"),d(),u(34,"vedius-text",10),C(35),p(36,"translate"),p(37,"translate"),p(38,"translate"),d()(),u(39,"div",11),E(4
50,dl,1,0,"mat-icon",12),d()()(),u(41,"div",13)(42,"vedius-button",14),x("onClick",function(){return n.close()}),C(43),p(44,"translate"),d(),u(45,"vedius-button",15),x("onClick",function(){return n.onSave()}),C(46),p(47,"translate"),d()()()()),t&2&&(r(),A("small",n.isMobile),r(2),c("variant",n.isMobile?"text":"display")("size",n.isMobile?"xl":"micro"),r(),T(" ",_(5,21,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.TITLE")," "),r(4),M(n.title!==""?n.title:_(9,23,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")),r(3),ot("",n.questions.length," ",_(12,25,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.QUESTIONS_LABEL"),""),r(4),M(_(16,27,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.DESCRIPTION")),r(2),c("ngClass",Y(51,Ea,n.selected==="EVALUATION")),r(3),M(_(21,29,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.EVALUATION_CARD_TITLE")),r(3),M(ee(26,35,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.EVALUATION_DESCRIPTION",Y(53,Sa,n.userVedius.isPatientTreatmentType()?_(24,31,"PATIENTS"):_(25,33,"STUDENTS")))),r(5),c("ngIf",n.selected==="EVALUATION"),r(),c("ngClass",Y(55,Ea,n.selected==="QUESTIONNAIRE")),r(3),M(_(33,38,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.QUESTIONNAIRE_CARD_TITLE")),r(3),M(ee(38,44,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.QUESTIONNAIRE_DESCRIPTION",Y(57,Sa,n.userVedius.isPatientTreatmentType()?_(36,40,"PATIENTS"):_(37,42,"STUDENTS")))),r(5),c("ngIf",n.selected==="QUESTIONNAIRE"),r(2),c("fullSize",!0),r(),T(" ",_(44,47,"BUTTONS.CANCEL")," "),r(2),c("fullSize",!0),r(),T(" ",_(47,49,"BUTTONS.SAVE")," "))},dependencies:[W,X,Bi,j,Ee,K,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.div-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.div-container[_ngcontent-%COMP%] .text-display[_ngcontent-%COMP%]{padding-top:5px;padding-bottom:30px}.div-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:20px}.div-container[_ngcontent-%COMP%] .save-set-options-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-top:40px;gap:16px}.div-container[_ngcontent-%COMP%] .form-info[_ngcontent-%COMP%]{width:536px;min-height:104px;border-radius:8px;gap:8px;padding:24px;background-color:#f5f6f8;display:flex;flex-direction:column;box-sizing:border-box}.div-container[_ngcontent-%COMP%] .form-info[_ngcontent-%COMP%] .info-questions[_ngcontent-%COMP%]{color:#6d7a8e}.div-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%]{width:536px;height:120px;border-radius:8px;gap:8px;padding:24px;border:1px solid #d3dae5;display:flex;flex-direction:row;cursor:pointer;justify-content:space-between;align-items:center;box-sizing:border-box}.div-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%] .option-texts[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;gap:4px}.div-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%] .info-option[_ngcontent-%COMP%]{color:#6d7a8e}.div-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%] .select-icon-content[_ngcontent-%COMP%]{min-width:20px;height:24px;margin-top:4px}.div-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%] .select-icon-content[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:1.25rem;color:#0d7180}.div-container[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{border-color:#0d7180}.div-container[_ngcontent-%COMP%] .modal-actions[_ngcontent-%COMP%]{padding-top:40px;display:flex;justify-content:flex-end;gap:16px}.div-container[_ngcontent-%COMP%] .modal-actions[_ngcontent-%COMP%] vedius-button[_ngcontent-%COMP%]{width:100%}.div-container.small[_ngcontent-%COMP%] .text-display[_ngcontent-%COMP%]{padding-top:0;margin-top:12px;padding-bottom:24px}.div-container.small[_ngcontent-%COMP%] .form-info[_ngcontent-%COMP%]{width:100%}.div-container.small[_ngcontent-%COMP%] .save-set-options-container[_ngcontent-%COMP%]{padding-top:24px}.div-container.small[_ngcontent-%COMP%] .save-set-options-container[_ngcontent-%COMP%] .form-option[_ngcontent-%COMP%]{width:100%;height:100%}"]});let i=a;return i})();var Ze=(()=>{let a=class a{constructor(e,t){this._referenceKey=e,this._value=t}static from(e){return new a(Oe.fromString(a.REFERENCE_KEY_VALUE),e)}get referenceKey(){return this._referenceKey}get value(){return this._value}};a.REFERENCE_KEY_VALUE="vedius";let i=a;return i})();var ya=(()=>{let a=class a extends Nt{constructor(e){super(),this.evaluationQuestionnaireParser=e}parseDocument(e){return e}parseFromJson(e){let{evaluationQuestionnaire:t,details:n}=e;return t&&(t=this.evaluationQuestionnaireParser.parseFromJson(t)),n&&(n=new St(n.title,n.description,n.questions)),new at(t,n)}};a.\u0275fac=function(t){return new(t||a)($(Go))}
5,a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var ml="evaluationQuestionnaire-draft-storage-v2",ba=(()=>{let a=class a{constructor(e){this.evaluationQuestionnaireDraftParser=e,this.evaluationQuestionnaireStorage=new Po(ml,this.evaluationQuestionnaireDraftParser)}getStorage(){return this.evaluationQuestionnaireStorage.get()}setStorage(e){if(!e){this.evaluationQuestionnaireStorage.remove();return}this.evaluationQuestionnaireStorage.set(e)}clearStorage(){this.evaluationQuestionnaireStorage.remove()}};a.\u0275fac=function(t){return new(t||a)($(ya))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Wt=(()=>{let a=class a{get dataStorage(){return this.evaluationQuestionnaireDraftStorageRepository.getStorage()}constructor(e){this.evaluationQuestionnaireDraftStorageRepository=e,this.subject=new st(this.dataStorage??void 0)}get evaluationQuestionnaireDraft(){return this.dataStorage??void 0}setData(e){this.subject.next(e),this.evaluationQuestionnaireDraftStorageRepository.setStorage(e)}setEditEvaluationQuestionnaireDraft(e){this.setData(e)}listen(){return this.subject.asObservable()}clear(){this.setData(void 0)}};a.\u0275fac=function(t){return new(t||a)($(ba))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Ia=(()=>{let a=class a extends Nt{constructor(){super()}parseDocument({data:e}){let{uid:t,title:n,created_date:s,description:m,activated:h,questions:O,type:Q}=e,H=Ze.from(t),ie=ai.fromDate(no(s));return kn.from({key:H,title:n,createdAt:ie,description:m,activated:h,questions:O,type:Q})}parseFromJson(e){let{_key:t,_title:n,_createdAt:s,_description:m,_activated:h,_questions:O,_type:Q}=e,H=Ze.from(t._value),ie=n,ge=m,fe=h,pe=O,Qe=Q,Me=ai.from(new Date(s._date),s._timezone);return kn.from({key:H,title:ie,createdAt:Me,description:ge,activated:fe,questions:pe,type:Qe})}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var ki=class i{constructor(a,o,e,t,n,s,m){this._key=a,this._title=o,this._createdAt=e,this._description=t,this._activated=n,this._questions=s,this._type=m}static from({key:a,title:o,createdAt:e,description:t,activated:n,questions:s,type:m}){return new i(a,o,e,t,n,s,m)}get pageableItemId(){return this._key.value}get key(){return this._key}get title(){return this._title}get description(){return this._description}get activated(){return this._activated}get questions(){return this._questions}get createdAt(){return this._createdAt}get titleNormalized(){return No.normalize(this.title).value}get type(){return this._type}toFuncDocument(){return{title_normalized:this.titleNormalized,created_date:this.createdAt.toFuncDocument()}}};var Oa=(()=>{let a=class a extends Nt{constructor(){super()}parseDocument({data:e}){let{uid:t,title:n,created_date:s,description:m,activated:h,questions:O,type:Q}=e,H=Ze.from(t),ie=ai.fromISO8601(s.dateISO8601,s.timezone);return ki.from({key:H,title:n,createdAt:ie,description:m,activated:h,questions:O,type:Q})}parseFromJson(e){let{_key:t,_title:n,_createdAt:s,_description:m,_activated:h,_questions:O,_type:Q}=e,H=Ze.from(t._value),ie=n,ge=ai.from(s._date,s._timezone),fe=m,pe=h,Qe=O,Me=Q;return ki.from({key:H,title:ie,createdAt:ge,description:fe,activated:pe,questions:Qe,type:Me})}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var wa=(()=>{let a=class a extends Nt{constructor(e,t){super(),this.vediusEvaluationQuestionnairePageItemParser=e,this.firebasePaginatedParser=t}parseDocument({total:e,items:t,page_size:n,lastItem:s,lastItems:m}){let h=t.map(Q=>this.vediusEvaluationQuestionnairePageItemParser.parseDocument(Q)),O;return s&&(m||(m=[]),O=this.vediusEvaluationQuestionnairePageItemParser.parseDocument(s),m.push(O)),this.firebasePaginatedParser.parseDocument({total:e,page_size:n,items:h,lastItems:m})}parseFromJson(e){let{_data:t,_lastItems:n}=e,s=t.map(h=>this.vediusEvaluationQuestionnairePageItemParser.parseFromJson(h)),m;return n&&(m=n.map(h=>this.vediusEvaluationQuestionnairePageItemParser.parseFromJson(h))),this.firebasePaginatedParser.parseFromJson({payload:e,items:s,lastItems:m})}};a.\u0275fac=function(t){return new(t||a)($(Oa),$(Ro))}
5,a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Aa=(()=>{let a=class a{constructor(e,t,n,s,m){this.firestore=e,this.saasApiClient=t,this.firebaseErrorHandler=n,this.vediusEvaluationQuestionnaireParser=s,this.paginatedVediusEvaluationQuestionnaireParser=m}get(t){return N(this,arguments,function*({vediusEvaluationQuestionnaireKey:e}){try{let n=Oo(this.firestore,Pn.EvaluationModels,e.referenceKey.value,Pn.Models,e.value),s=yield wo(n);if(!s.exists())return null;let m=s.data();return this.vediusEvaluationQuestionnaireParser.parseDocument({data:m})}catch(n){throw console.log(n),this.firebaseErrorHandler.handleError(n)}})}getPaginatedVediusEvaluationQuestionnaires(t){return N(this,arguments,function*({pagination:e}){try{let n={page_size:e.pageSize,last_item:e.lastItem?.toFuncDocument(),filter_options:e.filterOptions?.toFilterDocument(),order_options:e.orderOptions?.toOrderDocument()},s=yield this.saasApiClient.post({functionName:Zo.GET_PAGINATED_VEDIUS_CUSTOM_EVALUATION_QUESTIONNAIRES,payload:{options:n}});if(!s.success)throw new bo({message:s.message});let{total:m,items:h,last_item:O}=s.data.paginated_vedius_custom_evaluation,Q=h.map(ge=>({data:ge})),H;return O&&(H={data:O}),this.paginatedVediusEvaluationQuestionnaireParser.parseDocument({total:m,items:Q,page_size:e.pageSize,lastItem:H,lastItems:e.lastItems})}catch(n){throw this.firebaseErrorHandler.handleError(n)}})}};a.\u0275fac=function(t){return new(t||a)($(Io),$(Vo),$(Lo),$(Ia),$(wa))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Le=(()=>{let a=class a{constructor(e){this.vediusEvaluationQuestionnaireRepository=e}get(t){return N(this,arguments,function*({vediusEvaluationQuestionnaireKey:e}){return yield this.vediusEvaluationQuestionnaireRepository.get({vediusEvaluationQuestionnaireKey:e})})}getPaginatedEvaluationQuestionnaires(t){return N(this,arguments,function*({pagination:e}){return yield this.vediusEvaluationQuestionnaireRepository.getPaginatedVediusEvaluationQuestionnaires({pagination:e})})}};a.\u0275fac=function(t){return new(t||a)($(Aa))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var pn=(()=>{let a=class a{constructor(e){this.router=e}redirect(e){if(!e){this.router.navigate([ce.UsarModeloDeAvaliacaoVedius]);return}this.router.navigate([ce.UsarModeloDeAvaliacaoVedius,e])}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var xi=(()=>{let a=class a{constructor(e,t){this.router=e,this.translation=t}createType(e){return e===te.EVALUATION?this._queryParams={criar:this.translation.get(b.EvaluationName)}:e===te.QUESTIONNAIRE&&(this._queryParams={criar:this.translation.get(b.QuestionnaireName)}),this}redirect(e){e?this.router.navigate([ce.NovaAvaliacaoQuestionario,e]):this._queryParams?this.router.navigate([ce.NovaAvaliacaoQuestionario],{queryParams:this._queryParams}):this.router.navigate([ce.NovaAvaliacaoQuestionario]),setTimeout(()=>{this._queryParams=void 0},1e3)}};a.\u0275fac=function(t){return new(t||a)($(ae),$(J))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Ci=(()=>{let a=class a{constructor(e,t,n){this.newEvaluationQuestionnaireRouteStrategy=e,this.useVediusEvaluationTemplatesRouteStrategy=t,this.breakpointObserver=n,this.isMobile=!1}ngOnInit(){this.listenIsMobile()}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}createEvaluationQuestionnaireRedirect(e){e==="scratch"?this.newEvaluationQuestionnaireRouteStrategy.redirect():this.useVediusEvaluationTemplatesRouteStrategy.redirect(),this.modal?.close()}};a.\u0275fac=function(t){return new(t||a)(v(xi),v(pn),v(Z))}
5,a.\u0275cmp=P({type:a,selectors:[["app-create-evaluation-and-questionnaire-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:24,vars:17,consts:[[1,"create-evaluation-questionnaire-modal"],[1,"title"],[1,"buttons"],[3,"click"],["src","../../../../../../assets/images/create-program-model.svg","alt","Criar com um modelo"],[1,"create-evaluation-questionnaire-content"],["src","../../../../../../assets/images/create-program-empty.svg","alt","Criar do zero"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"h1",1),C(3),p(4,"translate"),d(),u(5,"div",2)(6,"button",3),x("click",function(){return n.createEvaluationQuestionnaireRedirect("model")}),y(7,"img",4),u(8,"div",5)(9,"strong"),C(10),p(11,"translate"),d(),u(12,"span"),C(13),p(14,"translate"),d()()(),u(15,"button",3),x("click",function(){return n.createEvaluationQuestionnaireRedirect("scratch")}),y(16,"img",6),u(17,"div",5)(18,"strong"),C(19),p(20,"translate"),d(),u(21,"span"),C(22),p(23,"translate"),d()()()()()()),t&2&&(r(),A("small",n.isMobile),r(2),T(" ",_(4,7,"CREATE_EVALUATION_QUESTIONNAIRE_MODAL.TITLE")," "),r(7),T(" ",_(11,9,"CREATE_EVALUATION_QUESTIONNAIRE_MODAL.NEW_TEMPLATE.TITLE")," "),r(3),T(" ",_(14,11,"CREATE_EVALUATION_QUESTIONNAIRE_MODAL.NEW_TEMPLATE.DESCRIPTION")," "),r(6),T(" ",_(20,13,"CREATE_EVALUATION_QUESTIONNAIRE_MODAL.NEW_EVALUATION_QUESTIONNAIRE.TITLE")," "),r(3),T(" ",_(23,15,"CREATE_EVALUATION_QUESTIONNAIRE_MODAL.NEW_EVALUATION_QUESTIONNAIRE.DESCRIPTION")," "))},dependencies:[W,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;display:flex;align-items:center;gap:16px}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{margin-top:42px;display:flex;gap:16px}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;padding:24px;flex-direction:column;align-items:center;gap:12px;flex:1 0 0;align-self:stretch;border-radius:8px;background:#fff;border:1px solid #d3dae5;cursor:pointer;height:290px}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .create-evaluation-questionnaire-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{border:2px solid #0d7180}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover strong[_ngcontent-%COMP%]{color:#0d7180}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px;height:150px}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:18px;font-style:normal;font-weight:500;line-height:28px;transition:.2s all}.create-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6d7a8e;font-family:DM Sans;font-size:.875rem;font-style:normal;font-weight:500;line-height:20px}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.875rem;margin-top:12px}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:12px}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-direction:row;height:100%}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .create-evaluation-questionnaire-content[_ngcontent-%COMP%]{align-items:flex-start}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:1rem;line-height:28px}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-align:start}.create-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:80px;height:80px}"]});let i=a;return i})();var Ei=(()=>{let a=class a{constructor(e,t,n){this.breakpointObserver=e,this.evaluationTemplatesRouteStrategy=t,this.questionnaireTemplatesRouteStrategy=n,this.isMobile=!1}ngOnInit(){this.listenIsMobile()}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}sendEvaluationQuestionnaireRedirect(e){e==="evaluation"?this.evaluationTemplatesRouteStrategy.redirect():this.questionnaireTemplatesRouteStrategy.redirect(),this.modal?.close()}};a.\u0275fac=function(t){return new(t||a)(v(Z),v(ia),v(na))}
5,a.\u0275cmp=P({type:a,selectors:[["app-send-empty-evaluation-and-questionnaire-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:24,vars:17,consts:[[1,"send-empty-evaluation-questionnaire-modal"],[1,"title"],[1,"buttons"],[3,"click"],["src","../../../../../../assets/images/evaluation.svg","alt","Criar com um modelo"],[1,"send-content"],["src","../../../../../../assets/images/questionnaire.svg","alt","Criar do zero"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"h1",1),C(3),p(4,"translate"),d(),u(5,"div",2)(6,"button",3),x("click",function(){return n.sendEvaluationQuestionnaireRedirect("evaluation")}),y(7,"img",4),u(8,"div",5)(9,"strong"),C(10),p(11,"translate"),d(),u(12,"span"),C(13),p(14,"translate"),d()()(),u(15,"button",3),x("click",function(){return n.sendEvaluationQuestionnaireRedirect("questionnaire")}),y(16,"img",6),u(17,"div",5)(18,"strong"),C(19),p(20,"translate"),d(),u(21,"span"),C(22),p(23,"translate"),d()()()()()()),t&2&&(r(),A("small",n.isMobile),r(2),T(" ",_(4,7,"SEND_EMPTY_EVALUATION_QUESTIONNAIRE_MODAL.TITLE")," "),r(7),T(" ",_(11,9,"SEND_EMPTY_EVALUATION_QUESTIONNAIRE_MODAL.TITLE_EVALUATION")," "),r(3),T(" ",_(14,11,"SEND_EMPTY_EVALUATION_QUESTIONNAIRE_MODAL.DESCRIPTION_EVALUATION")," "),r(6),T(" ",_(20,13,"SEND_EMPTY_EVALUATION_QUESTIONNAIRE_MODAL.TITLE_QUESTIONNAIRE")," "),r(3),T(" ",_(23,15,"SEND_EMPTY_EVALUATION_QUESTIONNAIRE_MODAL.DESCRIPTION_QUESTIONNAIRE")," "))},dependencies:[W,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;display:flex;align-items:center;gap:16px}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{margin-top:42px;display:flex;gap:16px}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;padding:24px;flex-direction:column;align-items:center;gap:12px;flex:1 0 0;align-self:stretch;border-radius:8px;background:#fff;border:1px solid #d3dae5;cursor:pointer;height:290px}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .send-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{border:2px solid #0d7180}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover strong[_ngcontent-%COMP%]{color:#0d7180}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px;height:150px}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:18px;font-style:normal;font-weight:500;line-height:28px;transition:.2s all}.send-empty-evaluation-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6d7a8e;font-family:DM Sans;font-size:.875rem;font-style:normal;font-weight:500;line-height:20px}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.875rem;margin-top:12px}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:12px}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-direction:row;height:100%}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .send-content[_ngcontent-%COMP%]{align-items:flex-start}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:1rem;line-height:28px}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-align:start}.send-empty-evaluation-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:80px;height:80px}"]});let i=a;return i})();function xl(i,a){if(i&1){let o=S();u(0,"vedius-button",6),x("onClick",function(){g(o);let t=l();return f(t.onAction("EDIT"))}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),T(" ",_(2,2,"EVALUATION_QUESTIONNAIRE_MENU_OPTIONS.EDIT")," "))}function Cl(i,a){if(i&1){let o=S();u(0,"vedius-button",6),x("onClick",function(){g(o);let t=l();return f(t.onAction("DUPLICATE"))}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),T(" ",_(2,2,"EVALUATION_QUESTIONNAIRE_MENU_OPTIONS.DUPL
5ICATE")," "))}function El(i,a){if(i&1){let o=S();u(0,"vedius-button",7),x("onClick",function(){g(o);let t=l();return f(t.onAction("DELETE_EVALUATION"))}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),T(" ",_(2,2,"EVALUATION_QUESTIONNAIRE_MENU_OPTIONS.DELETE_EVALUATION")," "))}function Sl(i,a){if(i&1){let o=S();u(0,"vedius-button",7),x("onClick",function(){g(o);let t=l();return f(t.onAction("DELETE_QUESTIONNAIRE"))}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),T(" ",_(2,2,"EVALUATION_QUESTIONNAIRE_MENU_OPTIONS.DELETE_QUESTIONNAIRE")," "))}var Ma=(()=>{let a=class a{handleKeyUp(e){e.stopPropagation(),e.key===si&&this.close()}constructor(e){this.data=e}showOption(e){return this.data?.evaluationQuestionnaireMenuKeys?.includes(e)}onAction(e){this.modal?.close({action:e})}close(){this.modal?.close()}};a.\u0275fac=function(t){return new(t||a)(v(He,8))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-menu-options-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},hostBindings:function(t,n){t&1&&x("keyup",function(m){return n.handleKeyUp(m)})},decls:13,vars:11,consts:[[1,"evaluation-and-questionnaire-menu-options-modal"],[1,"title-evaluation-and-questionnaire-menu-options"],[1,"content"],["variant","secondary",3,"fullSize","onClick",4,"ngIf"],["variant","danger",3,"fullSize","onClick",4,"ngIf"],["variant","tertiary",3,"onClick","fullSize"],["variant","secondary",3,"onClick","fullSize"],["variant","danger",3,"onClick","fullSize"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"h1",1),C(3),p(4,"translate"),d(),u(5,"div",2),E(6,xl,3,4,"vedius-button",3)(7,Cl,3,4,"vedius-button",3)(8,El,3,4,"vedius-button",4)(9,Sl,3,4,"vedius-button",4),u(10,"vedius-button",5),x("onClick",function(){return n.close()}),C(11),p(12,"translate"),d()()()()),t&2&&(r(3),T(" ",_(4,7,"EVALUATION_QUESTIONNAIRE_MENU_OPTIONS.MODAL_TITLE")," "),r(3),c("ngIf",n.showOption("EDIT")),r(),c("ngIf",n.showOption("DUPLICATE")),r(),c("ngIf",n.showOption("DELETE_EVALUATION")),r(),c("ngIf",n.showOption("DELETE_QUESTIONNAIRE")),r(),c("fullSize",!0),r(),M(_(12,9,"BUTTONS.CANCEL")))},dependencies:[W,j,K,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-menu-options-modal{display:flex;flex-direction:column;gap:40px}.evaluation-and-questionnaire-menu-options-modal .title-evaluation-and-questionnaire-menu-options{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;padding-top:8px;display:flex;align-items:center;gap:16px}.evaluation-and-questionnaire-menu-options-modal .content{width:100%;flex-direction:column;justify-content:flex-start;gap:16px;display:inline-flex}.evaluation-and-questionnaire-menu-options-modal .content vedius-button{width:100%}.evaluation-and-questionnaire-menu-options-modal .content vedius-button button.secondary{color:#6d7a8e}@media screen and (max-width: 600px){.evaluation-and-questionnaire-menu-options-modal .title-evaluation-and-questionnaire-menu-options{font-size:1.25rem;line-height:1.875rem;margin-top:4px}} 6`],encapsulation:2});let i=a;return i})();function Tl(i,a){if(i&1){let o=S();u(0,"vedius-menu",1),x("optionItemSelected",function(t){g(o);let n=l();return f(n.onMenuItemOptionSelected(t))})("isOpening",function(){g(o);let t=l();return f(t.onMenuIsOpen())}),d()}if(i&2){let o=l();c("config",o.menuConfig)}}var de=function(i){return i.EDIT="EDIT",i.DUPLICATE="DUPLICATE",i.DELETE_EVALUATION="DELETE_EVALUATION",i.DELETE_QUESTIONNAIRE="DELETE_QUESTIONNAIRE",i}(de||{}),Li=(()=>{let a=class a{constructor(e,t,n){this.vediusTranslation=e,this.dialog=t,this.breakpointObserver=n,this.isMobile=!1,this.modalOptions=[],this.hideProgramMenuKeys=[],this.onMenuItemSelected=new k}ngOnInit(){this.listenSize(),this.load()}load(){this.loadMenuOptions(),this.loadModalOptions()}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{let t=e.matches!==this.isMobile;this.isMobile=e.matches,t&&this.load()})}loadModalOptions(){let t=this.filterMenuOptions()?.map(n=>n.items).flat();this.modalOptions=t?.map(n=>n.key)}loadMenuOptions(){this.vediusTranslation.loaded().then(()=>{let e=this.isMobile?[]:this.filterMenuOptions();this.menuConfig={buttonConfig:{icon:"dots",iconType:"only"},options:[...e]}})}filterMenuOptions(){let e="delete-evaluation-and-questionnaire-menu-option";return[{items:[{key:de.EDIT,display:this.vediusTranslation.get(b.EditLabelMenuEvaluationQuestionnaire)},{key:de.DUPLICATE,display:this.vediusTranslation.get(b.DuplicateLabelMenuEvaluationQuestionnaire)},{key:de.DELETE_QUESTIONNAIRE,display:this.vediusTranslation.get(b.DeleteQuestionnaireLabelMenuEvaluationQuestionnaire),classes:[e]},{key:de.DELETE_EVALUATION,display:this.vediusTranslation.get(b.DeleteEvaluationLabelMenuEvaluationQuestionnaire),classes:[e]}]}].map(s=>({items:s.items.filter(m=>!this.hideProgramMenuKeys.includes(m.key))}
6))}onMenuItemOptionSelected(e){this.onMenuItemSelected.emit({key:e.key,item:e})}onMenuIsOpen(){this.isMobile&&this.dialog.open(Ma,{data:{evaluationQuestionnaireMenuKeys:this.modalOptions}}).afterClosed().subscribe(t=>{if(t?.action){let s=this.filterMenuOptions().map(m=>m.items).flat().find(m=>m.key===t.action);s&&this.onMenuItemOptionSelected(s)}})}};a.\u0275fac=function(t){return new(t||a)(v(J),v(le),v(Z))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-menu-button"]],inputs:{hideProgramMenuKeys:"hideProgramMenuKeys"},outputs:{onMenuItemSelected:"onMenuItemSelected"},decls:1,vars:1,consts:[[3,"config","optionItemSelected","isOpening",4,"ngIf"],[3,"optionItemSelected","isOpening","config"]],template:function(t,n){t&1&&E(0,Tl,1,1,"vedius-menu",0),t&2&&c("ngIf",n.menuConfig)},dependencies:[j,ri],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.delete-evaluation-and-questionnaire-menu-option .vedius-option-content .option-text{color:#f03838} 7`],encapsulation:2});let i=a;return i})();var yl=["title"],bl=["professional"],Il=["created"],Ol=["type"],wl=["actions"],Al=i=>({quantity:i}),Ql=i=>({"background-image":i});function Ml(i,a){if(i&1){let o=S();u(0,"vedius-grid",7),x("onPaging",function(t){g(o);let n=l();return f(n.paging(t))})("onSorting",function(t){g(o);let n=l();return f(n.sorting(t))})("onSelection",function(t){g(o);let n=l();return f(n.selection(t))})("onRowClick",function(t){g(o);let n=l();return f(n.rowClick(t))}),d()}if(i&2){let o=l();c("key",o.gridKey)("dataSource",o.dataSource)("columns",o.columns)("pageIndex",o.pageIndex)("paginationEnabled",!1)("showSelection",!0)("isLoading",o.isLoading)}}function Pl(i,a){if(i&1&&(u(0,"div",8)(1,"strong"),C(2),d(),u(3,"vedius-text",9),C(4),p(5,"translate"),p(6,"translate"),p(7,"translate"),d()()),i&2){let o=a.$implicit;r(2),M(o.title),r(2),M(!o.questions||o.questions.length===0?_(5,2,"EVALUATION_QUESTIONNAIRE_LIST.NO_QUESTION_MESSAGE"):o.questions.length>1?ee(6,4,"EVALUATION_QUESTIONNAIRE_LIST.MANY_QUESTIONS_MESSAGE",Y(9,Al,o.questions.length)):_(7,7,"EVALUATION_QUESTIONNAIRE_LIST.SINGLE_QUESTION_MESSAGE"))}}function kl(i,a){if(i&1&&(D(0),C(1),R()),i&2){let o=l().$implicit;r(),T(" ",o.professionalNameNormalized.slice(0,1)," ")}}function Ll(i,a){if(i&1&&(u(0,"div",10)(1,"div",11),E(2,kl,2,1,"ng-container",12),d(),u(3,"span",13),C(4),p(5,"vediusTruncate"),d()()),i&2){let o=a.$implicit;r(),A("no-logo",!(o.professional.logo!=null&&o.professional.logo.url)),c("ngStyle",Y(8,Ql,"url("+(o.professional.logo==null?null:o.professional.logo.url)+")")),r(),c("ngIf",!o.professional.logo),r(2),M(ee(5,5,o.professionalNameNormalized,40))}}function ql(i,a){if(i&1&&(u(0,"div",14)(1,"div",15)(2,"vedius-text",16),C(3),p(4,"nanoDayMonthYearDate"),d()()()),i&2){let o=a.$implicit;r(3),M(_(4,1,o.createdAt.date))}}function Nl(i,a){if(i&1&&(u(0,"div",14)(1,"div",15),y(2,"vedius-status-label",17),d()()),i&2){let o=a.$implicit,e=l();r(2),c("text",e.getTranslation(o.type))("status",e.status)}}function Vl(i,a){if(i&1){let o=S();u(0,"vedius-button",22),x("onClick",function(t){g(o);let n=l(2).$implicit;return l().sendLinkClicked(n),f(t.stopPropagation())}),d()}}function Rl(i,a){if(i&1){let o=S();u(0,"div",19),E(1,Vl,1,0,"vedius-button",20),u(2,"app-evaluation-and-questionnaire-menu-button",21),x("onMenuItemSelected",function(t){g(o);let n=l().$implicit,s=l();return f(s.onMenuItemOptionSelected(t,n))}),d()()}if(i&2){let o=l().$implicit,e=l();r(),c("ngIf",e.isOwner(o)),r(),c("hideProgramMenuKeys",e.getMenuItemsKeysToHide(o))}}function Dl(i,a){if(i&1&&E(0,Rl,3,2,"div",18),i&2){let o=l();c("ngIf",o.showActions)}}var Pa=(()=>{let a=class a{constructor(e,t){this.vediusTranslation=e,this.userVediusContext=t,this.dataSource=new Ft,this.columns=[],this.pageIndex=0,this.isLoading=!1,this.showActions=!0,this.gridKey="",this.onPaging=new k,this.onSorting=new k,this.onSelection=new k,this.onRowClicked=new k,this.onActionItemSelected=new k,this.onSendLinkClicked=new k,this.translationMapping={EVALUATION:b.TypeEvaluationLineGridName,QUESTIONNAIRE:b.TypeQuestionnaireLineGridName},this.translations={},this.status=ta.UNKOWN}get isClinic(){return this.userVediusContext.current.type===Ke.Clinic}ngOnInit(){this.vediusTranslation.loaded().then(()=>{this.setTranslations()}),this.loadTable()}paging(e){this.onPaging.emit(e)}sorting(e){this.onSorting.emit(e)}rowClick(e){if(console.log(e),!e.iconTemplate){let t=e.row;
7this.onRowClicked.emit(t)}}selection(e){this.onSelection.emit(e)}setTranslations(){for(let e in this.translationMapping)Object.prototype.hasOwnProperty.call(this.translationMapping,e)&&(this.translations[e]=this.vediusTranslation.get(this.translationMapping[e]))}getTranslation(e){return this.translations[e]}sendLinkClicked(e){this.onSendLinkClicked.emit(e)}loadTable(){setTimeout(()=>{this.titleTemplate&&this.professionalTemplate&&this.createdDateTemplate&&this.actionsTemplate&&this.typeTemplate&&(this.columns=[Be.create({templateReference:this.titleTemplate,binding:"title",display:this.vediusTranslation.get(b.TitleEvaluationQuestionnaireCollumnGridName),size:this.isClinic?"45":"60",orderBy:!0}),Be.create({templateReference:this.professionalTemplate,binding:"professionalNameNormalized",display:this.vediusTranslation.get(b.ProfessionalEvaluationQuestionnaireCollumnGridName),size:"25",hide:!this.isClinic}),Be.create({templateReference:this.createdDateTemplate,binding:"created",display:this.vediusTranslation.get(b.CreatedEvaluationQuestionnaireCollumnGridName),size:this.isClinic?"20":"25"}),Be.create({templateReference:this.typeTemplate,binding:"type",display:this.vediusTranslation.get(b.TypeEvaluationQuestionnaireCollumnGridName),size:this.isClinic?"20":"25"}),Be.create({templateReference:this.actionsTemplate,binding:"actions",display:"",size:"5",position:"end"})])},300)}isOwner(e){return e.professional?.key.value===this.userVediusContext?.current?.key?.value}getMenuItemsKeysToHide(e){return this.isOwner(e)?e.type===te.EVALUATION?[de.DELETE_QUESTIONNAIRE]:[de.DELETE_EVALUATION]:[de.DELETE_EVALUATION,de.DELETE_QUESTIONNAIRE,de.EDIT]}onMenuItemOptionSelected(e,t){let n={key:e.key,item:t};this.onActionItemSelected.emit(n)}};a.\u0275fac=function(t){return new(t||a)(v(J),v(re))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-grid"]],viewQuery:function(t,n){if(t&1&&(U(yl,5),U(bl,5),U(Il,5),U(Ol,5),U(wl,5)),t&2){let s;F(s=B())&&(n.titleTemplate=s.first),F(s=B())&&(n.professionalTemplate=s.first),F(s=B())&&(n.createdDateTemplate=s.first),F(s=B())&&(n.typeTemplate=s.first),F(s=B())&&(n.actionsTemplate=s.first)}},inputs:{dataSource:"dataSource",columns:"columns",pageIndex:"pageIndex",isLoading:"isLoading",showActions:"showActions",gridKey:"gridKey"},outputs:{onPaging:"onPaging",onSorting:"onSorting",onSelection:"onSelection",onRowClicked:"onRowClicked",onActionItemSelected:"onActionItemSelected",onSendLinkClicked:"onSendLinkClicked"},decls:12,vars:1,consts:[["title",""],["professional",""],["created",""],["type",""],["actions",""],[1,"evaluation-questionnaire-grid"],[3,"key","dataSource","columns","pageIndex","paginationEnabled","showSelection","isLoading","onPaging","onSorting","onSelection","onRowClick",4,"ngIf"],[3,"onPaging","onSorting","onSelection","onRowClick","key","dataSource","columns","pageIndex","paginationEnabled","showSelection","isLoading"],[1,"title-template"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"quantity-questions"],[1,"professional-template"],[1,"image",3,"ngStyle"],[4,"ngIf"],[1,"name"],[1,"created-template"],[1,"validate-info"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"data-info"],["size","sm",3,"text","status"],["class","actions-template",4,"ngIf"],[1,"actions-template"],["variant","tertiary","icon","send","iconType","only",3,"onClick",4,"ngIf"],[3,"onMenuItemSelected","hideProgramMenuKeys"],["variant","tertiary","icon","send","iconType","only",3,"onClick"]],template:function(t,n){t&1&&(u(0,"div",5),E(1,Ml,1,7,"vedius-grid",6),d(),E(2,Pl,8,11,"ng-template",null,0,I)(4,Ll,6,10,"ng-template",null,1,I)(6,ql,5,3,"ng-template",null,2,I)(8,Nl,3,2,"ng-template",null,3,I)(10,Dl,1,1,"ng-template",null,4,I)),t&2&&(r(),c("ngIf",n.columns.length>0))},dependencies:[j,en,X,lt,Ut,K,Li,q,L,zt,_i],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-questionnaire-grid .hidden{display:none}.evaluation-questionnaire-grid .title-template{display:flex;flex-direction:column;gap:4px}.evaluation-questionnaire-grid .title-template strong{color:var(--neutral-dusk, #192840);font-family:DM Sans;font-size:.875rem;font-style:normal;font-weight:500;line-height:20px}.evaluation-questionnaire-grid .title-template .quantity-questions{color:#6d7a8e}.evaluation-questionnaire-grid .title-template small{color:var(--neutral-dark, #6d7a8e);font-family:Inter;font-size:.75rem;font-style:normal;font-weight:500;line-height:18px}
7.evaluation-questionnaire-grid .created-template{width:200px;flex-direction:column;justify-content:flex-start;align-items:flex-start;display:inline-flex}.evaluation-questionnaire-grid .created-template .validate-info{width:100%;height:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-questionnaire-grid .created-template .validate-info .data-info{color:#192840}.evaluation-questionnaire-grid .created-template .validate-info .total-evaluation-questionnaire-days{color:#96a0b0}.evaluation-questionnaire-grid .created-template vedius-progress-bar{width:100%}.evaluation-questionnaire-grid .created-template vedius-progress-bar .progress-bar{margin-top:8px}.evaluation-questionnaire-grid .professional-template{display:flex;max-width:220px;align-items:center;gap:12px}.evaluation-questionnaire-grid .professional-template .image{min-width:24px;display:flex;width:var(--sizing-7, 24px);height:var(--sizing-7, 24px);justify-content:center;align-items:center;border-radius:50%;background-size:cover;color:#70bbc8;text-align:center;font-family:DM Sans;font-size:.875rem;font-weight:500;line-height:1.25rem}.evaluation-questionnaire-grid .professional-template .image.no-logo{background:#dcf5fa;background-position:center}.evaluation-questionnaire-grid .professional-template .name{overflow:hidden;color:var(--neutral-dusk, #192840);text-overflow:ellipsis;font-family:DM Sans;font-size:.75rem;font-style:normal;font-weight:500;line-height:18px}.evaluation-questionnaire-grid .actions-template{width:100%;justify-content:flex-end;align-items:center;gap:4px;display:inline-flex}.delete-menu-option .option-text{color:#f03838} 8`],encapsulation:2});let i=a;return i})();var ka=(()=>{let a=class a{constructor(e){this.router=e}setId(e){this._id=e}setPatientId(e){this._patientId=e}setFromPatientScreen(e){this._fromPatientScreen=e}redirect(){if(!this._id||!this._patientId)return;let e=this._fromPatientScreen?{apartir_do_report_do_paciente:!0}:void 0;this.router.navigate([ce.ResponderAvaliacaoQuestionarioPresencialModeloVedius,this._id,this._patientId],{queryParams:e}),setTimeout(()=>{this._id=void 0,this._patientId=void 0,this._fromPatientScreen=void 0},1e3)}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var La=(()=>{let a=class a{constructor(e){this.router=e}setId(e){this._id=e}setPatientId(e){this._patientId=e}setFromPatientScreen(e){this._fromPatientScreen=e}redirect(e){if(e||!this._id||!this._patientId)return;let t=this._fromPatientScreen?{apartir_do_report_do_paciente:!0}:void 0;this.router.navigate([ce.ResponderAvaliacaoQuestionarioPresencial,this._id,this._patientId],{queryParams:t}),setTimeout(()=>{this._id=void 0,this._patientId=void 0,this._fromPatientScreen=void 0},1e3)}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Yt=(()=>{let a=class a{constructor(e,t,n){this.questionnaireEvaluationDraftDataService=e,this.answerVediusEvaluationAndQuestionnaireInPersonRouteStrategy=t,this.answerEvaluationAndQuestionnaireInPersonRouteStrategy=n}create({evaluationQuestionnaireKey:e,title:t,patientId:n,fromPatientScreen:s}){return e instanceof De?(this.setTitleEvaluationQuestionnaireDraft(t),this.answerEvaluationAndQuestionnaireInPersonRouteStrategy.setId(e.value),this.answerEvaluationAndQuestionnaireInPersonRouteStrategy.setPatientId(n),this.answerEvaluationAndQuestionnaireInPersonRouteStrategy.setFromPatientScreen(s||!1),this.answerEvaluationAndQuestionnaireInPersonRouteStrategy):(this.setTitleEvaluationQuestionnaireDraft(t),this.answerVediusEvaluationAndQuestionnaireInPersonRouteStrategy.setId(e.value),this.answerVediusEvaluationAndQuestionnaireInPersonRouteStrategy.setPatientId(n),this.answerVediusEvaluationAndQuestionnaireInPersonRouteStrategy.setFromPatientScreen(s||!1),this.answerVediusEvaluationAndQuestionnaireInPersonRouteStrategy)}setTitleEvaluationQuestionnaireDraft(e){this.questionnaireEvaluationDraftDataService.clear();let t=new at,n=new St(e);t.setDetails(n),this.questionnaireEvaluationDraftDataService.setData(t)}};a.\u0275fac=function(t){return new(t||a)($(Wt),$(ka),$(La))}
8,a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Bl=i=>({client_treatment_type:i}),Xt=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie){this.formBuilder=e,this.patientService=t,this.userVediusReferenceKeyFactoryService=n,this.userVediusContext=s,this.dialog=m,this.translationService=h,this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy=O,this.data=Q,this.dialogRef=H,this.breakpointObserver=ie,this.modal=null,this.isMobile=!1,this.totalOfQuestions=0,this.isTranslationLoaded=!1,this.userVediusReferenceKey=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY),this.form=this.getForm(),this.totalOfQuestions=Q.totalOfQuestions,this.title=Q.title,this.evaluationQuestionnaireKey=Q.evaluationQuestionnaireKey}get userVedius(){return this.userVediusContext.current}get controls(){return this.form.controls}get patientAutoCompleteItemSelected(){return this.controls.patient.value}get clientTreatmantType(){return this.userVedius?.clientTreatmentType}ngOnInit(){this.listenIsMobile(),this.load()}load(){return N(this,null,function*(){this.loadTranslation(),this.loadPatientsObjectInfos()})}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}loadTranslation(){return N(this,null,function*(){this.translationService.loaded().then(()=>{this.isTranslationLoaded=!0})})}loadPatientsObjectInfos(){return N(this,null,function*(){let e=yield this.patientService.getAllObjectInfos();this.patientsObjectInfos=e})}close(){this.modal?.close()}redirectToAnswerInPerson(){if(this.formHasErrors())return;this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy.create({evaluationQuestionnaireKey:this.evaluationQuestionnaireKey,title:this.title,patientId:this.patientAutoCompleteItemSelected?.key}).redirect(),this.close()}addPatient(){this.dialog.open(Jo,{width:"600px",disableClose:!0,data:{isDialog:!0,patientsObjectInfos:this.patientsObjectInfos||[],professional:this.userVedius}}).afterClosed().subscribe(t=>{if(t){let n=t.toInfo();this.patientsObjectInfos=[n.toObject(),...this.patientsObjectInfos||[]],this.setPatientAutoComplete(n.key.patientKey)}})}setPatientAutoComplete(e){setTimeout(()=>{this.patientAutoCompleteComponent?.selectItem(e.value)},100)}getForm(){return this.formBuilder.group({patient:new oi(void 0,lo.required)})}formHasErrors(){return Ai(this.form),!this.form.valid}};a.\u0275fac=function(t){return new(t||a)(v(Hi),v(ht),v(Re),v(re),v(le),v(J),v(Yt),v(He),v(dt),v(Z))}
8,a.\u0275cmp=P({type:a,selectors:[["app-choose-patient-for-evaluation-and-questionnaire-in-person-modal"]],viewQuery:function(t,n){if(t&1&&(U(W,5),U(on,5)),t&2){let s;F(s=B())&&(n.modal=s.first),F(s=B())&&(n.patientAutoCompleteComponent=s.first)}},decls:30,vars:36,consts:[[1,"choose-patient-for-evaluation-and-questionnaire-in-person-modal"],[1,"text-display"],[3,"variant","size"],[1,"form-info"],["variant","text","size","lg"],["variant","text","size","sm","fontFamily","font-family-secundary",1,"info-questions"],[1,"reply-now-evaluation-questionnaire-form",3,"formGroup"],[1,"content-left"],[1,"content"],[1,"form-content"],[1,"patient-content"],[3,"label","patientControl","patientsObjectInfos"],["variant","secondary","iconType","only","icon","add-users","size","xlarge",3,"onClick","customTitle"],[1,"modal-actions"],["size","large","variant","tertiary","icon","download-outline",3,"onClick","fullSize"],[3,"onClick","fullSize"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"div",1)(3,"vedius-text",2),C(4),p(5,"translate"),d()(),u(6,"div",3)(7,"vedius-text",4),C(8),d(),u(9,"vedius-text",5),C(10),p(11,"translate"),d()(),u(12,"form",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10),y(17,"app-patient-autocomplete",11),p(18,"translate"),u(19,"vedius-button",12),p(20,"translate"),p(21,"translate"),p(22,"translate"),x("onClick",function(){return n.addPatient()}),d()()()()()(),u(23,"div",13)(24,"vedius-button",14),x("onClick",function(){return n.close()}),C(25),p(26,"translate"),d(),u(27,"vedius-button",15),x("onClick",function(){return n.redirectToAnswerInPerson()}),C(28),p(29,"translate"),d()()()()),t&2&&(r(),A("small",n.isMobile),r(2),c("variant",n.isMobile?"text":"display")("size",n.isMobile?"xl":"micro"),r(),T(" ",_(5,17,"CHOOSE_PATIENT_FOR_EVALUATION_AND_QUESTIONNAIRE_IN_PERSON_MODAL.TITLE")," "),r(4),M(n.title),r(2),ot("",n.totalOfQuestions," ",_(11,19,"CHOOSE_PATIENT_FOR_EVALUATION_AND_QUESTIONNAIRE_IN_PERSON_MODAL.QUESTIONS_LABEL"),""),r(2),c("formGroup",n.form),r(5),he("label",_(18,21,"CHOOSE_PATIENT_FOR_EVALUATION_AND_QUESTIONNAIRE_IN_PERSON_MODAL.PATIENT_LABEL")),c("patientControl",n.controls.patient)("patientsObjectInfos",n.patientsObjectInfos),r(2),he("customTitle",ee(22,27,"PATIENT_PROFILE.CREATE_TITLE",Y(34,Bl,n.clientTreatmantType==="PATIENT"?_(20,23,"PATIENT"):_(21,25,"STUDENT")))),r(5),c("fullSize",!0),r(),T(" ",_(26,30,"BUTTONS.CANCEL")," "),r(2),c("fullSize",!0),r(),T(" ",_(29,32,"BUTTONS.START")," "))},dependencies:[W,X,Gi,ji,zi,Ki,on,K,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] cursor[_ngcontent-%COMP%]{cursor:pointer}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .text-display[_ngcontent-%COMP%]{padding-top:5px;padding-bottom:30px}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .form-info[_ngcontent-%COMP%]{min-height:104px;border-radius:8px;gap:8px;padding:24px;background-color:#f5f6f8;display:flex;flex-direction:column}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .form-info[_ngcontent-%COMP%] .info-questions[_ngcontent-%COMP%]{color:#6d7a8e}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%]{width:100%;display:flex;padding-top:40px}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;position:relative}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;max-width:600px;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:48px;display:inline-flex}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%]{width:100%;display:flex;gap:24px;flex-direction:column}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%]{width:100%;justify-content:flex-start;align-items:flex-start;gap:16px;display:inline-flex}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .reply-now-evaluation-questionnaire-form[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] app-patient-autocomplete[_ngcontent-%COMP%]{width:100%}.choose-patient-for-evaluation-and-questionnaire-in-person-modal[_ngcontent-%COMP%] .modal
8-actions[_ngcontent-%COMP%]{padding-top:40px;display:flex;justify-content:flex-end;gap:10px}.choose-patient-for-evaluation-and-questionnaire-in-person-modal.small[_ngcontent-%COMP%] .text-display[_ngcontent-%COMP%]{padding-top:0;margin-top:12px;padding-bottom:48px}.choose-patient-for-evaluation-and-questionnaire-in-person-modal.small[_ngcontent-%COMP%] .modal-actions[_ngcontent-%COMP%]{padding-top:48px;flex-direction:column-reverse}"]});let i=a;return i})();var qa=i=>({client_treatment_type:i}),qi=function(i){return i.REPLY_IN_PERSON="REPLY_IN_PERSON",i.SEND_REMOTE="SEND_REMOTE",i}(qi||{}),Na=(()=>{let a=class a{constructor(e,t,n,s,m){this.translation=e,this.userContext=t,this.breakpointObserver=n,this.analyticsService=s,this.dialogRef=m,this.clientTreatmentLabel="",this.isMobile=!1}ngOnInit(){this.listenIsMobile(),this.translation.loaded().then(()=>{this.clientTreatmentLabel=this.translation.get(this.userContext.current.clientTreatmentType)})}listenIsMobile(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isMobile=e.matches})}onRedirect(e){this.analyticsChooseSendOptionsEvaluationAndQuestionnaireFromModal(e),this.dialogRef.close(e)}analyticsChooseSendOptionsEvaluationAndQuestionnaireFromModal(e){this.analyticsService.trackButtonClick(e===qi.REPLY_IN_PERSON?gt.AnswerEvaluationAndQuestionnaireInPersonFromModal:gt.SendEvaluationAndQuestionnaireFromModal,{$type:e})}};a.\u0275fac=function(t){return new(t||a)(v(J),v(re),v(Z),v(Dt),v(dt))},a.\u0275cmp=P({type:a,selectors:[["app-choose-send-options-evaluation-and-questionnaire-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},decls:26,vars:29,consts:[[1,"choose-send-options-evaluation-and-questionnaire-modal"],[1,"title"],[1,"buttons"],[3,"click"],["src","../../../../../../assets/images/reply-now.svg",3,"alt"],[1,"choose-send-evaluation-questionnaire-content"],["src","../../../../../../assets/images/send-link.svg",3,"alt"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"h1",1),C(3),p(4,"translate"),d(),u(5,"div",2)(6,"button",3),x("click",function(){return n.onRedirect("REPLY_IN_PERSON")}),y(7,"img",4),p(8,"translate"),u(9,"div",5)(10,"strong"),C(11),p(12,"translate"),d(),u(13,"span"),C(14),p(15,"translate"),d()()(),u(16,"button",3),x("click",function(){return n.onRedirect("SEND_REMOTE")}),y(17,"img",6),p(18,"translate"),u(19,"div",5)(20,"strong"),C(21),p(22,"translate"),d(),u(23,"span"),C(24),p(25,"translate"),d()()()()()()),t&2&&(r(),A("small",n.isMobile),r(2),T(" ",_(4,9,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.TITLE")," "),r(4),c("alt",_(8,11,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.REPLY_NOW.TITLE")),r(4),T(" ",_(12,13,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.REPLY_NOW.TITLE")," "),r(3),T(" ",ee(15,15,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.REPLY_NOW.DESCRIPTION",Y(25,qa,n.clientTreatmentLabel))," "),r(3),c("alt",_(18,18,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.SEND_LINK.TITLE")),r(4),T(" ",_(22,20,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.SEND_LINK.TITLE")," "),r(3),T(" ",ee(25,22,"CHOOSE_SEND_OPTIONS_EVALUATION_AND_QUESTIONNAIRE_MODAL.SEND_LINK.DESCRIPTION",Y(27,qa,n.clientTreatmentLabel))," "))},dependencies:[W,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;display:flex;align-items:center;gap:16px}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{margin-top:42px;display:flex;gap:16px}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;padding:24px;flex-direction:column;align-items:center;gap:12px;flex:1 0 0;align-self:stretch;border-radius:8px;background:#fff;border:1px solid #d3dae5;cursor:pointer;height:310px}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .choose-send-evaluation-questionnaire-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{border:2px solid #0d7180}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover strong[_ngcontent-%COMP%]{color:#0d7180}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px;height:150px}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:18px;font-style:normal;font-weight:500;line-height:28px;transition:.2s all}.choose-send-options-evaluation-and-questionnaire-modal[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6d7a8e;font-family:DM Sans;font-size:.875rem;font-style:normal;font-weight:500;line-height:20px}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.875rem;margin-top:12px}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:12px}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-direction:row;height:100%}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .choose-send-evaluation-questionnaire-content[_ngcontent-%COMP%]{align-items:flex-start}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:1rem;line-height:28px}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-align:start}.choose-send-options-evaluation-and-questionnaire-modal.small[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:80px;height:80px}"]});let i=a;return i})();var vn=(()=>
8{let a=class a{constructor(){this.changeViewSubject=new it,this.changeViewSubject$=this.changeViewSubject.asObservable(),this.deselectAllSubject=new it,this.deselectAllSubject$=this.deselectAllSubject.asObservable()}changeView(e){this.changeViewSubject.next(e)}deselectAll(){this.deselectAllSubject.next()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Rn=i=>({item:i}),zl=()=>({height:"18px"}),Ra=()=>({height:"14px"}),jl=()=>({height:"40px"}),Dn=()=>({height:"20px"}),Kl=i=>({quantity:i}),Hl=i=>({"background-image":i});function Gl(i,a){i&1&&z(0)}function $l(i,a){i&1&&z(0)}function Wl(i,a){i&1&&z(0)}function Yl(i,a){if(i&1){let o=S();D(0),u(1,"div",7)(2,"li",8),x("click",function(){let t=g(o).$implicit,n=l();return f(n.rowClicked(t))}),E(3,Gl,1,0,"ng-container",9)(4,$l,1,0,"ng-container",9)(5,Wl,1,0,"ng-container",9),d()(),R()}if(i&2){let o=a.$implicit;l();let e=w(5),t=w(7),n=w(9);r(3),c("ngTemplateOutlet",e)("ngTemplateOutletContext",Y(6,Rn,o)),r(),c("ngTemplateOutlet",t)("ngTemplateOutletContext",Y(8,Rn,o)),r(),c("ngTemplateOutlet",n)("ngTemplateOutletContext",Y(10,Rn,o))}}function Xl(i,a){i&1&&(u(0,"div",18),y(1,"ngx-skeleton-loader",19)(2,"ngx-skeleton-loader",13),d()),i&2&&(r(),c("count",1)("theme",se(4,Dn)),r(),c("count",1)("theme",se(5,Ra)))}function Jl(i,a){if(i&1&&(D(0),u(1,"div",7)(2,"li",10)(3,"div",11)(4,"div",12),y(5,"ngx-skeleton-loader",13)(6,"ngx-skeleton-loader",13),d(),u(7,"div",14),y(8,"ngx-skeleton-loader",15),d()(),E(9,Xl,3,6,"div",16),u(10,"div",17),y(11,"ngx-skeleton-loader",13)(12,"ngx-skeleton-loader",13),d()()(),R()),i&2){let o=l(2);r(5),c("count",1)("theme",se(11,zl)),r(),c("count",1)("theme",se(12,Ra)),r(2),c("count",1)("theme",se(13,jl)),r(),c("ngIf",o.isClinic),r(2),c("count",1)("theme",se(14,Dn)),r(),c("count",1)("theme",se(15,Dn))}}function Zl(i,a){if(i&1&&(D(0),u(1,"ul",4),E(2,Jl,13,16,"ng-container",5),d(),R()),i&2){let o=l();r(2),c("ngForOf",o.fakeLoaderOptions)}}function ec(i,a){if(i&1){let o=S();u(0,"vedius-button",27),x("onClick",function(t){g(o);let n=l().item;return l().sendLinkClicked(n),f(t.stopPropagation())}),d()}}function tc(i,a){if(i&1){let o=S();u(0,"vedius-checkbox",28),x("onCustomChange",function(){g(o);let t=l().item,n=l();return f(n.onItemSelectionChange(t))}),d()}if(i&2){let o=l().item,e=l();c("checked",e.isItemSelected(o))}}function ic(i,a){if(i&1&&(u(0,"div",20)(1,"div",21)(2,"vedius-text",22),C(3),d(),u(4,"vedius-text",23),C(5),p(6,"translate"),p(7,"translate"),p(8,"translate"),d()(),u(9,"div",24),E(10,ec,1,0,"vedius-button",25)(11,tc,1,1,"vedius-checkbox",26),d()()),i&2){let o=a.item,e=l();r(3),M(o.title),r(2),M(!o.questions||o.questions.length===0?_(6,4,"EVALUATION_QUESTIONNAIRE_LIST.NO_QUESTION_MESSAGE"):o.questions.length>1?ee(7,6,"EVALUATION_QUESTIONNAIRE_LIST.MANY_QUESTIONS_MESSAGE",Y(11,Kl,o.questions.length)):_(8,9,"EVALUATION_QUESTIONNAIRE_LIST.SINGLE_QUESTION_MESSAGE")),r(5),c("ngIf",!e.isSelectionViewActive&&e.isOwner(o)),r(),c("ngIf",e.isSelectionViewActive&&e.isOwner(o))}}function nc(i,a){if(i&1&&y(0,"div",33),i&2){let o=l(2).item;c("ngStyle",Y(1,Hl,"url("+(o.professional.logo==null?null:o.professional.logo.url)+")"))}}function oc(i,a){if(i&1&&(u(0,"div"),y(1,"vedius-avatar",34),d()),i&2){let o=l(2).item;r(),c("alt",o.professional==null?null:o.professional.name.fullName)}}function ac(i,a){if(i&1&&(u(0,"div",30),E(1,nc,1,3,"div",31)(2,oc,2,1,"div",6),u(3,"vedius-text",32),C(4),d()()),i&2){let o=l().item;r(),c("ngIf",o.professional.logo),r(),c("ngIf",!o.professional.logo),r(2),M(o.professional==null?null:o.professional.name.fullName)}}function rc(i,a){if(i&1&&E(0,ac,5,3,"div",29),i&2){let o=a.item,e=l();c("ngIf",e.isClinic&&o.professional)}}function sc(i,a){if(i&1){let o=S();u(0,"app-evaluation-and-questionnaire-menu-button",42),x("onMenuItemSelected",function(t){g(o);let n=l().item,s=l();return f(s.onMenuItemSelected(t,n))}),d()}if(i&2){let o=l().item,e=l();c("hideProgramMenuKeys",e.getMenuItemsKeysToHide(o))}}function lc(i,a){if(i&1&&(u(0,"div",35)(1,"div",36)(2,"div",37)(3,"div",38)(4,"vedius-text",39),C(5),p(6,"nanoDayMonthYearDate"),d()()(),y(7,"vedius-status-label",40),d(),E(8,sc,1,1,"app-evaluation-and-questionnaire-menu-button",41),d()),i&2){let o=a.item,e=l();r(5),M(_(6,4,o.createdAt.date)),r(2),c("text",e.getTranslation(o.type))("status",e.status),r(),c("ngIf",!e.isSelectionViewActive)}}var ti=function(i){return i.MENU="MENU",i.SELECTION="SELECTION",i}(ti||{}),Da=(()=>{let a=class a{constructor(e,t,n){this.listService=e,this.vediusTranslation=t,this.userVediusContext=n,this.searchText="",this.isDeleting=!1,this.onRowClicked=new k,this.onActionItemSelected=new k,this.onLoadMoreItems=new k,this.onViewChange=new k,this.onSelection=new k,this.onSendLinkClicked=new k,this.itemsSelected=[],this.status=Ot.UNKOWN,this.pageSize=Se.TWENTY_FIVE,this.page=0,this.evaluationQuestionnairePaginationFilter=At.empty(),this.fakeLoaderOptions=Array(Se.TEN).map((s,m)=>m),this.isSelectionViewActive=!1,this.translationMapping={EVALUATION:b.TypeEvaluationLineGridName,QUESTIONNAIRE:b.TypeQuestionnaireLineGridName},this.translations={}}get isClinic(){return this.userVediusContext.current.type===Ke.Clinic}ngOnInit(){this.changeViewSubscription=this.listService.changeViewSubject$.subscribe(e=>{this.setSelectionView(e===ti.SELECTION)}),this.deselectAllSubscripton=this.listService.deselectAllSubject$.subscribe(()=>{this.itemsSelected=[]}),this.vediusTranslation.loaded().then(()=>{this.setTranslations()})}get isFilterApplied(){return!this.evaluationQuestionnairePaginationFilter.isEmpty()}get listSize(){return this.dataSource?.data.length}get data(){return this.dataSource?.data||[]}setTranslations(){for(let e in this.translationMapping)Object.prototype.hasOwnProperty.call(this.translationMapping,e)&&(this.translations[e]=this.vediusTranslation.get(this.translationMapping[e]))}getTranslation(e){return this.translations[e]}loadMoreItems(){this.onLoadMoreItems.emit()}rowClicked(e){this.isSelectionViewActive||this.onRowClicked.emit
8(e)}sendLinkClicked(e){this.onSendLinkClicked.emit(e)}getMenuItemsKeysToHide(e){return this.isOwner(e)?e.type===te.EVALUATION?[de.DELETE_QUESTIONNAIRE]:[de.DELETE_EVALUATION]:[de.DELETE_EVALUATION,de.DELETE_QUESTIONNAIRE,de.EDIT]}onMenuItemSelected(e,t){let n={key:e.key,item:t};e.key===de.DELETE_EVALUATION||e.key===de.DELETE_QUESTIONNAIRE?(this.setSelectionView(!0),this.onItemSelectionChange(t)):this.onActionItemSelected.emit(n)}setSelectionView(e){this.isSelectionViewActive=e,this.onViewChange.emit(this.isSelectionViewActive?ti.SELECTION:ti.MENU),this.isSelectionViewActive||(this.itemsSelected=[])}isItemSelected(e){return this.itemsSelected.some(t=>t.key.value===e.key.value)}isOwner(e){return e.professional?.key.value===this.userVediusContext?.current?.key?.value}onItemSelectionChange(e){let t=this.itemsSelected.findIndex(n=>n.key.value===e.key.value);t!==-1?this.itemsSelected.splice(t,1):this.itemsSelected.push(e),this.onSelection.emit(this.itemsSelected)}reloadEvaluationQuestionnaireMenuButton(){this.evaluationQuestionnaireMenuButtonComponents&&this.evaluationQuestionnaireMenuButtonComponents.forEach(e=>{e.load()})}ngOnDestroy(){this.changeViewSubscription?.unsubscribe(),this.deselectAllSubscripton?.unsubscribe()}};a.\u0275fac=function(t){return new(t||a)(v(vn),v(J),v(re))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-mobile-list"]],viewQuery:function(t,n){if(t&1&&U(Li,5),t&2){let s;F(s=B())&&(n.evaluationQuestionnaireMenuButtonComponents=s)}},inputs:{searchText:"searchText",dataSource:"dataSource",isLoading:"isLoading",isDeleting:"isDeleting"},outputs:{onRowClicked:"onRowClicked",onActionItemSelected:"onActionItemSelected",onLoadMoreItems:"onLoadMoreItems",onViewChange:"onViewChange",onSelection:"onSelection",onSendLinkClicked:"onSendLinkClicked"},decls:10,vars:4,consts:[["headerMobileList",""],["professionalContent",""],["evaluationQuestionnaireInfoContent",""],["infiniteScroll","",1,"evaluation-and-questionnaire-mobile-list",3,"scrolled"],[1,"evaluation-and-questionnaire-mobile-list-items"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"evaluation-and-questionnaire-mobile-list-wrapper"],["tabindex","0",1,"evaluation-and-questionnaire-mobile-list-item",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"loader","evaluation-and-questionnaire-mobile-list-item"],[1,"content-1"],[1,"left"],[1,"loader",3,"count","theme"],[1,"right"],[3,"count","theme"],["class","content-2",4,"ngIf"],[1,"content-3"],[1,"content-2"],["appearance","circle",1,"loader-circle",3,"count","theme"],[1,"evaluation-and-questionnaire-header-content"],[1,"content-left"],["variant","text","size","md",1,"title"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"exercise-quantity"],[1,"content-right"],["variant","tertiary","icon","send","iconType","only",3,"onClick",4,"ngIf"],[3,"checked","onCustomChange",4,"ngIf"],["variant","tertiary","icon","send","iconType","only",3,"onClick"],[3,"onCustomChange","checked"],["class","professional-content",4,"ngIf"],[1,"professional-content"],["class","image",3,"ngStyle",4,"ngIf"],["variant","text","size","sm",1,"professional-name"],[1,"image",3,"ngStyle"],["size","nano",3,"alt"],[1,"evaluation-questionnaire-info-content"],[1,"left-info-content"],[1,"validate-info"],[1,"text-content"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"data-info"],[3,"text","status"],[3,"hideProgramMenuKeys","onMenuItemSelected",4,"ngIf"],[3,"onMenuItemSelected","hideProgramMenuKeys"]],template:function(t,n){if(t&1){let s=S();u(0,"div",3),x("scrolled",function(){return g(s),f(n.loadMoreItems())}),u(1,"ul",4),E(2,Yl,6,12,"ng-container",5),d(),E(3,Zl,3,1,"ng-container",6),d(),E(4,ic,12,13,"ng-template",null,0,I)(6,rc,1,1,"ng-template",null,1,I)(8,lc,9,6,"ng-template",null,2,I)}t&2&&(r(),A("hidden",n.isDeleting),r(),c("ngForOf",n.data),r(),c("ngIf",n.isLoading||n.isDeleting))},dependencies:[tn,Pt,ve,j,We,$e,X,K,Do,lt,mi,Ut,Li,q,L,zt],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
8-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-mobile-list{display:flex;width:100%;flex-direction:column;min-height:70vh}@media screen and (max-width: 600px){.evaluation-and-questionnaire-mobile-list{margin-bottom:70px}}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items{display:flex;flex-direction:column;list-style:none;margin:0;padding:0}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items.hidden{display:none!important}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper{position:relative}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item{width:100%;height:100%;padding:24px;background:#fff;border-top:1px #d3dae5 solid;justify-content:flex-start;align-items:flex-start;gap:16px;display:inline-flex;flex-direction:column;transition:.2s all;cursor:pointer;outline:none;box-sizing:border-box}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-and-questionnaire-header-content{width:100%;display:flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-and-questionnaire-header-content .content-left{width:100%;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px;display:inline-flex;overflow:hidden}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-and-questionnaire-header-content .content-left .title{color:#192840}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-and-questionnaire-header-content .content-left .exercise-quantity{color:#6d7a8e}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-and-questionnaire-header-content .content-right{justify-content:flex-end;align-items:center}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .professional-content{width:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .professional-content .image{display:flex;width:var(--sizing-8, 24px);height:var(--sizing-8, 24px);justify-content:center;align-items:center;border-radius:50%;background-size:contain;background-position:center}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .professional-content .professional-name{color:#192840}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-questionnaire-info-content{width:100%;justify-content:space-between;align-items:center;gap:16px;display:inline-flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-questionnaire-info-content .left-info-content{justify-content:flex-start;align-items:center;gap:16px;display:inline-flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-questionnaire-info-content .left-info-content .validate-info{max-width:170px;flex-direction:column;justify-content:flex-start;align-items:flex-start;display:inline-flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-questionnaire-info-content .left-info-content .validate-info .text-content{width:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-and-questionnaire-mobile-list .evaluation-and-questionnaire-mobile-list-items .evaluation-and-questionnaire-mobile-list-wrapper .evaluation-and-questionnaire-mobile-list-item .evaluation-questionnaire-info-content .left-info-content .validate-info .text-content .data-info{color:#192840}.evaluation-and-questionnaire-mobile-list .loader{width:100%;display:flex;flex-direction:column;gap:0}.evaluation-and-questionnaire-mobile-list .loader .content-1{width:100%;display:flex;flex-direction:row;justify-content:space-between;gap:16px}.evaluation-and-questionnaire-mobile-list .loader .content-1 .left{display:flex;flex-direction:column;width:300px}.evaluation-and-questionnaire-mobile-list .loader .content-1 .right{width:40px}.evaluation-and-questionnaire-mobile-list .loader .content-2{display:flex;flex-direction:row;align-items:center;gap:8px;width:300px}.evaluation-and-questionnaire-mobile-list .loader .content-2 .loader-circle{margin-bottom:2px}.evaluation-and-questionnaire-mobile-list .loader .content-3{display:flex;flex-direction:row;gap:16px;width:300px} 9`],encapsulation:2});let i=a;return i})();var Ua=(()=>{let a=class a{constructor(e){this.router=e}redirect(e){if(!e){this.router.navigate([ce.EditarAvaliacaoQuestionario]);return}this.router.navigate([ce.EditarAvaliacaoQuestionario,e])}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var uc=["searchInputComponent"],dc=()=>({height:"80px"}),Fa=i=>({quantity:i}),pc=i=>({client_treatment_type:i});function mc(i,a){i&1&&z(0)}function _c(i,a){i&1&&z(0)}function vc(i,a){i&1&&z(0)}function gc(i,a){i&1&&z(0)}function fc(i,a){i&1&&z(0)}function hc(i,a){i&1&&z(0)}function xc(i,a){i&1&&z(0)}function Cc(i,a){if(i&1&&(D(0),E(1,xc,1,0,"ng-container",16),R()),i&2){l(2);let o=w(9);r(),c("ngTemplateOutlet",o)}}function Ec(i,a){i&1&&(D(0),y(1,"ngx-skeleton-loader",22),R()),i&2&&(r(),c("count",5)("theme",se(2,dc)))}function Sc(i,a){if(i&1){let o=S();u(0,"app-evaluation-and-questionnaire-grid",23),x("onRowClicked",function(t){g(o);let n=l(2);return f(n.onRowClicked(t))})("onSorting",function(t){g(o);let n=l(2);return f(n.onSorting(t))})("onSelection",function(t){g(o);let n=l(2);return f(n.onSelection(t))})("onActionItemSelected",function(t){g(o);let n=l(2);return f(n.onActionItemSelected(t))})("onSendLinkClicked",function(t){g(o);let n=l(2);return f(n.goToChooseSendOptionsEvaluationAndQuestionnaireModal(t))}),d()}if(i&2){let o=l(2);A("hidden",!o.dataSource),c("gridKey",o.gridKey)("dataSource",o.pageableResult)("columns",o.columns)("isLoading",o.isLoading)("showActions",o.evaluationQuestionnairePageItemsSelected.length===0)}}function Tc(i,a){if(i&1&&(u(0,"vedius-text",25),C(1),p(2,"translate"),p(3,"translate"),d()),i&2){let o=l(3);r(),T(" ",o.evaluationQuestionnairePageItemsSelected.length>1?ee(2,1,"EVALUATION_QUESTIONNAIRE_LIST.MANY_ITENS_SELECTED",Y(6,Fa,o.evaluationQuestionnairePageItemsSelected.length)):_(3,4,"EVALUATION_QUESTIONNAIRE_LIST.SINGLE_ITEM_SELECTED")," ")}}function yc(i,a){if(i&1&&E(0,Tc,4,8,"vedius-text",24),i&2){let o=l(2);c("ngIf",o.evaluationQuestionnairePageItemsSelected.length>0)}}function bc(i,a){if(i&1){let o=S();u(0,"vedius-collaborator-selection-button",27,10),x("onFilterSelect",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))})("onLoad",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))}),d()}if(i&2){let o=l(3);A("hidden",o.evaluationQuestionnairePageItemsSelected.length>0),c("initialSelected",o.initialProfessionalSelected)}}function Ic(i,a){if(i&1&&E(0,bc,2,3,"vedius-collaborator-selection-button",26),i&2){let o=l(2);c("ngIf",o.isClinicUser)}}function Oc(i,a){if(i&1){let o=S();u(0,"vedius-paginator",28),x("onPaging",function(t){g(o);let n=l(2);return f(n.onPaging(t))}),d()}if(i&2){let o=l(2);A("hidden",o.listSize===0||o.evaluationQuestionnairePageItemsSelected.length>0),c("length",o.pageableResult.totalItems)("pageSize",o.pageSize)("pageIndex",o.page)}}function wc(i,a){if(i&1){let o=S();u(0,"div",30)(1,"vedius-button",31),x("onClick",function(){g(o);let t=l(3);return f(t.clearAllSelection())}),C(2),p(3,"translate"),d(),u(4,"vedius-button",32),x("onClick",function(){g(o);let t=l(3);return f(t.deleteEvaluationQuestionnairePageItemsSelected())}),C(5),p(6,"translate"),p(7,"translate"),d()()}if(i&2){let o=l(3);r(2),M(_(3,3,"EVALUATION_QUESTIONNAIRE_LIST.CLEAR_SELECTION")),r(2),c("withStroke",!1),r(),T(" ",o.evaluationQuestionnairePageItemsSelected.length>
91?_(6,5,"EVALUATION_QUESTIONNAIRE_LIST.DELETE_SELECTIONS"):_(7,7,"EVALUATION_QUESTIONNAIRE_LIST.DELETE_SELECTION")," ")}}function Ac(i,a){if(i&1&&E(0,wc,8,9,"div",29),i&2){let o=l(2);c("ngIf",o.evaluationQuestionnairePageItemsSelected.length>0)}}function Qc(i,a){if(i&1&&(u(0,"div",17)(1,"div",18),E(2,_c,1,0,"ng-container",16)(3,vc,1,0,"ng-container",16)(4,gc,1,0,"ng-container",16),d(),u(5,"div",19),E(6,fc,1,0,"ng-container",16)(7,hc,1,0,"ng-container",16),d()(),E(8,Cc,2,1,"ng-container",20)(9,Ec,2,3,"ng-container",21)(10,Sc,1,7,"ng-template",null,5,I)(12,yc,1,1,"ng-template",null,6,I)(14,Ic,1,1,"ng-template",null,7,I)(16,Oc,1,5,"ng-template",null,8,I)(18,Ac,1,1,"ng-template",null,9,I)),i&2){let o=w(11),e=w(13),t=w(15),n=w(17),s=w(19),m=l(),h=w(7);r(),A("hidden",!m.isClinicUser&&!m.isFilterApplied&&m.listSize===0||!m.dataSource),r(),c("ngTemplateOutlet",h),r(),c("ngTemplateOutlet",e),r(),c("ngTemplateOutlet",t),r(),A("hidden",!m.dataSource),r(),c("ngTemplateOutlet",n),r(),c("ngTemplateOutlet",s),r(),c("ngIf",m.listSize===0&&!m.isLoading)("ngIfElse",o),r(),c("ngIf",!m.dataSource||m.listSize===0&&m.isLoading)}}function Mc(i,a){i&1&&z(0)}function Pc(i,a){i&1&&z(0)}function kc(i,a){if(i&1&&(D(0),E(1,Pc,1,0,"ng-container",16),R()),i&2){l();let o=w(6);r(),c("ngTemplateOutlet",o)}}function Lc(i,a){i&1&&z(0)}function qc(i,a){i&1&&z(0)}function Nc(i,a){if(i&1){let o=S();u(0,"vedius-collaborator-selection-button",35),x("onFilterSelect",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))})("onLoad",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))}),d()}}function Vc(i,a){if(i&1&&(u(0,"div",33),E(1,qc,1,0,"ng-container",16)(2,Nc,1,0,"vedius-collaborator-selection-button",34),d()),i&2){let o=l(2),e=w(7);A("hidden",o.evaluationQuestionnaireMobileListView==="SELECTION"),r(),c("ngTemplateOutlet",e),r(),c("ngIf",o.isClinicUser)}}function Rc(i,a){if(i&1){let o=S();u(0,"vedius-button",40),x("onClick",function(){g(o);let t=l(3);return f(t.changeMobileListView("MENU"))}),C(1),p(2,"translate"),d()}i&2&&(r(),M(_(2,1,"EVALUATION_QUESTIONNAIRE_LIST.BACK_LIST")))}function Dc(i,a){if(i&1){let o=S();u(0,"vedius-button",41),x("onClick",function(){g(o);let t=l(3);return f(t.clearAllSelection())}),C(1),p(2,"translate"),d()}i&2&&(r(),M(_(2,1,"EVALUATION_QUESTIONNAIRE_LIST.CLEAR_SELECTION")))}function Uc(i,a){if(i&1&&(u(0,"vedius-text",42),C(1),p(2,"translate"),p(3,"translate"),d()),i&2){let o=l(3);r(),M(o.evaluationQuestionnairePageItemsSelected.length>1?ee(2,1,"EVALUATION_QUESTIONNAIRE_LIST.ITEMS_SELECTED",Y(6,Fa,o.evaluationQuestionnairePageItemsSelected.length)):_(3,4,"EVALUATION_QUESTIONNAIRE_LIST.ITEM_SELECTED"))}}function Fc(i,a){if(i&1&&(u(0,"div",36),E(1,Rc,3,3,"vedius-button",37)(2,Dc,3,3,"vedius-button",38)(3,Uc,4,8,"vedius-text",39),d()),i&2){let o=l(2);r(),c("ngIf",o.evaluationQuestionnairePageItemsSelected.length===0),r(),c("ngIf",o.evaluationQuestionnairePageItemsSelected.length>0),r(),c("ngIf",o.evaluationQuestionnairePageItemsSelected.length>0)}}function Bc(i,a){i&1&&z(0)}function zc(i,a){if(i&1&&(D(0),E(1,Bc,1,0,"ng-container",16),R()),i&2){l(2);let o=w(9);r(),c("ngTemplateOutlet",o)}}function jc(i,a){if(i&1){let o=S();u(0,"app-evaluation-and-questionnaire-mobile-list",43),x("onRowClicked",function(t){g(o);let n=l(2);return f(n.onRowClicked(t))})("onLoadMoreItems",function(){g(o);let t=l(2);return f(t.loadMoreItems())})("onActionItemSelected",function(t){g(o);let n=l(2);return f(n.onActionItemSelected(t))})("onViewChange",function(t){g(o);let n=l(2);return f(n.evaluationQuestionnaireMobileListView=t)})("onSelection",function(t){g(o);let n=l(2);return f(n.onMobileListSelection(t))})("onSendLinkClicked",function(t){g(o);let n=l(2);return f(n.goToChooseSendOptionsEvaluationAndQuestionnaireModal(t))}),d()}if(i&2){let o=l(2);c("dataSource",o.dataSource)("isLoading",o.isLoading)("isDeleting",o.isDeleting)}}function Kc(i,a){if(i&1&&E(0,Mc,1,0,"ng-container",16)(1,kc,2,1,"ng-container",21)(2,Lc,1,0,"ng-container",16)(3,Vc,3,4,"ng-template",null,11,I)(5,Fc,4,3,"ng-template",null,12,I)(7,zc,2,1,"ng-container",20)(8,jc,1,3,"ng-template",null,13,I),i&2){let o=w(4),e=w(9),t=l(),n=w(11);c("ngTemplateOutlet",o),r(),c("ngIf",t.evaluationQuestionnaireMobileListView==="SELECTION"),r(),c("ngTemplateOutlet",n),r(5),c("ngIf",t.listSize===0&&!t.isLoading)("ngIfElse",e)}}function Hc(i,a){if(i&1){let o=S();u(0,"vedius-input",44,14),p(2,"translate"),p(3,"translate"),x("onSearch",function(t){g(o);let n=l();return f(n.searchChanged(t))})("onCustomKeyup",function(t){g(o);let n=l();return f(n.checkEmptySearch(t))})("onClear",function(){g(o);let t=l();return f(t.clear())}),d()}i&2&&(he("placeholder",_(2,2,"SEARCH_INPUT.LABEL")),he("hint",_(3,4,"SEARCH_INPUT.HINT")))}function Gc(i,a){if(i&1){let o=S();u(0,"vedius-button",50),x("onClick",function(){g(o);let t=l(2);return f(t.clearFilter())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE_LIST.CLEAR_FILTERS")," "))}function $c(i,a){if(i&1){let o=S();u(0,"vedius-button",50),x("onClick",function(){g(o);let t=l(2);return f(t.onRequestToCreateEvaluationQuestionnaire())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE_LIST.CREATE_NOW_EVALUATION_QUESTIONNAIRE_BUTTON")," "))}function Wc(i,a){if(i&1&&(u(0,"li",45),y(1,"img",46),u(2,"span",47),C(3),p(4,"translate"),p(5,"translate"),d(),u(6,"span",48),C(7),p(8,"translate"),p(9,"translate"),p(10,"translate"),p(11,"translate"),d(),E(12,Gc,3,3,"vedius-button",49)(13,$c,3,3,"vedius-button",49),d()),i&2){let o=l();A("is-small",o.isSmallScreen),r(),nt("src","../../../../../assets/images/",o.isFilterApplied?"evaluation-and-questionnaire-not-found":"evaluation-and-questionnaire-empty-state",".svg",Ui),r(2),T(" ",o.isFilterApplied?_(4,8,"EVALUATION_QUESTIONNAIRE_LIST.NO_EVALUATION_QUESTIONNAIRE_FOUND_TIT
9LE"):_(5,10,"EVALUATION_QUESTIONNAIRE_LIST.EMPTY_EVALUATION_QUESTIONNAIRE_TITLE")," "),r(4),T(" ",o.isFilterApplied?_(8,12,"EVALUATION_QUESTIONNAIRE_LIST.NO_EVALUATION_QUESTIONNAIRE_FOUND_DESCRIPTION"):ee(11,18,"EVALUATION_QUESTIONNAIRE_LIST.EMPTY_EVALUATION_QUESTIONNAIRE_DESCRIPTION",Y(21,pc,o.clientTreatmantType==="PATIENT"?_(9,14,"PATIENTS"):_(10,16,"STUDENTS")))," "),r(5),c("ngIf",o.isFilterApplied),r(),c("ngIf",!o.isFilterApplied)}}function Yc(i,a){if(i&1){let o=S();D(0),u(1,"vds-fab",52),x("primaryActivate",function(){g(o);let t=l(2);return f(t.goToSendEmptyEvaluationQuestionnaire())}),d(),u(2,"vds-fab",53),x("primaryActivate",function(){g(o);let t=l(2);return f(t.goToCreateEvaluationQuestionnaire())}),d(),R()}}function Xc(i,a){if(i&1){let o=S();u(0,"div",54)(1,"vedius-button",55),x("onClick",function(){g(o);let t=l(2);return f(t.deleteEvaluationQuestionnairePageItemsSelected())}),d()()}i&2&&(r(),c("withStroke",!1))}function Jc(i,a){if(i&1&&E(0,Yc,3,0,"ng-container",21)(1,Xc,2,1,"div",51),i&2){let o=l();c("ngIf",o.evaluationQuestionnairePageItemsSelected.length===0&&o.evaluationQuestionnaireMobileListView!=="SELECTION"),r(),c("ngIf",o.evaluationQuestionnairePageItemsSelected.length>0)}}var Ba=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe){this.service=e,this.userContext=t,this.gridService=n,this.toastService=s,this.editEvaluationQuestionnaireRouteStrategy=m,this.translation=h,this.dialog=O,this.cdr=Q,this.trackingErrorCore=H,this.evaluationQuestionnaireListStorageService=ie,this.evaluationQuestionnaireMobileListComponentService=ge,this.clinicCollaboratorsSelectionService=fe,this.onCreateClicked=new k,this.onSent=new k,this.onShareSentClosed=new k,this.pageSize=Yi.default,this.pageMobileSize=Se.TWENTY_FIVE,this.page=0,this.isLoading=!1,this.isDeleting=!1,this.evaluationQuestionnairePaginationFilter=At.empty(),this.evaluationQuestionnaireMobileListView=ti.MENU,this.pageableResult=new Ft,this.columns=[],this.evaluationQuestionnairePageItemsSelected=[],this.gridKey="evaluation-and-questionnaire-grid-key",this.actionMethods={[de.EDIT]:pe=>this.onRowClicked(pe),[de.DELETE_EVALUATION]:pe=>this.deleteEvaluationQuestionnaire(pe.key),[de.DELETE_QUESTIONNAIRE]:pe=>this.deleteEvaluationQuestionnaire(pe.key),[de.DUPLICATE]:pe=>this.onDuplicateEvaluation(pe)}}get isClinicUser(){return this.userContext.current.type===Ke.Clinic}get userVedius(){return this.userContext.current}get clientTreatmantType(){return this.userContext.current.clientTreatmentType}get listSize(){return this.dataSource?.data?.length}get isFilterApplied(){return!!this.evaluationQuestionnairePaginationFilter.text||!this.isProfessionalsFiltered}get isProfessionalsFiltered(){return this.evaluationQuestionnairePaginationFilter.professionalKeys&&this.evaluationQuestionnairePaginationFilter.professionalKeys?.length>0}get initialProfessionalSelected(){if(this.userContext?.current instanceof ko)return[this.userContext.current];let e=this.evaluationQuestionnaireListStorageService.get();if(e&&e.filterOption&&this.isClinicUser){let t=e.filterOption.professionalKeys;return t&&t?.length>0?this.userContext.current.getCollaboratorsByKeys(t):[this.userContext.current]}else return[this.userContext.current]}ngOnInit(){this.isSmallScreen&&(this.pageSize=this.pageMobileSize),this.evaluationQuestionnairePaginationFilter.professionalKeys=this.initialProfessionalSelected.map(t=>t.key);let e=this.evaluationQuestionnaireListStorageService.get();e&&(this.pageSize=Mn(e.pageSize)),e?.paginated?this.loadStorageEvaluationQuestionnaire():this.loadEvaluationQuestionnaire()}loadStorageEvaluationQuestionnaire(){this.isLoading=!0;let e=this.evaluationQuestionnaireListStorageService.get(),t=e.paginated?.currentLastItems??void 0;this.isSmallScreen?(this.page=0,t=void 0,this.pageSize=Mn(e.paginated?.data?.length)):this.page=e.paginated&&e.paginated.currentPage>0?e.paginated.currentPage-1:0,this.evaluationQuestionnairePaginationFilter=e.filterOption??At.empty(),setTimeout(()=>{this.evaluationQuestionnairePaginationFilter.text&&this.searchInputComponent&&(this.searchInputComponent.value=this.evaluationQuestionnairePaginationFilter.text||"")},400),this.evaluationQuestionnairePaginationOrder=e.orderOption,this.evaluationQuestionnairePaginationFilter.isAllCollaboratorsSelected=this.clinicCollaboratorsSelectionService.isAllCollaboratorsSelected(this.evaluationQuestionnairePaginationFilter.professionalKeys||[]),this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:t,filterOption:this.evaluationQuestionnairePaginationFilter,orderOption:this.evaluationQuestionnairePaginationOrder})}).then(n=>{this.dataSource=n,this.pageableResult.setItems(this.dataSource.data),this.pageableResult.setTotalItems(this.dataSource.total,this.cdr),this.checkShowSelection(),this.saveListStateToStorage(),setTimeout(()=>{window.scrollTo(0,e.scrollY??0)},100)}).finally(()=>{this.isLoading=!1,setTimeout(()=>{this.checkShowSelection()},500)})}checkShowSelection(){let e=this.isOnlyOwnerSelected();this.gridService.changeShowSelection({key:this.gridKey,value:e})}isOnlyOwnerSelected(){if(this.userVedius instanceof we){let e=this.evaluationQuestionnairePaginationFilter.professionalKeys?.map(t=>t.value)||[];return e.length===1&&e[0]===this.userVedius.key.value}return!0}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadEvaluationQuestionnaire(this.page+1,!0)}loadEvaluationQuestionnaire(e=0,t=!1){if(this.evaluationQuestionnairePaginationFilter.isEmpty()){this.dataSource&&(this.dataSource.data=[]),this.pageableResult.setItems([]),this.pageableResult.setTotalItems(0,this.cdr),this.page=0,this.saveListStateToStorage(),this.isDeleting=!1,this.isLoading=!1;return}this.isLoading=!0;let n=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.evaluationQuestionnairePaginationFilter.isAllCollaboratorsSelected=this.clinicCollaboratorsSelectionService.isAllCollaboratorsSelected(this.evaluationQuestionnairePaginationFilter.professionalKeys||[]),this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:n,filterOption:this.evaluationQuestionnairePaginationFilter,orderOption:this.evaluationQuestionnairePaginationOrder})}).then(s=>{let m=[...this.dataSource?.data||[],...s.data];this.dataSource=s,t&&this.dataSource.setData(m),this.pageableResult.setItems(this.dataSource.data),this.pageableResult.setTotalItems(this.dataSource.total,this.cdr),this.page=e,this.checkShowSelection(),this.saveListStateToStorage()}).finally(()=>{this.isLoading=!1,this.isDeleting=!1,setTimeout(()=>{this.checkShowSelection()},500)})}onPaging(e){this.pageSize=e.end-e.start+1,this.loadEvaluationQuestionnaire(e.pageIndex)}onSorting(e){let t=e.getPropertyName(),n=e.getDirection()===Ji.Asc?xe.ASC:xe.DESC;t==="title"&&(this.evaluationQuestionnairePaginationOrder=vt.from({titleOrder:n})),this.loadEvaluationQuestionnaire()}onSelection(e){this.evaluationQuestionnairePageItemsSelected=e.values}onRowClicked(e){this.saveListStateToStorage(),this.editEvaluationQuestionnaireRouteStrategy.redirect(e.key.value)}onDuplicateEvaluation(e){this.isLoading=!0;let t=this.translation.get(b.DuplicateTitle,{title:e.title});this.service.duplicate({evaluationQuestionnaireKey:e.key,title:t}).then(()=>{this.page=0;let n=this.translation.get(e.type===te.EVALUATION?b.DuplicateEvaluationMessage:b.DuplicateQuestionnaireMessage);this.toastService.showSuccess({title:this.translation.get(n)}),this.loadEvaluationQuestionnaire()}).catch(n=>{console.error(n),this.isLoading=!1,this.toastService.showDefaultErrorMessage(),this.trackingErrorCore.onCaptureException(n)})}checkEmptySearch(e){if(e){let t=e.target.value;t||(this.evaluationQuestionnairePaginationFilter.text=t.toLocaleLowerCase().trim().normalize(),this.onSearch())}}searchChanged(e){e&&(this.evaluationQuestionnairePaginationFilter.text=e.toLocaleLowerCase().trim().normalize()),this.onSearch()}clear(){this.evaluationQuestionnairePaginationFilter&&(this.evaluationQuestionnairePaginationFilter.text=void 0),this.onSearch()}onSearch(){this.loadEvaluationQuestionnaire()}clearFilter(){this.searchInputComponent?.clear(),this.isProfessionalsFiltered||this.collaboratorSelectionButtonComponent?.reset()}onMobileListSelection(e){this.evaluationQuestionnairePageItemsSelected=e}setCollaboratorFilter(e){let t=e.map(h=>Vt.fromString(h.value)),n=t.map(h=>h.value),s=this.evaluationQuestionnairePaginationFilter.professionalKeys?.map(h=>h.value)||[];!kt(n,s)&&(this.evaluationQuestionnairePaginationFilter.professionalKeys=t,this.loadEvaluationQuestionnaire())}clearAllSelection(){Ve()?this.evaluationQuestionnaireMobileListComponentService.deselectAll():this.gridService.clearSelectedRows(),this.evaluationQuestionnairePageItemsSelected=[]}changeMobileListView(e){this.evaluationQuestionnaireMobileListComponentService.changeView(e)}deleteEvaluationQuestionnairePageItemsSelected(){let e=this.evaluationQuestionnairePageItemsSelected.map(t=>t.key);this.confirmDeleteEvaluationQuestionnaire(e)}deleteEvaluationQuestionnaire(e){this.confirmDeleteEvaluationQuestionnaire([e])}confirmDeleteEvaluationQuestionnaire(e){this.dialog.open(an,{width:"600px",data:{title:this.getConfirmDeleteEvaluationQuestionnaireTitleMessage(e)}}).afterClosed().subscribe(n=>{n?.isConfirmed&&(this.clearAllSelection(),this.changeMobileListView(ti.MENU),this.deleteEvaluationQuestionnaireBatch(e))})}deleteEvaluationQuestionnaireBatch(e){this.isLoading=!0,this.isDeleting=!0,this.service.deleteInBatch({evaluationQuestionnaireKeys:e}).then(()=>{this.page=0,this.toastService.showDefaultDeleteSuccessMessage(),this.loadEvaluationQuestionnaire()}).catch(t=>{console.error(t),this.isLoading=!1,this.isDeleting=!1,this.toastService.showDefaultErrorMessage(),this.trackingErrorCore.onCaptureException(t)})}onActionItemSelected(e){let t=this.actionMethods[e.key];t?t(e.item):console.error(`No action method found for key: ${e.key}`)}onRequestToCreateEvaluationQuestionnaire(){this.onCreateClicked.emit
9()}goToChooseSendOptionsEvaluationAndQuestionnaireModal(e){this.saveListStateToStorage(),this.dialog.open(Na,{width:"600px"}).afterClosed().subscribe(n=>{n===qi.SEND_REMOTE?this.goToSendEvaluationQuestionnaireModal(e):n===qi.REPLY_IN_PERSON&&this.goToChoosePatientForEvaluationAndQuestionnaireInPersonModal(e)})}goToSendEvaluationQuestionnaireModal(e){this.dialog.open(xt,{width:"600px",data:{evaluationQuestionnaireKey:e.key,title:e.title,numberOfQuestions:e.questions.length,type:e.type}}).afterClosed().subscribe(n=>{n&&(this.onSent.emit(),this.openShareSentEvaluationQuestionnaireModal(n))})}openShareSentEvaluationQuestionnaireModal(e){this.dialog.open(Ct,{width:"600px",data:{patientEvaluationQuestionnaireSent:e}}).afterClosed().subscribe(()=>{this.onShareSentClosed.emit()})}goToChoosePatientForEvaluationAndQuestionnaireInPersonModal(e){this.dialog.open(Xt,{width:"600px",data:{evaluationQuestionnaireKey:e.key,title:e.title,totalOfQuestions:e.questions.length||0}})}goToCreateEvaluationQuestionnaire(){this.dialog.open(Ci,{width:"600px"})}goToSendEmptyEvaluationQuestionnaire(){this.dialog.open(Ei,{width:"600px"})}getConfirmDeleteEvaluationQuestionnaireTitleMessage(e){let t=Q=>this.dataSource?.data.find(H=>H.key.value===Q.value),n=Q=>Q===te.EVALUATION?b.ConfirmDeleteEvaluationTitleMessage:b.ConfirmDeleteQuestionnaireTitleMessage;if(e.length===1){let Q=t(e[0]);return this.translation.get(n(Q?.type))}let s=e.map(Q=>Q.value),m=this.dataSource?.data.filter(Q=>s.includes(Q.key.value))||[];return m.some(Q=>Q.type!==te.EVALUATION)?m.some(Q=>Q.type!==te.QUESTIONNAIRE)?e.length===2?this.translation.get(b.ConfirmDeleteEvaluationQuestionnaireTitleMessage):this.translation.get(b.ConfirmDeleteEvaluationsQuestionnairesTitleMessage):this.translation.get(b.ConfirmDeleteQuestionnairesTitleMessage):this.translation.get(b.ConfirmDeleteEvaluationsTitleMessage)}saveListStateToStorage(){let e=this.pageSize,t=this.dataSource?ui.create(this.dataSource.total,this.dataSource.pageSize,this.dataSource.currentPage,[],this.dataSource.nextLastItems):void 0,n=this.evaluationQuestionnairePaginationFilter,s=this.evaluationQuestionnairePaginationOrder,m=new Uo(e,t,n,s,window.scrollY);this.evaluationQuestionnaireListStorageService.setData(m)}};a.\u0275fac=function(t){return new(t||a)(v(Te),v(re),v(Wo),v(ut),v(Ua),v(J),v(le),v(je),v(qt),v(Ge),v(vn),v(Bt))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-questionnaire-list"]],viewQuery:function(t,n){if(t&1&&(U(uc,5),U(Je,5)),t&2){let s;F(s=B())&&(n.searchInputComponent=s.first),F(s=B())&&(n.collaboratorSelectionButtonComponent=s.first)}},inputs:{isSmallScreen:"isSmallScreen"},outputs:{onCreateClicked:"onCreateClicked",onSent:"onSent",onShareSentClosed:"onShareSentClosed"},decls:12,vars:3,consts:[["evaluationAndQuestionnaireDesktopList",""],["evaluationAndQuestionnaireMobileList",""],["searchInput",""],["emptyState",""],["floatActionsButtons",""],["evaluationQuestionnaireGrid",""],["selectionDesktopInfo",""],["collaboratorDesktopDropdown",""],["paginatorDesktop",""],["selectionActionsDesktop",""],["vediusCollaboratorSelectionButton",""],["defaultMobileHeader",""],["selectionMobileHeader",""],["evaluationAndQuestionnaireList",""],["searchInputComponent",""],[1,"evaluation-questionnaire-list"],[4,"ngTemplateOutlet"],[1,"filter-content"],[1,"content-left"],[1,"content-right"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"loader",3,"count","theme"],[3,"onRowClicked","onSorting","onSelection","onActionItemSelected","onSendLinkClicked","gridKey","dataSource","columns","isLoading","showActions"],["class","selection-info","variant","text","size","md","fontFamily","font-family-secundary",4,"ngIf"],["variant","text","size","md","fontFamily","font-family-secundary",1,"selection-info"],["class","collaborator-dropdown",3,"initialSelected","hidden","onFilterSelect","onLoad",4,"ngIf"],[1,"collaborator-dropdown",3,"onFilterSelect","onLoad","initialSelected"],[3,"onPaging","length","pageSize","pageIndex"],["class","selection-action-content",4,"ngIf"],[1,"selection-action-content"],["variant","tertiary",3,"onClick"],["icon","trash-white","iconType","left",3,"onClick","withStroke"],[1,"header-mobile-list-from-evaluation-and-questionnaire"],["type","modal",3,"onFilterSelect","onLoad",4,"ngIf"],["type","modal",3,"onFilterSelect","onLoad"],[1,"header-mobile-list-from-evaluation-and-questionnaire","selection-container"],["variant","tertiary","icon","arrow-left","iconType","left",3,"onClick",4,"ngIf"],["class","clear-mobile-selection-list-button","variant","tertiary",3,"onClick",4,"ngIf"],["class","quantity-to-delete-text","variant","text","size","md","fontFamily","font-family-secundary",4,"ngIf"],["variant","tertiary","icon","arrow-left","iconType","left",3,"onClick"],["variant","tertiary",1,"clear-mobile-selection-list-button",3,"onClick"],["variant","text","size","md","fontFamily","font-family-secundary",1,"quantity-to-delete-text"],[3,"onRowClicked","onLoadMoreItems","onActionItemSelected","onViewChange","onSelection","onSendLinkClicked","dataSource","isLoading","isDeleting"],["type","search",1,"search-input",3,"onSearch","onCustomKeyup","onClear","placeholder","hint"],[1,"not-found"],["alt","",3,"src"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick",4,"ngIf"],["variant","secondary",3,"onClick"],["class","float-mobile-button-from-evaluation-and-questionnaire-list",4,"ngIf"],["icon","vds-send","ariaLabel","EVALUATION_QUESTIONNAIRE_LIST.FAB_SEND_ARIA",1,"eq-list-fab","eq-list-fab--send",3,"primaryActivate"],["icon","vds-add","ariaLabel","EVALUATION_QUESTIONNAIRE_LIST.FAB_CREATE_ARIA",1,"eq-list-fab",3,"primaryActivate"],[1,"float-mobile-button-from-evaluation-and-questionnaire-list"],["icon","trash-white","iconType","only",3,"onClick","withStroke"]],template:function(t,n){if(t&1&&(u(0,"div",15),E(1,mc,1,0,"ng-container",16),d(),E(2,Qc,20,12,"ng-template",null,0,I)(4,Kc,10,5,"ng-template",null,1,I)(6,Hc,4,6,"ng-template",null,2,I)(8,Wc,14,23,"ng-template",null,3,I)(10,Jc,2,2,"ng-template",null,4,I)),t&2){let s=w(3),m=w(5);A("small",n.isSmallScreen),r(),c("ngTemplateOutlet",n.isSmallScreen?m:s)}},dependencies:[ve,j,We,$e,Pa,X,Je,Zi,K,Da,pt,q,L,nn],styles:['@charset "UTF-8";.disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
9-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}.evaluation-questionnaire-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:40px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:space-between;align-items:flex-start;display:inline-flex}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:flex-start;align-items:flex-start;gap:16px;display:inline-flex}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:300px;margin-top:-5px;box-sizing:border-box}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .selection-info[_ngcontent-%COMP%]{margin-left:16px;margin-top:12px;color:#065e6b}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .collaborator-dropdown[_ngcontent-%COMP%]{max-width:270px;width:100%}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-right[_ngcontent-%COMP%]{width:100%;height:100%;padding-left:8px;padding-right:8px;justify-content:flex-end;align-items:center;gap:32px;display:inline-flex}.evaluation-questionnaire-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-right[_ngcontent-%COMP%] .selection-action-content[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:flex-end;align-items:center;gap:24px;display:inline-flex}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{max-width:400px;width:100%}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{display:flex;gap:1rem}.evaluation-questionnaire-list[_ngcontent-%COMP%] app-evaluation-and-questionnaire-grid[_ngcontent-%COMP%]{margin-top:24px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-top:5vh;box-sizing:border-box}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] vedius-button[_ngcontent-%COMP%]{margin-top:8px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found.is-small[_ngcontent-%COMP%]{padding:0 24px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{max-width:382px;width:100%;text-align:center}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span.title[_ngcontent-%COMP%]{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.4px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span.details[_ngcontent-%COMP%]{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.28px}.evaluation-questionnaire-list.small[_ngcontent-%COMP%]{padding:0}.evaluation-questionnaire-list.small[_ngcontent-%COMP%] .eq-list-fab--send[_ngcontent-%COMP%]{--vds-fab-bottom-offset: calc( var(--vedius-float-above-bottom-nav, 1rem) + 3.5rem + .75rem )}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire[_ngcontent-%COMP%]{padding:24px 24px 16px;display:inline-flex;gap:8px;align-items:center}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire.hidden[_ngcontent-%COMP%]{display:none}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire.selection-container[_ngcontent-%COMP%]{padding:16px 16px 16px 8px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire[_ngcontent-%COMP%] .clear-mobile-selection-list-button[_ngcontent-%COMP%]{margin-right:16px}.evaluation-questionnaire-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire[_ngcontent-%COMP%] .quantity-to-delete-text[_ngcontent-%COMP%]{color:#065e6b}.evaluation-questionnaire-list[_ngcontent-%COMP%] .float-mobile-button-from-evaluation-and-questionnaire-list[_ngcontent-%COMP%]{position:fixed;bottom:var(--vedius-float-above-bottom-nav, calc(var(--vedius-sidebar-bottom-height, 0px) + var(--vedius-fab-gap-above-sidebar, 1.25rem)));right:1.5rem;z-index:3}']});let i=a;return i})();var Ti=class i{constructor(a,o,e){this._text=a,this._professionalKeys=o,this._isAllCollaboratorsSelected=e}static from({text:a,professionalKeys:o,isAllCollaboratorsSelected:e}){return new i(a,o,e)}static empty(){return new i}get text(){return this._text}set text(a){this._text=a}get professionalKeys(){return this._professionalKeys}
9set professionalKeys(a){Array.isArray(a)?this._professionalKeys=[...a]:a?this._professionalKeys=[a]:this._professionalKeys=void 0}get isAllCollaboratorsSelected(){return this._isAllCollaboratorsSelected}set isAllCollaboratorsSelected(a){this._isAllCollaboratorsSelected=a}isEmpty(){return!this.professionalKeys?.length&&!this.text}hasAnyFilter(){return!!this._text||!!this._professionalKeys?.length}toFilterDocument(){return{text_query:this._text??null,professional_uids:this._professionalKeys?.length?this._professionalKeys.map(a=>a.value):null,is_all_collaborators_selected:this._isAllCollaboratorsSelected??null}}};var gn=class i{constructor(a,o){this._titleOrder=a,this._createdOrder=o}static from({titleOrder:a,createdOrder:o}){return new i(a,o)}static default(){return new i}get titleOrder(){return this._titleOrder}get createdByOrder(){return this._createdOrder}changeTitleOrder(){this._titleOrder=this._titleOrder===xe.ASC?xe.DESC:xe.ASC}changeCreatedByOrder(){this._createdOrder=this._createdOrder===xe.ASC?xe.DESC:xe.ASC}toOrderDocument(){return{name_order:this._titleOrder,created_order:this._createdOrder}}};var Zc=["title"],eu=["patient"],tu=["professional"],iu=["created"],nu=["type"],ou=["expiration"],au=["actions"],ru=i=>({quantity:i}),za=i=>({"background-image":i}),su=i=>({days:i});function lu(i,a){if(i&1){let o=S();u(0,"vedius-grid",8),x("onPaging",function(t){g(o);let n=l();return f(n.paging(t))})("onSorting",function(t){g(o);let n=l();return f(n.sorting(t))})("onRowClick",function(t){g(o);let n=l();return f(n.rowClick(t))}),d()}if(i&2){let o=l();c("key",o.gridKey)("dataSource",o.dataSource)("columns",o.columns)("pageIndex",o.pageIndex)("paginationEnabled",!1)("showSelection",!1)("isOnlyIconTemplateClickableFunc",o.isOnlyIconTemplateClickableFunc)("isLoading",o.isLoading)}}function cu(i,a){if(i&1&&(u(0,"div",9)(1,"strong"),C(2),p(3,"vediusTruncate"),d(),u(4,"vedius-text",10),C(5),p(6,"translate"),p(7,"translate"),p(8,"translate"),d()()),i&2){let o=a.$implicit;r(2),M(ee(3,2,o.title,40)),r(3),M(!o.totalOfQuestions||o.totalOfQuestions===0?_(6,5,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.NO_QUESTION_MESSAGE"):o.totalOfQuestions>1?ee(7,7,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.MANY_QUESTIONS_MESSAGE",Y(12,ru,o.totalOfQuestions)):_(8,10,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.SINGLE_QUESTION_MESSAGE"))}}function uu(i,a){if(i&1&&(D(0),C(1),R()),i&2){let o=l().$implicit;r(),T(" ",o.patientInfo.nicknameEnabled&&o.patientInfo.nickname?o.patientInfo.nickname==null?null:o.patientInfo.nickname.slice(0,1):o.patientInfo.name==null||o.patientInfo.name.fullName==null?null:o.patientInfo.name.fullName.slice(0,1)," ")}}function du(i,a){if(i&1&&(u(0,"div",11)(1,"div",12),E(2,uu,2,1,"ng-container",13),d(),u(3,"span",14),C(4),p(5,"vediusTruncate"),p(6,"vediusTruncate"),d()()),i&2){let o=a.$implicit;r(),A("no-logo",!(o.patientInfo.imageUrl!=null&&o.patientInfo.imageUrl.url)),c("ngStyle",Y(11,za,"url("+(o.patientInfo.imageUrl==null?null:o.patientInfo.imageUrl.url)+")")),r(),c("ngIf",!o.patientInfo.imageUrl),r(2),M(o.patientInfo.nicknameEnabled&&o.patientInfo.nickname?ee(5,5,o.patientInfo.nickname,40):ee(6,8,o.patientInfo.name==null?null:o.patientInfo.name.fullName,40))}}function pu(i,a){if(i&1&&(D(0),C(1),R()),i&2){let o=l().$implicit;r(),T(" ",o.professionalName==null?null:o.professionalName.slice(0,1)," ")}}function mu(i,a){if(i&1&&(u(0,"div",15)(1,"div",12),E(2,pu,2,1,"ng-container",13),d(),u(3,"span",14),C(4),p(5,"vediusTruncate"),d()()),i&2){let o=a.$implicit;r(),A("no-logo",!(o.professional.logo!=null&&o.professional.logo.url)),c("ngStyle",Y(8,za,"url("+(o.professional.logo==null?null:o.professional.logo.url)+")")),r(),c("ngIf",!o.professional.logo),r(2),M(ee(5,5,o.professionalName,40))}}function _u(i,a){if(i&1&&(u(0,"div",16)(1,"div",17)(2,"vedius-text",18),C(3),p(4,"nanoDayMonthYearDate"),d(),u(5,"vedius-text",19),C(6),p(7,"translate"),p(8,"translate"),p(9,"translate"),p(10,"translate"),d()(),y(11,"vedius-progress-bar",20),d()),i&2){let o=a.$implicit;r(3),T("",_(4,5,o.expireAt)," "),r(3),T(" ",o.expireIn>=0?o.expireIn===0?_(7,7,"EXPIRES_TODAY_WITH_PARENTHESES"):o.expireIn>1?ee(8,9,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.DIFFERENCE_DAYS",Y(16,su,o.expireIn)):_(9,12,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.ONE_DIFFERENCE_DAY"):_(10,14,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.EXPIRED")," "),r(5),c("theme",o.expireIn>=0?"dark-success":"neutral")("value",o.expireIn>=0?o.daysDifference-o.expireIn:o.daysDifference)("maxValue",o.daysDifference)}}function vu(i,a){if(i&1&&(y(0,"vedius-status-label",21),p(1,"translate"),p(2,"translate")),i&2){let o=a.$implicit,e=l();he("text",o.evaluationQuestionnaireType==="EVALUATION"?_(1,2,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.EVALUATION"):_(2,4,"SAVE_EVALUATION_QUESTIONNAIRE_MODAL.QUESTIONNAIRE")),c("status",e.evaluationQuestionnaireStatusLabel)}}function gu(i,a){if(i&1){let o=S();u(0,"vedius-button",24),x("onClick",function(t){g(o);let n=l().$implicit;return l().sendLinkClicked(n),f(t.stopPropagation())}),d()}}function fu(i,a){if(i&1&&(u(0,"div",22),E(1,gu,1,0,"vedius-button",23),d()),i&2){let o=a.$implicit,e=l();r(),c("ngIf",e.showSendButton(o)&&e.isOwner(o))}}var ja=(()=>{let a=class a{constructor(e,t){this.vediusTranslation=e,this.userVediusContext=t,this.dataSource=new Ft,this.columns=[],this.pageIndex=0,this.isLoading=!1,this.onPaging=new k,this.onSorting=new k,this.onRowClicked=new k,this.onItemAnsweredClicked=new k,this.onSendLinkClicked=new k,this.evaluationQuestionnaireStatusLabel=Ot.UNKOWN,this.sentStatusColumnMapping={[ue.REMOTE_ANSWERED]:Qi.Success,[ue.EXPIRED]:Qi.DANGER_LIGHTER,[ue.IN_PERSON_ANSWERED]:Qi.Info,[ue.WAITING_FOR_RESPONSE]:Qi.Warning},this.gridKey="evaluation-questionnaire-history-grid-key",this.isOnlyIconTemplateClickableFunc=n=>n.status===ue.IN_PERSON_ANSWERED||n.status===ue.REMOTE_ANSWERED}get isClinic(){return this.userVediusContext.current.type===Ke.Clinic}ngOnInit(){return N(this,null,function*(){yield this.vediusTranslation.loaded(),this.loadTable()})}paging(e){this.onPaging.emit(e)}sorting(e){this.onSorting.emit(e)}rowClick(e){let t=e.row;(t.status===ue.IN_PERSON_ANSWERED||t.status===ue.REMOTE_ANSWERED)&&this.onItemAnsweredClicked.emit
9(t)}loadTable(){setTimeout(()=>{this.titleTemplate&&this.patientTemplate&&this.professionalTemplate&&this.typeTemplate&&this.expirationTemplate&&this.actionsTemplate&&(this.columns=[Be.create({templateReference:this.titleTemplate,binding:"title",display:this.vediusTranslation.get(b.TitleEvaluationQuestionnaireSentCollumnGridName),size:this.isClinic?"22":"32",orderBy:!0}),Be.create({templateReference:this.patientTemplate,binding:"patientInfo",display:this.vediusTranslation.get(b.SendToEvaluationQuestionnaireSentCollumnGridName),size:this.isClinic?"20":"30"}),Be.create({templateReference:this.professionalTemplate,binding:"professionalName",display:this.vediusTranslation.get(b.ProfessionalEvaluationQuestionnaireSentCollumnGridName),size:"20",hide:!this.isClinic}),Be.create({templateReference:this.expirationTemplate,binding:"expiration",display:this.vediusTranslation.get(b.ExpireInEvaluationQuestionnaireSentCollumnGridName),size:"22"}),Be.create({templateReference:this.typeTemplate,binding:"type",display:this.vediusTranslation.get(b.TypeEvaluationQuestionnaireSentCollumnGridName),size:"17"}),Yo.create({getStatusForRowFunc:this.getEvaluationQuestionnaireSentStatusGrid.bind(this),binding:"statusTranslated",display:this.vediusTranslation.get(b.StatusEvaluationQuestionnaireSentCollumnGridName),size:"17",orderBy:!0}),Be.create({templateReference:this.actionsTemplate,binding:"actions",display:"",size:ao()?"8":"5",position:"end"})])},300)}getEvaluationQuestionnaireSentStatusGrid(e){return e.isExpired&&e.status===ue.WAITING_FOR_RESPONSE?this.sentStatusColumnMapping[ue.EXPIRED]:this.sentStatusColumnMapping[e.status]}showSendButton(e){return e.status===ue.WAITING_FOR_RESPONSE||e.status===ue.EXPIRED}sendLinkClicked(e){this.onSendLinkClicked.emit(e)}isOwner(e){return e.professional?.key.value===this.userVediusContext?.current?.key?.value}};a.\u0275fac=function(t){return new(t||a)(v(J),v(re))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-history-grid"]],viewQuery:function(t,n){if(t&1&&(U(Zc,5),U(eu,5),U(tu,5),U(iu,5),U(nu,5),U(ou,5),U(au,5)),t&2){let s;F(s=B())&&(n.titleTemplate=s.first),F(s=B())&&(n.patientTemplate=s.first),F(s=B())&&(n.professionalTemplate=s.first),F(s=B())&&(n.createdDateTemplate=s.first),F(s=B())&&(n.typeTemplate=s.first),F(s=B())&&(n.expirationTemplate=s.first),F(s=B())&&(n.actionsTemplate=s.first)}},inputs:{dataSource:"dataSource",columns:"columns",pageIndex:"pageIndex",isLoading:"isLoading"},outputs:{onPaging:"onPaging",onSorting:"onSorting",onRowClicked:"onRowClicked",onItemAnsweredClicked:"onItemAnsweredClicked",onSendLinkClicked:"onSendLinkClicked"},decls:14,vars:1,consts:[["title",""],["patient",""],["professional",""],["expiration",""],["type",""],["actions",""],[1,"evaluation-and-questionnaire-history-grid"],[3,"key","dataSource","columns","pageIndex","paginationEnabled","showSelection","isOnlyIconTemplateClickableFunc","isLoading","onPaging","onSorting","onRowClick",4,"ngIf"],[3,"onPaging","onSorting","onRowClick","key","dataSource","columns","pageIndex","paginationEnabled","showSelection","isOnlyIconTemplateClickableFunc","isLoading"],[1,"title-template-history"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"quantity-questions-history"],[1,"patient-template-history"],[1,"evaluation-and-questionnaire-history-image",3,"ngStyle"],[4,"ngIf"],[1,"name-history"],[1,"professional-template-history"],[1,"expiration-template-history"],[1,"validate-info-history"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"data-info"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"total-days"],[3,"theme","value","maxValue"],["size","sm",3,"text","status"],[1,"actions-template-history"],["variant","tertiary","icon","send","iconType","only",3,"onClick",4,"ngIf"],["variant","tertiary","icon","send","iconType","only",3,"onClick"]],template:function(t,n){t&1&&(u(0,"div",6),E(1,lu,1,8,"vedius-grid",7),d(),E(2,cu,9,14,"ng-template",null,0,I)(4,du,7,13,"ng-template",null,1,I)(6,mu,6,10,"ng-template",null,2,I)(8,_u,12,18,"ng-template",null,3,I)(10,vu,3,6,"ng-template",null,4,I)(12,fu,2,1,"ng-template",null,5,I)),t&2&&(r(),c("ngIf",n.columns.length>0))},dependencies:[j,en,X,lt,rn,Ut,K,q,L,zt,_i],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
9-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-history-grid .hidden{display:none}.evaluation-and-questionnaire-history-grid .evaluation-and-questionnaire-history-image{display:flex;width:var(--sizing-7, 24px);height:var(--sizing-7, 24px);justify-content:center;align-items:center;border-radius:50%;background-size:cover!important;color:#70bbc8;text-align:center;font-family:DM Sans;font-size:.875rem;font-weight:500;line-height:1.25rem}.evaluation-and-questionnaire-history-grid .evaluation-and-questionnaire-history-image.no-logo{background:#dcf5fa;background-position:center}.evaluation-and-questionnaire-history-grid .title-template-history{display:flex;flex-direction:column;gap:4px}.evaluation-and-questionnaire-history-grid .title-template-history strong{color:var(--neutral-dusk, #192840);font-family:DM Sans;font-size:.875rem;font-style:normal;font-weight:500;line-height:20px}.evaluation-and-questionnaire-history-grid .title-template-history .quantity-questions-history{color:#6d7a8e}.evaluation-and-questionnaire-history-grid .title-template-history small{color:var(--neutral-dark, #6d7a8e);font-family:Inter;font-size:.75rem;font-style:normal;font-weight:500;line-height:18px}.evaluation-and-questionnaire-history-grid .professional-template-history{display:flex;max-width:220px;align-items:center;gap:12px}.evaluation-and-questionnaire-history-grid .professional-template-history .name-history{overflow:hidden;color:var(--neutral-dusk, #192840);text-overflow:ellipsis;font-family:DM Sans;font-size:.75rem;font-style:normal;font-weight:500;line-height:18px}.evaluation-and-questionnaire-history-grid .patient-template-history{display:flex;max-width:220px;align-items:center;gap:12px}.evaluation-and-questionnaire-history-grid .patient-template-history .name-history{overflow:hidden;color:var(--neutral-dusk, #192840);text-overflow:ellipsis;font-family:DM Sans;font-size:.75rem;font-style:normal;font-weight:500;line-height:18px}.evaluation-and-questionnaire-history-grid .expiration-template-history{width:200px;flex-direction:column;justify-content:flex-start;align-items:flex-start;display:inline-flex}.evaluation-and-questionnaire-history-grid .expiration-template-history .validate-info-history{width:100%;height:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-and-questionnaire-history-grid .expiration-template-history .validate-info-history .data-info{color:#192840}.evaluation-and-questionnaire-history-grid .expiration-template-history .validate-info-history .total-days{color:#96a0b0}.evaluation-and-questionnaire-history-grid .expiration-template-history vedius-progress-bar{width:100%}.evaluation-and-questionnaire-history-grid .expiration-template-history vedius-progress-bar .progress-bar{margin-top:8px}.evaluation-and-questionnaire-history-grid .actions-template-history{width:100%;justify-content:flex-start;align-items:center;gap:4px;display:inline-flex} 10`],encapsulation:2});let i=a;return i})();var Bn=i=>({item:i}),hu=()=>({height:"18px"}),Ka=()=>({height:"14px"}),xu=()=>({height:"40px"}),zn=()=>({height:"20px"}),Cu=i=>({quantity:i}),Eu=i=>({"background-image":i}),Su=i=>({days:i});function Tu(i,a){i&1&&z(0)}function yu(i,a){i&1&&z(0)}function bu(i,a){i&1&&z(0)}function Iu(i,a){if(i&1){let o=S();D(0),u(1,"div",7)(2,"li",8),x("click",function(){let t=g(o).$implicit,n=l();return f(n.rowClick(t))}),E(3,Tu,1,0,"ng-container",9)(4,yu,1,0,"ng-container",9)(5,bu,1,0,"ng-container",9),d()(),R()}if(i&2){let o=a.$implicit,e=l(),t=w(5),n=w(7),s=w(9);r(2),A("clickable",e.isAnswered(o))("hidden",e.isLoading),r(),c("ngTemplateOutlet",t)("ngTemplateOutletContext",Y(10,Bn,o)),r(),c("ngTemplateOutlet",n)("ngTemplateOutletContext",Y(12,Bn,o)),r(),c("ngTemplateOutlet",s)("ngTemplateOutletContext",Y(14,Bn,o))}}function Ou(i,a){i&1&&(u(0,"div",18),y(1,"ngx-skeleton-loader",19)(2,"ngx-skeleton-loader",13),d()),i&2&&(r(),c("count",1)("theme",se(4,zn)),r(),c("count",1)("theme",se(5,Ka)))}function wu(i,a){if(i&1&&(D(0),u(1,"div",7)(2,"li",10)(3,"div",11)(4,"div",12),y(5,"ngx-skeleton-loader",13)(6,"ngx-skeleton-loader",13),d(),u(7,"div",14),y(8,"ngx-skeleton-loader",15),d()(),E(9,Ou,3,6,"div",16),u(10,"div",17),y(11,"ngx-skeleton-loader",13)(12,"ngx-skeleton-loader",13),d()()(),R()),i&2){let o=l(2);r(5),c("count",1)("theme",se(11,hu)),r(),c("count",1)("theme",se(12,Ka)),r(2),c("count",1)("theme",se(13,xu)),r(),c("ngIf",o.isClinic),r(2),c("count",1)("theme",se(14,zn)),r(),c("count",1)("theme",se(15,zn))}}function Au(i,a){if(i&1&&(D(0),u(1,"ul",4),E(2,wu,13,16,"ng-container",5),d(),R()),i&2){let o=l();r(2),c("ngForOf",o.fakeLoaderOptions)}}function Qu(i,a){if(i&1){let o=S();u(0,"vedius-button",26),x("onClick",function(t){g(o);let n=l().item;return l().sendLinkClicked(n),f(t.stopPropagation())}),d()}}function Mu(i,a){if(i&1&&(u(0,"div",20)(1,"div",21)(2,"vedius-text",22),C(3),d(),u(4,"vedius-text",23),C(5),p(6,"translate"),p(7,"translate"),p(8,"translate"),d()(),u(9,"div",24),E(10,Qu,1,0,"vedius-button",25),d()()),i&2){let o=a.item,e=l();r(3),M(o.title),r(2),M(!o.totalOfQuestions||o.totalOfQuestions===0?_(6,3,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.NO_QUESTION_MESSAGE"):o.totalOfQuestions>1?ee(7,5,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.MANY_QUESTIONS_MESSAGE",Y(10,Cu,o.totalOfQuestions)):_(8,8,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.SINGLE_QUESTION_MESSAGE")),r(5),c("ngIf",e.showSendButton(o)&&e.isOwner(o))}}function Pu(i,a){if(i&1&&y(0,"div",31),i&2){let o=l(2).item;c("ngStyle",Y(1,Eu,"url("+(o.professional.logo==null?null:o.professional.logo.url)+")"))}}function ku(i,a){if(i&1&&(u(0,"div"),y(1,"vedius-avatar",32),d()),i&2){let o=l(2).item;r(),c("alt",o.professional==null?null:o.professional.name.fullName)}}function Lu(i,a){if(i&1&&(u(0,"div",28),E(1,Pu,1,3,"div",29)(2,ku,2,1,"div",6),u(3,"vedius-text",3
100),C(4),d()()),i&2){let o=l().item;r(),c("ngIf",o.professional.logo),r(),c("ngIf",!o.professional.logo),r(2),M(o.professional==null?null:o.professional.name.fullName)}}function qu(i,a){if(i&1&&E(0,Lu,5,3,"div",27),i&2){let o=a.item,e=l();c("ngIf",e.isClinic&&o.professional)}}function Nu(i,a){if(i&1&&(u(0,"div",33)(1,"div",34)(2,"div",35)(3,"vedius-text",36),C(4),p(5,"nanoDayMonthYearDate"),d(),u(6,"vedius-text",37),C(7),p(8,"translate"),p(9,"translate"),p(10,"translate"),p(11,"translate"),d()(),y(12,"vedius-progress-bar",38),d(),y(13,"vedius-status-label",39),d()),i&2){let o=a.item,e=l();r(4),M(_(5,7,o.expireAt)),r(3),T(" ",o.expireIn>=0?o.expireIn===0?_(8,9,"EXPIRES_TODAY_WITH_PARENTHESES"):o.expireIn>1?ee(9,11,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.DIFFERENCE_DAYS",Y(18,Su,o.expireIn)):_(10,14,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.ONE_DIFFERENCE_DAY"):_(11,16,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.EXPIRED")," "),r(5),c("theme",o.expireIn>0?"dark-success":"neutral")("value",o.expireIn>0?o.daysDifference-o.expireIn:o.daysDifference)("maxValue",o.daysDifference),r(),c("status",e.getEvaluationQuestionnaireSentStatusLabel(o))("text",o.statusTranslated)}}var Ha=(()=>{let a=class a{constructor(e){this.userVediusContext=e,this.searchText="",this.onLoadMoreItems=new k,this.onItemAnsweredClicked=new k,this.onSendLinkClicked=new k,this.pageSize=Se.TWENTY_FIVE,this.page=0,this.evaluationQuestionnaireSentPaginationFilter=Ti.empty(),this.fakeLoaderOptions=Array(Se.TEN).map((t,n)=>n),this.translationMapping={EVALUATION:b.TypeEvaluationLineGridName,QUESTIONNAIRE:b.TypeQuestionnaireLineGridName},this.translations={},this.sentStatusColumnMapping={[ue.REMOTE_ANSWERED]:Ot.SUCCESS,[ue.EXPIRED]:Ot.UNKOWN,[ue.IN_PERSON_ANSWERED]:Ot.INFO,[ue.WAITING_FOR_RESPONSE]:Ot.WARNING}}get isClinic(){return this.userVediusContext.current.type===Ke.Clinic}get isFilterApplied(){return!this.evaluationQuestionnaireSentPaginationFilter.isEmpty()}get listSize(){return this.dataSource?.data.length}get data(){return this.dataSource?.data||[]}isAnswered(e){return e.status===ue.IN_PERSON_ANSWERED||e.status===ue.REMOTE_ANSWERED}isOwner(e){return e.professional?.key.value===this.userVediusContext.current?.key?.value}getEvaluationQuestionnaireSentStatusLabel(e){return e.isExpired&&e.status===ue.WAITING_FOR_RESPONSE?this.sentStatusColumnMapping[ue.EXPIRED]:this.sentStatusColumnMapping[e.status]}showSendButton(e){return e.status===ue.WAITING_FOR_RESPONSE||e.status===ue.EXPIRED}loadMoreItems(){this.onLoadMoreItems.emit()}sendLinkClicked(e){this.onSendLinkClicked.emit(e)}rowClick(e){this.isAnswered(e)&&this.onItemAnsweredClicked.emit(e)}};a.\u0275fac=function(t){return new(t||a)(v(re))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-history-mobile-list"]],inputs:{searchText:"searchText",dataSource:"dataSource",isLoading:"isLoading"},outputs:{onLoadMoreItems:"onLoadMoreItems",onItemAnsweredClicked:"onItemAnsweredClicked",onSendLinkClicked:"onSendLinkClicked"},decls:10,vars:2,consts:[["headerMobileList",""],["professionalContent",""],["evaluationQuestionnaireInfoContent",""],["infiniteScroll","",1,"evaluation-and-questionnaire-history-mobile-list",3,"scrolled"],[1,"evaluation-and-questionnaire-history-mobile-list-items"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"evaluation-and-questionnaire-history-mobile-list-wrapper"],["tabindex","0",1,"evaluation-and-questionnaire-history-mobile-list-item",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"loader","evaluation-and-questionnaire-history-mobile-list-item"],[1,"content-1"],[1,"left"],[1,"loader",3,"count","theme"],[1,"right"],[3,"count","theme"],["class","content-2",4,"ngIf"],[1,"content-3"],[1,"content-2"],["appearance","circle",1,"loader-circle",3,"count","theme"],[1,"evaluation-and-questionnaire-history-header-content"],[1,"content-left"],["variant","text","size","md",1,"title"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"exercise-quantity"],[1,"content-right"],["variant","tertiary","icon","send","iconType","only",3,"onClick",4,"ngIf"],["variant","tertiary","icon","send","iconType","only",3,"onClick"],["class","professional-content",4,"ngIf"],[1,"professional-content"],["class","image",3,"ngStyle",4,"ngIf"],["variant","text","size","sm",1,"professional-name"],[1,"image",3,"ngStyle"],["size","nano",3,"alt"],[1,"evaluation-questionnaire-info-content"],[1,"validate-info"],[1,"text-content"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"data-info"],["variant","text","size","micro","fontFamily","font-family-secundary",1,"total-of-days"],[3,"theme","value","maxValue"],[3,"status","text"]],template:function(t,n){if(t&1){let s=S();u(0,"div",3),x("scrolled",function(){return g(s),f(n.loadMoreItems())}),u(1,"ul",4),E(2,Iu,6,16,"ng-container",5),d(),E(3,Au,3,1,"ng-container",6),d(),E(4,Mu,11,12,"ng-template",null,0,I)(6,qu,1,1,"ng-template",null,1,I)(8,Nu,14,20,"ng-template",null,2,I)}t&2&&(r(2),c("ngForOf",n.data),r(),c("ngIf",n.isLoading))},dependencies:[tn,Pt,ve,j,We,$e,X,K,lt,mi,rn,Ut,q,L,zt],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
10-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-history-mobile-list{display:flex;width:100%;flex-direction:column;min-height:70vh}@media screen and (max-width: 600px){.evaluation-and-questionnaire-history-mobile-list{margin-bottom:70px}}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items{display:flex;flex-direction:column;list-style:none;margin:0;padding:0}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper{position:relative}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item{width:100%;height:100%;padding:24px;background:#fff;border-top:1px #d3dae5 solid;justify-content:flex-start;align-items:flex-start;gap:16px;display:inline-flex;flex-direction:column;transition:.2s all;outline:none;box-sizing:border-box}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item.clickable{cursor:pointer}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-and-questionnaire-history-header-content{width:100%;display:flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-and-questionnaire-history-header-content .content-left{width:100%;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px;display:inline-flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-and-questionnaire-history-header-content .content-left .title{color:#192840}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-and-questionnaire-history-header-content .content-left .exercise-quantity{color:#6d7a8e}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-and-questionnaire-history-header-content .content-right{justify-content:flex-end;align-items:center}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .professional-content{width:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .professional-content .image{display:flex;width:var(--sizing-8, 24px);height:var(--sizing-8, 24px);justify-content:center;align-items:center;border-radius:50%;background-size:contain;background-position:center}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .professional-content .professional-name{color:#192840}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content{width:100%;justify-content:flex-start;align-items:flex-end;
10gap:16px;display:inline-flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info{max-width:170px;flex-direction:column;justify-content:flex-start;align-items:flex-start;display:inline-flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info .text-content{width:100%;justify-content:flex-start;align-items:center;gap:8px;display:inline-flex}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info .text-content .data-info{color:#192840}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info .text-content .total-of-days{color:#6d7a8e}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info vedius-progress-bar{width:100%}.evaluation-and-questionnaire-history-mobile-list .evaluation-and-questionnaire-history-mobile-list-items .evaluation-and-questionnaire-history-mobile-list-wrapper .evaluation-and-questionnaire-history-mobile-list-item .evaluation-questionnaire-info-content .validate-info vedius-progress-bar .progress-bar{margin-top:8px}.evaluation-and-questionnaire-history-mobile-list .loader{width:100%;display:flex;flex-direction:column;gap:0}.evaluation-and-questionnaire-history-mobile-list .loader .content-1{width:100%;display:flex;flex-direction:row;justify-content:space-between;gap:16px}.evaluation-and-questionnaire-history-mobile-list .loader .content-1 .left{display:flex;flex-direction:column;width:300px}.evaluation-and-questionnaire-history-mobile-list .loader .content-1 .right{width:40px}.evaluation-and-questionnaire-history-mobile-list .loader .content-2{display:flex;flex-direction:row;align-items:center;gap:8px;width:300px}.evaluation-and-questionnaire-history-mobile-list .loader .content-2 .loader-circle{margin-bottom:2px}.evaluation-and-questionnaire-history-mobile-list .loader .content-3{display:flex;flex-direction:row;gap:16px;width:300px} 11`],encapsulation:2});let i=a;return i})();var Vu=["searchInputComponent"],Ru=()=>({height:"80px"}),Du=i=>({client_treatment_type:i});function Uu(i,a){i&1&&z(0)}function Fu(i,a){i&1&&z(0)}function Bu(i,a){i&1&&z(0)}function zu(i,a){i&1&&z(0)}function ju(i,a){i&1&&z(0)}function Ku(i,a){if(i&1&&(D(0),E(1,ju,1,0,"ng-container",13),R()),i&2){l(2);let o=w(9);r(),c("ngTemplateOutlet",o)}}function Hu(i,a){i&1&&(D(0),y(1,"ngx-skeleton-loader",19),R()),i&2&&(r(),c("count",5)("theme",se(2,Ru)))}function Gu(i,a){if(i&1){let o=S();u(0,"app-evaluation-and-questionnaire-history-grid",20),x("onSorting",function(t){g(o);let n=l(2);return f(n.onSorting(t))})("onSendLinkClicked",function(t){g(o);let n=l(2);return f(n.goToSendModal(t))})("onItemAnsweredClicked",function(t){g(o);let n=l(2);return f(n.goToEvaluationQuestionnaireReportAnswered(t))}),d()}if(i&2){let o=l(2);A("hidden",!o.dataSource),c("dataSource",o.pageableResult)("columns",o.columns)("isLoading",o.isLoading)}}function $u(i,a){if(i&1){let o=S();u(0,"vedius-collaborator-selection-button",22,8),x("onFilterSelect",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))})("onLoad",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))}),d()}}function Wu(i,a){if(i&1&&E(0,$u,2,0,"vedius-collaborator-selection-button",21),i&2){let o=l(2);c("ngIf",o.isClinicUser)}}function Yu(i,a){if(i&1){let o=S();u(0,"vedius-paginator",23),x("onPaging",function(t){g(o);let n=l(2);return f(n.onPaging(t))}),d()}if(i&2){let o=l(2);A("hidden",o.listSize===0),c("length",o.pageableResult.totalItems)("pageSize",o.pageSize)("pageIndex",o.page)}}function Xu(i,a){if(i&1&&(u(0,"div",14)(1,"div",15),E(2,Fu,1,0,"ng-container",13)(3,Bu,1,0,"ng-container",13),d(),u(4,"div",16),E(5,zu,1,0,"ng-container",13),d()(),E(6,Ku,2,1,"ng-container",17)(7,Hu,2,3,"ng-container",18)(8,Gu,1,5,"ng-template",null,5,I)(10,Wu,1,1,"ng-template",null,6,I)(12,Yu,1,5,"ng-template",null,7,I)),i&2){let o=w(9),e=w(11),t=w(13),n=l(),s=w(7);r(),A("hidden",!n.isClinicUser&&!n.isFilterApplied&&n.listSize===0||!n.dataSource),r(),c("ngTemplateOutlet",s),r(),c("ngTemplateOutlet",e),r(),A("hidden",!n.dataSource),r(),c("ngTemplateOutlet",t),r(),c("ngIf",n.listSize===0&&!n.isLoading)("ngIfElse",o),r(),c("ngIf",!n.dataSource||n.listSize===0&&n.isLoading)}}function Ju(i,a){i&1&&z(0)}function Zu(i,a){i&1&&z(0)}function ed(i,a){i&1&&z(0)}function td(i,a){if(i&1){let o=S();u(0,"vedius-collaborator-selection-button",26),x("onFilterSelect",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))})("onLoad",function(t){g(o);let n=l(3);return f(n.setCollaboratorFilter(t))}),d()}}
11function id(i,a){if(i&1&&(u(0,"div",24),E(1,ed,1,0,"ng-container",13)(2,td,1,0,"vedius-collaborator-selection-button",25),d()),i&2){let o=l(2),e=w(7);r(),c("ngTemplateOutlet",e),r(),c("ngIf",o.isClinicUser)}}function nd(i,a){i&1&&z(0)}function od(i,a){if(i&1&&(D(0),E(1,nd,1,0,"ng-container",13),R()),i&2){l(2);let o=w(9);r(),c("ngTemplateOutlet",o)}}function ad(i,a){if(i&1){let o=S();u(0,"app-evaluation-and-questionnaire-history-mobile-list",27),x("onLoadMoreItems",function(){g(o);let t=l(2);return f(t.loadMoreItems())})("onSendLinkClicked",function(t){g(o);let n=l(2);return f(n.goToSendModal(t))})("onItemAnsweredClicked",function(t){g(o);let n=l(2);return f(n.goToEvaluationQuestionnaireReportAnswered(t))}),d()}if(i&2){let o=l(2);c("dataSource",o.dataSource)("isLoading",o.isLoading)}}function rd(i,a){if(i&1&&E(0,Ju,1,0,"ng-container",13)(1,Zu,1,0,"ng-container",13)(2,id,3,2,"ng-template",null,9,I)(4,od,2,1,"ng-container",17)(5,ad,1,2,"ng-template",null,10,I),i&2){let o=w(3),e=w(6),t=l(),n=w(11);c("ngTemplateOutlet",o),r(),c("ngTemplateOutlet",n),r(3),c("ngIf",t.listSize===0&&!t.isLoading)("ngIfElse",e)}}function sd(i,a){if(i&1){let o=S();u(0,"vedius-input",28,11),p(2,"translate"),p(3,"translate"),x("onSearch",function(t){g(o);let n=l();return f(n.searchChanged(t))})("onCustomKeyup",function(t){g(o);let n=l();return f(n.checkEmptySearch(t))})("onClear",function(){g(o);let t=l();return f(t.clear())}),d()}i&2&&(he("placeholder",_(2,2,"SEARCH_INPUT.LABEL")),he("hint",_(3,4,"SEARCH_INPUT.HINT")))}function ld(i,a){if(i&1){let o=S();u(0,"vedius-button",34),x("onClick",function(){g(o);let t=l(2);return f(t.clearFilter())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"EVALUATION_QUESTIONNAIRE_LIST.CLEAR_FILTERS")," "))}function cd(i,a){if(i&1&&(u(0,"li",29),y(1,"img",30),u(2,"span",31),
11C(3),p(4,"translate"),p(5,"translate"),d(),u(6,"span",32),C(7),p(8,"translate"),p(9,"translate"),p(10,"translate"),p(11,"translate"),d(),E(12,ld,3,3,"vedius-button",33),d()),i&2){let o=l();A("is-small",o.isSmallScreen),r(),nt("src","../../../../../assets/images/",o.isFilterApplied?"evaluation-and-questionnaire-not-found":"evaluation-and-questionnaire-empty-state",".svg",Ui),r(2),T(" ",o.isFilterApplied?_(4,7,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.NO_EVALUATION_QUESTIONNAIRE_FOUND_TITLE"):_(5,9,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.EMPTY_EVALUATION_QUESTIONNAIRE_TITLE")," "),r(4),T(" ",o.isFilterApplied?_(8,11,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.NO_EVALUATION_QUESTIONNAIRE_FOUND_DESCRIPTION"):ee(11,17,"EVALUATION_QUESTIONNAIRE_HISTORY_LIST.EMPTY_EVALUATION_QUESTIONNAIRE_DESCRIPTION",Y(20,Du,o.clientTreatmantType==="PATIENT"?_(9,13,"PATIENTS"):_(10,15,"STUDENTS")))," "),r(5),c("ngIf",o.isFilterApplied)}}function ud(i,a){if(i&1){let o=S();u(0,"vds-fab",35),x("primaryActivate",function(){g(o);let t=l();return f(t.goToSendEmptyEvaluationQuestionnaire())}),d(),u(1,"vds-fab",36),x("primaryActivate",function(){g(o);let t=l();return f(t.goToCreateEvaluationQuestionnaire())}),d()}}var Ga=(()=>{let a=class a{constructor(e,t,n,s,m,h){this.service=e,this.userContext=t,this.dialog=n,this.cdr=s,this.evaluationAndQuestionnaireReportAnsweredRouteStrategy=m,this.clinicCollaboratorsSelectionService=h,this.pageSize=Yi.default,this.page=0,this.isLoading=!1,this.evaluationQuestionnaireSentPaginationFilter=Ti.empty(),this.pageableResult=new Ft,this.columns=[]}get isClinicUser(){return this.userContext.current.type===Ke.Clinic}get listSize(){return this.dataSource?.data?.length}get isFilterApplied(){return!!this.evaluationQuestionnaireSentPaginationFilter.text||!this.isProfessionalsFiltered}get isProfessionalsFiltered(){return this.evaluationQuestionnaireSentPaginationFilter.professionalKeys&&this.evaluationQuestionnaireSentPaginationFilter.professionalKeys?.length>0}get clientTreatmantType(){return this.userContext.current.clientTreatmentType}ngOnInit(){this.isSmallScreen&&(this.pageSize=Se.TWENTY_FIVE),this.evaluationQuestionnaireSentPaginationFilter.professionalKeys=this.userContext.current.key,this.loadEvaluationQuestionnaireSent()}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadEvaluationQuestionnaireSent(this.page+1,!0)}loadEvaluationQuestionnaireSent(e=0,t=!1){if(this.evaluationQuestionnaireSentPaginationFilter.isEmpty()){this.dataSource&&(this.dataSource.data=[]),this.pageableResult.setItems([]),this.pageableResult.setTotalItems(0,this.cdr),this.page=0;return}this.isLoading=!0;let n=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.evaluationQuestionnaireSentPaginationFilter.isAllCollaboratorsSelected=this.clinicCollaboratorsSelectionService.isAllCollaboratorsSelected(this.evaluationQuestionnaireSentPaginationFilter.professionalKeys||[]),this.service.getPaginatedEvaluationQuestionnairesSent({pagination:Fe.from({pageSize:this.pageSize,lastItems:n,filterOption:this.evaluationQuestionnaireSentPaginationFilter,orderOption:this.evaluationQuestionnaireSentPaginationOrder})}).then(s=>{let m=[...this.dataSource?.data||[],...s.data];this.dataSource=s,t&&this.dataSource.setData(m),this.pageableResult.setItems(this.dataSource.data),this.pageableResult.setTotalItems(this.dataSource.total,this.cdr),this.page=e}).finally(()=>this.isLoading=!1)}onPaging(e){this.pageSize=e.end-e.start+1,this.loadEvaluationQuestionnaireSent(e.pageIndex)}onSorting(e){let t=e.getPropertyName(),n=e.getDirection()===Ji.Asc?xe.ASC:xe.DESC;t==="title"&&(this.evaluationQuestionnaireSentPaginationOrder=gn.from({titleOrder:n})),this.loadEvaluationQuestionnaireSent()}checkEmptySearch(e){if(e){let t=e.target.value;t||(this.evaluationQuestionnaireSentPaginationFilter.text=t.toLocaleLowerCase().trim().normalize(),this.onSearch())}}searchChanged(e){e&&(this.evaluationQuestionnaireSentPaginationFilter.text=e.toLocaleLowerCase().trim().normalize()),this.onSearch()}clear(){this.evaluationQuestionnaireSentPaginationFilter&&(this.evaluationQuestionnaireSentPaginationFilter.text=void 0),this.onSearch()}onSearch(){this.loadEvaluationQuestionnaireSent()}clearFilter(){this.searchInputComponent?.clear(),this.isProfessionalsFiltered||this.collaboratorSelectionButtonComponent?.reset()}goToCreateEvaluationQuestionnaire(){this.dialog.open(Ci,{width:"600px"})}goToSendEmptyEvaluationQuestionnaire(){this.dialog.open(Ei,{width:"600px"})}resetToFirstPage(){this.evaluationQuestionnaireSentPaginationOrder&&(this.evaluationQuestionnaireSentPaginationOrder=void 0),this.clearFilter()}setCollaboratorFilter(e){let t=e.map(h=>Vt.fromString(h.value)),n=t.map(h=>h.value),s=this.evaluationQuestionnaireSentPaginationFilter.professionalKeys?.map(h=>h.value)||[];!kt(n,s)&&(this.evaluationQuestionnaireSentPaginationFilter.professionalKeys=t,this.loadEvaluationQuestionnaireSent())}goToEvaluationQuestionnaireReportAnswered(e){this.evaluationAndQuestionnaireReportAnsweredRouteStrategy.setId(e.evaluationQuestionnaireLink.value),this.evaluationAndQuestionnaireReportAnsweredRouteStrategy.setBackTo("history"),this.evaluationAndQuestionnaireReportAnsweredRouteStrategy.setPatientId(e.patientInfo.key.patientKey.value),this.evaluationAndQuestionnaireReportAnsweredRouteStrategy.redirect()}goToSendModal(e){this.dialog.open(xt,{width:"600px",data:{evaluationQuestionnaireKey:e.evaluationQuestionnaireKey,evaluationQuestionnaireSentKey:e.key,title:e.title,numberOfQuestions:e.totalOfQuestions,type:e.evaluationQuestionnaireType,patientInfo:e.patientInfo,expireAt:e.expireAt,shareMessage:e.shareMessage}}).afterClosed().subscribe(n=>{n&&(this.loadEvaluationQuestionnaireSent(),this.openShareSentEvaluationQuestionnaireModal(n))})}openShareSentEvaluationQuestionnaireModal(e){this.dialog.open(Ct,{width:"600px",data:{patientEvaluationQuestionnaireSent:e}})}};a.\u0275fac=function(t){return new(t||a)(v(ea),v(re),v(le),v(je),v($o),v(Bt))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-history-list"]],viewQuery:function(t,n){if(t&1&&(U(Vu,5),U(Je,5)),t&2){let s;F(s=B())&&(n.searchInputComponent=s.first),F(s=B())&&(n.collaboratorSelectionButtonComponent=s.first)}},inputs:{isSmallScreen:"isSmallScreen"},decls:12,vars:3,consts:[["evaluationAndQuestionnaireHistoryDesktopList",""],["evaluationAndQuestionnaireHistoryMobileList",""],["searchInput",""],["emptyState",""],["floatActionsButtons",""],["evaluationQuestionnaireHistoryGrid",""],["collaboratorDesktopDropdown",""],["paginatorDesktop",""],["vediusCollaboratorSelectionButton",""],["defaultMobileHeader",""],["evaluationAndQuestionnaireHistoryList",""],["searchInputComponent",""],[1,"evaluation-questionnaire-history-list"],[4,"ngTemplateOutlet"],[1,"filter-content"],[1,"content-left"],[1,"content-right"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"loader",3,"count","theme"],[3,"onSorting","onSendLinkClicked","onItemAnsweredClicked","dataSource","columns","isLoading"],["class","collaborator-dropdown",3,"onFilterSelect","onLoad",4,"ngIf"],[1,"collaborator-dropdown",3,"onFilterSelect","onLoad"],[3,"onPaging","length","pageSize","pageIndex"],[1,"header-mobile-list-from-evaluation-and-questionnaire-hist"],["type","modal",3,"onFilterSelect","onLoad",4,"ngIf"],["type","modal",3,"onFilterSelect","onLoad"],[3,"onLoadMoreItems","onSendLinkClicked","onItemAnsweredClicked","dataSource","isLoading"],["type","search",1,"search-input",3,"onSearch","onCustomKeyup","onClear","placeholder","hint"],[1,"not-found"],["alt","",3,"src"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick",4,"ngIf"],["variant","secondary",3,"onClick"],["icon","vds-send","ariaLabel","EVALUATION_QUESTIONNAIRE_LIST.FAB_SEND_ARIA",1,"eq-history-fab","eq-history-fab--send",3,"primaryActivate"],["icon","vds-add","ariaLabel","EVALUATION_QUESTIONNAIRE_LIST.FAB_CREATE_ARIA",1,"eq-history-fab",3,"primaryActivate"]],template:function(t,n){if(t&1&&(u(0,"div",12),E(1,Uu,1,0,"ng-container",13),d(),E(2,Xu,14,10,"ng-template",null,0,I)(4,rd,7,4,"ng-template",null,1,I)(6,sd,4,6,"ng-template",null,2,I)(8,cd,13,22,"ng-template",null,3,I)(10,ud,2,0,"ng-template",null,4,I)),t&2){let s=w(3),m=w(5);A("small",n.isSmallScreen),r(),c("ngTemplateOutlet",n.isSmallScreen?m:s)}},dependencies:[ve,j,We,$e,ja,Je,Zi,Ha,pt,K,q,L,nn],styles:['@charset "UTF-8";.disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
11-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}.evaluation-questionnaire-history-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:40px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:space-between;align-items:flex-start;display:inline-flex}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:flex-start;align-items:flex-start;gap:16px;display:inline-flex}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:300px;margin-top:-5px;box-sizing:border-box}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .selection-info[_ngcontent-%COMP%]{margin-left:16px;margin-top:12px;color:#065e6b}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-left[_ngcontent-%COMP%] .collaborator-dropdown[_ngcontent-%COMP%]{max-width:270px;width:100%}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-right[_ngcontent-%COMP%]{width:100%;height:100%;padding-left:8px;padding-right:8px;justify-content:flex-end;align-items:center;gap:32px;display:inline-flex}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .filter-content[_ngcontent-%COMP%] .content-right[_ngcontent-%COMP%] .selection-action-content[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:flex-end;align-items:center;gap:24px;display:inline-flex}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{max-width:400px;width:100%}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{display:flex;gap:1rem}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] app-evaluation-and-questionnaire-history-grid[_ngcontent-%COMP%]{margin-top:24px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-top:5vh;box-sizing:border-box}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] vedius-button[_ngcontent-%COMP%]{margin-top:8px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found.is-small[_ngcontent-%COMP%]{padding:0 24px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{max-width:382px;width:100%;text-align:center}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span.title[_ngcontent-%COMP%]{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.4px}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%] span.details[_ngcontent-%COMP%]{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.28px}.evaluation-questionnaire-history-list.small[_ngcontent-%COMP%]{padding:0}.evaluation-questionnaire-history-list.small[_ngcontent-%COMP%] .eq-history-fab--send[_ngcontent-%COMP%]{--vds-fab-bottom-offset: calc( var(--vedius-float-above-bottom-nav, 1rem) + 3.5rem + .75rem )}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire-hist[_ngcontent-%COMP%]{padding:24px 24px 16px;display:inline-flex;gap:8px;align-items:center}.evaluation-questionnaire-history-list[_ngcontent-%COMP%] .header-mobile-list-from-evaluation-and-questionnaire-hist[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}']}
11);let i=a;return i})();function dd(i,a){if(i&1){let o=S();u(0,"div",13)(1,"vedius-button",14),x("onClick",function(){g(o);let t=l(2);return f(t.goToCreateEvaluationQuestionnaire())}),C(2),p(3,"translate"),d(),u(4,"vedius-button",15),x("onClick",function(){g(o);let t=l(2);return f(t.goToSendEmptyEvaluationQuestionnaire())}),C(5),p(6,"translate"),d()()}i&2&&(r(2),T(" ",_(3,2,"EVALUATION_QUESTIONNAIRE.CREATE")," "),r(3),T(" ",_(6,4,"BUTTONS.SEND_QUESTIONS")," "))}function pd(i,a){i&1&&y(0,"vedius-button",16)}function md(i,a){i&1&&(u(0,"div",8)(1,"vedius-text",9),C(2),p(3,"translate"),d(),u(4,"div",10),E(5,dd,7,6,"div",11)(6,pd,1,0,"vedius-button",12),d()()),i&2&&(r(2),T(" ",_(3,3,"EVALUATION_QUESTIONNAIRE.TITLE")," "),r(3),c("ngIf",!0),r(),c("ngIf",!1))}function _d(i,a){if(i&1){let o=S();u(0,"vedius-tabs",17),x("onCustomChange",function(t){g(o);let n=l();return f(n.onTabChange(t))}),d()}if(i&2){let o=l();c("options",o.tabs)("activeId",o.activeId)}}var me=function(i){return i.CREATED="CREATED",i.HISTORY="HISTORY",i}(me||{}),$a=(()=>{let a=class a{constructor(e,t,n,s,m,h){this.breakpointObserver=e,this.evaluationQuestionnaireDraftDataService=t,this.dialog=n,this.translateService=s,this.route=m,this.router=h,this.translationMapping={HISTORY:b.SentLabelTabEvaluationQuestionnaire,CREATED:b.CreatedLabelTabEvaluationQuestionnaire},this.activeId=me.HISTORY,this.isSmallScreen=!1}ngOnInit(){this.translateService.loaded().then(()=>{this.setTranslations(),this.setTabs()}),this.evaluationQuestionnaireDraftDataService.clear(),this.listenSize()}setTabs(){this.tabs=[{label:this.getTranslation(me.HISTORY),id:me.HISTORY},{label:this.getTranslation(me.CREATED),id:me.CREATED}];let e=this.route.snapshot.queryParams.tab;e&&(this.activeId=this.getTabFromTranslation(e))}getTabFromTranslation(e){return this.getTranslation(me.CREATED)===e?me.CREATED:me.HISTORY}listenSize(){this.breakpointObserver.observe([ni]).subscribe(e=>{this.isSmallScreen=e.matches})}onTabChange(e){this.activeId=e.id,this.router.navigate([],{relativeTo:this.route,queryParams:{tab:this.getTranslation(this.activeId)},queryParamsHandling:"merge"})}goToCreateEvaluationQuestionnaire(){this.dialog.open(Ci,{width:"600px"})}goToSendEmptyEvaluationQuestionnaire(){this.dialog.open(Ei,{width:"600px"})}goToHistoryTab(){this.onTabChange({label:this.getTranslation(me.HISTORY),id:me.HISTORY})}setTranslations(){for(let e in this.translationMapping)Object.prototype.hasOwnProperty.call(this.translationMapping,e)&&(this[e]=this.translateService.get(this.translationMapping[e]))}getTranslation(e){return this[e]}};a.\u0275fac=function(t){return new(t||a)(v(Z),v(Wt),v(le),v(J),v(Ne),v(ae))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire"]],decls:8,vars:6,consts:[["evaluationAndQuestionnaireHistoryList",""],[1,"evaluation-and-questionnaire"],[1,"header"],["class","title",4,"ngIf"],[3,"options","activeId","onCustomChange",4,"ngIf"],[1,"content"],[3,"onCreateClicked","onSent","onShareSentClosed","hidden","isSmallScreen"],[3,"isSmallScreen","hidden"],[1,"title"],["variant","text","size","xl"],[1,"add-evaluation-questionnaire-button"],["class","exercise-button-actions",4,"ngIf"],["iconType","only","icon","plus","variant","info",4,"ngIf"],[1,"exercise-button-actions"],["iconType","left","icon","plus","variant","secondary",3,"onClick"],["variant","primary","icon","send","iconType","left",1,"evaluation-questionnaire-send-button",3,"onClick"],["iconType","only","icon","plus","variant","info"],[3,"onCustomChange","options","activeId"]],template:function(t,n){if(t&1){let s=S();u(0,"div",1)(1,"header",2),E(2,md,7,5,"div",3)(3,_d,1,2,"vedius-tabs",4),d(),u(4,"div",5)(5,"app-evaluation-questionnaire-list",6),x("onCreateClicked",function(){return g(s),f(n.goToCreateEvaluationQuestionnaire())})("onSent",function(){g(s);let h=w(7);return f(h==null?null:h.resetToFirstPage())})("onShareSentClosed",function(){return g(s),f(n.goToHistoryTab())}),d(),y(6,"app-evaluation-and-questionnaire-history-list",7,0),d()()}t&2&&(r(2),c("ngIf",!n.isSmallScreen),r(),c("ngIf",n.tabs),r(2),c("hidden",n.activeId!=="CREATED")("isSmallScreen",n.isSmallScreen),r(),c("isSmallScreen",n.isSmallScreen)("hidden",n.activeId!=="HISTORY"))},dependencies:[j,X,K,vi,Ba,Ga,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
11-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire{background-color:#fff;min-height:100vh}.evaluation-and-questionnaire .header{padding:40px 40px 0;display:flex;flex-direction:column;gap:1rem;border-bottom:1px solid #d3dae5}.evaluation-and-questionnaire .header .title{display:flex;justify-content:space-between;color:#192840}.evaluation-and-questionnaire .header .mat-mdc-tab-links{gap:40px}.evaluation-and-questionnaire .header .mat-mdc-tab-links a{flex-grow:0}.evaluation-and-questionnaire .header vedius-tabs{width:250px}.evaluation-and-questionnaire .header .add-evaluation-questionnaire-button{position:relative}.evaluation-and-questionnaire .header .add-evaluation-questionnaire-button .exercise-button-actions{display:flex;gap:1rem}.evaluation-and-questionnaire .header .add-evaluation-questionnaire-button .exercise-button-actions .evaluation-questionnaire-send-button{min-width:130px}.evaluation-and-questionnaire .content .hidden{display:none!important}@media screen and (max-width: 600px){.evaluation-and-questionnaire .header{padding:0}.evaluation-and-questionnaire .header .mat-mdc-tab-links a{flex-grow:1}.evaluation-and-questionnaire .header vedius-tabs{width:100%}} 12`],encapsulation:2});let i=a;return i})();var et=(()=>{let a=class a{constructor(e,t){this.router=e,this.translation=t}setTab(e){return e===me.CREATED?this._queryParams={tab:this.translation.get(b.CreatedLabelTabEvaluationQuestionnaire)}:this._queryParams={tab:this.translation.get(b.SentLabelTabEvaluationQuestionnaire)},this}redirect(e){e?this.router.navigate([ce.AvaliacaoQuestionario,e]):this._queryParams?this.router.navigate([ce.AvaliacaoQuestionario],{queryParams:this._queryParams}):this.router.navigate([ce.AvaliacaoQuestionario]),setTimeout(()=>{this._queryParams=void 0},1e3)}};a.\u0275fac=function(t){return new(t||a)($(ae),$(J))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function vd(i,a){i&1&&z(0)}function gd(i,a){i&1&&z(0)}function fd(i,a){if(i&1){let o=S();u(0,"vedius-button",19),x("onClick",function(){g(o);let t=l(3);return f(t.onPreviewClick())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"BUTTONS.SEE_PREVIOUS")," "))}function hd(i,a){if(i&1){let o=S();u(0,"vedius-button",20),x("onClick",function(){g(o);let t=l(3);return f(t.onPreviewClick())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"BUTTONS.EXIT_PREVIOUS")," "))}function xd(i,a){if(i&1){let o=S();u(0,"vedius-button",21),x("onClick",function(){g(o);let t=l(3);return f(t.onSaveQuestionsClick())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"BUTTONS.SAVE_QUESTIONS")," "))}function Cd(i,a){if(i&1&&(u(0,"div",15),E(1,fd,3,3,"vedius-button",16)(2,hd,3,3,"vedius-button",17)(3,xd,3,3,"vedius-button",18),d()),i&2){let o=l(2);r(),c("ngIf",!o.isSubmitting&&!o.showPreview),r(),c("ngIf",o.showPreview),r(),c("ngIf",!o.showPreview)}}function Ed(i,a){if(i&1){let o=S();u(0,"header",8)(1,"div",9)(2,"div",10)(3,"a",11),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",12),C(5),p(6,"translate"),d(),u(7,"span",13),C(8),p(9,"translate"),d(),E(10,gd,1,0,"ng-container",4),d(),E(11,Cd,4,3,"div",14),d()()}if(i&2){let o=l(),e=w(10);r(5),T(" ",_(6,4,"BUTTONS.BACK")," "),r(3),T(" ",o.title!==""?o.title:_(9,6,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," "),r(2),c("ngTemplateOutlet",e),r(),c("ngIf",!o.onlyView)}}function Sd(i,a){i&1&&z(0)}function Td(i,a){if(i&1){let o=S();u(0,"vedius-button",31),x("onClick",function(){g(o);let t=l(3);return f(t.onPreviewClick())}),d()}if(i&2){let o=l(3);c("customTitle",o.showPreview?"Voltar edi\xE7\xE3o":"Exibir pr\xE9via")}}function yd(i,a){if(i&1){let o=S();u(0,"vedius-button",32),x("onClick",function(){g(o);let t=l(3);return f(t.onPreviewClick())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"BUTTONS.EXIT_PREVIOUS")," "))}function bd(i,a){if(i&1){let o=S();u(0,"vedius-button",33),x("onClick",function(){g(o);let t=l(3);return f(t.onSaveQuestionsClick())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"BUTTONS.SAVE_QUESTIONS")," "))}function Id(i,a){if(i&1&&(u(0,"div",27)(1,"div"),E(2,Td,1,1,"vedius-button",28),d(),E(3,yd,3,3,"vedius-button",29)(4,bd,3,3,"vedius-button",30),d()),i&2){let o=l(2);r(2),c("ngIf",!o.isSubmitting&&!o.showPreview),r(),c("ngIf",o.showPreview),r(),c("ngIf",!o.showPreview)}}function Od(i,a){if(i&1){let o=S();u(0,"header",22)(1,"div",10)(2,"a",23),x("click",function(){g(o);let t=l();return f(t.back())}),y(3,"mat-icon",24),d(),u(4,"span",25),C(5),p(6,"translate"),d()(),E(7,Sd,1,0,"ng-container",4)(8,Id,5,3,"div",26),d()}if(i&2){let o=l(),e=w(10);r(5),T(" ",o.title!==""?o.title:_(6,3,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," "),r(2),c("ngTemplateOutlet",e),r(),c("ngIf",!o.onlyView)}}function wd(i,a){i&1&&(u(0,"div",34),y(1,"vds-alert",35),p(2,"translate"),d()),i&2&&(r(),c("message",_(2,2,"EVALUATION_QUESTIONNAIRE.FORM.DUPLICATE_QUESTION_IDS_FIX_ON_SAVE"))("dismissible",!1))}function Ad(i,a){if(i&1&&E(0,wd,3,4,"div",34),i&2){let o=l();to(o.showDuplicateQuestionIdsAlert&&!o.onlyView?0:-1)}}var bi=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me,yt,bt,Jt,Zt,Qt){this.activatedRoute=e,this.evolutionProgressTrackerService=t,this.userVediusReferenceKeyFactoryService=n,this.service=s,this.questionnaireEvaluationDraftDataService=m,this.toastService=h,this.dialog=O,this.trackingErrorCore=Q,this.userContext=H,this.questionnaireEvaluationConverter=ie,this.vediusService=ge,this.router=fe,this.mainBackgroun
12dService=pe,this.translationService=Qe,this.useVediusEvaluationTemplatesRouteStrategy=Me,this.evaluationAndQuestionnaireRouteStrategy=yt,this.evaluationQuestionnaireListStorageService=bt,this.breakpointObserver=Jt,this.sidebarService=Zt,this.evaluationQuestionnaireFailedSubmissionService=Qt,this.title="",this.showPreview=!1,this.isLoading=!1,this.isSubmitting=!1,this.isUpdated=!1,this.isCreatingFromVediusModel=!1,this.updateAutomaticallyInterval=null,this.alreadyShowedUpdateAutomaticallyToast=!1,this.canCheckUpdateAutomaticallyToast=!1,this.isSmall=!1,this.hideSideNav=!1,this.isOwner=!0,this.onlyView=!1,this.showDuplicateQuestionIdsAlert=!1,this.evolutionProgressTrackerService.invisible(),this.mainBackgroundService.changeBackgroundColor(di.NEUTRAL_LIGHTER),this.userVediusReferenceKey=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY),this.activatedRoute.params.subscribe(It=>{let tt=It.id;if(tt)if(this.isCreatingFromVediusModel=this.router.url.includes(gi.NovaAvaliacaoQuestionarioModeloVedius),this.isCreatingFromVediusModel){let Ue=Ze.from(tt);this.loadModelEvaluationFromVediusModel(Ue)}else{let Ue=De.from(this.userVediusReferenceKey,tt);this.loadModelEvaluation(Ue)}else this.evaluationQuestionnaireDetailsDraft&&(this.initialBuilderValues={title:this.evaluationQuestionnaireDetailsDraft.title,description:this.evaluationQuestionnaireDetailsDraft.description,question:this.evaluationQuestionnaireDetailsDraft.questions},this.activeCheckUpdateAutomaticallyToast())})}ngOnInit(){this.listenSize(),this.translationService.loaded().then(()=>{let e=this.activatedRoute.snapshot.queryParams.criar;e&&!this.isUpdated&&(this.createType=this.getTypeFromTranslation(e))})}get formFormGroup(){return this.evaluationAndQuestionnaireBuilderComponent.form}get questionFormGroup(){return this.evaluationAndQuestionnaireBuilderComponent.questions}get evaluationQuestionnaireDraft(){return this.questionnaireEvaluationDraftDataService.evaluationQuestionnaireDraft?.evaluationQuestionnaire}get evaluationQuestionnaireDetailsDraft(){return this.questionnaireEvaluationDraftDataService.evaluationQuestionnaireDraft?.details}getTypeFromTranslation(e){if(e===this.translationService.get(b.EvaluationName))return te.EVALUATION;if(e===this.translationService.get(b.QuestionnaireName))return te.QUESTIONNAIRE}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmall=e.matches,this.checkSideNavVisible()})}checkSideNavVisible(){this.isSmall&&!this.hideSideNav?(this.hideSideNav=!0,this.sidebarService.hide
12Sidebar()):!this.isSmall&&this.hideSideNav&&(this.hideSideNav=!1,this.sidebarService.showSidebar())}activeCheckUpdateAutomaticallyToast(e=2e3){setTimeout(()=>{this.canCheckUpdateAutomaticallyToast=!0},e)}toggleHideValues(){this.showPreview=!this.showPreview}onDuplicateQuestionIdsDetected(e){e&&(this.showDuplicateQuestionIdsAlert=!0)}onSaveQuestionsAsync(){return N(this,null,function*(){try{return this.isSubmitting||this.evaluationAndQuestionnaireBuilderComponent.formHasErrors()?!1:(this.createType?yield this.saveForm(this.createType,!1):yield this.goToSaveSetType(!1),this.isUpdated)}catch(e){return console.error(e),this.isUpdated?this.evaluationQuestionnaireFailedSubmissionService.failedOnCreateNew(this.createFailedData(),e?.message||""):this.evaluationQuestionnaireFailedSubmissionService.failedOnUpdate(this.createFailedData(),e?.message||""),!1}})}onSaveQuestionsClick(){this.isSubmitting||(this.evaluationAndQuestionnaireBuilderComponent.formHasErrors()?(this.scrollToFirstError(),this.toastService.showInfo({title:this.translationService.get(b.QuestionnaireFormErrorToSave)})):this.createType?this.saveForm(this.createType):this.goToSaveSetType())}scrollToFirstError(){if(this.evaluationAndQuestionnaireBuilderComponent.form.get("title")?.errors){let t=document.querySelector(".custom-title");if(t){t.scrollIntoView({behavior:"smooth",block:"center"}),this.evaluationAndQuestionnaireBuilderComponent.focusedTitle=!0,this.evaluationAndQuestionnaireBuilderComponent.focusedElement=-1;return}}let e=this.evaluationAndQuestionnaireBuilderComponent.questions;for(let t=0;t<e.length;t++){let n=e[t];if(this.evaluationAndQuestionnaireBuilderComponent.hasErrorQuestion(n)){this.evaluationAndQuestionnaireBuilderComponent.focusedElement=t,this.evaluationAndQuestionnaireBuilderComponent.focusedTitle=!1,setTimeout(()=>{let s=document.querySelector(".focused");s&&s.scrollIntoView({behavior:"smooth",block:"center"})});break}}}back(){if(this.isCreatingFromVediusModel){this.useVediusEvaluationTemplatesRouteStrategy.redirect();return}this.evaluationAndQuestionnaireRouteStrategy.redirect()}redirectAfterBack(){this.evaluationAndQuestionnaireRouteStrategy.redirect()}onPreviewClick(){let e=!this.showPreview;e?this.evaluationAndQuestionnaireBuilderComponent.formHasErrors()||this.evaluationAndQuestionnaireBuilderComponent.previewForm(e):(this.evaluationAndQuestionnaireBuilderComponent.previewForm(e),this.evaluationQuestionnaire?.questions?.forEach(t=>{t.currentQuestionValue=""}),this.evaluationAndQuestionnaireBuilderComponent?.clearCurrentQuestionValues()),this.showPreview=e}loadModelEvaluation(e){return N(this,null,function*(){if(this.isLoading=!0,this.hasEvaluationQuestionnaireDraftLoading(e)){this.activeCheckUpdateAutomaticallyToast(2500);return}this.service.get({evaluationQuestionnaireKey:e}).then(t=>{t&&(this.evaluationQuestionnaire=t??void 0,this.checkIsOwner(),this.isUpdated=!0,this.setEvaluationQuestionnaireDraftData(t),this.activeCheckUpdateAutomaticallyToast())}).finally(()=>this.isLoading=!1)})}checkIsOwner(){if(!this.evaluationQuestionnaire){this.isOwner=!0;return}this.isOwner=this.evaluationQuestionnaire.professional.key.value===this.userContext.current.key.value,this.isOwner||this.markAsOnlyView()}markAsOnlyView(){this.showPreview=!0,this.onlyView=!0,this.evaluationAndQuestionnaireBuilderComponent.previewForm(this.showPreview)}loadModelEvaluationFromVediusModel(e){this.isLoading=!0,!this.hasEvaluationQuestionnaireDraftLoading(e)&&this.vediusService.get({vediusEvaluationQuestionnaireKey:e}).then(t=>{if(t){let n=De.from(this.userVediusReferenceKey,t.key.value);this.evaluationQuestionnaire=ft.fromVediusEvaluationQuestionnaire(n,t,this.userContext.current),this.setEvaluationQuestionnaireDraftData(this.evaluationQuestionnaire)}}).finally(()=>this.isLoading=!1)}hasEvaluationQuestionnaireDraftLoading(e){let t=e instanceof De?e:De.from(this.userVediusReferenceKey,e.value);return this.evaluationQuestionnaireDraft&&this.evaluationQuestionnaireDraft.key.value===t.value?(this.evaluationQuestionnaireDraft?.questions.forEach(s=>{s.currentQuestionValue=""}),setTimeout(()=>{this.evaluationQuestionnaire=this.evaluationQuestionnaireDraft,this.isUpdated=!this.isCreatingFromVediusModel,this.isLoading=!1,this.checkIsOwner()},200),!0):!1}onTitleChange(e){this.title=e,this.evaluationQuestionnaire?(this.evaluationQuestionnaire.title=e,this.setEvaluationQuestionnaireDraftData(this.evaluationQuestionnaire)):this.setEvaluationQuestionnaireDetailsDraftData(e,this.evaluationQuestionnaireDetailsDraft?.description??"",this.evaluationQuestionnaireDetailsDraft?.questions??[]),this.updateEvaluationQuestionnaireSync()}onDescriptionChange(e){this.evaluationQuestionnaire?(this.evaluationQuestionnaire.description=e,this.setEvaluationQuestionnaireDraftData(this.evaluationQuestionnaire)):this.setEvaluationQuestionnaireDetailsDraftData(this.evaluationQuestionnaireDetailsDraft?.title??"",e,this.evaluationQuestionnaireDetailsDraft?.questions??[]),this.updateEvaluationQuestionnaireSync()}onQuestionFormGroupChange(e){let t=e.map(n=>this.questionnaireEvaluationConverter.convertFormGroupToQuestion(n));this.evaluationQuestionnaire?(this.evaluationQuestionnaire.questions=t,this.setEvaluationQuestionnaireDraftData(this.evaluationQuestionnaire)):this.setEvaluationQuestionnaireDetailsDraftData(this.evaluationQuestionnaireDetailsDraft?.title??"",this.evaluationQuestionnaireDetailsDraft?.description??"",t),this.updateEvaluationQuestionnaireSync()}setEvaluationQuestionnaireDraftData(e){let t=new at(e);this.questionnaireEvaluationDraftDataService.setEditEvaluationQuestionnaireDraft(t)}setEvaluationQuestionnaireDetailsDraftData(e,t,n){let s=new at(void 0,new St(e,t,n));this.questionnaireEvaluationDraftDataService.setEditEvaluationQuestionnaireDraft(s)}goToSaveSetType(e=!0){return new Promise(t=>{this.dialog.open(Ta,{width:"600px",data:{questions:this.questionFormGroup,form:this.formFormGroup,type:this.evaluationAndQuestionnaireBuilderComponent.typeModel}}).afterClosed().subscribe(s=>
12N(this,null,function*(){s&&(yield this.saveForm(s.type,e)),t()}))})}saveForm(e,t=!0){return N(this,null,function*(){try{this.isSubmitting=!0,yield this.saveEvaluationQuestionnaire(e),this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),t&&this.redirectAfterBack()}catch(n){console.error(n),this.toastService.showDefaultErrorMessage();let s=n?.message||"";this.trackingErrorCore.onCaptureException(s),this.isUpdated?this.evaluationQuestionnaireFailedSubmissionService.failedOnCreateNew(this.createFailedData(),s):this.evaluationQuestionnaireFailedSubmissionService.failedOnUpdate(this.createFailedData(),s)}finally{this.isSubmitting=!1}})}saveEvaluationQuestionnaire(e){return N(this,null,function*(){let t=this.createEvaluationQuestionnaire(e);return this.isUpdated?t=yield this.service.update({evaluationQuestionnaire:t}):(t=yield this.service.create({evaluationQuestionnaire:t}),this.isUpdated=!0),this.setEvaluationQuestionnaireDraftData(t),this.showDuplicateQuestionIdsAlert=!1,t})}createFailedData(){let e=this.isUpdated?this.evaluationQuestionnaire?.key?.value:"",t=[];try{t=this.questionFormGroup.map(O=>this.questionnaireEvaluationConverter.convertFormGroupToQuestion(O))}catch(O){this.trackingErrorCore.onCaptureException("Error to convert questions: "+O)}let n=this.formFormGroup.value.title||"",s=this.formFormGroup.value.description||"",m=this.evaluationQuestionnaire?.professional?.key?.value||this.userContext.current?.key?.value||"";return{uid:e,questions:t,title:n,description:s,professionalUid:m}}createEvaluationQuestionnaire(e){let t=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY),n=this.isUpdated?De.from(t,this.evaluationQuestionnaire?.key?.value||Oe.new().value):De.new(t),s=fo(this.questionFormGroup.map(ie=>this.questionnaireEvaluationConverter.convertFormGroupToQuestion(ie)));s.forEach((ie,ge)=>{let fe=this.questionFormGroup[ge]?.get("questionId");fe&&fe.value!==ie.questionId&&fe.setValue(ie.questionId)});let m=this.formFormGroup.value.title,h=this.formFormGroup.value.description,O=!0,Q=this.evaluationQuestionnaire?.professional||this.userContext.current;return ft.create({key:n,title:m,description:h,professional:Q,activated:O,questions:s,type:e})}updateEvaluationQuestionnaireSync(){if(!this.evaluationAndQuestionnaireBuilderComponent.formHasErrors())try{this.isUpdated&&(this.updateAutomaticallyInterval&&clearTimeout(this.updateAutomaticallyInterval),this.updateAutomaticallyInterval=setTimeout(()=>{if(this.evaluationQuestionnaire instanceof ft){let e=this.createEvaluationQuestionnaire(this.evaluationQuestionnaire.type),t=!this.alreadyShowedUpdateAutomaticallyToast&&this.canCheckUpdateAutomaticallyToast;this.service.updateAutomatically(e,t),t&&(this.alreadyShowedUpdateAutomaticallyToast=!0)}this.updateAutomaticallyInterval=null},1e3))}catch(e){console.error(e),this.trackingErrorCore.onCaptureException(e),this.toastService.showDefaultErrorMessage()}}ngOnDestroy(){return N(this,null,function*(){if(this.updateAutomaticallyInterval&&clearTimeout(this.updateAutomaticallyInterval),this.service.pendingUpdates?.size>0)try{yield this.service.processPendingUpdates(!1)}catch(e){console.error("Failed to process final updates:",e)}this.mainBackgroundService.reset(),this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()})}};a.\u0275fac=function(t){return new(t||a)(v(Ne),v(Xe),v(Re),v(Te),v(Wt),v(ut),v(le),v(qt),v(re),v(da),v(Le),v(ae),v(pi),v(J),v(pn),v(et),v(Ge),v(Z),v(Ye),v(ci))},a.\u0275cmp=P({type:a,selectors:[["app-create-edit-evaluation-questionnaire"]],viewQuery:function(t,n){if(t&1&&U(qn,5),t&2){let s;F(s=B())&&(n.evaluationAndQuestionnaireBuilderComponent=s.first)}},decls:11,vars:11,consts:[["headerDesktop",""],["headerMobile",""],["duplicateQuestionIdsAlert",""],[1,"create-edit-evaluation-questionnaire"],[4,"ngTemplateOutlet"],[1,"content"],[3,"titleChange","descriptionChange","questionChange","duplicateQuestionIdsDetected","initialOptionsValue","evaluationQuestionnaire","isLoading","isSmall","showOptionBuilder"],[3,"active"],[1,"header"],[1,"title"],[1,"title-wrapper"],["tabindex","-1",3,"click"],["svgIcon","chevron-left"],["variant","display","size","micro",1,"text-title"],["class","actions",4,"ngIf"],[1,"actions"],["icon","eye-show","iconType","left","size","large","variant","secondary",3,"onClick",4,"ngIf"],["icon","close","iconType","left",3,"onClick",4,"ngIf"],[3,"onClick",4,"ngIf"],["icon","eye-show","iconType","left","size","large","variant","secondary",3,"onClick"],["icon","close","iconType","left",3,"onClick"],[3,"onClick"],[1,"header-mobile"],["tabindex","0",3,"click"],["svgIcon","arrow-left"],[1,"text-evaluation-questionnaire"],["class","header-actions",4,"ngIf"],[1,"header-actions"],["icon","eye-show","iconType","only","size","large","variant","tertiary",3,"customTitle","onClick",4,"ngIf"],["icon","close","iconType","left","size","small",3,"onClick",4,"ngIf"],["size","small",3,"onClick",4,"ngIf"],["icon","eye-show","iconType","only","size","large","variant","tertiary",3,"onClick","customTitle"],["icon","close","iconType","left","size","small",3,"onClick"],["size","small",3,"onClick"],[1,"duplicate-question-ids-alert"],["state","warning",3,"message","dismissible"]],template:function(t,n){if(t&1){let s=S();u(0,"div",3),E(1,vd,1,0,"ng-container",4),u(2,"div",5)(3,"app-evaluation-and-questionnaire-builder",6),x("titleChange",function(h){return g(s),f(n.onTitleChange(h))})("descriptionChange",function(h){return g(s),f(n.onDescriptionChange(h))})("questionChange",function(h){return g(s),f(n.onQuestionFormGroupChange(h))})("duplicateQuestionIdsDetected",function(h){return g(s),f(n.onDuplicateQuestionIdsDetected(h))}),d(),y(4,"vedius-page-loading",7),d()(),E(5,Ed,12,8,"ng-template",null,0,I)(7,Od,9,5,"ng-template",null,1,I)(9,Ad,1,1,"ng-template",null,2,I)}if(t&2){let s=w(6),m=w(8);A("is-submitting",n.isSubmitting)("small",n.isSmall),r(),c("ngTemplateOutlet",n.isSmall?m:s),r(2),c("initialOptionsValue",n.initialBuilderValues)("evaluationQuestionnaire",n.evaluationQuestionnaire)("isLoading",n.isLoading)("isSmall",n.isSmall)("showOptionBuilder",!n.showPreview),r(),c("active",n.isSubmitting)}},dependencies:[ve,qn,li,Ee,j,K,q,L,jo],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
12-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%]{min-height:100vh;position:relative}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:24px 40px;display:flex;flex-direction:column;gap:1rem;background-color:#fff}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:calc(100vw - 500px)}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .text-title[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 30px);font-size:1.25rem;font-family:DM Sans;color:#192840;font-weight:500;line-height:30px}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .duplicate-question-ids-alert[_ngcontent-%COMP%]{width:100%;margin-top:16px;box-sizing:border-box}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .duplicate-question-ids-alert[_ngcontent-%COMP%] vds-alert[_ngcontent-%COMP%]{display:block}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] vedius-text[_ngcontent-%COMP%]{color:#192840}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:1rem}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] vedius-tabs[_ngcontent-%COMP%]{width:250px}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:center;background-color:#f5f6f8}.create-edit-evaluation-questionnaire[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] app-evaluation-and-questionnaire-builder[_ngcontent-%COMP%]:has(.loading){width:100%;display:flex;justify-content:center}.create-edit-evaluation-questionnaire.is-submitting[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{max-height:calc(100vh - 104px);overflow:hidden}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%]{background:#fff;border-bottom:1px solid #d3dae5;padding:12px 16px;display:flex;flex-direction:column;width:100%;gap:16px;box-sizing:border-box}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:inline-flex;justify-content:flex-start;align-items:center;gap:12px}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#425168;color:#425168;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .text-evaluation-questionnaire[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1rem;font-style:normal;font-weight:500;line-height:140%;letter-spacing:-.32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:inline-block;width:calc(100% - 30px)}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;justify-content:space-between;gap:12px;align-items:center;min-height:48px}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .duplicate-question-ids-alert[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .duplicate-question-ids-alert[_ngcontent-%COMP%] vds-alert[_ngcontent-%COMP%]{display:block}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-height:calc(100vh - 55px)}.create-edit-evaluation-questionnaire.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] app-evaluation-and-questionnaire-builder[_ngcontent-%COMP%]{width:100%}"]});let i=a;return i})();var Qd=(()=>{let a=class a{constructor(e,t,n){this.dialog=e,this.router=t,this.location=n,this.saveAction=Mi.SAVE,this.keepAction=Mi.KEEP,this.validRoutePaths=[ce.NovaAvaliacaoQuestionario,ce.NovaAvaliacaoQuestionarioModeloVedius]}canDeactivate(e,t){return N(this,null,function*(){return new Promise(n=>
12{let s=this.isValidRoute(t),m=e instanceof bi&&!e.isUpdated;s&&m?this.openEvaluationQuestionnaireCreationProgressVerificationModal().afterClosed().subscribe(O=>N(this,null,function*(){if(O?.action===this.saveAction){let Q=yield e.onSaveQuestionsAsync();Q||this.location.go(this.router.url),n(Q)}else O?.action===this.keepAction?(this.location.go(this.router.url),n(!1)):n(!0)})):n(!0)})})}openEvaluationQuestionnaireCreationProgressVerificationModal(){return this.dialog.open(_a,{width:"600px",disableClose:!0})}isValidRoute(e){let t=e.routeConfig?.path||"",n=this.router.url,s=this.validRoutePaths.some(h=>n.includes(h)),m=!this.validRoutePaths.some(h=>t.includes(h));return s&&m}};a.\u0275fac=function(t){return new(t||a)($(le),$(ae),$(Mt))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})(),Kn=(i,a)=>eo(Qd).canDeactivate(i,a);var Hn=i=>i.canDeactivate?Jn(i.canDeactivate()):Zn(!0);var Di=function(i){return i.EXIT_AND_NO_SAVE="EXIT_AND_NO_SAVE",i.CONTINUE="CONTINUE",i.SAVE_AND_EXIT="SAVE_AND_CLOSE",i}(Di||{}),Xa=(()=>{let a=class a{handleKeyUp(e){e.stopPropagation(),e.key===si&&this.close()}constructor(e,t,n){this.breakpointObserver=e,this.analyticsService=t,this.data=n,this.isSmall=!1,this.evaluationQuestionnaire=n?.evaluationQuestionnaire}get isEvaluation(){return this.evaluationQuestionnaire?.type===te.EVALUATION}ngOnInit(){this.listenSize()}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmall=e.matches})}close(){this.modal?.close({action:Di.CONTINUE})}onAction(e){this.onActionButtonClick(e),this.modal?.close({action:e})}onActionButtonClick(e){this.analyticsService.trackButtonClick(gt.AnswerEvaluationAndQuestionnaireInPersonProgressVerificationModal,{$action:e})}};a.\u0275fac=function(t){return new(t||a)(v(Z),v(Dt),v(He,8))},a.\u0275cmp=P({type:a,selectors:[["answer-evaluation-questionnaire-in-person-progress-verification-modal"]],viewQuery:function(t,n){if(t&1&&U(W,5),t&2){let s;F(s=B())&&(n.modal=s.first)}},hostBindings:function(t,n){t&1&&x("keyup",function(m){return n.handleKeyUp(m)})},decls:20,vars:23,consts:[[1,"answer-evaluation-questionnaire-in-person-progress-verification-modal"],[1,"title"],[1,"content"],["variant","text","fontFamily","font-family-secundary",3,"size"],[1,"actions"],["variant","secondary",3,"onClick","fullSize"],["variant","primary",3,"onClick","fullSize"]],template:function(t,n){t&1&&(u(0,"vedius-modal")(1,"div",0)(2,"h1",1),C(3),p(4,"translate"),p(5,"translate"),d(),u(6,"div",2)(7,"vedius-text",3),C(8),p(9,"translate"),d(),u(10,"vedius-text",3),C(11),p(12,"translate"),d()(),u(13,"div",4)(14,"vedius-button",5),x("onClick",function(){return n.onAction("EXIT_AND_NO_SAVE")}),C(15),p(16,"translate"),d(),u(17,"vedius-button",6),x("onClick",function(){return n.onAction("SAVE_AND_CLOSE")}),C(18),p(19,"translate"),d()()()()),t&2&&(r(),A("is-small",n.isSmall),r(2),T(" ",n.isEvaluation?_(4,11,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.EVALUATION_TITLE"):_(5,13,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.QUESTIONNAIRE_TITLE")," "),r(4),c("size",n.isSmall?"md":"sm"),r(),T(" ",_(9,15,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.INFO_PART_1"),""),r(2),c("size",n.isSmall?"md":"sm"),r(),T(" ",_(12,17,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.INFO_PART_2"),""),r(3),c("fullSize",n.isSmall),r(),M(_(16,19,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.EXIT_NO_SAVE")),r(2),c("fullSize",n.isSmall),r(),M(_(19,21,"EVALUATION_QUESTIONNAIRE_IN_PERSON_PROGRESS_MODAL.SAVE_AND_EXIT")))},dependencies:[W,X,K,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.answer-evaluation-questionnaire-in-person-progress-verification-modal{display:flex;flex-direction:column;gap:40px}.answer-evaluation-questionnaire-in-person-progress-verification-modal .title{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;margin:0;display:flex;align-items:center;gap:16px}.answer-evaluation-questionnaire-in-person-progress-verification-modal .content{width:100%;display:flex;flex-direction:column;gap:24px;color:#425168}.answer-evaluation-questionnaire-in-person-progress-verification-modal .actions{width:100%;height:100%;justify-content:flex-end;align-items:flex-start;gap:16px;display:inline-flex}.answer-evaluation-questionnaire-in-person-progress-verification-modal.is-small .title{font-size:1.25rem;line-height:1.875rem;margin-top:8px}.answer-evaluation-questionnaire-in-person-progress-verification-modal.is-small .content{padding:24px;background:#f5f6f8;border-radius:8px}.answer-evaluation-questionnaire-in-person-progress-verification-modal.is-small .actions{flex-direction:column-reverse}.answer-evaluation-questionnaire-in-person-progress-verification-modal.is-small .actions vedius-button{width:100%}.answer-evaluation-questionnaire-in-person-progress-verification-modal.is-small .actions vedius-button .vedius-button.secondary{color:#6d7a8e} 13`],encapsulation:2});let i=a;return i})();var Md=i=>({"background-image":i}),Pd=()=>({height:"64px",width:"64px"}),Ja=()=>({height:"16px"});function kd(i,a){if(i&1&&y(0,"div",14),i&2){let o=l(2);c("ngStyle",Y(1,Md,"url("+o.patientLogoUrl+")"))}}function Ld(i,a){if(i&1&&(u(0,"div"),y(1,"vedius-avatar",15),d()),i&2){let o=l(2);r(),c("alt",o.patientName==null?null:o.patientName.slice(0,1))}}function qd(i,a){if(i&1&&(u(0,"vedius-text",16),C(1),p(2,"vediusTruncate"),d()),i&2){let o=l(2);r(),T("",ee(2,1,o.patientDiagnosticSummary,500)," ")}}function Nd(i,a){if(i&1&&(u(0,"div",17),y(1,"mat-icon",18),u(2,"vedius-text",19),C(3),d()()),i&2){let o=l(2);r(3),M(o.patientPhone)}}function Vd(i,a){if(i&1&&(u(0,"div",20),y(1,"mat-icon",21),u(2,"vedius-text",19),C(3),d()()),i&2){let o=l(2);r(3),M(o.patientEmail)}}function Rd(i,a){if(i&1&&(u(0,"div",20),y(1,"mat-icon",22),u(2,"vedius-text",19),C(3),d()()),i&2){let o=l(2);r(3),M(o.patientInfoAgeAndProfession)}}function Dd(i,a){if(i&1&&(u(0,"div",1)(1,"div",2)(2,"div",3),E(3,kd,1,3,"div",4)(4,Ld,2,1,"div",5),d()(),u(5,"div",6)(6,"div",7)(7,"vedius-text",8),C(8),p(9,"translate"),p(10,"translate"),p(11,"capitalizeFirstLetter"),d(),u(12,"vedius-text",9),C(13),d(),E(14,qd,3,4,"vedius-text",10),d(),u(15,"div",11),E(16,Nd,4,1,"div",12)(17,Vd,4,1,"div",13)(18,Rd,4,1,"div",13),d()()()),i&2){let o=l();A("small",o.isSmall),r(3),c("ngIf",o.patientLogoUrl),r(),c("ngIf",!o.patientLogoUrl),r(4),T(" ",_(11,14,o.treatmentType==="PATIENT"?_(9,10,"PATIENT"):_(10,12,"STUDENT")),": "),r(5),M(o.patientName),r(),c("ngIf",o.patientDiagnosticSummary),r(2),c("ngIf",o.patientPhone),r(),c("ngIf",o.patientEmail),r(),c("ngIf",o.patientInfoAgeAndProfession)}}function Ud(i,a){if(i&1&&(u(0,"div",1)(1,"div",2),y(2,"ngx-skeleton-loader",23),d(),u(3,"div",24)(4,"div",25),y(5,"ngx-skeleton-loader",26),d(),u(6,"div",11),y(7,"ngx-skeleton-loader",26),d()()()),i&2){let o=l();A("small",o.isSmall),r(2),c("count",1)("theme",se(8,Pd)),r(3),c("count",3)("theme",se(9,Ja)),r(2),c("count",3)("theme",se(10,Ja))}}var Za=(()=>{let a=class a{constructor(e){this.translation=e,this.treatmentType=Ao.PATIENT,this.isSmall=!1,this.patientInfoAgeAndProfession=""}ngOnChanges(e){e.patient?.currentValue&&(this.patientInfoAgeAndProfession=this.getPatientAgeAndProfessionInfo())}ngOnInit(){this.translation.loaded().then(()=>{this.patientInfoAgeAndProfession=this.getPatientAgeAndProfessionInfo()})}get patientName(){return this.patient?.visibleName}get patientEmail(){return this.patient?.email?.value}get patientLogoUrl(){return this.patient?.imageUrl?.url}get patientDiagnosticSummary(){return this.patient?.diagnosticSummary}get patientPhone(){return this.patient?.phone?.formattedPhoneWithoutCode()}getPatientAgeAndProfessionInfo(){if(!this.patient)return"";let e="",t=this.patient.age?.years;return t!==void 0&&(e=t===1?this.translation.get(b.Age_1):this.translation.get(b.Age,{age:t})),this.patient.profession&&(e=e?`${e}, ${this.patient.profession}`:this.patient.profession),e}};a.\u0275fac=function(t){return new(t||a)(v(J))},a.\u0275cmp=P({type:a,selectors:[["patient-info-card"]],inputs:{patient:"patient",treatmentType:"treatmentType",isSmall:"isSmall"},features:[be],decls:2,vars:2,consts:[["class","patient-info-card-component",3,"small",4,"ngIf"],[1,"patient-info-card-component"],[1,"patient-info"],[1,"avatar"],["class","patient-avatar",3,"ngStyle",4,"ngIf"],[4,"ngIf"],[1,"patient-content"],[1,"info-content"],["variant","text","size","micro",1,"neutral-dark-color"],["variant","text","size","xl",1,"neutral-dusk-color"],["class","patient-registry-content neutral-darker-color","variant","text","size","sm",4,"ngIf"],[1,"patient-contact"],["class","contact-info",4,"ngIf"],["class","contact-info neutral-darker-color",4,"ngIf"],[1,"patient-avatar",3,"ngStyle"],["size","large",3,"alt"],["variant","text","size","sm",1,"patient-registry-content","neutral-darker-color"],[1,"contact-info"],["svgIcon","phone"],["variant","text","size","sm",1,"neutral-darker-color"],[1,"contact-info","neutral-darker-color"],["svgIcon","email"],["svgIcon","patient-age-and-profession"],["animation","pulse","appearance","circle",1,"loader",3,"count","theme"],[1,"patient-content","width-100"],[1,"info-content","width-100"],[1,"loader",3,"count","theme"]],template:function(t,n){t&1&&E(0,Dd,19,16,"div",0)(1,Ud,8,11,"div",0),t&2&&(c("ngIf",n.patient),r(),c("ngIf",!n.patient))},dependencies:[j,lt,mi,X,Ee,We,$e,q,L,oa,_i],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;
13-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.patient-info-card-component[_ngcontent-%COMP%]{display:flex;padding:40px;align-items:flex-start;gap:24px;align-self:stretch;border-radius:8px;border:1px solid #d3dae5;background:#fff}.patient-info-card-component[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%], .patient-info-card-component[_ngcontent-%COMP%] .width-100[_ngcontent-%COMP%]{width:100%}.patient-info-card-component[_ngcontent-%COMP%] .clickable[_ngcontent-%COMP%]:hover{cursor:pointer;color:#6d7a8e}.patient-info-card-component[_ngcontent-%COMP%] .neutral-dark-color[_ngcontent-%COMP%]{color:#6d7a8e}.patient-info-card-component[_ngcontent-%COMP%] .neutral-dusk-color[_ngcontent-%COMP%]{color:#192840}.patient-info-card-component[_ngcontent-%COMP%] .neutral-darker-color[_ngcontent-%COMP%]{color:#425168}.patient-info-card-component[_ngcontent-%COMP%] .patient-info[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:24px}.patient-info-card-component[_ngcontent-%COMP%] .patient-info[_ngcontent-%COMP%] .patient-avatar[_ngcontent-%COMP%]{display:flex;width:var(--sizing-7, 64px);height:var(--sizing-7, 64px);border-radius:50%;background-size:cover;background-position:center;color:#70bbc8}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:flex-start;gap:48px}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .info-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;min-width:180px}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .info-content[_ngcontent-%COMP%] .patient-registry-content[_ngcontent-%COMP%]{margin-top:8px}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .patient-contact[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:12px}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .patient-contact[_ngcontent-%COMP%] .contact-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.patient-info-card-component[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .patient-contact[_ngcontent-%COMP%] .contact-info[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{display:flex;width:16px;height:16px;justify-content:center;align-items:center}.patient-info-card-component.small[_ngcontent-%COMP%]{padding:40px 24px;border:none;border-radius:0;border-bottom:1px solid #d3dae5;flex-direction:column;justify-content:center;align-items:center;width:100%}.patient-info-card-component.small[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%]{flex-direction:column;gap:16px;width:100%}.patient-info-card-component.small[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .info-content[_ngcontent-%COMP%]{min-width:100%}.patient-info-card-component.small[_ngcontent-%COMP%] .patient-content[_ngcontent-%COMP%] .contact-info[_ngcontent-%COMP%] vedius-text[_ngcontent-%COMP%]{width:100%;word-break:break-word;white-space:normal}"]});let i=a;return i})();function Fd(i,a){i&1&&z(0)}function Bd(i,a){if(i&1){let o=S();u(0,"div",17)(1,"vedius-button",18),x("onClick",function(){g(o);let t=l(2);return f(t.onSaveAnswerRequested())}),C(2),p(3,"translate"),d()()}i&2&&(r(2),T(" ",_(3,1,"BUTTONS.SAVE_ANSWER")," "))}function zd(i,a){if(i&1){let o=S();u(0,"header",10)(1,"div",11)(2,"div",12)(3,"a",13),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",14),C(5),p(6,"translate"),d(),u(7,"vedius-text",15),C(8),d()(),E(9,Bd,4,3,"div",16),d()()}if(i&2){let o=l();r(5),T(" ",_(6,3,"BUTTONS.BACK")," "),r(3),T(" ",o.evaluationQuestionnaire==null?null:o.evaluationQuestionnaire.title," "),r(),c("ngIf",o.showSaveAnswerButton())}}function jd(i,a){if(i&1){let o=S();u(0,"header",19)(1,"div",12)(2,"a",20),x("click",function(){g(o);let t=l();return f(t.back())}
13),y(3,"mat-icon",21),d(),u(4,"span",22),C(5),p(6,"translate"),d()()()}if(i&2){let o=l();r(5),T(" ",o.title!==""?o.title:_(6,1,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," ")}}var $n=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me,yt,bt,Jt,Zt,Qt,It,tt,Ue){this.activatedRoute=e,this.evolutionProgressTrackerService=t,this.userVediusReferenceKeyFactoryService=n,this.service=s,this.patientService=m,this.trackingErrorCore=h,this.evaluationQuestionnaireDraftDataService=O,this.router=Q,this.mainBackgroundService=H,this.userVediusContext=ie,this.appContext=ge,this.patientEvaluationQuestionnaireReportService=fe,this.toastService=pe,this.evaluationAndQuestionnaireRouteStrategy=Qe,this.evaluationQuestionnaireListStorageService=Me,this.location=yt,this.vediusService=bt,this.breakpointObserver=Jt,this.sidebarService=Zt,this.patientManagementRouteStrategy=Qt,this.dialog=It,this.evaluationQuestionnaireFailedSubmissionService=tt,this.analyticsService=Ue,this.title="",this.isLoading=!1,this.isSubmitting=!1,this.answeringByVediusTemplate=!1,this.isSmall=!1,this.hideSideNav=!1,this.isFromPatientMedicalRecordRoute=!1,this.alreadySaved=!1,this.userStorageLimitGB=0,this.userStorageUsageGB=0,this.evolutionProgressTrackerService.invisible(),this.mainBackgroundService.changeBackgroundColor(di.NEUTRAL_LIGHTER),this.userVediusReferenceKey=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY),this.isFromPatientMedicalRecordRoute=!!this.activatedRoute.snapshot.queryParams.apartir_do_report_do_paciente,this.key=pa.from(this.userVediusReferenceKey,Oe.new())}canDeactivate(){return this.alreadySaved||!this.evaluationQuestionnaire?Promise.resolve(!0):new Promise(e=>{this.openAnswerEvaluationQuestionnaireInPersonProgressVerificationModal().afterClosed().subscribe(n=>N(this,null,function*(){if(n?.action===Di.SAVE_AND_EXIT){let s=this.evaluationAndQuestionnaireFormAnswerComponent?.requestAndGetEvaluationQuestionnaire();if(!s){e(!1);return}let h=yield this.onSaveAnswer(s,!1);e(h)}else n?.action===Di.EXIT_AND_NO_SAVE?(this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),this.alreadySaved=!0,e(!0)):e(!1)}))})}get professional(){return this.userVediusContext.current}ngOnInit(){this.listenSize(),this.title=this.evaluationQuestionnaireDraftDataService.evaluationQuestionnaireDraft?.details?.title||"",this.activatedRoute.params.subscribe(e=>{let t=e.id,n=e.paciente_id;if(t&&n){let s=De.from(this.userVediusReferenceKey,t);this.answeringByVediusTemplate=this.router.url.includes(gi.AvaliacaoQuestionarioPresencialModeloVedius);let m=_t.from(mt.fromUserVediusReferenceKey(this.userVediusReferenceKey),Oe.fromString(n));this.load(s,m)}})}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmall=e.matches,this.checkSideNavVisible()})}checkSideNavVisible(){this.isSmall&&!this.hideSideNav?(this.hideSideNav=!0,this.sidebarService.hide
13Sidebar()):!this.isSmall&&this.hideSideNav&&(this.hideSideNav=!1,this.sidebarService.showSidebar())}load(e,t){if(this.answeringByVediusTemplate){let n=Ze.from(e.value);this.loadVediusModelEvaluation(n)}else this.loadModelEvaluation(e);this.loadPatientInfo(t),this.loadUserStorageInfo(),setTimeout(()=>{this.loadAnalyticsAnswerEvaluationAndQuestionnaireInPersonInPerson()},5e3)}loadUserStorageInfo(){let e=this.appContext.getUserCredential()?.userVedius;e?.attachmentInfo&&(this.userStorageLimitGB=e.attachmentInfo.maxSize.value,this.userStorageUsageGB=e.attachmentInfo.filesSize.value)}back(){this.location.back()}loadModelEvaluation(e){let t=this.evaluationQuestionnaireDraftDataService.evaluationQuestionnaireDraft?.evaluationQuestionnaire;if(t?.key?.value===e.value){this.evaluationQuestionnaire=t;return}this.isLoading=!0,this.service.get({evaluationQuestionnaireKey:e}).then(n=>{n&&(this.evaluationQuestionnaire=n,this.setEvaluationQuestionnaireDraftData(n))}).finally(()=>this.isLoading=!1)}evaluationQuestionnaireExists(e){return N(this,null,function*(){return!!(yield this.service.get({evaluationQuestionnaireKey:e}))})}loadVediusModelEvaluation(e){let t=this.evaluationQuestionnaireDraftDataService.evaluationQuestionnaireDraft?.evaluationQuestionnaire;if(t?.key?.value===e.value){this.evaluationQuestionnaire=t;return}this.isLoading=!0,this.vediusService.get({vediusEvaluationQuestionnaireKey:e}).then(n=>{if(n){let s=De.from(this.userVediusReferenceKey,e.value);this.evaluationQuestionnaire=ft.fromVediusEvaluationQuestionnaire(s,n,this.userVediusContext.current),this.setEvaluationQuestionnaireDraftData(this.evaluationQuestionnaire)}}).finally(()=>this.isLoading=!1)}loadPatientInfo(e){this.patientService.get({patientKey:e}).then(t=>{this.patient=t??void 0,this.patient||(this.toastService.showDefaultErrorMessage(),this.location.back(),setTimeout(()=>{window.location.reload()},500))}).catch(t=>{console.error("Error to get patient: ",t),this.toastService.showDefaultErrorMessage(),this.location.back(),setTimeout(()=>{window.location.reload()},500)})}loadAnalyticsAnswerEvaluationAndQuestionnaireInPersonInPerson(){this.analyticsService.trackEvent(Rt.StartAnswerEvaluationAndQuestionnaireInPerson,{$evaluation_questionnaire_id:this.evaluationQuestionnaire?.key?.value,$evaluation_questionnaire_title:this.evaluationQuestionnaire?.title,$patient_id:this.patient?.key?.patientKey?.value,$patient_name:this.patient?.name?.fullName})}onAnswerChange(e){this.setEvaluationQuestionnaireDraftData(e),this.saveDraft(e)}onSaveAnswerRequested(){this.evaluationAndQuestionnaireFormAnswerComponent?.saveAnswerRequested()}showSaveAnswerButton(){return this.evaluationAndQuestionnaireFormAnswerComponent?.evaluationAndQuestionnairePreviewsComponent?.evaluationQuestionnaireSectionPaginatorComponent?.showFinishButton()}onSaveAnswer(e,t=!0){return N(this,null,function*(){if(this.isSubmitting)return!1;this.analyticsService.trackButtonClick(gt.SaveAnswerEvaluationAndQuestionnaireInPerson,{});let n=this.key,s=Ln.fromAnswerInPerson({key:n,patientInfo:this.patient?.toInfo(),evaluationQuestionnaire:e});this.isSubmitting=!0;try{return this.savingAnswerAnalytics(s),this.answeringByVediusTemplate&&((yield this.evaluationQuestionnaireExists(e.key))||(yield this.service.create({evaluationQuestionnaire:e}))),yield this.patientEvaluationQuestionnaireReportService.answerEvaluationQuestionnaireReport({patientEvaluationQuestionnaireAnswered:s}),this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),this.alreadySaved=!0,this.savedAnswerAnalytics(s),t&&(this.isFromPatientMedicalRecordRoute?this.goToPatientMedicalRecordRoute():this.evaluationAndQuestionnaireRouteStrategy.setTab(me.HISTORY).redirect()),this.toastService.showDefaultCreateSuccessMessage(),!0}catch(m){let h=m?.message||"";console.error("Error to save report remote:",m),this.toastService.showDefaultErrorMessage(),this.trackingErrorCore.onCaptureException(h),this.errorSavingAnswerAnalytics(s,m);let O={evaluationQuestionnaire:e?.toFuncDocument(),patientUid:this.patient?.key?.patientKey?.value||""};return this.evaluationQuestionnaireFailedSubmissionService.failedOnAnswerInPerson(O,h),!1}finally{setTimeout(()=>{this.isSubmitting=!1},300)}})}savingAnswerAnalytics(e){this.analyticsService.trackEvent(Rt.SavingAnswerEvaluationAndQuestionnaireInPerson,{$evaluation_questionnaire_id:e.evaluationQuestionnaire.key.value,$evaluation_questionnaire_title:e.evaluationQuestionnaire.title,$evaluation_questionnaire_questions:e.evaluationQuestionnaire.questions,$patient_id:this.patient?.key?.patientKey?.value||e?.patientInfo?.key?.patientKey?.value,$patient_name:this.patient?.name?.fullName||e?.patientInfo?.name?.fullName})}savedAnswerAnalytics(e){this.analyticsService.trackEvent(Rt.SavedAnswerEvaluationAndQuestionnaireInPerson,{$evaluation_questionnaire_id:e.evaluationQuestionnaire.key.value,$evaluation_questionnaire_title:e.evaluationQuestionnaire.title,$patient_id:this.patient?.key?.patientKey?.value,$patient_name:this.patient?.name?.fullName})}errorSavingAnswerAnalytics(e,t){this.analyticsService.trackEvent(Rt.ErrorSavingAnswerEvaluationAndQuestionnaireInPerson,{$error:t,$error_message:t?.message,$evaluation_questionnaire_id:e.evaluationQuestionnaire.key.value,$evaluation_questionnaire_title:e.evaluationQuestionnaire.title,$patient_id:this.patient?.key?.patientKey?.value,$patient_name:this.patient?.name?.fullName})}saveDraft(e){return N(this,null,function*(){if(this.isSubmitting)return;let t=this.key,n=Ln.fromAnswerInPerson({key:t,patientInfo:this.patient?.toInfo(),evaluationQuestionnaire:e});try{yield this.patientEvaluationQuestionnaireReportService.answerEvaluationQuestionnaireReportDraft({patientEvaluationQuestionnaireAnswered:n})}catch(s){let m=s?.message||"";console.error("Error to save draft:",s),this.trackingErrorCore.onCaptureException(m);let h={evaluationQuestionnaire:e?.toFuncDocument(),patientUid:this.patient?.key?.patientKey?.value||""};this.evaluationQuestionnaireFailedSubmissionService.failedOnAnswerInPerson(h,m)}})}openAnswerEvaluationQuestionnaireInPersonProgressVerificationModal(){return this.dialog.open(Xa,{width:"600px",data:{evaluationQuestionnaire:this.evaluationQuestionnaire}})}setEvaluationQuestionnaireDraftData(e){let t=new St(e?.title||""),n=new at(e,t);this.evaluationQuestionnaireDraftDataService.setData(n)}clearDraft(){this.evaluationQuestionnaireDraftDataService.clear()}goToPatientMedicalRecordRoute(){this.patientManagementRouteStrategy.setConfig({patientManagementState:jt.Medical_Record,patient:this.patient}),this.patientManagementRouteStrategy.redirect(this.patient?.key.patientKey.value)}
13ngOnDestroy(){this.mainBackgroundService.reset(),this.clearDraft(),this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}};a.\u0275fac=function(t){return new(t||a)(v(Ne),v(Xe),v(Re),v(Te),v(ht),v(qt),v(Wt),v(ae),v(pi),v(re),v(ct),v(ma),v(ut),v(et),v(Ge),v(Mt),v(Le),v(Z),v(Ye),v(Kt),v(le),v(ci),v(Dt))},a.\u0275cmp=P({type:a,selectors:[["app-answer-evaluation-and-questionnaire-in-person"]],viewQuery:function(t,n){if(t&1&&U(fi,5),t&2){let s;F(s=B())&&(n.evaluationAndQuestionnaireFormAnswerComponent=s.first)}},decls:13,vars:21,consts:[["headerDesktop",""],["headerMobile",""],[1,"answer-evaluation-and-questionnaire-in-person-component"],[4,"ngTemplateOutlet"],[1,"content"],[1,"page-content-width"],[3,"professional","isSmall","title"],[3,"patient","isSmall"],[3,"onChange","onSaveAnswer","evaluationQuestionnaire","isLoading","isSmall","userStorageLimitGB","userStorageUsageGB","userReferenceKey","patientKey","reportKey"],[3,"active"],[1,"header"],[1,"title"],[1,"title-wrapper"],["tabindex","-1",3,"click"],["svgIcon","chevron-left"],["variant","display","size","micro"],["class","actions",4,"ngIf"],[1,"actions"],[3,"onClick"],[1,"header-mobile"],["tabindex","0",3,"click"],["svgIcon","arrow-left"],[1,"text-evaluation-questionnaire"]],template:function(t,n){if(t&1){let s=S();u(0,"div",2),E(1,Fd,1,0,"ng-container",3),u(2,"div",4)(3,"div",5),y(4,"professional-info-card",6),p(5,"translate"),y(6,"patient-info-card",7),u(7,"app-evaluation-and-questionnaire-form-answer",8),x("onChange",function(h){return g(s),f(n.onAnswerChange(h))})("onSaveAnswer",function(h){return g(s),f(n.onSaveAnswer(h))}),d()(),y(8,"vedius-page-loading",9),d()(),E(9,zd,10,5,"ng-template",null,0,I)(11,jd,7,3,"ng-template",null,1,I)}if(t&2){let s=w(10),m=w(12);A("small",n.isSmall),r(),c("ngTemplateOutlet",n.isSmall?m:s),r(),A("is-submitting",n.isSubmitting),r(2),he("title",_(5,19,"ANSWER_EVALUATION_AND_QUESTIONNAIRE_IN_PERSON_PAGE.CARD_INFO_TITLE")),c("professional",n.professional)("isSmall",n.isSmall),r(2),c("patient",n.patient)("isSmall",n.isSmall),r(),c("evaluationQuestionnaire",n.evaluationQuestionnaire)("isLoading",n.isLoading)("isSmall",n.isSmall)("userStorageLimitGB",n.userStorageLimitGB)("userStorageUsageGB",n.userStorageUsageGB)("userReferenceKey",n.userVediusReferenceKey)("patientKey",n.patient==null||n.patient.key==null?null:n.patient.key.patientKey)("reportKey",n.key.answeredKey),r(),c("active",n.isSubmitting)}},dependencies:[ve,ln,Za,fi,li,Ee,X,j,K,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%]{min-height:100vh;position:relative}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:24px 40px;display:flex;flex-direction:column;gap:1rem;background-color:#fff}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] vedius-text[_ngcontent-%COMP%]{color:#192840}
13.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:1rem}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] vedius-tabs[_ngcontent-%COMP%]{width:250px}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:center;background-color:#f5f6f8;padding:32px}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content.is-submitting[_ngcontent-%COMP%]{height:calc(100vh - 110px);overflow:hidden}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%]{width:856px;display:flex;flex-direction:column;align-items:flex-start;gap:16px}.answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] professional-info-card[_ngcontent-%COMP%], .answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] patient-info-card[_ngcontent-%COMP%], .answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] data-privacy-alert[_ngcontent-%COMP%], .answer-evaluation-and-questionnaire-in-person-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] app-evaluation-and-questionnaire-form-answer[_ngcontent-%COMP%]{width:100%}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%]{background:#fff;border-bottom:1px solid #d3dae5;padding:12px 16px;display:flex;flex-direction:column;width:100%;gap:16px;box-sizing:border-box}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:inline-flex;justify-content:flex-start;align-items:center;gap:12px}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#425168;color:#425168;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .text-evaluation-questionnaire[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1rem;font-style:normal;font-weight:500;line-height:140%;letter-spacing:-.32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:inline-block;width:calc(100% - 30px)}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:0 0 24px}.answer-evaluation-and-questionnaire-in-person-component.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%]{width:100%}"]});let i=a;return i})();var fn=(()=>{let a=class a{constructor(e){this.router=e}redirect(e){e&&this.router.navigate([ce.NovaAvaliacaoQuestionarioModeloVedius,e])}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function Kd(i,a){if(i&1){let o=S();u(0,"a",11),x("click",function(){g(o);let t=l();return f(t.back())}),y(1,"mat-icon",12),C(2),p(3,"translate"),d()}i&2&&(r(2),T(" ",_(3,1,"BUTTONS.BACK")," "))}function Hd(i,a){if(i&1){let o=S();u(0,"div",13),x("click",function(){g(o);let t=l();return f(t.back())}),y(1,"vedius-button",14),u(2,"vedius-text",15),C(3),p(4,"translate"),p(5,"translate"),d()()}if(i&2){let o=l();r(3),M(o.isEvaluationType?_(4,1,"EVALUATION_PREVIEW_TITLE"):_(5,3,"QUESTIONNAIRE_PREVIEW_TITLE"))}}function Gd(i,a){if(i&1){let o=S();u(0,"vedius-button",16),x("onClick",function(){g(o);let t=l();return f(t.goToSendModal())}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),M(_(2,2,"EVALUATION_TEMPLATES_PAGE.ACTIONS.SEND_LINK")))}function $d(i,a){if(i&1){let o=S();u(0,"vedius-button",17),x("onClick",function(){g(o);let t=l();return f(t.goToChoosePatientForEvaluationAndQuestionnaireInPersonModal())}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),M(_(2,2,"EVALUATION_TEMPLATES_PAGE.ACTIONS.REPLY_NOW")))}function Wd(i,a){if(i&1){let o=S();u(0,"vedius-button",17),x("onClick",function(){g(o);let t=l();return f(t.createEvaluationQuestionnaireFromTemplate())}),C(1),p(2,"translate"),d()}i&2&&(c("fullSize",!0),r(),M(_(2,2,"EVALUATION_TEMPLATES_PAGE.ACTIONS.USE_AS_TEMPLATE")))}var _e=function(i){return i.USE_MODEL_EVALUATION_TEMPLATE="USE_MODEL_EVALUATION_TEMPLATE",i.VEDIUS_EVALUATION_TEMPLATE="VEDIUS_EVALUATION_TEMPLATE",i.VEDIUS_QUESTIONNAIRE_TEMPLATE="VEDIUS_QUESTIONNAIRE_TEMPLATE",i.EVALUATION_TEMPLATE="EVALUATION_TEMPLATE",i.QUESTIONNAIRE_TEMPLATE="QUESTIONNAIRE_TEMPLATE",i}(_e||{}),tr=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me,yt,bt){this.sidebarService=e,this.evolutionProgressTrackerService=t,this.patientService=n,this.route=s,this.breakpointObserver=m,this.userVediusContext=h,this.userVediusReferenceKeyFactoryService=O,this.questionnaireService=Q,this.vediusQuestionnaireService=H,this.evaluationService=ie,this.vediusEvaluationService=ge,this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy=fe,this.location=pe,this.dialog=Qe,this.newEvaluationQuestionnaireFromVediusTemplateRouteStrategy=Me,this.evaluationAndQuestionnaireRouteStrategy=yt,this.evaluationQuestionnaireListStorageService=bt,this.isSmallScreen=!0,this.isEvaluationQuestionnaireLoading=!1,this.hideSideNav=!1,this.evolutionProgressTrackerService.invisible(),this.userVediusReferenceKey=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY)}get userVedius(){return this.userVediusContext.current}get isEvaluationType(){return this.type===_e.EVALUATION_TEMPLATE||this.type===_e.VEDIUS_EVALUATION_TEMPLATE}get isQuestionnaireType(){return this.type===_e.QUESTIONNAIRE_TEMPLATE||this.type===_e.VEDIUS_QUESTIONNAIRE_TEMPLATE}get isUseModelType(){return this.type===_e.USE_MODEL_EVALUATION_TEMPLATE}
13ngOnInit(){this.listenSize(),this.subscribeRouteParams()}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmallScreen=e.matches,this.checkSideNavVisible()})}checkSideNavVisible(){this.isSmallScreen&&!this.hideSideNav?(this.hideSideNav=!0,this.sidebarService.hideSidebar()):!this.isSmallScreen&&this.hideSideNav&&(this.hideSideNav=!1,this.sidebarService.showSidebar())}subscribeRouteParams(){this.route.params.subscribe(e=>{let t=so(e.params);t&&(this.loadPatient(t.patientId),this.type=t.type,this.type===_e.VEDIUS_EVALUATION_TEMPLATE||this.type===_e.VEDIUS_QUESTIONNAIRE_TEMPLATE||this.type===_e.USE_MODEL_EVALUATION_TEMPLATE?this.vediusEvaluationQuestionnaireKey=t.evaluationQuestionnaireId?Ze.from(t.evaluationQuestionnaireId):void 0:this.evaluationQuestionnaireKey=t.evaluationQuestionnaireId?De.from(this.userVediusReferenceKey,t.evaluationQuestionnaireId):void 0,this.type===_e.VEDIUS_EVALUATION_TEMPLATE||this.type===_e.USE_MODEL_EVALUATION_TEMPLATE?this.loadVediusEvaluationTemplate():this.type===_e.VEDIUS_QUESTIONNAIRE_TEMPLATE?this.loadVediusQuestionnaireTemplate():this.type===_e.EVALUATION_TEMPLATE?this.loadEvaluationTemplate():this.type===_e.QUESTIONNAIRE_TEMPLATE&&this.loadQuestionnaireTemplate())})}back(){this.location.back()}goToSendModal(){let e=this.type===_e.EVALUATION_TEMPLATE||this.type===_e.QUESTIONNAIRE_TEMPLATE,t=e?this.evaluationQuestionnaireKey:void 0;this.evaluationQuestionnaireSelected&&this.dialog.open(xt,{width:"600px",data:{evaluationQuestionnaireKey:t,title:this.evaluationQuestionnaireSelected.title,numberOfQuestions:this.evaluationQuestionnaireSelected.questions.length,type:this.evaluationQuestionnaireSelected.type,template:e?void 0:this.evaluationQuestionnaireSelected,evaluationQuestionnaireSource:e?wt.USER:wt.PLATFORM,patientInfo:this.patient?.toInfo()}}).afterClosed().subscribe(s=>{s&&this.openShareSentEvaluationQuestionnaireModal(s)})}goToChoosePatientForEvaluationAndQuestionnaireInPersonModal(){this.evaluationQuestionnaireSelected&&(this.patient?this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy.create({evaluationQuestionnaireKey:this.evaluationQuestionnaireSelected.key,title:this.evaluationQuestionnaireSelected.title,patientId:this.patient.key.patientKey.value,fromPatientScreen:!0}).redirect():this.dialog.open(Xt,{width:"600px",data:{evaluationQuestionnaireKey:this.evaluationQuestionnaireSelected.key,title:this.evaluationQuestionnaireSelected.title,totalOfQuestions:this.evaluationQuestionnaireSelected.questions.length||0}}))}createEvaluationQuestionnaireFromTemplate(){this.newEvaluationQuestionnaireFromVediusTemplateRouteStrategy.redirect(this.evaluationQuestionnaireSelected?.key.value)}openShareSentEvaluationQuestionnaireModal(e){this.dialog.open(Ct,{width:"600px",data:{patientEvaluationQuestionnaireSent:e}}).afterClosed().subscribe(()=>{this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),this.evaluationAndQuestionnaireRouteStrategy.setTab(me.HISTORY).redirect()})}loadQuestionnaireTemplate(){this.isEvaluationQuestionnaireLoading=!0,this.questionnaireService.get({evaluationQuestionnaireKey:this.evaluationQuestionnaireKey}).then(e=>{this.evaluationQuestionnaireSelected=e??void 0}).catch(e=>console.error(e)).finally(()=>this.isEvaluationQuestionnaireLoading=!1)}loadPatient(e){if(e){let t=_t.from(mt.fromUserVediusReferenceKey(this.userVediusReferenceKey),Oe.fromString(e));this.patientService.get({patientKey:t}).then(n=>{this.patient=n||void 0}).catch(n=>console.log("Error to get patient in evaluation questionnaire details page",n))}}loadVediusQuestionnaireTemplate(){this.isEvaluationQuestionnaireLoading=!0,this.vediusQuestionnaireService.get({vediusEvaluationQuestionnaireKey:this.vediusEvaluationQuestionnaireKey}).then(e=>{this.evaluationQuestionnaireSelected=e??void 0}).catch(e=>console.error(e)).finally(()=>this.isEvaluationQuestionnaireLoading=!1)}loadEvaluationTemplate(){this.isEvaluationQuestionnaireLoading=!0,this.evaluationService.get({evaluationQuestionnaireKey:this.evaluationQuestionnaireKey}).then(e=>{this.evaluationQuestionnaireSelected=e??void 0}).catch(e=>console.error(e)).finally(()=>this.isEvaluationQuestionnaireLoading=!1)}loadVediusEvaluationTemplate(){this.isEvaluationQuestionnaireLoading=!0,this.vediusEvaluationService.get({vediusEvaluationQuestionnaireKey:this.vediusEvaluationQuestionnaireKey}).then(e=>{this.evaluationQuestionnaireSelected=e??void 0}).catch(e=>console.error(e)).finally(()=>this.isEvaluationQuestionnaireLoading=!1)}ngOnDestroy(){this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}};a.\u0275fac=function(t){return new(t||a)(v(Ye),v(Xe),v(ht),v(Ne),v(Z),v(re),v(Re),v(Te),v(Le),v(Te),v(Le),v(Yt),v(Mt),v(le),v(fn),v(et),v(Ge))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-details-page"]],decls:12,vars:11,consts:[[1,"evaluation-and-questionnaire-details-page"],[1,"evaluation-and-questionnaire-details-container"],[1,"header"],[1,"evaluation-and-questionnaire-details-back"],["tabindex","0",3,"click",4,"ngIf"],["tabindex","0","class","small-content-back",3,"click",4,"ngIf"],[1,"evaluation-template-details-container"],[1,"app-evaluation-and-questionnaire-previews",3,"evaluationAndQuestionnaire","enablePagination","isLoading","isSmall"],[1,"evaluation-template-details-action-container"],["variant","secondary",3,"fullSize","onClick",4,"ngIf"],["variant","primary",3,"fullSize","onClick",4,"ngIf"],["tabindex","0",3,"click"],["svgIcon","chevron-left"],["tabindex","0",1,"small-content-back",3,"click"],["icon","arrow-left","iconType","only","variant","tertiary",1,"evaluation-and-questionnaire-details-back-icon"],["variant","text","size","md",1,"text-back"],["variant","secondary",3,"onClick","fullSize"],["variant","primary",3,"onClick","fullSize"]],template:function(t,n){t&1&&(u(0,"div",0)(1,"div",1)(2,"header",2)(3,"div",3),E(4,Kd,4,3,"a",4)(5,Hd,6,5,"div",5),d()(),u(6,"div",6),y(7,"app-evaluation-and-questionnaire-previews",7),d(),u(8,"div",8),E(9,Gd,3,4,"vedius-button",9)(10,$d,3,4,"vedius-button",10)(11,Wd,3,4,"vedius-button",10),d()()()),t&2&&(A("is-small",n.isSmallScreen),r(4),c("ngIf",!n.isSmallScreen),r(),c("ngIf",n.isSmallScreen),r(2),c("evaluationAndQuestionnaire",n.evaluationQuestionnaireSelected)("enablePagination",!1)("isLoading",n.isEvaluationQuestionnaireLoading)("isSmall",n.isSmallScreen),r(2),c("ngIf",n.isQuestionnaireType||n.isEvaluationType),r(),c("ngIf",n.isQuestionnaireType||n.isEvaluationType),r(),c("ngIf",n.isUseModelType))},dependencies:[j,Ee,K,X,$t,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
13-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-details-page{background-color:#fff;min-height:100vh;position:relative}.evaluation-and-questionnaire-details-page .header{padding:40px 0 24px;display:flex;flex-direction:column;gap:24px}.evaluation-and-questionnaire-details-page .header .evaluation-and-questionnaire-details-back{display:flex;align-items:center}.evaluation-and-questionnaire-details-page .header .evaluation-and-questionnaire-details-back a{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;justify-content:flex-start;font-size:.875rem;font-family:DM Sans;font-weight:500;gap:8px;width:10%;cursor:pointer}.evaluation-and-questionnaire-details-page .evaluation-template-details-container{padding-top:24px;padding-bottom:165px}.evaluation-and-questionnaire-details-page .evaluation-template-details-container app-evaluation-and-questionnaire-previews{opacity:.7}.evaluation-and-questionnaire-details-page .evaluation-template-details-action-container{display:flex;gap:16px}.evaluation-and-questionnaire-details-page.is-small .header{padding-top:0;padding-bottom:0}.evaluation-and-questionnaire-details-page.is-small .header .evaluation-and-questionnaire-details-back{padding:8px 12px;border-bottom:1px #f5f6f8 solid}.evaluation-and-questionnaire-details-page.is-small .header .evaluation-and-questionnaire-details-back .small-content-back{width:100%;display:flex;align-items:center;gap:12px}.evaluation-and-questionnaire-details-page.is-small .header .evaluation-and-questionnaire-details-back .small-content-back .evaluation-and-questionnaire-details-back-icon button{color:#425168;stroke:#425168}.evaluation-and-questionnaire-details-page.is-small .header .evaluation-and-questionnaire-details-back .small-content-back .text-back{width:100%;align-items:center;text-align:center;display:flex;color:#192840}.evaluation-and-questionnaire-details-page.is-small .header .evaluation-and-questionnaire-details-back .small-content-back .text-back span{text-align:center;width:85%}.evaluation-and-questionnaire-details-page.is-small .evaluation-template-details-action-container{position:fixed;flex-direction:column;padding:16px;z-index:2;background-color:#fff;border-top:1px solid #d3dae5;width:100%;bottom:0;flex-direction:column-reverse;box-sizing:border-box}.evaluation-and-questionnaire-details-page.is-small .evaluation-template-details-action-container vedius-button{width:100%}@media screen and (min-width: 1200px){.evaluation-and-questionnaire-details-page{width:100%;display:flex;flex-direction:column;align-items:center}.evaluation-and-questionnaire-details-page .evaluation-and-questionnaire-details-container{min-width:1032px;max-width:1032px}}@media screen and (max-width: 1200px){.evaluation-and-questionnaire-details-page{padding-left:2rem;padding-right:2rem}}@media screen and (max-width: 600px){.evaluation-and-questionnaire-details-page{padding-left:0;padding-right:0}} 14`],encapsulation:2});let i=a;return i})();function Yd(i,a){i&1&&z(0)}function Xd(i,a){if(i&1){let o=S();u(0,"header",9)(1,"div",10)(2,"div",11)(3,"a",12),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",13),C(5),p(6,"translate"),d(),u(7,"vedius-text",14),C(8),d()()()()}if(i&2){let o=l();r(5),T(" ",_(6,2,"BUTTONS.BACK")," "),r(3),T(" ",o.evaluationQuestionnaire==null?null:o.evaluationQuestionnaire.title," ")}}function Jd(i,a){if(i&1){let o=S();u(0,"header",15)(1,"div",11)(2,"a",16),x("click",function(){g(o);let t=l();return f(t.back())}),y(3,"mat-icon",17),d(),u(4,"span",18),C(5),p(6,"translate"),d()()()}if(i&2){let o=l();r(5),T(" ",o.title!==""?o.title:_(6,1,"EVALUATION_QUESTIONNAIRE.FORM.TITLE.NO_LABEL")," ")}}var ir=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me){this.translation=e,this.activatedRoute=t,this.evolutionProgressTrackerService=n,this.userVediusReferenceKeyFactoryService=s,this.service=m,this.mainBackgroun
14dService=h,this.toastService=O,this.breakpointObserver=Q,this.sidebarService=H,this.patientManagementRouteStrategy=ie,this.evaluationAndQuestionnaireRouteStrategy=ge,this.location=fe,this.appContext=pe,this.trackingErrorCore=Qe,this.evaluationQuestionnaireFailedSubmissionService=Me,this.title="",this.isLoading=!1,this.isSubmitting=!1,this.isSmall=!1,this.isFirstUpdateAutomatically=!0,this.hideSideNav=!1,this.isFromEvaluationAndQuestionnaireHistory=!1,this.locationBack=!1,this.canEditReportAnswered=!0,this.userStorageLimitGB=0,this.userStorageUsageGB=0,this.evolutionProgressTrackerService.invisible(),this.mainBackgroundService.changeBackgroundColor(di.NEUTRAL_LIGHTER),this.userVediusReferenceKey=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY),this.checkProfessional()}get evaluationQuestionnaire(){return this.evaluationQuestionnaireMedicalRecord?.report?.evaluationQuestionnaire}get version(){return this.evaluationQuestionnaireMedicalRecord?.report?.version}get expireAt(){return this.evaluationQuestionnaireMedicalRecord?.report?.linkSent?.expireAt}ngOnInit(){this.listenSize(),this.loadUserStorageInfo();let e=window.history.state;e&&(this.isFromEvaluationAndQuestionnaireHistory=e.backTo==="history",this.locationBack=e.backTo==="location-back"),this.activatedRoute.params.subscribe(t=>{this.id=t.id;let n=t.paciente_id;this.id&&n&&(this.patientKey=_t.from(mt.fromUserVediusReferenceKey(this.userVediusReferenceKey),Oe.fromString(n)),this.reportKey=Ko.from(this.patientKey,Oe.fromString(this.id)),this.loadReportAnswered())})}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmall=e.matches,this.checkSideNavVisible()})}loadUserStorageInfo(){let e=this.appContext.getUserCredential()?.userVedius;e?.attachmentInfo&&(this.userStorageLimitGB=e.attachmentInfo.maxSize.value,this.userStorageUsageGB=e.attachmentInfo.filesSize.value)}checkSideNavVisible(){this.isSmall&&!this.hideSideNav?(this.hideSideNav=!0,this.sidebarService.hide
14Sidebar()):!this.isSmall&&this.hideSideNav&&(this.hideSideNav=!1,this.sidebarService.showSidebar())}loadReportAnswered(){return N(this,null,function*(){try{if(this.reportKey){this.isLoading=!0;let e=yield this.service.getByReportKey({reportKey:this.reportKey});if(!e&&this.patientKey&&this.id){let t=Ho.from(this.userVediusReferenceKey,this.id);e=yield this.service.getByLinkSentKey({patientKey:this.patientKey,sentKey:t})}this.evaluationQuestionnaireMedicalRecord=e||void 0,this.title=this.evaluationQuestionnaireMedicalRecord?.report.evaluationQuestionnaire.title||"",this.canEditReportAnswered=this.checkEditReportAnswered(),this.checkProfessional()}}catch(e){console.error("Error to get evaluation questionnaire report answered: ",e)}finally{setTimeout(()=>{this.isLoading=!1},500)}})}checkEditReportAnswered(){return this.evaluationQuestionnaireMedicalRecord?.report?.linkSent?.isAnswered&&this.evaluationQuestionnaireMedicalRecord?.report?.linkSent?.responseAt?oo(this.evaluationQuestionnaireMedicalRecord.report.linkSent.responseAt):!0}back(){if(this.isFromEvaluationAndQuestionnaireHistory){this.evaluationAndQuestionnaireRouteStrategy.setTab(me.HISTORY),this.evaluationAndQuestionnaireRouteStrategy.redirect();return}if(this.locationBack){this.location.back();return}this.goToPatientMedicalRecordRoute()}checkProfessional(){let e=this.appContext.getUserCredential()?.userVedius;this.professional=e instanceof we?e.collaborators.find(t=>t.key.value===this.evaluationQuestionnaireMedicalRecord?.professional?.key.value):e}onAnswerChange(e){this.onSaveAnswer(e)}onSaveAnswer(e){return N(this,null,function*(){try{if(!this.evaluationQuestionnaireMedicalRecord){console.error("Evaluation questionnaire report answered is empty"),this.toastService.showDefaultErrorMessage();return}let t=this.appContext.getUserCredential()?.userVedius;if(t&&!(this.professional?.key.value===t.key.value)){let s=this.translation.get(b.OwnerNotAllowedChangesMessage,{professional_name:this.professional?.name.fullName});this.toastService.showInfo({title:s});return}this.evaluationQuestionnaireMedicalRecord.report.evaluationQuestionnaire.questions=e.questions,this.service.updateAutomatically({evaluationQuestionnaireMedicalRecord:this.evaluationQuestionnaireMedicalRecord,showSuccessToast:this.isFirstUpdateAutomatically}),this.isFirstUpdateAutomatically&&(this.isFirstUpdateAutomatically=!1)}catch(t){let n=t?.message;console.error(t),this.toastService.showDefaultErrorMessage(),this.trackingErrorCore.onCaptureException(n);let s={evaluationQuestionnaire:e?.toFuncDocument(),patientUid:this.patientKey?.patientKey?.value||""};this.evaluationQuestionnaireFailedSubmissionService.failedOnUpdateAnswered(s,n)}})}goToPatientMedicalRecordRoute(){this.patientManagementRouteStrategy.setConfig({patientManagementState:jt.Medical_Record}),this.patientManagementRouteStrategy.redirect(this.evaluationQuestionnaireMedicalRecord?.patientInfo?.key.patientKey.value)}ngOnDestroy(){this.mainBackgroundService.reset(),this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}};a.\u0275fac=function(t){return new(t||a)(v(J),v(Ne),v(Xe),v(Re),v(Xo),v(pi),v(ut),v(Z),v(Ye),v(Kt),v(et),v(Mt),v(ct),v(qt),v(ci))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-and-questionnaire-report-answered"]],viewQuery:function(t,n){if(t&1&&U(fi,5),t&2){let s;F(s=B())&&(n.evaluationAndQuestionnaireFormAnswerComponent=s.first)}},decls:12,vars:25,consts:[["headerDesktop",""],["headerMobile",""],[1,"evaluation-and-questionnaire-report-answered-component"],[4,"ngTemplateOutlet"],[1,"content"],[1,"page-content-width"],[3,"professional","expireDate","isSmall","loading","title"],[3,"onChange","onSaveAnswer","evaluationQuestionnaire","ver
14sion","isLoading","isSmall","showSaveButton","readOnlyMode","showScore","userStorageLimitGB","userStorageUsageGB","userReferenceKey","patientKey","reportKey"],[3,"active"],[1,"header"],[1,"title"],[1,"title-wrapper"],["tabindex","-1",3,"click"],["svgIcon","chevron-left"],["variant","display","size","micro"],[1,"header-mobile"],["tabindex","0",3,"click"],["svgIcon","arrow-left"],[1,"text-evaluation-questionnaire"]],template:function(t,n){if(t&1){let s=S();u(0,"div",2),E(1,Yd,1,0,"ng-container",3),u(2,"div",4)(3,"div",5),y(4,"professional-info-card",6),p(5,"translate"),u(6,"app-evaluation-and-questionnaire-form-answer",7),x("onChange",function(h){return g(s),f(n.onAnswerChange(h))})("onSaveAnswer",function(h){return g(s),f(n.onSaveAnswer(h))}),d()(),y(7,"vedius-page-loading",8),d()(),E(8,Xd,9,4,"ng-template",null,0,I)(10,Jd,7,3,"ng-template",null,1,I)}if(t&2){let s=w(9),m=w(11);A("small",n.isSmall),r(),c("ngTemplateOutlet",n.isSmall?m:s),r(3),he("title",_(5,23,"ANSWER_EVALUATION_AND_QUESTIONNAIRE_IN_PERSON_PAGE.CARD_INFO_TITLE")),c("professional",n.professional)("expireDate",n.expireAt)("isSmall",n.isSmall)("loading",n.isLoading),r(2),A("read-only",!n.canEditReportAnswered),c("evaluationQuestionnaire",n.evaluationQuestionnaire)("version",n.version)("isLoading",n.isLoading)("isSmall",n.isSmall)("showSaveButton",!1)("readOnlyMode",!n.canEditReportAnswered)("showScore",!0)("userStorageLimitGB",n.userStorageLimitGB)("userStorageUsageGB",n.userStorageUsageGB)("userReferenceKey",n.userVediusReferenceKey)("patientKey",n.patientKey==null?null:n.patientKey.patientKey)("reportKey",n.reportKey==null?null:n.reportKey.reportKey),r(),c("active",n.isSubmitting)}},dependencies:[ve,ln,fi,li,Ee,X,q,L],styles:[".disable-text-copies[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies[_ngcontent-%COMP%], .evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%]{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle[_ngcontent-%COMP%]{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%]{min-height:100vh;position:relative}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .read-only[_ngcontent-%COMP%]{opacity:.7}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:24px 40px;display:flex;flex-direction:column;gap:1rem;background-color:#fff}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] vedius-text[_ngcontent-%COMP%]{color:#192840}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:1rem}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] vedius-tabs[_ngcontent-%COMP%]{width:250px}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:center;background-color:#f5f6f8;padding:32px}
14.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%]{width:856px;display:flex;flex-direction:column;align-items:flex-start;gap:16px}.evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] professional-info-card[_ngcontent-%COMP%], .evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] data-privacy-alert[_ngcontent-%COMP%], .evaluation-and-questionnaire-report-answered-component[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%] app-evaluation-and-questionnaire-form-answer[_ngcontent-%COMP%]{width:100%}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%]{background:#fff;border-bottom:1px solid #d3dae5;padding:12px 16px;display:flex;flex-direction:column;width:100%;gap:16px;box-sizing:border-box}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%]{display:inline-flex;justify-content:flex-start;align-items:center;gap:12px}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{stroke:#425168;color:#425168;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .header-mobile[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] .text-evaluation-questionnaire[_ngcontent-%COMP%]{color:#192840;font-family:DM Sans;font-size:1rem;font-style:normal;font-weight:500;line-height:140%;letter-spacing:-.32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:inline-block;width:calc(100% - 30px)}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:0 0 24px}.evaluation-and-questionnaire-report-answered-component.small[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .page-content-width[_ngcontent-%COMP%]{width:100%}"]});let i=a;return i})();var hn=(()=>{let a=class a{constructor(){this.selectedItemSubject=new st(void 0),this.selectedItem$=this.selectedItemSubject.asObservable(),this.loadItemsSubject=new it,this.loadItems$=this.loadItemsSubject.asObservable()}selectItem(e,t,n){this.selectedItemSubject.next({filter:e,itemKeySelected:t,totalPerPage:n})}load(){this.loadItemsSubject.next()}clear(){this.selectedItemSubject.next(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function Zd(i,a){i&1&&(D(0),u(1,"span",7),C(2),p(3,"translate"),d(),R()),i&2&&(r(2),T(" ",_(3,1,"EVALUATION_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_TITLE")," "))}function ep(i,a){if(i&1&&(u(0,"span",7),C(1),p(2,"translate"),p(3,"translate"),d(),u(4,"span",8),C(5),p(6,"translate"),p(7,"translate"),d()),i&2){let o=l(2);r(),T(" ",o.isFilterApplied?_(2,2,"EVALUATION_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_TITLE"):_(3,4,"EVALUATION_TEMPLATES_PAGE.EMPTY_TEMPLATE_TITLE")," "),r(4),T(" ",o.isFilterApplied?_(6,6,"EVALUATION_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_DESCRIPTION"):_(7,8,"EVALUATION_TEMPLATES_PAGE.EMPTY_TEMPLATE_DESCRIPTION")," ")}}function tp(i,a){if(i&1){let o=S();u(0,"vedius-button",9),x("onClick",function(){g(o);let t=l(2);return f(t.clearFilter())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"EVALUATION_TEMPLATES_PAGE.CLEAR_FILTERS")," "))}function ip(i,a){if(i&1){let o=S();u(0,"vedius-button",9),x("onClick",function(){g(o);let t=l(2);return f(t.createNewEvaluation())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"EVALUATION_TEMPLATES_PAGE.CREATE_EVALUATION_BUTTON")," "))}function np(i,a){if(i&1&&(D(0),u(1,"li",3),y(2,"img",4),u(3,"div",5),E(4,Zd,4,3,"ng-container",2)(5,ep,8,10,"ng-template",null,1,I),d(),E(7,tp,3,3,"vedius-button",6)(8,ip,3,3,"vedius-button",6),d(),R()),i&2){let o=w(6),e=l();r(4),c("ngIf",e.isClinicEmptySelectionState)("ngIfElse",o),r(3),c("ngIf",e.isFilterApplied&&!e.isClinicEmptySelectionState),r(),c("ngIf",!e.isFilterApplied&&!e.isClinicEmptySelectionState)}}function op(i,a){if(i&1){let o=S();u(0,"div",10)(1,"vedius-simple-list",11),x("scrolled",function(){g(o);let t=l();return f(t.loadMoreItems())})("onItemSelected",function(t){g(o);let n=l();return f(n.itemSelected(t))}),d()()}if(i&2){let o=l();A("evaluation-template-list--clinic",o.isClinicUser),r(),c("data",o.listDataOptions)("fakeLoader",o.fakeLoaderOptions)("isLoading",o.isLoading)}}var or=(()=>{let a=class a{constructor(e,t,n,s,m,h,O){this.service=e,this.listService=t,this.simpleListComponentService=n,this.cdr=s,this.appContext=m,this.newEvaluationQuestionnaireRouteStrategy=h,this.clinicCollaboratorsSelectionService=O,this.searchText="",this.isSmallScreen=!1,this.onSelected=new k,this.onPageChange=new k,this.onClearFilterClicked=new k,this.pageSize=Se.FIFTY,this.page=0,this.isLoading=!1,this.evaluationTemplatePaginationFilter=At.empty(),this.listDataOptions=[],this.subscriptions=[],this.fakeLoaderOptions=Array(7).map((Q,H)=>({key:H.toString(),label:H.toString()}))}get isFilterApplied(){return!!this.evaluationTemplatePaginationFilter.text}get listSize(){return this.listDataOptions.length}get userVedius(){return this.appContext.getUserCredential()?.userVedius}get isClinicUser(){return this.userVedius instanceof we}get isClinicEmptySelectionState(){return this.userVedius instanceof we&&this.professionalKeys!==void 0&&this.professionalKeys.length===0}ngOnChanges(e){e.searchText&&!e.searchText.firstChange&&this.searchingEvaluationTemplates(),e.professionalKeys&&!e.professionalKeys.firstChange&&this.reloadWithProfessionalKeys()}ngOnInit(){this.populatePaginationFilter(),this.listen()}populatePaginationFilter(){let e=this.userVedius,t;this.professionalKeys!==void 0?t=this.professionalKeys:(t=[e.key],e instanceof we&&(t=e.collaborators.map(n=>n.key))),this.evaluationTemplatePaginationFilter.professionalKeys=t,this.evaluationTemplatePaginationFilter.type=te.EVALUATION}reloadWithProfessionalKeys(){this.populatePaginationFilter(),this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.loadEvaluationTemplates()}listen(){this.subscriptions=[this.listenSelectedItem(),this.listenLoadItem()]}listenSelectedItem(){return this.listService.selectedItem$.subscribe(e=>N(this,null,function*(){e&&(Ve()?this.loadItemsAndScroll(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected):this.loadItemsAndSelect(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected),this.cdr.detectChanges())}))}listenLoadItem(){return this.listService.loadItems$.subscribe(()=>N(this,null,function*(){yield this.loadEvaluationTemplates(),this.cdr.detectChanges()}))}searchingEvaluationTemplates(){this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.searchText?this.evaluationTemplatePaginationFilter.text=this.searchText:this.evaluationTemplatePaginationFilter.text=void 0,this.loadEvaluationTemplates()}loadEvaluationTemplates(e=0,t=!1){return new Promise((n,s)=>{if(this.shouldSkipBackendLoadForEmptyClinicSelection()){this.dataSource=ui.create(0,this.pageSize,e,[]),this.listDataOptions=[],this.page=e,this.onPageChange.emit({page:this.page,total:0}),n();return}this.isLoading=!0;let m=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.evaluationTemplatePaginationFilter.isAllCollaboratorsSelected=this.clinicCollaboratorsSelectionService.isAllCollaboratorsSelected(this.evaluationTemplatePaginationFilter.professionalKeys||[]),this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:m,filterOption:this.evaluationTemplatePaginationFilter,orderOption:vt.from({titleOrder:xe.ASC})})}).then(h=>N(this,null,function*(){let O=e>0?[...this.dataSource?.data||[],...h.data]:[...h.data];this.dataSource=h,this.dataSource.setData(O),this.createSimpleListOptions(),this.page=e,!Ve()&&!t&&(yield this.selectFirstItem()),this.onPageChange.emit({page:this.page,total:this.dataSource.total}),n()})).catch(h=>{console.error(h),s()}).finally(()=>this.isLoading=!1)})}shouldSkipBackendLoadForEmptyClinicSelection(){return this.isClinicEmptySelectionState}createSimpleListOptions(){this.listDataOptions=this.dataSource?.data.map(e=>({key:e.key.value,label:e.title}))||[]}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadEvaluationTemplates(this.page+1,!0)}loadItemsAndSelect(e,t,n){this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.selectItem(n.value))})).catch(s=>console.error(s))}loadItemsAndScroll(e,t,n){this.isLoading=!0,this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.scrollAtItem(n.value))})).catch(s=>console.error(s))}loadInitialPage(e,t){return this.page=0,this.pageSize=e,this.evaluationTemplatePaginationFilter=t,this.dataSource=void 0,this.listDataOptions=[],this.loadEvaluationTemplates(this.page)}itemSelected(e){let t=this.dataSource?.data.find(n=>n.key.value===e?.key);this.onSelected.emit({item:t})}
14clearFilter(){this.onClearFilterClicked.emit()}createNewEvaluation(){this.newEvaluationQuestionnaireRouteStrategy.createType(te.EVALUATION).redirect()}clearSelection(){this.simpleListComponentService.clearAllChecked()}selectFirstItem(){return N(this,null,function*(){yield Ie(200);let e=this.dataSource?.data&&this.dataSource?.data.length>0?this.dataSource.data[0]:void 0;e&&this.selectListItem(e)})}selectListItem(e){this.simpleListComponentService.selectItem(e?.key.value,{scroll:!1})}ngOnDestroy(){this.listService.clear(),this.subscriptions.forEach(e=>e.unsubscribe())}};a.\u0275fac=function(t){return new(t||a)(v(Te),v(hn),v(Ht),v(je),v(ct),v(xi),v(Bt))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-template-list"]],inputs:{searchText:"searchText",isSmallScreen:"isSmallScreen",professionalKeys:"professionalKeys"},outputs:{onSelected:"onSelected",onPageChange:"onPageChange",onClearFilterClicked:"onClearFilterClicked"},features:[be],decls:3,vars:2,consts:[["list",""],["defaultTextState",""],[4,"ngIf","ngIfElse"],[1,"evaluation-template-list-not-found"],["src","../../../../../assets/images/evaluation-and-questionnaire-not-found.svg","alt",""],[1,"text-container"],["variant","secondary",3,"onClick",4,"ngIf"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick"],[1,"evaluation-template-list"],[3,"scrolled","onItemSelected","data","fakeLoader","isLoading"]],template:function(t,n){if(t&1&&E(0,np,9,4,"ng-container",2)(1,op,2,5,"ng-template",null,0,I),t&2){let s=w(2);c("ngIf",n.listSize===0&&!n.isLoading)("ngIfElse",s)}},dependencies:[j,K,Gt,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-template-list-not-found{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.evaluation-template-list-not-found img{width:150px}.evaluation-template-list-not-found .text-container{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-bottom:24px}.evaluation-template-list-not-found .text-container span{max-width:382px;width:100%;text-align:center}.evaluation-template-list-not-found .text-container span.title{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.4px}.evaluation-template-list-not-found .text-container span.details{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.33px}.evaluation-template-list{display:flex;width:100%;flex-direction:column}.evaluation-template-list vedius-simple-list{width:100%}.evaluation-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 275px)}.evaluation-template-list.evaluation-template-list--clinic vedius-simple-list .vedius-simple-list{height:calc(100vh - 330px)}@media screen and (max-width: 600px){.evaluation-template-list vedius-simple-list{width:100%}.evaluation-template-list vedius-simple-list .vedius-simple-list{height:70vh}} 15`],encapsulation:2});let i=a;return i})();var Ii=class i{constructor(a,o,e){this._text=a,this._type=o,this._activated=e}static from({text:a,type:o,activated:e}){return new i(a,o,e)}static empty(){return new i}get text(){return this._text}set text(a){this._text=a}get type(){return this._type}set type(a){this._type=a}get activated(){return this._activated}set activated(a){this._activated=a}isEmpty(){return!this._text&&!this._type}hasAnyFilter(){return!!this._text||!!this._type}toFilterDocument(){return{text_query:this._text??null,type:this.type??null,activated:this.activated}}};var xn=(()=>{let a=class a{constructor(){this.selectedItemSubject=new st(void 0),this.selectedItem$=this.selectedItemSubject.asObservable(),this.loadItemsSubject=ne
15w it,this.loadItems$=this.loadItemsSubject.asObservable()}selectItem(e,t,n){this.selectedItemSubject.next({filter:e,itemKeySelected:t,totalPerPage:n})}load(){this.loadItemsSubject.next()}clear(){this.selectedItemSubject.next(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function ap(i,a){if(i&1){let o=S();D(0),u(1,"li",2),y(2,"img",3),u(3,"div",4)(4,"span",5),C(5),p(6,"translate"),d(),u(7,"span",6),C(8),p(9,"translate"),d()(),u(10,"vedius-button",7),x("onClick",function(){g(o);let t=l();return f(t.clearFilter())}),C(11),p(12,"translate"),d()(),R()}i&2&&(r(5),T(" ",_(6,3,"EVALUATION_TEMPLATES_PAGE.NO_VEDIUS_TEMPLATE_FOUND_TITLE")," "),r(3),T(" ",_(9,5,"EVALUATION_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_DESCRIPTION")," "),r(3),T(" ",_(12,7,"EVALUATION_TEMPLATES_PAGE.CLEAR_FILTERS")," "))}function rp(i,a){if(i&1){let o=S();u(0,"vedius-simple-list",8),x("scrolled",function(){g(o);let t=l();return f(t.loadMoreItems())})("onItemSelected",function(t){g(o);let n=l();return f(n.itemSelected(t))}),d()}if(i&2){let o=l();A("loading",o.isLoading),c("data",o.listDataOptions)("fakeLoader",o.fakeLoaderOptions)("isLoading",o.isLoading)}}var rr=(()=>{let a=class a{constructor(e,t,n,s){this.service=e,this.listService=t,this.simpleListComponentService=n,this.cdr=s,this.searchText="",this.onSelected=new k,this.onClearFilterClicked=new k,this.onPageChange=new k,this.pageSize=Se.FIFTY,this.page=0,this.isLoading=!1,this.vediusEvaluationQuestionnaireTemplatePaginationFilter=Ii.empty(),this.listDataOptions=[],this.pageLoaded=!1,this.fakeLoaderOptions=Array(7).map((m,h)=>({key:h.toString(),label:h.toString()}))}get listSize(){return this.listDataOptions.length}ngOnChanges(e){e.searchText&&!e.searchText.firstChange&&this.searchingVediusEvaluations()}ngOnInit(){this.populatePaginationFilter(),this.vediusSelectedItemSubscription=this.listService.selectedItem$.subscribe(e=>N(this,null,function*(){e&&(Ve()?this.loadItemsAndScroll(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected):this.loadItemsAndSelect(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected),this.cdr.detectChanges())})),this.loadItemsSubscriptions=this.listService.loadItems$.subscribe(()=>N(this,null,function*(){yield this.loadVediusEvaluations(),this.cdr.detectChanges()}))}populatePaginationFilter(){this.vediusEvaluationQuestionnaireTemplatePaginationFilter.type=te.EVALUATION,this.vediusEvaluationQuestionnaireTemplatePaginationFilter.activated=!0}searchingVediusEvaluations(){this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.searchText?this.vediusEvaluationQuestionnaireTemplatePaginationFilter.text=this.searchText:this.vediusEvaluationQuestionnaireTemplatePaginationFilter.text=void 0,this.loadVediusEvaluations()}loadVediusEvaluations(e=0,t=!1){return new Promise((n,s)=>{this.isLoading=!0;let m=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:m,filterOption:this.vediusEvaluationQuestionnaireTemplatePaginationFilter.isEmpty()?void 0:this.vediusEvaluationQuestionnaireTemplatePaginationFilter,orderOption:vt.from({titleOrder:xe.ASC})})}).then(h=>N(this,null,function*(){let O=e>0?[...this.dataSource?.data||[],...h.data]:[...h.data];this.dataSource=h,this.dataSource.setData(O),this.createSimpleListOptions(),this.page=e,!Ve()&&!t&&(yield this.selectFirstItem()),this.pageLoaded=!0,this.onPageChange.emit({page:this.page,total:this.dataSource.total}),n()})).catch(h=>{console.error(h),s()}).finally(()=>this.isLoading=!1)})}createSimpleListOptions(){this.listDataOptions=this.dataSource?.data.map(e=>({key:e.key.value,label:e.title}))||[]}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadVediusEvaluations(this.page+1,!0)}clearFilter(){this.onClearFilterClicked.emit()}itemSelected(e){let t=this.dataSource?.data.find(n=>n.key.value===e?.key);this.onSelected.emit({item:t})}loadItemsAndScroll(e,t,n){this.isLoading=!0,this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.scrollAtItem(n.value))})).catch(s=>console.error(s))}loadItemsAndSelect(e,t,n){this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.selectItem(n.value))})).catch(s=>console.error(s))}loadInitialPage(e,t){return this.page=0,this.pageSize=e,this.vediusEvaluationQuestionnaireTemplatePaginationFilter=t,this.dataSource=void 0,this.listDataOptions=[],this.loadVediusEvaluations(this.page)}selectFirstItem(){return N(this,null,function*(){yield Ie(200);let e=this.dataSource?.data&&this.dataSource?.data.length>0?this.dataSource.data[0]:void 0;e&&this.selectListItem(e)})}selectListItem(e){this.simpleListComponentService.selectItem(e?.key.value)}ngOnDestroy(){this.listService.clear(),this.vediusSelectedItemSubscription?.unsubscribe(),this.loadItemsSub
15scriptions?.unsubscribe()}};a.\u0275fac=function(t){return new(t||a)(v(Le),v(xn),v(Ht),v(je))},a.\u0275cmp=P({type:a,selectors:[["app-vedius-evaluation-template-list"]],inputs:{searchText:"searchText"},outputs:{onSelected:"onSelected",onClearFilterClicked:"onClearFilterClicked",onPageChange:"onPageChange"},features:[be],decls:3,vars:2,consts:[["list",""],[4,"ngIf","ngIfElse"],[1,"vedius-evaluation-template-list-not-found"],["src","../../../../../assets/images/exercises-empty.svg","alt",""],[1,"text-container"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick"],[3,"scrolled","onItemSelected","data","fakeLoader","isLoading"]],template:function(t,n){if(t&1&&E(0,ap,13,9,"ng-container",1)(1,rp,1,5,"ng-template",null,0,I),t&2){let s=w(2);c("ngIf",n.listSize===0&&!n.isLoading&&n.pageLoaded)("ngIfElse",s)}},dependencies:[j,K,Gt,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}vedius-simple-list{width:100%;z-index:1}vedius-simple-list .vedius-simple-list{height:calc(100vh - 275px)}@media screen and (max-width: 600px){vedius-simple-list{width:100%}vedius-simple-list.loading{padding:16px!important}vedius-simple-list .vedius-simple-list{height:70vh}}.vedius-evaluation-template-list-not-found{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.vedius-evaluation-template-list-not-found img{width:150px}.vedius-evaluation-template-list-not-found .text-container{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.vedius-evaluation-template-list-not-found .text-container span{max-width:382px;width:100%;text-align:center}.vedius-evaluation-template-list-not-found .text-container span.title{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.41px}.vedius-evaluation-template-list-not-found .text-container span.details{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.33px}.vedius-evaluation-template-list-not-found vedius-button{margin-top:24px} 16`],encapsulation:2});let i=a;return i})();var Cn=(()=>{let a=class a{constructor(e){this.router=e}setParams(e){this.params=e}redirect(e){this.router.navigate([ce.DetalhesDoModeloDeAvaliacaoQuestionario,e||this.params]),setTimeout(()=>{this.params=void 0},1e3)}};a.\u0275fac=function(t){return new(t||a)($(ae))},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function sp(i,a){i&1&&z(0)}function lp(i,a){if(i&1){let o=S();u(0,"div",12)(1,"vedius-collaborator-selection-button",13),x("onFilterSelect",function(t){g(o);let n=l();return f(n.onCollaboratorFilterSelect(t))})("onLoad",function(t){g(o);let n=l();return f(n.onCollaboratorFilterSelect(t))}),d()()}if(i&2){let o=l();r(),c("initialSelected",o.initialCollaboratorSelected)}}function cp(i,a){if(i&1){let o=S();u(0,"vedius-tabs",14),x("onCustomChange",function(t){g(o);let n=l();return f(n.onTabChange(t))}),d()}if(i&2){let o=l();c("options",o.tabs)("activeId",o.activeId)}}function up(i,a){if(i&1){let o=S();u(0,"vedius-button",28),x("onClick",function(){g(o);let t=l(3);return f(t.goToSendModal())}),C(1),p(2,"translate"),d()}i&2&&(r(),M(_(2,1,"EVALUATION_TEMPLATES_PAGE.ACTIONS.SEND_LINK")))}function dp(i,a){if(i&1){let o=S();u(0,"vedius-button",29),x("onClick",function(){g(o);let t=l(3);return f(t.goToChoosePatientForEvaluationAndQuestionnaireInPersonModal())}),C(1),p(2,"translate"),d()}i&2&&(r(),M(_(2,1,"EVALUATION_TEMPLATES_PAGE.ACTIONS.REPLY_NOW")))}function pp(i,a){if(i&1){let o=S();u(0,"vedius-button",29),x("onClick",function(){g(o);let t=l(3);return f(t.createEvaluationQuestionnaireFromTemplate())}),C(1),p(2,"translate"),d()}i&2&&(r(),M(_(2,1,"EVALUATION_TEMPLATES_PAGE.ACTIONS.USE_AS_TEMPLATE")))}function mp(i,a){if(i&1&&(u(0,"div",25),E(1,up,3,3,"vedius-button",26)(2,dp,3,3,"vedius-button",27)(3,pp,3,3,"vedius-button",27),d()),i&2){let o=l(2);
16r(),c("ngIf",o.viewType==="EVALUATION_TEMPLATE_VIEW"),r(),c("ngIf",o.viewType==="EVALUATION_TEMPLATE_VIEW"),r(),c("ngIf",o.viewType==="USE_VEDIUS_EVALUATION_TEMPLATE_VIEW")}}function _p(i,a){if(i&1){let o=S();u(0,"div",15)(1,"div",16),y(2,"div",17),u(3,"div",18)(4,"vedius-button",19),x("onClick",function(){g(o);let t=l();return f(t.back())}),d()(),u(5,"div",20)(6,"div",21)(7,"vedius-text",22),C(8),p(9,"translate"),d()(),y(10,"app-evaluation-and-questionnaire-previews",23),d()(),E(11,mp,4,3,"div",24),d()}if(i&2){let o=l();r(8),M(_(9,6,"EVALUATION_PREVIEW_TITLE")),r(2),c("evaluationAndQuestionnaire",o.evaluationTemplateSelected)("enablePagination",!1)("isLoading",o.isLoading)("isSmall",o.isTabletScreen),r(),c("ngIf",o.evaluationTemplateSelected)}}function vp(i,a){if(i&1){let o=S();u(0,"header",30)(1,"div",31)(2,"div",32)(3,"a",33),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",34),C(5),p(6,"translate"),d(),u(7,"vedius-text",35),C(8),p(9,"translate"),p(10,"translate"),d()()()()}if(i&2){let o=l();r(5),T(" ",_(6,2,"EVALUATION_TEMPLATES_PAGE.BACK")," "),r(3),T(" ",o.isUseVediusEvaluationTemplateView?_(9,4,"EVALUATION_TEMPLATES_PAGE.TITLE_MODEL"):_(10,6,"EVALUATION_TEMPLATES_PAGE.TITLE")," ")}}function gp(i,a){if(i&1){let o=S();u(0,"header",36)(1,"div",31)(2,"div",32)(3,"div",37),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",38),d(),u(5,"vedius-text",39),C(6),p(7,"translate"),p(8,"translate"),d()()()()}if(i&2){let o=l();r(6),T(" ",o.isUseVediusEvaluationTemplateView?_(7,1,"EVALUATION_TEMPLATES_PAGE.TITLE_MODEL"):_(8,3,"EVALUATION_TEMPLATES_PAGE.TITLE")," ")}}var rt=function(i){return i.VEDIUS_MODEL_TEMPLATE="VEDIUS_MODEL_TEMPLATE",i.VEDIUS_EVALUATION_TEMPLATE="VEDIUS_EVALUATION_TEMPLATE",i.EVALUATION_TEMPLATE="EVALUATION_TEMPLATE",i}(rt||{}),En=function(i){return i.USE_VEDIUS_EVALUATION_TEMPLATE_VIEW="USE_VEDIUS_EVALUATION_TEMPLATE_VIEW",i.EVALUATION_TEMPLATE_VIEW="EVALUATION_TEMPLATE_VIEW",i}(En||{}),Sn=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me,yt,bt,Jt,Zt,Qt,It){this.sidebarService=e,this.translationService=t,this.evaluationService=n,this.vediusEvaluationService=s,this.patientService=m,this.userVediusContext=h,this.userVediusReferenceKeyFactoryService=O,this.evaluationTemplateListComponentService=Q,this.vediusEvaluationTemplateListComponentService=H,this.breakpointObserver=ie,this.activatedRoute=ge,this.dialog=fe,this.router=pe,this.newEvaluationQuestionnaireFromVediusTemplateRouteStrategy=Qe,this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy=Me,this.evaluationQuestionnaireListStorageService=yt,this.evaluationAndQuestionnaireRouteStrategy=bt,this.patientManagementRouteStrategy=Jt,this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy=Zt,this.evolutionProgressTrackerService=Qt,this.analyticsService=It,this.activeId=rt.VEDIUS_EVALUATION_TEMPLATE,this.searchText="",this.isEvaluationLoading=!1,this.isVediusEvaluationLoading=!1,this.isSmallScreen=!1,this.isTabletScreen=!1,this.viewT
16ype=En.EVALUATION_TEMPLATE_VIEW,this.selectedProfessionalKeys=[],this.sidebarService.hideSidebar(),this.evolutionProgressTrackerService.invisible();let tt="";this.searchControl=new oi(tt),this.searchText=tt,this.searched=!!this.searchText;let Ue=this.router.getCurrentNavigation();if(Ue&&Ue.extras.state){let bn=Ue.extras.state.queryParams;this.queryParametersBeforeNavigation=bn}let Xn=this.activatedRoute.snapshot.params.paciente_id;if(Xn){this.backToPatientMedicalRecordRoute=!0;let bn=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY);this.patientKey=_t.from(mt.fromUserVediusReferenceKey(bn),Oe.fromString(Xn))}}get evaluationTemplateSelected(){return this.isActiveTab(rt.VEDIUS_EVALUATION_TEMPLATE)?this.vediusEvaluationSelected:this.evaluationSelected}get isUseVediusEvaluationTemplateView(){return this.viewType==="USE_VEDIUS_EVALUATION_TEMPLATE_VIEW"}get userVedius(){return this.userVediusContext.current}get showCollaboratorDropdown(){let e=this.userVedius;return e instanceof we&&e.collaboratorsEnabled.length>1}get initialCollaboratorSelected(){return this.userVedius?[this.userVedius]:[]}get isLoading(){return this.evaluationSelected?this.isEvaluationLoading:this.isVediusEvaluationLoading}ngOnInit(){return N(this,null,function*(){yield this.checkViewType(),this.selectedProfessionalKeys=this.userVedius?[this.userVedius.key]:[],this.listenSize(),this.createTabOptions(),this.listen()})}onCollaboratorFilterSelect(e){let n=(Array.isArray(e)?e:[e]).map(h=>Vt.fromString(h.value)),s=n.map(h=>h.value),m=this.selectedProfessionalKeys.map(h=>h.value);kt(s,m)||(this.selectedProfessionalKeys=n)}ngAfterViewInit(){setTimeout(()=>{this.loadAll()})}checkViewType(){return new Promise(e=>{this.activatedRoute.url.subscribe(t=>{let n=t.map(s=>s.path).join("/");this.viewType=n===gi.UsarModeloDeAvaliacaoVedius?En.USE_VEDIUS_EVALUATION_TEMPLATE_VIEW:En.EVALUATION_TEMPLATE_VIEW,e()})})}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmallScreen=e.matches}),this.breakpointObserver.observe([ni]).subscribe(e=>{this.isTabletScreen=e.matches})}loadAll(){this.loadVediusEvaluatonTemplateList(),this.loadEvaluationTemplateList(),this.loadPatient()}loadVediusEvaluatonTemplateList(){this.vediusEvaluationTemplateListComponentService.load()}loadEvaluationTemplateList(){this.evaluationTemplateListComponentService.load()}loadPatient(){this.patientKey&&this.patientService.get({patientKey:this.patientKey}).then(e=>{this.patient=e||void 0}).catch(e=>console.log("Error to get patient in evaluation templates page",e))}listen(){this.searchControl.valueChanges.subscribe(e=>{e||this.onSearchClear()})}searchChanged(e){e&&(this.searchText=e,this.searched=!0)}onSearchClear(){this.searched&&(this.searched=!1,this.searchText="")}clearFilter(){this.searchControl.setValue("")}createTabOptions(){this.translationService.loaded().then(()=>{let e=[{label:this.translationService.get(`${b.EvaluationTemplatesTabsLabel}.${this.isUseVediusEvaluationTemplateView?rt.VEDIUS_MODEL_TEMPLATE:rt.VEDIUS_EVALUATION_TEMPLATE}`),id:rt.VEDIUS_EVALUATION_TEMPLATE},{label:this.translationService.get(`${b.EvaluationTemplatesTabsLabel}.${rt.EVALUATION_TEMPLATE}`),id:rt.EVALUATION_TEMPLATE}];this.isUseVediusEvaluationTemplateView&&e.pop(),this.tabs=e;let t=this.activatedRoute.snapshot.queryParams.tab;t&&(this.activeId=this.getTabFromTranslation(t))})}getTabFromTranslation(e){let t=this.translationService.get(`${b.EvaluationTemplatesTabsLabel}.${rt.EVALUATION_TEMPLATE}`);return e===t?rt.EVALUATION_TEMPLATE:rt.VEDIUS_EVALUATION_TEMPLATE}back(){if(this.backToPatientMedicalRecordRoute){this.goToPatientMedicalRecordRoute();return}let e={relativeTo:this.activatedRoute,queryParams:this.queryParametersBeforeNavigation};this.router.navigate([".."],e)}onTabChange(e){this.activeId=e.id,this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{tab:this.translationService.get(`${b.EvaluationTemplatesTabsLabel}.${this.activeId}`)},queryParamsHandling:"merge"})}isActiveTab(e){return e===this.activeId}onEvaluationTemplateItemSelected(e){if(!e.item){this.evaluationSelected=void 0;return}if(this.isSmallScreen){let t={evaluationQuestionnaireId:e.item.key.value,type:_e.EVALUATION_TEMPLATE,patientId:this.patientKey?.patientKey.value};this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy.redirect(JSON.stringify(t));return}this.isEvaluationLoading=!0,this.evaluationService.get({evaluationQuestionnaireKey:e.item.key}).then(t=>{this.evaluationSelected=t??void 0,setTimeout(()=>{let n=document.getElementById("scroll-top");n&&n.scrollIntoView({behavior:"smooth",block:"start"})},300)}).catch(t=>console.error(t)).finally(()=>this.isEvaluationLoading=!1)}onVediusEvaluationTemplateItemSelected(e){if(!e.item){this.vediusEvaluationSelected=void 0;return}if(this.isSmallScreen){let t={evaluationQuestionnaireId:e.item.key.value,type:this.isUseVediusEvaluationTemplateView?_e.USE_MODEL_EVALUATION_TEMPLATE:_e.VEDIUS_EVALUATION_TEMPLATE,patientId:this.patientKey?.patientKey.value};this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy.redirect(JSON.stringify(t));return}this.isVediusEvaluationLoading=!0,this.vediusEvaluationService.get({vediusEvaluationQuestionnaireKey:e.item.key}).then(t=>{this.vediusEvaluationSelected=t??void 0,setTimeout(()=>{let n=document.getElementById("scroll-top");n&&n.scrollIntoView({behavior:"smooth",block:"start"})},300)}).catch(t=>console.error(t)).finally(()=>this.isVediusEvaluationLoading=!1)}goToSendModal(){let e=this.evaluationTemplateSelected instanceof ft,t=e?this.evaluationTemplateSelected.key:void 0;this.evaluationTemplateSelected&&(this.analyticsButtonClick(gt.SendEvaluationQuestionnaire),this.dialog.open(xt,{width:"600px",data:{evaluationQuestionnaireKey:t,title:this.evaluationTemplateSelected.title,numberOfQuestions:this.evaluationTemplateSelected.questions.length,type:this.evaluationTemplateSelected.type,template:e?void 0:this.evaluationTemplateSelected,evaluationQuestionnaireSource:e?wt.USER:wt.PLATFORM,patientInfo:this.patient?.toInfo()}}).afterClosed().subscribe(s=>{s&&this.openShareSentEvaluationQuestionnaireModal(s)}))}analyticsButtonClick(e){this.analyticsService.trackButtonClick(e,{$evaluation_template_id:this.evaluationTemplateSelected?.key?.value,$evaluation_template_title:this.evaluationTemplateSelected?.title,$patient_id:this.patientKey?.patientKey?.value,$patient_name:this.patient?.name?.fullName})}openShareSentEvaluationQuestionnaireModal(e){this.dialog.open(Ct,{width:"600px",data:{patientEvaluationQuestionnaireSent:e}}).afterClosed().subscribe(()=>{if(this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),this.backToPatientMedicalRecordRoute){this.goToPatientMedicalRecordRoute();return}else this.evaluationAndQuestionnaireRouteStrategy.setTab(me.HISTORY).redirect()})}goToChoosePatientForEvaluationAndQuestionnaireInPersonModal(){this.evaluationTemplateSelected&&(this.analyticsButtonClick(gt.AnswerEvaluationAndQuestionnaireInPerson),this.patientKey?(this.analyticsService.trackEvent(Rt.AnswerEvaluationAndQuestionnaireInPersonNavigation,{$evaluation_template_id:this.evaluationTemplateSelected?.key?.value,$evaluation_template_title:this.evaluationTemplateSelected?.title,$patient_id:this.patientKey?.patientKey?.value,$patient_name:this.patient?.name?.fullName}),this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy.create({evaluationQuestionnaireKey:this.evaluationTemplateSelected.key,title:this.evaluationTemplateSelected.title,patientId:this.patientKey.patientKey.value,fromPatientScreen:this.backToPatientMedicalRecordRoute}).redirect()):(this.analyticsService.trackEvent(Rt.ChoosePatientForEvaluationAndQuestionnaireInPersonModal,{$evaluation_template_id:this.evaluationTemplateSelected?.key?.value,$evaluation_template_title:this.evaluationTemplateSelected?.title,$patient_id:this.patient?.key?.patientKey?.value,$patient_name:this.patient?.name?.fullName}),this.dialog.open(Xt,{width:"600px",data:{evaluationQuestionnaireKey:this.evaluationTemplateSelected.key,title:this.evaluationTemplateSelected.title,totalOfQuestions:this.evaluationTemplateSelected.questions.length||0}})))}createEvaluationQuestionnaireFromTemplate(){this.newEvaluationQuestionnaireFromVediusTemplateRouteStrategy.redirect(this.vediusEvaluationSelected?.key.value)}goToPatientMedicalRecordRoute(){this.patientManagementRouteStrategy.setConfig({patientManagementState:jt.Medical_Record,patient:this.patient}),this.patientManagementRouteStrategy.redirect(this.patientKey?.patientKey.value)}ngOnDestroy(){this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}};a.\u0275fac=function(t){return new(t||a)(v(Ye),v(J),v(Te),v(Le),v(ht),v(re),v(Re),v(hn),v(xn),v(Z),v(Ne),v(le),v(ae),v(fn),v(Cn),v(Ge),v(et),v(Kt),v(Yt),v(Xe),v(Dt))},a.\u0275cmp=P({type:a,selectors:[["app-evaluation-templates"]],decls:17,vars:25,consts:[["headerDesktop",""],["headerMobile",""],[1,"evaluation-templates-page"],[1,"container-left"],[4,"ngTemplateOutlet"],[1,"models-list-container"],["type","search",1,"search-input",3,"onSearch","onClear","placeholder","control","hint"],["class","collaborator-dropdown-wrapper",4,"ngIf"],[3,"options","activeId","onCustomChange",4,"ngIf"],[3,"onSelected","onPageChange","onClearFilterClicked","searchText"],[3,"onSelected","onPageChange","onClearFilterClicked","searchText","isSmallScreen","professionalKeys"],["class","container-right",4,"ngIf"],[1,"collaborator-dropdown-wrapper"],[3,"onFilterSelect","onLoad","initialSelected"],[3,"onCustomChange","options","activeId"],[1,"container-right"],[1,"content"],["id","scroll-top","id","scroll-top",2,"position","absolute","top","-2px"],[1,"close-container"],["size","small","variant","secondary","iconType","only","icon","close",3,"onClick"],[1,"evaluation-template-details-container"],[1,"evaluation-template-details-container-title"],["variant","text",1,"evaluation-template-details-title"],[1,"app-evaluation-and-questionnaire-previews",3,"evaluationAndQuestionnaire","enablePagination","isLoading","isSmall"],["class","actions",4,"ngIf"],[1,"actions"],["variant","secondary",3,"onClick",4,"ngIf"],["variant","primary",3,"onClick",4,"ngIf"],["variant","secondary",3,"onClick"],["variant","primary",3,"onClick"],[1,"header"],[1,"title"],[1,"title-wrapper"],["tabindex","0",3,"click"],["svgIcon","chevron-left"],["variant","text","size","xl"],[1,"header-mobile"],["tabindex","0",1,"control-button",3,"click"],["iconType","only","svgIcon","arrow-left"],["variant","text","size","md"]],template:function(t,n){if(t&1){let s=S();u(0,"div",2)(1,"div",3),E(2,sp,1,0,"ng-container",4),u(3,"div",5)(4,"vedius-input",6),p(5,"translate"),p(6,"translate"),p(7,"translate"),x("onSearch",function(h){return g(s),f(n.searchChanged(h))})("onClear",function(){return g(s),f(n.onSearchClear())}),d(),E(8,lp,2,1,"div",7)(9,cp,1,2,"vedius-tabs",8),u(10,"app-vedius-evaluation-template-list",9),x("onSelected",function(h){return g(s),f(n.onVediusEvaluationTemplateItemSelected(h))})("onPageChange",function(h){return g(s),f(n.vediusEvaluationTemplateListPageData=h)})("onClearFilterClicked",function(){return g(s),f(n.clearFilter())}),d(),u(11,"app-evaluation-template-list",10),x("onSelected",function(h){return g(s),f(n.onEvaluationTemplateItemSelected(h))})("onPageChange",function(h){return g(s),f(n.evalutionTemplateListPageData=h)})("onClearFilterClicked",function(){return g(s),f(n.clearFilter())}),d()()(),E(12,_p,12,8,"div",11),d(),E(13,vp,11,8,"ng-template",null,0,I)(15,gp,9,5,"ng-template",null,1,I)}if(t&2){let s=w(14),m=w(16);A("is-small",n.isSmallScreen),r(2),c("ngTemplateOutlet",n.isSmallScreen?m:s),r(),A("searching",!!n.searchControl.value),r(),he("placeholder",n.isUseVediusEvaluationTemplateView?_(5,19,"EVALUATION_TEMPLATES_PAGE.SEARCH.MODEL_LABEL"):_(6,21,"EVALUATION_TEMPLATES_PAGE.SEARCH.LABEL")),he("hint",_(7,23,"SEARCH_INPUT.HINT")),c("control",n.searchControl),r(4),c("ngIf",n.showCollaboratorDropdown&&n.isActiveTab("EVALUATION_TEMPLATE")),r(),c("ngIf",n.tabs),r(),A("hidden",!n.isActiveTab("VEDIUS_EVALUATION_TEMPLATE")),c("searchText",n.searchText),r(),A("hidden",!n.isActiveTab("EVALUATION_TEMPLATE")),c("searchText",n.searchText)("isSmallScreen",n.isSmallScreen)("professionalKeys",n.selectedProfessionalKeys),r(),c("ngIf",!n.isSmallScreen)}},dependencies:[ve,pt,j,vi,Je,rr,or,K,$t,Ee,X,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
16-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.evaluation-templates-page{background-color:#fff;min-height:100vh;display:flex;height:100%;position:relative}.evaluation-templates-page .container-left{width:100%;min-width:484px;max-width:500px;background:#f5f6f8;border-right:1px #d3dae5 solid;display:flex;flex-direction:column;gap:24px;min-height:100vh;height:100%}@media screen and (min-width: 600px) and (max-width: 960px){.evaluation-templates-page .container-left{min-width:50%;max-width:50%}}.evaluation-templates-page .container-left .header{padding:24px 32px 0;display:flex;flex-direction:column;gap:1rem}.evaluation-templates-page .container-left .header .title{display:flex;justify-content:space-between}.evaluation-templates-page .container-left .header .title .title-wrapper{display:flex;flex-direction:column}.evaluation-templates-page .container-left .header .title .title-wrapper a{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.evaluation-templates-page .container-left .header .title vedius-text{color:#192840}.evaluation-templates-page .container-left .models-list-container .search-input mat-form-field{padding:0 32px 12px;box-sizing:border-box}.evaluation-templates-page .container-left .models-list-container .search-input .mdc-text-field--outlined{background:#fff}.evaluation-templates-page .container-left .models-list-container .collaborator-dropdown-wrapper{padding:0 32px 12px;box-sizing:border-box}.evaluation-templates-page .container-left .models-list-container app-vedius-evaluation-template-list{height:100%;display:flex;padding:16px 4px 16px 16px}.evaluation-templates-page .container-left .models-list-container app-evaluation-template-list{width:100%;height:100%;box-sizing:border-box;display:flex;padding:16px 4px 16px 8px}.evaluation-templates-page .container-left .models-list-container .mat-mdc-tab-links{gap:40px;padding-left:32px;padding-right:32px;margin-bottom:16px;border-bottom:1px #d3dae5 solid}.evaluation-templates-page .container-left .models-list-container .mat-mdc-tab-links a{flex-grow:0;background:#f5f6f8}.evaluation-templates-page .container-left .models-list-container vedius-tabs{width:250px}.evaluation-templates-page .container-left .models-list-container .hidden{display:none}.evaluation-templates-page .container-left .models-list-container.searching app-vedius-evaluation-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 295px)}.evaluation-templates-page .container-left .models-list-container.searching app-evaluation-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 295px)}.evaluation-templates-page .container-right{max-height:100vh;min-height:100vh;overflow:hidden;width:100%;height:100%;background:#fff;justify-content:flex-start;align-items:flex-start;gap:10px;display:inline-flex;flex-direction:column}.evaluation-templates-page .container-right .content{position:relative;padding:24px 40px 100px;width:100%;display:flex;flex-direction:column;gap:24px;align-items:flex-start;justify-content:flex-start;flex:1;overflow:auto;box-sizing:border-box}.evaluation-templates-page .container-right .content .close-container{width:100%;display:flex;justify-content:flex-end}.evaluation-templates-page .container-right .content .evaluation-template-details-container{width:100%;height:100%;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;gap:40px}.evaluation-templates-page .container-right .content .evaluation-template-details-container .evaluation-template-details-container-title{display:flex;justify-content:flex-start;width:100%;max-width:858px}.evaluation-templates-page .container-right .content .evaluation-template-details-container .evaluation-template-details-container-title .evaluation-template-details-title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 30px);font-size:1.5rem;font-family:DM Sans;color:#192840;font-weight:500;line-height:30px}.evaluation-templates-page .container-right .content .evaluation-template-details-container app-evaluation-and-questionnaire-previews{min-width:858px;opacity:.7}@media screen and (min-width: 600px) and (max-width: 1450px){.evaluation-templates-page .container-right .content .evaluation-template-details-container app-evaluation-and-questionnaire-previews{min-width:100%;max-width:100%}}.evaluation-templates-page .container-right .content .evaluation-template-details-container .app-evaluation-and-questionnaire-previews:has(.loading){min-width:100%;display:flex;justify-content:center}.evaluation-templates-page .container-right .actions{width:100vh;position:absolute;right:0;bottom:0;background:linear-gradient(180deg,#fff0,#fff);padding:16px 24px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;
16gap:16px}.evaluation-templates-page .container-right .actions vedius-button{margin-bottom:20px}.evaluation-templates-page.is-small .container-left{min-width:auto;max-width:100%;background:#fff}.evaluation-templates-page.is-small .container-left vedius-tabs{width:100%}.evaluation-templates-page.is-small .container-left vedius-tabs .mat-mdc-tab-links{width:100%;padding-left:0;padding-right:0}.evaluation-templates-page.is-small .container-left vedius-tabs .mat-mdc-tab-links a{background:#fff;flex:1}.evaluation-templates-page.is-small .container-left .models-list-container app-vedius-evaluation-template-list{padding:0}.evaluation-templates-page.is-small .container-left .models-list-container app-vedius-evaluation-template-list vedius-simple-list{padding:8px 4px 16px 16px}.evaluation-templates-page.is-small .container-left .models-list-container app-vedius-evaluation-template-list .vedius-evaluation-template-list-not-found{padding:16px}.evaluation-templates-page.is-small .container-left .models-list-container app-evaluation-template-list{padding:0}.evaluation-templates-page.is-small .container-left .models-list-container app-evaluation-template-list vedius-simple-list{padding:8px 4px 16px 16px}.evaluation-templates-page.is-small .container-left .models-list-container app-evaluation-template-list vedius-simple-list .simple-list-item-content{margin-right:16px}.evaluation-templates-page.is-small .container-left .models-list-container app-evaluation-template-list .evaluation-template-list-not-found{padding:16px}.evaluation-templates-page.is-small .container-left .header-mobile{padding:12px 16px;border-bottom:1px #f5f6f8 solid}.evaluation-templates-page.is-small .container-left .header-mobile .title .title-wrapper{display:flex;flex-direction:row;width:100%}.evaluation-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button{display:flex;padding-left:12px;justify-content:center;align-items:center;align-self:stretch;cursor:pointer}.evaluation-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button mat-icon{width:24px;height:24px;stroke:#425168}.evaluation-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button mat-icon svg{stroke:#425168}.evaluation-templates-page.is-small .container-left .header-mobile .title .title-wrapper vedius-text{align-items:center;justify-content:center;display:flex;width:80%;color:#192840} 17`],encapsulation:2});let i=a;return i})();var Tn=(()=>{let a=class a{constructor(){this.selectedItemSubject=new st(void 0),this.selectedItem$=this.selectedItemSubject.asObservable(),this.loadItemsSubject=new it,this.loadItems$=this.loadItemsSubject.asObservable()}selectItem(e,t,n){this.selectedItemSubject.next({filter:e,itemKeySelected:t,totalPerPage:n})}load(){this.loadItemsSubject.next()}clear(){this.selectedItemSubject.next(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function fp(i,a){i&1&&(D(0),u(1,"span",7),C(2),p(3,"translate"),d(),R()),i&2&&(r(2),T(" ",_(3,1,"QUESTIONNAIRE_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_TITLE")," "))}function hp(i,a){if(i&1&&(u(0,"span",7),C(1),p(2,"translate"),p(3,"translate"),d(),u(4,"span",8),C(5),p(6,"translate"),p(7,"translate"),d()),i&2){let o=l(2);r(),T(" ",o.isFilterApplied?_(2,2,"QUESTIONNAIRE_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_TITLE"):_(3,4,"QUESTIONNAIRE_TEMPLATES_PAGE.EMPTY_TEMPLATE_TITLE")," "),r(4),T(" ",o.isFilterApplied?_(6,6,"QUESTIONNAIRE_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_DESCRIPTION"):_(7,8,"QUESTIONNAIRE_TEMPLATES_PAGE.EMPTY_TEMPLATE_DESCRIPTION")," ")}}function xp(i,a){if(i&1){let o=S();u(0,"vedius-button",9),x("onClick",function(){g(o);let t=l(2);return f(t.clearFilter())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"QUESTIONNAIRE_TEMPLATES_PAGE.CLEAR_FILTERS")," "))}function Cp(i,a){if(i&1){let o=S();u(0,"vedius-button",9),x("onClick",function(){g(o);let t=l(2);return f(t.createNewQuestionnaire())}),C(1),p(2,"translate"),d()}i&2&&(r(),T(" ",_(2,1,"QUESTIONNAIRE_TEMPLATES_PAGE.CREATE_QUESTIONNAIRE_BUTTON")," "))}function Ep(i,a){if(i&1&&(D(0),u(1,"li",3),y(2,"img",4),u(3,"div",5),E(4,fp,4,3,"ng-container",2)(5,hp,8,10,"ng-template",null,1,I),d(),E(7,xp,3,3,"vedius-button",6)(8,Cp,3,3,"vedius-button",6),d(),R()),i&2){let o=w(6),e=l();r(4),c("ngIf",e.isClinicEmptySelectionState)("ngIfElse",o),r(3),c("ngIf",e.isFilterApplied&&!e.isClinicEmptySelectionState),r(),c("ngIf",!e.isFilterApplied&&!e.isClinicEmptySelectionState)}}function Sp(i,a){if(i&1){let o=S();u(0,"div",10)(1,"vedius-simple-list",11),x("scrolled",function(){g(o);let t=l();return f(t.loadMoreItems())})("onItemSelected",function(t){g(o);let n=l();return f(n.itemSelected(t))}),d()()}if(i&2){let o=l();r(),c("data",o.listDataOptions)("fakeLoader",o.fakeLoaderOptions)("isLoading",o.isLoading)}}var cr=(()=>{let a=class a{constructor(e,t,n,s,m,h,O){this.service=e,this.listService=t,this.simpleListComponentService=n,this.cdr=s,this.appContext=m,this.newEvaluationQuestionnaireRouteStrategy=h,this.clinicCollaboratorsSelectionService=O,this.searchText="",this.isSmallScreen=!1,this.onSelected=new k,this.onPageChange=new k,this.onClearFilterClicked=new k,this.pageSize=Se.FIFTY,this.page=0,this.isLoading=!1,this.questionnaireTemplatePaginationFilter=At.empty(),this.listDataOptions=[],this.subscriptions=[],this.fakeLoaderOptions=Array(7).map((Q,H)=>({key:H.toString(),label:H.toString()}))}get isFilterApplied(){return!!this.questionnaireTemplatePaginationFilter.text}get listSize(){return this.listDataOptions.length}get userVedius(){return this.appContext.getUserCredential()?.userVedius}get isClinicEmptySelectionState(){return this.userVedius instanceof we&&this.professionalKeys!==void 0&&this.professionalKeys.length===0}ngOnChanges(e){e.searchText&&!e.searchText.firstChange&&this.searchingQuestionnaireTemplates(),e.professionalKeys&&!e.professionalKeys.firstChange&&this.reloadWithProfessionalKeys()}ngOnInit(){this.populatePaginationFilter(),this.listen()}populatePaginationFilter(){let e=this.userVedius,t;this.professionalKeys!==void 0?t=this.professionalKeys:(t=[e.key],e instanceof we&&(t=e.collaborators.map(n=>n.key))),this.questionnaireTemplatePaginationFilter.professionalKeys=t,this.questionnaireTemplatePaginationFilter.type=te.QUESTIONNAIRE}reloadWithProfessionalKeys(){this.populatePaginationFilter(),this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.loadQuestionnaireTemplates()}listen(){this.subscriptions=[this.listenSelectedItem(),this.listenLoadItem()]}listenSelectedItem(){return this.listService.selectedItem$.subscribe(e=>N(this,null,function*(){e&&(Ve()?this.loadItemsAndScroll(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected):this.loadItemsAndSelect(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected),this.cdr.detectChanges())}))}listenLoadItem(){return this.listService.loadItems$.subscribe(()=>N(this,null,function*(){yield this.loadQuestionnaireTemplates(),this.cdr.detectChanges()}))}searchingQuestionnaireTemplates(){this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.searchText?this.questionnaireTemplatePaginationFilter.text=this.searchText:this.questionnaireTemplatePaginationFilter.text=void 0,this.loadQuestionnaireTemplates()}loadQuestionnaireTemplates(e=0,t=!1){return new Promise((n,s)=>{if(this.shouldSkipBackendLoadForEmptyClinicSelection()){this.dataSource=ui.create(0,this.pageSize,e,[]),this.listDataOptions=[],this.page=e,this.onPageChange.emit({page:this.page,total:0}),n();return}this.isLoading=!0;let m=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.questionnaireTemplatePaginationFilter.isAllCollaboratorsSelected=this.clinicCollaboratorsSelectionService.isAllCollaboratorsSelected(this.questionnaireTemplatePaginationFilter.professionalKeys||[]),this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:m,filterOption:this.questionnaireTemplatePaginationFilter,orderOption:vt.from({titleOrder:xe.ASC})})}).then(h=>N(this,null,function*(){let O=e>0?[...this.dataSource?.data||[],...h.data]:[...h.data];this.dataSource=h,this.dataSource.setData(O),this.createSimpleListOptions(),this.page=e,!Ve()&&!t&&(yield this.selectFirstItem()),this.onPageChange.emit({page:this.page,total:this.dataSource.total}),n()})).catch(h=>{console.error(h),s()}).finally(()=>this.isLoading=!1)})}shouldSkipBackendLoadForEmptyClinicSelection(){return this.isClinicEmptySelectionState}createSimpleListOptions(){this.listDataOptions=this.dataSource?.data.map(e=>({key:e.key.value,label:e.title}))||[]}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadQuestionnaireTemplates(this.page+1,!0)}loadItemsAndSelect(e,t,n){this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.selectItem(n.value))})).catch(s=>console.error(s))}loadItemsAndScroll(e,t,n){this.isLoading=!0,this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.scrollAtItem(n.value))})).catch(s=>console.error(s))}loadInitialPage(e,t){return this.page=0,this.pageSize=e,this.questionnaireTemplatePaginationFilter=t,this.dataSource=void 0,this.listDataOptions=[],this.loadQuestionnaireTemplates(this.page)}itemSelected(e){let t=this.dataSource?.data.find(n=>n.key.value===e?.key);this.onSelected.emit({item:t})}
17clearFilter(){this.onClearFilterClicked.emit()}createNewQuestionnaire(){this.newEvaluationQuestionnaireRouteStrategy.createType(te.QUESTIONNAIRE).redirect()}clearSelection(){this.simpleListComponentService.clearAllChecked()}selectFirstItem(){return N(this,null,function*(){yield Ie(200);let e=this.dataSource?.data&&this.dataSource?.data.length>0?this.dataSource.data[0]:void 0;e&&this.selectListItem(e)})}selectListItem(e){this.simpleListComponentService.selectItem(e?.key.value,{scroll:!1})}ngOnDestroy(){this.listService.clear(),this.subscriptions.forEach(e=>e.unsubscribe())}};a.\u0275fac=function(t){return new(t||a)(v(Te),v(Tn),v(Ht),v(je),v(ct),v(xi),v(Bt))},a.\u0275cmp=P({type:a,selectors:[["app-questionnaire-template-list"]],inputs:{searchText:"searchText",isSmallScreen:"isSmallScreen",professionalKeys:"professionalKeys"},outputs:{onSelected:"onSelected",onPageChange:"onPageChange",onClearFilterClicked:"onClearFilterClicked"},features:[be],decls:3,vars:2,consts:[["list",""],["defaultTextState",""],[4,"ngIf","ngIfElse"],[1,"questionnaire-template-list-not-found"],["src","../../../../../assets/images/evaluation-and-questionnaire-not-found.svg","alt",""],[1,"text-container"],["variant","secondary",3,"onClick",4,"ngIf"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick"],[1,"questionnaire-template-list"],[3,"scrolled","onItemSelected","data","fakeLoader","isLoading"]],template:function(t,n){if(t&1&&E(0,Ep,9,4,"ng-container",2)(1,Sp,2,3,"ng-template",null,0,I),t&2){let s=w(2);c("ngIf",n.listSize===0&&!n.isLoading)("ngIfElse",s)}},dependencies:[j,K,Gt,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.questionnaire-template-list-not-found{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.questionnaire-template-list-not-found img{width:150px}.questionnaire-template-list-not-found .text-container{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-bottom:24px}.questionnaire-template-list-not-found .text-container span{max-width:382px;width:100%;text-align:center}.questionnaire-template-list-not-found .text-container span.title{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.4px}.questionnaire-template-list-not-found .text-container span.details{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.33px}.questionnaire-template-list{display:flex;width:100%;flex-direction:column}.questionnaire-template-list vedius-simple-list{width:100%}.questionnaire-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 275px)}@media screen and (max-width: 600px){.questionnaire-template-list vedius-simple-list{width:100%}.questionnaire-template-list vedius-simple-list .vedius-simple-list{height:70vh}} 18`],encapsulation:2});let i=a;return i})();var yn=(()=>{let a=class a{constructor(){this.selectedItemSubject=new st(void 0),this.selectedItem$=this.selectedItemSubject.asObservable(),this.loadItemsSubject=new it,this.loadItems$=this.loadItemsSubject.asObservable()}selectItem(e,t,n){this.selectedItemSubject.next({filter:e,itemKeySelected:t,totalPerPage:n})}load(){this.loadItemsSubject.next()}clear(){this.selectedItemSubject.next(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=G({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function Tp(i,a){if(i&1){let o=S();D(0),u(1,"li",2),y(2,"img",3),u(3,"div",4)(4,"span",5),C(5),p(6,"translate"),d(),u(7,"span",6),C(8),p(9,"translate"),d()(),u(10,"vedius-button",7),x("onClick",function(){g(o);let t=l();return f(t.clearFilter())}),C(11),p(12,"translate"),d()(),R()}i&2&&(r(5),T(" ",_(6,3,"QUESTIONNAIRE_TEMPLATES_PAGE.NO_VEDIUS_TEMPLATE_FOUND_TIT
18LE")," "),r(3),T(" ",_(9,5,"QUESTIONNAIRE_TEMPLATES_PAGE.NO_TEMPLATE_FOUND_DESCRIPTION")," "),r(3),T(" ",_(12,7,"QUESTIONNAIRE_TEMPLATES_PAGE.CLEAR_FILTERS")," "))}function yp(i,a){if(i&1){let o=S();u(0,"vedius-simple-list",8),x("scrolled",function(){g(o);let t=l();return f(t.loadMoreItems())})("onItemSelected",function(t){g(o);let n=l();return f(n.itemSelected(t))}),d()}if(i&2){let o=l();A("loading",o.isLoading),c("data",o.listDataOptions)("fakeLoader",o.fakeLoaderOptions)("isLoading",o.isLoading)}}var dr=(()=>{let a=class a{constructor(e,t,n,s){this.service=e,this.listService=t,this.simpleListComponentService=n,this.cdr=s,this.searchText="",this.onSelected=new k,this.onClearFilterClicked=new k,this.onPageChange=new k,this.pageSize=Se.FIFTY,this.page=0,this.isLoading=!1,this.vediusEvaluationQuestionnaireTemplatePaginationFilter=Ii.empty(),this.listDataOptions=[],this.pageLoaded=!1,this.fakeLoaderOptions=Array(7).map((m,h)=>({key:h.toString(),label:h.toString()}))}get listSize(){return this.listDataOptions.length}ngOnChanges(e){e.searchText&&!e.searchText.firstChange&&this.searchingVediusQuestionnaires()}ngOnInit(){this.populatePaginationFilter(),this.vediusSelectedItemSubscription=this.listService.selectedItem$.subscribe(e=>N(this,null,function*(){e&&(Ve()?this.loadItemsAndScroll(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected):this.loadItemsAndSelect(e.totalPerPage||this.pageSize,e.filter,e.itemKeySelected),this.cdr.detectChanges())})),this.loadItemsSubscriptions=this.listService.loadItems$.subscribe(()=>N(this,null,function*(){yield this.loadVediusQuestionnaires(),this.cdr.detectChanges()}))}populatePaginationFilter(){this.vediusEvaluationQuestionnaireTemplatePaginationFilter.type=te.QUESTIONNAIRE,this.vediusEvaluationQuestionnaireTemplatePaginationFilter.activated=!0}searchingVediusQuestionnaires(){this.dataSource=void 0,this.page=0,this.listDataOptions=[],this.simpleListComponentService.deselectAll(),this.searchText?this.vediusEvaluationQuestionnaireTemplatePaginationFilter.text=this.searchText:this.vediusEvaluationQuestionnaireTemplatePaginationFilter.text=void 0,this.loadVediusQuestionnaires()}loadVediusQuestionnaires(e=0,t=!1){return new Promise((n,s)=>{this.isLoading=!0;let m=this.page===e?void 0:e>this.page?this.dataSource?.nextLastItems:this.dataSource?.previousLastItems;this.service.getPaginatedEvaluationQuestionnaires({pagination:Fe.from({pageSize:this.pageSize,lastItems:m,filterOption:this.vediusEvaluationQuestionnaireTemplatePaginationFilter.isEmpty()?void 0:this.vediusEvaluationQuestionnaireTemplatePaginationFilter,orderOption:vt.from({titleOrder:xe.ASC})})}).then(h=>N(this,null,function*(){let O=e>0?[...this.dataSource?.data||[],...h.data]:[...h.data];this.dataSource=h,this.dataSource.setData(O),this.createSimpleListOptions(),this.page=e,!Ve()&&!t&&(yield this.selectFirstItem()),this.pageLoaded=!0,this.onPageChange.emit({page:this.page,total:this.dataSource.total}),n()})).catch(h=>{console.error(h),s()}).finally(()=>this.isLoading=!1)})}createSimpleListOptions(){this.listDataOptions=this.dataSource?.data.map(e=>({key:e.key.value,label:e.title}))||[]}loadMoreItems(){!this.dataSource?.isLastPage&&!this.isLoading&&this.loadVediusQuestionnaires(this.page+1,!0)}clearFilter(){this.onClearFilterClicked.emit()}itemSelected(e){let t=this.dataSource?.data.find(n=>n.key.value===e?.key);this.onSelected.emit({item:t})}loadItemsAndScroll(e,t,n){this.isLoading=!0,this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.scrollAtItem(n.value))})).catch(s=>console.error(s))}loadItemsAndSelect(e,t,n){this.loadInitialPage(e,t).then(()=>N(this,null,function*(){n&&(yield Ie(100),this.simpleListComponentService.selectItem(n.value))})).catch(s=>console.error(s))}loadInitialPage(e,t){return this.page=0,this.pageSize=e,this.vediusEvaluationQuestionnaireTemplatePaginationFilter=t,this.dataSource=void 0,this.listDataOptions=[],this.loadVediusQuestionnaires(this.page)}selectFirstItem(){return N(this,null,function*(){yield Ie(200);let e=this.dataSource?.data&&this.dataSource?.data.length>0?this.dataSource.data[0]:void 0;e&&this.selectListItem(e)})}selectListItem(e){this.simpleListComponentService.selectItem(e?.key.value)}ngOnDestroy(){this.listService.clear(),this.vediusSelectedItemSubscription?.unsubscribe(),this.loadItemsSub
18scriptions?.unsubscribe()}};a.\u0275fac=function(t){return new(t||a)(v(Le),v(yn),v(Ht),v(je))},a.\u0275cmp=P({type:a,selectors:[["app-vedius-questionnaire-template-list"]],inputs:{searchText:"searchText"},outputs:{onSelected:"onSelected",onClearFilterClicked:"onClearFilterClicked",onPageChange:"onPageChange"},features:[be],decls:3,vars:2,consts:[["list",""],[4,"ngIf","ngIfElse"],[1,"vedius-questionnaire-template-list-not-found"],["src","../../../../../assets/images/exercises-empty.svg","alt",""],[1,"text-container"],[1,"title"],[1,"details"],["variant","secondary",3,"onClick"],[3,"scrolled","onItemSelected","data","fakeLoader","isLoading"]],template:function(t,n){if(t&1&&E(0,Tp,13,9,"ng-container",1)(1,yp,1,5,"ng-template",null,0,I),t&2){let s=w(2);c("ngIf",n.listSize===0&&!n.isLoading&&n.pageLoaded)("ngIfElse",s)}},dependencies:[j,K,Gt,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}vedius-simple-list{width:100%;z-index:1}vedius-simple-list .vedius-simple-list{height:calc(100vh - 275px)}@media screen and (max-width: 600px){vedius-simple-list{width:100%}vedius-simple-list.loading{padding:16px!important}vedius-simple-list .vedius-simple-list{height:70vh}}.vedius-questionnaire-template-list-not-found{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.vedius-questionnaire-template-list-not-found img{width:150px}.vedius-questionnaire-template-list-not-found .text-container{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.vedius-questionnaire-template-list-not-found .text-container span{max-width:382px;width:100%;text-align:center}.vedius-questionnaire-template-list-not-found .text-container span.title{color:var(--neutral-dusk, #192840);text-align:center;font-family:DM Sans;font-size:1.25rem;font-style:normal;font-weight:500;line-height:30px;letter-spacing:-.41px}.vedius-questionnaire-template-list-not-found .text-container span.details{color:var(--neutral-darker, #425168);text-align:center;font-family:Inter;font-size:.875rem;font-style:normal;font-weight:500;line-height:160%;letter-spacing:-.33px}.vedius-questionnaire-template-list-not-found vedius-button{margin-top:24px} 19`],encapsulation:2});let i=a;return i})();function bp(i,a){i&1&&z(0)}function Ip(i,a){if(i&1){let o=S();u(0,"div",12)(1,"vedius-collaborator-selection-button",13),x("onFilterSelect",function(t){g(o);let n=l();return f(n.onCollaboratorFilterSelect(t))})("onLoad",function(t){g(o);let n=l();return f(n.onCollaboratorFilterSelect(t))}),d()()}if(i&2){let o=l();r(),c("initialSelected",o.initialCollaboratorSelected)}}function Op(i,a){if(i&1){let o=S();u(0,"vedius-tabs",14),x("onCustomChange",function(t){g(o);let n=l();return f(n.onTabChange(t))}),d()}if(i&2){let o=l();c("options",o.tabs)("activeId",o.activeId)}}function wp(i,a){if(i&1){let o=S();u(0,"div",25)(1,"vedius-button",26),x("onClick",function(){g(o);let t=l(2);return f(t.goToSendModal())}),C(2),p(3,"translate"),d(),u(4,"vedius-button",27),x("onClick",function(){g(o);let t=l(2);return f(t.goToChoosePatientForEvaluationAndQuestionnaireInPersonModal())}),C(5),p(6,"translate"),d()()}i&2&&(r(2),M(_(3,2,"QUESTIONNAIRE_TEMPLATES_PAGE.ACTIONS.SEND_LINK")),r(3),M(_(6,4,"QUESTIONNAIRE_TEMPLATES_PAGE.ACTIONS.REPLY_NOW")))}function Ap(i,a){if(i&1){let o=S();u(0,"div",15)(1,"div",16),y(2,"div",17),u(3,"div",18)(4,"vedius-button",19),x("onClick",function(){g(o);let t=l();return f(t.back())}),d()(),u(5,"div",20)(6,"div",21)(7,"vedius-text",22),C(8),p(9,"translate"),d()(),y(10,"app-evaluation-and-questionnaire-previews",23),d()(),E(11,wp,7,6,"div",24),d()}if(i&2){let o=l();r(8),M(_(9,6,"QUESTIONNAIRE_PREVIEW_TITLE")),r(2),c("evaluationAndQuestionnaire",o.questionnaireTemplateSelected)("enablePagination",!1)("isLoading",o.isLoading)("isSmall",o.isTabletScreen),r(),c("ngIf",o.questionnaireTemplateSelected)}}function Qp(i,a){if(i&1){let o=S();u(0,"header",28)(1,"div",29)(2,"div",30)(3,"a",31),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",32),C(5),p(6,"translate"),d(),u(7,"vedius-text",33),C(8),p(9,"translate"),d()()()()}i&2&&(r(5),T(" ",_(6,2,"QUESTIONNAIRE_TEMPLATES_PAGE.BACK")," "),r(3),T(" ",_(9,4,"QUESTIONNAIRE_TEMPLATES_PAGE.TITLE")," "))}function Mp(i,a){if(i&1){let o=S();u(0,"header",34)(1,"div",29)(2,"div",30)(3,"div",35),x("click",function(){g(o);let t=l();return f(t.back())}),y(4,"mat-icon",36),d(),u(5,"vedius-text",37),C(6),p(7,"translate"),d()()()()}i&2&&(r(6),T(" ",_(7,1,"QUESTIONNAIRE_TEMPLATES_PAGE.TITLE")," "))}var Tt=function(i){return i.VEDIUS_QUESTIONNAIRE_TEMPLATE="VEDIUS_QUESTIONNAIRE_TEMPLATE",i.QUESTIONNAIRE_TEMPLATE="QUESTIONNAIRE_TEMPLATE",i}(Tt||{}),Yn=(()=>{let a=class a{constructor(e,t,n,s,m,h,O,Q,H,ie,ge,fe,pe,Qe,Me,yt,bt,Jt,Zt){this.sidebarService=e,this.translationService=t,this.questionnaireService=n,this.vediusQuestionnaireService=s,this.userVediusContext=m,this.questionnaireTemplateListComponentService=h,this.vediusQuestionnaireTemplateListComponentService=O,this.breakpointObserver=Q,this.dialog=H,this.activatedRoute=ie,this.router=ge,this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy=fe,this.evaluationAndQuestionnaireRouteStrategy=pe,this.evaluationQuestionnaireListStorageService=Qe,this.userVediusReferenceKeyFactoryService=Me,this.patientService=yt,this.patientManagementRouteStrategy=bt,this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy=Jt,this.evolutionProgressTrackerService=Zt,this.activeId=Tt.VEDIUS_QUESTIONNAIRE_TEMPLATE,this.searchText="",this.isQuestionnaireLoading=!1,this.isVediusQuestionnaireLoading=!1,this.isSmallScreen=!1,this.isTabletScreen=!1,this.selectedProfessionalKeys=[],this.sidebarService.hide
19Sidebar(),this.evolutionProgressTrackerService.invisible();let Qt="";this.searchControl=new oi(Qt),this.searchText=Qt,this.searched=!!this.searchText;let It=this.router.getCurrentNavigation();if(It&&It.extras.state){let Ue=It.extras.state.queryParams;this.queryParametersBeforeNavigation=Ue}let tt=this.activatedRoute.snapshot.params.paciente_id;if(tt){this.backToPatientMedicalRecordRoute=!0;let Ue=this.userVediusReferenceKeyFactoryService.create(Pe.CLINIC_OR_DEFAULT_KEY);this.patientKey=_t.from(mt.fromUserVediusReferenceKey(Ue),Oe.fromString(tt))}}get questionnaireTemplateSelected(){return this.isActiveTab(Tt.VEDIUS_QUESTIONNAIRE_TEMPLATE)?this.vediusQuestionnaireSelected:this.questionnaireSelected}get userVedius(){return this.userVediusContext.current}get isClinicUser(){return this.userVedius instanceof we}get showCollaboratorDropdown(){let e=this.userVedius;return e instanceof we&&e.collaboratorsEnabled.length>1}get initialCollaboratorSelected(){return this.userVedius?[this.userVedius]:[]}get isLoading(){return this.questionnaireSelected?this.isQuestionnaireLoading:this.isVediusQuestionnaireLoading}ngOnInit(){this.selectedProfessionalKeys=this.userVedius?[this.userVedius.key]:[],this.listenSize(),this.createTabOptions(),this.listen()}onCollaboratorFilterSelect(e){let n=(Array.isArray(e)?e:[e]).map(h=>Vt.fromString(h.value)),s=n.map(h=>h.value),m=this.selectedProfessionalKeys.map(h=>h.value);kt(s,m)||(this.selectedProfessionalKeys=n)}ngAfterViewInit(){setTimeout(()=>{this.loadAll()})}listenSize(){this.breakpointObserver.observe([ne]).subscribe(e=>{this.isSmallScreen=e.matches}),this.breakpointObserver.observe([ni]).subscribe(e=>{this.isTabletScreen=e.matches})}loadAll(){this.loadVediusQuestionnaireTemplateList(),this.loadQuestionnaireTemplateList(),this.loadPatient()}loadVediusQuestionnaireTemplateList(){this.vediusQuestionnaireTemplateListComponentService.load()}loadQuestionnaireTemplateList(){this.questionnaireTemplateListComponentService.load()}loadPatient(){this.patientKey&&this.patientService.get({patientKey:this.patientKey}).then(e=>{this.patient=e||void 0}).catch(e=>console.log("Error to get patient in evaluation templates page",e))}listen(){this.searchControl.valueChanges.subscribe(e=>{e||this.onSearchClear()})}searchChanged(e){e&&(this.searchText=e,this.searched=!0)}onSearchClear(){this.searched&&(this.searched=!1,this.searchText="")}clearFilter(){this.searchControl.setValue("")}createTabOptions(){this.translationService.loaded().then(()=>{this.tabs=[{label:this.translationService.get(`${b.QuestionnaireTemplatesTabsLabel}.${Tt.VEDIUS_QUESTIONNAIRE_TEMPLATE}`),id:Tt.VEDIUS_QUESTIONNAIRE_TEMPLATE},{label:this.translationService.get(`${b.QuestionnaireTemplatesTabsLabel}.${Tt.QUESTIONNAIRE_TEMPLATE}`),id:Tt.QUESTIONNAIRE_TEMPLATE}];let e=this.activatedRoute.snapshot.queryParams.tab;e&&(this.activeId=this.getTabFromTranslation(e))})}getTabFromTranslation(e){let t=this.translationService.get(`${b.QuestionnaireTemplatesTabsLabel}.${Tt.QUESTIONNAIRE_TEMPLATE}`);return e===t?Tt.QUESTIONNAIRE_TEMPLATE:Tt.VEDIUS_QUESTIONNAIRE_TEMPLATE}back(){if(this.backToPatientMedicalRecordRoute){this.goToPatientMedicalRecordRoute();return}let e={relativeTo:this.activatedRoute,queryParams:this.queryParametersBeforeNavigation};this.router.navigate([".."],e)}onTabChange(e){this.activeId=e.id,this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{tab:this.translationService.get(`${b.QuestionnaireTemplatesTabsLabel}.${this.activeId}`)},queryParamsHandling:"merge"})}isActiveTab(e){return e===this.activeId}onQuestionnaireTemplateItemSelected(e){if(!e.item){this.questionnaireSelected=void 0;return}if(this.isSmallScreen){let t={evaluationQuestionnaireId:e.item.key.value,type:_e.QUESTIONNAIRE_TEMPLATE};this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy.redirect(JSON.stringify(t));return}this.isQuestionnaireLoading=!0,this.questionnaireService.get({evaluationQuestionnaireKey:e.item.key}).then(t=>{this.questionnaireSelected=t??void 0,setTimeout(()=>{let n=document.getElementById("scroll-top");n&&n.scrollIntoView({behavior:"smooth",block:"start"})},300)}).catch(t=>console.error(t)).finally(()=>this.isQuestionnaireLoading=!1)}onVediusQuestionnaireTemplateItemSelected(e){if(!e.item){this.vediusQuestionnaireSelected=void 0;return}if(this.isSmallScreen){let t={evaluationQuestionnaireId:e.item.key.value,type:_e.VEDIUS_QUESTIONNAIRE_TEMPLATE};this.evaluationQuestionnaireTemplateDetailsPageRouteStrategy.redirect(JSON.stringify(t));return}this.isVediusQuestionnaireLoading=!0,this.vediusQuestionnaireService.get({vediusEvaluationQuestionnaireKey:e.item.key}).then(t=>{this.vediusQuestionnaireSelected=t??void 0,setTimeout(()=>{let n=document.getElementById("scroll-top");n&&n.scrollIntoView({behavior:"smooth",block:"start"})},300)}).catch(t=>console.error(t)).finally(()=>this.isVediusQuestionnaireLoading=!1)}goToSendModal(){let e=this.questionnaireTemplateSelected instanceof ft,t=e?this.questionnaireTemplateSelected.key:void 0;this.questionnaireTemplateSelected&&this.dialog.open(xt,{width:"600px",data:{evaluationQuestionnaireKey:t,title:this.questionnaireTemplateSelected.title,numberOfQuestions:this.questionnaireTemplateSelected.questions.length,type:this.questionnaireTemplateSelected.type,template:e?void 0:this.questionnaireTemplateSelected,evaluationQuestionnaireSource:e?wt.USER:wt.PLATFORM,patientInfo:this.patient?.toInfo()}}).afterClosed().subscribe(n=>{n&&this.openShareSentEvaluationQuestionnaireModal(n)})}openShareSentEvaluationQuestionnaireModal(e){this.dialog.open(Ct,{width:"600px",data:{patientEvaluationQuestionnaireSent:e}}).afterClosed().subscribe(()=>{if(this.evaluationQuestionnaireListStorageService.cleanAndKeepPageSize(),this.backToPatientMedicalRecordRoute){this.goToPatientMedicalRecordRoute();return}else this.evaluationAndQuestionnaireRouteStrategy.setTab(me.HISTORY).redirect()})}goToChoosePatientForEvaluationAndQuestionnaireInPersonModal(){this.questionnaireTemplateSelected&&(this.patientKey?this.answerEvaluationAndQuestionnaireInPersonRouteFactoryStrategy.create({evaluationQuestionnaireKey:this.questionnaireTemplateSelected.key,title:this.questionnaireTemplateSelected.title,patientId:this.patientKey.patientKey.value,fromPatientScreen:this.backToPatientMedicalRecordRoute}).redirect():this.dialog.open(Xt,{width:"600px",data:{evaluationQuestionnaireKey:this.questionnaireTemplateSelected.key,title:this.questionnaireTemplateSelected.title,totalOfQuestions:this.questionnaireTemplateSelected.questions.length||0}}))}goToPatientMedicalRecordRoute(){this.patientManagementRouteStrategy.setConfig({patientManagementState:jt.Medical_Record,patient:this.patient}),this.patientManagementRouteStrategy.redirect(this.patientKey?.patientKey.value)}ngOnDestroy(){this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}};a.\u0275fac=function(t){return new(t||a)(v(Ye),v(J),v(Te),v(Le),v(re),v(Tn),v(yn),v(Z),v(le),v(Ne),v(ae),v(Cn),v(et),v(Ge),v(Re),v(ht),v(Kt),v(Yt),v(Xe))},a.\u0275cmp=P({type:a,selectors:[["app-questionnaire-templates"]],decls:16,vars:25,consts:[["headerDesktop",""],["headerMobile",""],[1,"questionnaire-templates-page"],[1,"container-left"],[4,"ngTemplateOutlet"],[1,"models-list-container"],["type","search",1,"search-input",3,"onSearch","onClear","placeholder","control","hint"],["class","collaborator-dropdown-wrapper",4,"ngIf"],[3,"options","activeId","onCustomChange",4,"ngIf"],[3,"onSelected","onPageChange","onClearFilterClicked","searchText"],[3,"onSelected","onPageChange","onClearFilterClicked","searchText","isSmallScreen","professionalKeys"],["class","container-right",4,"ngIf"],[1,"collaborator-dropdown-wrapper"],[3,"onFilterSelect","onLoad","initialSelected"],[3,"onCustomChange","options","activeId"],[1,"container-right"],[1,"content"],["id","scroll-top","id","scroll-top",2,"position","absolute","top","-2px"],["id","close-container-button",1,"close-container"],["size","small","variant","secondary","iconType","only","icon","close",3,"onClick"],[1,"questionnaire-template-details-container"],[1,"questionnaire-template-details-container-title"],["variant","text",1,"questionnaire-template-details-title"],[1,"app-evaluation-and-questionnaire-previews",3,"evaluationAndQuestionnaire","enablePagination","isLoading","isSmall"],["class","actions",4,"ngIf"],[1,"actions"],["variant","secondary",3,"onClick"],["variant","primary",3,"onClick"],[1,"header"],[1,"title"],[1,"title-wrapper"],["tabindex","0",3,"click"],["svgIcon","chevron-left"],["variant","text","size","xl"],[1,"header-mobile"],["tabindex","0",1,"control-button",3,"click"],["iconType","only","svgIcon","arrow-left"],["variant","text","size","md"]],template:function(t,n){if(t&1){let s=S();u(0,"div",2)(1,"div",3),E(2,bp,1,0,"ng-container",4),u(3,"div",5)(4,"vedius-input",6),p(5,"translate"),p(6,"translate"),x("onSearch",function(h){return g(s),f(n.searchChanged(h))})("onClear",function(){return g(s),f(n.onSearchClear())}),d(),E(7,Ip,2,1,"div",7)(8,Op,1,2,"vedius-tabs",8),u(9,"app-vedius-questionnaire-template-list",9),x("onSelected",function(h){return g(s),f(n.onVediusQuestionnaireTemplateItemSelected(h))})("onPageChange",function(h){return g(s),f(n.vediusQuestionnaireTemplateListPageData=h)})("onClearFilterClicked",function(){return g(s),f(n.clearFilter())}),d(),u(10,"app-questionnaire-template-list",10),x("onSelected",function(h){return g(s),f(n.onQuestionnaireTemplateItemSelected(h))})("onPageChange",function(h){return g(s),f(n.questionnaireTemplateListPageData=h)})("onClearFilterClicked",function(){return g(s),f(n.clearFilter())}),d()()(),E(11,Ap,12,8,"div",11),d(),E(12,Qp,10,6,"ng-template",null,0,I)(14,Mp,8,3,"ng-template",null,1,I)}if(t&2){let s=w(13),m=w(15);A("is-small",n.isSmallScreen)("questionnaire-templates-page--clinic",
19n.isClinicUser),r(2),c("ngTemplateOutlet",n.isSmallScreen?m:s),r(),A("searching",!!n.searchControl.value),r(),he("placeholder",_(5,21,"QUESTIONNAIRE_TEMPLATES_PAGE.SEARCH.LABEL")),he("hint",_(6,23,"SEARCH_INPUT.HINT")),c("control",n.searchControl),r(3),c("ngIf",n.showCollaboratorDropdown&&n.isActiveTab("QUESTIONNAIRE_TEMPLATE")),r(),c("ngIf",n.tabs),r(),A("hidden",!n.isActiveTab("VEDIUS_QUESTIONNAIRE_TEMPLATE")),c("searchText",n.searchText),r(),A("hidden",!n.isActiveTab("QUESTIONNAIRE_TEMPLATE")),c("searchText",n.searchText)("isSmallScreen",n.isSmallScreen)("professionalKeys",n.selectedProfessionalKeys),r(),c("ngIf",!n.isSmallScreen)}},dependencies:[ve,pt,j,vi,Je,dr,cr,K,$t,Ee,X,q,L],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.questionnaire-templates-page{background-color:#fff;min-height:100vh;display:flex;height:100%;position:relative}.questionnaire-templates-page .container-left{width:100%;min-width:484px;max-width:500px;background:#f5f6f8;border-right:1px #d3dae5 solid;display:flex;flex-direction:column;gap:24px;min-height:100vh;height:100%}@media screen and (min-width: 600px) and (max-width: 960px){.questionnaire-templates-page .container-left{min-width:50%;max-width:50%}}.questionnaire-templates-page .container-left .header{padding:24px 32px 0;display:flex;flex-direction:column;gap:1rem}.questionnaire-templates-page .container-left .header .title{display:flex;justify-content:space-between}.questionnaire-templates-page .container-left .header .title .title-wrapper{display:flex;flex-direction:column}.questionnaire-templates-page .container-left .header .title .title-wrapper a{stroke:#6b778c;color:#6b778c;text-decoration:none;display:flex;align-items:center;font-size:.875rem;font-family:DM Sans;font-weight:500;cursor:pointer}.questionnaire-templates-page .container-left .header .title vedius-text{color:#192840}.questionnaire-templates-page .container-left .models-list-container .search-input mat-form-field{padding:0 32px 12px;box-sizing:border-box}.questionnaire-templates-page .container-left .models-list-container .search-input .mdc-text-field--outlined{background:#fff}.questionnaire-templates-page .container-left .models-list-container .collaborator-dropdown-wrapper{padding:0 32px 12px;box-sizing:border-box}.questionnaire-templates-page .container-left .models-list-container app-vedius-questionnaire-template-list{height:100%;display:flex;padding:16px 4px 16px 16px}.questionnaire-templates-page .container-left .models-list-container app-questionnaire-template-list{width:100%;height:100%;display:flex;padding:16px 4px 16px 8px;box-sizing:border-box}.questionnaire-templates-page .container-left .models-list-container .mat-mdc-tab-links{gap:40px;padding-left:32px;padding-right:32px;margin-bottom:16px;border-bottom:1px #d3dae5 solid}.questionnaire-templates-page .container-left .models-list-container .mat-mdc-tab-links a{flex-grow:0;background:#f5f6f8}.questionnaire-templates-page .container-left .models-list-container vedius-tabs{width:250px}.questionnaire-templates-page .container-left .models-list-container .hidden{display:none}.questionnaire-templates-page .container-left .models-list-container.searching app-vedius-questionnaire-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 295px)}.questionnaire-templates-page .container-left .models-list-container.searching app-questionnaire-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 295px)}.questionnaire-templates-page .container-right{max-height:100vh;min-height:100vh;overflow:hidden;width:100%;height:100%;background:#fff;justify-content:flex-start;align-items:flex-start;gap:10px;display:inline-flex;flex-direction:column}.questionnaire-templates-page .container-right .content{position:relative;padding:24px 40px 100px;width:100%;display:flex;flex-direction:column;gap:24px;align-items:flex-start;justify-content:flex-start;flex:1;overflow:auto;box-sizing:border-box}.questionnaire-templates-page .container-right .content .close-container{width:100%;display:flex;justify-content:flex-end}.questionnaire-templates-page .container-right .content .questionnaire-template-details-container{width:100%;height:100%;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;gap:40px}.questionnaire-templates-page .container-right .content .questionnaire-template-details-container .questionnaire-template-details-container-title{display:flex;justify-content:flex-start;width:100%;max-width:858px}.questionnaire-templates-page .container-right .content .questionnaire-template-details-container .questionnaire-template-details-container-title .questionnaire-template-details-title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 30px);font-size:1.5rem;font-family:DM Sans;color:#192840;font-weight:500;line-height:30px}.questionnaire-templates-page .container-right .content .questionnaire-template-details-container app-evaluation-and-questionnaire-previews{min-width:858px;opacity:.7}@media screen and (min-width: 600px) and (max-width: 1450px){.questionnaire-templates-page .container-right .content .questionnaire-template-details-container app-evaluation-and-questionnaire-previews{min-width:100%;max-width:100%}}.questionnaire-templates-page .container-right .content .questionnaire-template-details-container .app-evaluation-and-questionnaire-previews:has(.loading){min-width:100%;display:flex;justify-content:center}.questionnaire-templates-page .container-right .actions{width:100vh;position:absolute;right:0;bottom:0;background:linear-gradient(180deg,#fff0,#fff);padding:16px 24px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;
19gap:16px}.questionnaire-templates-page .container-right .actions vedius-button{margin-bottom:20px}.questionnaire-templates-page.questionnaire-templates-page--clinic .container-left .models-list-container app-vedius-questionnaire-template-list vedius-simple-list .vedius-simple-list,.questionnaire-templates-page.questionnaire-templates-page--clinic .container-left .models-list-container app-questionnaire-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 330px)}.questionnaire-templates-page.questionnaire-templates-page--clinic .container-left .models-list-container.searching app-vedius-questionnaire-template-list vedius-simple-list .vedius-simple-list,.questionnaire-templates-page.questionnaire-templates-page--clinic .container-left .models-list-container.searching app-questionnaire-template-list vedius-simple-list .vedius-simple-list{height:calc(100vh - 350px)}.questionnaire-templates-page.is-small .container-left{min-width:auto;max-width:100%;background:#fff}.questionnaire-templates-page.is-small .container-left vedius-tabs{width:100%}.questionnaire-templates-page.is-small .container-left vedius-tabs .mat-mdc-tab-links{width:100%;padding-left:0;padding-right:0}.questionnaire-templates-page.is-small .container-left vedius-tabs .mat-mdc-tab-links a{background:#fff;flex:1}.questionnaire-templates-page.is-small .container-left .models-list-container app-vedius-questionnaire-template-list{padding:0}.questionnaire-templates-page.is-small .container-left .models-list-container app-vedius-questionnaire-template-list vedius-simple-list{padding:8px 4px 16px 16px}.questionnaire-templates-page.is-small .container-left .models-list-container app-vedius-questionnaire-template-list .vedius-questionnaire-template-list-not-found{padding:16px}.questionnaire-templates-page.is-small .container-left .models-list-container app-questionnaire-template-list{padding:0}.questionnaire-templates-page.is-small .container-left .models-list-container app-questionnaire-template-list vedius-simple-list{padding:8px 4px 16px 16px}.questionnaire-templates-page.is-small .container-left .models-list-container app-questionnaire-template-list vedius-simple-list .simple-list-item-content{margin-right:16px}.questionnaire-templates-page.is-small .container-left .models-list-container app-questionnaire-template-list .questionnaire-template-list-not-found{padding:16px}.questionnaire-templates-page.is-small .container-left .header-mobile{padding:12px 16px;border-bottom:1px #f5f6f8 solid}.questionnaire-templates-page.is-small .container-left .header-mobile .title .title-wrapper{display:flex;flex-direction:row;width:100%}.questionnaire-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button{display:flex;padding-left:12px;justify-content:center;align-items:center;align-self:stretch;cursor:pointer}.questionnaire-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button mat-icon{width:24px;height:24px;stroke:#425168}.questionnaire-templates-page.is-small .container-left .header-mobile .title .title-wrapper .control-button mat-icon svg{stroke:#425168}.questionnaire-templates-page.is-small .container-left .header-mobile .title .title-wrapper vedius-text{align-items:center;justify-content:center;display:flex;width:80%;color:#192840} 20`],encapsulation:2});let i=a;return i})();var tT=[{path:"",component:$a,canDeactivate:[]},{path:"nova-avaliacao-questionario",component:bi,canDeactivate:[Kn]},{path:"nova-avaliacao-questionario-modelo-vedius/:id",component:bi,canDeactivate:[Kn]},{path:"editar-avaliacao-questionario/:id",component:bi},{path:"modelos-de-avaliacao",component:Sn},{path:"modelos-de-avaliacao/:paciente_id",component:Sn},{path:"usar-modelo-de-avaliacao-vedius",component:Sn},{path:"modelos-de-questionario",component:Yn},{path:"modelos-de-questionario/:paciente_id",component:Yn},{path:"responder-avaliacao-questionario-presencial/:id/:paciente_id",component:$n,c
20anDeactivate:[Hn]},{path:"responder-avaliacao-questionario-presencial-modelo-vedius/:id/:paciente_id",component:$n,canDeactivate:[Hn]},{path:"avaliacao-questionario-respondido/:id/:paciente_id",component:ir},{path:"detalhes-do-modelo-de-avaliacao-questionario/:params",component:tr}];export{tT as EVALUATION_AND_QUESTIONNAIRE_ROUTES};
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.