@veltdev/sdk 4.5.6-beta.2 → 4.5.6-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/velt.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.5.6-beta.2",
3
+ "version": "4.5.6-beta.3",
4
4
  "description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
5
5
  "homepage": "https://velt.dev",
6
6
  "keywords": [
package/velt.js CHANGED
@@ -1,4 +1,4 @@
1
- var SNIPPYLY_VERSION = '4.5.6-beta.2';
1
+ var SNIPPYLY_VERSION = '4.5.6-beta.3';
2
2
  (function(m,w){"use strict";function rt(){var e=K.splice(0,K.length);for(ie=0;e.length;)e.shift().call(null,e.shift())}function me(e,t){for(var n=0,r=e.length;n<r;n++)Te(e[n],t)}function ot(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],U(t,q[pe(t)])}function fe(e){return function(t){Lt(t)&&(Te(t,e),L.length&&me(t.querySelectorAll(L),e))}}function pe(e){var t=le.call(e,"is"),n=e.nodeName.toUpperCase(),r=v.call(D,t?Y+t.toUpperCase():x+n);return t&&-1<r&&!De(n,t)?-1:r}function De(e,t){return-1<L.indexOf(e+'[is="'+t+'"]')}function Ie(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[W]||2,a=e[He]||3;!ce||o&&o!==t||!t[y]||r==="style"||e.prevValue===e.newValue&&(e.newValue!==""||n!==l&&n!==a)||t[y](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function Fe(e){var t=fe(e);return function(n){K.push(t,n.target),ie&&clearTimeout(ie),ie=setTimeout(rt,1)}}function de(e){nt&&(nt=!1,e.currentTarget.removeEventListener(Ze,de)),L.length&&me((e.target||u).querySelectorAll(L),e.detail===E?E:b),R&&at()}function lt(e,t){var n=this;Ye.call(n,e,t),Me.call(n,{target:n})}function Se(e,t,n){var r=t.apply(e,n),o=pe(r);return-1<o&&U(r,q[o]),n.pop()&&L.length&&ot(r.querySelectorAll(L)),r}function he(e,t){Tt(e,t),$?$.observe(e,gt):(ue&&(e.setAttribute=lt,e[H]=Ee(e),e[g](st,Me)),e[g](N,Ie)),e[k]&&ce&&(e.created=!0,e[k](),e.created=!1)}function at(){for(var e,t=0,n=G.length;t<n;t++)e=G[t],V.contains(e)||(n--,G.splice(t--,1),Te(e,E))}function Ve(e){throw new Error("A "+e+" type is already registered")}function Te(e,t){var n,r,o=pe(e);-1<o&&!Mt.call(e,"TEMPLATE")&&(Q(e,q[o]),o=0,t!==b||e[b]?t!==E||e[E]||(e[b]=!1,e[E]=!0,r="disconnected",o=1):(e[E]=!1,e[b]=!0,r="connected",o=1,R&&v.call(G,e)<0&&G.push(e)),o&&(n=e[t+O]||e[r+O])&&n.call(e))}function z(){}function Pe(e,t,n){var r=n&&n[_]||"",o=t.prototype,l=Ce(o),a=t.observedAttributes||ye,s={prototype:l};oe(l,k,{value:function(){if(te)te=!1;else if(!this[B]){this[B]=!0,new t(this),o[k]&&o[k].call(this);var i=j[ne.get(t)];(!Z||i.create.length>1)&&_e(this)}}}),oe(l,y,{value:function(i){-1<v.call(a,i)&&o[y]&&o[y].apply(this,arguments)}}),o[qe]&&oe(l,ut,{value:o[qe]}),o[Be]&&oe(l,ct,{value:o[Be]}),r&&(s[_]=r),e=e.toUpperCase(),j[e]={constructor:t,create:r?[r,re(e)]:[e]},ne.set(t,e),u[S](e.toLowerCase(),s),Le(e),P[e].r()}function Re(e){var t=j[e.toUpperCase()];return t&&t.constructor}function Ue(e){return typeof e=="string"?e:e&&e.is||""}function _e(e){for(var t,n=e[y],r=n?e.attributes:ye,o=r.length;o--;)t=r[o],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function Le(e){return e=e.toUpperCase(),e in P||(P[e]={},P[e].p=new Xe(function(t){P[e].r=t})),P[e].p}function ke(){C&&delete m.customElements,I(m,"customElements",{configurable:!0,value:new z}),I(m,"CustomElementRegistry",{configurable:!0,value:z});for(var e=it.get(/^HTML[A-Z]*[a-z]/),t=e.length;t--;function(n){var r=m[n];if(r){m[n]=function(o){var l,a;return o||(o=this),o[B]||(te=!0,l=j[ne.get(o.constructor)],a=Z&&l.create.length===1,o=a?Reflect.construct(r,ye,l.constructor):u.createElement.apply(u,l.create),o[B]=!0,te=!1,a||_e(o)),o},m[n].prototype=r.prototype;try{r.prototype.constructor=m[n]}catch{dt=!0,I(r,B,{value:m[n]})}}}(e[t]));u.createElement=function(n,r){var o=Ue(r);return o?Ae.call(this,n,re(o)):Ae.call(this,n)},et||(Oe=!0,u[S](""))}var u=m.document,T=m.Object,it=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(p){var f,h=[];for(f in i)p.test(f)&&h.push(f);return h},s=function(p,f){(f=f.toLowerCase())in i||(i[p]=(i[p]||[]).concat(f),i[f]=i[f.toUpperCase()]=p)},i=(T.create||T)(null),c={};for(n in e)for(o in e[n])for(r=e[n][o],i[o]=r,t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return c.get=function(p){return typeof p=="string"?i[p]||(l.test(p)?[]:""):a(p)},c.set=function(p,f){return l.test(p)?s(p,f):s(f,p),c},c}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});typeof w!="object"&&(w={type:w||"auto"});var K,Me,X,Ee,$,ve,Q,U,A,S="registerElement",xe=1e5*m.Math.random()>>0,H="__"+S+xe,g="addEventListener",b="attached",O="Callback",E="detached",_="extends",y="attributeChanged"+O,ut=b+O,qe="connected"+O,Be="disconnected"+O,k="created"+O,ct=E+O,W="ADDITION",He="REMOVAL",N="DOMAttrModified",Ze="DOMContentLoaded",st="DOMSubtreeModified",x="<",Y="=",mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ft=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],D=[],q=[],L="",V=u.documentElement,v=D.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ge=T.prototype,be=ge.hasOwnProperty,J=ge.isPrototypeOf,I=T.defineProperty,ye=[],ee=T.getOwnPropertyDescriptor,je=T.getOwnPropertyNames,pt=T.getPrototypeOf,Ge=T.setPrototypeOf,ze=!!T.__proto__,dt=!1,B="__dreCEv1",C=m.customElements,Z=!/^force/.test(w.type)&&!!(C&&C.define&&C.get&&C.whenDefined),Ke=T.create||T,ht=m.Map||function(){var e,t=[],n=[];return{get:function(r){return n[v.call(t,r)]},set:function(r,o){e=v.call(t,r),e<0?n[t.push(r)-1]=o:n[e]=o}}},Xe=m.Promise||function(e){function t(l){for(r=!0;n.length;)n.shift()(l)}var n=[],r=!1,o={catch:function(){return o},then:function(l){return n.push(l),r&&setTimeout(t,1),o}};return e(t),o},te=!1,j=Ke(null),P=Ke(null),ne=new ht,re=function(e){return e.toLowerCase()},Ce=T.create||function e(t){return t?(e.prototype=t,new e):this},Tt=Ge||(ze?function(e,t){return e.__proto__=t,e}:je&&ee?function(){function e(t,n){for(var r,o=je(n),l=0,a=o.length;l<a;l++)r=o[l],be.call(t,r)||I(t,r,ee(n,r))}return function(t,n){do e(t,n);while((n=pt(n))&&!J.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),F=m.MutationObserver||m.WebKitMutationObserver,$e=m.HTMLAnchorElement,d=(m.HTMLElement||m.Element||m.Node).prototype,R=!J.call(d,V),oe=R?function(e,t,n){return e[t]=n.value,e}:I,Lt=R?function(e){return e.nodeType===1}:function(e){return J.call(d,e)},G=R&&[],Qe=d.attachShadow,We=d.cloneNode,Mt=d.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},we=d.dispatchEvent,le=d.getAttribute,Et=d.hasAttribute,vt=d.removeAttribute,Ye=d.setAttribute,ae=u.createElement,Ht=u.importNode,Ae=ae,gt=F&&{attributes:!0,characterData:!0,attributeOldValue:!0},Je=F||function(e){ue=!1,V.removeEventListener(N,Je)},ie=0,et=S in u&&!/^force-all/.test(w.type),tt=!0,Oe=!1,ue=!0,nt=!0,ce=!0;if(F&&(A=u.createElement("div"),A.innerHTML="<div><div></div></div>",new F(function(e,t){if(e[0]&&e[0].type=="childList"&&!e[0].removedNodes[0].childNodes.length){A=ee(d,"innerHTML");var n=A&&A.set;n&&I(d,"innerHTML",{set:function(r){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,r)}})}t.disconnect(),A=null}).observe(A,{childList:!0,subtree:!0}),A.innerHTML=""),et||(Ge||ze?(Q=function(e,t){J.call(t,e)||he(e,t)},U=he):(Q=function(e,t){e[H]||(e[H]=T(!0),he(e,t))},U=Q),R?(ue=!1,function(){var e=ee(d,g),t=e.value,n=function(l){var a=new CustomEvent(N,{bubbles:!0});a.attrName=l,a.prevValue=le.call(this,l),a.newValue=null,a[He]=a.attrChange=2,vt.call(this,l),we.call(this,a)},r=function(l,a){var s=Et.call(this,l),i=s&&le.call(this,l),c=new CustomEvent(N,{bubbles:!0});Ye.call(this,l,a),c.attrName=l,c.prevValue=s?i:null,c.newValue=a,s?c.MODIFICATION=c.attrChange=1:c[W]=c.attrChange=0,we.call(this,c)},o=function(l){var a,s=l.currentTarget,i=s[H],c=l.propertyName;i.hasOwnProperty(c)&&(i=i[c],a=new CustomEvent(N,{bubbles:!0}),a.attrName=i.name,a.prevValue=i.value||null,a.newValue=i.value=s[c]||null,a.prevValue==null?a[W]=a.attrChange=0:a.MODIFICATION=a.attrChange=1,we.call(s,a))};e.value=function(l,a,s){l===N&&this[y]&&this.setAttribute!==r&&(this[H]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",o)),t.call(this,l,a,s)},I(d,g,e)}()):F||(V[g](N,Je),V.setAttribute(H,1),V.removeAttribute(H),ue&&(Me=function(e){var t,n,r,o=this;if(o===e.target){t=o[H],o[H]=n=Ee(o);for(r in n){if(!(r in t))return X(0,o,r,t[r],n[r],W);if(n[r]!==t[r])return X(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return X(2,o,r,t[r],n[r],He)}},X=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,Ie(a)},Ee=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)t=o[l],(n=t.name)!=="setAttribute"&&(r[n]=t.value);return r})),u[S]=function(e,t){if(n=e.toUpperCase(),tt&&(tt=!1,F?($=function(i,c){function p(f,h){for(var M=0,se=f.length;M<se;h(f[M++]));}return new F(function(f){for(var h,M,se,Ne=0,bt=f.length;Ne<bt;Ne++)h=f[Ne],h.type==="childList"?(p(h.addedNodes,i),p(h.removedNodes,c)):(M=h.target,ce&&M[y]&&h.attributeName!=="style"&&(se=le.call(M,h.attributeName))!==h.oldValue&&M[y](h.attributeName,h.oldValue,se))})}(fe(b),fe(E)),ve=function(i){return $.observe(i,{childList:!0,subtree:!0}),i},ve(u),Qe&&(d.attachShadow=function(){return ve(Qe.apply(this,arguments))})):(K=[],u[g]("DOMNodeInserted",Fe(b)),u[g]("DOMNodeRemoved",Fe(E))),u[g](Ze,de),u[g]("readystatechange",de),u.importNode=function(i,c){switch(i.nodeType){case 1:return Se(u,Ht,[i,!!c]);case 11:for(var p=u.createDocumentFragment(),f=i.childNodes,h=f.length,M=0;M<h;M++)p.appendChild(u.importNode(f[M],!!c));return p;default:return We.call(i,!!c)}},d.cloneNode=function(i){return Se(this,We,[!!i])}),Oe)return Oe=!1;if(-2<v.call(D,Y+n)+v.call(D,x+n)&&Ve(e),!mt.test(n)||-1<v.call(ft,n))throw new Error("The type "+e+" is invalid");var n,r,o=function(){return a?u.createElement(s,n):u.createElement(s)},l=t||ge,a=be.call(l,_),s=a?t[_].toUpperCase():n;return a&&-1<v.call(D,x+s)&&Ve(s),r=D.push((a?Y:x)+n)-1,L=L.concat(L.length?",":"",a?s+'[is="'+e.toLowerCase()+'"]':s),o.prototype=q[r]=be.call(l,"prototype")?l.prototype:Ce(d),L.length&&me(u.querySelectorAll(L),b),o},u.createElement=Ae=function(e,t){var n=Ue(t),r=n?ae.call(u,e,re(n)):ae.call(u,e),o=""+e,l=v.call(D,(n?Y:x)+(n||o).toUpperCase()),a=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=De(o.toUpperCase(),n))),ce=!u.createElement.innerHTMLHelper,a&&U(r,q[l]),r}),addEventListener("beforeunload",function(){delete u.createElement,delete u.importNode,delete u[S]},!1),z.prototype={constructor:z,define:Z?function(e,t,n){if(n)Pe(e,t,n);else{var r=e.toUpperCase();j[r]={constructor:t,create:[r]},ne.set(t,r),C.define(e,t)}}:Pe,get:Z?function(e){return C.get(e)||Re(e)}:Re,whenDefined:Z?function(e){return Xe.race([C.whenDefined(e),Le(e)])}:Le},!C||/^force/.test(w.type))ke();else if(!w.noBuiltIn)try{(function(e,t,n){var r=new RegExp(`^<a\\s+is=('|")`+n+"\\1></a>$");if(t[_]="a",e.prototype=Ce($e.prototype),e.prototype.constructor=e,m.customElements.define(n,e,t),!r.test(u.createElement("a",{is:n}).outerHTML)||!r.test(new e().outerHTML))throw t})(function e(){return Reflect.construct($e,[],e)},{},"document-register-element-a"+xe)}catch{ke()}if(!w.noBuiltIn)try{if(ae.call(u,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{re=function(t){return{is:t.toLowerCase()}}}})(window);
3
3
 
4
4
  var p1e=Object.create;var UO=Object.defineProperty,g1e=Object.defineProperties,u1e=Object.getOwnPropertyDescriptor,h1e=Object.getOwnPropertyDescriptors,f1e=Object.getOwnPropertyNames,VO=Object.getOwnPropertySymbols,KW=Object.getPrototypeOf,e8=Object.prototype.hasOwnProperty,ZW=Object.prototype.propertyIsEnumerable,v1e=Reflect.get;var YW=(i,o,n)=>o in i?UO(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,I=(i,o)=>{for(var n in o||={})e8.call(o,n)&&YW(i,n,o[n]);if(VO)for(var n of VO(o))ZW.call(o,n)&&YW(i,n,o[n]);return i},T=(i,o)=>g1e(i,h1e(o));var Z_=(i,o)=>{var n={};for(var e in i)e8.call(i,e)&&o.indexOf(e)<0&&(n[e]=i[e]);if(i!=null&&VO)for(var e of VO(i))o.indexOf(e)<0&&ZW.call(i,e)&&(n[e]=i[e]);return n};var C1e=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),jO=(i,o)=>{for(var n in o)UO(i,n,{get:o[n],enumerable:!0})},_1e=(i,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of f1e(o))!e8.call(i,t)&&t!==n&&UO(i,t,{get:()=>o[t],enumerable:!(e=u1e(o,t))||e.enumerable});return i};var XW=(i,o,n)=>(n=i!=null?p1e(KW(i)):{},_1e(o||!i||!i.__esModule?UO(n,"default",{value:i,enumerable:!0}):n,i));var op=(i,o,n)=>v1e(KW(i),n,o);var Q=(i,o,n)=>new Promise((e,t)=>{var r=c=>{try{s(n.next(c))}catch(p){t(p)}},a=c=>{try{s(n.throw(c))}catch(p){t(p)}},s=c=>c.done?e(c.value):Promise.resolve(c.value).then(r,a);s((n=n.apply(i,o)).next())});var gW=C1e((Jyo,pW)=>{"use strict";var Et={};Et.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};Et.localCName=Et.generateIdentifier();Et.splitLines=function(i){return i.trim().split(`
@@ -533,7 +533,7 @@ This typically indicates that your device does not have a healthy Internet conne
533
533
  <velt-autocomplete-chip type="group" group='${g?.groupId?JSON.stringify(g||{}):void 0}' encoded-group='${g?.groupId?btoa(JSON.stringify(g||{})):void 0}' shadow-dom='${s?"true":"false"}'>
534
534
  </velt-autocomplete-chip>`)}}),e&&a?.length&&(a.filter((C,E,D)=>D.findIndex(L=>L.text===C.text)===E).forEach(C=>{if(C?.text){let E=new RegExp(Md(C.text),"g");e=e.replaceAll(E,D=>`
535
535
  <velt-autocomplete-chip type="contact" contact='${C?.contact?JSON.stringify(C||{}):void 0}' encoded-contact='${C?.contact?btoa(JSON.stringify(C||{})):void 0}' shadow-dom='${s?"true":"false"}'>
536
- </velt-autocomplete-chip>`)}}),(a?.filter(C=>!C.text).filter((C,E,D)=>D.findIndex(L=>L.userId===C.userId)===E)).forEach(C=>{if(C?.userId){let E=new RegExp(Md(`{{${C.userId}}}`),"g");e=e.replaceAll(E,D=>`<velt-autocomplete-chip type="loading" shadow-dom='${s?"true":"false"}'></velt-autocomplete-chip>`)}})),e}catch{return e}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"replaceAutocompleteList",type:o,pure:!0,standalone:!1});let i=o;return i})();var h_e=(()=>{let o=class o{set _hotkey(e){try{this.hotkey=e,this.setListData()}catch{}}set _listData(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.listData=t,this.setListData()}catch{}}constructor(e,t){this.autocompleteService=e,this.loggingService=t,this.hotkey="",this.listData=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteComponent","color: blue;")}catch(r){this.loggingService.catch("Error in AutocompleteComponent constructor: ",r)}}setListData(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: setListData","color: green;"),this.hotkey&&this.listData?.length&&this.autocompleteService.create({hotkey:this.hotkey,data:this.listData,type:"custom"})}catch(e){this.loggingService.catch("Error in AutocompleteComponent setListData: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: OnDestroy","color: green;"),this.hotkey&&this.autocompleteService.remove(this.hotkey)}catch(e){this.loggingService.catch("Error in AutocompleteComponent OnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(gl),h(y))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-internal"]],inputs:{_hotkey:[0,"hotkey","_hotkey"],_listData:[0,"listData","_listData"]},standalone:!1,decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Rg=(()=>{let o=class o{constructor(e,t){this.domService=e,this.sanitizer=t}transform(e){try{let t=this.domService.sanitizeSvg(e);return this.sanitizer.bypassSecurityTrustHtml(t)}catch{return e}}};o.\u0275fac=function(t){return new(t||o)(h(Be,16),h(Ks,16))},o.\u0275pipe=$i({name:"safeSvg",type:o,pure:!0,standalone:!1});let i=o;return i})();var rln=()=>({"line-height":"20px"});function aln(i,o){if(i&1){let n=Y();f(0),_(1,"mark",5),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),te(2),P(3,"translate"),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),ue("velt-autocomplete--contact-chip-current-user",(n==null||n.user==null?null:n.user.userId)&&(n==null||n.contact==null?null:n.contact.userId)===(n==null||n.user==null?null:n.user.userId))("current-user-chip",(n==null||n.user==null?null:n.user.userId)&&(n==null||n.contact==null?null:n.contact.userId)===(n==null||n.user==null?null:n.user.userId)),m(),Ce(" ",M(3,5,(n==null||n.contact==null?null:n.contact.name)||(n==null||n.contact==null?null:n.contact.email)||e.email),"")}}function sln(i,o){if(i&1){let n=Y();f(0),_(1,"mark",6),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),te(2),P(3,"translate"),b(),v()}if(i&2){let n=l(3).ngIf;m(2),Ce(" ",M(3,1,(n==null||n.group==null||n.group.group==null||n.group.group.metadata==null?null:n.group.group.metadata.groupName)||(n==null||n.group==null?null:n.group.text)),"")}}function lln(i,o){if(i&1&&(w(0,"div",10),P(1,"safeSvg")),i&2){let n=l(4).ngIf;d("innerHtml",M(1,1,n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),Ji)}}function cln(i,o){if(i&1&&w(0,"img",11),i&2){let n=l(4).ngIf;d("src",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url,Cn)}}function dln(i,o){if(i&1){let n=Y();f(0),_(1,"div",7),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),u(2,lln,2,3,"div",8)(3,cln,1,1,"img",9),_(4,"span"),te(5),P(6,"translate"),b()(),v()}if(i&2){let n=l(3).ngIf;m(2),d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),m(),d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url),m(2),Ge(M(6,3,n==null||n.custom==null||n.custom.custom==null?null:n.custom.custom.name))}}function mln(i,o){if(i&1&&u(0,aln,4,7,"ng-container",3)(1,sln,4,3,"ng-container",3)(2,dln,7,5,"ng-container",3),i&2){let n=l(3);d("ngIf",n.type==="contact"),m(),d("ngIf",n.type==="group"),m(),d("ngIf",n.type==="custom")}}function pln(i,o){if(i&1&&w(0,"velt-autocomplete-chip-tooltip-internal",12),i&2){let n=l(2).ngIf,e=l();d("componentConfigSignal",e.componentConfigSignal)("shadowDom",!!(n!=null&&n.shadowDom))}}function gln(i,o){i&1&&(f(0),_(1,"app-overlay-tooltip"),u(2,mln,3,3,"ng-template",null,1,Ie)(4,pln,1,2,"ng-template",null,2,Ie),b(),v())}function uln(i,o){i&1&&w(0,"velt-skeleton-loader-internal",13),i&2&&d("borderRadius","4px")("customStyles",pt(2,rln))}function hln(i,o){if(i&1&&(f(0),u(1,gln,6,0,"ng-container",4)(2,uln,1,3,"ng-template",null,0,Ie),v()),i&2){let n=me(3),e=l();m(),d("ngIf",e.type!=="loading")("ngIfElse",n)}}var f_e=(()=>{let o=class o{set _custom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _group(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _contactData(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedContact(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedGroup(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedCustom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _shadowDom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}constructor(e,t,r,a,s){this.authService=e,this.autocompleteService=t,this.contactService=r,this.loggingService=a,this.commentService=s,this.type="contact",this.componentConfigSignal=Te({type:"contact"}),this.subscriptions=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteChipComponent","color: blue;"),this.subscriptions.push(this.commentService.getDialogShadowDOM$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{shadowDom:c}),p))}))}catch(c){this.loggingService.catch("Error in AutocompleteChipComponent constructor: ",c)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: ngOnInit","color: green;"),setTimeout(()=>{this.componentConfigSignal().type==="contact"&&(this.email||this.componentConfigSignal().contactData?.contact)&&(this.getCurrentUser(),this.email?(this.getContacts(),this.getUserByEmail(this.email)):this.componentConfigSignal().contactData?.contact&&this.componentConfigSignal.update(e=>(e=T(I({},e),{contact:e.contactData?.contact}),e))),this.componentConfigSignal().type==="group"&&this.getOrganizationGroups()},0)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&setTimeout(()=>{Object.keys(e).forEach(t=>{t==="_custom"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedCustom?.currentValue)try{a=JSON.parse(atob(e?._encodedCustom?.currentValue))}catch{}}return r=T(I({},r),{custom:a}),r}):t==="_group"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedGroup?.currentValue)try{a=JSON.parse(atob(e?._encodedGroup?.currentValue))}catch{}}return r=T(I({},r),{group:a}),r}):t==="_contactData"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedContact?.currentValue)try{a=JSON.parse(atob(e?._encodedContact?.currentValue))}catch{}}return r=T(I({},r),{contactData:a}),r}):t==="_shadowDom"?this.componentConfigSignal.update(r=>(r=I({},r),r.shadowDom=typeof e[t].currentValue=="string"?JSON.parse(e[t].currentValue):e[t].currentValue,r)):this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})},0)}catch(t){this.loggingService.catch("Error in AutocompleteChipComponent ngOnChanges: ",t)}}getCurrentUser(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getCurrentUser","color: green;"),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getCurrentUser: ",e)}}getContacts(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getContacts","color: green;"),this.subscriptions.push(this.contactService.getUserContacts$().subscribe(e=>{let t=e?.find(r=>r.email===this.email);t&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:t}),r))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getContacts: ",e)}}getUserByEmail(e){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getUserByEmail","color: green;"),this.subscriptions.push(this.contactService.getUserByEmail$(e).subscribe(t=>{t&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:t}),r))}))}catch(t){this.loggingService.catch("Error in AutocompleteChipComponent getUserByEmail: ",t)}}getOrganizationGroups(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getOrganizationGroups","color: green;"),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{if(e){let t=e.find(r=>r?.metadata?.groupId===this.componentConfigSignal().group?.groupId);t&&this.componentConfigSignal().group&&this.componentConfigSignal.update(r=>(r=T(I({},r),{group:T(I({},r.group),{group:t})}),r))}}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getOrganizationGroups: ",e)}}onClick(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: onClick","color: green;");let e;this.componentConfigSignal().custom?.custom?e=T(I({},this.componentConfigSignal().custom?.custom),{type:"custom"}):this.componentConfigSignal().contact?(e={id:this.componentConfigSignal().contact?.userId,name:this.componentConfigSignal().contact?.name,description:this.componentConfigSignal().contact?.email,type:"contact"},this.componentConfigSignal().contact?.photoUrl&&(e.icon={url:this.componentConfigSignal().contact?.photoUrl})):this.componentConfigSignal().type==="contact"&&(e={id:void 0,name:void 0,description:this.email,type:"contact"}),e&&this.autocompleteService.setOnAutocompleteChipClick(e)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent onClick: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: unsubscribe","color: green;"),this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: OnDestroy","color: green;"),this.unsubscribe()}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent OnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(gl),h(Oi),h(y),h(De))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-internal"]],inputs:{type:"type",email:"email",_custom:[0,"custom","_custom"],_group:[0,"group","_group"],_contactData:[0,"contact","_contactData"],_encodedContact:[0,"encodedContact","_encodedContact"],_encodedGroup:[0,"encodedGroup","_encodedGroup"],_encodedCustom:[0,"encodedCustom","_encodedCustom"],_shadowDom:[0,"shadowDom","_shadowDom"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["loadingTemplateRef",""],["triggerTemplate",""],["tooltipTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"velt-autocomplete--contact-chip",3,"click"],[1,"velt-autocomplete--group-chip",3,"click"],[1,"custom-chip",3,"click"],["class","custom-chip-icon custom-chip-icon-svg",3,"innerHtml",4,"ngIf"],["class","custom-chip-icon custom-chip-icon-img",3,"src",4,"ngIf"],[1,"custom-chip-icon","custom-chip-icon-svg",3,"innerHtml"],[1,"custom-chip-icon","custom-chip-icon-img",3,"src"],[3,"componentConfigSignal","shadowDom"],["width","64px",3,"borderRadius","customStyles"]],template:function(t,r){t&1&&u(0,hln,4,2,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,em,P0,jo,Rg,pe],styles:["[_nghost-%COMP%]{display:inline-flex;line-height:32px}.custom-chip[_ngcontent-%COMP%]{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);word-break:break-word;padding:var(--velt-spacing-xs);margin:1px;gap:var(--velt-spacing-xs);opacity:0px;font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:120%;text-align:left;color:var(--velt-accent);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon.custom-chip-icon-img[_ngcontent-%COMP%]{max-height:12px}"],changeDetection:0});let i=o;return i})();var fln=["customBtnRef"],vln=["*"],Cln=i=>({componentConfigSignal:i}),_ln=(i,o)=>({condition:i,data:o}),yln=(i,o,n,e,t,r)=>({template:i,componentName:o,variant:n,suffix:e,setIfCondition:t,componentElementRef:r});function Sln(i,o){if(i&1&&(_(0,"div",9)(1,"button",10),P(2,"translate"),ce(),_(3,"svg",11)(4,"g",12),w(5,"path",13),b(),_(6,"defs")(7,"clipPath",14),w(8,"rect",15),b()()()()()),i&2){let n=l(4);x("data-testid",n.componentId+"-default-button"),m(),x("aria-label",M(2,2,"Open user tagging menu"))}}function bln(i,o){i&1&&je(0)}function Iln(i,o){if(i&1&&(f(0),u(1,Sln,9,4,"div",6),_(2,"div",7,1),u(4,bln,1,0,"ng-container",8),b(),v()),i&2){l();let n=me(6),e=l().ngIf,t=l();m(),d("ngIf",e==null?null:e.showDefaultBtn),m(),x("data-testid",t.componentId+"-custom-container"),m(2),d("ngTemplateOutlet",n)}}function Eln(i,o){i&1&&Bt(0)}function xln(i,o){if(i&1){let n=Y();f(0),_(1,"div",4),P(2,"translate"),P(3,"translate"),G("click",function(){N(n);let t=l(2);return F(t.onClick())}),u(4,Iln,5,3,"ng-container",5),b(),u(5,Eln,1,0,"ng-template",null,0,Ie),v()}if(i&2){let n=l().ngIf,e=l();m(),d("title",M(2,6,"Tag a user")),x("data-testid",e.componentId)("aria-expanded",!1)("aria-label",M(3,8,"Mention user"))("aria-controls",e.componentId+"-popup"),m(3),d("veltDynamicTemplate",qs(10,yln,e.template,n==null||n.componentMeta==null?null:n.componentMeta.componentName,n==null||n.componentMeta==null?null:n.componentMeta.variant,n==null||n.componentMeta==null?null:n.componentMeta.suffix,e.setIfCondition.bind(e),e.elementRef))}}function Tln(i,o){if(i&1&&(f(0),u(1,xln,7,17,"ng-container",3),v()),i&2){let n=l();m(),d("veltIf",k(3,_ln,n.conditionSignal(),A(1,Cln,n.componentConfigSignal)))}}var v_e=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(t,r,void 0,s,void 0,a,e),this.loggingService=e,this.elementRef=t,this.themeService=r,this.dynamicDataService=a,this.commentService=s,this.triggerElement=null,this.hotkey="@",this.buttonClick=new Me,this.deviceInfo=new Gn,this.componentConfigSignal=Te({componentMeta:this.componentMeta,showDefaultBtn:!1}),this.veltElement=!0,this.componentId="velt-autocomplete-tool"}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngOnInit:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in AutocompleteToolComponent ngOnChanges: ",t)}}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||this.componentConfigSignal.update(e=>(e=T(I({},e),{showDefaultBtn:!0}),e))}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent setupA11yAttributes:",e)}}onClick(){try{if(this.trigger||this.triggerElement){let e=this.trigger?this.trigger._element?.nativeElement:null;if(!e&&this.triggerElement&&(e=this.triggerElement),e){if(e?.focus(),e?.hasAttribute("contenteditable")){if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase()))e.innerText+=this.hotkey;else{let t=e?.getRootNode()?.getSelection()?.getRangeAt(0),r=t?.startContainer,a=t?.startOffset||0;if(r&&a>=0){let s;if(r.nodeType===Node.TEXT_NODE){let p=r.splitText(a);r=p.previousSibling,s=document.createTextNode(this.hotkey),e.insertBefore(s,p)}else s=document.createTextNode(this.hotkey),e.insertBefore(s,r.childNodes[a]);t=document.createRange(),t.setStart(s,s.length),t.collapse(!0);let c=window.getSelection();c?.removeAllRanges(),c?.addRange(t)}else e.innerText+=this.hotkey}setTimeout(()=>{let t=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(t)},100)}else if(["input","textarea"].includes(e?.tagName?.toLowerCase())){let t=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(t)}}}this.buttonClick.emit()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent onClick: ",e)}}setCursorToEndOfContenteditable(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorToEndOfContenteditable","color: green;");try{let t,r;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),r=window.getSelection(),r?.removeAllRanges(),r?.addRange(t))}catch(t){this.loggingService.catch("Error in AutocompleteToolComponent setCursorToEndOfContenteditable: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(Ye),h(S),h(De))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-tool-internal"]],viewQuery:function(t,r){if(t&1&&nt(fln,5),t&2){let a;Xe(a=Qe())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{trigger:"trigger",triggerElement:"triggerElement",hotkey:"hotkey",template:"template",componentMeta:"componentMeta"},outputs:{buttonClick:"buttonClick"},standalone:!1,features:[V([S]),B,Ze],ngContentSelectors:vln,decls:1,vars:1,consts:[["content",""],["customBtnRef",""],[4,"ngIf"],[4,"veltIf"],["role","combobox","tabindex","0",1,"velt-autocomplete-tool",3,"click","title"],[4,"veltDynamicTemplate"],["class","action-btn",4,"ngIf"],[1,"custom-btn-container"],[4,"ngTemplateOutlet"],[1,"action-btn"],["type","button",1,"action__button"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["clip-path","url(#clip0_12828_43447)"],["d","M12.2142 9.00926C12.2142 9.86174 11.8756 10.6793 11.2728 11.2821C10.67 11.8849 9.85244 12.2235 8.99996 12.2235C8.14748 12.2235 7.32992 11.8849 6.72712 11.2821C6.12432 10.6793 5.78568 9.86174 5.78568 9.00926C5.78568 8.15678 6.12432 7.33921 6.72712 6.73641C7.32992 6.13362 8.14748 5.79497 8.99996 5.79497C9.85244 5.79497 10.67 6.13362 11.2728 6.73641C11.8756 7.33921 12.2142 8.15678 12.2142 9.00926ZM12.2142 9.00926L12.2142 10.2146C12.2142 10.7474 12.4259 11.2584 12.8026 11.6351C13.1794 12.0119 13.6904 12.2235 14.2232 12.2235C14.756 12.2235 15.267 12.0119 15.6437 11.6351C16.0204 11.2584 16.2321 10.7474 16.2321 10.2146V9.00926C16.2341 7.45523 15.7355 5.9419 14.8101 4.69343C13.8847 3.44496 12.5818 2.52777 11.0944 2.07773C9.60695 1.62769 8.01411 1.66873 6.55183 2.19478C5.08955 2.72083 3.83561 3.7039 2.97575 4.99837C2.1159 6.29284 1.69588 7.82985 1.77791 9.38171C1.85994 10.9336 2.43965 12.4177 3.43118 13.6143C4.4227 14.8109 5.7733 15.6563 7.28288 16.0253C8.79247 16.3943 10.3808 16.2672 11.8125 15.6628","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_12828_43447"],["width","18","height","18","fill","white"]],template:function(t,r){t&1&&(jt(),u(0,Tln,2,6,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,bt,ne,ae,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}*[_ngcontent-%COMP%]{box-sizing:border-box}.action__button[_ngcontent-%COMP%]{border:0;border-radius:var(--velt-border-radius-full);width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;transition:.5s;color:var(--velt-text-10)}.action__button[_ngcontent-%COMP%]:hover{background:var(--velt-background-3);cursor:pointer}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0});let i=o;return i})();var Dln=["commentPinRef"];function wln(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("pointerup",function(t){return N(n),l(2).togglePinSelection(),F(t.stopPropagation())})("touchend",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("click",function(t){return N(n),F(t.stopPropagation())}),_(2,"snippyly-comment-pin",3,0),G("togglePinSelection",function(t){N(n);let r=l(2);return F(r.togglePinSelection(t))})("saveComment",function(t){N(n);let r=l(2);return F(r.saveComment(t))}),b()(),v()}if(i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId)("role","button")("tabindex",0),m(),d("annotation",n.commentPinAnnotation)("variant",e.variant)("containerComponentId",n.componentId)("commentPinSelected",!!n.commentPinSelected)("multipleCommentPinSelected",n.selectedAnnotationsMap[n.commentPinAnnotation==null?null:n.commentPinAnnotation.annotationId]&&e.objectKeys(n.selectedAnnotationsMap).length>1)("user",n.user),x("data-testid",e.componentId+"-pin")("aria-hidden","true")}}function Oln(i,o){if(i&1&&(f(0),u(1,wln,4,11,"ng-container",1),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.commentPinAnnotation&&n.user)}}var C_e=(()=>{let o=class o{set _folderId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{folderId:e}),t?.folderId?t.veltFolderId=Ui(t.folderId):t.veltFolderId=void 0,t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _clientDocumentId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{clientDocumentId:e}),t?.clientDocumentId?t.documentId=this.docService.generateDocumentId(t.clientDocumentId):t.documentId=void 0,t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _locationId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{locationId:e}),t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _context(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{context:t}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}set _contextOptions(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contextOptions:t}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}constructor(e,t,r,a,s,c){this.authService=e,this.commentService=t,this.docService=r,this.domService=a,this.loggingService=s,this.elementRef=c,this.variant="default",this.objectKeys=Object.keys,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=Te({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},selectedAnnotationsLocationMap:{},componentId:`velt-comment-pin-${wn()}`}),this.subscriptions=[],this.componentId="velt-comment-pin",this.uniqueComponentId="velt-comment-pin-"+wn();try{this.loggingService.log("%c[WB] Creating Class: VeltCommentPinComponent","color: blue;"),this.temporaryMultiThreadAnnotationId=`temp_${this.uniqueComponentId}`,this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{user:p}),g))})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{selectedAnnotationsMap:p}),g)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{selectedAnnotationsLocationMap:p}),g)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsLocationMap$ subscription: ",p)})),this.subscriptions.push(this.commentService.getGroupMatchedComments$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{groupMatchedComments:p}),g))})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{this.commentPinRef&&(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.commentPinRef.updateOverlayPosition()}catch(p){this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$: ",p)}},p=>{this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$ subscription: ",p)}))}catch(p){this.catchError("Error in VeltCommentPinComponent constructor: ",p)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentPinComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{let t=e||this.componentConfigSignal().commentPinAnnotation;if(this.componentConfigSignal().selectedAnnotationsMap[t.annotationId])t?.ghostComment?.type!==rl.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let r=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(r||(r=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),r){let a=r.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(a){let s=document.getElementById(`comment-pin-container-${a}`)||document.querySelector(`[data-velt-id='${a}']`);s&&(s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(t,this.componentConfigSignal().componentId)}}catch(t){this.catchError("Error in VeltCommentPinComponent togglePinSelection: ",t)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationsForCommentPin(),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(t){this.catchError("Error in VeltCommentPinComponent ngOnChanges: ",t)}}getCommentAnnotationsForCommentPin(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0);let e;(this.componentConfigSignal().folderId||this.componentConfigSignal().clientDocumentId)&&(e=this.componentConfigSignal().locationId),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationsForCommentComponent({type:"pin",annotationId:this.annotationId,folderId:this.componentConfigSignal().folderId,veltFolderId:this.componentConfigSignal().veltFolderId,clientDocumentId:this.componentConfigSignal().clientDocumentId,documentId:this.componentConfigSignal().documentId,context:this.componentConfigSignal().context,contextOptions:this.componentConfigSignal().contextOptions,locationId:e}).pipe(he(t=>this.commentService.getResolvedCommentsOnDom$().pipe(de(r=>(this.resolvedCommentsOnDom=r,t)))),he(t=>this.domService.getSelectedAnnotationsMap$().pipe(de(r=>({commentPinAnnotation:t?.[0],selectedAnnotationsMap:r||{},commentAnnotations:t||[]}))))).subscribe(t=>{let r=null,a=!1,s=[];if(this.resolvedCommentsOnDom||this.componentConfigSignal().groupMatchedComments&&!this.annotationId)s=t?.commentAnnotations?.slice()||[];else{let p=t?.commentAnnotations?.filter(C=>C?.status?.type!=="terminal"),g=t?.commentAnnotations?.[0];p?.length?s=p:g&&t?.selectedAnnotationsMap?.[g.annotationId]&&(s=[g])}if(s?.length&&this.componentConfigSignal().groupMatchedComments&&!this.annotationId&&(a=s?.length>1||!s?.[0]?.isDraft),a){r=new h0,r.annotationId=this.temporaryMultiThreadAnnotationId,r.isTemporary=!0,r.from=s?.[0]?.from,r.metadata=s?.[0]?.metadata;let p,g=this.componentConfigSignal().locationId;g&&(p=this.docService.getLocationByClientLocationId(g),p||(p={id:g}));let C;p&&(C=this.docService.genarateLocationId(p)),p&&C&&(r.location=p,r.locationId=C),this.componentConfigSignal().context&&(r.context=this.componentConfigSignal().context),r.commentAnnotationsMap={},r.commentAnnotations={};for(let E of s||[])E.annotationId&&(r.commentAnnotationsMap||(r.commentAnnotationsMap={}),r.commentAnnotationsMap[E.annotationId]=E,r.commentAnnotations||(r.commentAnnotations={}),r.commentAnnotations[E.annotationId]=!0)}let c=s?.length?s[s?.length-1]:null;r&&(c=r),this.componentConfigSignal.update(p=>(p=T(I({},p),{commentPinAnnotation:c,commentAnnotations:s||[]}),p))})}catch(e){this.catchError("Error in VeltCommentPinComponent getCommentAnnotationByAnnotationId: ",e)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{commentPinAnnotation:t}),r))})}catch(t){this.catchError("Error in VeltCommentPinComponent getMultiThreadCommentAnnotationByAnnotationId: ",t)}}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,t=this.componentConfigSignal().commentPinAnnotation,r=this.componentConfigSignal().sourceId;if(t){let a=!!e[t.annotationId];if(a)if(t?.isDraft)t?.sourceId&&(a=t?.sourceId===r,a&&this.domService.setSelectedAnnotationLocation(t.annotationId,this.componentConfigSignal().componentId));else{let s=this.componentConfigSignal().selectedAnnotationsLocationMap?.[t.annotationId];s&&(a=s===this.componentConfigSignal().componentId)}a!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinSelected:a}),s))}}catch(e){this.catchError("Error in VeltCommentPinComponent checkCommentPinSelected: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentPinComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnDestroy","color: green;"),this.unsubscribe()}catch(e){this.catchError("Error in VeltCommentPinComponent ngOnDestroy: ",e)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(t){this.catchError("Error in VeltCommentPinComponent saveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(it),h(Be),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-pin-internal"]],viewQuery:function(t,r){if(t&1&&nt(Dln,5),t&2){let a;Xe(a=Qe())&&(r.commentPinRef=a.first)}},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId",variant:"variant",_folderId:[0,"folderId","_folderId"],_clientDocumentId:[0,"documentId","_clientDocumentId"],_locationId:[0,"locationId","_locationId"],_context:[0,"context","_context"],_contextOptions:[0,"contextOptions","_contextOptions"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentPinRef",""],[4,"ngIf"],[1,"velt-comment-pin",3,"pointerup","touchend","click"],[3,"togglePinSelection","saveComment","annotation","variant","containerComponentId","commentPinSelected","multipleCommentPinSelected","user"]],template:function(t,r){t&1&&u(0,Oln,2,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Ag],styles:[".velt-comment-pin[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0});let i=o;return i})();function Aln(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),G("pointerup",function(t){let r=N(n).$implicit;return l(2).togglePinSelection(r.commentAnnotation),F(t.stopPropagation())}),_(3,"snippyly-comment-pin",3),G("saveComment",function(t){let r=N(n).$implicit,a=l(2);return F(a.saveComment(t,r.commentAnnotation))}),b()(),v()}if(i&2){let n=o.$implicit,e=l(2);m(),ot("top",(n==null||n.position==null?null:n.position.y)+((e.position==null?null:e.position.y)||0),"px")("left",(n==null||n.position==null?null:n.position.x)+((e.position==null?null:e.position.x)||0),"px"),x("role","button")("aria-label",M(2,14,"Comment pin"))("aria-pressed",!!e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId])("data-testid",e.componentId+(n.commentAnnotation==null?null:n.commentAnnotation.annotationId))("tabindex",0),m(2),d("annotation",n.commentAnnotation)("commentPinSelected",e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length===1)("multipleCommentPinSelected",e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length>1)("user",e.user),x("aria-hidden",!0)}}function Pln(i,o){if(i&1&&(f(0),u(1,Aln,4,16,"ng-container",1),v()),i&2){let n=l();m(),d("ngForOf",n.canvasCommentAnnotations)("ngForTrackBy",n.canvasCommentsTrackBy)}}var __e=(()=>{let o=class o{set _position(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.position=t}catch{}}constructor(e,t,r,a,s,c){this.authService=e,this.docService=t,this.domService=r,this.commentService=a,this.loggingService=s,this.elementRef=c,this.position={},this.selectedAnnotationsMap={},this.canvasCommentAnnotations=[],this.objectKeys=Object.keys,this.commentAnnotations=[],this.subscriptions=[],this.componentId="velt-canvas-comment";try{this.loggingService.log("%c[WB] Creating Class: CanvasCommentComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.user=p})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.selectedAnnotationsMap=p},p=>{this.loggingService.catch("Error in CanvasCommentComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.docService.getDocumentPaths$().pipe(he(p=>p?this.commentService.getAllCommentAnnotations({customClientDocumentId:p?.clientDocumentId,analytics:{enabled:!0,properties:{source:"internal",sourceId:"canvasComment"}}}):[])).subscribe(p=>{this.commentAnnotations=p||[],this.filterCanvasCommentAnnotations()}))}catch(p){this.loggingService.catch("Error in CanvasCommentComponent constructor: ",p)}}ngOnInit(){try{this.setupA11yAttributes(),this.filterCanvasCommentAnnotations()}catch(e){this.loggingService.catch("Error in CanvasCommentComponent ngOnInit: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CanvasCommentComponent setupA11yAttributes:",e)}}canvasCommentsTrackBy(e,t){return t.commentAnnotation.annotationId||""}filterCanvasCommentAnnotations(){try{this.canvasId?this.canvasCommentAnnotations=(this.commentAnnotations||[]).filter(e=>e?.context?.canvasCommentConfig?.id===this.canvasId).map(e=>({position:e.context.canvasCommentConfig.position,commentAnnotation:e})):this.canvasCommentAnnotations=[]}catch(e){this.loggingService.catch("Error in CanvasCommentComponent filterCanvasCommentAnnotations: ",e)}}togglePinSelection(e){try{if(this.selectedAnnotationsMap[e.annotationId])e?.ghostComment?.type!==rl.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${e?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let t=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(t||(t=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),t){let r=t.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(r){let a=document.getElementById(`comment-pin-container-${r}`)||document.querySelector(`[data-velt-id='${r}']`);a&&(a.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(e)}}catch(t){this.loggingService.catch("Error in CanvasCommentComponent togglePinSelection: ",t)}}saveComment(e,t){try{this.commentService.saveComment(t,e)}catch(r){this.loggingService.catch("Error in CanvasCommentComponent saveComment: ",r)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(it),h(Be),h(De),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-canvas-comment"]],inputs:{canvasId:"canvasId",_position:[0,"position","_position"]},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"velt-canvas-comment-pin",3,"pointerup"],[3,"saveComment","annotation","commentPinSelected","multipleCommentPinSelected","user"]],template:function(t,r){t&1&&u(0,Pln,2,2,"ng-container",0),t&2&&d("ngIf",r.user)},dependencies:[vt,X,Ag,pe],styles:[".velt-canvas-comment-pin[_ngcontent-%COMP%]{position:absolute;transform:translateY(-100%)}"],changeDetection:0});let i=o;return i})();function Mln(i,o){if(i&1&&(f(0),w(1,"app-comments-minimap",1),P(2,"translate"),v()),i&2){let n=l().ngIf,e=l();m(),d("commentAnnotations",n.commentAnnotations)("user",n.user)("position",n.position)("targetScrollableElementId",n.targetScrollableElementId),x("data-testid",e.componentId+"-minimap")("role","complementary")("aria-label",M(2,8,"Comments minimap"))("aria-hidden",!(n.commentAnnotations!=null&&n.commentAnnotations.length))}}function kln(i,o){if(i&1&&(f(0),u(1,Mln,3,10,"ng-container",0),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.user)}}var y_e=(()=>{let o=class o{constructor(e,t,r,a){this.authService=e,this.commentService=t,this.loggingService=r,this.elementRef=a,this.targetScrollableElementId=null,this.position="right",this.componentConfigSignal=Te({commentAnnotations:[],user:null,position:"right",targetScrollableElementId:null}),this.subscriptions=[],this.componentId="velt-comments-minimap";try{this.loggingService.log("%c[WB] Creating CLASS: VeltCommentsMinimapComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{user:s}),c))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getUser$: ",s)})),this.subscriptions.push(this.commentService.getCommentAnnotationsFromCommentsContainer$().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{commentAnnotations:s}),c))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getCommentAnnotationsFromCommentsContainer$: ",s)}))}catch(s){this.loggingService.catch("Error in VeltCommentsMinimapComponent constructor: ",s)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnChanges: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comments-minimap-internal"]],inputs:{targetScrollableElementId:"targetScrollableElementId",position:"position"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],[3,"commentAnnotations","user","position","targetScrollableElementId"]],template:function(t,r){t&1&&u(0,kln,2,1,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,E7,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var Rln=["waveformContainer"];function Nln(i,o){i&1&&(ce(),_(0,"svg",14),w(1,"rect",15),b())}function Fln(i,o){if(i&1&&(_(0,"div",16),te(1),P(2,"translate"),b()),i&2){let n=l().index,e=l(4);m(),Ce(" ",M(2,1,e.indexToTimeSignal()[n])," ")}}function Lln(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),b()(),w(4,"div",10),_(5,"div",11),u(6,Nln,2,0,"svg",12)(7,Fln,3,3,"div",13),b()()),i&2){let n=o.$implicit,e=o.index;m(),ot("height",n+"px"),ue("silent",n===2),m(5),d("ngIf",e%10===0),m(),d("ngIf",e%10===0)}}function Bln(i,o){if(i&1&&(f(0),_(1,"div",4),w(2,"div",5),_(3,"div",6),u(4,Lln,8,6,"div",7),b()(),v()),i&2){let n=l(2).ngIf,e=l();m(4),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Vln(i,o){if(i&1&&(f(0),u(1,Bln,5,2,"ng-container",1),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.isAudio)}}function Uln(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),b()()),i&2){let n=o.$implicit;ot("height",n+"px")}}function jln(i,o){if(i&1&&(_(0,"div",18),u(1,Uln,3,2,"div",19),b()),i&2){let n=l(2).ngIf,e=l();ue("thread-mode",n.threadMode),m(),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function $ln(i,o){if(i&1&&(f(0),u(1,jln,2,4,"div",17),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.isAudio&&(n.collapsedMode||n.threadMode))}}function Hln(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),b()()),i&2){let n=o.$implicit,e=o.index,t=l(2).ngIf;ot("height",n+"px"),ue("active-bar",e<=t.activeBarIndex)}}function zln(i,o){if(i&1&&(f(0),_(1,"div",20),u(2,Hln,3,4,"div",21),b(),v()),i&2){let n=l().ngIf,e=l();m(2),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Gln(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),b()()()),i&2){let n=o.$implicit;m(),ot("height",n+"px")}}function Wln(i,o){if(i&1&&(f(0),_(1,"div",22)(2,"div",4),w(3,"div",5),_(4,"div",6),u(5,Gln,4,2,"div",7),b()()(),v()),i&2){let n=l().ngIf,e=l();m(5),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function qln(i,o){if(i&1&&w(0,"div",25),i&2){let n=o.$implicit;ot("height",n,"px")}}function Yln(i,o){if(i&1&&(f(0),_(1,"div",23),u(2,qln,1,2,"div",24),b(),v()),i&2){let n=l().ngIf,e=l();m(2),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Kln(i,o){if(i&1&&(f(0),_(1,"div",26,0),ce(),_(3,"svg",27)(4,"defs")(5,"linearGradient",28),w(6,"stop",29)(7,"stop",30)(8,"stop",31),b()(),w(9,"path",32),b()(),v()),i&2){let n=l().ngIf;m(9),x("d",n.mirroredWaveformPath)}}function Zln(i,o){if(i&1&&(f(0)(1,2),u(2,Vln,2,1,"ng-container",3)(3,$ln,2,1,"ng-container",3)(4,zln,3,2,"ng-container",3)(5,Wln,6,2,"ng-container",3)(6,Yln,3,2,"ng-container",3)(7,Kln,10,1,"ng-container",3),v()()),i&2){let n=o.ngIf;m(),d("ngSwitch",n.variant),m(),d("ngSwitchCase","expanded"),m(),d("ngSwitchCase","minified"),m(),d("ngSwitchCase","player"),m(),d("ngSwitchCase","preview"),m(),d("ngSwitchCase","preview-mini"),m(),d("ngSwitchCase","editor")}}var O_=(()=>{let o=class o{constructor(e,t){this.loggingService=e,this.recorderService=t,this.height=144,this.isRecording=!1,this.variant="expanded",this.isAudio=!1,this.collapsedMode=!1,this.threadMode=!1,this.numberOfBars=38,this.muteMic=null,this.maxVolumeArray=[],this.allowCleanUp=!0,this.animationFrameId=null,this.lastDrawTime=0,this.drawInterval=50,this.componentConfigSignal=Te({variant:"expanded",isAudio:!1,barHeights:[],collapsedMode:!1,threadMode:!1,activeBarIndex:-1,mirroredWaveformPath:""}),this.indexToTimeSignal=Ai(()=>{let r=this.componentConfigSignal().barHeights||[],a=[];for(let s=0;s<r.length;s++){let c=this.indexToTime(s);a.push(c)}return a}),this.showWaveform=()=>{try{if(!this.bufferArray||this.bufferArray.length===0)return;let r=this.bufferArray.length/this.numberOfBars,a=[];for(let s=0;s<this.numberOfBars;s++){let c=s*r,p=c+r,g=0,C=0;for(let L=Math.floor(c);L<p&&L<this.bufferArray.length;L++)g+=this.bufferArray[L],C++;let D=(C>0?g/C:0)/255*this.height*3;a.push(D)}this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a})),this.updateMirroredWaveformPath()}catch(r){this.loggingService.warn("Error in AudioWaveformComponent showWaveform: ",r)}},this.draw=()=>{try{if(!this.analyzer)return;switch(this.analyzer.getByteFrequencyData(this.dataArray),this.componentConfigSignal().variant){case"preview":this.drawPreview();break;case"preview-mini":this.drawPreviewMini();break;default:this.drawDefault()}}catch(r){this.loggingService.warn("Error in AudioWaveformComponent draw: ",r)}}}ngOnInit(){try{this.bufferArray&&this.showWaveform(),setTimeout(()=>{this.setupResizeObserver()},100),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>T(I({},r),{[t]:e[t].currentValue}))}),e.playerCurrentTime&&e.playerCurrentTime.currentValue&&this.componentConfigSignal.update(t=>T(I({},t),{activeBarIndex:this.showActiveBars(e.playerCurrentTime.currentValue,this.totalTime.display)})),(e?.recorderInitData?.currentValue?.stream||e?.previewStream?.currentValue)&&(this.stopAnimation(),this.setupAudioElements(e.recorderInitData?.currentValue?.stream||e.previewStream.currentValue),this.startAnimation()),e.muteMic&&this.handleMicMute(e.muteMic.currentValue),this.updateMirroredWaveformPath()}catch(t){this.loggingService.warn("Error in AudioWaveformComponent ngOnChanges: ",t)}}trackByBarHeights(e,t){return e+"__"+t}showActiveBars(e,t){try{let r=p=>{let[g,C]=p.split(":").map(Number);return g*60+C},a=r(e),s=r(t)-1,c=s>0?a/s:0;return a>=s?this.numberOfBars:Math.floor(c*this.numberOfBars)}catch(r){return this.loggingService.warn("Error in AudioWaveformComponent showActiveBars: ",r),-1}}ngOnDestroy(){try{this.stopAnimation(),this.cleanupAudio(),this.cleanupResizeObserver()}catch{}}setupAudioElements(e){return Q(this,null,function*(){try{this.cleanupAudio(),this.audioContext=new AudioContext,this.stream=e,this.microphone=this.audioContext.createMediaStreamSource(this.stream),this.analyzer=this.audioContext.createAnalyser(),this.analyzer.smoothingTimeConstant=.8,this.microphone.connect(this.analyzer),this.dataArray=new Uint8Array(this.analyzer.frequencyBinCount),this.analyzer.fftSize=1024,this.handleMicMute(this.muteMic)}catch{this.dataArray=new Uint8Array(0)}})}noiseGate(e,t,r){try{for(let a=0;a<e.length;a++)e[a]=Math.abs(e[a])>t?e[a]-t+r:r}catch(a){this.loggingService.warn("Error in AudioWaveformComponent noiseGate: ",a)}}startAnimation(){try{let e=t=>{t-this.lastDrawTime>=this.drawInterval&&(this.draw(),this.lastDrawTime=t),this.animationFrameId=requestAnimationFrame(e)};this.animationFrameId=requestAnimationFrame(e)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent startAnimation: ",e)}}stopAnimation(){try{this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent stopAnimation: ",e)}}drawPreview(){try{this.noiseGate(this.dataArray,128,0);let e=1e3,t=Math.floor(this.dataArray.length/e),r=[];for(let s=0;s<e;s++){let c=s*t,p=Math.min(c+t,this.dataArray.length),g=this.dataArray.slice(c,p),C=g.reduce((E,D)=>E+D,0)/g.length;r.push(C)}r.sort((s,c)=>s-c);let a=[];for(let s=0;s<e;s++)a.push(r[s],r[s]);for(let s=e-1;s>=0;s--)a.push(r[s],r[s]);this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a.filter(c=>c!==0)})),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreview: ",e)}}drawPreviewMini(){try{this.noiseGate(this.dataArray,128,0);let e=Math.max(...this.dataArray),t=Math.max(2,Math.min(14,e/128*14));if(this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[Math.max(2,t/1.5),t,Math.max(2,t/2)]})),this.updateMirroredWaveformPath(),this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let r=Math.max(...this.dataArray);this.maxVolumeArray.push(r),this.recorderService.setRecordedDataStream(this.maxVolumeArray)}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreviewMini: ",e)}}drawDefault(){try{if(this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let e=Math.max(...this.dataArray),t=e/255*this.height*3;this.maxVolumeArray.push(e),this.recorderService.setRecordedDataStream(this.maxVolumeArray),this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[...r.barHeights,t]})),this.updateMirroredWaveformPath()}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawDefault: ",e)}}cleanupAudio(){try{this.allowCleanUp&&this.variant!=="expanded"&&(this.microphone&&(this.microphone.disconnect(),this.microphone=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.analyzer&&(this.analyzer.disconnect(),this.analyzer=null),this.audioContext&&this.audioContext.state!=="closed"&&(this.audioContext.close(),this.audioContext=null),this.componentConfigSignal.update(e=>T(I({},e),{barHeights:[]})),this.updateMirroredWaveformPath())}catch{}}handleMicMute(e){try{this.stream&&this.stream.getAudioTracks().forEach(t=>{t.enabled=!e})}catch(t){this.loggingService.warn("Error in AudioWaveformComponent handleMicMute: ",t)}}indexToTime(e){try{let t=e*100,r=Math.floor(t/1e3),a=Math.floor(r/60),s=r%60,c=a.toString().padStart(2,"0"),p=s.toString().padStart(2,"0");return`${c}:${p}`}catch(t){return this.loggingService.warn("Error in AudioWaveformComponent indexToTime: ",t),""}}generateMirroredWaveformPath(e,t,r){try{if(!e||e.length===0)return"";let a=r?e.slice(0,t):e.slice(t);if(a.length===0)return"";let s=r?0:t,c=e.length,p=100,C=18/2,E=Math.min(...a),L=Math.max(...a)-E,z=L>0?C*.8/L:.1,W=.5,ee="";if(a.length>0){let le=s/c*p;ee=`M ${le} ${C} `;let ye=le,Oe=L>0?(a[0]-E)*z:W,ze=C-Math.max(Oe,W);ee+=`L ${ye} ${ze} `;for(let _e=1;_e<a.length;_e++){let fe=(s+_e)/c*p,we=(s+_e-1)/c*p,Fe=L>0?(a[_e]-E)*z:W,Ct=L>0?(a[_e-1]-E)*z:W,In=C-Math.max(Fe,W),_t=C-Math.max(Ct,W),Rt=we+(fe-we)/3,Nt=we+2*(fe-we)/3;ee+=`C ${Rt} ${_t}, ${Nt} ${In}, ${fe} ${In} `}let Ne=(s+a.length-1)/c*p;ee+=`L ${Ne} ${C} `;let Ee=Ne,Se=L>0?(a[a.length-1]-E)*z:W,Pe=C+Math.max(Se,W);ee+=`L ${Ee} ${Pe} `;for(let _e=a.length-2;_e>=0;_e--){let fe=(s+_e)/c*p,we=(s+_e+1)/c*p,Fe=L>0?(a[_e]-E)*z:W,Ct=L>0?(a[_e+1]-E)*z:W,In=C+Math.max(Fe,W),_t=C+Math.max(Ct,W),Rt=we-(we-fe)/3,Nt=we-2*(we-fe)/3;ee+=`C ${Rt} ${_t}, ${Nt} ${In}, ${fe} ${In} `}ee+="Z"}return ee}catch(a){return this.loggingService.warn("Error in AudioWaveformComponent generateMirroredWaveformPath: ",a),""}}onResize(){this.componentConfigSignal().variant==="editor"&&setTimeout(()=>{this.updateMirroredWaveformPath()},100)}updateMirroredWaveformPath(){try{let e=this.componentConfigSignal(),t=this.generateMirroredWaveformPath(e.barHeights,e.activeBarIndex+1,!1);this.componentConfigSignal.update(r=>T(I({},r),{mirroredWaveformPath:t}))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent updateMirroredWaveformPath: ",e)}}setupResizeObserver(){try{this.waveformContainer&&!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{this.updateMirroredWaveformPath()}),this.resizeObserver.observe(this.waveformContainer.nativeElement))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent setupResizeObserver: ",e)}}cleanupResizeObserver(){try{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent cleanupResizeObserver: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(_n))},o.\u0275cmp=O({type:o,selectors:[["app-audio-waveform"]],viewQuery:function(t,r){if(t&1&&nt(Rln,5),t&2){let a;Xe(a=Qe())&&(r.waveformContainer=a.first)}},hostBindings:function(t,r){t&1&&G("resize",function(){return r.onResize()},!1,IA)},inputs:{height:"height",isRecording:"isRecording",variant:"variant",isAudio:"isAudio",collapsedMode:"collapsedMode",bufferArray:"bufferArray",playerCurrentTime:"playerCurrentTime",totalTime:"totalTime",recorderInitData:"recorderInitData",threadMode:"threadMode",previewStream:"previewStream",numberOfBars:"numberOfBars",muteMic:"muteMic"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["waveformContainer",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"audio-waveform"],[1,"center-line"],[1,"waves"],["class","bar-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bar-container"],[1,"bar"],[1,"line"],[1,"time-container"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["class","time",4,"ngIf"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","width","1","height","8"],[1,"time"],["class","mini-audio-container",3,"thread-mode",4,"ngIf"],[1,"mini-audio-container"],["class","bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mini-audio-container-player"],["class","bar",3,"height","active-bar",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview"],[1,"audio-container-preview-mini"],["class","audio-container-preview-mini--bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview-mini--bar"],[1,"editor-player"],["width","100%","height","18","viewBox","0 0 100 18","preserveAspectRatio","none",1,"smooth-waveform"],["id","active-gradient","x1","0%","y1","0%","x2","0%","y2","100%"],["offset","0%","stop-color","var(--velt-text-4)","stop-opacity","1"],["offset","50%","stop-color","var(--velt-text-4)","stop-opacity","1"],["offset","100%","stop-color","var(--velt-text-4)","stop-opacity","1"],["fill","url(#active-gradient)"]],template:function(t,r){t&1&&u(0,Zln,8,7,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,qi,no,pe],styles:[".audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;border:1px solid var(--velt-border-3);border-radius:var(--velt-border-radius-lg)}.audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;height:144px;width:100%;z-index:2!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-xs);transition:height .5s ease}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar.silent[_ngcontent-%COMP%]{background:var(--velt-text-12)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{fill:var(--velt-background-4)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.mini-audio-container[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:flex-end;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container.thread-mode[_ngcontent-%COMP%]{width:74px}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-text-12);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%] .active-bar[_ngcontent-%COMP%]{background:var(--velt-accent-text)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:300px;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;border-width:0px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:144px;width:100%;z-index:2}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.audio-container-preview-mini[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:2px;width:28px;height:28px;background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl)}.audio-container-preview-mini[_ngcontent-%COMP%] .audio-container-preview-mini--bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-white);border-radius:var(--velt-border-radius-2xs);transition:height .1s}.editor-player[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;position:relative;margin-left:1.5px}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-text-12)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-accent-text)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:d .2s ease-in-out}"],changeDetection:0});let i=o;return i})();var Xln=["knob"],Qln=["valueIndicatorContainer"];function Jln(i,o){if(i&1&&(_(0,"div",2,1)(2,"div",5)(3,"span",6),te(4),b()()()),i&2){let n=l();m(4),Ge(n.valueIndicatorText)}}var ecn=["trackActive"],tcn=["*"];function ncn(i,o){if(i&1&&w(0,"div"),i&2){let n=o.$implicit,e=o.$index,t=l(3);tr(n===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),ot("transform",t._calcTickMarkTransform(e))}}function icn(i,o){if(i&1&&aX(0,ncn,1,4,"div",8,rX),i&2){let n=l(2);sX(n._tickMarks)}}function ocn(i,o){if(i&1&&(_(0,"div",6,1),u(2,icn,2,0),b()),i&2){let n=l();m(2),uc(n._cachedWidth?2:-1)}}function rcn(i,o){if(i&1&&w(0,"mat-slider-visual-thumb",7),i&2){let n=l();d("discrete",n.discrete)("thumbPosition",1)("valueIndicatorText",n.startValueIndicatorText)}}var $n=function(i){return i[i.START=1]="START",i[i.END=2]="END",i}($n||{}),A_=function(i){return i[i.ACTIVE=0]="ACTIVE",i[i.INACTIVE=1]="INACTIVE",i}(A_||{}),LG=new gt("_MatSlider"),S_e=new gt("_MatSliderThumb"),acn=new gt("_MatSliderRangeThumb"),b_e=new gt("_MatSliderVisualThumb");var scn=(()=>{class i{_cdr=be(nn);_ngZone=be(Vt);_slider=be(LG);_renderer=be(eo);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=be(R).nativeElement;_platform=be(fo);constructor(){}ngAfterViewInit(){let n=this._slider._getInput(this.thumbPosition);n&&(this._ripple.radius=24,this._sliderInput=n,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let e=this._sliderInputEl,t=this._renderer;this._listenerCleanups=[t.listen(e,"pointermove",this._onPointerMove),t.listen(e,"pointerdown",this._onDragStart),t.listen(e,"pointerup",this._onDragEnd),t.listen(e,"pointerleave",this._onMouseLeave),t.listen(e,"focus",this._onFocus),t.listen(e,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(n=>n())}_onPointerMove=n=>{if(this._sliderInput._isFocused)return;let e=this._hostElement.getBoundingClientRect(),t=this._slider._isCursorOnSliderThumb(n,e);this._isHovered=t,t?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=n=>{n.button===0&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(n){return n?.state===as.FADING_IN||n?.state===as.VISIBLE}_showRipple(n,e){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===$n.START?$n.END:$n.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!e)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:n,centered:!0,persistent:!0})}_hideRipple(n){if(n?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let e=this._getSibling();e._isShowingAnyRipple()||(this._hideValueIndicator(),e._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===$n.START?$n.END:$n.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(e,t){if(e&1&&(nt(qu,5),nt(Xln,5),nt(Qln,5)),e&2){let r;Xe(r=Qe())&&(t._ripple=r.first),Xe(r=Qe())&&(t._knob=r.first),Xe(r=Qe())&&(t._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[V([{provide:b_e,useExisting:i}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(e,t){e&1&&(u(0,Jln,5,1,"div",2),w(1,"div",3,0)(3,"div",4)),e&2&&(uc(t.discrete?0:-1),m(3),d("matRippleDisabled",!0))},dependencies:[qu],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}
536
+ </velt-autocomplete-chip>`)}}),(a?.filter(C=>!C.text).filter((C,E,D)=>D.findIndex(L=>L.userId===C.userId)===E)).forEach(C=>{if(C?.userId){let E=new RegExp(Md(`{{${C.userId}}}`),"g");e=e.replaceAll(E,D=>`<velt-autocomplete-chip type="loading" shadow-dom='${s?"true":"false"}'></velt-autocomplete-chip>`)}})),e}catch{return e}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"replaceAutocompleteList",type:o,pure:!0,standalone:!1});let i=o;return i})();var h_e=(()=>{let o=class o{set _hotkey(e){try{this.hotkey=e,this.setListData()}catch{}}set _listData(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.listData=t,this.setListData()}catch{}}constructor(e,t){this.autocompleteService=e,this.loggingService=t,this.hotkey="",this.listData=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteComponent","color: blue;")}catch(r){this.loggingService.catch("Error in AutocompleteComponent constructor: ",r)}}setListData(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: setListData","color: green;"),this.hotkey&&this.listData?.length&&this.autocompleteService.create({hotkey:this.hotkey,data:this.listData,type:"custom"})}catch(e){this.loggingService.catch("Error in AutocompleteComponent setListData: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: OnDestroy","color: green;"),this.hotkey&&this.autocompleteService.remove(this.hotkey)}catch(e){this.loggingService.catch("Error in AutocompleteComponent OnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(gl),h(y))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-internal"]],inputs:{_hotkey:[0,"hotkey","_hotkey"],_listData:[0,"listData","_listData"]},standalone:!1,decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Rg=(()=>{let o=class o{constructor(e,t){this.domService=e,this.sanitizer=t}transform(e){try{let t=this.domService.sanitizeSvg(e);return this.sanitizer.bypassSecurityTrustHtml(t)}catch{return e}}};o.\u0275fac=function(t){return new(t||o)(h(Be,16),h(Ks,16))},o.\u0275pipe=$i({name:"safeSvg",type:o,pure:!0,standalone:!1});let i=o;return i})();var rln=()=>({"line-height":"20px"});function aln(i,o){if(i&1){let n=Y();f(0),_(1,"mark",5),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),te(2),P(3,"translate"),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),ue("velt-autocomplete--contact-chip-current-user",(n==null||n.user==null?null:n.user.userId)&&(n==null||n.contact==null?null:n.contact.userId)===(n==null||n.user==null?null:n.user.userId))("current-user-chip",(n==null||n.user==null?null:n.user.userId)&&(n==null||n.contact==null?null:n.contact.userId)===(n==null||n.user==null?null:n.user.userId)),m(),Ce(" ",M(3,5,(n==null||n.contact==null?null:n.contact.name)||(n==null||n.contact==null?null:n.contact.email)||e.email),"")}}function sln(i,o){if(i&1){let n=Y();f(0),_(1,"mark",6),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),te(2),P(3,"translate"),b(),v()}if(i&2){let n=l(3).ngIf;m(2),Ce(" ",M(3,1,(n==null||n.group==null||n.group.group==null||n.group.group.metadata==null?null:n.group.group.metadata.groupName)||(n==null||n.group==null?null:n.group.text)),"")}}function lln(i,o){if(i&1&&(w(0,"div",10),P(1,"safeSvg")),i&2){let n=l(4).ngIf;d("innerHtml",M(1,1,n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),Ji)}}function cln(i,o){if(i&1&&w(0,"img",11),i&2){let n=l(4).ngIf;d("src",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url,Cn)}}function dln(i,o){if(i&1){let n=Y();f(0),_(1,"div",7),G("click",function(){N(n);let t=l(4);return F(t.onClick())}),u(2,lln,2,3,"div",8)(3,cln,1,1,"img",9),_(4,"span"),te(5),P(6,"translate"),b()(),v()}if(i&2){let n=l(3).ngIf;m(2),d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),m(),d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url),m(2),Ge(M(6,3,n==null||n.custom==null||n.custom.custom==null?null:n.custom.custom.name))}}function mln(i,o){if(i&1&&u(0,aln,4,7,"ng-container",3)(1,sln,4,3,"ng-container",3)(2,dln,7,5,"ng-container",3),i&2){let n=l(3);d("ngIf",n.type==="contact"),m(),d("ngIf",n.type==="group"),m(),d("ngIf",n.type==="custom")}}function pln(i,o){if(i&1&&w(0,"velt-autocomplete-chip-tooltip-internal",12),i&2){let n=l(2).ngIf,e=l();d("componentConfigSignal",e.componentConfigSignal)("shadowDom",!!(n!=null&&n.shadowDom))}}function gln(i,o){i&1&&(f(0),_(1,"app-overlay-tooltip"),u(2,mln,3,3,"ng-template",null,1,Ie)(4,pln,1,2,"ng-template",null,2,Ie),b(),v())}function uln(i,o){i&1&&w(0,"velt-skeleton-loader-internal",13),i&2&&d("borderRadius","4px")("customStyles",pt(2,rln))}function hln(i,o){if(i&1&&(f(0),u(1,gln,6,0,"ng-container",4)(2,uln,1,3,"ng-template",null,0,Ie),v()),i&2){let n=me(3),e=l();m(),d("ngIf",e.type!=="loading")("ngIfElse",n)}}var f_e=(()=>{let o=class o{set _custom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _group(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _contactData(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedContact(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedGroup(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedCustom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _shadowDom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}constructor(e,t,r,a,s){this.authService=e,this.autocompleteService=t,this.contactService=r,this.loggingService=a,this.commentService=s,this.type="contact",this.componentConfigSignal=Te({type:"contact"}),this.subscriptions=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteChipComponent","color: blue;"),this.subscriptions.push(this.commentService.getDialogShadowDOM$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{shadowDom:c}),p))}))}catch(c){this.loggingService.catch("Error in AutocompleteChipComponent constructor: ",c)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: ngOnInit","color: green;"),setTimeout(()=>{this.componentConfigSignal().type==="contact"&&(this.email||this.componentConfigSignal().contactData?.contact)&&(this.getCurrentUser(),this.email?(this.getContacts(),this.getUserByEmail(this.email)):this.componentConfigSignal().contactData?.contact&&this.componentConfigSignal.update(e=>(e=T(I({},e),{contact:e.contactData?.contact}),e))),this.componentConfigSignal().type==="group"&&this.getOrganizationGroups()},0)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&setTimeout(()=>{Object.keys(e).forEach(t=>{t==="_custom"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedCustom?.currentValue)try{a=JSON.parse(atob(e?._encodedCustom?.currentValue))}catch{}}return r=T(I({},r),{custom:a}),r}):t==="_group"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedGroup?.currentValue)try{a=JSON.parse(atob(e?._encodedGroup?.currentValue))}catch{}}return r=T(I({},r),{group:a}),r}):t==="_contactData"?this.componentConfigSignal.update(r=>{let a=e[t].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedContact?.currentValue)try{a=JSON.parse(atob(e?._encodedContact?.currentValue))}catch{}}return r=T(I({},r),{contactData:a}),r}):t==="_shadowDom"?this.componentConfigSignal.update(r=>(r=I({},r),r.shadowDom=typeof e[t].currentValue=="string"?JSON.parse(e[t].currentValue):e[t].currentValue,r)):this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})},0)}catch(t){this.loggingService.catch("Error in AutocompleteChipComponent ngOnChanges: ",t)}}getCurrentUser(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getCurrentUser","color: green;"),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getCurrentUser: ",e)}}getContacts(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getContacts","color: green;"),this.subscriptions.push(this.contactService.getUserContacts$().subscribe(e=>{let t=e?.find(r=>r.email===this.email);t&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:t}),r))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getContacts: ",e)}}getUserByEmail(e){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getUserByEmail","color: green;"),this.subscriptions.push(this.contactService.getUserByEmail$(e).subscribe(t=>{t&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:t}),r))}))}catch(t){this.loggingService.catch("Error in AutocompleteChipComponent getUserByEmail: ",t)}}getOrganizationGroups(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getOrganizationGroups","color: green;"),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{if(e){let t=e.find(r=>r?.metadata?.groupId===this.componentConfigSignal().group?.groupId);t&&this.componentConfigSignal().group&&this.componentConfigSignal.update(r=>(r=T(I({},r),{group:T(I({},r.group),{group:t})}),r))}}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getOrganizationGroups: ",e)}}onClick(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: onClick","color: green;");let e;this.componentConfigSignal().custom?.custom?e=T(I({},this.componentConfigSignal().custom?.custom),{type:"custom"}):this.componentConfigSignal().contact?(e={id:this.componentConfigSignal().contact?.userId,name:this.componentConfigSignal().contact?.name,description:this.componentConfigSignal().contact?.email,type:"contact"},this.componentConfigSignal().contact?.photoUrl&&(e.icon={url:this.componentConfigSignal().contact?.photoUrl})):this.componentConfigSignal().type==="contact"&&(e={id:void 0,name:void 0,description:this.email,type:"contact"}),e&&this.autocompleteService.setOnAutocompleteChipClick(e)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent onClick: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: unsubscribe","color: green;"),this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: OnDestroy","color: green;"),this.unsubscribe()}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent OnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(gl),h(Oi),h(y),h(De))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-internal"]],inputs:{type:"type",email:"email",_custom:[0,"custom","_custom"],_group:[0,"group","_group"],_contactData:[0,"contact","_contactData"],_encodedContact:[0,"encodedContact","_encodedContact"],_encodedGroup:[0,"encodedGroup","_encodedGroup"],_encodedCustom:[0,"encodedCustom","_encodedCustom"],_shadowDom:[0,"shadowDom","_shadowDom"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["loadingTemplateRef",""],["triggerTemplate",""],["tooltipTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"velt-autocomplete--contact-chip",3,"click"],[1,"velt-autocomplete--group-chip",3,"click"],[1,"custom-chip",3,"click"],["class","custom-chip-icon custom-chip-icon-svg",3,"innerHtml",4,"ngIf"],["class","custom-chip-icon custom-chip-icon-img",3,"src",4,"ngIf"],[1,"custom-chip-icon","custom-chip-icon-svg",3,"innerHtml"],[1,"custom-chip-icon","custom-chip-icon-img",3,"src"],[3,"componentConfigSignal","shadowDom"],["width","64px",3,"borderRadius","customStyles"]],template:function(t,r){t&1&&u(0,hln,4,2,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,em,P0,jo,Rg,pe],styles:["[_nghost-%COMP%]{display:inline-flex;line-height:32px}.custom-chip[_ngcontent-%COMP%]{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);word-break:break-word;padding:var(--velt-spacing-xs);margin:1px;gap:var(--velt-spacing-xs);opacity:0px;font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:120%;text-align:left;color:var(--velt-accent);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon.custom-chip-icon-img[_ngcontent-%COMP%]{max-height:12px}"],changeDetection:0});let i=o;return i})();var fln=["customBtnRef"],vln=["*"],Cln=i=>({componentConfigSignal:i}),_ln=(i,o)=>({condition:i,data:o}),yln=(i,o,n,e,t,r)=>({template:i,componentName:o,variant:n,suffix:e,setIfCondition:t,componentElementRef:r});function Sln(i,o){if(i&1&&(_(0,"div",9)(1,"button",10),P(2,"translate"),ce(),_(3,"svg",11)(4,"g",12),w(5,"path",13),b(),_(6,"defs")(7,"clipPath",14),w(8,"rect",15),b()()()()()),i&2){let n=l(4);x("data-testid",n.componentId+"-default-button"),m(),x("aria-label",M(2,2,"Open user tagging menu"))}}function bln(i,o){i&1&&je(0)}function Iln(i,o){if(i&1&&(f(0),u(1,Sln,9,4,"div",6),_(2,"div",7,1),u(4,bln,1,0,"ng-container",8),b(),v()),i&2){l();let n=me(6),e=l().ngIf,t=l();m(),d("ngIf",e==null?null:e.showDefaultBtn),m(),x("data-testid",t.componentId+"-custom-container"),m(2),d("ngTemplateOutlet",n)}}function Eln(i,o){i&1&&Bt(0)}function xln(i,o){if(i&1){let n=Y();f(0),_(1,"div",4),P(2,"translate"),P(3,"translate"),G("click",function(){N(n);let t=l(2);return F(t.onClick())}),u(4,Iln,5,3,"ng-container",5),b(),u(5,Eln,1,0,"ng-template",null,0,Ie),v()}if(i&2){let n=l().ngIf,e=l();m(),d("title",M(2,6,"Tag a user")),x("data-testid",e.componentId)("aria-expanded",!1)("aria-label",M(3,8,"Mention user"))("aria-controls",e.componentId+"-popup"),m(3),d("veltDynamicTemplate",qs(10,yln,e.template,n==null||n.componentMeta==null?null:n.componentMeta.componentName,n==null||n.componentMeta==null?null:n.componentMeta.variant,n==null||n.componentMeta==null?null:n.componentMeta.suffix,e.setIfCondition.bind(e),e.elementRef))}}function Tln(i,o){if(i&1&&(f(0),u(1,xln,7,17,"ng-container",3),v()),i&2){let n=l();m(),d("veltIf",k(3,_ln,n.conditionSignal(),A(1,Cln,n.componentConfigSignal)))}}var v_e=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(t,r,void 0,s,void 0,a,e),this.loggingService=e,this.elementRef=t,this.themeService=r,this.dynamicDataService=a,this.commentService=s,this.triggerElement=null,this.hotkey="@",this.buttonClick=new Me,this.deviceInfo=new Gn,this.componentConfigSignal=Te({componentMeta:this.componentMeta,showDefaultBtn:!1}),this.veltElement=!0,this.componentId="velt-autocomplete-tool"}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngOnInit:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in AutocompleteToolComponent ngOnChanges: ",t)}}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||this.componentConfigSignal.update(e=>(e=T(I({},e),{showDefaultBtn:!0}),e))}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent setupA11yAttributes:",e)}}onClick(){try{if(this.trigger||this.triggerElement){let e=this.trigger?this.trigger._element?.nativeElement:null;if(!e&&this.triggerElement&&(e=this.triggerElement),e){if(e?.focus(),e?.hasAttribute("contenteditable")){if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase()))e.innerText+=this.hotkey;else{let t=e?.getRootNode()?.getSelection()?.getRangeAt(0),r=t?.startContainer,a=t?.startOffset||0;if(r&&a>=0){let s;if(r.nodeType===Node.TEXT_NODE){let p=r.splitText(a);r=p.previousSibling,s=document.createTextNode(this.hotkey),e.insertBefore(s,p)}else s=document.createTextNode(this.hotkey),e.insertBefore(s,r.childNodes[a]);t=document.createRange(),t.setStart(s,s.length),t.collapse(!0);let c=window.getSelection();c?.removeAllRanges(),c?.addRange(t)}else e.innerText+=this.hotkey}setTimeout(()=>{let t=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(t)},100)}else if(["input","textarea"].includes(e?.tagName?.toLowerCase())){let t=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(t)}}}this.buttonClick.emit()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent onClick: ",e)}}setCursorToEndOfContenteditable(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorToEndOfContenteditable","color: green;");try{let t,r;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),r=window.getSelection(),r?.removeAllRanges(),r?.addRange(t))}catch(t){this.loggingService.catch("Error in AutocompleteToolComponent setCursorToEndOfContenteditable: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(Ye),h(S),h(De))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-tool-internal"]],viewQuery:function(t,r){if(t&1&&nt(fln,5),t&2){let a;Xe(a=Qe())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{trigger:"trigger",triggerElement:"triggerElement",hotkey:"hotkey",template:"template",componentMeta:"componentMeta"},outputs:{buttonClick:"buttonClick"},standalone:!1,features:[V([S]),B,Ze],ngContentSelectors:vln,decls:1,vars:1,consts:[["content",""],["customBtnRef",""],[4,"ngIf"],[4,"veltIf"],["role","combobox","tabindex","0",1,"velt-autocomplete-tool",3,"click","title"],[4,"veltDynamicTemplate"],["class","action-btn",4,"ngIf"],[1,"custom-btn-container"],[4,"ngTemplateOutlet"],[1,"action-btn"],["type","button",1,"action__button"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["clip-path","url(#clip0_12828_43447)"],["d","M12.2142 9.00926C12.2142 9.86174 11.8756 10.6793 11.2728 11.2821C10.67 11.8849 9.85244 12.2235 8.99996 12.2235C8.14748 12.2235 7.32992 11.8849 6.72712 11.2821C6.12432 10.6793 5.78568 9.86174 5.78568 9.00926C5.78568 8.15678 6.12432 7.33921 6.72712 6.73641C7.32992 6.13362 8.14748 5.79497 8.99996 5.79497C9.85244 5.79497 10.67 6.13362 11.2728 6.73641C11.8756 7.33921 12.2142 8.15678 12.2142 9.00926ZM12.2142 9.00926L12.2142 10.2146C12.2142 10.7474 12.4259 11.2584 12.8026 11.6351C13.1794 12.0119 13.6904 12.2235 14.2232 12.2235C14.756 12.2235 15.267 12.0119 15.6437 11.6351C16.0204 11.2584 16.2321 10.7474 16.2321 10.2146V9.00926C16.2341 7.45523 15.7355 5.9419 14.8101 4.69343C13.8847 3.44496 12.5818 2.52777 11.0944 2.07773C9.60695 1.62769 8.01411 1.66873 6.55183 2.19478C5.08955 2.72083 3.83561 3.7039 2.97575 4.99837C2.1159 6.29284 1.69588 7.82985 1.77791 9.38171C1.85994 10.9336 2.43965 12.4177 3.43118 13.6143C4.4227 14.8109 5.7733 15.6563 7.28288 16.0253C8.79247 16.3943 10.3808 16.2672 11.8125 15.6628","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_12828_43447"],["width","18","height","18","fill","white"]],template:function(t,r){t&1&&(jt(),u(0,Tln,2,6,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,bt,ne,ae,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}*[_ngcontent-%COMP%]{box-sizing:border-box}.action__button[_ngcontent-%COMP%]{border:0;border-radius:var(--velt-border-radius-full);width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;transition:.5s;color:var(--velt-text-10)}.action__button[_ngcontent-%COMP%]:hover{background:var(--velt-background-3);cursor:pointer}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0});let i=o;return i})();var Dln=["commentPinRef"];function wln(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("pointerup",function(t){return N(n),l(2).togglePinSelection(),F(t.stopPropagation())})("touchend",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("click",function(t){return N(n),F(t.stopPropagation())}),_(2,"snippyly-comment-pin",3,0),G("togglePinSelection",function(t){N(n);let r=l(2);return F(r.togglePinSelection(t))})("saveComment",function(t){N(n);let r=l(2);return F(r.saveComment(t))}),b()(),v()}if(i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId)("role","button")("tabindex",0),m(),d("annotation",n.commentPinAnnotation)("variant",e.variant)("containerComponentId",n.componentId)("commentPinSelected",!!n.commentPinSelected)("multipleCommentPinSelected",n.selectedAnnotationsMap[n.commentPinAnnotation==null?null:n.commentPinAnnotation.annotationId]&&e.objectKeys(n.selectedAnnotationsMap).length>1)("user",n.user),x("data-testid",e.componentId+"-pin")("aria-hidden","true")}}function Oln(i,o){if(i&1&&(f(0),u(1,wln,4,11,"ng-container",1),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.commentPinAnnotation&&n.user)}}var C_e=(()=>{let o=class o{set _folderId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{folderId:e}),t?.folderId?t.veltFolderId=Ui(t.folderId):t.veltFolderId=void 0,t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _clientDocumentId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{clientDocumentId:e}),t?.clientDocumentId?t.documentId=this.docService.generateDocumentId(t.clientDocumentId):t.documentId=void 0,t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _locationId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{locationId:e}),t)),this.getCommentAnnotationsForCommentPin()}catch{}}set _context(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{context:t}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}set _contextOptions(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contextOptions:t}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}constructor(e,t,r,a,s,c){this.authService=e,this.commentService=t,this.docService=r,this.domService=a,this.loggingService=s,this.elementRef=c,this.variant="default",this.objectKeys=Object.keys,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=Te({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},selectedAnnotationsLocationMap:{},componentId:`velt-comment-pin-${wn()}`}),this.subscriptions=[],this.componentId="velt-comment-pin",this.uniqueComponentId="velt-comment-pin-"+wn();try{this.loggingService.log("%c[WB] Creating Class: VeltCommentPinComponent","color: blue;"),this.temporaryMultiThreadAnnotationId=`temp_${this.uniqueComponentId}`,this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{user:p}),g))})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{selectedAnnotationsMap:p}),g)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{selectedAnnotationsLocationMap:p}),g)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsLocationMap$ subscription: ",p)})),this.subscriptions.push(this.commentService.getGroupMatchedComments$().subscribe(p=>{this.componentConfigSignal.update(g=>(g=T(I({},g),{groupMatchedComments:p}),g))})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{this.commentPinRef&&(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.commentPinRef.updateOverlayPosition()}catch(p){this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$: ",p)}},p=>{this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$ subscription: ",p)}))}catch(p){this.catchError("Error in VeltCommentPinComponent constructor: ",p)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentPinComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{let t=e||this.componentConfigSignal().commentPinAnnotation;if(this.componentConfigSignal().selectedAnnotationsMap[t.annotationId])t?.ghostComment?.type!==rl.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let r=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(r||(r=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),r){let a=r.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(a){let s=document.getElementById(`comment-pin-container-${a}`)||document.querySelector(`[data-velt-id='${a}']`);s&&(s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(t,this.componentConfigSignal().componentId)}}catch(t){this.catchError("Error in VeltCommentPinComponent togglePinSelection: ",t)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationsForCommentPin(),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(t){this.catchError("Error in VeltCommentPinComponent ngOnChanges: ",t)}}getCommentAnnotationsForCommentPin(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0);let e;(this.componentConfigSignal().folderId||this.componentConfigSignal().clientDocumentId)&&(e=this.componentConfigSignal().locationId),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationsForCommentComponent({type:"pin",annotationId:this.annotationId,folderId:this.componentConfigSignal().folderId,veltFolderId:this.componentConfigSignal().veltFolderId,clientDocumentId:this.componentConfigSignal().clientDocumentId,documentId:this.componentConfigSignal().documentId,context:this.componentConfigSignal().context,contextOptions:this.componentConfigSignal().contextOptions,locationId:e}).pipe(he(t=>this.commentService.getResolvedCommentsOnDom$().pipe(de(r=>(this.resolvedCommentsOnDom=r,t)))),he(t=>this.domService.getSelectedAnnotationsMap$().pipe(de(r=>({commentPinAnnotation:t?.[0],selectedAnnotationsMap:r||{},commentAnnotations:t||[]}))))).subscribe(t=>{let r=null,a=!1,s=[];if(this.resolvedCommentsOnDom||this.componentConfigSignal().groupMatchedComments&&!this.annotationId)s=t?.commentAnnotations?.slice()||[];else{let p=t?.commentAnnotations?.filter(C=>C?.status?.type!=="terminal"),g=t?.commentAnnotations?.[0];p?.length?s=p:g&&t?.selectedAnnotationsMap?.[g.annotationId]&&(s=[g])}if(s?.length&&this.componentConfigSignal().groupMatchedComments&&!this.annotationId&&(a=s?.length>1||!s?.[0]?.isDraft),a){r=new h0,r.annotationId=this.temporaryMultiThreadAnnotationId,r.isTemporary=!0,r.from=s?.[0]?.from,r.metadata=s?.[0]?.metadata;let p,g=this.componentConfigSignal().locationId;g&&(p=this.docService.getLocationByClientLocationId(g),p||(p={id:g}));let C;p&&(C=this.docService.genarateLocationId(p)),p&&C&&(r.location=p,r.locationId=C),this.componentConfigSignal().context&&(r.context=this.componentConfigSignal().context),r.commentAnnotationsMap={},r.commentAnnotations={};for(let E of s||[])E.annotationId&&(r.commentAnnotationsMap||(r.commentAnnotationsMap={}),r.commentAnnotationsMap[E.annotationId]=E,r.commentAnnotations||(r.commentAnnotations={}),r.commentAnnotations[E.annotationId]=!0)}let c=s?.length?s[s?.length-1]:null;r&&(c=r),this.componentConfigSignal.update(p=>(p=T(I({},p),{commentPinAnnotation:c,commentAnnotations:s||[]}),p)),this.checkCommentPinSelected()})}catch(e){this.catchError("Error in VeltCommentPinComponent getCommentAnnotationByAnnotationId: ",e)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{commentPinAnnotation:t}),r)),this.checkCommentPinSelected()})}catch(t){this.catchError("Error in VeltCommentPinComponent getMultiThreadCommentAnnotationByAnnotationId: ",t)}}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,t=this.componentConfigSignal().commentPinAnnotation,r=this.componentConfigSignal().sourceId;if(t){let a=!!e[t.annotationId];if(a)if(t?.isDraft)t?.sourceId&&(a=t?.sourceId===r,a&&this.domService.setSelectedAnnotationLocation(t.annotationId,this.componentConfigSignal().componentId));else{let s=this.componentConfigSignal().selectedAnnotationsLocationMap?.[t.annotationId];s&&(a=s===this.componentConfigSignal().componentId)}a!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinSelected:a}),s))}}catch(e){this.catchError("Error in VeltCommentPinComponent checkCommentPinSelected: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentPinComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnDestroy","color: green;"),this.unsubscribe()}catch(e){this.catchError("Error in VeltCommentPinComponent ngOnDestroy: ",e)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(t){this.catchError("Error in VeltCommentPinComponent saveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(it),h(Be),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-pin-internal"]],viewQuery:function(t,r){if(t&1&&nt(Dln,5),t&2){let a;Xe(a=Qe())&&(r.commentPinRef=a.first)}},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId",variant:"variant",_folderId:[0,"folderId","_folderId"],_clientDocumentId:[0,"documentId","_clientDocumentId"],_locationId:[0,"locationId","_locationId"],_context:[0,"context","_context"],_contextOptions:[0,"contextOptions","_contextOptions"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentPinRef",""],[4,"ngIf"],[1,"velt-comment-pin",3,"pointerup","touchend","click"],[3,"togglePinSelection","saveComment","annotation","variant","containerComponentId","commentPinSelected","multipleCommentPinSelected","user"]],template:function(t,r){t&1&&u(0,Oln,2,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Ag],styles:[".velt-comment-pin[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0});let i=o;return i})();function Aln(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),G("pointerup",function(t){let r=N(n).$implicit;return l(2).togglePinSelection(r.commentAnnotation),F(t.stopPropagation())}),_(3,"snippyly-comment-pin",3),G("saveComment",function(t){let r=N(n).$implicit,a=l(2);return F(a.saveComment(t,r.commentAnnotation))}),b()(),v()}if(i&2){let n=o.$implicit,e=l(2);m(),ot("top",(n==null||n.position==null?null:n.position.y)+((e.position==null?null:e.position.y)||0),"px")("left",(n==null||n.position==null?null:n.position.x)+((e.position==null?null:e.position.x)||0),"px"),x("role","button")("aria-label",M(2,14,"Comment pin"))("aria-pressed",!!e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId])("data-testid",e.componentId+(n.commentAnnotation==null?null:n.commentAnnotation.annotationId))("tabindex",0),m(2),d("annotation",n.commentAnnotation)("commentPinSelected",e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length===1)("multipleCommentPinSelected",e.selectedAnnotationsMap[n.commentAnnotation==null?null:n.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length>1)("user",e.user),x("aria-hidden",!0)}}function Pln(i,o){if(i&1&&(f(0),u(1,Aln,4,16,"ng-container",1),v()),i&2){let n=l();m(),d("ngForOf",n.canvasCommentAnnotations)("ngForTrackBy",n.canvasCommentsTrackBy)}}var __e=(()=>{let o=class o{set _position(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.position=t}catch{}}constructor(e,t,r,a,s,c){this.authService=e,this.docService=t,this.domService=r,this.commentService=a,this.loggingService=s,this.elementRef=c,this.position={},this.selectedAnnotationsMap={},this.canvasCommentAnnotations=[],this.objectKeys=Object.keys,this.commentAnnotations=[],this.subscriptions=[],this.componentId="velt-canvas-comment";try{this.loggingService.log("%c[WB] Creating Class: CanvasCommentComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.user=p})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.selectedAnnotationsMap=p},p=>{this.loggingService.catch("Error in CanvasCommentComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.docService.getDocumentPaths$().pipe(he(p=>p?this.commentService.getAllCommentAnnotations({customClientDocumentId:p?.clientDocumentId,analytics:{enabled:!0,properties:{source:"internal",sourceId:"canvasComment"}}}):[])).subscribe(p=>{this.commentAnnotations=p||[],this.filterCanvasCommentAnnotations()}))}catch(p){this.loggingService.catch("Error in CanvasCommentComponent constructor: ",p)}}ngOnInit(){try{this.setupA11yAttributes(),this.filterCanvasCommentAnnotations()}catch(e){this.loggingService.catch("Error in CanvasCommentComponent ngOnInit: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CanvasCommentComponent setupA11yAttributes:",e)}}canvasCommentsTrackBy(e,t){return t.commentAnnotation.annotationId||""}filterCanvasCommentAnnotations(){try{this.canvasId?this.canvasCommentAnnotations=(this.commentAnnotations||[]).filter(e=>e?.context?.canvasCommentConfig?.id===this.canvasId).map(e=>({position:e.context.canvasCommentConfig.position,commentAnnotation:e})):this.canvasCommentAnnotations=[]}catch(e){this.loggingService.catch("Error in CanvasCommentComponent filterCanvasCommentAnnotations: ",e)}}togglePinSelection(e){try{if(this.selectedAnnotationsMap[e.annotationId])e?.ghostComment?.type!==rl.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${e?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let t=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(t||(t=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),t){let r=t.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(r){let a=document.getElementById(`comment-pin-container-${r}`)||document.querySelector(`[data-velt-id='${r}']`);a&&(a.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(e)}}catch(t){this.loggingService.catch("Error in CanvasCommentComponent togglePinSelection: ",t)}}saveComment(e,t){try{this.commentService.saveComment(t,e)}catch(r){this.loggingService.catch("Error in CanvasCommentComponent saveComment: ",r)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(it),h(Be),h(De),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-canvas-comment"]],inputs:{canvasId:"canvasId",_position:[0,"position","_position"]},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"velt-canvas-comment-pin",3,"pointerup"],[3,"saveComment","annotation","commentPinSelected","multipleCommentPinSelected","user"]],template:function(t,r){t&1&&u(0,Pln,2,2,"ng-container",0),t&2&&d("ngIf",r.user)},dependencies:[vt,X,Ag,pe],styles:[".velt-canvas-comment-pin[_ngcontent-%COMP%]{position:absolute;transform:translateY(-100%)}"],changeDetection:0});let i=o;return i})();function Mln(i,o){if(i&1&&(f(0),w(1,"app-comments-minimap",1),P(2,"translate"),v()),i&2){let n=l().ngIf,e=l();m(),d("commentAnnotations",n.commentAnnotations)("user",n.user)("position",n.position)("targetScrollableElementId",n.targetScrollableElementId),x("data-testid",e.componentId+"-minimap")("role","complementary")("aria-label",M(2,8,"Comments minimap"))("aria-hidden",!(n.commentAnnotations!=null&&n.commentAnnotations.length))}}function kln(i,o){if(i&1&&(f(0),u(1,Mln,3,10,"ng-container",0),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.user)}}var y_e=(()=>{let o=class o{constructor(e,t,r,a){this.authService=e,this.commentService=t,this.loggingService=r,this.elementRef=a,this.targetScrollableElementId=null,this.position="right",this.componentConfigSignal=Te({commentAnnotations:[],user:null,position:"right",targetScrollableElementId:null}),this.subscriptions=[],this.componentId="velt-comments-minimap";try{this.loggingService.log("%c[WB] Creating CLASS: VeltCommentsMinimapComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{user:s}),c))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getUser$: ",s)})),this.subscriptions.push(this.commentService.getCommentAnnotationsFromCommentsContainer$().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{commentAnnotations:s}),c))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getCommentAnnotationsFromCommentsContainer$: ",s)}))}catch(s){this.loggingService.catch("Error in VeltCommentsMinimapComponent constructor: ",s)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnChanges: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comments-minimap-internal"]],inputs:{targetScrollableElementId:"targetScrollableElementId",position:"position"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],[3,"commentAnnotations","user","position","targetScrollableElementId"]],template:function(t,r){t&1&&u(0,kln,2,1,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,E7,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var Rln=["waveformContainer"];function Nln(i,o){i&1&&(ce(),_(0,"svg",14),w(1,"rect",15),b())}function Fln(i,o){if(i&1&&(_(0,"div",16),te(1),P(2,"translate"),b()),i&2){let n=l().index,e=l(4);m(),Ce(" ",M(2,1,e.indexToTimeSignal()[n])," ")}}function Lln(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),b()(),w(4,"div",10),_(5,"div",11),u(6,Nln,2,0,"svg",12)(7,Fln,3,3,"div",13),b()()),i&2){let n=o.$implicit,e=o.index;m(),ot("height",n+"px"),ue("silent",n===2),m(5),d("ngIf",e%10===0),m(),d("ngIf",e%10===0)}}function Bln(i,o){if(i&1&&(f(0),_(1,"div",4),w(2,"div",5),_(3,"div",6),u(4,Lln,8,6,"div",7),b()(),v()),i&2){let n=l(2).ngIf,e=l();m(4),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Vln(i,o){if(i&1&&(f(0),u(1,Bln,5,2,"ng-container",1),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.isAudio)}}function Uln(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),b()()),i&2){let n=o.$implicit;ot("height",n+"px")}}function jln(i,o){if(i&1&&(_(0,"div",18),u(1,Uln,3,2,"div",19),b()),i&2){let n=l(2).ngIf,e=l();ue("thread-mode",n.threadMode),m(),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function $ln(i,o){if(i&1&&(f(0),u(1,jln,2,4,"div",17),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.isAudio&&(n.collapsedMode||n.threadMode))}}function Hln(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),b()()),i&2){let n=o.$implicit,e=o.index,t=l(2).ngIf;ot("height",n+"px"),ue("active-bar",e<=t.activeBarIndex)}}function zln(i,o){if(i&1&&(f(0),_(1,"div",20),u(2,Hln,3,4,"div",21),b(),v()),i&2){let n=l().ngIf,e=l();m(2),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Gln(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),b()()()),i&2){let n=o.$implicit;m(),ot("height",n+"px")}}function Wln(i,o){if(i&1&&(f(0),_(1,"div",22)(2,"div",4),w(3,"div",5),_(4,"div",6),u(5,Gln,4,2,"div",7),b()()(),v()),i&2){let n=l().ngIf,e=l();m(5),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function qln(i,o){if(i&1&&w(0,"div",25),i&2){let n=o.$implicit;ot("height",n,"px")}}function Yln(i,o){if(i&1&&(f(0),_(1,"div",23),u(2,qln,1,2,"div",24),b(),v()),i&2){let n=l().ngIf,e=l();m(2),d("ngForOf",n.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Kln(i,o){if(i&1&&(f(0),_(1,"div",26,0),ce(),_(3,"svg",27)(4,"defs")(5,"linearGradient",28),w(6,"stop",29)(7,"stop",30)(8,"stop",31),b()(),w(9,"path",32),b()(),v()),i&2){let n=l().ngIf;m(9),x("d",n.mirroredWaveformPath)}}function Zln(i,o){if(i&1&&(f(0)(1,2),u(2,Vln,2,1,"ng-container",3)(3,$ln,2,1,"ng-container",3)(4,zln,3,2,"ng-container",3)(5,Wln,6,2,"ng-container",3)(6,Yln,3,2,"ng-container",3)(7,Kln,10,1,"ng-container",3),v()()),i&2){let n=o.ngIf;m(),d("ngSwitch",n.variant),m(),d("ngSwitchCase","expanded"),m(),d("ngSwitchCase","minified"),m(),d("ngSwitchCase","player"),m(),d("ngSwitchCase","preview"),m(),d("ngSwitchCase","preview-mini"),m(),d("ngSwitchCase","editor")}}var O_=(()=>{let o=class o{constructor(e,t){this.loggingService=e,this.recorderService=t,this.height=144,this.isRecording=!1,this.variant="expanded",this.isAudio=!1,this.collapsedMode=!1,this.threadMode=!1,this.numberOfBars=38,this.muteMic=null,this.maxVolumeArray=[],this.allowCleanUp=!0,this.animationFrameId=null,this.lastDrawTime=0,this.drawInterval=50,this.componentConfigSignal=Te({variant:"expanded",isAudio:!1,barHeights:[],collapsedMode:!1,threadMode:!1,activeBarIndex:-1,mirroredWaveformPath:""}),this.indexToTimeSignal=Ai(()=>{let r=this.componentConfigSignal().barHeights||[],a=[];for(let s=0;s<r.length;s++){let c=this.indexToTime(s);a.push(c)}return a}),this.showWaveform=()=>{try{if(!this.bufferArray||this.bufferArray.length===0)return;let r=this.bufferArray.length/this.numberOfBars,a=[];for(let s=0;s<this.numberOfBars;s++){let c=s*r,p=c+r,g=0,C=0;for(let L=Math.floor(c);L<p&&L<this.bufferArray.length;L++)g+=this.bufferArray[L],C++;let D=(C>0?g/C:0)/255*this.height*3;a.push(D)}this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a})),this.updateMirroredWaveformPath()}catch(r){this.loggingService.warn("Error in AudioWaveformComponent showWaveform: ",r)}},this.draw=()=>{try{if(!this.analyzer)return;switch(this.analyzer.getByteFrequencyData(this.dataArray),this.componentConfigSignal().variant){case"preview":this.drawPreview();break;case"preview-mini":this.drawPreviewMini();break;default:this.drawDefault()}}catch(r){this.loggingService.warn("Error in AudioWaveformComponent draw: ",r)}}}ngOnInit(){try{this.bufferArray&&this.showWaveform(),setTimeout(()=>{this.setupResizeObserver()},100),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>T(I({},r),{[t]:e[t].currentValue}))}),e.playerCurrentTime&&e.playerCurrentTime.currentValue&&this.componentConfigSignal.update(t=>T(I({},t),{activeBarIndex:this.showActiveBars(e.playerCurrentTime.currentValue,this.totalTime.display)})),(e?.recorderInitData?.currentValue?.stream||e?.previewStream?.currentValue)&&(this.stopAnimation(),this.setupAudioElements(e.recorderInitData?.currentValue?.stream||e.previewStream.currentValue),this.startAnimation()),e.muteMic&&this.handleMicMute(e.muteMic.currentValue),this.updateMirroredWaveformPath()}catch(t){this.loggingService.warn("Error in AudioWaveformComponent ngOnChanges: ",t)}}trackByBarHeights(e,t){return e+"__"+t}showActiveBars(e,t){try{let r=p=>{let[g,C]=p.split(":").map(Number);return g*60+C},a=r(e),s=r(t)-1,c=s>0?a/s:0;return a>=s?this.numberOfBars:Math.floor(c*this.numberOfBars)}catch(r){return this.loggingService.warn("Error in AudioWaveformComponent showActiveBars: ",r),-1}}ngOnDestroy(){try{this.stopAnimation(),this.cleanupAudio(),this.cleanupResizeObserver()}catch{}}setupAudioElements(e){return Q(this,null,function*(){try{this.cleanupAudio(),this.audioContext=new AudioContext,this.stream=e,this.microphone=this.audioContext.createMediaStreamSource(this.stream),this.analyzer=this.audioContext.createAnalyser(),this.analyzer.smoothingTimeConstant=.8,this.microphone.connect(this.analyzer),this.dataArray=new Uint8Array(this.analyzer.frequencyBinCount),this.analyzer.fftSize=1024,this.handleMicMute(this.muteMic)}catch{this.dataArray=new Uint8Array(0)}})}noiseGate(e,t,r){try{for(let a=0;a<e.length;a++)e[a]=Math.abs(e[a])>t?e[a]-t+r:r}catch(a){this.loggingService.warn("Error in AudioWaveformComponent noiseGate: ",a)}}startAnimation(){try{let e=t=>{t-this.lastDrawTime>=this.drawInterval&&(this.draw(),this.lastDrawTime=t),this.animationFrameId=requestAnimationFrame(e)};this.animationFrameId=requestAnimationFrame(e)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent startAnimation: ",e)}}stopAnimation(){try{this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent stopAnimation: ",e)}}drawPreview(){try{this.noiseGate(this.dataArray,128,0);let e=1e3,t=Math.floor(this.dataArray.length/e),r=[];for(let s=0;s<e;s++){let c=s*t,p=Math.min(c+t,this.dataArray.length),g=this.dataArray.slice(c,p),C=g.reduce((E,D)=>E+D,0)/g.length;r.push(C)}r.sort((s,c)=>s-c);let a=[];for(let s=0;s<e;s++)a.push(r[s],r[s]);for(let s=e-1;s>=0;s--)a.push(r[s],r[s]);this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a.filter(c=>c!==0)})),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreview: ",e)}}drawPreviewMini(){try{this.noiseGate(this.dataArray,128,0);let e=Math.max(...this.dataArray),t=Math.max(2,Math.min(14,e/128*14));if(this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[Math.max(2,t/1.5),t,Math.max(2,t/2)]})),this.updateMirroredWaveformPath(),this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let r=Math.max(...this.dataArray);this.maxVolumeArray.push(r),this.recorderService.setRecordedDataStream(this.maxVolumeArray)}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreviewMini: ",e)}}drawDefault(){try{if(this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let e=Math.max(...this.dataArray),t=e/255*this.height*3;this.maxVolumeArray.push(e),this.recorderService.setRecordedDataStream(this.maxVolumeArray),this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[...r.barHeights,t]})),this.updateMirroredWaveformPath()}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawDefault: ",e)}}cleanupAudio(){try{this.allowCleanUp&&this.variant!=="expanded"&&(this.microphone&&(this.microphone.disconnect(),this.microphone=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.analyzer&&(this.analyzer.disconnect(),this.analyzer=null),this.audioContext&&this.audioContext.state!=="closed"&&(this.audioContext.close(),this.audioContext=null),this.componentConfigSignal.update(e=>T(I({},e),{barHeights:[]})),this.updateMirroredWaveformPath())}catch{}}handleMicMute(e){try{this.stream&&this.stream.getAudioTracks().forEach(t=>{t.enabled=!e})}catch(t){this.loggingService.warn("Error in AudioWaveformComponent handleMicMute: ",t)}}indexToTime(e){try{let t=e*100,r=Math.floor(t/1e3),a=Math.floor(r/60),s=r%60,c=a.toString().padStart(2,"0"),p=s.toString().padStart(2,"0");return`${c}:${p}`}catch(t){return this.loggingService.warn("Error in AudioWaveformComponent indexToTime: ",t),""}}generateMirroredWaveformPath(e,t,r){try{if(!e||e.length===0)return"";let a=r?e.slice(0,t):e.slice(t);if(a.length===0)return"";let s=r?0:t,c=e.length,p=100,C=18/2,E=Math.min(...a),L=Math.max(...a)-E,z=L>0?C*.8/L:.1,W=.5,ee="";if(a.length>0){let le=s/c*p;ee=`M ${le} ${C} `;let ye=le,Oe=L>0?(a[0]-E)*z:W,ze=C-Math.max(Oe,W);ee+=`L ${ye} ${ze} `;for(let _e=1;_e<a.length;_e++){let fe=(s+_e)/c*p,we=(s+_e-1)/c*p,Fe=L>0?(a[_e]-E)*z:W,Ct=L>0?(a[_e-1]-E)*z:W,In=C-Math.max(Fe,W),_t=C-Math.max(Ct,W),Rt=we+(fe-we)/3,Nt=we+2*(fe-we)/3;ee+=`C ${Rt} ${_t}, ${Nt} ${In}, ${fe} ${In} `}let Ne=(s+a.length-1)/c*p;ee+=`L ${Ne} ${C} `;let Ee=Ne,Se=L>0?(a[a.length-1]-E)*z:W,Pe=C+Math.max(Se,W);ee+=`L ${Ee} ${Pe} `;for(let _e=a.length-2;_e>=0;_e--){let fe=(s+_e)/c*p,we=(s+_e+1)/c*p,Fe=L>0?(a[_e]-E)*z:W,Ct=L>0?(a[_e+1]-E)*z:W,In=C+Math.max(Fe,W),_t=C+Math.max(Ct,W),Rt=we-(we-fe)/3,Nt=we-2*(we-fe)/3;ee+=`C ${Rt} ${_t}, ${Nt} ${In}, ${fe} ${In} `}ee+="Z"}return ee}catch(a){return this.loggingService.warn("Error in AudioWaveformComponent generateMirroredWaveformPath: ",a),""}}onResize(){this.componentConfigSignal().variant==="editor"&&setTimeout(()=>{this.updateMirroredWaveformPath()},100)}updateMirroredWaveformPath(){try{let e=this.componentConfigSignal(),t=this.generateMirroredWaveformPath(e.barHeights,e.activeBarIndex+1,!1);this.componentConfigSignal.update(r=>T(I({},r),{mirroredWaveformPath:t}))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent updateMirroredWaveformPath: ",e)}}setupResizeObserver(){try{this.waveformContainer&&!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{this.updateMirroredWaveformPath()}),this.resizeObserver.observe(this.waveformContainer.nativeElement))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent setupResizeObserver: ",e)}}cleanupResizeObserver(){try{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent cleanupResizeObserver: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(_n))},o.\u0275cmp=O({type:o,selectors:[["app-audio-waveform"]],viewQuery:function(t,r){if(t&1&&nt(Rln,5),t&2){let a;Xe(a=Qe())&&(r.waveformContainer=a.first)}},hostBindings:function(t,r){t&1&&G("resize",function(){return r.onResize()},!1,IA)},inputs:{height:"height",isRecording:"isRecording",variant:"variant",isAudio:"isAudio",collapsedMode:"collapsedMode",bufferArray:"bufferArray",playerCurrentTime:"playerCurrentTime",totalTime:"totalTime",recorderInitData:"recorderInitData",threadMode:"threadMode",previewStream:"previewStream",numberOfBars:"numberOfBars",muteMic:"muteMic"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["waveformContainer",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"audio-waveform"],[1,"center-line"],[1,"waves"],["class","bar-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bar-container"],[1,"bar"],[1,"line"],[1,"time-container"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["class","time",4,"ngIf"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","width","1","height","8"],[1,"time"],["class","mini-audio-container",3,"thread-mode",4,"ngIf"],[1,"mini-audio-container"],["class","bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mini-audio-container-player"],["class","bar",3,"height","active-bar",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview"],[1,"audio-container-preview-mini"],["class","audio-container-preview-mini--bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview-mini--bar"],[1,"editor-player"],["width","100%","height","18","viewBox","0 0 100 18","preserveAspectRatio","none",1,"smooth-waveform"],["id","active-gradient","x1","0%","y1","0%","x2","0%","y2","100%"],["offset","0%","stop-color","var(--velt-text-4)","stop-opacity","1"],["offset","50%","stop-color","var(--velt-text-4)","stop-opacity","1"],["offset","100%","stop-color","var(--velt-text-4)","stop-opacity","1"],["fill","url(#active-gradient)"]],template:function(t,r){t&1&&u(0,Zln,8,7,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,qi,no,pe],styles:[".audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;border:1px solid var(--velt-border-3);border-radius:var(--velt-border-radius-lg)}.audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;height:144px;width:100%;z-index:2!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-xs);transition:height .5s ease}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar.silent[_ngcontent-%COMP%]{background:var(--velt-text-12)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{fill:var(--velt-background-4)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.mini-audio-container[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:flex-end;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container.thread-mode[_ngcontent-%COMP%]{width:74px}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-text-12);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%] .active-bar[_ngcontent-%COMP%]{background:var(--velt-accent-text)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:300px;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;border-width:0px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:144px;width:100%;z-index:2}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.audio-container-preview-mini[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:2px;width:28px;height:28px;background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl)}.audio-container-preview-mini[_ngcontent-%COMP%] .audio-container-preview-mini--bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-white);border-radius:var(--velt-border-radius-2xs);transition:height .1s}.editor-player[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;position:relative;margin-left:1.5px}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-text-12)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-accent-text)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:d .2s ease-in-out}"],changeDetection:0});let i=o;return i})();var Xln=["knob"],Qln=["valueIndicatorContainer"];function Jln(i,o){if(i&1&&(_(0,"div",2,1)(2,"div",5)(3,"span",6),te(4),b()()()),i&2){let n=l();m(4),Ge(n.valueIndicatorText)}}var ecn=["trackActive"],tcn=["*"];function ncn(i,o){if(i&1&&w(0,"div"),i&2){let n=o.$implicit,e=o.$index,t=l(3);tr(n===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),ot("transform",t._calcTickMarkTransform(e))}}function icn(i,o){if(i&1&&aX(0,ncn,1,4,"div",8,rX),i&2){let n=l(2);sX(n._tickMarks)}}function ocn(i,o){if(i&1&&(_(0,"div",6,1),u(2,icn,2,0),b()),i&2){let n=l();m(2),uc(n._cachedWidth?2:-1)}}function rcn(i,o){if(i&1&&w(0,"mat-slider-visual-thumb",7),i&2){let n=l();d("discrete",n.discrete)("thumbPosition",1)("valueIndicatorText",n.startValueIndicatorText)}}var $n=function(i){return i[i.START=1]="START",i[i.END=2]="END",i}($n||{}),A_=function(i){return i[i.ACTIVE=0]="ACTIVE",i[i.INACTIVE=1]="INACTIVE",i}(A_||{}),LG=new gt("_MatSlider"),S_e=new gt("_MatSliderThumb"),acn=new gt("_MatSliderRangeThumb"),b_e=new gt("_MatSliderVisualThumb");var scn=(()=>{class i{_cdr=be(nn);_ngZone=be(Vt);_slider=be(LG);_renderer=be(eo);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=be(R).nativeElement;_platform=be(fo);constructor(){}ngAfterViewInit(){let n=this._slider._getInput(this.thumbPosition);n&&(this._ripple.radius=24,this._sliderInput=n,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let e=this._sliderInputEl,t=this._renderer;this._listenerCleanups=[t.listen(e,"pointermove",this._onPointerMove),t.listen(e,"pointerdown",this._onDragStart),t.listen(e,"pointerup",this._onDragEnd),t.listen(e,"pointerleave",this._onMouseLeave),t.listen(e,"focus",this._onFocus),t.listen(e,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(n=>n())}_onPointerMove=n=>{if(this._sliderInput._isFocused)return;let e=this._hostElement.getBoundingClientRect(),t=this._slider._isCursorOnSliderThumb(n,e);this._isHovered=t,t?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=n=>{n.button===0&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(n){return n?.state===as.FADING_IN||n?.state===as.VISIBLE}_showRipple(n,e){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===$n.START?$n.END:$n.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!e)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:n,centered:!0,persistent:!0})}_hideRipple(n){if(n?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let e=this._getSibling();e._isShowingAnyRipple()||(this._hideValueIndicator(),e._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===$n.START?$n.END:$n.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(e,t){if(e&1&&(nt(qu,5),nt(Xln,5),nt(Qln,5)),e&2){let r;Xe(r=Qe())&&(t._ripple=r.first),Xe(r=Qe())&&(t._knob=r.first),Xe(r=Qe())&&(t._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[V([{provide:b_e,useExisting:i}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(e,t){e&1&&(u(0,Jln,5,1,"div",2),w(1,"div",3,0)(3,"div",4)),e&2&&(uc(t.discrete?0:-1),m(3),d("matRippleDisabled",!0))},dependencies:[qu],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}
537
537
  `],encapsulation:2,changeDetection:0})}return i})(),I_e=(()=>{class i{_ngZone=be(Vt);_cdr=be(nn);_elementRef=be(R);_dir=be($r,{optional:!0});_globalRippleOptions=be(WU,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(n){this._disabled=n;let e=this._getInput($n.END),t=this._getInput($n.START);e&&(e.disabled=this._disabled),t&&(t.disabled=this._disabled)}_disabled=!1;get discrete(){return this._discrete}set discrete(n){this._discrete=n,this._updateValueIndicatorUIs()}_discrete=!1;showTickMarks=!1;get min(){return this._min}set min(n){let e=isNaN(n)?this._min:n;this._min!==e&&this._updateMin(e)}_min=0;color;disableRipple=!1;_updateMin(n){let e=this._min;this._min=n,this._isRange?this._updateMinRange({old:e,new:n}):this._updateMinNonRange(n),this._onMinMaxOrStepChange()}_updateMinRange(n){let e=this._getInput($n.END),t=this._getInput($n.START),r=e.value,a=t.value;t.min=n.new,e.min=Math.max(n.new,t.value),t.max=Math.min(e.max,e.value),t._updateWidthInactive(),e._updateWidthInactive(),n.new<n.old?this._onTranslateXChangeBySideEffect(e,t):this._onTranslateXChangeBySideEffect(t,e),r!==e.value&&this._onValueChange(e),a!==t.value&&this._onValueChange(t)}_updateMinNonRange(n){let e=this._getInput($n.END);if(e){let t=e.value;e.min=n,e._updateThumbUIByValue(),this._updateTrackUI(e),t!==e.value&&this._onValueChange(e)}}get max(){return this._max}set max(n){let e=isNaN(n)?this._max:n;this._max!==e&&this._updateMax(e)}_max=100;_updateMax(n){let e=this._max;this._max=n,this._isRange?this._updateMaxRange({old:e,new:n}):this._updateMaxNonRange(n),this._onMinMaxOrStepChange()}_updateMaxRange(n){let e=this._getInput($n.END),t=this._getInput($n.START),r=e.value,a=t.value;e.max=n.new,t.max=Math.min(n.new,e.value),e.min=t.value,e._updateWidthInactive(),t._updateWidthInactive(),n.new>n.old?this._onTranslateXChangeBySideEffect(t,e):this._onTranslateXChangeBySideEffect(e,t),r!==e.value&&this._onValueChange(e),a!==t.value&&this._onValueChange(t)}_updateMaxNonRange(n){let e=this._getInput($n.END);if(e){let t=e.value;e.max=n,e._updateThumbUIByValue(),this._updateTrackUI(e),t!==e.value&&this._onValueChange(e)}}get step(){return this._step}set step(n){let e=isNaN(n)?this._step:n;this._step!==e&&this._updateStep(e)}_step=1;_updateStep(n){this._step=n,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let n=this._getInput($n.END),e=this._getInput($n.START),t=n.value,r=e.value,a=e.value;n.min=this._min,e.max=this._max,n.step=this._step,e.step=this._step,this._platform.SAFARI&&(n.value=n.value,e.value=e.value),n.min=Math.max(this._min,e.value),e.max=Math.min(this._max,n.value),e._updateWidthInactive(),n._updateWidthInactive(),n.value<a?this._onTranslateXChangeBySideEffect(e,n):this._onTranslateXChangeBySideEffect(n,e),t!==n.value&&this._onValueChange(n),r!==e.value&&this._onValueChange(e)}_updateStepNonRange(){let n=this._getInput($n.END);if(n){let e=n.value;n.step=this._step,this._platform.SAFARI&&(n.value=n.value),n._updateThumbUIByValue(),e!==n.value&&this._onValueChange(n)}}displayWith=n=>`${n}`;_tickMarks;_noopAnimations;_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=be(fo);constructor(){be(Fa).load(yv);let n=be(mr,{optional:!0});this._noopAnimations=n==="NoopAnimations",this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl=this._dir.value==="rtl")}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let n=this._getInput($n.END),e=this._getInput($n.START);this._isRange=!!n&&!!e,this._cdr.detectChanges();let t=this._getThumb($n.END);this._rippleRadius=t._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(n,e):this._initUINonRange(n),this._updateTrackUI(n),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(n){n.initProps(),n.initUI(),this._updateValueIndicatorUI(n),this._hasViewInitialized=!0,n._updateThumbUIByValue()}_initUIRange(n,e){n.initProps(),n.initUI(),e.initProps(),e.initUI(),n._updateMinMax(),e._updateMinMax(),n._updateStaticStyles(),e._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,n._updateThumbUIByValue(),e._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl=this._dir?.value==="rtl",this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){let n=this._getInput($n.END),e=this._getInput($n.START);n._setIsLeftThumb(),e._setIsLeftThumb(),n.translateX=n._calcTranslateXByValue(),e.translateX=e._calcTranslateXByValue(),n._updateStaticStyles(),e._updateStaticStyles(),n._updateWidthInactive(),e._updateWidthInactive(),n._updateThumbUIByValue(),e._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput($n.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb($n.START)._isActive||this._getThumb($n.END)._isActive}_getValue(n=$n.END){let e=this._getInput(n);return e?e.value:this.min}_skipUpdate(){return!!(this._getInput($n.START)?._skipUIUpdate||this._getInput($n.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(n){let e=this._trackActive.nativeElement.style;e.left=n.left,e.right=n.right,e.transformOrigin=n.transformOrigin,e.transform=n.transform}_calcTickMarkTransform(n){let e=n*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-e:e}px`}_onTranslateXChange(n){this._hasViewInitialized&&(this._updateThumbUI(n),this._updateTrackUI(n),this._updateOverlappingThumbUI(n))}_onTranslateXChangeBySideEffect(n,e){this._hasViewInitialized&&(n._updateThumbUIByValue(),e._updateThumbUIByValue())}_onValueChange(n){this._hasViewInitialized&&(this._updateValueIndicatorUI(n),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let n=this._getInput($n.END),e=this._getInput($n.START);n._updateThumbUIByValue(),e._updateThumbUIByValue(),n._updateStaticStyles(),e._updateStaticStyles(),n._updateMinMax(),e._updateMinMax(),n._updateWidthInactive(),e._updateWidthInactive()}else{let n=this._getInput($n.END);n&&n._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){let n=this._getInput($n.START),e=this._getInput($n.END);return!n||!e?!1:e.translateX-n.translateX<20}_updateOverlappingThumbClassNames(n){let e=n.getSibling(),t=this._getThumb(n.thumbPosition);this._getThumb(e.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),t._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(n){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(n))}_updateThumbUI(n){if(this._skipUpdate())return;let e=this._getThumb(n.thumbPosition===$n.END?$n.END:$n.START);e._hostElement.style.transform=`translateX(${n.translateX}px)`}_updateValueIndicatorUI(n){if(this._skipUpdate())return;let e=this.displayWith(n.value);if(this._hasViewInitialized?n._valuetext.set(e):n._hostElement.setAttribute("aria-valuetext",e),this.discrete){n.thumbPosition===$n.START?this.startValueIndicatorText=e:this.endValueIndicatorText=e;let t=this._getThumb(n.thumbPosition);e.length<3?t._hostElement.classList.add("mdc-slider__thumb--short-value"):t._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let n=this._getInput($n.END),e=this._getInput($n.START);n&&this._updateValueIndicatorUI(n),e&&this._updateValueIndicatorUI(e)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let n=this._step&&this._step>0?this._step:1,t=(Math.floor(this.max/n)*n-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*t}_updateTrackUI(n){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(n):this._updateTrackUINonRange(n))}_updateTrackUIRange(n){let e=n.getSibling();if(!e||!this._cachedWidth)return;let t=Math.abs(e.translateX-n.translateX)/this._cachedWidth;n._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-e.translateX}px`,transformOrigin:"right",transform:`scaleX(${t})`}):this._setTrackActiveStyles({left:`${e.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${t})`})}_updateTrackUINonRange(n){this._isRtl?this._setTrackActiveStyles({left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-n.fillPercentage})`}):this._setTrackActiveStyles({left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${n.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||this.step===void 0||this.min===void 0||this.max===void 0)return;let n=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(n):this._updateTickMarkUINonRange(n)}_updateTickMarkUINonRange(n){let e=this._getValue(),t=Math.max(Math.round((e-this.min)/n),0)+1,r=Math.max(Math.round((this.max-e)/n),0)-1;this._isRtl?t++:r++,this._tickMarks=Array(t).fill(A_.ACTIVE).concat(Array(r).fill(A_.INACTIVE))}_updateTickMarkUIRange(n){let e=this._getValue(),t=this._getValue($n.START),r=Math.max(Math.round((t-this.min)/n),0),a=Math.max(Math.round((e-t)/n)+1,0),s=Math.max(Math.round((this.max-e)/n),0);this._tickMarks=Array(r).fill(A_.INACTIVE).concat(Array(a).fill(A_.ACTIVE),Array(s).fill(A_.INACTIVE))}_getInput(n){if(n===$n.END&&this._input)return this._input;if(this._inputs?.length)return n===$n.START?this._inputs.first:this._inputs.last}_getThumb(n){return n===$n.END?this._thumbs?.last:this._thumbs?.first}_setTransition(n){this._hasAnimation=!this._platform.IOS&&n&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(n,e){let t=e.width/2,r=e.x+t,a=e.y+t,s=n.clientX-r,c=n.clientY-a;return Math.pow(s,2)+Math.pow(c,2)<Math.pow(t,2)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider"]],contentQueries:function(e,t,r){if(e&1&&(Ws(r,S_e,5),Ws(r,acn,4)),e&2){let a;Xe(a=Qe())&&(t._input=a.first),Xe(a=Qe())&&(t._inputs=a)}},viewQuery:function(e,t){if(e&1&&(nt(ecn,5),nt(b_e,5)),e&2){let r;Xe(r=Qe())&&(t._trackActive=r.first),Xe(r=Qe())&&(t._thumbs=r)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(e,t){e&2&&(tr("mat-"+(t.color||"primary")),ue("mdc-slider--range",t._isRange)("mdc-slider--disabled",t.disabled)("mdc-slider--discrete",t.discrete)("mdc-slider--tick-marks",t.showTickMarks)("_mat-animation-noopable",t._noopAnimations))},inputs:{disabled:[2,"disabled","disabled",mi],discrete:[2,"discrete","discrete",mi],showTickMarks:[2,"showTickMarks","showTickMarks",mi],min:[2,"min","min",hc],color:"color",disableRipple:[2,"disableRipple","disableRipple",mi],max:[2,"max","max",hc],step:[2,"step","step",hc],displayWith:"displayWith"},exportAs:["matSlider"],features:[V([{provide:LG,useExisting:i}])],ngContentSelectors:tcn,decls:9,vars:5,consts:[["trackActive",""],["tickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(e,t){e&1&&(jt(),Bt(0),_(1,"div",2),w(2,"div",3),_(3,"div",4),w(4,"div",5,0),b(),u(6,ocn,3,1,"div",6),b(),u(7,rcn,1,3,"mat-slider-visual-thumb",7),w(8,"mat-slider-visual-thumb",7)),e&2&&(m(6),uc(t.showTickMarks?6:-1),m(),uc(t._isRange?7:-1),m(),d("discrete",t.discrete)("thumbPosition",2)("valueIndicatorText",t.endValueIndicatorText))},dependencies:[scn],styles:[`.mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mdc-slider-active-track-height, 4px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mdc-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mdc-slider-inactive-track-height, 4px);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mdc-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-width:calc(var(--mdc-slider-handle-height, 20px)/2) calc(var(--mdc-slider-handle-width, 20px)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size, 2px);height:var(--mdc-slider-with-tick-marks-container-size, 2px);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:""}
538
538
  `],encapsulation:2,changeDetection:0})}return i})();var lcn={provide:$m,useExisting:Br(()=>BG),multi:!0};var BG=(()=>{class i{_ngZone=be(Vt);_elementRef=be(R);_cdr=be(nn);_slider=be(LG);_platform=be(fo);_listenerCleanups;get value(){return hc(this._hostElement.value,0)}set value(n){n=isNaN(n)?0:n;let e=n+"";if(!this._hasSetInitialValue){this._initialValue=e;return}this._isActive||this._setValue(e)}_setValue(n){this._hostElement.value=n,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}valueChange=new Me;dragStart=new Me;dragEnd=new Me;get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(this._translateX===void 0&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(n){this._translateX=n}_translateX;thumbPosition=$n.END;get min(){return hc(this._hostElement.min,0)}set min(n){this._hostElement.min=n+"",this._cdr.detectChanges()}get max(){return hc(this._hostElement.max,0)}set max(n){this._hostElement.max=n+"",this._cdr.detectChanges()}get step(){return hc(this._hostElement.step,0)}set step(n){this._hostElement.step=n+"",this._cdr.detectChanges()}get disabled(){return mi(this._hostElement.disabled)}set disabled(n){this._hostElement.disabled=n,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?this._translateX===0?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_hostElement=this._elementRef.nativeElement;_valuetext=Te("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(n){this._isFocused=n}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new tt;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){let n=be(eo);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[n.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),n.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),n.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))]})}ngOnDestroy(){this._listenerCleanups.forEach(n=>n()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,this._initialValue===void 0?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(n){if(!(this.disabled||n.button!==0)){if(this._platform.IOS){let e=this._slider._isCursorOnSliderThumb(n,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=e,this._updateWidthActive(),this._slider._updateDimensions();return}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(n,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(n),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(n){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(n)},0)}_fixValue(n){let e=n.clientX-this._slider._cachedLeft,t=this._slider._cachedWidth,r=this._slider.step===0?1:this._slider.step,a=Math.floor((this._slider.max-this._slider.min)/r),s=this._slider._isRtl?1-e/t:e/t,p=Math.round(s*a)/a*(this._slider.max-this._slider.min)+this._slider.min,g=Math.round(p/r)*r,C=this.value;if(g===C){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(n,{withAnimation:this._slider._hasAnimation});return}this.value=g,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(n,{withAnimation:this._slider._hasAnimation})}_onPointerMove(n){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(n)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(n){let e=this._tickMarkOffset,t=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(n,t),e)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset}_calcTranslateXByPointerEvent(n){return n.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-this._tickMarkOffset*2}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(n){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(n)}_updateThumbUIByPointerEvent(n,e){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(n)),this._updateThumbUI(e)}_updateThumbUI(n){this._slider._setTransition(!!n?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(n){(this._isControlInitialized||n!==null)&&(this.value=n)}registerOnChange(n){this._onChangeFn=n,this._isControlInitialized=!0}registerOnTouched(n){this._onTouchedFn=n}setDisabledState(n){this.disabled=n}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=$t({type:i,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(e,t){e&1&&G("change",function(){return t._onChange()})("input",function(){return t._onInput()})("blur",function(){return t._onBlur()})("focus",function(){return t._onFocus()}),e&2&&x("aria-valuetext",t._valuetext())},inputs:{value:[2,"value","value",hc]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[V([lcn,{provide:S_e,useExisting:i}])]})}return i})();var E_e=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=mn({type:i});static \u0275inj=dn({imports:[Bo,Sv]})}return i})();var dcn=["*"],R7=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(r,a),this.loggingService=e,this.customFilterService=t,this.elementRef=r,this.themeService=a,this.headingMode=!1,this.changeStatus=new Me,this.componentId="velt-unresolve-button"}ngOnInit(){this.setupA11yAttributes()}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","button"),e.setAttribute("aria-label","Unresolve comment"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in UnresolveButtonComponent setupA11yAttributes: ",e)}}unresolveComment(e){this.loggingService.log("%c[WB] Calling FUNCTION: unresolveComment","color: green;");try{if(!this.annotation)return;this.changeStatus.emit({status:this.customFilterService.defaultStatus,statusOptionType:e})}catch(t){this.catchError("Error in UnresolveButtonComponent unresolveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(ko),h(R),h(Ye))},o.\u0275cmp=O({type:o,selectors:[["app-unresolve-button"]],inputs:{annotation:"annotation",sidebarMode:"sidebarMode",headingMode:"headingMode"},outputs:{changeStatus:"changeStatus"},standalone:!1,features:[B],ngContentSelectors:dcn,decls:3,vars:8,consts:[["type","unresolve",3,"clicked","tooltip","darkMode","colorMode"]],template:function(t,r){t&1&&(jt(),_(0,"app-tooltip-button",0),P(1,"translate"),G("clicked",function(){return r.unresolveComment("button")}),Bt(2),b()),t&2&&(ot("color",(r.annotation==null||r.annotation.status==null?null:r.annotation.status.color)+" !important"),d("tooltip",M(1,6,"Unresolve"))("darkMode",r.darkMode)("colorMode",r.headingMode),x("data-testid",r.componentId+"-tooltip-button"))},dependencies:[tm,pe],encapsulation:2});let i=o;return i})();var x_e=(()=>{let o=class o{constructor(e){this.loggingService=e,this.commentTextData$=new ve({});try{this.loggingService.log("%c[WB] Creating CLASS: CommentTextService","color: blue;")}catch(t){this.loggingService.catch("Error in CommentTextService constructor: ",t)}}setCommentTextData(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: setCommentTextData","color: green;");let t=e.annotationId||e.multiThreadAnnotationId;if(t){let r=e.componentId,a=this.commentTextData$.getValue();a[t]||(a[t]={}),a[t][r]=e,this.commentTextData$.next(a),this.updateLastPositionInDataByAnnotationId(t)}}catch(t){this.loggingService.catch("Error in CommentTextService setCommentTextData: ",t)}}removeCommentTextData(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: removeCommentTextData","color: green;");let t=e.annotationId||e.multiThreadAnnotationId;if(t){let r=e.componentId,a=this.commentTextData$.getValue();delete a[t][r],this.commentTextData$.next(a),this.updateLastPositionInDataByAnnotationId(t)}}catch(t){this.loggingService.catch("Error in CommentTextService removeCommentTextData: ",t)}}updateLastPositionInDataByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: updateLastPositionInDataByAnnotationId","color: green;");let t=this.commentTextData$.getValue();Object.values(t[e]).forEach(r=>{r.last=this.checkIfLast(r)}),this.commentTextData$.next(t)}catch(t){this.loggingService.catch("Error in CommentTextService updateLastPositionInDataByAnnotationId: ",t)}}checkIfLast(e){try{if(this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: checkIfLast","color: green;"),e?.elementRef?.nativeElement){let t=[];if(e.annotationId?t=Array.from(document.querySelectorAll(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.ANNOTATION_ID}="${e.annotationId}"]`)):e.multiThreadAnnotationId&&(t=Array.from(document.querySelectorAll(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.MULTI_THREAD_ANNOTATION_ID}="${e.multiThreadAnnotationId}"]`))),t.length&&t[t.length-1]===e.elementRef.nativeElement)return!0}return!1}catch(t){return this.loggingService.catch("Error in CommentTextService checkIfLast: ",t),!1}}getCommentTextDataByAnnotationIdAndComponentId(e,t){try{return this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: getCommentTextDataByAnnotationIdAndComponentId","color: green;"),this.commentTextData$.pipe(de(r=>r&&e&&t&&r[e]?r[e][t]:null))}catch(r){return this.loggingService.catch("Error in CommentTextService getCommentTextDataByAnnotationIdAndComponentId: ",r),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(y))},o.\u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var pcn=["overlay"],gcn=["*"],ucn=()=>["snippyly-overlay-panel","velt-overlay-panel"];function hcn(i,o){if(i&1){let n=Y();f(0),_(1,"velt-multi-thread-comment-dialog-internal",6),P(2,"translate"),G("updateOverlayPosition",function(){N(n);let t=l(4);return F(t.updateOverlayPosition())})("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment(t))}),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),d("multiThreadAnnotationId",n.commentPinAnnotation.annotationId)("annotation",n.commentPinAnnotation)("user",n.user)("commentPinSelected",!0),x("data-testid",e.componentTestId+"-multi-thread-dialog")("role","dialog")("aria-label",M(2,7,"Multi-thread comment dialog"))}}function fcn(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-dialog",7),P(1,"translate"),G("updateOverlayPosition",function(){N(n);let t=l(4);return F(t.updateOverlayPosition())})("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("annotation",n.commentPinAnnotation)("user",n.user)("commentPinSelected",n.commentPinSelected),x("data-testid",e.componentTestId+"-comment-dialog")("role","dialog")("aria-label",M(1,6,"Comment dialog"))}}function vcn(i,o){if(i&1&&u(0,hcn,3,9,"ng-container",5)(1,fcn,2,8,"ng-template",null,1,Ie),i&2){let n=me(2),e=l(2).ngIf;d("ngIf",(e==null||e.commentPinAnnotation==null?null:e.commentPinAnnotation.type)==="multiThread")("ngIfElse",n)}}function Ccn(i,o){if(i&1&&u(0,vcn,3,2,"ng-template",4,0,Ie),i&2){let n=l().ngIf,e=l();d("cdkConnectedOverlayOrigin",e.origin)("cdkConnectedOverlayOpen",(!n.mobileMode||!n.isPhone)&&!n.inboxMode&&!n.streamMode&&(!n.inlineCommentMode||n.isInsidePdfViewer)&&n.floatingCommentsEnabled&&(n.last&&n.commentPinSelected||n.commentPinHover&&!n.commentPinSelected))("cdkConnectedOverlayPanelClass",pt(7,ucn))("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)}}function _cn(i,o){if(i&1&&(f(0),Bt(1),u(2,Ccn,2,8,"ng-template",3),v()),i&2){let n=l();m(2),d("ngIf",n.origin)}}var T_e=(()=>{let o=class o{onPointerOverListener(e){try{this.onPointerOver(e),e.stopPropagation()}catch(t){this.catchError("Error in VeltCommentTextComponent onPointerOverListener: ",t)}}onPointerOutListener(e){try{this.onPointerOut(),e.stopPropagation()}catch(t){this.catchError("Error in VeltCommentTextComponent onPointerOutListener: ",t)}}onPointerDownListener(e){try{e.stopPropagation()}catch(t){this.catchError("Error in VeltCommentTextComponent onPointerDownListener: ",t)}}onPointerUpListener(e){try{this.togglePinSelection(),e.stopPropagation()}catch(t){this.catchError("Error in VeltCommentTextComponent onPointerUpListener: ",t)}}constructor(e,t,r,a,s,c,p){this.authService=e,this.commentService=t,this.commentTextService=r,this.domService=a,this.loggingService=s,this.elementRef=c,this.cd=p,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=Te({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},commentPinHover:!1,commentPinSelected:!1,isPhone:!1,mobileMode:!1,streamMode:!1,inboxMode:!1,textClicked:!1,floatingCommentsEnabled:!0,sidebarVisible:!1,inlineCommentMode:!1,isInsidePdfViewer:!1,first:!1,last:!1}),this.selectedAnnotationsMap={},this.isDialogOnHoverEnabled=!1,this.subscriptions=[],this.componentId=wn(),this.commentAvailable=!1,this.commentSelected=!1,this.componentTestId="velt-comment-text";try{this.loggingService.log("%c[WB] Creating Class: VeltCommentTextComponent","color: blue;"),this.origin=new Xt(this.elementRef),this.subscriptions.push(this.authService.getUser$().subscribe(g=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{user:g}),C))},g=>{this.catchError("Error in VeltCommentTextComponent getUser$ subscription: ",g)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(g=>{this.selectedAnnotationsMap=g,this.componentConfigSignal.update(C=>(C=T(I({},C),{selectedAnnotationsMap:g}),C)),this.checkPinSelection()},g=>{this.catchError("Error in VeltCommentTextComponent getSelectedAnnotationsMap$ subscription: ",g)})),this.subscriptions.push(this.commentService.getEnableDialogOnHover$().subscribe(g=>{this.isDialogOnHoverEnabled=g},g=>{this.catchError("Error in CommentPinComponent getEnableDialogOnHover subscription: ",g)})),this.subscriptions.push(this.commentService.onCommentAnnotationDelete$().subscribe(g=>{g?.annotationId&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&g.annotationId===this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.removeThisComponent()},g=>{this.catchError("Error in VeltCommentTextComponent onCommentAnnotationDelete$ subscription: ",g)})),this.subscriptions.push(this.commentService.onMultiThreadCommentAnnotationDelete$().subscribe(g=>{g?.annotationId&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&g.annotationId===this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.removeThisComponent()},g=>{this.catchError("Error in VeltCommentTextComponent onMultiThreadCommentAnnotationDelete$ subscription: ",g)})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{!!(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.updateOverlayPosition()}catch(g){this.catchError("Error in VeltCommentTextComponent updateCommentDialogPositionTrigger$: ",g)}},g=>{this.catchError("Error in VeltCommentTextComponent updateCommentDialogPositionTrigger$ subscription: ",g)}))}catch(g){this.catchError("Error in VeltCommentTextComponent constructor: ",g)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentTestId)}catch(e){this.loggingService.catch("Error in VeltCommentTextComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{if(this.componentConfigSignal().textClicked&&!e)return;let t=e||this.componentConfigSignal().commentPinAnnotation;if(t)if(this.selectedAnnotationsMap[t.annotationId])e||(document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t?.annotationId}"]`)?this.domService.resetSelectedAnnotationsMap(!0,"comments"):(this.componentConfigSignal.update(a=>(a=T(I({},a),{textClicked:!0}),a)),this.domService.toggleAnnotationSelection(t)));else{let r=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(r||(r=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),r){let a=r.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(a){let s=document.getElementById(`comment-pin-container-${a}`)||document.querySelector(`[data-velt-id='${a}']`);s&&(s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.componentConfigSignal.update(a=>(a=T(I({},a),{textClicked:!0}),a)),this.domService.toggleAnnotationSelection(t)}}catch(t){this.catchError("Error in VeltCommentTextComponent togglePinSelection: ",t)}}ngAfterViewInit(){try{this.commentTextData={annotationId:this.annotationId,multiThreadAnnotationId:this.multiThreadAnnotationId,componentId:this.componentId,elementRef:this.elementRef,last:!1},this.commentTextService.setCommentTextData(this.commentTextData),this.subscriptions.push(this.commentTextService.getCommentTextDataByAnnotationIdAndComponentId(this.annotationId||this.multiThreadAnnotationId,this.componentId).subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{last:e?.last||!1}),t)),this.checkPinSelection()},e=>{this.catchError("Error in VeltCommentTextComponent getCommentTextDataByAnnotationIdAndComponentId subscription: ",e)}))}catch(e){this.catchError("Error in VeltCommentTextComponent ngAfterViewInit: ",e)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationByAnnotationId(this.annotationId),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(t){this.catchError("Error in VeltCommentTextComponent ngOnChanges: ",t)}}getCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationByAnnotationId(e).pipe(he(t=>this.commentService.getResolvedCommentsOnDom$().pipe(de(r=>(this.resolvedCommentsOnDom=r,t)))),he(t=>this.domService.getSelectedAnnotationsMap$().pipe(de(r=>({commentPinAnnotation:t,selectedAnnotationsMap:r||{}}))))).subscribe(t=>{let r;t?.commentPinAnnotation&&(this.resolvedCommentsOnDom||this.commentService.getFilterCommentsOnDom()&&this.commentService.getCommentsFromSidebarMap()||t?.commentPinAnnotation?.status?.type!=="terminal"||t?.selectedAnnotationsMap[t.commentPinAnnotation.annotationId])&&(r=t.commentPinAnnotation),this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinAnnotation:r}),s));let a=!!r;this.commentAvailable!==a&&(this.commentAvailable=a,this.cd.markForCheck()),this.checkPinSelection()})}catch(t){this.catchError("Error in VeltCommentTextComponent getCommentAnnotationByAnnotationId: ",t)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(t=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{commentPinAnnotation:t}),a));let r=!!t;this.commentAvailable!==r&&(this.commentAvailable=r,this.cd.markForCheck()),this.checkPinSelection()})}catch(t){this.catchError("Error in VeltCommentTextComponent getMultiThreadCommentAnnotationByAnnotationId: ",t)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentTextComponent unsubscribe: ",e)}}checkPinSelection(){try{this.selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation?.annotationId]?this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinSelected:!0}),e?.commentPinAnnotation?.isDraft&&(e.textClicked=!!e.last),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinSelected:!1,textClicked:!1}),e)),sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID)===this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().last&&(this.componentConfigSignal.update(e=>(e=T(I({},e),{textClicked:!0}),e)),sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID)),this.componentConfigSignal().commentPinSelected!==this.commentSelected&&(this.commentSelected=this.componentConfigSignal().commentPinSelected,this.cd.markForCheck())}catch(e){this.catchError("Error in VeltCommentTextComponent checkPinSelection: ",e)}}onPointerOver(e){try{if(this.componentConfigSignal().commentPinHover)return;e.buttons?this.componentConfigSignal().commentPinHover&&this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinHover:!1}),t)):!this.componentConfigSignal().commentPinHover&&this.isDialogOnHoverEnabled&&this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinHover:!0}),t))}catch(t){this.catchError("Error in VeltCommentTextComponent onPointerOver: ",t)}}onPointerOut(){this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinHover:!1}),e))}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().commentPinAnnotation?.annotationId),this.commentDialogOverlay&&this.commentDialogOverlay?.overlayRef?.updatePosition()}catch{}}removeThisComponent(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: removeThisComponent","color: green;"),this.clearRemoveThisComponentTimeout();try{if(this.elementRef.nativeElement?.closest(`[${j.ATTRIBUTES.SLATE_EDITOR}]`))return}catch(e){this.catchError("Error in VeltCommentTextComponent removeThisComponent: ",e)}this.removeThisComponentTimeout=setTimeout(()=>{if(this.elementRef.nativeElement?.isConnected){let e=this.elementRef.nativeElement.parentElement,t=this.elementRef.nativeElement.childNodes,r=document.createDocumentFragment();for(let a=0;a<t.length;a++){let s=t[a];s?.nodeType!==Node.COMMENT_NODE&&r.appendChild(s)}e.insertBefore(r,this.elementRef.nativeElement),e.removeChild(this.elementRef.nativeElement),e.normalize()}},500)}catch(e){this.catchError("Error in VeltCommentTextComponent removeThisComponent: ",e)}}clearRemoveThisComponentTimeout(){try{this.removeThisComponentTimeout&&(clearTimeout(this.removeThisComponentTimeout),this.removeThisComponentTimeout=void 0)}catch(e){this.catchError("Error in VeltCommentTextComponent clearRemoveThisComponentTimeout: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: ngOnDestroy","color: green;"),this.clearRemoveThisComponentTimeout(),this.unsubscribe(),this.commentTextData&&this.commentTextService.removeCommentTextData(this.commentTextData)}catch(e){this.catchError("Error in VeltCommentTextComponent ngOnDestroy: ",e)}}saveComment(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: saveComment","color: green;"),this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(t){this.catchError("Error in VeltCommentTextComponent saveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(x_e),h(Be),h(y),h(R),h(nn))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-text-internal"]],viewQuery:function(t,r){if(t&1&&nt(pcn,5),t&2){let a;Xe(a=Qe())&&(r.commentDialogOverlay=a.first)}},hostVars:2,hostBindings:function(t,r){t&1&&G("pointerover",function(s){return r.onPointerOverListener(s)})("pointerout",function(s){return r.onPointerOutListener(s)})("pointerdown",function(s){return r.onPointerDownListener(s)})("pointerup",function(s){return r.onPointerUpListener(s)}),t&2&&x("comment-available",r.commentAvailable)("comment-selected",r.commentSelected)},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId"},standalone:!1,features:[Ze],ngContentSelectors:gcn,decls:1,vars:1,consts:[["overlay","cdkConnectedOverlay"],["commentDialogRef",""],[4,"ngIf"],[3,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],[4,"ngIf","ngIfElse"],[3,"updateOverlayPosition","saveComment","multiThreadAnnotationId","annotation","user","commentPinSelected"],[3,"updateOverlayPosition","saveComment","annotation","user","commentPinSelected"]],template:function(t,r){t&1&&(jt(),u(0,_cn,3,1,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,on,Xo,hs,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var D_e=(()=>{let o=class o{transform(e,t=!0){try{if(!t)return e;if(!e)return"";if(e.includes("@"))return e.split("@")[0];let r=e.trim().split(" ");if(r.length<=1)return e;let s=r.pop()?.[0].toUpperCase();return`${r.join(" ")} ${s}.`}catch{return e}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"shortUserName",type:o,pure:!0,standalone:!1});let i=o;return i})();var w_e=(()=>{let o=class o{constructor(e){this.domService=e}transform(e){try{return this.domService.sanitizeHtml(e)}catch{return e}}};o.\u0275fac=function(t){return new(t||o)(h(Be,16))},o.\u0275pipe=$i({name:"sanitizeHtml",type:o,pure:!0,standalone:!1});let i=o;return i})();var O_e=(()=>{let o=class o{transform(e,t,r){try{return!e||!t||e.length===0?e:e.sort((s,c)=>{let p=s[t],g=c[t];return p<g?r==="asc"?-1:1:p>g?r==="asc"?1:-1:0})}catch{return e}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"orderBy",type:o,pure:!0,standalone:!1});let i=o;return i})();var A_e=(()=>{let o=class o{transform(e,t){try{return!e||e.length===0?e:[...e].sort((r,a)=>r.value.id===t||!t&&r.value.id==="other"?-1:a.value.id===t||!t&&a.value.id==="other"?1:0)}catch{return e}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"orderByThisPageInSidebarFilter",type:o,pure:!0,standalone:!1});let i=o;return i})();var P_e=i=>({componentConfigSignal:i}),ycn=(i,o)=>({condition:i,data:o}),Scn=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-notifications-panel-settings-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function bcn(i,o){if(i&1&&(f(0),_(1,"div",3),w(2,"app-notifications-panel-settings-header",4),_(3,"div",5),w(4,"app-notifications-panel-settings-title",4)(5,"app-notifications-panel-settings-description",4),b(),w(6,"app-notifications-panel-settings-list",4)(7,"app-notifications-panel-settings-footer",4),b(),v()),i&2){let n=l(4);m(2),d("componentConfigSignal",n.componentConfigSignal),m(2),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)}}function Icn(i,o){if(i&1&&(f(0),u(1,bcn,8,5,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,Scn,e.template,A(1,P_e,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Ecn(i,o){if(i&1&&(f(0),u(1,Icn,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.settingsOpen&&n.settingsEnabled)}}function xcn(i,o){if(i&1&&(f(0),u(1,Ecn,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,ycn,n.conditionSignal(),A(1,P_e,n.componentConfigSignal)))}}var M_e=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-notifications-panel-settings",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-notifications-panel-settings"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-notification-panel--settings"],[3,"componentConfigSignal"],[1,"velt-notification-panel--settings-section"]],template:function(t,r){t&1&&u(0,xcn,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,ne,y_,v_,C_,__,S_,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-notification-panel--settings-section[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-lg) var(--velt-spacing-lg) 0px var(--velt-spacing-lg);align-items:flex-start;gap:calc(var(--velt-spacing-sm) + var(--velt-spacing-2xs));align-self:stretch;flex-direction:column}"],changeDetection:0});let i=o;return i})();var k_e=(()=>{let o=class o{transform(e){try{if(!e||e<0||!isFinite(e))return"00:00:00";let t=Math.floor(e/1e3),r=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60,c=E=>isNaN(E)?"00":E.toString().padStart(2,"0"),p=c(r),g=c(a),C=c(s);return`${p}:${g}:${C}`}catch(t){return console.error("Error in hourMinSecTimeDisplay pipe:",t),null}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275pipe=$i({name:"hourMinSecTimeDisplay",type:o,pure:!0,standalone:!1});let i=o;return i})();var Tcn=i=>({componentConfigSignal:i}),Dcn=(i,o)=>({condition:i,data:o});function wcn(i,o){if(i&1&&w(0,"velt-video-editor-player-internal",3),i&2){let n=l(2).ngIf;d("type",n.annotationId?"embed":"standalone")("url",n.url)("blob",n.blob)("annotationId",n.annotationId||n.recorderId)("variant",n.variant)("darkMode",n.darkMode)}}function Ocn(i,o){if(i&1&&(f(0),u(1,wcn,1,6,"velt-video-editor-player-internal",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.blob||n.url||n.annotationId)}}function Acn(i,o){if(i&1&&(f(0),u(1,Ocn,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Dcn,n.conditionSignal(),A(1,Tcn,n.componentConfigSignal)))}}var R_e=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p){super(c,s,void 0,void 0,void 0,p,t),this.authService=e,this.loggingService=t,this.commentService=r,this.wireframeService=a,this.themeService=s,this.elementRef=c,this.dynamicDataService=p,this.subscriptions=[],this.componentConfigSignal=Te({blob:this.blob,url:this.url,annotationId:this.annotationId,recorderId:this.recorderId,darkMode:this.darkMode,variant:this.variant}),this.componentId="velt-video-editor",super.initializeComponentConfigSignal({componentId:"video-editor",blob:this.blob,url:this.url,annotationId:this.annotationId});try{this.subscriptions.push(super.onDarkModeChange().subscribe(g=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{darkMode:g}),C))}))}catch(g){this.loggingService.catch("Error in VideoEditorComponent constructor: ",g)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in VideoEditorComponent ngOnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VideoEditorComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&(super.ngOnChanges(e),Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}))}catch(t){this.loggingService.catch("Error in VideoEditorComponent ngOnChanges: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in VideoEditorComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(y),h(De),h(He),h(Ye),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-video-editor"]],inputs:{blob:"blob",url:"url",annotationId:"annotationId",recorderId:"recorderId",variant:"variant"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"type","url","blob","annotationId","variant","darkMode",4,"ngIf"],[3,"type","url","blob","annotationId","variant","darkMode"]],template:function(t,r){t&1&&u(0,Acn,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,ae,xg],encapsulation:2,changeDetection:0});let i=o;return i})();var N_e=(()=>{let o=class o{constructor(e){this.injector=e,this.customElements=[{name:j.TAGS.SNIPPYLY_ROOT,component:eG},{name:j.TAGS.SNIPPYLY_PRESENCE,component:b_},{name:j.TAGS.SNIPPYLY_CURSOR,component:uG},{name:j.TAGS.SNIPPYLY_COMMENT_TOOL,component:bC},{name:j.TAGS.SNIPPYLY_COMMENTS,component:gG},{name:j.TAGS.SNIPPYLY_COMMENTS_SIDEBAR,component:x7},{name:j.TAGS.SNIPPYLY_COMMENT_BUBBLE,component:q0},{name:j.TAGS.SNIPPYLY_TAG_TOOL,component:EG},{name:j.TAGS.SNIPPYLY_TAGS,component:IG},{name:j.TAGS.SNIPPYLY_HUDDLE,component:fG},{name:j.TAGS.SNIPPYLY_HUDDLE_TOOL,component:hG},{name:j.TAGS.SNIPPYLY_RECORDER_TOOL,component:vG},{name:j.TAGS.SNIPPYLY_RECORDER_NOTES,component:_G},{name:j.TAGS.SNIPPYLY_MENU,component:tG},{name:j.TAGS.SNIPPYLY_RECORDER_CONTROL_PANEL,component:yG},{name:j.TAGS.SNIPPYLY_RECORDER_PLAYER,component:SG},{name:j.TAGS.SNIPPYLY_REWRITER,component:bG},{name:j.TAGS.SNIPPYLY_SIDEBAR_BUTTON,component:Cg},{name:j.TAGS.SNIPPYLY_USER_INVITE_TOOL,component:uO},{name:j.TAGS.SNIPPYLY_USER_REQUEST_TOOL,component:wG},{name:j.TAGS.SNIPPYLY_ARROW_TOOL,component:PG},{name:j.TAGS.SNIPPYLY_ARROWS,component:MG},{name:j.TAGS.SNIPPYLY_AREA_TOOL,component:RG},{name:j.TAGS.SNIPPYLY_AREAS,component:kG}],this.veltCustomElements=[{name:j.TAGS.VELT_ROOT,component:eG},{name:j.TAGS.VELT_PRESENCE,component:b_},{name:j.TAGS.VELT_CURSOR,component:uG},{name:j.TAGS.VELT_COMMENT_TOOL,component:bC},{name:j.TAGS.VELT_COMMENTS,component:gG},{name:j.TAGS.VELT_COMMENTS_SIDEBAR,component:x7},{name:j.TAGS.VELT_COMMENT_BUBBLE,component:q0},{name:j.TAGS.VELT_COMMENT_THREAD,component:MD},{name:j.TAGS.VELT_COMMENT_PIN,component:C_e},{name:j.TAGS.VELT_COMMENT_TEXT,component:T_e},{name:j.TAGS.VELT_CHART_COMMENT,component:g_e},{name:j.TAGS.VELT_CANVAS_COMMENT,component:__e},{name:j.TAGS.VELT_INLINE_COMMENTS_SECTION,component:jE},{name:j.TAGS.VELT_COMMENTS_MINIMAP,component:y_e},{name:j.TAGS.VELT_TAG_TOOL,component:EG},{name:j.TAGS.VELT_TAGS,component:IG},{name:j.TAGS.VELT_HUDDLE,component:fG},{name:j.TAGS.VELT_HUDDLE_TOOL,component:hG},{name:j.TAGS.VELT_RECORDER_TOOL,component:vG},{name:j.TAGS.VELT_RECORDER_NOTES,component:_G},{name:j.TAGS.VELT_MENU,component:tG},{name:j.TAGS.VELT_RECORDER_CONTROL_PANEL,component:yG},{name:j.TAGS.VELT_RECORDER_PLAYER,component:SG},{name:j.TAGS.VELT_VIDEO_EDITOR,component:R_e},{name:j.TAGS.VELT_REWRITER,component:bG},{name:j.TAGS.VELT_SIDEBAR_BUTTON,component:Cg},{name:j.TAGS.VELT_COMMENTS_SIDEBAR_BUTTON,component:Cg},{name:j.TAGS.VELT_USER_INVITE_TOOL,component:uO},{name:j.TAGS.VELT_USER_REQUEST_TOOL,component:wG},{name:j.TAGS.VELT_ARROW_TOOL,component:PG},{name:j.TAGS.VELT_ARROWS,component:MG},{name:j.TAGS.VELT_AREA_TOOL,component:RG},{name:j.TAGS.VELT_AREAS,component:kG},{name:j.TAGS.VELT_INLINE_COMMENT,component:JCe},{name:j.TAGS.VELT_VIDEO_PLAYER,component:s_e},{name:j.TAGS.VELT_VIDEO_COMMENTS_TIMELINE,component:M7},{name:j.TAGS.VELT_REACTION_TOOL,component:w_},{name:j.TAGS.VELT_INLINE_REACTIONS_SECTION,component:zT},{name:j.TAGS.VELT_VIEW_ANALYTICS,component:c_e},{name:j.TAGS.VELT_NOTIFICATIONS_TOOL,component:Tx},{name:j.TAGS.VELT_NOTIFICATIONS_PANEL,component:qc},{name:j.TAGS.VELT_NOTIFICATIONS_HISTORY_PANEL,component:d_e},{name:j.TAGS.VELT_WIREFRAME,component:p_e},{name:j.TAGS.VELT_AUTOCOMPLETE,component:h_e},{name:j.TAGS.VELT_AUTOCOMPLETE_CHIP,component:f_e},{name:j.TAGS.VELT_COMMENT_COMPOSER,component:vD},{name:j.TAGS.VELT_SKELETON_LOADER,component:jo},{name:j.TAGS.VELT_SINGLE_EDITOR_MODE_PANEL,component:bh}]}ngDoBootstrap(){this.customElements.forEach(e=>{let t=cL(e.component,{injector:this.injector});customElements.get(e.name)||customElements.define(e.name,t)}),this.veltCustomElements.forEach(e=>{let t=cL(e.component,{injector:this.injector});customElements.get(e.name)||customElements.define(e.name,t)})}};o.\u0275fac=function(t){return new(t||o)(J(Ot))},o.\u0275mod=mn({type:o}),o.\u0275inj=dn({providers:[$J(()=>{let e=sessionStorage?.getItem("veltFirebaseLogLevel")||ri?.firebaseLogLevel||"silent";return ML(e),HJ(ri.firebaseConfig)}),Yne(()=>os()),Gee(()=>Wee()),Hie(()=>hS()),lie(()=>{let e=die();return ri.useEmulators&&cie(e,"localhost",5001),e}),{provide:Sl,useClass:LCe},RF(NF()),_X()],imports:[ey,pae,Xs,WQ,Dl,ly,sJ,cre,qoe,aj,dj,Zoe,foe,voe,E_e]});let i=o;return i})();oe(b_,[X,bt,ne,fn,ae,Sw,bw],[]);oe(bC,[X,bt,ne,fn,ae],[]);oe(b7,[X,Zr,yp,Ag],[]);oe(O9,[X,on,Xt,Xo,S7,QCe,hs],[]);oe(ba,[X,rj,di,ne,Yx,Kx,qx,Wx,ae],[]);oe(ow,[X,ne,ae],[]);oe(q0,[jr,X,bt,ne,II,bI,fn,T_,ae],[pe]);oe(Cg,[X,bt,on,Xt,x7,di,ne,EC,fn,OC],[pe]);oe(Qk,[X,di,vI,oI],[]);oe(I_,[X,ne,ae,Ow,Rw,kw,Aw,Lw],[]);oe(lC,[X,tm,ne,ae],[pe]);oe(DE,[X,ne,TE,bE],[pe]);oe(Tw,[X,bt,ne,fn,ae,Iw,ww],[]);oe(MD,[X,Xo,ae],[]);oe(Tx,[X,bt,on,Xt,qc,m_e,ne,fn,xx,bx,Ix,ae],[pe]);oe(qc,[X,bt,Kn,ne,fn,GE,M_e,qE,QE],[pe]);oe(Xk,[X,qi,no,di],[pe]);oe(tC,[X,lC,n2,e2,iC,JI,ne,wI,OI,PC,o_,OD,ae,iO],[pe]);oe(X0,[X,ne,x2,T2,ae,Bw,oO],[pe]);oe(n2,[X,jCe,ne,ae],[pe]);oe(e2,[X,HCe,ne,ae],[]);oe(iC,[X,O7,ne,ae],[pe]);oe(JI,[X,OG,EI,ne,ae],[]);oe(E2,[X,iC,r2,_2,I2,a2,Ih,ne,C2,y2,v2,b2,S2,aC,Zx,o_,aD,kD,ae,eO],[pe]);oe(r2,[X,Xn,ne,ae],[pe]);oe(_2,[X,ne,ae,jo],[pe,D_e]);oe(I2,[X,ne,ae],[XA,Mg]);oe(a2,[X,bt,zCe,em,ne,ae],[pe]);oe(nC,[X,ne,ae],[pe]);oe(Z0,[X,ne,TI,DI,xI,rD,ae],[pe]);oe(eC,[X,ne,ae],[pe]);oe(t2,[X,ne,ae],[pe]);oe(Ih,[X,t2,ne,KI,XI,PI,MI,ZI,zE,PC,ae],[pe]);oe(Y0,[X,ne,ae],[pe]);oe(oC,[X,ne,ae],[pe]);oe(K0,[X,ne,ae],[pe]);oe(sC,[X,ne,ae],[pe]);oe(rC,[X,i2,o2,ne,ae],[pe]);oe(i2,[X,ne,ae],[pe]);oe(o2,[X,ne,ae],[pe]);oe(EI,[X,Kn,ne,Pg,ae],[pe]);oe(x2,[vt,X,E2,ne,QI,ae],[O_e,pe]);oe(C2,[X,ne,ae,jo],[kg,w_e,pe,u_e]);oe(TI,[X,Xn,ne,ae],[pe]);oe(DI,[X,ne,ae,jo],[pe]);oe(xI,[X,O7,ne,ae],[]);oe(KI,[X,ne,jI,YI,ae],[pe]);oe(XI,[vt,X,ep,D7,ne,ae],[pe]);oe(PI,[X,qi,no,A7,GCe,D_,ne,v_e,ae],[pe]);oe(MI,[X,$Ce,ne,ae],[pe]);oe(ZI,[X,Hb,ne,Tg,Pg,ae],[pe]);oe(T2,[X,ne,HD,$D,zD,ae],[pe]);oe(QI,[X,ne,ae],[pe]);oe(y2,[X,bt,Kn,OG,lC,O7,ne,Pg,R7,ae],[pe]);oe(M9,[X,ne,ae],[pe]);oe(wI,[X,ne,ae],[pe]);oe(OI,[X,ne,ae],[pe]);oe(aE,[X,ne,q2,tO,sE,lE,K2,ae],[pe]);oe(rE,[jr,X,Kn,ne,X2,J2,l3,iE,_C,tE,c3,d3,m3,Z2,nE,Q2,oE,eE,ae,GD,f_],[pe]);oe(Y2,[X,bt,ne,wD,ae],[pe]);oe(SC,[X,Xo,ne,ae],[pe]);oe(q2,[X,ne,ae],[pe]);oe(tO,[X,ne,ae],[pe]);oe(sE,[X,Ca,rs,La,ne,ae],[pe]);oe(lE,[X,DE,ne,ae],[pe]);oe(K2,[X,ne,ae],[pe]);oe(fs,[X,ne,i3,n3,t3,o3,ae],[]);oe(i3,[X,Ca,rs,La,ne,ae],[pe]);oe(n3,[X,ne,ae],[]);oe(t3,[X,ne,ae],[]);oe(o3,[vt,X,ne,r3,ae],[]);oe(r3,[X,ne,a3,s3,ae],[]);oe(a3,[X,ne,ae],[]);oe(s3,[X,ne,ae],[]);oe(X2,[X,ne,ae],[pe]);oe(J2,[X,ne,ae],[pe]);oe(l3,[X,ne,ae],[pe]);oe(iE,[X,ne,ae],[pe]);oe(_C,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,AC,js,ae],[vd,A_e,pe]);oe(tE,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(c3,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(d3,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(m3,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(Z2,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[vd,pe]);oe(nE,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(Q2,[vt,X,ne,Ia,Ea,ae],[pe]);oe(oE,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[]);oe(eE,[vt,X,ne,Ia,Ea,ae],[vd,pe]);oe(EC,[X,ne,ae],[]);oe(fC,[X,ne,ae],[pe]);oe(hC,[X,ne,ae],[pe]);oe(R9,[X,ne,ae],[]);oe(II,[X,ne,ae],[]);oe(bI,[X,Xn,ne,ae],[]);oe(CC,[X,ne,ae],[]);oe(v2,[vt,X,bt,ne,d2,f2,ae],[pe]);oe(b2,[vt,X,ep,ne,ae],[pe]);oe(S2,[vt,X,Oh,ne,aC,ae],[pe]);oe(aC,[X,w_,ne,ae],[]);oe(vC,[X,ne,ae],[]);oe(O0,[X,bt,ne,fn,ae],[pe]);oe(A0,[X,bt,ne,CI,SI,_I,yI,fn,ae],[pe]);oe(CI,[X,ne,ae],[pe]);oe(SI,[X,ne,ae],[]);oe(_I,[X,ne,ae],[pe]);oe(yI,[X,ne,ae],[pe]);oe(d_,[vt,X,ne,ae],[pe]);oe(M0,[X,ne,Kb,Zb,qb,Yb],[]);oe(Kb,[X,bt,Xn,ne],[Rg]);oe(Zb,[X,bt,ne,jo],[pe]);oe(qb,[X,bt,ne],[pe]);oe(Yb,[X,bt,ne],[pe]);oe(m_,[X,ne,ae],[]);oe(xh,[X,ne,ae],[pe]);oe(Eh,[X,ne,aE,rE,N9,Y2,SC,ae],[pe]);oe(uC,[jr,X,ne,G2,W2,z2,ae],[]);oe(G2,[X,ne,ae],[Rg]);oe(W2,[X,ne,ae],[pe]);oe(z2,[X,ne,ae],[]);oe(gC,[X,ne,$2,H2,ae],[pe]);oe($2,[X,ne,ae],[Rg]);oe(H2,[X,ne,ae],[pe]);oe(pC,[X,ne,V2,j2,U2,ae],[]);oe(mC,[vt,X,bt,ne,fn,B2,ae],[]);oe(V2,[X,ne,ae],[]);oe(j2,[X,ne,ae],[pe]);oe(U2,[X,ne,ae],[]);oe(B2,[X,ne,N2,F2,L2,ae],[pe]);oe(N2,[X,ne,ae],[pe]);oe(F2,[X,ne,ae],[pe]);oe(L2,[X,ne,ae],[pe]);oe(dC,[X,ne,ae],[pe]);oe(cC,[X,bt,ne,fn,R2,D2,P2,A2,$x,ae],[]);oe(R2,[X,ne,M2,k2,ae],[]);oe(D2,[X,ne,ae],[pe]);oe(P2,[X,ne,ae],[pe]);oe(A2,[X,ne,O2,w2,ae],[pe]);oe(O2,[X,ne,ae],[pe]);oe(w2,[X,ne,ae],[pe]);oe(M2,[X,ne,ae],[pe]);oe(k2,[X,ne,ae],[pe]);oe(TC,[X,ne,ae],[P7,pe]);oe(xC,[X,ne,ae],[pe]);oe(DC,[X,bt,ne,fn,pE],[pe]);oe(pE,[vt,X,ne,mE,ae],[pe]);oe(mE,[X,ne,cE,dE,ae],[pe]);oe(cE,[X,Xn,ne,ae],[pe]);oe(dE,[X,ne,ae,jo],[pe]);oe(wC,[vt,X,ne,uE,ae],[vd,pe]);oe(uE,[X,ne,gE,ae],[pe]);oe(gE,[X,ne,ae],[]);oe(P0,[X,bt,ne,fn,Gb,Wb,zb,ae],[]);oe(Gb,[X,bt,Xn,ne,ae],[Rg]);oe(Wb,[X,bt,ne,ae],[pe]);oe(zb,[X,bt,ne,ae],[pe]);oe(d2,[X,ne,c2,l2,s2,ae,jo],[pe]);oe(f2,[X,ne,g2,u2,h2,p2,m2,ae,jo],[pe]);oe(c2,[X,ne,ae],[pe]);oe(l2,[X,ne,ae],[pe]);oe(s2,[X,Pde,ne,ae],[pe]);oe(g2,[X,ne,FG,ae],[]);oe(u2,[X,ne,ae],[pe]);oe(h2,[X,ne,ae],[pe,NG]);oe(p2,[X,ne,ae],[pe]);oe(m2,[X,ne,ae],[pe]);oe(jI,[vt,X,ne,UI,ae],[pe]);oe(FI,[X,ne,NI,RI,kI,ae],[pe]);oe(qI,[X,ne,HI,GI,WI,zI,$I,ae],[pe]);oe(NI,[X,ne,ae],[]);oe(RI,[X,ne,ae],[pe]);oe(kI,[X,ne,ae],[]);oe(HI,[X,ne,FG,ae],[]);oe(GI,[X,ne,ae],[pe]);oe(WI,[X,ne,ae],[NG]);oe(zI,[X,ne,ae],[]);oe($I,[X,ne,ae],[pe]);oe(YI,[vt,X,ne,FI,qI,ae],[pe]);oe(UI,[X,ne,LI,BI,VI,ae],[pe]);oe(LI,[X,ne,ae],[]);oe(BI,[X,ne,ae],[pe]);oe(VI,[X,ne,ae],[pe]);oe(TE,[X,ne,xE,IE,EE,ae],[]);oe(xE,[X,ne,ae],[pe]);oe(IE,[X,ne,ae],[]);oe(EE,[X,ne,ae],[]);oe(bE,[vt,X,Kn,ne,SE,ae],[pe]);oe(SE,[X,ne,_E,yE,CE,vE,ae],[]);oe(_E,[X,ne,ae],[Rg,pe]);oe(yE,[X,ne,ae],[pe]);oe(CE,[X,ne,ae],[]);oe(vE,[X,ne,hE,fE,ae],[]);oe(hE,[X,ne,ae],[]);oe(fE,[X,ne,ae],[]);oe(OC,[X,ne,ae],[]);oe(Ia,[X,ne,OE,PE,ME,ae],[pe]);oe(OE,[X,ne,wE,AE,ae],[]);oe(PE,[X,ne,ae],[pe]);oe(ME,[X,ne,ae],[pe]);oe(wE,[X,ne,ae],[pe]);oe(AE,[X,ne,ae],[pe]);oe(Ea,[X,ne,ae],[pe]);oe(AC,[X,ne,ae],[pe]);oe(yC,[X,ne,kE,LE,ae],[]);oe(kE,[X,Xo,ne,ae],[pe]);oe(LE,[X,ne,RE,NE,FE,ae],[]);oe(RE,[X,ne,ae],[]);oe(NE,[X,ne,ae],[pe]);oe(FE,[X,ne,ae],[]);oe(jE,[X,bt,ne,fn,HE,$E],[pe]);oe(UE,[X,Xo,Kn,ne,ae],[pe]);oe(BE,[X,ne,ae],[]);oe(VE,[vt,X,Xo,ne,ae],[]);oe(HE,[X,ne,ae],[pe]);oe($E,[X,ne,UE,BE,VE,ae,e3],[pe]);oe(zE,[X,Xn,ne,ae],[pe]);oe(GE,[X,ne,WE,rw,Dx,ae,Jw],[pe]);oe(WE,[X,ne,ae],[pe]);oe(rw,[X,ne,ae],[pe]);oe(aw,[X,ne,ae],[]);oe(mw,[X,ne,ae],[]);oe(pw,[X,ne,ae],[]);oe(sw,[X,ne,dw,cw,ae],[]);oe(dw,[X,ne,pw,vw,Cw,ae],[]);oe(cw,[vt,X,ne,lw,ae],[]);oe(lw,[X,ne,hw,fw,ae],[]);oe(y_,[X,ne,ae],[]);oe(v_,[X,ne,ae],[]);oe(C_,[X,ne,mw,uw,gw,ae],[]);oe(__,[X,ne,aw,_w,ae],[]);oe(uw,[X,ne,ae],[]);oe(gw,[X,ne,ae],[]);oe(S_,[vt,X,ne,sw,ae],[]);oe(hw,[X,ne,ae],[]);oe(fw,[X,ne,ae],[]);oe(qE,[X,ne,XE,YE,ZE,KE,ae],[pe]);oe(QE,[X,ne,JE,ex,yx,tx,ae],[]);oe(Sg,[X,ne,ux,ae],[pe]);oe(ux,[X,ne,ae],[pe]);oe(JE,[X,ne,Sg,yg,bg,Eg,ae],[pe]);oe(ex,[X,ne,Sg,wx,Eg,ae],[pe]);oe(yx,[X,ne,Sg,_x,Eg,ae],[pe]);oe(tx,[X,ne,Sg,ix,Eg,ae],[pe]);oe(yg,[vt,X,ne,gx,ae],[]);oe(gx,[X,ne,sx,px,dx,lx,cx,mx,ae],[pe]);oe(bg,[X,ne,ae],[pe]);oe(ix,[vt,X,ne,nx,ae],[]);oe(nx,[X,ne,ax,rx,ox,Mx,ae],[]);oe(ax,[X,bt,ne,ae],[pe]);oe(rx,[X,ne,ae],[pe]);oe(ox,[X,ne,yg,bg,ae],[pe]);oe(_x,[vt,X,ne,Cx,ae],[vd]);oe(Cx,[X,ne,vx,fx,hx,Sx,ae],[]);oe(vx,[X,ne,ae],[pe]);oe(fx,[X,ne,ae],[pe]);oe(hx,[X,ne,yg,bg,ae],[pe]);oe(Sx,[X,Xn,ne,ae],[pe]);oe(sx,[X,Xn,ne,ae],[]);oe(px,[X,ne,ae],[pe]);oe(dx,[X,ne,ae],[kg,pe]);oe(lx,[X,ne,ae,jo],[kg,pe]);oe(cx,[X,ne,ae],[pe]);oe(mx,[X,ne,ae],[Mg,pe]);oe(XE,[X,ne,ae],[pe]);oe(YE,[X,ne,ae],[pe]);oe(ZE,[X,ne,ae],[pe]);oe(KE,[X,ne,ae],[pe]);oe(xx,[X,ne,ae],[pe]);oe(bx,[X,ne,ae],[pe]);oe(Ix,[X,ne,Ex,ae],[pe]);oe(Ex,[X,ne,ae],[]);oe(Dx,[X,ne,ae],[pe]);oe(wx,[vt,X,ne,Ox,ae],[pe]);oe(Ox,[X,ne,Ax,Px,ae],[pe]);oe(Ax,[X,ne,ae],[pe]);oe(Px,[X,ne,yg,bg,ae],[]);oe(Mx,[X,ne,ae],[pe]);oe(vw,[X,ne,ae],[]);oe(Cw,[X,ne,ae],[]);oe(_w,[X,ne,ae],[]);oe(PC,[X,Ql,ne,jx,Fx,ae],[]);oe(jx,[X,ne,Vx,Ux,Lx,Gx,ae],[]);oe(Fx,[vt,X,bt,ne,fn,Nx,ae],[pe]);oe(Vx,[vt,X,ne,Bx,ae],[pe]);oe(Ux,[X,ne,ae],[pe]);oe(Lx,[X,ne,ae],[pe]);oe(Bx,[X,ne,ae],[pe]);oe(Nx,[X,ne,Rx,kx,ae],[]);oe(Rx,[X,ne,ae],[pe]);oe(kx,[X,ne,ae],[]);oe($x,[X,ne,Hx,zx,ae],[]);oe(Hx,[X,ne,ae],[pe]);oe(zx,[X,ne,ae],[pe]);oe(L9,[X,tm,ne,ae],[pe]);oe(Gx,[X,ne,ae],[pe]);oe(Yx,[X,ij,ne,ae],[pe]);oe(Kx,[X,oj,ne,ae],[pe]);oe(qx,[X,ne,ae],[pe]);oe(Wx,[X,nj,ne,ae],[pe]);oe(Zx,[X,ne,ae],[pe]);oe(kC,[X,bt,ne,fn,ae],[pe]);oe(NC,[X,bt,ne,fn,ae],[pe]);oe(RC,[X,bt,ne,fn,ae],[pe]);oe(MC,[X,bt,Fl,Wp,ne,fn,Qx,ae],[pe]);oe(Xx,[X,ol,ne,ae],[pe]);oe(eT,[X,ol,ne,ae],[pe]);oe(Jx,[X,ol,ne,ae],[pe]);oe(Qx,[X,bt,ne,fn,Xx,eT,Jx,ae],[pe]);oe($0,[X,ne,ae],[pe]);oe(B0,[X,ne,ae],[pe]);oe(vI,[X,bt,ne,fn,$0,B0,fI,gI,H0,j0,V0,dI,U0,L0,z0,G0,ae,nO],[]);oe(fI,[X,ne,ae],[]);oe(gI,[X,ne,ae],[pe]);oe(H0,[X,ne,uI,hI,ae],[]);oe(uI,[X,ne,ae],[pe]);oe(hI,[X,ne,ae],[]);oe(j0,[X,ne,ae],[pe]);oe(V0,[X,D_,ne,mI,pI,ae],[pe]);oe(dI,[X,D_,ne,cI,lI,ae],[pe]);oe(U0,[X,ne,ae],[pe]);oe(oI,[X,bt,ne,fn,$0,B0,H0,j0,V0,U0,L0,z0,G0,ae],[pe]);oe(cI,[X,ne,ae],[]);oe(lI,[X,ne,ae],[]);oe(mI,[X,ne,ae],[]);oe(pI,[X,ne,ae],[]);oe(iI,[X,bt,ne,fn,Xb,nI,ae],[pe]);oe(Xb,[X,Kn,ne,N0,F0,R0,k0,ae],[pe]);oe(nI,[X,Kn,ne,N0,F0,R0,k0,ae],[pe]);oe(N0,[X,ne,ae],[pe]);oe(F0,[X,ne,tI,eI,ae],[]);oe(tI,[X,ne,ae],[]);oe(eI,[X,ne,ae],[]);oe(R0,[vt,X,ne,Qb,Jb,ae],[]);oe(Qb,[X,ne,ae],[]);oe(Jb,[X,ne,ae],[pe]);oe(k0,[X,ne,ae],[]);oe(u_,[X,ne,B3,d7,ae],[]);oe(B3,[X,ne,l7,c7,p_,L3,ae],[]);oe(s7,[X,ne,ae],[]);oe(p_,[X,ne,ae],[]);oe(L3,[X,ne,p_,b3,A3,w3,T3,k3,F3,I3,ae],[]);oe(b3,[X,ne,ae],[]);oe(A3,[X,ne,M3,P3,ae],[]);oe(w3,[X,ne,D3,O3,ae],[]);oe(T3,[X,ne,x3,E3,ae],[]);oe(k3,[X,ne,R3,N3,ae],[]);oe(a7,[X,ne,ae],[]);oe(F3,[X,Ca,rs,La,I_e,BG,ne,ae],[]);oe(I3,[vt,X,ne,ae],[pe]);oe(x3,[X,ne,ae],[pe]);oe(E3,[X,ne,ae],[]);oe(D3,[X,ne,ae],[]);oe(O3,[X,ne,ae],[]);oe(M3,[X,ne,ae],[]);oe(P3,[X,ne,ae],[]);oe(R3,[X,ne,ae],[]);oe(N3,[X,ne,ae],[pe]);oe(L0,[X,ne,rI,aI,sI,ae],[pe]);oe(rI,[X,ne,ae],[pe]);oe(aI,[X,ne,ae],[]);oe(sI,[X,qi,no,ne,ae],[]);oe(VC,[X,ne,ae],[pe]);oe(FC,[X,ne,dT,aT,cT,rT,oT,pT,mT,ae],[pe]);oe(dT,[X,qi,no,ne,ae],[pe]);oe(aT,[X,ne,ae],[pe,k_e]);oe(cT,[X,ne,lT,sT,ae],[pe]);oe(lT,[X,ne,ae],[pe]);oe(sT,[X,ne,ae],[pe]);oe(rT,[X,ne,ae],[pe]);oe(oT,[X,ne,ae],[pe]);oe(pT,[X,ne,ae],[pe]);oe(UC,[X,bt,on,Xt,ne,fn,VC,FC,Th,h_,ae],[pe]);oe(BC,[X,bt,Zr,ne,fn,VC,FC,gT,h_,ae],[pe]);oe(Th,[X,ne,ae],[pe]);oe(uT,[X,ne,ae],[pe]);oe(iT,[X,ne,nT,tT,ae],[pe]);oe(nT,[X,ne,ae],[]);oe(tT,[X,ne,ae],[]);oe(ET,[vt,X,ne,Tg,ae],[Dg,pe]);oe(IT,[X,ne,GC,bT,ae],[pe]);oe(yT,[X,ne,ae],[pe]);oe(ST,[X,ne,GC,YC,ae],[pe]);oe(ZC,[X,bt,ow,ne,fn,ET,IT,yT,ST,zC,qC,KC,$C,HC,WC,c_,ae],[pe]);oe(GC,[X,ne,ae],[pe]);oe(YC,[X,ne,ae],[]);oe(bT,[X,Ca,RU,rs,La,ne,ae],[pe]);oe(zC,[X,ne,ae],[pe]);oe(qC,[X,wh,ne,ae],[pe]);oe(KC,[X,g_,ne,ae],[pe]);oe($C,[X,ne,ae],[pe]);oe(HC,[X,ne,ae],[pe]);oe(z0,[X,ne,iI,ae],[pe]);oe(G0,[X,ne,O_,ae],[]);oe(gT,[X,ne,Th,uT,iT,LC,ae],[pe]);oe(h_,[X,ne,Th,LC,ae],[pe]);oe(mT,[X,ne,O_,ae],[pe]);oe(LC,[X,ne,O_,ae],[pe]);oe(jC,[X,bt,Xt,ne,fn,YC,zC,qC,KC,$C,HC,_T,vT,CT,WC,c_,ae],[pe]);oe(_T,[vt,X,ne,Tg,ae],[Dg,pe]);oe(vT,[X,ne,fT,hT,ae],[pe]);oe(CT,[X,ne,O_,ae],[pe]);oe(fT,[X,ne,ae],[]);oe(hT,[X,ne,ae],[pe]);oe(WC,[X,ne,ae],[pe]);oe(XC,[X,bt,ne,fn,wT],[]);oe(QC,[X,Xt,ne,OT,xT,DT],[]);oe(OT,[X,ne],[pe]);oe(xT,[X,ne],[]);oe(TT,[X,ne],[]);oe(DT,[X,on,Zr,di,ne,TT,wT],[pe]);oe(n_,[X,Zr,ne,MT,PT,Dh,j9],[pe]);oe(MT,[X,ne,kT,RT],[]);oe(kT,[X,ne],[]);oe(RT,[X,ne],[pe]);oe(PT,[X,ne],[]);oe(Dh,[X,ne,$9,BT],[]);oe(BT,[X,ne,LT,FT],[]);oe(t_,[X,ne,U9,V9],[]);oe(e_,[X,bt,ne,fn,n_],[]);oe(JC,[X,bt,Xt,ne,fn,VT,AT,NT],[]);oe(VT,[X,ne],[pe]);oe(AT,[X,ne],[]);oe(NT,[X,on,di,ne,n_],[]);oe(LT,[X,ne],[pe]);oe(FT,[X,ne],[pe]);oe(i_,[X,bt,ne,fn,HT,UT],[pe]);oe(HT,[X,ne,jT,$T],[]);oe(jT,[X,ne],[pe]);oe($T,[X,ne],[pe]);oe(UT,[X,ne],[pe]);oe(c_,[X,Xn,ne,ae],[pe]);oe(H9,[X,ne,ae],[pe]);oe(zT,[X,bt,ne,fn,qT,ae],[]);oe(qT,[X,ne,WT,GT,ae],[]);oe(WT,[vt,X,Oh,ne,ae],[]);oe(GT,[X,w_,ne,ae],[]);oe(z9,[X,ne,JT,QT,ae],[pe]);oe(JT,[X,ne,ae],[pe]);oe(QT,[X,Kn,ne,eD,tD,YT,XT,KT,ZT,ae],[pe]);oe(eD,[X,ne,Qd,ae],[pe]);oe(tD,[X,ne,Qd,ae],[pe]);oe(YT,[X,ne,Qd,ae],[pe]);oe(XT,[X,ne,Qd,ae],[pe]);oe(KT,[X,ne,Qd,ae],[pe]);oe(ZT,[X,ne,Qd,ae],[pe]);oe(Qd,[X,ne,ae],[pe]);oe(G9,[X,ne,iD,nD,ae],[pe]);oe(iD,[X,ne,oD,ae],[pe]);oe(nD,[X,Kn,ne,_C,ae],[pe]);oe(oD,[X,ne,ae],[pe]);oe(o_,[X,ne,R7,ae],[pe]);oe(rD,[X,ne,R7,ae],[]);oe(hs,[X,bt,ne,fn,r_,a_,s_,sD,fD,bD],[pe]);oe(r_,[X,ne,ae],[]);oe(a_,[X,Xo,ne,ae],[pe]);oe(s_,[vt,X,Xo,ne,ae],[pe]);oe(q9,[X,ne,r_,a_,s_,ae],[pe]);oe(W9,[X,ne,ae],[pe]);oe(K9,[X,ne],[]);oe(aD,[X,ne,ae],[pe]);oe(sD,[X,ne,cD,lD,ae],[]);oe(cD,[X,Kn,ne,dD,pD,gD,mD,uD,hD,ae],[pe]);oe(lD,[X,ne,ae],[pe]);oe(dD,[X,ne,Jd,ae],[pe]);oe(pD,[X,ne,Jd,ae],[pe]);oe(gD,[X,ne,Jd,ae],[pe]);oe(mD,[X,ne,Jd,ae],[pe]);oe(Jd,[X,ne,ae],[]);oe(uD,[X,ne,Jd,ae],[pe]);oe(hD,[X,ne,Jd,ae],[pe]);oe(fD,[X,ne,DD,ae],[pe]);oe(vD,[X,Xo,ae],[]);oe(Z9,[X,ne,_D,CD,ae],[pe]);oe(_D,[X,Kn,ne,yD,SD,ae],[pe]);oe(CD,[X,ne,ae],[pe]);oe(yD,[X,ne,ae],[pe]);oe(SD,[X,ne,ae],[pe]);oe(bD,[X,ne,ae],[pe]);oe(X9,[X,ne,ED,ID,ae],[]);oe(ED,[X,Kn,ne,xD,TD,ae],[pe]);oe(ID,[X,ne,ae],[pe]);oe(xD,[X,ne,ae],[pe]);oe(TD,[X,ne,ae],[pe]);oe(DD,[X,ne,ae],[pe]);oe(Eg,[X,ne,ae],[]);oe(wD,[X,ne,ae],[pe]);oe(Q9,[X,ne,ae],[pe]);oe(OD,[X,ne,ae],[pe]);oe(l_,[X,ne,PD,AD,ae],[]);oe(PD,[X,ne,ae],[pe]);oe(AD,[X,Xo,ne,ae],[pe]);oe(kD,[X,Ql,ne,UD,VD,ae],[pe]);oe(UD,[X,ne,ae],[pe]);oe(VD,[X,bt,ne,fn,BD,jD,ae],[pe]);oe(LD,[X,ne,ae],[pe]);oe(FD,[X,ne,ae],[Mg,pe]);oe(ND,[X,Xn,ne,ae],[pe]);oe(BD,[X,ne,ae],[pe]);oe(RD,[X,ne,LD,FD,ND,ae],[pe]);oe(jD,[vt,X,ne,RD,ae],[pe]);oe(e7,[X,ne,ae],[pe]);oe(HD,[X,ne,ae],[]);oe($D,[X,ne,ae],[]);oe(zD,[X,ne,ae],[pe]);oe(GD,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(f7,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,js,ae],[pe]);oe(e3,[X,ne,ae,JD,ZD],[]);oe(JD,[X,ne,ae,QD,XD],[pe]);oe(ZD,[vt,X,Kn,ne,ae,KD],[pe]);oe(QD,[X,ne,ae],[pe]);oe(XD,[X,ne,ae],[]);oe(KD,[X,ne,ae,YD,WD,qD],[]);oe(YD,[X,ne,ae],[]);oe(WD,[X,ne,ae],[]);oe(qD,[X,ne,ae],[pe]);oe(xg,[X,ne,ae,p3,g3,v3,_3,y3,Qw],[]);oe(t7,[X,ne,ae],[]);oe(p3,[X,ne,ae],[]);oe(g3,[X,ne,ae],[]);oe(n7,[X,ne,ae],[]);oe(h3,[X,ne,ae],[]);oe(f3,[vt,X,Dm,Zr,ne,ae],[Dg]);oe(v3,[X,ne,ae,h3,f3],[]);oe(C3,[X,ne,ae],[]);oe(i7,[X,ne,ae,u3,S3],[]);oe(_3,[X,on,Xt,di,Kn,ne,ae,J3,Gw],[]);oe(o7,[X,ne,ae],[]);oe(y3,[X,ne,ae],[]);oe(u3,[X,ne,ae],[]);oe(S3,[X,ne,ae],[]);oe(r7,[X,ne,ae],[pe]);oe(bh,[X,bt,ne,fn,ae,V3,U3,j3,$3,H3,z3],[]);oe(m7,[X,ne,ae],[pe]);oe(p7,[X,ne,ae],[pe]);oe(V3,[X,ne,ae],[]);oe(U3,[X,ne,ae],[pe]);oe(j3,[X,ne,ae],[pe]);oe($3,[X,ne,ae],[pe]);oe(H3,[X,ne,ae],[pe]);oe(z3,[X,ne,ae],[pe]);oe(Z3,[X,on,Xt,di,Kn,ne,ae,K3,Y3],[]);oe(K3,[X,ne,ae],[]);oe(Y3,[X,ne,ae,q3,G3],[]);oe(q3,[vt,X,ne,ae,W3],[]);oe(W3,[X,ne,ae],[]);oe(G3,[X,ne,ae],[]);oe(g7,[vt,X,ne,ae],[]);oe(X3,[vt,X,tm,ne,ae,Z3],[pe]);oe(Q3,[vt,X,tm,ne,O_,ae],[pe]);oe(J3,[X,ne,ae,X3,Q3,ew,Xw],[]);oe(ew,[X,on,Xt,di,Kn,ne,ae,Hw,zw],[]);oe(h7,[X,ne,ae],[]);oe(u7,[X,on,Xt,di,Kn,ne,ae,nw,tw],[pe]);oe(nw,[X,ne,ae,iw],[pe]);oe(iw,[X,ne,ae],[pe]);oe(tw,[X,Kn,ne,ae,f_],[pe]);oe(f_,[vt,X,bt,on,Xt,di,Kn,ne,fs,Ia,Ea,AC,js,ae],[vd,pe]);oe(Sw,[vt,X,ne,ae,yw],[]);oe(bw,[X,Xn,ne,ae],[]);oe(yw,[X,Xn,Tw,ne,ae],[]);oe(Iw,[X,Xn,ne,ae],[]);oe(ww,[X,ne,ae,Dw,Ew,xw],[]);oe(Dw,[X,ne,ae,jo],[pe]);oe(Ew,[X,ne,ae],[pe]);oe(xw,[X,ne,ae],[pe]);oe(Ow,[X,ne,ae],[]);oe(Rw,[X,ne,ae,jo,Nw,Fw],[]);oe(kw,[X,ne,ae],[]);oe(Aw,[X,ne,ae,Pw,Mw],[]);oe(Lw,[X,ne,ae],[]);oe(Pw,[X,Xn,ne,ae],[]);oe(Mw,[X,ne,ae],[]);oe(Nw,[X,ne,ae],[pe]);oe(Fw,[X,ne,ae],[pe]);oe(Bw,[X,ne,ae,Uw,jw],[]);oe(Uw,[vt,X,ne,ae,Vw],[]);oe(jw,[X,Xn,ne,ae],[]);oe(Vw,[X,Xn,ne,ae],[]);oe($w,[X,ne,ae],[]);oe(Hw,[X,ne,ae],[]);oe(zw,[X,ne,ae,C3,$w],[]);oe(Gw,[X,Kn,ne,ae,Ww,qw,Zw],[]);oe(Ww,[X,ne,ae],[]);oe(qw,[X,ne,ae,Yw,Kw],[]);oe(Zw,[X,ne,ae],[]);oe(Yw,[X,ne,ae],[]);oe(Kw,[X,ne,ae],[]);oe(Xw,[X,ne,ae],[]);oe(Qw,[X,ne,ae],[]);oe(Jw,[X,ne,ae],[pe]);oe(eO,[X,ne,ae],[XA,pe]);oe(nO,[X,ne,ae],[]);oe(iO,[X,ne,ae],[pe]);oe(E_,[X,ne,ae],[]);oe(v7,[X,ne,ae],[pe]);oe(oO,[X,ne,ae],[pe]);oe(_7,[X,on,Xt,di,Kn,ne,ae,mO,cO],[pe]);oe(mO,[X,ne,ae,dO,pO],[]);oe(dO,[X,ne,ae],[pe]);oe(pO,[X,ne,ae],[]);oe(cO,[X,Kn,ne,ae,lO],[pe]);oe(lO,[vt,X,ne,ae,sO],[]);oe(C7,[X,ne,ae],[pe]);oe(sO,[X,ne,ae,rO,aO],[]);oe(rO,[X,ne,ae],[]);oe(aO,[X,ne,ae],[pe]);var L_e=!0,B_e=!0;function vO(i,o,n){let e=i.match(o);return e&&e.length>=n&&parseInt(e[n],10)}function nm(i,o,n){if(!i.RTCPeerConnection)return;let e=i.RTCPeerConnection.prototype,t=e.addEventListener;e.addEventListener=function(a,s){if(a!==o)return t.apply(this,arguments);let c=p=>{let g=n(p);g&&(s.handleEvent?s.handleEvent(g):s(g))};return this._eventMap=this._eventMap||{},this._eventMap[o]||(this._eventMap[o]=new Map),this._eventMap[o].set(s,c),t.apply(this,[a,c])};let r=e.removeEventListener;e.removeEventListener=function(a,s){if(a!==o||!this._eventMap||!this._eventMap[o])return r.apply(this,arguments);if(!this._eventMap[o].has(s))return r.apply(this,arguments);let c=this._eventMap[o].get(s);return this._eventMap[o].delete(s),this._eventMap[o].size===0&&delete this._eventMap[o],Object.keys(this._eventMap).length===0&&delete this._eventMap,r.apply(this,[a,c])},Object.defineProperty(e,"on"+o,{get(){return this["_on"+o]},set(a){this["_on"+o]&&(this.removeEventListener(o,this["_on"+o]),delete this["_on"+o]),a&&this.addEventListener(o,this["_on"+o]=a)},enumerable:!0,configurable:!0})}function V_e(i){return typeof i!="boolean"?new Error("Argument type: "+typeof i+". Please use a boolean."):(L_e=i,i?"adapter.js logging disabled":"adapter.js logging enabled")}function U_e(i){return typeof i!="boolean"?new Error("Argument type: "+typeof i+". Please use a boolean."):(B_e=!i,"adapter.js deprecation warnings "+(i?"disabled":"enabled"))}function N7(){if(typeof window=="object"){if(L_e)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function P_(i,o){B_e&&console.warn(i+" is deprecated, please use "+o+" instead.")}function j_e(i){let o={browser:null,version:null};if(typeof i>"u"||!i.navigator||!i.navigator.userAgent)return o.browser="Not a browser.",o;let{navigator:n}=i;if(n.mozGetUserMedia)o.browser="firefox",o.version=vO(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||i.isSecureContext===!1&&i.webkitRTCPeerConnection)o.browser="chrome",o.version=vO(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(i.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))o.browser="safari",o.version=vO(n.userAgent,/AppleWebKit\/(\d+)\./,1),o.supportsUnifiedPlan=i.RTCRtpTransceiver&&"currentDirection"in i.RTCRtpTransceiver.prototype;else return o.browser="Not a supported browser.",o;return o}function F_e(i){return Object.prototype.toString.call(i)==="[object Object]"}function UG(i){return F_e(i)?Object.keys(i).reduce(function(o,n){let e=F_e(i[n]),t=e?UG(i[n]):i[n],r=e&&!Object.keys(t).length;return t===void 0||r?o:Object.assign(o,{[n]:t})},{}):i}function VG(i,o,n){!o||n.has(o.id)||(n.set(o.id,o),Object.keys(o).forEach(e=>{e.endsWith("Id")?VG(i,i.get(o[e]),n):e.endsWith("Ids")&&o[e].forEach(t=>{VG(i,i.get(t),n)})}))}function jG(i,o,n){let e=n?"outbound-rtp":"inbound-rtp",t=new Map;if(o===null)return t;let r=[];return i.forEach(a=>{a.type==="track"&&a.trackIdentifier===o.id&&r.push(a)}),r.forEach(a=>{i.forEach(s=>{s.type===e&&s.trackId===a.id&&VG(i,s,t)})}),t}var B7={};jO(B7,{fixNegotiationNeeded:()=>YG,shimAddTrackRemoveTrack:()=>qG,shimAddTrackRemoveTrackWithNative:()=>z_e,shimGetDisplayMedia:()=>H_e,shimGetSendersWithDtmf:()=>zG,shimGetStats:()=>GG,shimGetUserMedia:()=>F7,shimMediaStream:()=>$G,shimOnTrack:()=>HG,shimPeerConnection:()=>L7,shimSenderReceiverGetStats:()=>WG});var $_e=N7;function F7(i,o){let n=i&&i.navigator;if(!n.mediaDevices)return;let e=function(s){if(typeof s!="object"||s.mandatory||s.optional)return s;let c={};return Object.keys(s).forEach(p=>{if(p==="require"||p==="advanced"||p==="mediaSource")return;let g=typeof s[p]=="object"?s[p]:{ideal:s[p]};g.exact!==void 0&&typeof g.exact=="number"&&(g.min=g.max=g.exact);let C=function(E,D){return E?E+D.charAt(0).toUpperCase()+D.slice(1):D==="deviceId"?"sourceId":D};if(g.ideal!==void 0){c.optional=c.optional||[];let E={};typeof g.ideal=="number"?(E[C("min",p)]=g.ideal,c.optional.push(E),E={},E[C("max",p)]=g.ideal,c.optional.push(E)):(E[C("",p)]=g.ideal,c.optional.push(E))}g.exact!==void 0&&typeof g.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[C("",p)]=g.exact):["min","max"].forEach(E=>{g[E]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[C(E,p)]=g[E])})}),s.advanced&&(c.optional=(c.optional||[]).concat(s.advanced)),c},t=function(s,c){if(o.version>=61)return c(s);if(s=JSON.parse(JSON.stringify(s)),s&&typeof s.audio=="object"){let p=function(g,C,E){C in g&&!(E in g)&&(g[E]=g[C],delete g[C])};s=JSON.parse(JSON.stringify(s)),p(s.audio,"autoGainControl","googAutoGainControl"),p(s.audio,"noiseSuppression","googNoiseSuppression"),s.audio=e(s.audio)}if(s&&typeof s.video=="object"){let p=s.video.facingMode;p=p&&(typeof p=="object"?p:{ideal:p});let g=o.version<66;if(p&&(p.exact==="user"||p.exact==="environment"||p.ideal==="user"||p.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!g)){delete s.video.facingMode;let C;if(p.exact==="environment"||p.ideal==="environment"?C=["back","rear"]:(p.exact==="user"||p.ideal==="user")&&(C=["front"]),C)return n.mediaDevices.enumerateDevices().then(E=>{E=E.filter(L=>L.kind==="videoinput");let D=E.find(L=>C.some(z=>L.label.toLowerCase().includes(z)));return!D&&E.length&&C.includes("back")&&(D=E[E.length-1]),D&&(s.video.deviceId=p.exact?{exact:D.deviceId}:{ideal:D.deviceId}),s.video=e(s.video),$_e("chrome: "+JSON.stringify(s)),c(s)})}s.video=e(s.video)}return $_e("chrome: "+JSON.stringify(s)),c(s)},r=function(s){return o.version>=64?s:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[s.name]||s.name,message:s.message,constraint:s.constraint||s.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},a=function(s,c,p){t(s,g=>{n.webkitGetUserMedia(g,c,C=>{p&&p(r(C))})})};if(n.getUserMedia=a.bind(n),n.mediaDevices.getUserMedia){let s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(c){return t(c,p=>s(p).then(g=>{if(p.audio&&!g.getAudioTracks().length||p.video&&!g.getVideoTracks().length)throw g.getTracks().forEach(C=>{C.stop()}),new DOMException("","NotFoundError");return g},g=>Promise.reject(r(g))))}}}function H_e(i,o){if(!(i.navigator.mediaDevices&&"getDisplayMedia"in i.navigator.mediaDevices)&&i.navigator.mediaDevices){if(typeof o!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}i.navigator.mediaDevices.getDisplayMedia=function(e){return o(e).then(t=>{let r=e.video&&e.video.width,a=e.video&&e.video.height,s=e.video&&e.video.frameRate;return e.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:s||3}},r&&(e.video.mandatory.maxWidth=r),a&&(e.video.mandatory.maxHeight=a),i.navigator.mediaDevices.getUserMedia(e)})}}}function $G(i){i.MediaStream=i.MediaStream||i.webkitMediaStream}function HG(i){if(typeof i=="object"&&i.RTCPeerConnection&&!("ontrack"in i.RTCPeerConnection.prototype)){Object.defineProperty(i.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(n){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=n)},enumerable:!0,configurable:!0});let o=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=e=>{e.stream.addEventListener("addtrack",t=>{let r;i.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(s=>s.track&&s.track.id===t.track.id):r={track:t.track};let a=new Event("track");a.track=t.track,a.receiver=r,a.transceiver={receiver:r},a.streams=[e.stream],this.dispatchEvent(a)}),e.stream.getTracks().forEach(t=>{let r;i.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(s=>s.track&&s.track.id===t.id):r={track:t};let a=new Event("track");a.track=t,a.receiver=r,a.transceiver={receiver:r},a.streams=[e.stream],this.dispatchEvent(a)})},this.addEventListener("addstream",this._ontrackpoly)),o.apply(this,arguments)}}else nm(i,"track",o=>(o.transceiver||Object.defineProperty(o,"transceiver",{value:{receiver:o.receiver}}),o))}function zG(i){if(typeof i=="object"&&i.RTCPeerConnection&&!("getSenders"in i.RTCPeerConnection.prototype)&&"createDTMFSender"in i.RTCPeerConnection.prototype){let o=function(t,r){return{track:r,get dtmf(){return this._dtmf===void 0&&(r.kind==="audio"?this._dtmf=t.createDTMFSender(r):this._dtmf=null),this._dtmf},_pc:t}};if(!i.RTCPeerConnection.prototype.getSenders){i.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let t=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addTrack=function(s,c){let p=t.apply(this,arguments);return p||(p=o(this,s),this._senders.push(p)),p};let r=i.RTCPeerConnection.prototype.removeTrack;i.RTCPeerConnection.prototype.removeTrack=function(s){r.apply(this,arguments);let c=this._senders.indexOf(s);c!==-1&&this._senders.splice(c,1)}}let n=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(r){this._senders=this._senders||[],n.apply(this,[r]),r.getTracks().forEach(a=>{this._senders.push(o(this,a))})};let e=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(r){this._senders=this._senders||[],e.apply(this,[r]),r.getTracks().forEach(a=>{let s=this._senders.find(c=>c.track===a);s&&this._senders.splice(this._senders.indexOf(s),1)})}}else if(typeof i=="object"&&i.RTCPeerConnection&&"getSenders"in i.RTCPeerConnection.prototype&&"createDTMFSender"in i.RTCPeerConnection.prototype&&i.RTCRtpSender&&!("dtmf"in i.RTCRtpSender.prototype)){let o=i.RTCPeerConnection.prototype.getSenders;i.RTCPeerConnection.prototype.getSenders=function(){let e=o.apply(this,[]);return e.forEach(t=>t._pc=this),e},Object.defineProperty(i.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function GG(i){if(!i.RTCPeerConnection)return;let o=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){let[e,t,r]=arguments;if(arguments.length>0&&typeof e=="function")return o.apply(this,arguments);if(o.length===0&&(arguments.length===0||typeof e!="function"))return o.apply(this,[]);let a=function(c){let p={};return c.result().forEach(C=>{let E={id:C.id,timestamp:C.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[C.type]||C.type};C.names().forEach(D=>{E[D]=C.stat(D)}),p[E.id]=E}),p},s=function(c){return new Map(Object.keys(c).map(p=>[p,c[p]]))};if(arguments.length>=2){let c=function(p){t(s(a(p)))};return o.apply(this,[c,e])}return new Promise((c,p)=>{o.apply(this,[function(g){c(s(a(g)))},p])}).then(t,r)}}function WG(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender&&i.RTCRtpReceiver))return;if(!("getStats"in i.RTCRtpSender.prototype)){let n=i.RTCPeerConnection.prototype.getSenders;n&&(i.RTCPeerConnection.prototype.getSenders=function(){let r=n.apply(this,[]);return r.forEach(a=>a._pc=this),r});let e=i.RTCPeerConnection.prototype.addTrack;e&&(i.RTCPeerConnection.prototype.addTrack=function(){let r=e.apply(this,arguments);return r._pc=this,r}),i.RTCRtpSender.prototype.getStats=function(){let r=this;return this._pc.getStats().then(a=>jG(a,r.track,!0))}}if(!("getStats"in i.RTCRtpReceiver.prototype)){let n=i.RTCPeerConnection.prototype.getReceivers;n&&(i.RTCPeerConnection.prototype.getReceivers=function(){let t=n.apply(this,[]);return t.forEach(r=>r._pc=this),t}),nm(i,"track",e=>(e.receiver._pc=e.srcElement,e)),i.RTCRtpReceiver.prototype.getStats=function(){let t=this;return this._pc.getStats().then(r=>jG(r,t.track,!1))}}if(!("getStats"in i.RTCRtpSender.prototype&&"getStats"in i.RTCRtpReceiver.prototype))return;let o=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof i.MediaStreamTrack){let e=arguments[0],t,r,a;return this.getSenders().forEach(s=>{s.track===e&&(t?a=!0:t=s)}),this.getReceivers().forEach(s=>(s.track===e&&(r?a=!0:r=s),s.track===e)),a||t&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}function z_e(i){i.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(a=>this._shimmedLocalStreams[a][0])};let o=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addTrack=function(a,s){if(!s)return o.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let c=o.apply(this,arguments);return this._shimmedLocalStreams[s.id]?this._shimmedLocalStreams[s.id].indexOf(c)===-1&&this._shimmedLocalStreams[s.id].push(c):this._shimmedLocalStreams[s.id]=[s,c],c};let n=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(a){this._shimmedLocalStreams=this._shimmedLocalStreams||{},a.getTracks().forEach(p=>{if(this.getSenders().find(C=>C.track===p))throw new DOMException("Track already exists.","InvalidAccessError")});let s=this.getSenders();n.apply(this,arguments);let c=this.getSenders().filter(p=>s.indexOf(p)===-1);this._shimmedLocalStreams[a.id]=[a].concat(c)};let e=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[a.id],e.apply(this,arguments)};let t=i.RTCPeerConnection.prototype.removeTrack;i.RTCPeerConnection.prototype.removeTrack=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},a&&Object.keys(this._shimmedLocalStreams).forEach(s=>{let c=this._shimmedLocalStreams[s].indexOf(a);c!==-1&&this._shimmedLocalStreams[s].splice(c,1),this._shimmedLocalStreams[s].length===1&&delete this._shimmedLocalStreams[s]}),t.apply(this,arguments)}}function qG(i,o){if(!i.RTCPeerConnection)return;if(i.RTCPeerConnection.prototype.addTrack&&o.version>=65)return z_e(i);let n=i.RTCPeerConnection.prototype.getLocalStreams;i.RTCPeerConnection.prototype.getLocalStreams=function(){let g=n.apply(this);return this._reverseStreams=this._reverseStreams||{},g.map(C=>this._reverseStreams[C.id])};let e=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(g){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},g.getTracks().forEach(C=>{if(this.getSenders().find(D=>D.track===C))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[g.id]){let C=new i.MediaStream(g.getTracks());this._streams[g.id]=C,this._reverseStreams[C.id]=g,g=C}e.apply(this,[g])};let t=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(g){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.apply(this,[this._streams[g.id]||g]),delete this._reverseStreams[this._streams[g.id]?this._streams[g.id].id:g.id],delete this._streams[g.id]},i.RTCPeerConnection.prototype.addTrack=function(g,C){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");let E=[].slice.call(arguments,1);if(E.length!==1||!E[0].getTracks().find(z=>z===g))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(z=>z.track===g))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let L=this._streams[C.id];if(L)L.addTrack(g),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{let z=new i.MediaStream([g]);this._streams[C.id]=z,this._reverseStreams[z.id]=C,this.addStream(z)}return this.getSenders().find(z=>z.track===g)};function r(p,g){let C=g.sdp;return Object.keys(p._reverseStreams||[]).forEach(E=>{let D=p._reverseStreams[E],L=p._streams[D.id];C=C.replace(new RegExp(L.id,"g"),D.id)}),new RTCSessionDescription({type:g.type,sdp:C})}function a(p,g){let C=g.sdp;return Object.keys(p._reverseStreams||[]).forEach(E=>{let D=p._reverseStreams[E],L=p._streams[D.id];C=C.replace(new RegExp(D.id,"g"),L.id)}),new RTCSessionDescription({type:g.type,sdp:C})}["createOffer","createAnswer"].forEach(function(p){let g=i.RTCPeerConnection.prototype[p],C={[p](){let E=arguments;return arguments.length&&typeof arguments[0]=="function"?g.apply(this,[L=>{let z=r(this,L);E[0].apply(null,[z])},L=>{E[1]&&E[1].apply(null,L)},arguments[2]]):g.apply(this,arguments).then(L=>r(this,L))}};i.RTCPeerConnection.prototype[p]=C[p]});let s=i.RTCPeerConnection.prototype.setLocalDescription;i.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?s.apply(this,arguments):(arguments[0]=a(this,arguments[0]),s.apply(this,arguments))};let c=Object.getOwnPropertyDescriptor(i.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(i.RTCPeerConnection.prototype,"localDescription",{get(){let p=c.get.apply(this);return p.type===""?p:r(this,p)}}),i.RTCPeerConnection.prototype.removeTrack=function(g){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!g._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(g._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let E;Object.keys(this._streams).forEach(D=>{this._streams[D].getTracks().find(z=>g.track===z)&&(E=this._streams[D])}),E&&(E.getTracks().length===1?this.removeStream(this._reverseStreams[E.id]):E.removeTrack(g.track),this.dispatchEvent(new Event("negotiationneeded")))}}function L7(i,o){!i.RTCPeerConnection&&i.webkitRTCPeerConnection&&(i.RTCPeerConnection=i.webkitRTCPeerConnection),i.RTCPeerConnection&&o.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let e=i.RTCPeerConnection.prototype[n],t={[n](){return arguments[0]=new(n==="addIceCandidate"?i.RTCIceCandidate:i.RTCSessionDescription)(arguments[0]),e.apply(this,arguments)}};i.RTCPeerConnection.prototype[n]=t[n]})}function YG(i,o){nm(i,"negotiationneeded",n=>{let e=n.target;if(!((o.version<72||e.getConfiguration&&e.getConfiguration().sdpSemantics==="plan-b")&&e.signalingState!=="stable"))return n})}var j7={};jO(j7,{shimAddTransceiver:()=>eW,shimCreateAnswer:()=>iW,shimCreateOffer:()=>nW,shimGetDisplayMedia:()=>G_e,shimGetParameters:()=>tW,shimGetUserMedia:()=>V7,shimOnTrack:()=>KG,shimPeerConnection:()=>U7,shimRTCDataChannel:()=>JG,shimReceiverGetStats:()=>XG,shimRemoveStream:()=>QG,shimSenderGetStats:()=>ZG});function V7(i,o){let n=i&&i.navigator,e=i&&i.MediaStreamTrack;if(n.getUserMedia=function(t,r,a){P_("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(t).then(r,a)},!(o.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){let t=function(a,s,c){s in a&&!(c in a)&&(a[c]=a[s],delete a[s])},r=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(a){return typeof a=="object"&&typeof a.audio=="object"&&(a=JSON.parse(JSON.stringify(a)),t(a.audio,"autoGainControl","mozAutoGainControl"),t(a.audio,"noiseSuppression","mozNoiseSuppression")),r(a)},e&&e.prototype.getSettings){let a=e.prototype.getSettings;e.prototype.getSettings=function(){let s=a.apply(this,arguments);return t(s,"mozAutoGainControl","autoGainControl"),t(s,"mozNoiseSuppression","noiseSuppression"),s}}if(e&&e.prototype.applyConstraints){let a=e.prototype.applyConstraints;e.prototype.applyConstraints=function(s){return this.kind==="audio"&&typeof s=="object"&&(s=JSON.parse(JSON.stringify(s)),t(s,"autoGainControl","mozAutoGainControl"),t(s,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[s])}}}}function G_e(i,o){i.navigator.mediaDevices&&"getDisplayMedia"in i.navigator.mediaDevices||i.navigator.mediaDevices&&(i.navigator.mediaDevices.getDisplayMedia=function(e){if(!(e&&e.video)){let t=new DOMException("getDisplayMedia without video constraints is undefined");return t.name="NotFoundError",t.code=8,Promise.reject(t)}return e.video===!0?e.video={mediaSource:o}:e.video.mediaSource=o,i.navigator.mediaDevices.getUserMedia(e)})}function KG(i){typeof i=="object"&&i.RTCTrackEvent&&"receiver"in i.RTCTrackEvent.prototype&&!("transceiver"in i.RTCTrackEvent.prototype)&&Object.defineProperty(i.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function U7(i,o){if(typeof i!="object"||!(i.RTCPeerConnection||i.mozRTCPeerConnection))return;!i.RTCPeerConnection&&i.mozRTCPeerConnection&&(i.RTCPeerConnection=i.mozRTCPeerConnection),o.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){let r=i.RTCPeerConnection.prototype[t],a={[t](){return arguments[0]=new(t==="addIceCandidate"?i.RTCIceCandidate:i.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};i.RTCPeerConnection.prototype[t]=a[t]});let n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},e=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){let[r,a,s]=arguments;return e.apply(this,[r||null]).then(c=>{if(o.version<53&&!a)try{c.forEach(p=>{p.type=n[p.type]||p.type})}catch(p){if(p.name!=="TypeError")throw p;c.forEach((g,C)=>{c.set(C,Object.assign({},g,{type:n[g.type]||g.type}))})}return c}).then(a,s)}}function ZG(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender)||i.RTCRtpSender&&"getStats"in i.RTCRtpSender.prototype)return;let o=i.RTCPeerConnection.prototype.getSenders;o&&(i.RTCPeerConnection.prototype.getSenders=function(){let t=o.apply(this,[]);return t.forEach(r=>r._pc=this),t});let n=i.RTCPeerConnection.prototype.addTrack;n&&(i.RTCPeerConnection.prototype.addTrack=function(){let t=n.apply(this,arguments);return t._pc=this,t}),i.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function XG(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender)||i.RTCRtpSender&&"getStats"in i.RTCRtpReceiver.prototype)return;let o=i.RTCPeerConnection.prototype.getReceivers;o&&(i.RTCPeerConnection.prototype.getReceivers=function(){let e=o.apply(this,[]);return e.forEach(t=>t._pc=this),e}),nm(i,"track",n=>(n.receiver._pc=n.srcElement,n)),i.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function QG(i){!i.RTCPeerConnection||"removeStream"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.removeStream=function(n){P_("removeStream","removeTrack"),this.getSenders().forEach(e=>{e.track&&n.getTracks().includes(e.track)&&this.removeTrack(e)})})}function JG(i){i.DataChannel&&!i.RTCDataChannel&&(i.RTCDataChannel=i.DataChannel)}function eW(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.addTransceiver;o&&(i.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let t=e.length>0;t&&e.forEach(a=>{if("rid"in a&&!/^[a-z0-9]{0,16}$/i.test(a.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in a&&!(parseFloat(a.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in a&&!(parseFloat(a.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});let r=o.apply(this,arguments);if(t){let{sender:a}=r,s=a.getParameters();(!("encodings"in s)||s.encodings.length===1&&Object.keys(s.encodings[0]).length===0)&&(s.encodings=e,a.sendEncodings=e,this.setParametersPromises.push(a.setParameters(s).then(()=>{delete a.sendEncodings}).catch(()=>{delete a.sendEncodings})))}return r})}function tW(i){if(!(typeof i=="object"&&i.RTCRtpSender))return;let o=i.RTCRtpSender.prototype.getParameters;o&&(i.RTCRtpSender.prototype.getParameters=function(){let e=o.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function nW(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.createOffer;i.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>o.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):o.apply(this,arguments)}}function iW(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.createAnswer;i.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>o.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):o.apply(this,arguments)}}var $7={};jO($7,{shimAudioContext:()=>mW,shimCallbacksAPI:()=>aW,shimConstraints:()=>W_e,shimCreateOfferLegacy:()=>dW,shimGetUserMedia:()=>sW,shimLocalStreamsAPI:()=>oW,shimRTCIceServerUrls:()=>lW,shimRemoteStreamsAPI:()=>rW,shimTrackEventTransceiver:()=>cW});function oW(i){if(!(typeof i!="object"||!i.RTCPeerConnection)){if("getLocalStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in i.RTCPeerConnection.prototype)){let o=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(t=>o.call(this,t,e)),e.getVideoTracks().forEach(t=>o.call(this,t,e))},i.RTCPeerConnection.prototype.addTrack=function(e,...t){return t&&t.forEach(r=>{this._localStreams?this._localStreams.includes(r)||this._localStreams.push(r):this._localStreams=[r]}),o.apply(this,arguments)}}"removeStream"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.removeStream=function(n){this._localStreams||(this._localStreams=[]);let e=this._localStreams.indexOf(n);if(e===-1)return;this._localStreams.splice(e,1);let t=n.getTracks();this.getSenders().forEach(r=>{t.includes(r.track)&&this.removeTrack(r)})})}}function rW(i){if(!(typeof i!="object"||!i.RTCPeerConnection)&&("getRemoteStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in i.RTCPeerConnection.prototype))){Object.defineProperty(i.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(n){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=n),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(t=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(t))return;this._remoteStreams.push(t);let r=new Event("addstream");r.stream=t,this.dispatchEvent(r)})})}});let o=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(r=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(r)>=0)return;e._remoteStreams.push(r);let a=new Event("addstream");a.stream=r,e.dispatchEvent(a)})}),o.apply(e,arguments)}}}function aW(i){if(typeof i!="object"||!i.RTCPeerConnection)return;let o=i.RTCPeerConnection.prototype,n=o.createOffer,e=o.createAnswer,t=o.setLocalDescription,r=o.setRemoteDescription,a=o.addIceCandidate;o.createOffer=function(p,g){let C=arguments.length>=2?arguments[2]:arguments[0],E=n.apply(this,[C]);return g?(E.then(p,g),Promise.resolve()):E},o.createAnswer=function(p,g){let C=arguments.length>=2?arguments[2]:arguments[0],E=e.apply(this,[C]);return g?(E.then(p,g),Promise.resolve()):E};let s=function(c,p,g){let C=t.apply(this,[c]);return g?(C.then(p,g),Promise.resolve()):C};o.setLocalDescription=s,s=function(c,p,g){let C=r.apply(this,[c]);return g?(C.then(p,g),Promise.resolve()):C},o.setRemoteDescription=s,s=function(c,p,g){let C=a.apply(this,[c]);return g?(C.then(p,g),Promise.resolve()):C},o.addIceCandidate=s}function sW(i){let o=i&&i.navigator;if(o.mediaDevices&&o.mediaDevices.getUserMedia){let n=o.mediaDevices,e=n.getUserMedia.bind(n);o.mediaDevices.getUserMedia=t=>e(W_e(t))}!o.getUserMedia&&o.mediaDevices&&o.mediaDevices.getUserMedia&&(o.getUserMedia=(function(e,t,r){o.mediaDevices.getUserMedia(e).then(t,r)}).bind(o))}function W_e(i){return i&&i.video!==void 0?Object.assign({},i,{video:UG(i.video)}):i}function lW(i){if(!i.RTCPeerConnection)return;let o=i.RTCPeerConnection;i.RTCPeerConnection=function(e,t){if(e&&e.iceServers){let r=[];for(let a=0;a<e.iceServers.length;a++){let s=e.iceServers[a];s.urls===void 0&&s.url?(P_("RTCIceServer.url","RTCIceServer.urls"),s=JSON.parse(JSON.stringify(s)),s.urls=s.url,delete s.url,r.push(s)):r.push(e.iceServers[a])}e.iceServers=r}return new o(e,t)},i.RTCPeerConnection.prototype=o.prototype,"generateCertificate"in o&&Object.defineProperty(i.RTCPeerConnection,"generateCertificate",{get(){return o.generateCertificate}})}function cW(i){typeof i=="object"&&i.RTCTrackEvent&&"receiver"in i.RTCTrackEvent.prototype&&!("transceiver"in i.RTCTrackEvent.prototype)&&Object.defineProperty(i.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function dW(i){let o=i.RTCPeerConnection.prototype.createOffer;i.RTCPeerConnection.prototype.createOffer=function(e){if(e){typeof e.offerToReceiveAudio<"u"&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(a=>a.receiver.track.kind==="audio");e.offerToReceiveAudio===!1&&t?t.direction==="sendrecv"?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":t.direction==="recvonly"&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):e.offerToReceiveAudio===!0&&!t&&this.addTransceiver("audio",{direction:"recvonly"}),typeof e.offerToReceiveVideo<"u"&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let r=this.getTransceivers().find(a=>a.receiver.track.kind==="video");e.offerToReceiveVideo===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):e.offerToReceiveVideo===!0&&!r&&this.addTransceiver("video",{direction:"recvonly"})}return o.apply(this,arguments)}}function mW(i){typeof i!="object"||i.AudioContext||(i.AudioContext=i.webkitAudioContext)}var uW={};jO(uW,{removeExtmapAllowMixed:()=>G7,shimAddIceCandidateNullOrEmpty:()=>SO,shimConnectionState:()=>z7,shimMaxMessageSize:()=>_O,shimParameterlessSetLocalDescription:()=>bO,shimRTCIceCandidate:()=>CO,shimRTCIceCandidateRelayProtocol:()=>H7,shimSendThrowTypeError:()=>yO});var M_=XW(gW());function CO(i){if(!i.RTCIceCandidate||i.RTCIceCandidate&&"foundation"in i.RTCIceCandidate.prototype)return;let o=i.RTCIceCandidate;i.RTCIceCandidate=function(e){if(typeof e=="object"&&e.candidate&&e.candidate.indexOf("a=")===0&&(e=JSON.parse(JSON.stringify(e)),e.candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let t=new o(e),r=M_.default.parseCandidate(e.candidate);for(let a in r)a in t||Object.defineProperty(t,a,{value:r[a]});return t.toJSON=function(){return{candidate:t.candidate,sdpMid:t.sdpMid,sdpMLineIndex:t.sdpMLineIndex,usernameFragment:t.usernameFragment}},t}return new o(e)},i.RTCIceCandidate.prototype=o.prototype,nm(i,"icecandidate",n=>(n.candidate&&Object.defineProperty(n,"candidate",{value:new i.RTCIceCandidate(n.candidate),writable:"false"}),n))}function H7(i){!i.RTCIceCandidate||i.RTCIceCandidate&&"relayProtocol"in i.RTCIceCandidate.prototype||nm(i,"icecandidate",o=>{if(o.candidate){let n=M_.default.parseCandidate(o.candidate.candidate);n.type==="relay"&&(o.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[n.priority>>24])}return o})}function _O(i,o){if(!i.RTCPeerConnection)return;"sctp"in i.RTCPeerConnection.prototype||Object.defineProperty(i.RTCPeerConnection.prototype,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp}});let n=function(s){if(!s||!s.sdp)return!1;let c=M_.default.splitSections(s.sdp);return c.shift(),c.some(p=>{let g=M_.default.parseMLine(p);return g&&g.kind==="application"&&g.protocol.indexOf("SCTP")!==-1})},e=function(s){let c=s.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(c===null||c.length<2)return-1;let p=parseInt(c[1],10);return p!==p?-1:p},t=function(s){let c=65536;return o.browser==="firefox"&&(o.version<57?s===-1?c=16384:c=2147483637:o.version<60?c=o.version===57?65535:65536:c=2147483637),c},r=function(s,c){let p=65536;o.browser==="firefox"&&o.version===57&&(p=65535);let g=M_.default.matchPrefix(s.sdp,"a=max-message-size:");return g.length>0?p=parseInt(g[0].substring(19),10):o.browser==="firefox"&&c!==-1&&(p=2147483637),p},a=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,o.browser==="chrome"&&o.version>=76){let{sdpSemantics:c}=this.getConfiguration();c==="plan-b"&&Object.defineProperty(this,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){let c=e(arguments[0]),p=t(c),g=r(arguments[0],c),C;p===0&&g===0?C=Number.POSITIVE_INFINITY:p===0||g===0?C=Math.max(p,g):C=Math.min(p,g);let E={};Object.defineProperty(E,"maxMessageSize",{get(){return C}}),this._sctp=E}return a.apply(this,arguments)}}function yO(i){if(!(i.RTCPeerConnection&&"createDataChannel"in i.RTCPeerConnection.prototype))return;function o(e,t){let r=e.send;e.send=function(){let s=arguments[0],c=s.length||s.size||s.byteLength;if(e.readyState==="open"&&t.sctp&&c>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}let n=i.RTCPeerConnection.prototype.createDataChannel;i.RTCPeerConnection.prototype.createDataChannel=function(){let t=n.apply(this,arguments);return o(t,this),t},nm(i,"datachannel",e=>(o(e.channel,e.target),e))}function z7(i){if(!i.RTCPeerConnection||"connectionState"in i.RTCPeerConnection.prototype)return;let o=i.RTCPeerConnection.prototype;Object.defineProperty(o,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(o,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(n){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),n&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=n)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(n=>{let e=o[n];o[n]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=t=>{let r=t.target;if(r._lastConnectionState!==r.connectionState){r._lastConnectionState=r.connectionState;let a=new Event("connectionstatechange",t);r.dispatchEvent(a)}return t},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),e.apply(this,arguments)}})}function G7(i,o){if(!i.RTCPeerConnection||o.browser==="chrome"&&o.version>=71||o.browser==="safari"&&o.version>=605)return;let n=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&t.sdp.indexOf(`
539
539
  a=extmap-allow-mixed`)!==-1){let r=t.sdp.split(`