PageSourceSearch

https://vitena.care/en/chunk-AERPW2CY.js

js vitena.care collected 2026-09-24 13:58:57 UTC 9,726 bytes, 1 lines download raw bytes

1import{a as B}from"./chunk-BYFI4LIL.js";import{B as K,E as q,c as z,e as W,j as D}from"./chunk-IU6AW6YZ.js";import"./chunk-QZYD6EK3.js";import{k as X}from"./chunk-NLNCJF7P.js";import"./chunk-4KC5VZEM.js";import{Ab as U,Ad as V,Bb as R,Cb as o,Db as _,Eb as f,Nb as S,Rb as E,Ua as c,Vb as m,Xb as r,Z as F,ca as d,da as g,fb as k,jc as A,kc as N,oa as C,qc as M,rc as P,sc as u,vb as T,wb as p,zb as I}from"./chunk-MEWEEZGC.js";import"./chunk-WYC6G435.js";var Q=(i,t)=>t.systemKey??t.id;function H(i,t){i&1&&(o(0,"div",19),f(1,"span",21),_());}function J(i,t){if(i&1){let e=S();o(0,"input",25),u("ngModelChange",function(n){d(e);let l=r(3);return P(l.draftTitle,n)||(l.draftTitle=n),g(n);}),_(),o(1,"textarea",26),u("ngModelChange",function(n){d(e);let l=r(3);return P(l.draftContent,n)||(l.draftContent=n),g(n);}),_(),o(2,"div",27)(3,"button",28),m("click",function(){d(e);let n=r().$implicit,l=r(2);return g(l.save(n));}),E(4,3),_(),o(5,"button",29),m("click",function(){d(e);let n=r(3);return g(n.cancelEdit());}),E(6,4),_()();}if(i&2){let e=r(3);M("ngModel",e.draftTitle),c(),M("ngModel",e.draftContent),c(2),R("disabled",e.saving()||e.draftTitle.trim().length===0||e.draftContent.trim().length===0);}}function Z(i,t){i&1&&(o(0,"span",32),E(1,6),_());}function ee(i,t){i&1&&(o(0,"span",32),E(1,7),_());}function te(i,t){if(i&1){let e=S();o(0,"button",36),m("click",function(){d(e);let n=r(3).$implicit,l=r(2);return g(l.remove(n));}),E(1,8),_();}}function ne(i,t){if(i&1){let e=S();o(0,"button",29),m("click",function(){d(e);let n=r(3).$implicit,l=r(2);return g(l.remove(n));}),E(1,9),_();}}function ie(i,t){if(i&1&&T(0,te,2,0,"button",34)(1,ne,2,0,"button",35),i&2){let e=r(2).$implicit;p(e.isCustom?0:1);}}function oe(i,t){if(i&1){let e=S();o(0,"div",30)(1,"strong",31),A(2),_(),T(3,Z,2,0,"span",32)(4,ee,2,0,"span",32),_(),o(5,"p",33),A(6),_(),o(7,"div",27)(8,"button",29),m("click",function(){d(e);let n=r().$implicit,l=r(2);return g(l.startEdit(n));}),E(9,5),_(),T(10,ie,2,1),_();}if(i&2){let e=r().$implicit;c(2),N(e.title),c(),p(e.hasOverride?3:e.isCustom?4:-1),c(3),N(e.content),c(4),p(e.id?10:-1);}}function _e(i,t){if(i&1&&(o(0,"li",22),T(1,J,7,3)(2,oe,11,4),_()),i&2){let e=t.$implicit,a=r(2);c(),p(a.editingKey()===a.keyOf(e)?1:2);}}function re(i,t){if(i&1){let e=S();o(0,"input",37),u("ngModelChange",function(n){d(e);let l=r(2);return P(l.draftTitle,n)||(l.draftTitle=n),g(n);}),_(),o(1,"textarea",38),u("ngModelChange",function(n){d(e);let l=r(2);return P(l.draftContent,n)||(l.draftContent=n),g(n);}),_(),o(2,"div",27)(3,"button",28),m("click",function(){d(e);let n=r(2);return g(n.create());}),E(4,10),_(),o(5,"button",29),m("click",function(){d(e);let n=r(2);return g(n.cancelEdit());}),E(6,11),_()();}if(i&2){let e=r(2);M("ngModel",e.draftTitle),c(),M("ngModel",e.draftContent),c(2),R("disabled",e.saving()||e.draftTitle.trim().length===0||e.draftContent.trim().length===0);}}function le(i,t){if(i&1){let e=S();o(0,"button",39),m("click",function(){d(e);let n=r(2);return g(n.startCreate());}),f(1,"i",40),o(2,"span"),E(3,12),_()();}}function ae(i,t){if(i&1&&(o(0,"ul",20),I(1,_e,3,1,"li",22,Q),o(3,"li",23),T(4,re,7,3)(5,le,4,0,"button",24),_()()),i&2){let e=r();c(),U(e.templates()),c(3),p(e.creating()?4:5);}}var j=class i{conversations=F(B);templates=C([]);loading=C(!0);saving=C(!1);editingKey=C(null);creating=C(!1);draftTitle="";draftContent="";ngOnInit(){this.load();}keyOf(t){return t.systemKey??t.id??"";}load(){this.conversations.getTemplates().subscribe({next:t=>{this.templates.set(t),this.loading.set(!1);},error:()=>this.loading.set(!1)});}startEdit(t){this.creating.set(!1),this.editingKey.set(this.keyOf(t)),this.draftTitle=t.title,this.draftContent=t.content;}startCreate(){this.editingKey.set(null),this.creating.set(!0),this.draftTitle="",this.draftContent="";}cancelEdit(){this.editingKey.set(null),this.creating.set(!1),this.draftTitle="",this.draftContent="";}save(t){if(this.saving())return;this.saving.set(!0),(t.systemKey?this.conversations.saveSeedOverride(t.systemKey,this.draftTitle,this.draftContent):this.conversations.updateTemplate(t.id,this.draftTitle,this.draftContent)).subscribe({next:()=>{this.saving.set(!1),this.cancelEdit(),this.load();},error:()=>this.saving.set(!1)});}create(){this.saving()||(this.saving.set(!0),this.conversations.createTemplate(this.draftTitle,this.draftContent).subscribe({next:()=>{this.saving.set(!1),this.cancelEdit(),this.load();},error:()=>this.saving.set(!1)}));}remove(t){t.id&&this.conversations.deleteTemplate(t.id).subscribe({next:()=>this.load(),error:()=>{}});}static ɵfac=function(e){return new(e||i)();};static ɵcmp=k({type:i,selectors:[["app-reply-templates"]],decls:12,vars:1,consts:()=>{let t;t="Messages";let e;e="Quick replies";let a;a=" The answers you give over and over. Pick one while writing a reply and it drops into the box, still editable \u2014 the parts in brackets are yours to fill in. ";let n;n="What is this reply for?";let l;l="Save";let L;L="Cancel";let O;O="Edit";let y;y="edited";let x;x="yours";let h;h="Delete";let b;b="Reset to original";let v;v="What is this reply for?";let $;$="The reply itself\u2026";let w;w="Add";let G;G="Cancel";let Y;return Y="New quick reply",[t,e,a,l,L,O,y,x,h,b,w,G,Y,[1,"rt-page"],[1,"rt-head"],["routerLink","/app/messages",1,"rt-back"],[1,"bi","bi-chevron-left"],[1,"rt-title"],[1,"rt-intro"],[1,"rt-loading"],[1,"rt-list"],[1,"rt-spinner"],[1,"rt-item"],[1,"rt-item","rt-item--new"],["type","button",1,"rt-btn","rt-btn--ghost"],["type","text","name","title","maxlength","120","placeholder",n,1,"rt-input",3,"ngModelChange","ngModel"],["rows","4","name","content",1,"rt-input","rt-textarea",3,"ngModelChange","ngModel"],[1,"rt-actions"],["type","button",1,"rt-btn","rt-btn--primary",3,"click","disabled"],["type","button",1,"rt-btn",3,"click"],[1,"rt-item-head"],[1,"rt-item-title"],[1,"rt-tag"],[1,"rt-item-body"],["type","button",1,"rt-btn","rt-btn--danger"],["type","button",1,"rt-btn"],["type","button",1,"rt-btn","rt-btn--danger",3,"click"],["type","text","name","newTitle","maxlength","120","placeholder",v,1,"rt-input",3,"ngModelChange","ngModel"],["rows","4","name","newContent","placeholder",$,1,"rt-input","rt-textarea",3,"ngModelChange","ngModel"],["type","button",1,"rt-btn","rt-btn--ghost",3,"click"],[1,"bi","bi-plus-lg"]];},template:function(e,a){e&1&&(o(0,"div",13)(1,"header",14)(2,"a",15),f(3,"i",16),o(4,"span"),E(5,0),_()(),o(6,"h1",17),E(7,1),_()(),o(8,"p",18),E(9,2),_(),T(10,H,2,0,"div",19)(11,ae,6,1,"ul",20),_()),e&2&&(c(10),p(a.loading()?10:11));},dependencies:[V,q,z,W,K,D,X],styles:[".rt-page[_ngcontent-%COMP%]{max-width:720px;margin:0 auto;padding:.5rem}.rt-head[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.5rem}.rt-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;color:var(--color-primary);text-decoration:none;font-size:.88rem;align-self:flex-start}.rt-title[_ngcontent-%COMP%]{font-size:1.3rem;font-weight:700;color:var(--color-text);margin:0}.rt-intro[_ngcontent-%COMP%]{color:var(--color-text-light);font-size:.9rem;margin:0 0 1.25rem}.rt-loading[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:3rem 0}.rt-spinner[_ngcontent-%COMP%]{width:30px;height:30px;border:3px solid var(--color-gray-200);border-top-color:var(--color-primary);border-radius:50%;animation:_ngcontent-%COMP%_rt-spin .9s linear infinite}@keyframes _ngcontent-%COMP%_rt-spin{to{transform:rotate(360deg)}}.rt-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.6rem}.rt-item[_ngcontent-%COMP%]{background:var(--color-bg);border:1px solid var(--color-gray-200);border-radius:var(--radius-lg);padding:.9rem 1rem;display:flex;flex-direction:column;gap:.45rem}.rt-item--new[_ngcontent-%COMP%]{align-items:flex-start}.rt-item-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.rt-item-title[_ngcontent-%COMP%]{color:var(--color-text);font-size:.95rem}.rt-tag[_ngcontent-%COMP%]{font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-primary);border:1px solid var(--color-primary);border-radius:var(--radius-full);padding:.05rem .45rem}.rt-item-body[_ngcontent-%COMP%]{margin:0;color:var(--color-text-light);font-size:.88rem;white-space:pre-wrap}.rt-input[_ngcontent-%COMP%]{width:100%;background:var(--color-bg);color:var(--color-text);border:1px solid var(--color-gray-300);border-radius:var(--radius);padding:.5rem .65rem;font-size:.9rem;font-family:inherit}.rt-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.15)}.rt-textarea[_ngcontent-%COMP%]{resize:vertical}.rt-actions[_ngcontent-%COMP%]{display:flex;gap:.4rem;flex-wrap:wrap}.rt-btn[_ngcontent-%COMP%]{background:none;border:1px solid var(--color-gray-300);border-radius:var(--radius);padding:.35rem .8rem;font-size:.83rem;color:var(--color-text-light);cursor:pointer;display:inline-flex;align-items:center;gap:.35rem;transition:border-color var(--transition),color var(--transition)}.rt-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-primary);color:var(--color-primary)}.rt-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.rt-btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.rt-btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-dark);color:#fff}.rt-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-error);color:var(--color-error)}.rt-btn--ghost[_ngcontent-%COMP%]{border-style:dashed}"]});};export{j as ReplyTemplatesComponent};/**i18n:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855*/

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.