@veltdev/sdk-staging 4.5.6-beta.18 → 4.5.6-beta.19

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-staging",
3
- "version": "4.5.6-beta.18",
3
+ "version": "4.5.6-beta.19",
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.18';
1
+ var SNIPPYLY_VERSION = '4.5.6-beta.19';
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 h1e=Object.create;var VO=Object.defineProperty,f1e=Object.defineProperties,v1e=Object.getOwnPropertyDescriptor,C1e=Object.getOwnPropertyDescriptors,_1e=Object.getOwnPropertyNames,BO=Object.getOwnPropertySymbols,XW=Object.getPrototypeOf,i8=Object.prototype.hasOwnProperty,QW=Object.prototype.propertyIsEnumerable,y1e=Reflect.get;var ZW=(i,o,n)=>o in i?VO(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,I=(i,o)=>{for(var n in o||={})i8.call(o,n)&&ZW(i,n,o[n]);if(BO)for(var n of BO(o))QW.call(o,n)&&ZW(i,n,o[n]);return i},D=(i,o)=>f1e(i,C1e(o));var Z_=(i,o)=>{var n={};for(var e in i)i8.call(i,e)&&o.indexOf(e)<0&&(n[e]=i[e]);if(i!=null&&BO)for(var e of BO(i))o.indexOf(e)<0&&QW.call(i,e)&&(n[e]=i[e]);return n};var S1e=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),UO=(i,o)=>{for(var n in o)VO(i,n,{get:o[n],enumerable:!0})},b1e=(i,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of _1e(o))!i8.call(i,t)&&t!==n&&VO(i,t,{get:()=>o[t],enumerable:!(e=v1e(o,t))||e.enumerable});return i};var JW=(i,o,n)=>(n=i!=null?h1e(XW(i)):{},b1e(o||!i||!i.__esModule?VO(n,"default",{value:i,enumerable:!0}):n,i));var rp=(i,o,n)=>y1e(XW(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 hW=S1e((rSo,uW)=>{"use strict";var It={};It.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};It.localCName=It.generateIdentifier();It.splitLines=function(i){return i.trim().split(`
@@ -166,7 +166,7 @@ Content-Type: `+p.contentType+`\r
166
166
  d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"
167
167
  />
168
168
  </svg>
169
- `},gt.CommentAnnotationPriorityMap={P0:{id:"P0",name:"P0",color:"var(--velt-error, #FF7162)",lightColor:"var(--velt-error-light, #F7E7E7) "},P1:{id:"P1",name:"P1",color:"var(--velt-warning, #ECB000)",lightColor:"var(--velt-warning-light, #FEFCEA)"},P2:{id:"P2",name:"P2",color:"var(--velt-text-7, #777E91)",lightColor:"var(--velt-background-1, #F3F3F5)"}},gt.WorkspaceRoles=[{id:yo.COMMENTER?.toLowerCase(),name:yo.COMMENTER,description:"Can comment on this project",permissions:[]},{id:yo.ADMIN?.toLowerCase(),name:yo.ADMIN,description:"Can comment on all projects and has access to the portal",permissions:[]}],gt.DocumentAccessTypeMap={[Ii.PUBLIC]:{id:Ii.PUBLIC,name:Ii.PUBLIC,description:"Anyone with link can view"},[Ii.RESTRICTED]:{id:Ii.RESTRICTED,name:Ii.RESTRICTED,description:"Only people with access can view"}},gt.DocumentAccessTypeMapSF={[Ii.PUBLIC]:{id:Ii.PUBLIC,name:Ii.PUBLIC,description:"Anyone with the link can comment after logging in."},[Ii.RESTRICTED]:{id:Ii.RESTRICTED,name:Ii.RESTRICTED,description:"Only people added to this project can comment."}},gt.CommentCategoryMap={bug:{id:"bug",name:"Bug",color:"#FF7162"},feedback:{id:"feedback",name:"Feedback",color:"#00C48C"},question:{id:"question",name:"Question",color:"#FFD166"}},gt.OVERLAY_POSITIONS=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"}],gt.OVERLAY_POSITIONS_FOR_POPOVER_MODE=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"}],gt.VIDEO_EDITOR={ZOOM_IN_DURATION:500,ZOOM_OUT_DURATION:500,DEFAULT_ZOOM_FACTOR:1.5,MAX_ZOOM_FACTOR:3,ZOOM_FACTOR_OPTIONS:[{value:2,label:"2x"},{value:1.7,label:"1.7x"},{value:1.5,label:"1.5x"},{value:1.2,label:"1.2x"}],MIN_DRAG_AREA_MULTIPLIER:.015,PREFERRED_SECTION_DURATION_MULTIPLIER:.15,SELECTION_MIN_DRAG_DISTANCE:2,MIN_DURATION_THRESHOLD:.01,TIME_BUFFER:.1,SHORT_VIDEO_THRESHOLD:3,SMALL_VIDEO_THRESHOLD:5,MILLISECOND_PRECISION_MULTIPLIER:1e3,TENTH_SECOND_PRECISION_MULTIPLIER:10,DEBOUNCE_DELAY:200,DECIMAL_PRECISION:2,MAX_MARKER_COUNT:10,MARKER_INTERVAL:5,FAST_TIMEOUT:50,STANDARD_TIMEOUT:100,RECTANGLE_POSITIONING:{FULL_PERCENT:100,HALF_PERCENT:50,QUARTER_PERCENT:25},EASING:{QUAD_IN_OUT_MULTIPLIER:2,QUAD_IN_OUT_POWER:2,HALF_THRESHOLD:.5},PERCENTAGE:{HALF:50,FULL:100},MILLISECONDS_TO_SECONDS:1e3};var j=gt;var An=(i,o=0)=>{try{let n=3735928559^o,e=1103547991^o;for(let t=0,r;t<i.length;t++)r=i.charCodeAt(t),n=Math.imul(n^r,2654435761),e=Math.imul(e^r,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&e)+(n>>>0)}catch(n){return rt.catch("Error in cyrb53: ",n),0}},L9e=()=>{try{return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}catch(i){return rt.catch("Error in uuidv4: ",i),""}},_t=i=>{try{return _a.hashStr(i)}catch(o){return rt.catch("Error in hashStr: ",o),i}},Cae=i=>{try{if(!i||i.trim().length===0)return;let o=_a.hashStr(i);return parseInt(o.substring(0,15),16).toString(36)}catch(o){rt.catch("Error in hashForAnchor: ",o);return}},_r=i=>An(i).toString(),Kj=i=>_t(i),ja=i=>_t(i).toString(),Ui=i=>_t(i).toString(),Nd=i=>{try{if(i)return typeof i=="string"?_a.hashStr(i):Array.isArray(i)?_a.hashStr(i.join("-")):"";{let o=L9e();return _a.hashStr(o)}}catch(o){return rt.catch("Error in getMultiThreadAnnotationId: ",o),""}},Xi=(i,o,n)=>{try{if(i&&o){if(i.featureAllowList&&i.featureAllowList.length&&!i.featureAllowList.includes(n)||i.userIdAllowList&&i.userIdAllowList.length&&!i.userIdAllowList.includes(o.userId)||i.userGroupIdAllowList&&i.userGroupIdAllowList.length&&!i.userGroupIdAllowList.includes(o.groupId||"")||i.userPlanAllowList&&i.userPlanAllowList.length&&!i.userPlanAllowList.includes(o.plan||""))return!1;if(i.urlAllowList){let e=window.location.href;if(i.urlAllowList.length&&!i.urlAllowList.filter(t=>e.includes(t)).length)return!1}return!0}return!1}catch(e){return rt.catch("Error in isFeatureAllowed: ",e),!1}},Dn=()=>{try{let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o="";for(let n=0;n<20;n++)o+=i.charAt(Math.floor(Math.random()*i.length));return o}catch(i){return rt.catch("Error in utils generateId: ",i),""}},Zp=i=>{try{let o=0;if(i){let n=new Date().getTime();o=Math.abs(n-i)}return o}catch(o){return rt.catch("Error in utils getFirebaseTimeDiffInMins: ",o),0}};var _ae=()=>{try{return $n.debugMode||!!sessionStorage.getItem("debugMode")||!!sessionStorage.getItem("forceDebugMode")}catch(i){return rt.catch("Error in showLogs: ",i),!1}},Jo=i=>{try{return typeof i!="object"?Object.assign({},...Object.keys(i).sort().map(o=>({[o]:i[o]&&typeof i[o]=="object"?Jo(i[o]):i[o]}))):i}catch(o){return rt.catch("Error in sortObjectByKeys: ",o),i}},Yj=i=>{try{return i!==null&&typeof i=="object"&&!Array.isArray(i)}catch{return!1}},jl=i=>{try{return Yj(i)?Object.fromEntries(Object.entries(i).sort(([o],[n])=>o.localeCompare(n)).map(([o,n])=>[o,Yj(n)?jl(n):Array.isArray(n)?n.map(e=>Yj(e)?jl(e):e):n])):i}catch{return i}},iM=(i,o)=>{try{return typeof o!="object"||o===null?i===o:typeof i!="object"||i===null?!1:Array.isArray(o)?Array.isArray(i)?o.every(n=>i.some(e=>iM(e,n))):!1:Object.keys(o).every(n=>Object.prototype.hasOwnProperty.call(i,n)?iM(i[n],o[n]):!1)}catch{return!1}},Zj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield V9e(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new TextEncoder().encode(i),a=yield window.crypto.subtle.encrypt({name:"AES-CBC",iv:t},e,r);return btoa(String.fromCharCode(...new Uint8Array(a)))}catch(e){return rt.catch("Error in encrypt: ",e),i}}),Xj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield B9e(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new Uint8Array(atob(i).split("").map(s=>s.charCodeAt(0))),a=yield window.crypto.subtle.decrypt({name:"AES-CBC",iv:t},e,r);return new TextDecoder().decode(a)}catch(e){return rt.catch("Error in decrypt: ",e),i}}),B9e=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["decrypt"])}catch(o){throw rt.catch("Error in importDecryptKey:",o),o}}),zm=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o;return yield Zj(JSON.stringify(i),n,_t(n))}catch(n){return rt.catch("Error in encryptData: ",n),i}}),aM=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o,e=yield Xj(i,n,_t(n));return JSON.parse(e)}catch(n){return rt.catch("Error in decryptData: ",n),null}}),sM=i=>{try{switch(i?.region){case"asiaSouthEast1":return"asiaSouthEast1";case"asiaNorthEast1":return"asiaNorthEast1";case"europeWest1":return"europeWest1";default:return"usCentral1"}}catch(o){return rt.catch("Error in getRegion: ",o),"usCentral1"}},V9e=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["encrypt"])}catch(o){throw rt.catch("Error in importKey:",o),o}}),yae=i=>{try{if(i&&typeof i=="object"){let o=Jo(i);return An(JSON.stringify(o))}else return null}catch(o){return rt.catch("Error in utils generateLocationId: ",o),null}},zi=(i,o=[])=>(i?.tagName?.toLowerCase().indexOf("velt-")>=0&&![j.TAGS.VELT_VIDEO_PLAYER.toLowerCase()].includes(i?.tagName?.toLowerCase())||i?.tagName?.toLowerCase().indexOf("snippyly-")>=0||i?.className?.split&&(i?.className?.split(" ")?.indexOf("snippyly-overlay-panel")>=0||i?.className?.split(" ")?.indexOf("cdk-overlay-container")>=0))&&!o?.includes(i?.tagName?.toLowerCase())?!0:i?.parentNode&&zi(i?.parentNode,o),Ti=i=>{try{return!!document?.body?.contains(i)}catch(o){return rt.catch("Error in utils isElementInsideBody: ",o),!1}};var mi=(i,o)=>{try{return Object.prototype.toString.call(i)===Object.prototype.toString.call(o)?Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"?Object.keys(i).length!==Object.keys(o).length?!1:Object.keys(i).every(n=>mi(i[n],o[n])):i===o:!1}catch(n){return rt.catch("Error in utils deepCompare: ",n),!1}},kv=(i,o,n=1)=>{try{if(o){let e=U9e(o.textContent,i,n);if(e>=0){let t=(o?.ownerDocument).createNodeIterator(o,NodeFilter.SHOW_TEXT),r,a=[];for(;r=t.nextNode();)a.push(r);let s=[],c=e,p=i.length,g=c+p,C=0;for(let E=0;E<a.length;E++){let T=a[E],N=C;if(C+=T.textContent?.length,C>=c&&!s.length?s.push({textNode:T,startOffset:c-N}):C>=c&&C<g&&s.push({textNode:T}),C>=g){if(s.length===1&&s[0].textNode===T){s.push({textNode:T,endOffset:c-N+i.length});break}let z=p;s.forEach(W=>{z-=W.textNode.textContent?.length-(W.startOffset||0)}),s.push({textNode:T,endOffset:z});break}}return s}}return[]}catch(e){return rt.catch("Error in utils calculateNodes: ",e),[]}},U9e=(i,o,n=1)=>{try{if(i?.includes(o)){let e=i.split(o,n);return e.length===n?e.join(o).length:-1}else return-1}catch(e){return rt.catch("Error in utils getTextPosition: ",e),-1}},nh=(i,o,n,e,t)=>{try{let r=new Range;r.setStart(i,o),r.setEnd(n,e);let a=r.toString(),s=0;if(i.nodeType===Node.TEXT_NODE){let c=i,p="";if(c)for(;c=c.previousSibling;)p=(c.textContent||"")+p;if(p){let g=new RegExp(Nc(t),"g");s=(p.match(g)||[]).length}}if(a){let c=new RegExp(Nc(t),"g");return(a.match(c)||[]).length+s}else return s}catch(r){return rt.catch("Error in utils getSelectedTextOccurrenceInRange: ",r),0}},Nc=i=>{try{return i&&typeof i=="string"?i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):i}catch(o){return rt.catch("Error in utils escapeRegExp: ",o),i}},Rv=i=>{try{return i==null?null:i.scrollHeight>i.clientHeight?i:Rv(i?.parentNode)}catch(o){return rt.catch("Error in utils getScrollableParent: ",o),null}},Kp=i=>{try{return i==null?[]:i.scrollHeight>i.clientHeight?[i,...Kp(i?.parentNode)]:Kp(i?.parentNode)}catch(o){return rt.catch("Error in utils getScrollableParents: ",o),[]}},Qj=(i,o)=>{try{if(i&&o){let n=i.getBoundingClientRect(),e=o.getBoundingClientRect(),t=n.top-e.top+(o.tagName?.toLowerCase()==="html"?0:o.scrollTop),r=n.left-e.left;return{top:t,left:r}}else return null}catch(n){return rt.catch("Error in utils getRelativeTopLeftPosition: ",n),null}},Nv=(i,o)=>`${An(i+"_"+o)}`,Mi=()=>{try{let i=new ao;return i.url=window.location.href,i.path=window.location.pathname,i.queryParams=window.location.search,i.baseUrl=window.location.origin,i.title=document.title,i}catch(i){rt.catch("Error in utils getPageInfo: ",i);return}},Gm=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED)?!0:Gm(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isCommentDisabledOnElement: ",o),!1}},lM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_TAG_DISABLED)?!0:lM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isTagDisabledOnElement: ",o),!1}},cM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_ARROW_DISABLED)?!0:cM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isArrowDisabledOnElement: ",o),!1}},dM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_AREA_DISABLED)?!0:dM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isAreaDisabledOnElement: ",o),!1}},mM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_RECORDER_DISABLED)?!0:mM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isRecorderDisabledOnElement: ",o),!1}};var ra=()=>{try{return window?.Snippyly?.version}catch(i){return rt.catch("Error in utils getSdkVersion: ",i),null}},Jj=i=>{try{return Object.fromEntries(Object.entries(i).filter(([o,n])=>n!==void 0))}catch(o){return rt.catch("Error in utils removeUndefinedKeys: ",o),i}},pM=i=>{try{let o=new URL(i);return Object.values(j.URL_PARAMS).forEach(n=>{o.searchParams.delete(n)}),o.href}catch(o){return rt.catch("Error in utils excludeSnippylyParamsFromUrl: ",o),i}},Ps=i=>{try{navigator.clipboard.writeText(i)}catch(o){rt.catch("Error in copyToClipboard: ",o)}},qS=i=>{try{let o=Sae(i);return o&&typeof o=="string"&&o.includes("/svg")&&(o=o.split("/svg")[0]+"/*[name()='svg']"),o}catch(o){rt.catch("Error in utils getXPath:",o)}},Sae=i=>{try{if(i){if(typeof i=="string")return document.evaluate(i,document,null,0,null);if(!i||i.nodeType!=1)return"";if(i.id&&i?.tagName?.toLowerCase()!=="svg"&&document.querySelectorAll(`[id='${i.id}']`)?.length===1)return"//*[@id='"+i.id+"']";let o=[].filter.call(i.parentNode?.children?i.parentNode?.children:[],function(n){return n.tagName==i.tagName});return Sae(i.parentNode)+"/"+i.tagName.toLowerCase()+(o.length>1?"["+([].indexOf.call(o,i)+1)+"]":"")}}catch(o){rt.catch("Error in utils calculateXPath:",o)}},bae=i=>{try{let o=[];return i.forEach(n=>{let e={};e.commonAncestorContainer=j9e(n.commonAncestorContainer),e.text=n.toString(),e.occurrence=nh(n.commonAncestorContainer,0,n.startContainer,n.startOffset,n.toString())+1,o.push(e)}),o}catch{return[]}},j9e=i=>{try{if(i.nodeType===Node.TEXT_NODE){let o=1,n=i.previousSibling;for(;n;)n.nodeType===Node.TEXT_NODE&&o++,n=n.previousSibling;return qS(i.parentElement)}else return qS(i)}catch(o){return rt.catch("Error in utils getXPathForText: ",o),qS(i)}},e$=(i,o)=>{try{return i?i?.hasAttribute&&(o&&i.hasAttribute("contenteditable")||i?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_ENABLED)==="true")?i:e$(i?.parentElement,o):null}catch(n){return rt.catch("Error in utils getSelectionEnabledElement: ",n),null}},gM=i=>{try{let o,n=[],e=document.createTreeWalker(i,NodeFilter.SHOW_TEXT,null);for(;o=e.nextNode();)n.push(o);return n}catch(o){return rt.catch("Error in utils getTextNodesInsideElement: ",o),[]}},Iae=i=>{try{return i<576||i>=576&&i<767?"Mobile":i>=768&&i<992?"Tablet":i>=992&&i<1520?"Desktop":"Monitor"}catch(o){return rt.catch("Error in utils getDeviceTypeFromDeviceWidth: ",o),""}},Fd=i=>new Promise(o=>setTimeout(o,i)),Eae=(i,o=0)=>new Promise((n,e)=>{let t=document.createElement("video"),r=navigator.userAgent.includes("Firefox");r&&(t.preload="auto"),t.setAttribute("src",URL.createObjectURL(i)),t.load(),t.addEventListener("error",a=>{e("error when loading video file: "+a)}),t.addEventListener("loadedmetadata",()=>{let a=()=>{if(t.duration<o){e("video is too short.");return}setTimeout(()=>{t.currentTime=o},200),t.addEventListener("seeked",()=>{let s=document.createElement("canvas");s.width=t.videoWidth,s.height=t.videoHeight;let c=s.getContext("2d");c.drawImage(t,0,0,s.width,s.height),c.canvas.toBlob(p=>{t.remove(),n(p)},"image/jpeg",.75)})};if(r&&t.duration>0&&t.duration<10&&i.size>1e6){(()=>{setTimeout(()=>{t.duration<o&&(o=Math.max(.1,t.duration/2)),a()},1e3)})();return}a()})}),xae=i=>{try{return new Promise((o,n)=>{let e=new FileReader;e.onloadend=()=>o(e.result),e.readAsDataURL(i)})}catch(o){return rt.catch("Error in utils blobToBase64: ",o),Promise.resolve("")}},t$=(i,o="image/jpeg")=>{try{let n=atob(i.split(",")[1]),e=new ArrayBuffer(n.length),t=new Uint8Array(e);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return new Blob([e],{type:o})}catch(n){return rt.catch("Error in utils base64ToBlob: ",n),null}},Tae=(i,o,n=20)=>new Promise((e,t)=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let a=r.width,s=r.height,c=600,p=s/a*c,g="http://www.w3.org/2000/svg",C=document.createElementNS(g,"svg");C.setAttribute("xmlns",g),C.setAttribute("width",c.toString()),C.setAttribute("height",p.toString()),C.setAttribute("viewBox",`0 0 ${c} ${p}`);let E=document.createElementNS(g,"circle"),T=document.createElementNS(g,"polygon"),N=16,z=N+16,W=c/2,ee=p/2;if(E.setAttribute("cx",W.toString()),E.setAttribute("cy",ee.toString()),E.setAttribute("r",z.toString()),E.setAttribute("fill","lightgrey"),T.setAttribute("points",`${W-N/2},${ee-N} ${W-N/2},${ee+N} ${W+N},${ee}`),T.setAttribute("fill","#ffffff"),C.appendChild(E),C.appendChild(T),o){let xe=o.length*16-10,Se=16*1.5,Oe=(c-xe)/2,Ce=p-Se-10,fe=document.createElementNS(g,"rect");fe.setAttribute("x",Oe.toString()),fe.setAttribute("y",Ce.toString()),fe.setAttribute("width",xe.toString()),fe.setAttribute("height",Se.toString()),fe.setAttribute("fill","#353945b3"),fe.setAttribute("rx","12"),C.appendChild(fe);let we=document.createElementNS(g,"text");we.textContent=o,we.setAttribute("x",(c/2).toString()),we.setAttribute("y",(Ce+16).toString()),we.setAttribute("font-size","16"),we.setAttribute("text-anchor","middle"),we.setAttribute("fill","white"),C.appendChild(we)}let ce=new XMLSerializer().serializeToString(C),ye=new Image,Pe=new Blob([ce],{type:"image/svg+xml;charset=utf-8"}),Ge=URL.createObjectURL(Pe);ye.onload=()=>{let Re=document.createElement("canvas");Re.width=c,Re.height=p;let xe=Re.getContext("2d");xe.beginPath(),xe.moveTo(n,0),xe.lineTo(c-n,0),xe.quadraticCurveTo(c,0,c,n),xe.lineTo(c,p-n),xe.quadraticCurveTo(c,p,c-n,p),xe.lineTo(n,p),xe.quadraticCurveTo(0,p,0,p-n),xe.lineTo(0,n),xe.quadraticCurveTo(0,0,n,0),xe.closePath(),xe.clip(),xe.drawImage(r,0,0,c,p),xe.drawImage(ye,0,0,c,p);let Se=Re.toDataURL("image/png");e(Se)},ye.onerror=t,ye.src=Ge},r.onerror=t,r.src=i});var uM=i=>{try{return i?.replace(/[\n\t\u200D]/g,"")?.split(/\s+/)?.filter(e=>e?.trim()?.length)||[]}catch(o){return rt.catch("Error in utils getWords: ",o),[]}},aa=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelector(n)}catch(n){return rt.catch("Error in utils getElementByAttributes: ",n),null}},Dae=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelectorAll(n)}catch(n){return rt.catch("Error in utils getElementsByAttributes: ",n),[]}},Rc=i=>{try{let o=Math.floor(i/3600),n=Math.floor((i-o*3600)/60),e=Math.floor(i-o*3600-n*60);return o&&o<10&&(o="0"+o),n<10&&(n="0"+n),e<10&&(e="0"+e),(o?o+":":"")+n+":"+e}catch{return""}},wae=(i,o=10)=>{try{if(!i||!i.currentTime)throw new Error("Invalid video element reference provided");let n=i.currentTime,e=Math.floor(n/o)*o,t=e+o;return{startSlot:Rc(e),endSlot:Rc(t),timeSlot:Rc(e)+" - "+Rc(t)}}catch{return null}},Fv=(i,o=["@"])=>{try{let n="",e,t=i.getRootNode();if(t instanceof ShadowRoot?e=t?.getSelection():e=window.getSelection(),e?.rangeCount){let r=e.getRangeAt(0),a=r.startOffset,s=r.endOffset,c=r?.commonAncestorContainer?.textContent;c?n=$9e(c,s,o):n=""}return n}catch(n){return rt.catch("Error in utils getWordAtCursor: ",n),""}};var $9e=(i,o,n=["@"])=>{try{let e=-1,t=!1;for(let r of n){let a=i.lastIndexOf(r,o),s=a>0?i.lastIndexOf(r,a-1):-1;if(a>e){let c=oM(i,a,o),p=rM(i,a,o);if(c||p){if(s!==-1){let g=oM(i,s,a),C=rM(i,s,a);!g&&!C&&(e=s,t=!0)}}else e=a,t=!0}}return e!==-1&&t?i.substring(e,o):""}catch(e){return rt.catch("Error in utils getStringFromLastAtSymbol: ",e),""}},oM=(i,o,n)=>{try{if(o===0)return!1;let e=i.charAt(o-1);return!(e===" "||e==="\xA0"||e===`
169
+ `},gt.CommentAnnotationPriorityMap={P0:{id:"P0",name:"P0",color:"var(--velt-error, #FF7162)",lightColor:"var(--velt-error-light, #F7E7E7) "},P1:{id:"P1",name:"P1",color:"var(--velt-warning, #ECB000)",lightColor:"var(--velt-warning-light, #FEFCEA)"},P2:{id:"P2",name:"P2",color:"var(--velt-text-7, #777E91)",lightColor:"var(--velt-background-1, #F3F3F5)"}},gt.WorkspaceRoles=[{id:yo.COMMENTER?.toLowerCase(),name:yo.COMMENTER,description:"Can comment on this project",permissions:[]},{id:yo.ADMIN?.toLowerCase(),name:yo.ADMIN,description:"Can comment on all projects and has access to the portal",permissions:[]}],gt.DocumentAccessTypeMap={[Ii.PUBLIC]:{id:Ii.PUBLIC,name:Ii.PUBLIC,description:"Anyone with link can view"},[Ii.RESTRICTED]:{id:Ii.RESTRICTED,name:Ii.RESTRICTED,description:"Only people with access can view"}},gt.DocumentAccessTypeMapSF={[Ii.PUBLIC]:{id:Ii.PUBLIC,name:Ii.PUBLIC,description:"Anyone with the link can comment after logging in."},[Ii.RESTRICTED]:{id:Ii.RESTRICTED,name:Ii.RESTRICTED,description:"Only people added to this project can comment."}},gt.CommentCategoryMap={bug:{id:"bug",name:"Bug",color:"#FF7162"},feedback:{id:"feedback",name:"Feedback",color:"#00C48C"},question:{id:"question",name:"Question",color:"#FFD166"}},gt.OVERLAY_POSITIONS=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"}],gt.OVERLAY_POSITIONS_FOR_POPOVER_MODE=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"}],gt.VIDEO_EDITOR={ZOOM_IN_DURATION:500,ZOOM_OUT_DURATION:500,DEFAULT_ZOOM_FACTOR:1.5,MAX_ZOOM_FACTOR:3,ZOOM_FACTOR_OPTIONS:[{value:2,label:"2x"},{value:1.7,label:"1.7x"},{value:1.5,label:"1.5x"},{value:1.2,label:"1.2x"}],MIN_DRAG_AREA_MULTIPLIER:.015,PREFERRED_SECTION_DURATION_MULTIPLIER:.15,SELECTION_MIN_DRAG_DISTANCE:2,MIN_DURATION_THRESHOLD:.01,TIME_BUFFER:.1,SHORT_VIDEO_THRESHOLD:3,SMALL_VIDEO_THRESHOLD:5,MILLISECOND_PRECISION_MULTIPLIER:1e3,TENTH_SECOND_PRECISION_MULTIPLIER:10,DEBOUNCE_DELAY:200,DECIMAL_PRECISION:2,MAX_MARKER_COUNT:10,MARKER_INTERVAL:5,FAST_TIMEOUT:50,STANDARD_TIMEOUT:100,RECTANGLE_POSITIONING:{FULL_PERCENT:100,HALF_PERCENT:50,QUARTER_PERCENT:25},EASING:{QUAD_IN_OUT_MULTIPLIER:2,QUAD_IN_OUT_POWER:2,HALF_THRESHOLD:.5},PERCENTAGE:{HALF:50,FULL:100},MILLISECONDS_TO_SECONDS:1e3};var j=gt;var An=(i,o=0)=>{try{let n=3735928559^o,e=1103547991^o;for(let t=0,r;t<i.length;t++)r=i.charCodeAt(t),n=Math.imul(n^r,2654435761),e=Math.imul(e^r,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&e)+(n>>>0)}catch(n){return rt.catch("Error in cyrb53: ",n),0}},L9e=()=>{try{return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}catch(i){return rt.catch("Error in uuidv4: ",i),""}},_t=i=>{try{return _a.hashStr(i)}catch(o){return rt.catch("Error in hashStr: ",o),i}},Cae=i=>{try{return!i||i.trim().length===0?void 0:_a.hashStr(i)}catch(o){rt.catch("Error in hashForAnchor: ",o);return}},_r=i=>An(i).toString(),Kj=i=>_t(i),ja=i=>_t(i).toString(),Ui=i=>_t(i).toString(),Nd=i=>{try{if(i)return typeof i=="string"?_a.hashStr(i):Array.isArray(i)?_a.hashStr(i.join("-")):"";{let o=L9e();return _a.hashStr(o)}}catch(o){return rt.catch("Error in getMultiThreadAnnotationId: ",o),""}},Xi=(i,o,n)=>{try{if(i&&o){if(i.featureAllowList&&i.featureAllowList.length&&!i.featureAllowList.includes(n)||i.userIdAllowList&&i.userIdAllowList.length&&!i.userIdAllowList.includes(o.userId)||i.userGroupIdAllowList&&i.userGroupIdAllowList.length&&!i.userGroupIdAllowList.includes(o.groupId||"")||i.userPlanAllowList&&i.userPlanAllowList.length&&!i.userPlanAllowList.includes(o.plan||""))return!1;if(i.urlAllowList){let e=window.location.href;if(i.urlAllowList.length&&!i.urlAllowList.filter(t=>e.includes(t)).length)return!1}return!0}return!1}catch(e){return rt.catch("Error in isFeatureAllowed: ",e),!1}},Dn=()=>{try{let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o="";for(let n=0;n<20;n++)o+=i.charAt(Math.floor(Math.random()*i.length));return o}catch(i){return rt.catch("Error in utils generateId: ",i),""}},Zp=i=>{try{let o=0;if(i){let n=new Date().getTime();o=Math.abs(n-i)}return o}catch(o){return rt.catch("Error in utils getFirebaseTimeDiffInMins: ",o),0}};var _ae=()=>{try{return $n.debugMode||!!sessionStorage.getItem("debugMode")||!!sessionStorage.getItem("forceDebugMode")}catch(i){return rt.catch("Error in showLogs: ",i),!1}},Jo=i=>{try{return typeof i!="object"?Object.assign({},...Object.keys(i).sort().map(o=>({[o]:i[o]&&typeof i[o]=="object"?Jo(i[o]):i[o]}))):i}catch(o){return rt.catch("Error in sortObjectByKeys: ",o),i}},Yj=i=>{try{return i!==null&&typeof i=="object"&&!Array.isArray(i)}catch{return!1}},jl=i=>{try{return Yj(i)?Object.fromEntries(Object.entries(i).sort(([o],[n])=>o.localeCompare(n)).map(([o,n])=>[o,Yj(n)?jl(n):Array.isArray(n)?n.map(e=>Yj(e)?jl(e):e):n])):i}catch{return i}},iM=(i,o)=>{try{return typeof o!="object"||o===null?i===o:typeof i!="object"||i===null?!1:Array.isArray(o)?Array.isArray(i)?o.every(n=>i.some(e=>iM(e,n))):!1:Object.keys(o).every(n=>Object.prototype.hasOwnProperty.call(i,n)?iM(i[n],o[n]):!1)}catch{return!1}},Zj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield V9e(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new TextEncoder().encode(i),a=yield window.crypto.subtle.encrypt({name:"AES-CBC",iv:t},e,r);return btoa(String.fromCharCode(...new Uint8Array(a)))}catch(e){return rt.catch("Error in encrypt: ",e),i}}),Xj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield B9e(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new Uint8Array(atob(i).split("").map(s=>s.charCodeAt(0))),a=yield window.crypto.subtle.decrypt({name:"AES-CBC",iv:t},e,r);return new TextDecoder().decode(a)}catch(e){return rt.catch("Error in decrypt: ",e),i}}),B9e=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["decrypt"])}catch(o){throw rt.catch("Error in importDecryptKey:",o),o}}),zm=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o;return yield Zj(JSON.stringify(i),n,_t(n))}catch(n){return rt.catch("Error in encryptData: ",n),i}}),aM=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o,e=yield Xj(i,n,_t(n));return JSON.parse(e)}catch(n){return rt.catch("Error in decryptData: ",n),null}}),sM=i=>{try{switch(i?.region){case"asiaSouthEast1":return"asiaSouthEast1";case"asiaNorthEast1":return"asiaNorthEast1";case"europeWest1":return"europeWest1";default:return"usCentral1"}}catch(o){return rt.catch("Error in getRegion: ",o),"usCentral1"}},V9e=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["encrypt"])}catch(o){throw rt.catch("Error in importKey:",o),o}}),yae=i=>{try{if(i&&typeof i=="object"){let o=Jo(i);return An(JSON.stringify(o))}else return null}catch(o){return rt.catch("Error in utils generateLocationId: ",o),null}},zi=(i,o=[])=>(i?.tagName?.toLowerCase().indexOf("velt-")>=0&&![j.TAGS.VELT_VIDEO_PLAYER.toLowerCase()].includes(i?.tagName?.toLowerCase())||i?.tagName?.toLowerCase().indexOf("snippyly-")>=0||i?.className?.split&&(i?.className?.split(" ")?.indexOf("snippyly-overlay-panel")>=0||i?.className?.split(" ")?.indexOf("cdk-overlay-container")>=0))&&!o?.includes(i?.tagName?.toLowerCase())?!0:i?.parentNode&&zi(i?.parentNode,o),Ti=i=>{try{return!!document?.body?.contains(i)}catch(o){return rt.catch("Error in utils isElementInsideBody: ",o),!1}};var mi=(i,o)=>{try{return Object.prototype.toString.call(i)===Object.prototype.toString.call(o)?Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"?Object.keys(i).length!==Object.keys(o).length?!1:Object.keys(i).every(n=>mi(i[n],o[n])):i===o:!1}catch(n){return rt.catch("Error in utils deepCompare: ",n),!1}},kv=(i,o,n=1)=>{try{if(o){let e=U9e(o.textContent,i,n);if(e>=0){let t=(o?.ownerDocument).createNodeIterator(o,NodeFilter.SHOW_TEXT),r,a=[];for(;r=t.nextNode();)a.push(r);let s=[],c=e,p=i.length,g=c+p,C=0;for(let E=0;E<a.length;E++){let T=a[E],N=C;if(C+=T.textContent?.length,C>=c&&!s.length?s.push({textNode:T,startOffset:c-N}):C>=c&&C<g&&s.push({textNode:T}),C>=g){if(s.length===1&&s[0].textNode===T){s.push({textNode:T,endOffset:c-N+i.length});break}let z=p;s.forEach(W=>{z-=W.textNode.textContent?.length-(W.startOffset||0)}),s.push({textNode:T,endOffset:z});break}}return s}}return[]}catch(e){return rt.catch("Error in utils calculateNodes: ",e),[]}},U9e=(i,o,n=1)=>{try{if(i?.includes(o)){let e=i.split(o,n);return e.length===n?e.join(o).length:-1}else return-1}catch(e){return rt.catch("Error in utils getTextPosition: ",e),-1}},nh=(i,o,n,e,t)=>{try{let r=new Range;r.setStart(i,o),r.setEnd(n,e);let a=r.toString(),s=0;if(i.nodeType===Node.TEXT_NODE){let c=i,p="";if(c)for(;c=c.previousSibling;)p=(c.textContent||"")+p;if(p){let g=new RegExp(Nc(t),"g");s=(p.match(g)||[]).length}}if(a){let c=new RegExp(Nc(t),"g");return(a.match(c)||[]).length+s}else return s}catch(r){return rt.catch("Error in utils getSelectedTextOccurrenceInRange: ",r),0}},Nc=i=>{try{return i&&typeof i=="string"?i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):i}catch(o){return rt.catch("Error in utils escapeRegExp: ",o),i}},Rv=i=>{try{return i==null?null:i.scrollHeight>i.clientHeight?i:Rv(i?.parentNode)}catch(o){return rt.catch("Error in utils getScrollableParent: ",o),null}},Kp=i=>{try{return i==null?[]:i.scrollHeight>i.clientHeight?[i,...Kp(i?.parentNode)]:Kp(i?.parentNode)}catch(o){return rt.catch("Error in utils getScrollableParents: ",o),[]}},Qj=(i,o)=>{try{if(i&&o){let n=i.getBoundingClientRect(),e=o.getBoundingClientRect(),t=n.top-e.top+(o.tagName?.toLowerCase()==="html"?0:o.scrollTop),r=n.left-e.left;return{top:t,left:r}}else return null}catch(n){return rt.catch("Error in utils getRelativeTopLeftPosition: ",n),null}},Nv=(i,o)=>`${An(i+"_"+o)}`,Mi=()=>{try{let i=new ao;return i.url=window.location.href,i.path=window.location.pathname,i.queryParams=window.location.search,i.baseUrl=window.location.origin,i.title=document.title,i}catch(i){rt.catch("Error in utils getPageInfo: ",i);return}},Gm=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED)?!0:Gm(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isCommentDisabledOnElement: ",o),!1}},lM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_TAG_DISABLED)?!0:lM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isTagDisabledOnElement: ",o),!1}},cM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_ARROW_DISABLED)?!0:cM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isArrowDisabledOnElement: ",o),!1}},dM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_AREA_DISABLED)?!0:dM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isAreaDisabledOnElement: ",o),!1}},mM=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_RECORDER_DISABLED)?!0:mM(i?.parentElement):!1}catch(o){return rt.catch("Error in utils isRecorderDisabledOnElement: ",o),!1}};var ra=()=>{try{return window?.Snippyly?.version}catch(i){return rt.catch("Error in utils getSdkVersion: ",i),null}},Jj=i=>{try{return Object.fromEntries(Object.entries(i).filter(([o,n])=>n!==void 0))}catch(o){return rt.catch("Error in utils removeUndefinedKeys: ",o),i}},pM=i=>{try{let o=new URL(i);return Object.values(j.URL_PARAMS).forEach(n=>{o.searchParams.delete(n)}),o.href}catch(o){return rt.catch("Error in utils excludeSnippylyParamsFromUrl: ",o),i}},Ps=i=>{try{navigator.clipboard.writeText(i)}catch(o){rt.catch("Error in copyToClipboard: ",o)}},qS=i=>{try{let o=Sae(i);return o&&typeof o=="string"&&o.includes("/svg")&&(o=o.split("/svg")[0]+"/*[name()='svg']"),o}catch(o){rt.catch("Error in utils getXPath:",o)}},Sae=i=>{try{if(i){if(typeof i=="string")return document.evaluate(i,document,null,0,null);if(!i||i.nodeType!=1)return"";if(i.id&&i?.tagName?.toLowerCase()!=="svg"&&document.querySelectorAll(`[id='${i.id}']`)?.length===1)return"//*[@id='"+i.id+"']";let o=[].filter.call(i.parentNode?.children?i.parentNode?.children:[],function(n){return n.tagName==i.tagName});return Sae(i.parentNode)+"/"+i.tagName.toLowerCase()+(o.length>1?"["+([].indexOf.call(o,i)+1)+"]":"")}}catch(o){rt.catch("Error in utils calculateXPath:",o)}},bae=i=>{try{let o=[];return i.forEach(n=>{let e={};e.commonAncestorContainer=j9e(n.commonAncestorContainer),e.text=n.toString(),e.occurrence=nh(n.commonAncestorContainer,0,n.startContainer,n.startOffset,n.toString())+1,o.push(e)}),o}catch{return[]}},j9e=i=>{try{if(i.nodeType===Node.TEXT_NODE){let o=1,n=i.previousSibling;for(;n;)n.nodeType===Node.TEXT_NODE&&o++,n=n.previousSibling;return qS(i.parentElement)}else return qS(i)}catch(o){return rt.catch("Error in utils getXPathForText: ",o),qS(i)}},e$=(i,o)=>{try{return i?i?.hasAttribute&&(o&&i.hasAttribute("contenteditable")||i?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_ENABLED)==="true")?i:e$(i?.parentElement,o):null}catch(n){return rt.catch("Error in utils getSelectionEnabledElement: ",n),null}},gM=i=>{try{let o,n=[],e=document.createTreeWalker(i,NodeFilter.SHOW_TEXT,null);for(;o=e.nextNode();)n.push(o);return n}catch(o){return rt.catch("Error in utils getTextNodesInsideElement: ",o),[]}},Iae=i=>{try{return i<576||i>=576&&i<767?"Mobile":i>=768&&i<992?"Tablet":i>=992&&i<1520?"Desktop":"Monitor"}catch(o){return rt.catch("Error in utils getDeviceTypeFromDeviceWidth: ",o),""}},Fd=i=>new Promise(o=>setTimeout(o,i)),Eae=(i,o=0)=>new Promise((n,e)=>{let t=document.createElement("video"),r=navigator.userAgent.includes("Firefox");r&&(t.preload="auto"),t.setAttribute("src",URL.createObjectURL(i)),t.load(),t.addEventListener("error",a=>{e("error when loading video file: "+a)}),t.addEventListener("loadedmetadata",()=>{let a=()=>{if(t.duration<o){e("video is too short.");return}setTimeout(()=>{t.currentTime=o},200),t.addEventListener("seeked",()=>{let s=document.createElement("canvas");s.width=t.videoWidth,s.height=t.videoHeight;let c=s.getContext("2d");c.drawImage(t,0,0,s.width,s.height),c.canvas.toBlob(p=>{t.remove(),n(p)},"image/jpeg",.75)})};if(r&&t.duration>0&&t.duration<10&&i.size>1e6){(()=>{setTimeout(()=>{t.duration<o&&(o=Math.max(.1,t.duration/2)),a()},1e3)})();return}a()})}),xae=i=>{try{return new Promise((o,n)=>{let e=new FileReader;e.onloadend=()=>o(e.result),e.readAsDataURL(i)})}catch(o){return rt.catch("Error in utils blobToBase64: ",o),Promise.resolve("")}},t$=(i,o="image/jpeg")=>{try{let n=atob(i.split(",")[1]),e=new ArrayBuffer(n.length),t=new Uint8Array(e);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return new Blob([e],{type:o})}catch(n){return rt.catch("Error in utils base64ToBlob: ",n),null}},Tae=(i,o,n=20)=>new Promise((e,t)=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let a=r.width,s=r.height,c=600,p=s/a*c,g="http://www.w3.org/2000/svg",C=document.createElementNS(g,"svg");C.setAttribute("xmlns",g),C.setAttribute("width",c.toString()),C.setAttribute("height",p.toString()),C.setAttribute("viewBox",`0 0 ${c} ${p}`);let E=document.createElementNS(g,"circle"),T=document.createElementNS(g,"polygon"),N=16,z=N+16,W=c/2,ee=p/2;if(E.setAttribute("cx",W.toString()),E.setAttribute("cy",ee.toString()),E.setAttribute("r",z.toString()),E.setAttribute("fill","lightgrey"),T.setAttribute("points",`${W-N/2},${ee-N} ${W-N/2},${ee+N} ${W+N},${ee}`),T.setAttribute("fill","#ffffff"),C.appendChild(E),C.appendChild(T),o){let xe=o.length*16-10,Se=16*1.5,Oe=(c-xe)/2,Ce=p-Se-10,fe=document.createElementNS(g,"rect");fe.setAttribute("x",Oe.toString()),fe.setAttribute("y",Ce.toString()),fe.setAttribute("width",xe.toString()),fe.setAttribute("height",Se.toString()),fe.setAttribute("fill","#353945b3"),fe.setAttribute("rx","12"),C.appendChild(fe);let we=document.createElementNS(g,"text");we.textContent=o,we.setAttribute("x",(c/2).toString()),we.setAttribute("y",(Ce+16).toString()),we.setAttribute("font-size","16"),we.setAttribute("text-anchor","middle"),we.setAttribute("fill","white"),C.appendChild(we)}let ce=new XMLSerializer().serializeToString(C),ye=new Image,Pe=new Blob([ce],{type:"image/svg+xml;charset=utf-8"}),Ge=URL.createObjectURL(Pe);ye.onload=()=>{let Re=document.createElement("canvas");Re.width=c,Re.height=p;let xe=Re.getContext("2d");xe.beginPath(),xe.moveTo(n,0),xe.lineTo(c-n,0),xe.quadraticCurveTo(c,0,c,n),xe.lineTo(c,p-n),xe.quadraticCurveTo(c,p,c-n,p),xe.lineTo(n,p),xe.quadraticCurveTo(0,p,0,p-n),xe.lineTo(0,n),xe.quadraticCurveTo(0,0,n,0),xe.closePath(),xe.clip(),xe.drawImage(r,0,0,c,p),xe.drawImage(ye,0,0,c,p);let Se=Re.toDataURL("image/png");e(Se)},ye.onerror=t,ye.src=Ge},r.onerror=t,r.src=i});var uM=i=>{try{return i?.replace(/[\n\t\u200D]/g,"")?.split(/\s+/)?.filter(e=>e?.trim()?.length)||[]}catch(o){return rt.catch("Error in utils getWords: ",o),[]}},aa=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelector(n)}catch(n){return rt.catch("Error in utils getElementByAttributes: ",n),null}},Dae=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelectorAll(n)}catch(n){return rt.catch("Error in utils getElementsByAttributes: ",n),[]}},Rc=i=>{try{let o=Math.floor(i/3600),n=Math.floor((i-o*3600)/60),e=Math.floor(i-o*3600-n*60);return o&&o<10&&(o="0"+o),n<10&&(n="0"+n),e<10&&(e="0"+e),(o?o+":":"")+n+":"+e}catch{return""}},wae=(i,o=10)=>{try{if(!i||!i.currentTime)throw new Error("Invalid video element reference provided");let n=i.currentTime,e=Math.floor(n/o)*o,t=e+o;return{startSlot:Rc(e),endSlot:Rc(t),timeSlot:Rc(e)+" - "+Rc(t)}}catch{return null}},Fv=(i,o=["@"])=>{try{let n="",e,t=i.getRootNode();if(t instanceof ShadowRoot?e=t?.getSelection():e=window.getSelection(),e?.rangeCount){let r=e.getRangeAt(0),a=r.startOffset,s=r.endOffset,c=r?.commonAncestorContainer?.textContent;c?n=$9e(c,s,o):n=""}return n}catch(n){return rt.catch("Error in utils getWordAtCursor: ",n),""}};var $9e=(i,o,n=["@"])=>{try{let e=-1,t=!1;for(let r of n){let a=i.lastIndexOf(r,o),s=a>0?i.lastIndexOf(r,a-1):-1;if(a>e){let c=oM(i,a,o),p=rM(i,a,o);if(c||p){if(s!==-1){let g=oM(i,s,a),C=rM(i,s,a);!g&&!C&&(e=s,t=!0)}}else e=a,t=!0}}return e!==-1&&t?i.substring(e,o):""}catch(e){return rt.catch("Error in utils getStringFromLastAtSymbol: ",e),""}},oM=(i,o,n)=>{try{if(o===0)return!1;let e=i.charAt(o-1);return!(e===" "||e==="\xA0"||e===`
170
170
  `||e===" "||[",",":",";"].includes(e))}catch(e){return rt.catch("Error in utils isHotkeyDisabledForAutocomplete: ",e),!1}},rM=(i,o,n)=>{try{return!!i.substring(o+1,n).startsWith(" ")}catch(e){return rt.catch("Error in utils isHotkeyFollowedBySpace: ",e),!1}},Oae=(i,o,n=["@"])=>{try{let e=H9e(i),t=null;try{e&&typeof e.getSelection=="function"&&(t=e.getSelection())}catch{}if(t||(t=window.getSelection()),t?.rangeCount){let r=t.getRangeAt(0),a=r.startOffset,s=r?.commonAncestorContainer?.textContent;if(s){let c=-1;for(let p of n){let g=s.lastIndexOf(p,a),C=g>0?s.lastIndexOf(p,g-1):-1;if(g>c){let E=oM(s,g,a),T=rM(s,g,a);if(E||T){if(C!==-1){let N=oM(s,C,g),z=rM(s,C,g);!N&&!z&&(c=C)}}else c=g}}if(c!==-1){let p=s.substring(0,c),g=s.substring(r.endOffset),C=document.createElement("span");C.textContent=o,C.style.color="var(--velt-accent)";let E=Date.now()+"_"+Math.random().toString(36).substr(2,9);C.setAttribute("data-recently-added",E),setTimeout(()=>{C.hasAttribute("data-recently-added")&&C.removeAttribute("data-recently-added")},5e3);let T=r.commonAncestorContainer;if(T.nodeType===Node.TEXT_NODE){let N=T.parentNode;if(N){let z=document.createTextNode(p),W=document.createTextNode(g);N.replaceChild(W,T),N.insertBefore(C,W),N.insertBefore(z,C);try{let ee=document.createRange();ee.setStartAfter(C),ee.collapse(!0),t?.removeAllRanges(),t?.addRange(ee)}catch(ee){rt.catch("Error positioning cursor after span:",ee);try{let ce=document.createRange();ce.selectNodeContents(i),ce.collapse(!1),t?.removeAllRanges(),t?.addRange(ce)}catch(ce){rt.catch("Error with fallback cursor positioning:",ce)}}}}}}}}catch(e){rt.catch("Error in utils replaceWordAtCursor: ",e)}},hM=()=>{try{let o=window.getSelection()?.getRangeAt(0),n=o?.commonAncestorContainer,e=o?.startContainer,t=o?.endContainer,r=[];r.push(n),r.push(e),r.push(t);let a=!1;for(let s of r)if(s&&zi(s,[j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT,j.TAGS.SNIPPYLY_COMMENT_TEXT_PORTAL,j.TAGS.SNIPPYLY_HIGHLIGHT_USER_TEXT,j.TAGS.SNIPPYLY_COMMENT_TEXT])){a=!0;break}return a}catch(i){return rt.catch("Error in utils isTextSelectionIncludesSnippylyElement: ",i),!1}},Aae=(i,o,n)=>{try{let e=document.querySelector(`[id=${i}]`);if(e)e.name=o,e.content=n;else{let t=document.createElement("meta");t.id=i,t.name=o,t.content=n,document.getElementsByTagName("head")[0].appendChild(t)}}catch{}},Pae=i=>{try{if(i){let o=document.querySelector(`[id=${i}]`);o&&o.remove()}}catch{}},Mae=()=>{try{let o=new Date().getTimezoneOffset(),n=Math.floor(Math.abs(o)/60),e=Math.abs(o)%60;return`UTC${o>0?"-":"+"}${n?.toString()?.padStart(2,"0")}:${e?.toString()?.padStart(2,"0")}`}catch(i){return rt.catch("Error in utils getTimezone: ",i),""}},kae=()=>{try{let i=[];return document.querySelectorAll("*").forEach(n=>{(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth||["auto","scroll"].includes(getComputedStyle(n).overflow))&&i.push(n)}),i}catch(i){return rt.catch("Error in utils getScrollableElements: ",i),[]}},Rae=(i,o)=>Math.sqrt((i.x-o.x)**2+(i.y-o.y)**2),n$=(i,o={x:window.innerWidth/2,y:window.innerHeight/2})=>{try{let n=i;for(;n.children.length>0;){let e=null,t=Number.MAX_SAFE_INTEGER;for(let r=0;r<n.children.length;r++){let a=n.children[r],s=a.getBoundingClientRect(),c={x:s.left+s.width/2,y:s.top+s.height/2},p=Rae(c,o);(s.top>=0||s.bottom<=window.innerHeight)&&s.width>0&&s.height>0&&p<=t&&(e=a,t=p)}if(e===null)break;n=e}return n}catch(n){return rt.catch("Error in utils getInnermostElement: ",n),null}},Nae=i=>{try{let{offsetWidth:o,offsetHeight:n,scrollTop:e}=i,t=i,r={x:o/2,y:e+n/2};for(;t.children.length>0;){let a=null,s=Number.MAX_SAFE_INTEGER;for(let c=0;c<t.children.length;c++){let p=t.children[c],g={x:p.offsetLeft+p.offsetWidth/2,y:p.offsetTop+p.offsetHeight/2},C=Rae(g,r);p.offsetTop>=0&&p.offsetWidth>0&&p.offsetHeight>0&&C<=s&&(a=p,s=C)}if(a===null)break;t=a}return t}catch(o){return rt.catch("Error in utils getNestedInnermostElement: ",o),null}},Fae=()=>{try{let i=window.innerWidth/2,o=window.innerHeight/2,n=document.elementFromPoint(i,o);for(;n&&n.tagName==="BODY";)o+=2,n=document.elementFromPoint(i,o);return n}catch(i){return rt.catch("Error in utils getCenteredBackgroundElement: ",i),null}},i$=(i,o,n=!1)=>{try{let e=i.getBoundingClientRect(),t=o.getBoundingClientRect(),r=o.offsetTop;n&&(r=r-e.height/2+t.height/2),i.scrollTo({top:r,behavior:"smooth"})}catch(e){rt.catch("Error in utils nestedScrollIntoView: ",e)}},fM=(i,o=!0)=>{try{let n=document.body.getBoundingClientRect(),e=i.getBoundingClientRect(),t=e.top-n.top,r=window.innerHeight,a=t;o&&(a=a-r/2+e.height/2),window.scrollTo({top:a,behavior:"smooth"})}catch(n){rt.catch("Error in utils scrollIntoView: ",n)}},Lae=(i=!1)=>{try{let o=!0;return i&&(o=/\sChrome\/[\d.]+ Mobile\s/.test(navigator.userAgent)),"ontouchstart"in window||navigator.maxTouchPoints>0||o}catch(o){return rt.catch("Error in utils isTouchDevice: ",o),!1}},Bae=(i,o,n)=>{try{return(1-n)*i+n*o}catch(e){rt.catch("Error in utils lerp: ",e)}return 0},Vae=(i,o)=>{try{if(i===void 0)return i;if(i=i.replace("#",""),i.length===6){let n=parseInt(i,16),e=(n>>16)+o;e>255&&(e=255),e<0&&(e=0);let t=(n&255)+o;t>255&&(t=255),t<0&&(t=0);let r=(n>>8&255)+o;return r>255&&(r=255),r<0&&(r=0),`#${(t|r<<8|e<<16).toString(16)}`}else return i}catch(n){rt.catch("Error in utils multiplyColor: ",n)}return i},Uae=i=>{try{return i in j.TEXT_COLOR_MAP?j.TEXT_COLOR_MAP[i]:"#141416"}catch(o){return rt.catch("Error in generateUserColor:",o),"#141416"}},Fc=()=>{try{let i=localStorage.getItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS);if(i)return JSON.parse(i)}catch(i){return rt.catch("Error in getDefaultMediaStreamOptions:",i),{}}},vM=(i,o)=>{try{let n=o*(Math.PI/180),e=Math.cos(n);return e?i/e:i}catch(n){return rt.catch("Error in calculateHypotenuse:",n),0}},o$=(i,o,n=!0)=>{try{let e=[],t=n?i:i.parentNode;for(;t;)e.push(t),t=t.parentNode;let r=n?o:o.parentNode;for(;r;){if(e.indexOf(r)!==-1)return r;r=r.parentNode}return null}catch(e){return rt.catch("Error in utils findCommonParent: ",e),null}},r$=(i,o,n,e)=>{let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),a=t.left+i,s=t.top+o,c=a-r.left,p=s-r.top;return{x:c,y:p}},Xp=i=>{try{let o={height:0,width:0};if(typeof i?.getBBox=="function"){let n=i?.getBBox(),e=i?.getBoundingClientRect();o.height=parseFloat(e?.height||n.height||0),o.width=parseFloat(e?.width||n.width||0)}else{let n=window.getComputedStyle(i);if(o.height=i?.clientHeight||parseFloat(n.getPropertyValue("height"))||0,o.width=i?.clientWidth||parseFloat(n.getPropertyValue("width"))||0,i?.getBoundingClientRect&&typeof i?.getBoundingClientRect=="function"){let e=i?.getBoundingClientRect();o?.height||(o.height=e?.height||i?.clientHeight||i?.offsetHeight||0),o?.width||(o.width=e?.width||i?.clientWidth||i?.offsetWidth||0)}}return o}catch(o){return rt.catch("Error in utils getElementDimensions: ",o),{height:0,width:0}}},Ld=i=>{try{let o=i;for(;o;){if(window?.getComputedStyle(o)?.getPropertyValue("background-clip")=="text")return!0;o=o?.parentElement}return!1}catch(o){return rt.catch("Error in utils hasParentWithBackgroundClip: ",o),!1}},H9e=i=>{try{let o=i;for(;o;){if(o.toString()==="[object ShadowRoot]")return o;o=o.parentNode}}catch(o){rt.catch("Error in utils findShadowRoot: ",o)}return null},Kn=i=>{try{let o=["commentCategories","color","resolved","inProgress","positionX","positionY","screenWidth","screenHeight","screenScrollHeight","screenScrollTop","taggedElementPath","taggedElementRect","targetElement","position","documentParamsId","documentParams","ghostComment","areaAnnotationId","iam","commentSource","involvedUserIds","mentionedUserIds","viewedByUserIds","views"],n=JSON.parse(JSON.stringify(i)),e={};return Object.keys(n).forEach(t=>{o.includes(t)||(e[t]=n[t])}),JSON.parse(JSON.stringify(e))}catch(o){return rt.catch("Error in utils getCommentAnnotationForClient: ",o),null}};var Lv=i=>i===null||typeof i>"u",Bv=(i,o)=>{try{return!!i?.closest(`[${o}]`)}catch(n){return rt.catch("Error in utils hasParentWithAttribute: ",n),!1}},a$=(i,o=!0)=>{try{let n=[];if(!i||!(i instanceof HTMLElement))return[];o&&n.push(i);for(let e=0;e<i.children.length;e++){let t=i.children[e];n=n.concat(a$(t))}return n}catch(n){return rt.catch("Error in utils getAllNestedChildren: ",n),[]}},jae=()=>{try{return document.visibilityState==="hidden"?!1:document.hasFocus()}catch(i){return rt.catch("Error in utils isTabActive: ",i),!1}},s$=i=>{try{let o="",n=i?.getAttribute("src");if(n)o=`${An(n)}`;else{let e=i?.querySelectorAll("source");if(e&&e.length>0){let r=e[0]?.getAttribute("src");r&&(o=`${An(r)}`)}}return o}catch{return""}},qe=i=>{try{return!(i&&(i?.children?.length>0||i?.textContent?.trim()?.length>0))}catch(o){return rt.catch("Error in utils isTemplateEmpty: ",o),!0}},Sa=(i,o)=>{try{if(!i||!o)return;let n=[],e="",t=0;for(let c=0;c<o.length;c++){let p=o[c];p==="["?(t++,t===1&&e&&(n.push(e),e=""),e+=p):p==="]"?(t--,e+=p,t===0&&(n.push(e),e="")):p==="."&&t===0?e&&(n.push(e),e=""):e+=p}e&&n.push(e);let r,a=I({},i),s=n.reduce((c,p)=>{if(c==null)return;qi(c)&&(r=c,c=c());let g=p.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(g){let E=g[1];if(/^\d+$/.test(E)){let T=parseInt(E,10);return Array.isArray(c)?c[T]:void 0}if(E.startsWith("'")&&E.endsWith("'")||E.startsWith('"')&&E.endsWith('"')){let T=E.slice(1,-1);return c[T]}if(E.includes(".")||E.includes("[")){let T=Sa(a,E);qi(T)&&(T=T());let N=T?.toString()||"";return c[N]}if(a[E]!==void 0){let T=a[E];return qi(T)&&(T=T()),c[T]}return c[E]}let C=p;return(p.startsWith("'")&&p.endsWith("'")||p.startsWith('"')&&p.endsWith('"'))&&(C=p.slice(1,-1)),C==="length"&&Array.isArray(c)?c.length:c[C]},i);return r?Oi(()=>{try{let c=I({},i);return n.reduce((p,g)=>{if(p==null)return;qi(p)&&(p=p());let C=g.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(C){let T=C[1];if(/^\d+$/.test(T)){let N=parseInt(T,10);return Array.isArray(p)?p[N]:void 0}if(T.startsWith("'")&&T.endsWith("'")||T.startsWith('"')&&T.endsWith('"')){let N=T.slice(1,-1);return p[N]}if(T.includes(".")||T.includes("[")){let N=Sa(c,T);qi(N)&&(N=N());let z=N?.toString()||"";return p[z]}if(c[T]!==void 0){let N=c[T];return qi(N)&&(N=N()),p[N]}return p[T]}let E=g;return(g.startsWith("'")&&g.endsWith("'")||g.startsWith('"')&&g.endsWith('"'))&&(E=g.slice(1,-1)),p[E]},i)}catch{return""}}):s}catch{return""}},ih=(i,o)=>{try{return!!(i?.locationId&&(i.locationId===o?.locationId||o?.location?.id===String(i.locationId))||i?.location?.id&&(i.location.id===o?.location?.id||i.location.id===String(o?.locationId)))}catch(n){return rt.catch("Error in utils isLocationSame: ",n),!1}},$ae=()=>{try{let i=document.activeElement,o=new Set,n=10,e=0;for(;i&&i.shadowRoot&&!(o.has(i)||(o.add(i),i=i.shadowRoot.activeElement,e++,e>n)););return i}catch(i){return rt.catch("Error in utils getActiveElement: ",i),null}},pn=(i,o)=>{try{return typeof i=="object"&&typeof o=="object"?JSON.stringify(i)===JSON.stringify(o):i===o}catch{return!1}},Vv=i=>{try{let o=JSON.parse(JSON.stringify(i));return i?.clientDocumentId&&(o.documentId=i.clientDocumentId),i?.clientOrganizationId&&(o.organizationId=i.clientOrganizationId),delete o?.clientDocumentId,delete o?.clientOrganizationId,delete o?.veltFolderId,delete o?.parentVeltFolderId,delete o?.pageInfo,o}catch{return i}},Ms=i=>{try{if(!i.some(a=>a?.value?.data))return{};let o=null,n=i.reduce((a,s)=>Math.max(a,s.timestamp),0),e=i.find(a=>a.timestamp===n);if(!e)return{};e?.value?.operation?.type==="removed"&&(o=e?.value?.operation);let r=i.map(a=>a.value).reduce((a,s)=>({data:I(I({},a?.data??{}),s?.data??{})}),{});return r.operation=o,r}catch{return{}}},sl=(i,o,n)=>Q(void 0,null,function*(){try{let e=0;for(;e<=(n.retryCount||0);)try{let t=yield i();if(!t)return{success:!1,statusCode:400,message:`${o} failed: No response received`};if(t.statusCode===void 0)return{success:!1,statusCode:400,message:`${o} failed: Response missing statusCode`};if(t.statusCode!==200){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:t.statusCode,message:`${o} failed after ${e} attempts with status code ${t.statusCode}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)));continue}return t}catch(t){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:500,message:`${o} failed with error: ${t instanceof Error?t.message:"Unknown error"}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)))}return{success:!0,statusCode:200}}catch(e){return{success:!1,statusCode:500,message:`${o} failed with unexpected error: ${e instanceof Error?e.message:"Unknown error"}`}}}),oh=e=>Q(void 0,[e],function*({data:i,getSdkProxy:o,userId:n}){try{let t="sdkproxyencryptionanddecryptiononsdk"+(n??""),r=yield z9e({data:i,key:t}),a=(yield o({veltData:r}))?.data?.data?.veltData||{};return yield aM(a,t)}catch{return i}}),z9e=n=>Q(void 0,[n],function*({data:i,key:o}){try{return yield zm(i,o)}catch{return i}}),l$=(i,o)=>Q(void 0,null,function*(){try{let n=0;for(;n<=(o.retryCount||0);)try{let e=yield i();if(!e)throw new Error("No response received");return e}catch{if(n++,n>=(o.retryCount||0))return null;o.retryDelay&&(yield new Promise(t=>setTimeout(t,o.retryDelay)))}return null}catch{return null}}),ba=i=>{try{if(i&&typeof i=="object"){let o=JSON.parse(JSON.stringify(i));return o?.clientOrganizationId&&(o.organizationId=o.clientOrganizationId,delete o.clientOrganizationId),o?.clientGroupId&&(o.groupId=o.clientGroupId,delete o.clientGroupId),o?.userSnippylyId&&delete o.userSnippylyId,o}else return null}catch(o){return rt.catch("Error in utils getUserForClient: ",o),null}},Oo=({url:i,apiProxyDomain:o})=>{try{if(o){let n=new URL(i);n.origin&&(i=i.replace(n.origin,o))}return i}catch(n){return rt.catch("Error in utils getResolvedApiUrl: ",n),i}},Hae=(i,o)=>{try{if(!i||!(i instanceof Element))return!1;let n,e;if(o&&typeof o.x=="number"&&typeof o.y=="number")n=o.x,e=o.y;else{let r=i.getBoundingClientRect();n=r.left+r.width/2,e=r.top+r.height/2}let t=document.elementFromPoint(n,e);return!(!t||t===i||i.contains(t))}catch{return!1}};var et=(()=>{let o=class o{constructor(e){this.functions=e,this.sf=!1,this.defaultProperties={},this.draftEvents=[],this.liveStateSyncEvents=Object.values(Z.Events.LiveStateSync||{})?.filter(t=>![Z.Events.LiveStateSync.ON_ACTION_TRIGGERED].includes(t)),this.eventRateLimitCache={},this.EVENT_LIMIT=50,this.TIME_WINDOW_MS=60*1e3;try{this.updateDefaultProperties({sdkVersion:ra()}),window?.location?.href&&(this.defaultProperties.pageUrl=window.location.href)}catch(t){rt.catch("Error in AnalyticsService constructor: ",t)}}updateDefaultProperties(e={}){this.defaultProperties=I(I({},this.defaultProperties),e)}setInstalledFeature(e){try{this.defaultProperties?.installedFeatures||(this.defaultProperties.installedFeatures=[]),this.defaultProperties.installedFeatures.includes(e)||this.defaultProperties.installedFeatures.push(e)}catch(t){rt.catch("Error in AnalyticsService setInstalledFeature: ",t)}}setFeatureConfig({feature:e,config:t}){try{this.defaultProperties.featureConfigs||(this.defaultProperties.featureConfigs={}),this.defaultProperties.featureConfigs[e]||(this.defaultProperties.featureConfigs[e]={}),this.defaultProperties.featureConfigs[e]=I(I({},this.defaultProperties.featureConfigs[e]),t)}catch(r){rt.catch("Error in AnalyticsService setFeatureConfig: ",r)}}setSF(e){try{this.sf=e}catch(t){rt.catch("Error in AnalyticsService setSF: ",t)}}setAuthService(e){try{this.authService=e}catch(t){rt.catch("Error in AnalyticsService setAuthService: ",t)}}setCommentService(e){try{this.commentService=e}catch(t){rt.catch("Error in AnalyticsService setCommentService: ",t)}}setConfigService(e){try{this.configService=e}catch(t){rt.catch("Error in AnalyticsService setConfigService: ",t)}}setDomService(e){try{this.domService=e}catch(t){rt.catch("Error in AnalyticsService setDomService: ",t)}}setLiveStateService(e){try{this.liveStateService=e}catch(t){rt.catch("Error in AnalyticsService setLiveStateService: ",t)}}setAreaService(e){try{this.areaService=e}catch(t){rt.catch("Error in AnalyticsService setAreaService: ",t)}}setRecorderAnnotationService(e){try{this.recorderAnnotationService=e}catch(t){rt.catch("Error in AnalyticsService setRecorderAnnotationService: ",t)}}setReactionService(e){try{this.reactionService=e}catch(t){rt.catch("Error in AnalyticsService setReactionService: ",t)}}setUserService(e){try{this.userService=e}catch(t){rt.catch("Error in AnalyticsService setUserService: ",t)}}identifyUser(e,t,r={}){try{this.userId=e;let a=typeof t=="object"?JSON.parse(JSON.stringify(t)):t;this.userService?.userDataProviderAvailable()&&a?.userId&&(a={userId:a.userId}),this.user=a;let s=this.defaultProperties?this.defaultProperties.apiKey:null;if($n.production||$n.staging){let c=Date.now(),p={userId:e,clientUserId:this.user?.userId,traits:D(I({},a),{apiKey:s,forceReset:r?.forceReset,eventTimestamp:c}),properties:D(I({},this.defaultProperties),{eventTimestamp:c}),sf:this.sf,context:this.getContext(),eventTimestamp:c};this.setAnalytics("identify",p)}if(this.userId&&this.draftEvents?.length){let c=this.draftEvents?.slice();this.draftEvents=[],c?.forEach(p=>{switch(p.type){case"track":p?.data?.eventName&&this.trackEvent(p.data.eventName,p.data.properties,p.data.mergeDefaultProperties,p.data.userId,p.data.clientUserId);break;default:break}})}}catch(a){rt.catch("Error in AnalyticsService identifyUser: ",a)}}trackPage(e,t="",r={}){try{if(($n.production||$n.staging)&&this.userId){let a={userId:this.userId,clientUserId:this.user?.userId,name:e,properties:r,sf:this.sf,context:this.getContext()};this.setAnalytics("page",a)}}catch(a){rt.catch("Error in AnalyticsService trackPage: ",a)}}trackEvent(c){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{if(this.sf&&fae.includes(e))return;if($n.production||$n.staging)if(this.userId||a){if(this.eventRateLimitCache[e]?.blockedForSession)return;let p=Date.now();if(this.eventRateLimitCache[e]&&p-this.eventRateLimitCache[e].timestamp<this.TIME_WINDOW_MS){if(this.eventRateLimitCache[e].count>=this.EVENT_LIMIT){if(!this.eventRateLimitCache[e].rateLimitExceededEventTriggered){this.eventRateLimitCache[e].rateLimitExceededEventTriggered=!0,this.eventRateLimitCache[e].blockedForSession=!0;let g=I({eventName:e},t||{});this.triggerTrackEvent(Z.Events.Core.SDK_EVENT_RATE_LIMIT_EXCEEDED,g,r,a,s)}return}this.eventRateLimitCache[e].count++}else this.eventRateLimitCache[e]={count:1,timestamp:p,rateLimitExceededEventTriggered:!1,blockedForSession:!1};return this.triggerTrackEvent(e,t,r,a,s)}else t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.draftEvents.push({type:"track",data:{eventName:e,properties:t,mergeDefaultProperties:r,userId:a,clientUserId:s}})}catch(p){rt.catch("Error in AnalyticsService trackEvent: ",p)}})}triggerTrackEvent(c){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{r&&(t||(t={}),t=I(I({},t),this.defaultProperties));let p;if(t?.annotationId){let C=t.annotationId;if(!p&&this.commentService){let E=this.commentService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId);let T=this.commentService.getMultiThreadAnnotationById(C);T?.metadata&&(p=T.metadata),T?.targetElementId&&(t.targetElementId=T.targetElementId)}if(!p&&this.recorderAnnotationService){let E=this.recorderAnnotationService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}if(!p&&this.reactionService){let E=this.reactionService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId)}if(!p&&this.areaService){let E=this.areaService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}}if(p&&typeof p=="object"&&(t=I(I({},t),p)),t&&typeof t=="object"&&(t=D(I({},t),{userId:this.userId||a,clientUserId:this.user?.userId||s}),t?.eventTimestamp||(t.eventTimestamp=Date.now()),t?.sessionTabId||(t.sessionTabId=this.domService?.getTabId()),this.liveStateSyncEvents.includes(e))){let C=this.liveStateService?.getSemStats();C&&!t?.semStats&&(t.semStats=C)}let g={userId:this.userId||a,clientUserId:this.user?.userId||s,event:e,properties:t,sf:this.sf,context:this.getContext(),eventTimestamp:t?.eventTimestamp};return this.setAnalytics("track",g)}catch(p){rt.catch("Error in AnalyticsService triggerTrackEvent: ",p)}})}setAnalytics(e,t){return Q(this,null,function*(){try{return navigator.onLine?wo(this.functions,Oo({url:$n.cloudFunction.sa,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:20*60*1e3})({type:e,data:t}).catch(a=>{rt.warn("Error in AnalyticsService setAnalytics promise: ",e,a)}):void 0}catch(r){rt.catch("Error in AnalyticsService setAnalytics: ",r)}})}trackAuthenticatedEvent(e,t={},r=!0){try{this.authService?.getUser$&&typeof this.authService?.getUser$()?.subscribe=="function"&&(this.authService.getUser()?this.trackEvent(e,t,r):((!t||typeof t!="object")&&(t={}),t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.authService?.getUser$()?.pipe(Fe(a=>!!a),ot(1))?.subscribe(()=>{this.trackEvent(e,t,r)})))}catch(a){rt.catch("Error in AnalyticsService trackAuthenticatedEvent: ",a)}}getContext(){try{let e={},t=Mi();return e.os={name:t?.deviceInfo?.osName,version:t?.deviceInfo?.osVersion},e.page={path:t?.path,title:t?.title,url:t?.url},e.screen={height:t?.deviceInfo?.screenHeight,width:t?.deviceInfo?.screenWidth},e.app={name:t?.deviceInfo?.browserName,version:t?.deviceInfo?.browserVersion},e.device={type:t?.deviceInfo?.deviceType},e.timezone=Mae(),e.userAgent=t?.deviceInfo?.userAgent,e}catch(e){rt.catch("Error in AnalyticsService getContext: ",e)}}};o.\u0275fac=function(t){return new(t||o)(J(ko))},o.\u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var y=(()=>{let o=class o{get debugMode(){return _ae()}get logsEnabled(){return this.logsEnabled$.value}constructor(e){this.analyticsService=e,this.logsEnabled$=new ve(!0),this.log("%c[WB] Creating SERVICE LoggingService","color: blue;")}enableLogs(){try{if(this.logsEnabled$.value===!0)return;this.logsEnabled$.next(!0)}catch(e){this.catch("Error in LoggingService enableLogs: ",e)}}disableLogs(){try{if(this.logsEnabled$.value===!1)return;this.logsEnabled$.next(!1)}catch(e){this.catch("Error in LoggingService disableLogs: ",e)}}log(e,...t){this.debugMode&&console.log(e,...t)}warn(e,...t){this.debugMode&&console.warn(e,...t)}error(e,...t){this.debugMode&&console.error(e,...t)}debug(e,...t){this.debugMode&&console.debug(e,...t)}info(e,...t){this.debugMode&&console.info(e,...t)}catch(e,t,r,a=!1){try{let s=t?.message;this.logsEnabled$.value&&(s?.toLowerCase()?.includes("permission denied")||s?.toLowerCase()?.includes("permission_denied")||(t!==void 0?console.warn("Velt: ",e,t):console.warn("Velt: ",e))),a||this.analyticsService.trackEvent(Z.Events.Core.SDK_ERROR,I({sourceMethod:e,message:(t?.message?t?.message:t)||e,clientUserId:this.analyticsService?.user?.userId,snippylyUserId:this.analyticsService?.user?.userSnippylyId,source:"sdk"},r||{}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(J(et))},o.\u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var zae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gae={};var Wm,c$;(function(){var i;function o(xe,Se){function Oe(){}Oe.prototype=Se.prototype,xe.D=Se.prototype,xe.prototype=new Oe,xe.prototype.constructor=xe,xe.C=function(Ce,fe,we){for(var Le=Array(arguments.length-2),Ct=2;Ct<arguments.length;Ct++)Le[Ct-2]=arguments[Ct];return Se.prototype[fe].apply(Ce,Le)}}function n(){this.blockSize=-1}function e(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}o(e,n),e.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function t(xe,Se,Oe){Oe||(Oe=0);var Ce=Array(16);if(typeof Se=="string")for(var fe=0;16>fe;++fe)Ce[fe]=Se.charCodeAt(Oe++)|Se.charCodeAt(Oe++)<<8|Se.charCodeAt(Oe++)<<16|Se.charCodeAt(Oe++)<<24;else for(fe=0;16>fe;++fe)Ce[fe]=Se[Oe++]|Se[Oe++]<<8|Se[Oe++]<<16|Se[Oe++]<<24;Se=xe.g[0],Oe=xe.g[1],fe=xe.g[2];var we=xe.g[3],Le=Se+(we^Oe&(fe^we))+Ce[0]+3614090360&4294967295;Se=Oe+(Le<<7&4294967295|Le>>>25),Le=we+(fe^Se&(Oe^fe))+Ce[1]+3905402710&4294967295,we=Se+(Le<<12&4294967295|Le>>>20),Le=fe+(Oe^we&(Se^Oe))+Ce[2]+606105819&4294967295,fe=we+(Le<<17&4294967295|Le>>>15),Le=Oe+(Se^fe&(we^Se))+Ce[3]+3250441966&4294967295,Oe=fe+(Le<<22&4294967295|Le>>>10),Le=Se+(we^Oe&(fe^we))+Ce[4]+4118548399&4294967295,Se=Oe+(Le<<7&4294967295|Le>>>25),Le=we+(fe^Se&(Oe^fe))+Ce[5]+1200080426&4294967295,we=Se+(Le<<12&4294967295|Le>>>20),Le=fe+(Oe^we&(Se^Oe))+Ce[6]+2821735955&4294967295,fe=we+(Le<<17&4294967295|Le>>>15),Le=Oe+(Se^fe&(we^Se))+Ce[7]+4249261313&4294967295,Oe=fe+(Le<<22&4294967295|Le>>>10),Le=Se+(we^Oe&(fe^we))+Ce[8]+1770035416&4294967295,Se=Oe+(Le<<7&4294967295|Le>>>25),Le=we+(fe^Se&(Oe^fe))+Ce[9]+2336552879&4294967295,we=Se+(Le<<12&4294967295|Le>>>20),Le=fe+(Oe^we&(Se^Oe))+Ce[10]+4294925233&4294967295,fe=we+(Le<<17&4294967295|Le>>>15),Le=Oe+(Se^fe&(we^Se))+Ce[11]+2304563134&4294967295,Oe=fe+(Le<<22&4294967295|Le>>>10),Le=Se+(we^Oe&(fe^we))+Ce[12]+1804603682&4294967295,Se=Oe+(Le<<7&4294967295|Le>>>25),Le=we+(fe^Se&(Oe^fe))+Ce[13]+4254626195&4294967295,we=Se+(Le<<12&4294967295|Le>>>20),Le=fe+(Oe^we&(Se^Oe))+Ce[14]+2792965006&4294967295,fe=we+(Le<<17&4294967295|Le>>>15),Le=Oe+(Se^fe&(we^Se))+Ce[15]+1236535329&4294967295,Oe=fe+(Le<<22&4294967295|Le>>>10),Le=Se+(fe^we&(Oe^fe))+Ce[1]+4129170786&4294967295,Se=Oe+(Le<<5&4294967295|Le>>>27),Le=we+(Oe^fe&(Se^Oe))+Ce[6]+3225465664&4294967295,we=Se+(Le<<9&4294967295|Le>>>23),Le=fe+(Se^Oe&(we^Se))+Ce[11]+643717713&4294967295,fe=we+(Le<<14&4294967295|Le>>>18),Le=Oe+(we^Se&(fe^we))+Ce[0]+3921069994&4294967295,Oe=fe+(Le<<20&4294967295|Le>>>12),Le=Se+(fe^we&(Oe^fe))+Ce[5]+3593408605&4294967295,Se=Oe+(Le<<5&4294967295|Le>>>27),Le=we+(Oe^fe&(Se^Oe))+Ce[10]+38016083&4294967295,we=Se+(Le<<9&4294967295|Le>>>23),Le=fe+(Se^Oe&(we^Se))+Ce[15]+3634488961&4294967295,fe=we+(Le<<14&4294967295|Le>>>18),Le=Oe+(we^Se&(fe^we))+Ce[4]+3889429448&4294967295,Oe=fe+(Le<<20&4294967295|Le>>>12),Le=Se+(fe^we&(Oe^fe))+Ce[9]+568446438&4294967295,Se=Oe+(Le<<5&4294967295|Le>>>27),Le=we+(Oe^fe&(Se^Oe))+Ce[14]+3275163606&4294967295,we=Se+(Le<<9&4294967295|Le>>>23),Le=fe+(Se^Oe&(we^Se))+Ce[3]+4107603335&4294967295,fe=we+(Le<<14&4294967295|Le>>>18),Le=Oe+(we^Se&(fe^we))+Ce[8]+1163531501&4294967295,Oe=fe+(Le<<20&4294967295|Le>>>12),Le=Se+(fe^we&(Oe^fe))+Ce[13]+2850285829&4294967295,Se=Oe+(Le<<5&4294967295|Le>>>27),Le=we+(Oe^fe&(Se^Oe))+Ce[2]+4243563512&4294967295,we=Se+(Le<<9&4294967295|Le>>>23),Le=fe+(Se^Oe&(we^Se))+Ce[7]+1735328473&4294967295,fe=we+(Le<<14&4294967295|Le>>>18),Le=Oe+(we^Se&(fe^we))+Ce[12]+2368359562&4294967295,Oe=fe+(Le<<20&4294967295|Le>>>12),Le=Se+(Oe^fe^we)+Ce[5]+4294588738&4294967295,Se=Oe+(Le<<4&4294967295|Le>>>28),Le=we+(Se^Oe^fe)+Ce[8]+2272392833&4294967295,we=Se+(Le<<11&4294967295|Le>>>21),Le=fe+(we^Se^Oe)+Ce[11]+1839030562&4294967295,fe=we+(Le<<16&4294967295|Le>>>16),Le=Oe+(fe^we^Se)+Ce[14]+4259657740&4294967295,Oe=fe+(Le<<23&4294967295|Le>>>9),Le=Se+(Oe^fe^we)+Ce[1]+2763975236&4294967295,Se=Oe+(Le<<4&4294967295|Le>>>28),Le=we+(Se^Oe^fe)+Ce[4]+1272893353&4294967295,we=Se+(Le<<11&4294967295|Le>>>21),Le=fe+(we^Se^Oe)+Ce[7]+4139469664&4294967295,fe=we+(Le<<16&4294967295|Le>>>16),Le=Oe+(fe^we^Se)+Ce[10]+3200236656&4294967295,Oe=fe+(Le<<23&4294967295|Le>>>9),Le=Se+(Oe^fe^we)+Ce[13]+681279174&4294967295,Se=Oe+(Le<<4&4294967295|Le>>>28),Le=we+(Se^Oe^fe)+Ce[0]+3936430074&4294967295,we=Se+(Le<<11&4294967295|Le>>>21),Le=fe+(we^Se^Oe)+Ce[3]+3572445317&4294967295,fe=we+(Le<<16&4294967295|Le>>>16),Le=Oe+(fe^we^Se)+Ce[6]+76029189&4294967295,Oe=fe+(Le<<23&4294967295|Le>>>9),Le=Se+(Oe^fe^we)+Ce[9]+3654602809&4294967295,Se=Oe+(Le<<4&4294967295|Le>>>28),Le=we+(Se^Oe^fe)+Ce[12]+3873151461&4294967295,we=Se+(Le<<11&4294967295|Le>>>21),Le=fe+(we^Se^Oe)+Ce[15]+530742520&4294967295,fe=we+(Le<<16&4294967295|Le>>>16),Le=Oe+(fe^we^Se)+Ce[2]+3299628645&4294967295,Oe=fe+(Le<<23&4294967295|Le>>>9),Le=Se+(fe^(Oe|~we))+Ce[0]+4096336452&4294967295,Se=Oe+(Le<<6&4294967295|Le>>>26),Le=we+(Oe^(Se|~fe))+Ce[7]+1126891415&4294967295,we=Se+(Le<<10&4294967295|Le>>>22),Le=fe+(Se^(we|~Oe))+Ce[14]+2878612391&4294967295,fe=we+(Le<<15&4294967295|Le>>>17),Le=Oe+(we^(fe|~Se))+Ce[5]+4237533241&4294967295,Oe=fe+(Le<<21&4294967295|Le>>>11),Le=Se+(fe^(Oe|~we))+Ce[12]+1700485571&4294967295,Se=Oe+(Le<<6&4294967295|Le>>>26),Le=we+(Oe^(Se|~fe))+Ce[3]+2399980690&4294967295,we=Se+(Le<<10&4294967295|Le>>>22),Le=fe+(Se^(we|~Oe))+Ce[10]+4293915773&4294967295,fe=we+(Le<<15&4294967295|Le>>>17),Le=Oe+(we^(fe|~Se))+Ce[1]+2240044497&4294967295,Oe=fe+(Le<<21&4294967295|Le>>>11),Le=Se+(fe^(Oe|~we))+Ce[8]+1873313359&4294967295,Se=Oe+(Le<<6&4294967295|Le>>>26),Le=we+(Oe^(Se|~fe))+Ce[15]+4264355552&4294967295,we=Se+(Le<<10&4294967295|Le>>>22),Le=fe+(Se^(we|~Oe))+Ce[6]+2734768916&4294967295,fe=we+(Le<<15&4294967295|Le>>>17),Le=Oe+(we^(fe|~Se))+Ce[13]+1309151649&4294967295,Oe=fe+(Le<<21&4294967295|Le>>>11),Le=Se+(fe^(Oe|~we))+Ce[4]+4149444226&4294967295,Se=Oe+(Le<<6&4294967295|Le>>>26),Le=we+(Oe^(Se|~fe))+Ce[11]+3174756917&4294967295,we=Se+(Le<<10&4294967295|Le>>>22),Le=fe+(Se^(we|~Oe))+Ce[2]+718787259&4294967295,fe=we+(Le<<15&4294967295|Le>>>17),Le=Oe+(we^(fe|~Se))+Ce[9]+3951481745&4294967295,xe.g[0]=xe.g[0]+Se&4294967295,xe.g[1]=xe.g[1]+(fe+(Le<<21&4294967295|Le>>>11))&4294967295,xe.g[2]=xe.g[2]+fe&4294967295,xe.g[3]=xe.g[3]+we&4294967295}e.prototype.u=function(xe,Se){Se===void 0&&(Se=xe.length);for(var Oe=Se-this.blockSize,Ce=this.B,fe=this.h,we=0;we<Se;){if(fe==0)for(;we<=Oe;)t(this,xe,we),we+=this.blockSize;if(typeof xe=="string"){for(;we<Se;)if(Ce[fe++]=xe.charCodeAt(we++),fe==this.blockSize){t(this,Ce),fe=0;break}}else for(;we<Se;)if(Ce[fe++]=xe[we++],fe==this.blockSize){t(this,Ce),fe=0;break}}this.h=fe,this.o+=Se},e.prototype.v=function(){var xe=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);xe[0]=128;for(var Se=1;Se<xe.length-8;++Se)xe[Se]=0;var Oe=8*this.o;for(Se=xe.length-8;Se<xe.length;++Se)xe[Se]=Oe&255,Oe/=256;for(this.u(xe),xe=Array(16),Se=Oe=0;4>Se;++Se)for(var Ce=0;32>Ce;Ce+=8)xe[Oe++]=this.g[Se]>>>Ce&255;return xe};function r(xe,Se){var Oe=s;return Object.prototype.hasOwnProperty.call(Oe,xe)?Oe[xe]:Oe[xe]=Se(xe)}function a(xe,Se){this.h=Se;for(var Oe=[],Ce=!0,fe=xe.length-1;0<=fe;fe--){var we=xe[fe]|0;Ce&&we==Se||(Oe[fe]=we,Ce=!1)}this.g=Oe}var s={};function c(xe){return-128<=xe&&128>xe?r(xe,function(Se){return new a([Se|0],0>Se?-1:0)}):new a([xe|0],0>xe?-1:0)}function p(xe){if(isNaN(xe)||!isFinite(xe))return C;if(0>xe)return W(p(-xe));for(var Se=[],Oe=1,Ce=0;xe>=Oe;Ce++)Se[Ce]=xe/Oe|0,Oe*=4294967296;return new a(Se,0)}function g(xe,Se){if(xe.length==0)throw Error("number format error: empty string");if(Se=Se||10,2>Se||36<Se)throw Error("radix out of range: "+Se);if(xe.charAt(0)=="-")return W(g(xe.substring(1),Se));if(0<=xe.indexOf("-"))throw Error('number format error: interior "-" character');for(var Oe=p(Math.pow(Se,8)),Ce=C,fe=0;fe<xe.length;fe+=8){var we=Math.min(8,xe.length-fe),Le=parseInt(xe.substring(fe,fe+we),Se);8>we?(we=p(Math.pow(Se,we)),Ce=Ce.j(we).add(p(Le))):(Ce=Ce.j(Oe),Ce=Ce.add(p(Le)))}return Ce}var C=c(0),E=c(1),T=c(16777216);i=a.prototype,i.m=function(){if(z(this))return-W(this).m();for(var xe=0,Se=1,Oe=0;Oe<this.g.length;Oe++){var Ce=this.i(Oe);xe+=(0<=Ce?Ce:4294967296+Ce)*Se,Se*=4294967296}return xe},i.toString=function(xe){if(xe=xe||10,2>xe||36<xe)throw Error("radix out of range: "+xe);if(N(this))return"0";if(z(this))return"-"+W(this).toString(xe);for(var Se=p(Math.pow(xe,6)),Oe=this,Ce="";;){var fe=Pe(Oe,Se).g;Oe=ee(Oe,fe.j(Se));var we=((0<Oe.g.length?Oe.g[0]:Oe.h)>>>0).toString(xe);if(Oe=fe,N(Oe))return we+Ce;for(;6>we.length;)we="0"+we;Ce=we+Ce}},i.i=function(xe){return 0>xe?0:xe<this.g.length?this.g[xe]:this.h};function N(xe){if(xe.h!=0)return!1;for(var Se=0;Se<xe.g.length;Se++)if(xe.g[Se]!=0)return!1;return!0}function z(xe){return xe.h==-1}i.l=function(xe){return xe=ee(this,xe),z(xe)?-1:N(xe)?0:1};function W(xe){for(var Se=xe.g.length,Oe=[],Ce=0;Ce<Se;Ce++)Oe[Ce]=~xe.g[Ce];return new a(Oe,~xe.h).add(E)}i.abs=function(){return z(this)?W(this):this},i.add=function(xe){for(var Se=Math.max(this.g.length,xe.g.length),Oe=[],Ce=0,fe=0;fe<=Se;fe++){var we=Ce+(this.i(fe)&65535)+(xe.i(fe)&65535),Le=(we>>>16)+(this.i(fe)>>>16)+(xe.i(fe)>>>16);Ce=Le>>>16,we&=65535,Le&=65535,Oe[fe]=Le<<16|we}return new a(Oe,Oe[Oe.length-1]&-2147483648?-1:0)};function ee(xe,Se){return xe.add(W(Se))}i.j=function(xe){if(N(this)||N(xe))return C;if(z(this))return z(xe)?W(this).j(W(xe)):W(W(this).j(xe));if(z(xe))return W(this.j(W(xe)));if(0>this.l(T)&&0>xe.l(T))return p(this.m()*xe.m());for(var Se=this.g.length+xe.g.length,Oe=[],Ce=0;Ce<2*Se;Ce++)Oe[Ce]=0;for(Ce=0;Ce<this.g.length;Ce++)for(var fe=0;fe<xe.g.length;fe++){var we=this.i(Ce)>>>16,Le=this.i(Ce)&65535,Ct=xe.i(fe)>>>16,bn=xe.i(fe)&65535;Oe[2*Ce+2*fe]+=Le*bn,ce(Oe,2*Ce+2*fe),Oe[2*Ce+2*fe+1]+=we*bn,ce(Oe,2*Ce+2*fe+1),Oe[2*Ce+2*fe+1]+=Le*Ct,ce(Oe,2*Ce+2*fe+1),Oe[2*Ce+2*fe+2]+=we*Ct,ce(Oe,2*Ce+2*fe+2)}for(Ce=0;Ce<Se;Ce++)Oe[Ce]=Oe[2*Ce+1]<<16|Oe[2*Ce];for(Ce=Se;Ce<2*Se;Ce++)Oe[Ce]=0;return new a(Oe,0)};function ce(xe,Se){for(;(xe[Se]&65535)!=xe[Se];)xe[Se+1]+=xe[Se]>>>16,xe[Se]&=65535,Se++}function ye(xe,Se){this.g=xe,this.h=Se}function Pe(xe,Se){if(N(Se))throw Error("division by zero");if(N(xe))return new ye(C,C);if(z(xe))return Se=Pe(W(xe),Se),new ye(W(Se.g),W(Se.h));if(z(Se))return Se=Pe(xe,W(Se)),new ye(W(Se.g),Se.h);if(30<xe.g.length){if(z(xe)||z(Se))throw Error("slowDivide_ only works with positive integers.");for(var Oe=E,Ce=Se;0>=Ce.l(xe);)Oe=Ge(Oe),Ce=Ge(Ce);var fe=Re(Oe,1),we=Re(Ce,1);for(Ce=Re(Ce,2),Oe=Re(Oe,2);!N(Ce);){var Le=we.add(Ce);0>=Le.l(xe)&&(fe=fe.add(Oe),we=Le),Ce=Re(Ce,1),Oe=Re(Oe,1)}return Se=ee(xe,fe.j(Se)),new ye(fe,Se)}for(fe=C;0<=xe.l(Se);){for(Oe=Math.max(1,Math.floor(xe.m()/Se.m())),Ce=Math.ceil(Math.log(Oe)/Math.LN2),Ce=48>=Ce?1:Math.pow(2,Ce-48),we=p(Oe),Le=we.j(Se);z(Le)||0<Le.l(xe);)Oe-=Ce,we=p(Oe),Le=we.j(Se);N(we)&&(we=E),fe=fe.add(we),xe=ee(xe,Le)}return new ye(fe,xe)}i.A=function(xe){return Pe(this,xe).h},i.and=function(xe){for(var Se=Math.max(this.g.length,xe.g.length),Oe=[],Ce=0;Ce<Se;Ce++)Oe[Ce]=this.i(Ce)&xe.i(Ce);return new a(Oe,this.h&xe.h)},i.or=function(xe){for(var Se=Math.max(this.g.length,xe.g.length),Oe=[],Ce=0;Ce<Se;Ce++)Oe[Ce]=this.i(Ce)|xe.i(Ce);return new a(Oe,this.h|xe.h)},i.xor=function(xe){for(var Se=Math.max(this.g.length,xe.g.length),Oe=[],Ce=0;Ce<Se;Ce++)Oe[Ce]=this.i(Ce)^xe.i(Ce);return new a(Oe,this.h^xe.h)};function Ge(xe){for(var Se=xe.g.length+1,Oe=[],Ce=0;Ce<Se;Ce++)Oe[Ce]=xe.i(Ce)<<1|xe.i(Ce-1)>>>31;return new a(Oe,xe.h)}function Re(xe,Se){var Oe=Se>>5;Se%=32;for(var Ce=xe.g.length-Oe,fe=[],we=0;we<Ce;we++)fe[we]=0<Se?xe.i(we+Oe)>>>Se|xe.i(we+Oe+1)<<32-Se:xe.i(we+Oe);return new a(fe,xe.h)}e.prototype.digest=e.prototype.v,e.prototype.reset=e.prototype.s,e.prototype.update=e.prototype.u,c$=Gae.Md5=e,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.A,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=p,a.fromString=g,Wm=Gae.Integer=a}).apply(typeof zae<"u"?zae:typeof self<"u"?self:typeof window<"u"?window:{});var CM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qm={};var d$,G9e,Uv,m$,YS,_M,p$,g$,u$;(function(){var i,o=typeof Object.defineProperties=="function"?Object.defineProperty:function(U,ie,ge){return U==Array.prototype||U==Object.prototype||(U[ie]=ge.value),U};function n(U){U=[typeof globalThis=="object"&&globalThis,U,typeof window=="object"&&window,typeof self=="object"&&self,typeof CM=="object"&&CM];for(var ie=0;ie<U.length;++ie){var ge=U[ie];if(ge&&ge.Math==Math)return ge}throw Error("Cannot find global object")}var e=n(this);function t(U,ie){if(ie)e:{var ge=e;U=U.split(".");for(var Ee=0;Ee<U.length-1;Ee++){var We=U[Ee];if(!(We in ge))break e;ge=ge[We]}U=U[U.length-1],Ee=ge[U],ie=ie(Ee),ie!=Ee&&ie!=null&&o(ge,U,{configurable:!0,writable:!0,value:ie})}}function r(U,ie){U instanceof String&&(U+="");var ge=0,Ee=!1,We={next:function(){if(!Ee&&ge<U.length){var st=ge++;return{value:ie(st,U[st]),done:!1}}return Ee=!0,{done:!0,value:void 0}}};return We[Symbol.iterator]=function(){return We},We}t("Array.prototype.values",function(U){return U||function(){return r(this,function(ie,ge){return ge})}});var a=a||{},s=this||self;function c(U){var ie=typeof U;return ie=ie!="object"?ie:U?Array.isArray(U)?"array":ie:"null",ie=="array"||ie=="object"&&typeof U.length=="number"}function p(U){var ie=typeof U;return ie=="object"&&U!=null||ie=="function"}function g(U,ie,ge){return U.call.apply(U.bind,arguments)}function C(U,ie,ge){if(!U)throw Error();if(2<arguments.length){var Ee=Array.prototype.slice.call(arguments,2);return function(){var We=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(We,Ee),U.apply(ie,We)}}return function(){return U.apply(ie,arguments)}}function E(U,ie,ge){return E=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?g:C,E.apply(null,arguments)}function T(U,ie){var ge=Array.prototype.slice.call(arguments,1);return function(){var Ee=ge.slice();return Ee.push.apply(Ee,arguments),U.apply(this,Ee)}}function N(U,ie){function ge(){}ge.prototype=ie.prototype,U.aa=ie.prototype,U.prototype=new ge,U.prototype.constructor=U,U.Qb=function(Ee,We,st){for(var Lt=Array(arguments.length-2),po=2;po<arguments.length;po++)Lt[po-2]=arguments[po];return ie.prototype[We].apply(Ee,Lt)}}function z(U){let ie=U.length;if(0<ie){let ge=Array(ie);for(let Ee=0;Ee<ie;Ee++)ge[Ee]=U[Ee];return ge}return[]}function W(U,ie){for(let ge=1;ge<arguments.length;ge++){let Ee=arguments[ge];if(c(Ee)){let We=U.length||0,st=Ee.length||0;U.length=We+st;for(let Lt=0;Lt<st;Lt++)U[We+Lt]=Ee[Lt]}else U.push(Ee)}}class ee{constructor(ie,ge){this.i=ie,this.j=ge,this.h=0,this.g=null}get(){let ie;return 0<this.h?(this.h--,ie=this.g,this.g=ie.next,ie.next=null):ie=this.i(),ie}}function ce(U){return/^[\s\xa0]*$/.test(U)}function ye(){var U=s.navigator;return U&&(U=U.userAgent)?U:""}function Pe(U){return Pe[" "](U),U}Pe[" "]=function(){};var Ge=ye().indexOf("Gecko")!=-1&&!(ye().toLowerCase().indexOf("webkit")!=-1&&ye().indexOf("Edge")==-1)&&!(ye().indexOf("Trident")!=-1||ye().indexOf("MSIE")!=-1)&&ye().indexOf("Edge")==-1;function Re(U,ie,ge){for(let Ee in U)ie.call(ge,U[Ee],Ee,U)}function xe(U,ie){for(let ge in U)ie.call(void 0,U[ge],ge,U)}function Se(U){let ie={};for(let ge in U)ie[ge]=U[ge];return ie}let Oe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ce(U,ie){let ge,Ee;for(let We=1;We<arguments.length;We++){Ee=arguments[We];for(ge in Ee)U[ge]=Ee[ge];for(let st=0;st<Oe.length;st++)ge=Oe[st],Object.prototype.hasOwnProperty.call(Ee,ge)&&(U[ge]=Ee[ge])}}function fe(U){var ie=1;U=U.split(":");let ge=[];for(;0<ie&&U.length;)ge.push(U.shift()),ie--;return U.length&&ge.push(U.join(":")),ge}function we(U){s.setTimeout(()=>{throw U},0)}function Le(){var U=cn;let ie=null;return U.g&&(ie=U.g,U.g=U.g.next,U.g||(U.h=null),ie.next=null),ie}class Ct{constructor(){this.h=this.g=null}add(ie,ge){let Ee=bn.get();Ee.set(ie,ge),this.h?this.h.next=Ee:this.g=Ee,this.h=Ee}}var bn=new ee(()=>new vt,U=>U.reset());class vt{constructor(){this.next=this.g=this.h=null}set(ie,ge){this.h=ie,this.g=ge,this.next=null}reset(){this.next=this.g=this.h=null}}let Rt,Nt=!1,cn=new Ct,en=()=>{let U=s.Promise.resolve(void 0);Rt=()=>{U.then(Yt)}};var Yt=()=>{for(var U;U=Le();){try{U.h.call(U.g)}catch(ge){we(ge)}var ie=bn;ie.j(U),100>ie.h&&(ie.h++,U.next=ie.g,ie.g=U)}Nt=!1};function Ri(){this.s=this.s,this.C=this.C}Ri.prototype.s=!1,Ri.prototype.ma=function(){this.s||(this.s=!0,this.N())},Ri.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function Xt(U,ie){this.type=U,this.g=this.target=ie,this.defaultPrevented=!1}Xt.prototype.h=function(){this.defaultPrevented=!0};var Jn=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var U=!1,ie=Object.defineProperty({},"passive",{get:function(){U=!0}});try{let ge=()=>{};s.addEventListener("test",ge,ie),s.removeEventListener("test",ge,ie)}catch{}return U}();function Wi(U,ie){if(Xt.call(this,U?U.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,U){var ge=this.type=U.type,Ee=U.changedTouches&&U.changedTouches.length?U.changedTouches[0]:null;if(this.target=U.target||U.srcElement,this.g=ie,ie=U.relatedTarget){if(Ge){e:{try{Pe(ie.nodeName);var We=!0;break e}catch{}We=!1}We||(ie=null)}}else ge=="mouseover"?ie=U.fromElement:ge=="mouseout"&&(ie=U.toElement);this.relatedTarget=ie,Ee?(this.clientX=Ee.clientX!==void 0?Ee.clientX:Ee.pageX,this.clientY=Ee.clientY!==void 0?Ee.clientY:Ee.pageY,this.screenX=Ee.screenX||0,this.screenY=Ee.screenY||0):(this.clientX=U.clientX!==void 0?U.clientX:U.pageX,this.clientY=U.clientY!==void 0?U.clientY:U.pageY,this.screenX=U.screenX||0,this.screenY=U.screenY||0),this.button=U.button,this.key=U.key||"",this.ctrlKey=U.ctrlKey,this.altKey=U.altKey,this.shiftKey=U.shiftKey,this.metaKey=U.metaKey,this.pointerId=U.pointerId||0,this.pointerType=typeof U.pointerType=="string"?U.pointerType:rm[U.pointerType]||"",this.state=U.state,this.i=U,U.defaultPrevented&&Wi.aa.h.call(this)}}N(Wi,Xt);var rm={2:"touch",3:"pen",4:"mouse"};Wi.prototype.h=function(){Wi.aa.h.call(this);var U=this.i;U.preventDefault?U.preventDefault():U.returnValue=!1};var Io="closure_listenable_"+(1e6*Math.random()|0),vl=0;function Wr(U,ie,ge,Ee,We){this.listener=U,this.proxy=null,this.src=ie,this.type=ge,this.capture=!!Ee,this.ha=We,this.key=++vl,this.da=this.fa=!1}function Cl(U){U.da=!0,U.listener=null,U.proxy=null,U.src=null,U.ha=null}function ec(U){this.src=U,this.g={},this.h=0}ec.prototype.add=function(U,ie,ge,Ee,We){var st=U.toString();U=this.g[st],U||(U=this.g[st]=[],this.h++);var Lt=Ng(U,ie,Ee,We);return-1<Lt?(ie=U[Lt],ge||(ie.fa=!1)):(ie=new Wr(ie,this.src,st,!!Ee,We),ie.fa=ge,U.push(ie)),ie};function Zc(U,ie){var ge=ie.type;if(ge in U.g){var Ee=U.g[ge],We=Array.prototype.indexOf.call(Ee,ie,void 0),st;(st=0<=We)&&Array.prototype.splice.call(Ee,We,1),st&&(Cl(ie),U.g[ge].length==0&&(delete U.g[ge],U.h--))}}function Ng(U,ie,ge,Ee){for(var We=0;We<U.length;++We){var st=U[We];if(!st.da&&st.listener==ie&&st.capture==!!ge&&st.ha==Ee)return We}return-1}var tc="closure_lm_"+(1e6*Math.random()|0),Fg={};function Mh(U,ie,ge,Ee,We){if(Ee&&Ee.once)return Lg(U,ie,ge,Ee,We);if(Array.isArray(ie)){for(var st=0;st<ie.length;st++)Mh(U,ie[st],ge,Ee,We);return null}return ge=Qc(ge),U&&U[Io]?U.K(ie,ge,p(Ee)?!!Ee.capture:!!Ee,We):am(U,ie,ge,!1,Ee,We)}function am(U,ie,ge,Ee,We,st){if(!ie)throw Error("Invalid event type");var Lt=p(We)?!!We.capture:!!We,po=sm(U);if(po||(U[tc]=po=new ec(U)),ge=po.add(ie,ge,Ee,Lt,st),ge.proxy)return ge;if(Ee=kh(),ge.proxy=Ee,Ee.src=U,Ee.listener=ge,U.addEventListener)Jn||(We=Lt),We===void 0&&(We=!1),U.addEventListener(ie.toString(),Ee,We);else if(U.attachEvent)U.attachEvent(bO(ie.toString()),Ee);else if(U.addListener&&U.removeListener)U.addListener(Ee);else throw Error("addEventListener and attachEvent are unavailable.");return ge}function kh(){function U(ge){return ie.call(U.src,U.listener,ge)}let ie=R_;return U}function Lg(U,ie,ge,Ee,We){if(Array.isArray(ie)){for(var st=0;st<ie.length;st++)Lg(U,ie[st],ge,Ee,We);return null}return ge=Qc(ge),U&&U[Io]?U.L(ie,ge,p(Ee)?!!Ee.capture:!!Ee,We):am(U,ie,ge,!0,Ee,We)}function k_(U,ie,ge,Ee,We){if(Array.isArray(ie))for(var st=0;st<ie.length;st++)k_(U,ie[st],ge,Ee,We);else Ee=p(Ee)?!!Ee.capture:!!Ee,ge=Qc(ge),U&&U[Io]?(U=U.i,ie=String(ie).toString(),ie in U.g&&(st=U.g[ie],ge=Ng(st,ge,Ee,We),-1<ge&&(Cl(st[ge]),Array.prototype.splice.call(st,ge,1),st.length==0&&(delete U.g[ie],U.h--)))):U&&(U=sm(U))&&(ie=U.g[ie.toString()],U=-1,ie&&(U=Ng(ie,ge,Ee,We)),(ge=-1<U?ie[U]:null)&&Rh(ge))}function Rh(U){if(typeof U!="number"&&U&&!U.da){var ie=U.src;if(ie&&ie[Io])Zc(ie.i,U);else{var ge=U.type,Ee=U.proxy;ie.removeEventListener?ie.removeEventListener(ge,Ee,U.capture):ie.detachEvent?ie.detachEvent(bO(ge),Ee):ie.addListener&&ie.removeListener&&ie.removeListener(Ee),(ge=sm(ie))?(Zc(ge,U),ge.h==0&&(ge.src=null,ie[tc]=null)):Cl(U)}}}function bO(U){return U in Fg?Fg[U]:Fg[U]="on"+U}function R_(U,ie){if(U.da)U=!0;else{ie=new Wi(ie,this);var ge=U.listener,Ee=U.ha||U.src;U.fa&&Rh(U),U=ge.call(Ee,ie)}return U}function sm(U){return U=U[tc],U instanceof ec?U:null}var Xc="__closure_events_fn_"+(1e9*Math.random()>>>0);function Qc(U){return typeof U=="function"?U:(U[Xc]||(U[Xc]=function(ie){return U.handleEvent(ie)}),U[Xc])}function Mr(){Ri.call(this),this.i=new ec(this),this.M=this,this.F=null}N(Mr,Ri),Mr.prototype[Io]=!0,Mr.prototype.removeEventListener=function(U,ie,ge,Ee){k_(this,U,ie,ge,Ee)};function qr(U,ie){var ge,Ee=U.F;if(Ee)for(ge=[];Ee;Ee=Ee.F)ge.push(Ee);if(U=U.M,Ee=ie.type||ie,typeof ie=="string")ie=new Xt(ie,U);else if(ie instanceof Xt)ie.target=ie.target||U;else{var We=ie;ie=new Xt(Ee,U),Ce(ie,We)}if(We=!0,ge)for(var st=ge.length-1;0<=st;st--){var Lt=ie.g=ge[st];We=Bg(Lt,Ee,!0,ie)&&We}if(Lt=ie.g=U,We=Bg(Lt,Ee,!0,ie)&&We,We=Bg(Lt,Ee,!1,ie)&&We,ge)for(st=0;st<ge.length;st++)Lt=ie.g=ge[st],We=Bg(Lt,Ee,!1,ie)&&We}Mr.prototype.N=function(){if(Mr.aa.N.call(this),this.i){var U=this.i,ie;for(ie in U.g){for(var ge=U.g[ie],Ee=0;Ee<ge.length;Ee++)Cl(ge[Ee]);delete U.g[ie],U.h--}}this.F=null},Mr.prototype.K=function(U,ie,ge,Ee){return this.i.add(String(U),ie,!1,ge,Ee)},Mr.prototype.L=function(U,ie,ge,Ee){return this.i.add(String(U),ie,!0,ge,Ee)};function Bg(U,ie,ge,Ee){if(ie=U.i.g[String(ie)],!ie)return!0;ie=ie.concat();for(var We=!0,st=0;st<ie.length;++st){var Lt=ie[st];if(Lt&&!Lt.da&&Lt.capture==ge){var po=Lt.listener,pa=Lt.ha||Lt.src;Lt.fa&&Zc(U.i,Lt),We=po.call(pa,Ee)!==!1&&We}}return We&&!Ee.defaultPrevented}function Nh(U,ie,ge){if(typeof U=="function")ge&&(U=E(U,ge));else if(U&&typeof U.handleEvent=="function")U=E(U.handleEvent,U);else throw Error("Invalid listener argument");return 2147483647<Number(ie)?-1:s.setTimeout(U,ie||0)}function N_(U){U.g=Nh(()=>{U.g=null,U.i&&(U.i=!1,N_(U))},U.l);let ie=U.h;U.h=null,U.m.apply(null,ie)}class Fh extends Ri{constructor(ie,ge){super(),this.m=ie,this.l=ge,this.h=null,this.i=!1,this.g=null}j(ie){this.h=arguments,this.g?this.i=!0:N_(this)}N(){super.N(),this.g&&(s.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Jc(U){Ri.call(this),this.h=U,this.g={}}N(Jc,Ri);var _l=[];function lm(U){Re(U.g,function(ie,ge){this.g.hasOwnProperty(ge)&&Rh(ie)},U),U.g={}}Jc.prototype.N=function(){Jc.aa.N.call(this),lm(this)},Jc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Vg=s.JSON.stringify,F_=s.JSON.parse,K7=class{stringify(U){return s.JSON.stringify(U,void 0)}parse(U){return s.JSON.parse(U,void 0)}};function np(){}np.prototype.h=null;function Ug(U){return U.h||(U.h=U.i())}function IO(){}var nc={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function L_(){Xt.call(this,"d")}N(L_,Xt);function B_(){Xt.call(this,"c")}N(B_,Xt);var Eo={},cm=null;function Lh(){return cm=cm||new Mr}Eo.La="serverreachability";function V_(U){Xt.call(this,Eo.La,U)}N(V_,Xt);function dm(U){let ie=Lh();qr(ie,new V_(ie))}Eo.STAT_EVENT="statevent";function U_(U,ie){Xt.call(this,Eo.STAT_EVENT,U),this.stat=ie}N(U_,Xt);function Yr(U){let ie=Lh();qr(ie,new U_(ie,U))}Eo.Ma="timingevent";function EO(U,ie){Xt.call(this,Eo.Ma,U),this.size=ie}N(EO,Xt);function Da(U,ie){if(typeof U!="function")throw Error("Fn must not be null and must be a function");return s.setTimeout(function(){U()},ie)}function ed(){this.g=!0}ed.prototype.xa=function(){this.g=!1};function xO(U,ie,ge,Ee,We,st){U.info(function(){if(U.g)if(st)for(var Lt="",po=st.split("&"),pa=0;pa<po.length;pa++){var Ni=po[pa].split("=");if(1<Ni.length){var wa=Ni[0];Ni=Ni[1];var Oa=wa.split("_");Lt=2<=Oa.length&&Oa[1]=="type"?Lt+(wa+"="+Ni+"&"):Lt+(wa+"=redacted&")}}else Lt=null;else Lt=st;return"XMLHTTP REQ ("+Ee+") [attempt "+We+"]: "+ie+`
171
171
  `+ge+`
172
172
  `+Lt})}function TO(U,ie,ge,Ee,We,st,Lt){U.info(function(){return"XMLHTTP RESP ("+Ee+") [ attempt "+We+"]: "+ie+`