@ckeditor/ckeditor5-real-time-collaboration 47.1.0 → 47.2.0-alpha.0
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.
- package/build/real-time-collaboration.js +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +14 -14
- package/src/common-translations.js +1 -1
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +2 -2
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +2 -2
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +2 -2
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +2 -2
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +2 -2
- package/src/realtimecollaborativetrackchanges.js +1 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var d=t[e++];switch(c){case 0:i[a++]=r[d>>2],s=(3&d)<<4,c=1;break;case 1:i[a++]=r[s|d>>4],s=(15&d)<<2,c=2;break;case 2:i[a++]=r[s|d>>6],i[a++]=r[63&d],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var d=t.charCodeAt(c++);if(61===d&&a>1)break;if(void 0===(d=s[d]))throw Error(i);switch(a){case 0:r=d,a=1;break;case 1:e[n++]=r<<2|(48&d)>>4,r=d,a=2;break;case 2:e[n++]=(15&r)<<4|(60&d)>>2,r=d,a=3;break;case 3:e[n++]=(3&r)<<6|d,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},6:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],d=r.base?c[0]+r.base:c[0],u=o[d]||0,l="".concat(d," ").concat(u);o[d]=u+1;var p=n(l),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var f=s(h,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:f,references:1})}i.push(l)}return i}function s(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,s){var o=r(t=t||[],s=s||{});return function(t){t=t||[];for(var i=0;i<o.length;i++){var a=n(o[i]);e[a].references--}for(var c=r(t,s),d=0;d<o.length;d++){var u=n(o[d]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}o=c}}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},290:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},302:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,d=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new g(unescape(t.pathname),{});else if("string"===o)for(e in s=new g(t,{}),h)delete s[e];else if("object"===o){for(e in t)e in h||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function y(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=d.exec(t),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(e.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function g(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof g))return new g(t,e,n);var o,a,c,d,h,b,I=p.slice(),O=typeof e,v=this,w=0;for("object"!==O&&"string"!==O&&(n=e,e=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=y(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(v.protocol)))&&(I[3]=[/(.*)/,"pathname"]);w<I.length;w++)"function"!=typeof(d=I[w])?(c=d[0],b=d[1],c!=c?v[b]=t:"string"==typeof c?~(h="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof d[2]?(v[b]=t.slice(0,h),t=t.slice(h+d[2])):(v[b]=t.slice(h),t=t.slice(0,h))):(h=c.exec(t))&&(v[b]=h[1],t=t.slice(0,h.index)),v[b]=v[b]||o&&d[3]&&e[b]||"",d[4]&&(v[b]=v[b].toLowerCase())):t=d(t,v);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&m(v.protocol)&&(v.pathname="/"+v.pathname),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(h=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,h),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(h+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&m(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}g.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var d=0;d<p.length;d++){var u=p[d];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=s.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(i+=n.hash),i}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,t.exports=g},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},430:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var d,u="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):u(t)})(t)}:u};function p(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return d}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw a(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},c.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[e](!1)},uint64:function(){return p.call(this)[e](!0)},sint64:function(){return p.call(this).zzDecode()[e](!1)},fixed64:function(){return f.call(this)[e](!0)},sfixed64:function(){return f.call(this)[e](!1)}})}},557:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},602:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},718:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var d=0;d<t.length;d++){var u=[].concat(t[d]);r&&i[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,d=4294967296*(1048575&i)+o;return 2047===c?d?NaN:a*(1/0):0===c?5e-324*a*d:a*Math.pow(2,c-1075)*(d+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},883:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(933),s=n.n(r),o=n(718),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},933:t=>{"use strict";t.exports=function(t){return t[1]}},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function d(){}function u(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(d,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function y(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=p(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(h,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var g=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(g,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=p(),r._configure()}},995:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>So,CloudServicesRevisionHistoryAdapter:()=>Ho,CloudServicesTrackChangesAdapter:()=>Po,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>No,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Jo,Sessions:()=>Xn,WebSocketGateway:()=>Fn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>Dt,Encoder:()=>Et,PacketType:()=>Pt,protocol:()=>Ct});var e=__webpack_require__(782),n=__webpack_require__(584),r=__webpack_require__(311),s=__webpack_require__(783);class o{static DESCRIPTOR_NAME;static DESCRIPTOR;constructor(...t){}}class i extends o{static TYPE="1000";static READABLE_TYPE_NAME;constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}class a extends i{id;static TYPE="21";static READABLE_TYPE_NAME="getUser";static DESCRIPTOR_NAME="GetUserMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new a(t.id)}}class c extends i{attributes;static DESCRIPTOR_NAME="GetUserResponse";static DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}};constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map(t=>({key:t,value:JSON.stringify(this.attributes[t])}))}}static fromJSON(t){const e=t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{});return new c(e)}}var d=__webpack_require__(39);const u=(()=>{var t=d.Reader,e=d.Writer,n=d.util,r=d.roots.default||(d.roots.default={});return r.OperationMetadataDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.userId="",s.prototype.type="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(10).string(t.userId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(18).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.OperationMetadataDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.userId=e.string();break;case 2:i.type=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.OperationMetadataDescriptor)return t;var e=new r.OperationMetadataDescriptor;return null!=t.userId&&(e.userId=String(t.userId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/OperationMetadataDescriptor"},s}(),r.CollaborativeEditingConnectMessage=function(){function s(t){if(this.buffers=[],this.types=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.buffers&&t.buffers.length)for(var r=0;r<t.buffers.length;++r)n.uint32(26).bytes(t.buffers[r]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),r=0;r<t.types.length;++r)n.uint32(t.types[r]);n.ldelim()}return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(42).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion))return"bundleVersion: string expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectMessage)return t;var e=new r.CollaborativeEditingConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var r={};if((e.arrays||e.defaults)&&(r.buffers=[],r.types=[]),e.defaults&&(r.id="",r.bundleVersion="",r.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(r.bundleVersion=t.bundleVersion),t.buffers&&t.buffers.length){r.buffers=[];for(var s=0;s<t.buffers.length;++s)r.buffers[s]=e.bytes===String?n.base64.encode(t.buffers[s],0,t.buffers[s].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[s]):t.buffers[s]}if(t.types&&t.types.length)for(r.types=[],s=0;s<t.types.length;++s)r.types[s]=t.types[s];return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(r.lastOperationId=t.lastOperationId),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectMessage"},s}(),r.CollaborativeEditingReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.lastKnowVersion=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.lastKnowVersion&&Object.hasOwnProperty.call(t,"lastKnowVersion")&&n.uint32(24).uint32(t.lastKnowVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.lastKnowVersion=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&!n.isInteger(t.lastKnowVersion)?"lastKnowVersion: integer expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingReconnectMessage)return t;var e=new r.CollaborativeEditingReconnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),null!=t.lastKnowVersion&&(e.lastKnowVersion=t.lastKnowVersion>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=t.lastKnowVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingReconnectMessage"},s}(),r.CollaborativeEditingUpdateMessage=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.baseVersion=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.baseVersion&&Object.hasOwnProperty.call(t,"baseVersion")&&n.uint32(16).uint32(t.baseVersion),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(26).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(50).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(58).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingUpdateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.baseVersion=e.uint32();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 6:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&!n.isInteger(t.baseVersion))return"baseVersion: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingUpdateMessage)return t;var e=new r.CollaborativeEditingUpdateMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.baseVersion&&(e.baseVersion=t.baseVersion>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.id="",s.baseVersion=0,s.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(s.id=t.id),null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&(s.baseVersion=t.baseVersion),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingUpdateMessage"},s}(),r.GetDocumentDetailsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.environmentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.environmentId&&Object.hasOwnProperty.call(t,"environmentId")&&n.uint32(18).string(t.environmentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.environmentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.environmentId&&t.hasOwnProperty("environmentId")&&!n.isString(t.environmentId)?"environmentId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsMessage)return t;var e=new r.GetDocumentDetailsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.environmentId&&(e.environmentId=String(t.environmentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.environmentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.environmentId&&t.hasOwnProperty("environmentId")&&(n.environmentId=t.environmentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsMessage"},s}(),r.CollaborativeEditingConnectResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.offset=0,s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.initData="",s.prototype.isInitialized=!1,s.prototype.sessionId="",s.prototype.lastOperationId="",s.prototype.sessionCreatedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.offset&&Object.hasOwnProperty.call(t,"offset")&&n.uint32(16).uint32(t.offset),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(24).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(34).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(42).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(58).fork()).ldelim();return null!=t.initData&&Object.hasOwnProperty.call(t,"initData")&&n.uint32(66).string(t.initData),null!=t.isInitialized&&Object.hasOwnProperty.call(t,"isInitialized")&&n.uint32(72).bool(t.isInitialized),null!=t.sessionId&&Object.hasOwnProperty.call(t,"sessionId")&&n.uint32(82).string(t.sessionId),null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(90).string(t.lastOperationId),null!=t.sessionCreatedAt&&Object.hasOwnProperty.call(t,"sessionCreatedAt")&&n.uint32(98).string(t.sessionCreatedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.offset=e.uint32();break;case 3:i.version=e.uint32();break;case 4:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 5:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 7:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:i.initData=e.string();break;case 9:i.isInitialized=e.bool();break;case 10:i.sessionId=e.string();break;case 11:i.lastOperationId=e.string();break;case 12:i.sessionCreatedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.offset&&t.hasOwnProperty("offset")&&!n.isInteger(t.offset))return"offset: integer expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.initData&&t.hasOwnProperty("initData")&&!n.isString(t.initData)?"initData: string expected":null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&"boolean"!=typeof t.isInitialized?"isInitialized: boolean expected":null!=t.sessionId&&t.hasOwnProperty("sessionId")&&!n.isString(t.sessionId)?"sessionId: string expected":null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&!n.isString(t.sessionCreatedAt)?"sessionCreatedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectResponse)return t;var e=new r.CollaborativeEditingConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.offset&&(e.offset=t.offset>>>0),null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.initData&&(e.initData=String(t.initData)),null!=t.isInitialized&&(e.isInitialized=Boolean(t.isInitialized)),null!=t.sessionId&&(e.sessionId=String(t.sessionId)),null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.sessionCreatedAt&&(e.sessionCreatedAt=String(t.sessionCreatedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.channel="",s.offset=0,s.version=0,s.initData="",s.isInitialized=!1,s.sessionId="",s.lastOperationId="",s.sessionCreatedAt=""),null!=t.channel&&t.hasOwnProperty("channel")&&(s.channel=t.channel),null!=t.offset&&t.hasOwnProperty("offset")&&(s.offset=t.offset),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.initData&&t.hasOwnProperty("initData")&&(s.initData=t.initData),null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&(s.isInitialized=t.isInitialized),null!=t.sessionId&&t.hasOwnProperty("sessionId")&&(s.sessionId=t.sessionId),null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&(s.sessionCreatedAt=t.sessionCreatedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectResponse"},s}(),r.CollaborativeEditingResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.prototype.lastOperationAcceptedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(8).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(18).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(26).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(42).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(50).string(t.lastOperationId),null!=t.lastOperationAcceptedAt&&Object.hasOwnProperty.call(t,"lastOperationAcceptedAt")&&n.uint32(58).string(t.lastOperationAcceptedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.version=e.uint32();break;case 2:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 3:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:i.lastOperationId=e.string();break;case 7:i.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&!n.isString(t.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingResponse)return t;var e=new r.CollaborativeEditingResponse;if(null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.lastOperationAcceptedAt&&(e.lastOperationAcceptedAt=String(t.lastOperationAcceptedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.version=0,s.lastOperationId="",s.lastOperationAcceptedAt=""),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&(s.lastOperationAcceptedAt=t.lastOperationAcceptedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingResponse"},s}(),r.GetDocumentDetailsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.lastDocumentSessionId="",s.prototype.lastDocumentSessionOperationId="",s.prototype.currentDocumentSessionId="",s.prototype.currentDocumentSessionVersion=0,s.prototype.currentDocumentSessionOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.lastDocumentSessionId&&Object.hasOwnProperty.call(t,"lastDocumentSessionId")&&n.uint32(10).string(t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"lastDocumentSessionOperationId")&&n.uint32(18).string(t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&Object.hasOwnProperty.call(t,"currentDocumentSessionId")&&n.uint32(26).string(t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&Object.hasOwnProperty.call(t,"currentDocumentSessionVersion")&&n.uint32(32).uint32(t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"currentDocumentSessionOperationId")&&n.uint32(42).string(t.currentDocumentSessionOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.lastDocumentSessionId=e.string();break;case 2:i.lastDocumentSessionOperationId=e.string();break;case 3:i.currentDocumentSessionId=e.string();break;case 4:i.currentDocumentSessionVersion=e.uint32();break;case 5:i.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&!n.isString(t.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&!n.isString(t.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&!n.isString(t.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&!n.isInteger(t.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&!n.isString(t.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsResponse)return t;var e=new r.GetDocumentDetailsResponse;return null!=t.lastDocumentSessionId&&(e.lastDocumentSessionId=String(t.lastDocumentSessionId)),null!=t.lastDocumentSessionOperationId&&(e.lastDocumentSessionOperationId=String(t.lastDocumentSessionOperationId)),null!=t.currentDocumentSessionId&&(e.currentDocumentSessionId=String(t.currentDocumentSessionId)),null!=t.currentDocumentSessionVersion&&(e.currentDocumentSessionVersion=t.currentDocumentSessionVersion>>>0),null!=t.currentDocumentSessionOperationId&&(e.currentDocumentSessionOperationId=String(t.currentDocumentSessionOperationId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=t.currentDocumentSessionOperationId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsResponse"},s}(),r.CommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.commentThreadId="",s.prototype.userId="",s.prototype.content="",s.prototype.documentId="",s.prototype.createdAt="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(26).string(t.userId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(34).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(42).string(t.documentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.userId=e.string();break;case 4:i.content=e.string();break;case 5:i.documentId=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content)?"content: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentDescriptor)return t;var e=new r.CommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentDescriptor"},s}(),r.CommentsThreadDescriptor=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(18).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(42).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(58).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(74).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsThreadDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;case 5:i.context=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.deletedAt=e.string();break;case 8:i.attributes=e.string();break;case 9:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsThreadDescriptor)return t;var e=new r.CommentsThreadDescriptor;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsThreadDescriptor"},s}(),r.CommentThreadAddedCommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentThreadAddedCommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentThreadAddedCommentDescriptor)return t;var e=new r.CommentThreadAddedCommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.createdAt=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentThreadAddedCommentDescriptor"},s}(),r.CommentsV2AddCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.content="",s.prototype.documentId="",s.prototype.commentId="",s.prototype.createdAt="",s.prototype.userId="",s.prototype.attributes="",s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(18).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(34).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(42).string(t.createdAt),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(50).string(t.userId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(66).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.content=e.string();break;case 3:i.documentId=e.string();break;case 4:i.commentId=e.string();break;case 5:i.createdAt=e.string();break;case 6:i.userId=e.string();break;case 7:i.attributes=e.string();break;case 8:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentMessage)return t;var e=new r.CommentsV2AddCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentMessage"},s}(),r.CommentsV2AddCommentThreadMessage=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.commentThreadId="",s.prototype.context="",s.prototype.createdAt="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.attributes="",s.prototype.deletedAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(42).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(50).string(t.resolvedBy),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(74).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.context=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.resolvedAt=e.string();break;case 6:i.resolvedBy=e.string();break;case 7:i.attributes=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context))return"context: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt))return"resolvedAt: string expected";if(null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy))return"resolvedBy: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt))return"deletedAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadMessage)return t;var e=new r.CommentsV2AddCommentThreadMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadMessage"},s}(),r.CommentsV2ReopenCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ReopenCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ReopenCommentThreadMessage)return t;var e=new r.CommentsV2ReopenCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ReopenCommentThreadMessage"},s}(),r.CommentsV2ResolveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedBy="",s.prototype.resolvedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(26).string(t.resolvedBy),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedBy=e.string();break;case 4:i.resolvedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadMessage)return t;var e=new r.CommentsV2ResolveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.context="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(34).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(42).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.context=e.string();break;case 4:i.attributes=e.string();break;case 5:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentThreadMessage)return t;var e=new r.CommentsV2UpdateCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.context&&(e.context=String(t.context)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentThreadMessage"},s}(),r.CommentsV2ConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectMessage)return t;var e=new r.CommentsV2ConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectMessage"},s}(),r.CommentsV2GetCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadMessage)return t;var e=new r.CommentsV2GetCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadMessage"},s}(),r.CommentsV2GetDocumentThreadsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsMessage)return t;var e=new r.CommentsV2GetDocumentThreadsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsMessage"},s}(),r.CommentsV2RemoveCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentMessage)return t;var e=new r.CommentsV2RemoveCommentMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentMessage"},s}(),r.CommentsV2RemoveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentThreadMessage)return t;var e=new r.CommentsV2RemoveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.content="",s.prototype.documentId="",s.prototype.attributes="",s.prototype.isAttributesUpdated=!1,s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(26).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(34).string(t.documentId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(42).string(t.attributes),null!=t.isAttributesUpdated&&Object.hasOwnProperty.call(t,"isAttributesUpdated")&&n.uint32(48).bool(t.isAttributesUpdated),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(58).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.content=e.string();break;case 4:i.documentId=e.string();break;case 5:i.attributes=e.string();break;case 6:i.isAttributesUpdated=e.bool();break;case 7:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof t.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentMessage)return t;var e=new r.CommentsV2UpdateCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.isAttributesUpdated&&(e.isAttributesUpdated=Boolean(t.isAttributesUpdated)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=t.isAttributesUpdated),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentMessage"},s}(),r.CommentsV2AddCommentResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentResponse)return t;var e=new r.CommentsV2AddCommentResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentResponse"},s}(),r.CommentsV2AddCommentThreadResponse=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.createdAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentThreadAddedCommentDescriptor.encode(t.comments[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.createdAt=e.string();break;case 3:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentThreadAddedCommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadResponse)return t;var e=new r.CommentsV2AddCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");e.comments[n]=r.CommentThreadAddedCommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentThreadAddedCommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadResponse"},s}(),r.CommentsV2ResolveCommentThreadResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadResponse)return t;var e=new r.CommentsV2ResolveCommentThreadResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadResponse"},s}(),r.CommentsV2ConnectResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(18).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 3:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectResponse)return t;var e=new r.CommentsV2ConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectResponse"},s}(),r.CommentsV2GetCommentThreadResponse=function(){function s(t){if(this.comments=[],this.commentsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.commentsV2=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)n.uint32(18).string(t.comments[s]);if(null!=t.commentsV2&&t.commentsV2.length)for(s=0;s<t.commentsV2.length;++s)r.CommentDescriptor.encode(t.commentsV2[s],n.uint32(26).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(42).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(50).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(58).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(74).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(82).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(e.string());break;case 3:i.commentsV2&&i.commentsV2.length||(i.commentsV2=[]),i.commentsV2.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 4:i.resolvedAt=e.string();break;case 5:i.resolvedBy=e.string();break;case 6:i.context=e.string();break;case 7:i.createdAt=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.attributes=e.string();break;case 10:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e)if(!n.isString(t.comments[e]))return"comments: string[] expected"}if(null!=t.commentsV2&&t.hasOwnProperty("commentsV2")){if(!Array.isArray(t.commentsV2))return"commentsV2: array expected";for(e=0;e<t.commentsV2.length;++e){var s=r.CommentDescriptor.verify(t.commentsV2[e]);if(s)return"commentsV2."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadResponse)return t;var e=new r.CommentsV2GetCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n)e.comments[n]=String(t.comments[n])}if(t.commentsV2){if(!Array.isArray(t.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(e.commentsV2=[],n=0;n<t.commentsV2.length;++n){if("object"!=typeof t.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");e.commentsV2[n]=r.CommentDescriptor.fromObject(t.commentsV2[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[],n.commentsV2=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=t.comments[s]}if(t.commentsV2&&t.commentsV2.length)for(n.commentsV2=[],s=0;s<t.commentsV2.length;++s)n.commentsV2[s]=r.CommentDescriptor.toObject(t.commentsV2[s],e);return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadResponse"},s}(),r.CommentsV2GetDocumentThreadsResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(10).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 2:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsResponse)return t;var e=new r.CommentsV2GetDocumentThreadsResponse;if(t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsResponse"},s}(),r.KeyValueDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.key="",s.prototype.value="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.key&&Object.hasOwnProperty.call(t,"key")&&n.uint32(10).string(t.key),null!=t.value&&Object.hasOwnProperty.call(t,"value")&&n.uint32(18).string(t.value),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.KeyValueDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.key&&t.hasOwnProperty("key")&&!n.isString(t.key)?"key: string expected":null!=t.value&&t.hasOwnProperty("value")&&!n.isString(t.value)?"value: string expected":null},s.fromObject=function(t){if(t instanceof r.KeyValueDescriptor)return t;var e=new r.KeyValueDescriptor;return null!=t.key&&(e.key=String(t.key)),null!=t.value&&(e.value=String(t.value)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=""),null!=t.key&&t.hasOwnProperty("key")&&(n.key=t.key),null!=t.value&&t.hasOwnProperty("value")&&(n.value=t.value),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/KeyValueDescriptor"},s}(),r.IsEditorBundleUploadedMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.bundleVersion="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(10).string(t.bundleVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.bundleVersion=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null},s.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedMessage)return t;var e=new r.IsEditorBundleUploadedMessage;return null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.bundleVersion=""),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedMessage"},s}(),r.IsEditorBundleUploadedResponse=function(){function n(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return n.prototype.isUploaded=!1,n.create=function(t){return new n(t)},n.encode=function(t,n){return n||(n=e.create()),null!=t.isUploaded&&Object.hasOwnProperty.call(t,"isUploaded")&&n.uint32(8).bool(t.isUploaded),n},n.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},n.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.isUploaded=e.bool():e.skipType(7&a)}return i},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&"boolean"!=typeof t.isUploaded?"isUploaded: boolean expected":null},n.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedResponse)return t;var e=new r.IsEditorBundleUploadedResponse;return null!=t.isUploaded&&(e.isUploaded=Boolean(t.isUploaded)),e},n.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.isUploaded=!1),null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&(n.isUploaded=t.isUploaded),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},n.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedResponse"},n}(),r.RevisionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionDescriptor)return t;var e=new r.RevisionDescriptor;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionDescriptor"},s}(),r.RevisionHistoryConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectMessage)return t;var e=new r.RevisionHistoryConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectMessage"},s}(),r.RevisionHistoryGetRevisionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.revisionId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(18).string(t.revisionId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.revisionId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionMessage)return t;var e=new r.RevisionHistoryGetRevisionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.revisionId&&(e.revisionId=String(t.revisionId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.revisionId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionMessage"},s}(),r.RevisionHistoryReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryReconnectMessage)return t;var e=new r.RevisionHistoryReconnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryReconnectMessage"},s}(),r.RevisionHistoryUpdateRevisionsMessage=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsMessage)return t;var e=new r.RevisionHistoryUpdateRevisionsMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsMessage"},s}(),r.RevisionHistoryConnectResponse=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectResponse)return t;var e=new r.RevisionHistoryConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.channel="",n.requestId=0),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectResponse"},s}(),r.RevisionHistoryGetRevisionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionResponse)return t;var e=new r.RevisionHistoryGetRevisionResponse;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionResponse"},s}(),r.RevisionHistoryUpdateRevisionsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(8).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.requestId=e.uint32():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsResponse)return t;var e=new r.RevisionHistoryUpdateRevisionsResponse;return null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.requestId=0),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsResponse"},s}(),r.SessionsSocketDescriptor=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.session="",s.prototype.user="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.session&&Object.hasOwnProperty.call(t,"session")&&n.uint32(10).string(t.session),null!=t.user&&Object.hasOwnProperty.call(t,"user")&&n.uint32(18).string(t.user),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsSocketDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.session=e.string();break;case 2:i.user=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.session&&t.hasOwnProperty("session")&&!n.isString(t.session))return"session: string expected";if(null!=t.user&&t.hasOwnProperty("user")&&!n.isString(t.user))return"user: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SessionsSocketDescriptor)return t;var e=new r.SessionsSocketDescriptor;if(null!=t.session&&(e.session=String(t.session)),null!=t.user&&(e.user=String(t.user)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.session="",n.user="",n.role=""),null!=t.session&&t.hasOwnProperty("session")&&(n.session=t.session),null!=t.user&&t.hasOwnProperty("user")&&(n.user=t.user),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsSocketDescriptor"},s}(),r.SessionsConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.sessionType=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.sessionType&&Object.hasOwnProperty.call(t,"sessionType")&&n.uint32(16).uint32(t.sessionType),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.sessionType=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.sessionType&&t.hasOwnProperty("sessionType")&&!n.isInteger(t.sessionType)?"sessionType: integer expected":null},s.fromObject=function(t){if(t instanceof r.SessionsConnectMessage)return t;var e=new r.SessionsConnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.sessionType&&(e.sessionType=t.sessionType>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.sessionType=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.sessionType&&t.hasOwnProperty("sessionType")&&(n.sessionType=t.sessionType),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectMessage"},s}(),r.SocketConnectMessage=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.userId="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(18).string(t.userId),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.userId=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SocketConnectMessage)return t;var e=new r.SocketConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.id="",n.userId="",n.role=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketConnectMessage"},s}(),r.SocketDisconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketDisconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.SocketDisconnectMessage)return t;var e=new r.SocketDisconnectMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketDisconnectMessage"},s}(),r.SessionsConnectResponse=function(){function s(t){if(this.sockets=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.sockets=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.sockets&&t.sockets.length)for(var s=0;s<t.sockets.length;++s)r.SessionsSocketDescriptor.encode(t.sockets[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.sockets&&i.sockets.length||(i.sockets=[]),i.sockets.push(r.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.sockets&&t.hasOwnProperty("sockets")){if(!Array.isArray(t.sockets))return"sockets: array expected";for(var e=0;e<t.sockets.length;++e){var s=r.SessionsSocketDescriptor.verify(t.sockets[e]);if(s)return"sockets."+s}}return null},s.fromObject=function(t){if(t instanceof r.SessionsConnectResponse)return t;var e=new r.SessionsConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.sockets){if(!Array.isArray(t.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");e.sockets=[];for(var n=0;n<t.sockets.length;++n){if("object"!=typeof t.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");e.sockets[n]=r.SessionsSocketDescriptor.fromObject(t.sockets[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.sockets=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.sockets&&t.sockets.length){n.sockets=[];for(var s=0;s<t.sockets.length;++s)n.sockets[s]=r.SessionsSocketDescriptor.toObject(t.sockets[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectResponse"},s}(),r.SuggestionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SuggestionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.SuggestionDescriptor)return t;var e=new r.SuggestionDescriptor;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SuggestionDescriptor"},s}(),r.TrackChangesAddSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.type="",s.prototype.data="",s.prototype.originalSuggestionId="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).string(t.data),null!=t.originalSuggestionId&&Object.hasOwnProperty.call(t,"originalSuggestionId")&&n.uint32(42).string(t.originalSuggestionId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.type=e.string();break;case 4:i.data=e.string();break;case 5:i.originalSuggestionId=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&!n.isString(t.originalSuggestionId)?"originalSuggestionId: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionMessage)return t;var e=new r.TrackChangesAddSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.type&&(e.type=String(t.type)),null!=t.data&&(e.data=String(t.data)),null!=t.originalSuggestionId&&(e.originalSuggestionId=String(t.originalSuggestionId)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=t.originalSuggestionId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionMessage"},s}(),r.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.prototype.documentId="",s.prototype.state="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(26).string(t.state),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string());break;case 2:i.documentId=e.string();break;case 3:i.state=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesBatchUpdateSuggestionsStateMessage)return t;var e=new r.TrackChangesBatchUpdateSuggestionsStateMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.state&&(e.state=String(t.state)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),e.defaults&&(n.documentId="",n.state=""),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesBatchUpdateSuggestionsStateMessage"},s}(),r.TrackChangesConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectMessage)return t;var e=new r.TrackChangesConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectMessage"},s}(),r.TrackChangesGetAllSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionMessage)return t;var e=new r.TrackChangesGetAllSuggestionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionMessage"},s}(),r.TrackChangesGetSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionMessage)return t;var e=new r.TrackChangesGetSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionMessage"},s}(),r.TrackChangesUpdateSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.hasComments=!1,s.prototype.isHasCommentsModified=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(24).bool(t.hasComments),null!=t.isHasCommentsModified&&Object.hasOwnProperty.call(t,"isHasCommentsModified")&&n.uint32(32).bool(t.isHasCommentsModified),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(42).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesUpdateSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.hasComments=e.bool();break;case 4:i.isHasCommentsModified=e.bool();break;case 5:i.state=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof t.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesUpdateSuggestionMessage)return t;var e=new r.TrackChangesUpdateSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.isHasCommentsModified&&(e.isHasCommentsModified=Boolean(t.isHasCommentsModified)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=t.isHasCommentsModified),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesUpdateSuggestionMessage"},s}(),r.TrackChangesAddSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionResponse)return t;var e=new r.TrackChangesAddSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionResponse"},s}(),r.TrackChangesConnectResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(18).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 3:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectResponse)return t;var e=new r.TrackChangesConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectResponse"},s}(),r.TrackChangesGetAllSuggestionsResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(10).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 2:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionsResponse)return t;var e=new r.TrackChangesGetAllSuggestionsResponse;if(t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionsResponse"},s}(),r.TrackChangesGetSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionResponse)return t;var e=new r.TrackChangesGetSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionResponse"},s}(),r.UserDescriptor=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.UserDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.UserDescriptor)return t;var e=new r.UserDescriptor;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".UserDescriptor.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/UserDescriptor"},s}(),r.GetManyUsersMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string())):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersMessage)return t;var e=new r.GetManyUsersMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersMessage"},s}(),r.GetUserMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.GetUserMessage)return t;var e=new r.GetUserMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserMessage"},s}(),r.GetManyUsersResponse=function(){function s(t){if(this.users=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.users=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.users&&t.users.length)for(var s=0;s<t.users.length;++s)r.UserDescriptor.encode(t.users[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.users&&i.users.length||(i.users=[]),i.users.push(r.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.users&&t.hasOwnProperty("users")){if(!Array.isArray(t.users))return"users: array expected";for(var e=0;e<t.users.length;++e){var n=r.UserDescriptor.verify(t.users[e]);if(n)return"users."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersResponse)return t;var e=new r.GetManyUsersResponse;if(t.users){if(!Array.isArray(t.users))throw TypeError(".GetManyUsersResponse.users: array expected");e.users=[];for(var n=0;n<t.users.length;++n){if("object"!=typeof t.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");e.users[n]=r.UserDescriptor.fromObject(t.users[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.users=[]),t.users&&t.users.length){n.users=[];for(var s=0;s<t.users.length;++s)n.users[s]=r.UserDescriptor.toObject(t.users[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersResponse"},s}(),r.GetUserResponse=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetUserResponse)return t;var e=new r.GetUserResponse;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".GetUserResponse.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserResponse"},s}(),r.ChannelMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.socketId="",s.prototype.data=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.socketId&&Object.hasOwnProperty.call(t,"socketId")&&n.uint32(18).string(t.socketId),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(26).bytes(t.data),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ChannelMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.socketId=e.string();break;case 3:i.data=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.socketId&&t.hasOwnProperty("socketId")&&!n.isString(t.socketId)?"socketId: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ChannelMessage)return t;var e=new r.ChannelMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.socketId&&(e.socketId=String(t.socketId)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.socketId="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.socketId&&t.hasOwnProperty("socketId")&&(r.socketId=t.socketId),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ChannelMessage"},s}(),r.BytesBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=n.newBuffer([]),s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).bytes(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.BytesBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.bytes();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.BytesBytesPacketDataMessage)return t;var e=new r.BytesBytesPacketDataMessage;return null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/BytesBytesPacketDataMessage"},s}(),r.NumberBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.NumberBytesPacketDataMessage)return t;var e=new r.NumberBytesPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data=0,e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberBytesPacketDataMessage"},s}(),r.NumberNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.NumberNumberPacketDataMessage)return t;var e=new r.NumberNumberPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberNumberPacketDataMessage"},s}(),r.NumberObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberObjectPacketDataMessage)return t;var e=new r.NumberObjectPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberObjectPacketDataMessage"},s}(),r.NumberStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberStringPacketDataMessage)return t;var e=new r.NumberStringPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberStringPacketDataMessage"},s}(),r.ObjectBufferPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectBufferPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ObjectBufferPacketDataMessage)return t;var e=new r.ObjectBufferPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectBufferPacketDataMessage"},s}(),r.ObjectObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.ObjectObjectPacketDataMessage)return t;var e=new r.ObjectObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectObjectPacketDataMessage"},s}(),r.PacketMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.id=0,s.prototype.nsp="",s.prototype.data=n.newBuffer([]),s.prototype.options=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(16).uint32(t.id),null!=t.nsp&&Object.hasOwnProperty.call(t,"nsp")&&n.uint32(26).string(t.nsp),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).bytes(t.data),null!=t.options&&Object.hasOwnProperty.call(t,"options")&&n.uint32(42).bytes(t.options),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.id=e.uint32();break;case 3:i.nsp=e.string();break;case 4:i.data=e.bytes();break;case 5:i.options=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isInteger(t.id)?"id: integer expected":null!=t.nsp&&t.hasOwnProperty("nsp")&&!n.isString(t.nsp)?"nsp: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.options&&t.hasOwnProperty("options")&&!(t.options&&"number"==typeof t.options.length||n.isString(t.options))?"options: buffer expected":null},s.fromObject=function(t){if(t instanceof r.PacketMessage)return t;var e=new r.PacketMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.id&&(e.id=t.id>>>0),null!=t.nsp&&(e.nsp=String(t.nsp)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.options&&("string"==typeof t.options?n.base64.decode(t.options,e.options=n.newBuffer(n.base64.length(t.options)),0):t.options.length>=0&&(e.options=t.options)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.id=0,r.nsp="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.options="":(r.options=[],e.bytes!==Array&&(r.options=n.newBuffer(r.options)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.nsp&&t.hasOwnProperty("nsp")&&(r.nsp=t.nsp),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.options&&t.hasOwnProperty("options")&&(r.options=e.bytes===String?n.base64.encode(t.options,0,t.options.length):e.bytes===Array?Array.prototype.slice.call(t.options):t.options),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketMessage"},s}(),r.PacketOptionsMessage=function(){function s(t){if(this.rooms=[],this.except=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.flags="",s.prototype.rooms=n.emptyArray,s.prototype.except=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.flags&&Object.hasOwnProperty.call(t,"flags")&&n.uint32(10).string(t.flags),null!=t.rooms&&t.rooms.length)for(var r=0;r<t.rooms.length;++r)n.uint32(18).string(t.rooms[r]);if(null!=t.except&&t.except.length)for(r=0;r<t.except.length;++r)n.uint32(26).string(t.except[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketOptionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.flags=e.string();break;case 2:i.rooms&&i.rooms.length||(i.rooms=[]),i.rooms.push(e.string());break;case 3:i.except&&i.except.length||(i.except=[]),i.except.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.flags&&t.hasOwnProperty("flags")&&!n.isString(t.flags))return"flags: string expected";if(null!=t.rooms&&t.hasOwnProperty("rooms")){if(!Array.isArray(t.rooms))return"rooms: array expected";for(var e=0;e<t.rooms.length;++e)if(!n.isString(t.rooms[e]))return"rooms: string[] expected"}if(null!=t.except&&t.hasOwnProperty("except")){if(!Array.isArray(t.except))return"except: array expected";for(e=0;e<t.except.length;++e)if(!n.isString(t.except[e]))return"except: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.PacketOptionsMessage)return t;var e=new r.PacketOptionsMessage;if(null!=t.flags&&(e.flags=String(t.flags)),t.rooms){if(!Array.isArray(t.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");e.rooms=[];for(var n=0;n<t.rooms.length;++n)e.rooms[n]=String(t.rooms[n])}if(t.except){if(!Array.isArray(t.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(e.except=[],n=0;n<t.except.length;++n)e.except[n]=String(t.except[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.rooms=[],n.except=[]),e.defaults&&(n.flags=""),null!=t.flags&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.rooms&&t.rooms.length){n.rooms=[];for(var r=0;r<t.rooms.length;++r)n.rooms[r]=t.rooms[r]}if(t.except&&t.except.length)for(n.except=[],r=0;r<t.except.length;++r)n.except[r]=t.except[r];return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketOptionsMessage"},s}(),r.StringBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.StringBytesPacketDataMessage)return t;var e=new r.StringBytesPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringBytesPacketDataMessage"},s}(),r.StringNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.StringNumberPacketDataMessage)return t;var e=new r.StringNumberPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringNumberPacketDataMessage"},s}(),r.StringObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringObjectPacketDataMessage)return t;var e=new r.StringObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringObjectPacketDataMessage"},s}(),r.StringStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringStringPacketDataMessage)return t;var e=new r.StringStringPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringStringPacketDataMessage"},s}(),r})();class l{static decode(t,e){const n=p(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...n})}static encode(t){const e=p(t.constructor),n=t.toJSON(),r=e.verify(n);if(r)throw Error(r);return e.encode(e.create(n)).finish()}}function p(t){return u[t.DESCRIPTOR_NAME]}class h extends i{ids;static TYPE="22";static READABLE_TYPE_NAME="getManyUsers";static DESCRIPTOR_NAME="GetManyUsersMessage";static DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}};constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new h(t.ids)}}class f extends i{users;static DESCRIPTOR_NAME="GetManyUsersResponse";static DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}};constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(m)}}static fromJSON(t){return new f(t.users.map(y))}}function m(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function y(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class g{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new g(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(g._SERVICE,a.TYPE,l.encode(n)),r=l.decode(e,c);return new g(r.attributes)}catch(t){return new g({id:e})}}static async getMany(t,e){const n=new h(e);try{const e=await t._sendRequest(g._SERVICE,h.TYPE,l.encode(n));return l.decode(e,f).users.map(t=>new g(t))}catch(t){return e.map(t=>new g({id:t}))}}}const b=g,I=Object.create(null);I.open="0",I.close="1",I.ping="2",I.pong="3",I.message="4",I.upgrade="5",I.noop="6";const O=Object.create(null);Object.keys(I).forEach(t=>{O[I[t]]=t});const v={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),S="function"==typeof ArrayBuffer,k=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,A=({type:t,data:e},n,r)=>w&&e instanceof Blob?n?r(e):T(e,r):S&&(e instanceof ArrayBuffer||k(e))?n?r(e):T(new Blob([e]),r):r(I[t]+(e||"")),T=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let C;const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)E[P.charCodeAt(t)]=t;const j="function"==typeof ArrayBuffer,D=(t,e)=>{if("string"!=typeof t)return{type:"message",data:R(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:x(t.substring(1),e)};return O[n]?t.length>1?{type:O[n],data:t.substring(1)}:{type:O[n]}:v},x=(t,e)=>{if(j){const n=(t=>{let e,n,r,s,o,i=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);const d=new ArrayBuffer(i),u=new Uint8Array(d);for(e=0;e<a;e+=4)n=E[t.charCodeAt(e)],r=E[t.charCodeAt(e+1)],s=E[t.charCodeAt(e+2)],o=E[t.charCodeAt(e+3)],u[c++]=n<<2|r>>4,u[c++]=(15&r)<<4|s>>2,u[c++]=(3&s)<<6|63&o;return d})(t);return R(n,e)}return{base64:!0,data:t}},R=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,N=String.fromCharCode(30);function V(){return new TransformStream({transform(t,e){!function(t,e){w&&t.data instanceof Blob?t.data.arrayBuffer().then(_).then(e):S&&(t.data instanceof ArrayBuffer||k(t.data))?e(_(t.data)):A(t,!1,t=>{C||(C=new TextEncoder),e(C.encode(t))})}(t,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(s[0]|=128),e.enqueue(s),e.enqueue(n)})}})}let M;function B(t){return t.reduce((t,e)=>t+e.length,0)}function U(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function J(t){if(t)return function(t){for(var e in J.prototype)t[e]=J.prototype[e];return t}(t)}J.prototype.on=J.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},J.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},J.prototype.off=J.prototype.removeListener=J.prototype.removeAllListeners=J.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},J.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,e)}return this},J.prototype.emitReserved=J.prototype.emit,J.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},J.prototype.hasListeners=function(t){return!!this.listeners(t).length};const q="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function L(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const G=q.setTimeout,H=q.clearTimeout;function Y(t,e){e.useNativeTimers?(t.setTimeoutFn=G.bind(q),t.clearTimeoutFn=H.bind(q)):(t.setTimeoutFn=q.setTimeout.bind(q),t.clearTimeoutFn=q.clearTimeout.bind(q))}function F(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}class z extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class K extends J{constructor(t){super(),this.writable=!1,Y(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,n){return super.emitReserved("error",new z(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=D(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const W="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Q={};let X,Z=0,$=0;function tt(t){let e="";do{e=W[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function et(){const t=tt(+new Date);return t!==X?(Z=0,X=t):t+"."+tt(Z++)}for(;$<64;$++)Q[W[$]]=$;let nt=!1;try{nt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const rt=nt;function st(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||rt))return new XMLHttpRequest}catch(t){}if(!e)try{return new(q[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function ot(){}const it=null!=new st({xdomain:!1}).responseType;class at extends J{constructor(t,e){super(),Y(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=L(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new st(e);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof n.status?n.status:0)},0))},n.send(this.data)}catch(t){return void this.setTimeoutFn(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=at.requestsCount++,at.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=ot,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete at.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(at.requestsCount=0,at.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",ct);else if("function"==typeof addEventListener){addEventListener("onpagehide"in q?"pagehide":"unload",ct,!1)}function ct(){for(let t in at.requests)at.requests.hasOwnProperty(t)&&at.requests[t].abort()}const dt="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),ut=q.WebSocket||q.MozWebSocket,lt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const pt={websocket:class extends K{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=lt?{}:L(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=lt?new ut(t,e,n):e?new ut(t,e):new ut(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;A(n,this.supportsBinary,t=>{try{this.ws.send(t)}catch(t){}r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!ut}},webtransport:class extends K{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const e=function(t,e){M||(M=new TextDecoder);const n=[];let r=0,s=-1,o=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(0===r){if(B(n)<1)break;const t=U(n,1);o=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(B(n)<2)break;const t=U(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(B(n)<8)break;const t=U(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(v);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(B(n)<s)break;const t=U(n,s);a.enqueue(D(o?t:M.decode(t),e)),r=0}if(0===s||s>t){a.enqueue(v);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=V();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const s=()=>{n.read().then(({done:t,value:e})=>{t||(this.onPacket(e),s())}).catch(t=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this.writer.write(n).then(()=>{r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends K{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}const e=t&&t.forceBase64;this.supportsBinary=it&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const n=t.split(N),r=[];for(let t=0;t<n.length;t++){const s=D(n[t],e);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((t,o)=>{A(t,!1,t=>{r[o]=t,++s===n&&e(r.join(N))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new at(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}},ht=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ft=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mt(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=ht.exec(t||""),o={},i=14;for(;i--;)o[ft[i]]=s[i]||"";return-1!=n&&-1!=r&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,r){e&&(n[e]=r)}),n}(0,o.query),o}class yt extends J{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=mt(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=mt(e.host).host),Y(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new pt[t](n)}open(){let t;if(this.opts.rememberUpgrade&&yt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;yt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;yt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(d(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function s(){n||(n=!0,d(),e.close(),e=null)}const o=t=>{const n=new Error("probe error: "+t);n.transport=e.name,s(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&s()}const d=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",o),e.once("close",i),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onOpen(){if(this.readyState="open",yt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=F(n)),e>0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:t,data:e,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){yt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}yt.protocol=4;yt.protocol;const gt="function"==typeof ArrayBuffer,bt=Object.prototype.toString,It="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),Ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function vt(t){return gt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||It&&t instanceof Blob||Ot&&t instanceof File}function wt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(wt(t[e]))return!0;return!1}if(vt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return wt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&wt(t[e]))return!0;return!1}function St(t){const e=[],n=t.data,r=t;return r.data=kt(n,e),r.attachments=e.length,{packet:r,buffers:e}}function kt(t,e){if(!t)return t;if(vt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=kt(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=kt(t[r],e));return n}return t}function At(t,e){return t.data=Tt(t.data,e),delete t.attachments,t}function Tt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Tt(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Tt(t[n],e));return t}const _t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ct=5;var Pt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Pt||(Pt={}));class Et{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!wt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=St(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function jt(t){return"[object Object]"===Object.prototype.toString.call(t)}class Dt extends J{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===Pt.BINARY_EVENT;n||e.type===Pt.BINARY_ACK?(e.type=n?Pt.EVENT:Pt.ACK,this.reconstructor=new xt(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!vt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===Pt[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(r,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!Dt.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return jt(e);case Pt.DISCONNECT:return void 0===e;case Pt.CONNECT_ERROR:return"string"==typeof e||jt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===_t.indexOf(e[0]));case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=At(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Rt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Nt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vt extends J{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Rt(t,"open",this.onopen.bind(this)),Rt(t,"packet",this.onpacket.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Nt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:Pt.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(s),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,s)=>{e.push((t,e)=>n?t?s(t):r(e):r(t)),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,e.packet({type:Pt.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Mt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},Mt.prototype.reset=function(){this.attempts=0},Mt.prototype.setMin=function(t){this.ms=t},Mt.prototype.setMax=function(t){this.max=t},Mt.prototype.setJitter=function(t){this.jitter=t};class Bt extends J{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,Y(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Mt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=e;const s=n.parser||t;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new yt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Rt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){dt(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Vt(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ut={};function Jt(t,e){"object"==typeof t&&(e=t,t=void 0);const n=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=mt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Ut[s]&&o in Ut[s].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||i?a=new Bt(r,e):(Ut[s]||(Ut[s]=new Bt(r,e)),a=Ut[s]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}Object.assign(Jt,{Manager:Bt,Socket:Vt,io:Jt,connect:Jt});var qt=__webpack_require__(337);class Lt extends i{type;socketId;data;static DESCRIPTOR_NAME="ChannelMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}};constructor(t,e,n){super(),this.type=t,this.socketId=e,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new Lt(t.type,t.socketId,t.data)}}const Gt=class extends((0,n.EmitterMixin)()){_channelName;_wsGateway;_socket;constructor(t,e,n){super(),this._channelName=t,this._wsGateway=e,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let n="";return e&&(n+="all:"),n+="event",t&&(n+=":"+t),n}_subscribeToChannel(){this._socket.on(this._channelName,t=>{const e=l.decode(t,Lt);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)})}};class Ht extends Error{context;code;data;constructor(t,e,n=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new Ht(function(t){let e="cloud-services-error: "+t.message;return t.data&&(e+="\nError data: "+JSON.stringify(t.data)),t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Yt extends Error{code;traceId;data;constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new Yt(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Ft extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new Ft(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const zt=(()=>!("undefined"==typeof process||!process.versions?.node))(),Kt=1,Wt=2,Qt=3,Xt=4;class Zt{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if(Zt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Qt:Xt}static isBuffer(t){return zt&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class $t extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class te extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Kt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new te(t.data,t.data1)}static create(t,e){return new te(t,e)}}class ee extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Kt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Kt,Kt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Xt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new re(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new re(t,e)}}class se extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Xt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Xt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Kt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ie(t,e)}}class ae extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ae(t.data,t.data1)}static create(t,e){return new ae(t,e)}}class ce extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Qt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}class ue extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Wt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}const le=(()=>[te,ee,ne,re,se,oe,ie,ae,ce,de,ue].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class pe extends i{type;data;id;nsp;options;static TYPE=10;static DESCRIPTOR_NAME="PacketMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}};constructor(t,e,n,r="/",s){super(),this.type=t,this.data=e,this.id=n,this.nsp=r,this.options=s??new Ft}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=l.encode(this.options),e=l.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new pe(t.type-10*e,l.decode(t.data,le[e]),t.id,t.nsp,t.options?l.decode(t.options,Ft):new Ft)}static create(t,e={}){const n=Zt.getPacketType(Zt.getType(t.data[0]),Zt.getType(t.data[1]??t.data[0]));return new pe(t.type,le[n].create(t.data[0],t.data[1]),t.id,t.nsp,new Ft(e.flags,e.rooms,e.except))}}class he{encode(t,e,n,r="/",s={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const o={type:t,data:e,id:n,nsp:r};return l.encode(pe.create(o,s))}decode(t){const e=l.decode(t,pe);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}const fe=(()=>[Pt.EVENT,Pt.ACK,Pt.BINARY_ACK,Pt.BINARY_EVENT])();class me extends Et{_packetParser;constructor(t){super(),this._packetParser=t??new he}encode(t){if(fe.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}class ye extends Dt{_packetParser;constructor(t){super(),this._packetParser=t??new he}add(t){if(!Zt.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class ge{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new Ht("Request timeout.",this._context)),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}class be{_context;_requests=new Set;constructor(t){this._context=t}async send(t,e=45e3){const n=this._createRequest(e);try{return t(n),await n.promise}finally{this._finishRequest(n)}}errorAll(t){for(const e of this._requests)e.error(t)}waitForAllRequests(t=45e3){return this._waitForRequests(t)}_createRequest(t){const e=new ge(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Ie={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class Oe extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Ie.DISCONNECTED)();static STATE_CONNECTING=(()=>Ie.CONNECTING)();static STATE_CONNECTED=(()=>Ie.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??Jt,this._userFactory=s??b.get,this._requestsManager=new be(this),this._channels=new Map,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=qt(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",Ie.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",async(t,e,n)=>{if(this._debugEvent("ws-gw:change:state",n),n!==Oe.STATE_CONNECTED){if(n===Oe.STATE_DISCONNECTED)return this._requestsManager.errorAll(new Ht("Not connected.",this))}else try{this.me=await this._userFactory.call(b,this,this._socketAuth?.userId)}catch(t){}},{priority:Oe._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",(t,e)=>{this._options.onError?this._options.onError(e):console.error(e)})}get sessionId(){return this.socketId}waitForAllRequests(t){return this._requestsManager.waitForAllRequests(t)}disconnect(){this.state!==Ie.DISCONNECTED&&(this._socket?.disconnect(),this._socket=void 0,this.state=Ie.DISCONNECTED)}async reconnect(){this._socket||this.state!==Ie.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",n={},r=Jt,s=b.get){const o=new Oe(e,t,n,r,s);return await o._connect(),o}_sendRequest(t,e,n){if(!t)throw new Ht("`serviceName` must be provided.",this);if(this.state!==Oe.STATE_CONNECTED)throw new Ht("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new Ht("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=t,s[1]=parseInt(e),s.set(n,2),this._emit(1,s)}_getChannel(t,e){const n=""+t+e;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new Gt(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise((t,e)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(e)}),n.once("connect",async()=>{this._debugEvent("once-connect");try{await this._onConnect(),t()}catch(t){e(t)}}),n.connect()})}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),e=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,n=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",r=this._connectionProvider(e,{parser:{Encoder:me,Decoder:ye},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Ie.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Ie.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(Yt.fromPublicError(t));r.response(e)})},this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=Ie.CONNECTED;const t=async(t,e,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",()=>{this._token.off("change:value",t)})}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=Ie.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(t,e){if(!this._isDebugModeEnabled())return;const n=void 0!==e?", data: "+e:"";console.info((new Date).toLocaleString()+" "+t+n)}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(Ht.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:t}){this._removeAuthData(),this.fire("error",Yt.fromPublicError(t))}async _authenticate(t){try{this._debugEvent("authenticate:start");const e=await this._emit(2,{token:t});this._debugEvent("authenticate:success","envId: "+e.environmentId+", userId: "+e.userId),this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._debugEvent("authenticate:error",t.message),this._removeAuthData(),t}}_isDebugModeEnabled(){return!!n.global.window.localStorage&&"true"===(n.global.window.localStorage.getItem("csClientDebugMode")??"false").toLowerCase()}}const ve=Oe;class we extends i{bundleVersion;static TYPE="131";static READABLE_TYPE_NAME="isEditorBundleUploaded";static DESCRIPTOR_NAME="IsEditorBundleUploadedMessage";static DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}};constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new we(t.bundleVersion)}}class Se extends i{isUploaded;static DESCRIPTOR_NAME="IsEditorBundleUploadedResponse";static DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}};constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new Se(t.isUploaded)}}class ke extends((0,n.EmitterMixin)()){static _SERVICE=13;static async isBundleUploaded(t,e){const n=new we(e);if(t.state!==Ie.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(ke._SERVICE,we.TYPE,l.encode(n));return l.decode(r,Se).isUploaded}}const Ae=ke;class Te extends i{documentId;revisionId;static TYPE="123";static READABLE_TYPE_NAME="getRevision";static DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new Te(t.documentId,t.revisionId)}}class _e extends o{static DESCRIPTOR_NAME="RevisionDescriptor";static DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}};static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}class Ce extends i{revisionId;name;creatorId;authorsIds;createdAt;diffData;attributes;fromVersion;toVersion;isEmptyCurrent;static DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse";static DESCRIPTOR=(()=>_e.DESCRIPTOR)();constructor(t,e,n,r,s,o,i,a,c,d){super(),this.revisionId=t,this.name=e,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=d}toJSON(){return _e.toJSON(this)}toObject(){return _e.toObject(this)}static create(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}class Pe extends i{documentId;requestId;revisions;static TYPE="124";static READABLE_TYPE_NAME="updateRevisions";static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.documentId=t,this.requestId=e,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static create(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.create))}static fromJSON(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.fromJSON))}}class Ee extends i{requestId;static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse";static DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}};constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new Ee(t.requestId)}}class je extends i{documentId;static TYPE="121";static READABLE_TYPE_NAME="connectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new je(t.documentId)}}class De extends i{channel;requestId;revisions;static DESCRIPTOR_NAME="RevisionHistoryConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.channel=t,this.requestId=e,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static fromJSON(t){return new De(t.channel,t.requestId,t.revisions.map(_e.fromJSON))}}class xe extends i{documentId;requestId;static TYPE="122";static READABLE_TYPE_NAME="reconnectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryReconnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}};constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new xe(t.documentId,t.requestId)}}class Re extends Ht{constructor(t,e){super(t+" Service is not connected.",e)}}class Ne extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=12;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new je(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(t,e){if(this.isConnected)throw new Ht("Cannot reconnect to already connected service.",t);return this._connect(t,new xe(this._documentId,e))}async updateRevisions(t,e){const n=Pe.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(Pe.TYPE,n),{requestId:s}=l.decode(r,Ee);return s}async getRevision(t){const e=new Te(this._documentId,t),n=await this._sendRequest(Te.TYPE,e);return l.decode(n,Ce).toObject()}async _connect(t,e){if(t.state!==Ie.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(12,e.constructor.TYPE,l.encode(e)),{channel:r,requestId:s,revisions:o}=l.decode(n,De).toObject();return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:s}}_connectToChannel(t,e){this._channel=t._getChannel(Ne._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Pe.TYPE),(t,e)=>{const{documentId:n,requestId:r,revisions:s}=l.decode(e,Pe).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Revision History",this);return this._wsGateway._sendRequest(12,t,l.encode(e))}}const Ve=Ne;class Me extends i{id;documentId;type;data;originalSuggestionId;attributes;static TYPE="101";static READABLE_TYPE_NAME="addSuggestion";static DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r={},s=null,o=null){super(),this.id=t,this.documentId=e,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Me(t.id,t.documentId,t.type,JSON.parse(t.data),t.originalSuggestionId??null,t.attributes?JSON.parse(t.attributes):null)}}class Be extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt?.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Be(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Ue extends i{id;documentId;static TYPE="103";static READABLE_TYPE_NAME="getSuggestion";static DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new Ue(t.id,t.documentId)}}class Je extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Je(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class qe extends i{documentId;static TYPE="102";static READABLE_TYPE_NAME="getAllSuggestions";static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new qe(t.documentId)}}class Le extends o{static DESCRIPTOR_NAME="SuggestionDescriptor";static DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}};static toJSON(t){return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}class Ge extends i{_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse";static DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=e?.length?e:t}toJSON(){return{suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Ge(t.suggestions?.map(He),t.suggestionsV2?.map(Le.fromJSON))}}function He(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}class Ye extends i{id;documentId;hasComments;isHasCommentsModified;state;attributes;static TYPE="104";static READABLE_TYPE_NAME="updateSuggestion";static DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r,s,o=null){super(),this.id=t,this.documentId=e,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Ye(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}class Fe extends i{documentId;static TYPE="105";static READABLE_TYPE_NAME="connectToSuggestions";static DESCRIPTOR_NAME="TrackChangesConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Fe(t.documentId)}}class ze extends i{channel;_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=n,this.suggestions=n?.length?n:e}toJSON(){return{channel:this.channel,suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new ze(t.channel,t.suggestions?.map(t=>JSON.parse(t)),t.suggestionsV2?.map(Le.fromJSON))}}class Ke extends i{ids;documentId;state;static TYPE="106";static READABLE_TYPE_NAME="batchUpdateSuggestionsState";static DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage";static DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}};constructor(t,e,n){super(),this.ids=t,this.documentId=e,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new Ke(t.ids,t.documentId,t.state)}}class We extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=10;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const e=new Fe(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(10,Fe.TYPE,l.encode(e)),r=l.decode(n,ze);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,n,r=null,s){const o=new Me(t,this._documentId,e,n,r,s),i=await this._sendRequest(Me.TYPE,o);return l.decode(i,Be)}async get(t,e=1){const n=new Ue(t,this._documentId);try{const t=await this._sendRequest(Ue.TYPE,n);return l.decode(t,Je)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Yt.fromPublicError(n)}var r}async getAll(){const t=new qe(this._documentId),e=await this._sendRequest(qe.TYPE,t),{suggestions:n}=l.decode(e,Ge);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new Ye(t,this._documentId,n,o,r,s);await this._sendRequest(Ye.TYPE,i)}async batchUpdateState(t){const e=new Ke(t.ids,this._documentId,t.state);await this._sendRequest(Ke.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(We._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Ye.TYPE),(t,e)=>{const n=l.decode(e,Ye);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Track Changes",this);return this._wsGateway._sendRequest(10,t,l.encode(e))}}const Qe=We,Xe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ze;const $e=new Uint8Array(16);function tn(){if(!Ze&&(Ze="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ze))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ze($e)}const en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function nn(t,e=0){return en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]}const rn=function(t,e,n){if(Xe.randomUUID&&!e&&!t)return Xe.randomUUID();const r=(t=t||{}).random||(t.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return nn(r)};class sn extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new sn(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class on extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new on(t.id,t.sessionType)}}class an extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new an(t.id,t.userId,t.role,t.permissions)}}class cn extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new cn(t.id)}}const dn=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new on(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,on.TYPE,l.encode(e));n=l.decode(t,sn)}catch(t){n=new sn(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await b.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new b,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,an.TYPE,async e=>{const n=l.decode(e,an);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await b.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,cn.TYPE,t=>{const e=l.decode(t,cn);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect(!1),t===ve.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class un{static async getConnectedSessions(t,e,n){const r=new dn(e,n);return await r.connect(t),r}}class ln extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new ln(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class pn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class hn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class fn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new fn(t.id,t.buffers,t.types,t.baseVersion,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId)}}class mn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new mn(t.id,t.lastKnowVersion,t.bundleVersion)}}class yn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new yn(t.version,t.buffers,t.types,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new yn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class gn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:hn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",d=null){super(),this.channel=t,this.version=e,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=d}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){return!this.types?.length&&null===this.initData}toJSON(){return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),initData:this.initData??"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new gn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),gn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class bn extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new bn(e,n)}}class In extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new In(t.documentId)}}const On=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??rn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new ln(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new Ht("Cannot reconnect to already connected service.",t);return this._connect(t,new mn(this.getId(),e,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const t=new In(this.getId());if(!this._wsGateway)throw new Re("Collaborative Editing",this);const e=await this._wsGateway._sendRequest(1,In.TYPE,l.encode(t));return l.decode(e,bn)}async sendOperations(t,e,n){if(!t?.types?.length)throw new Ht("Cannot send empty update.",this._wsGateway);const r="number"==typeof e?e:parseInt(e);if(!Number.isInteger(r)||r<0)throw new Ht("Base version not provided.",this._wsGateway);const s=new fn(this.getId(),t.buffers,t.types,r,[],n);if(!this._wsGateway||!this._isConnected)throw new Re("Collaborative Editing",this);const o=await this._wsGateway._sendRequest(1,fn.TYPE,l.encode(s));return l.decode(o,yn)}async getConnectedSessions(){if(!this._isConnected)throw new Re("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await un.getConnectedSessions(this._wsGateway,this._id,1)),this._connectedSessions}static getConnectedSessions(t,e){return un.getConnectedSessions(t,e,1)}async _connect(t,e){if(this.isConnected())return;if(t.state!==ve.STATE_CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(1,e.constructor.TYPE,l.encode(e)),r=l.decode(n,gn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(fn.TYPE),(t,e)=>{const n=l.decode(e,fn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect()}};class vn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class wn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(vn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(vn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class Sn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Sn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class kn extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new kn(t.commentThreadId,t.commentId,t.createdAt)}}class An extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new An(t.documentId)}}class Tn extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new Tn(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(wn.fromJSON))}}class _n extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new _n(t.documentId,t.commentThreadId,t.commentId)}}class Cn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId)}}class Pn extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class En extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new En(t.commentThreadId,t.documentId)}}class jn extends i{commentThreadId;_comments;_commentsV2;resolvedBy;comments;createdAt;deletedAt;resolvedAt;attributes;context;unlinkedAt;static DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}};constructor(t,e,n,r,s,o,i,a,c,d){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=n,this.resolvedBy=s,this.comments=n?.length?n:e,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof d?new Date(d):d,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){return{commentThreadId:this.commentThreadId,comments:this._comments?.map(t=>JSON.stringify(t)),commentsV2:this._commentsV2?.map(vn.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:this.createdAt?.toISOString(),deletedAt:this.deletedAt?.toISOString(),resolvedAt:this.resolvedAt?.toISOString(),unlinkedAt:this.unlinkedAt?.toISOString()}}static fromJSON(t){return new jn(t.commentThreadId,t.comments?.map(t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t)),t.commentsV2?.map(vn.fromJSON),t.attributes?JSON.parse(t.attributes):t.attributes,t.resolvedBy,t.context?JSON.parse(t.context):t.context,t.createdAt,t.deletedAt,t.resolvedAt,t.unlinkedAt)}}class Dn extends i{documentId;static TYPE="94";static READABLE_TYPE_NAME="getDocumentThreads";static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Dn(t.documentId)}}class xn extends i{_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse";static DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=e?.length?e:t}toJSON(){return{threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new xn(t.threads?.map(t=>function(t){const e=JSON.parse(t),n={...e};return e.comments&&(n.comments=e.comments?.map(t=>({...t,createdAt:new Date(t.createdAt)}))),n}(t)),t.threadsV2?.map(wn.fromJSON))}}class Rn extends o{static DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}};static toJSON(t){return{commentId:t.commentId,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{commentId:t.commentId,createdAt:new Date(t.createdAt)}}}class Nn extends i{commentThreadId;comments;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}};constructor(t,e,n=[]){super(),this.commentThreadId=t,this.comments=n,this.createdAt=new Date(e)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map(t=>Rn.toJSON(t))}}static fromJSON(t){return new Nn(t.commentThreadId,t.createdAt,t.comments.map(t=>Rn.fromJSON(t)))}}class Vn extends i{documentId;commentThreadId;comments;context;resolvedBy;attributes;createdAt;resolvedAt;deletedAt;static TYPE="140";static READABLE_TYPE_NAME="addCommentThread";static DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}};constructor(t,e,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=t,this.commentThreadId=e,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:this.comments?.map(t=>vn.toJSON(t))}}static fromJSON(t){return new Vn(t.documentId,t.commentThreadId,t.comments?.map(e=>vn.fromJSON({...e,documentId:t.documentId,commentThreadId:t.commentThreadId})),t.context?JSON.parse(t.context):t.context,t.resolvedBy,t.createdAt?new Date(t.createdAt):void 0,t.resolvedAt?new Date(t.resolvedAt):void 0,t.deletedAt?new Date(t.deletedAt):void 0,t.attributes?JSON.parse(t.attributes):t.attributes)}}class Mn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static TYPE="142";static READABLE_TYPE_NAME="resolveCommentThread";static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt?.toISOString()}}static fromJSON(t){return new Mn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Bn extends i{commentThreadId;documentId;static TYPE="141";static READABLE_TYPE_NAME="reopenCommentThread";static DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Bn(t.commentThreadId,t.documentId)}}class Un extends i{commentThreadId;documentId;context;attributes;unlinkedAt;static TYPE="143";static READABLE_TYPE_NAME="updateCommentThread";static DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}};constructor(t,e,n,r=null,s=null){super(),this.commentThreadId=t,this.documentId=e,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(t){return new Un(t.commentThreadId,t.documentId,t.context?JSON.parse(t.context):t.context,t.attributes?JSON.parse(t.attributes):null,t.unlinkedAt?new Date(t.unlinkedAt):null)}}class Jn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(t){return new Jn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class qn extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;_connectedSessions;static _SERVICE=9;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Ht("WebSocket Gateway is not connected.",t);const e=new An(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(9,An.TYPE,l.encode(e)),{channel:r,threads:s}=l.decode(n,Tn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),s}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(t,e,n,r){const s=new Sn(this._documentId,t,n,e,void 0,void 0,r),o=await this._sendRequest(Sn.TYPE,s);return l.decode(o,kn)}async updateComment(t,e,n,r){const s=void 0!==r,o=new Pn(this._documentId,t,e,n,r,s);await this._sendRequest(Pn.TYPE,o)}async removeComment(t,e){const n=new _n(this._documentId,t,e);await this._sendRequest(_n.TYPE,n)}async removeCommentThread(t){const e=new Cn(this._documentId,t);await this._sendRequest(Cn.TYPE,e)}async addCommentThread(t){const e=new Vn(this._documentId,t.commentThreadId,t.comments?.map(e=>({...e,documentId:this._documentId,commentThreadId:t.commentThreadId})),t.context,t.resolvedBy,t.createdAt,t.resolvedAt,t.deletedAt,t.attributes),n=await this._sendRequest(Vn.TYPE,e);return l.decode(n,Nn)}async resolveCommentThread(t){const e=new Mn(t,this._documentId),n=await this._sendRequest(Mn.TYPE,e);return l.decode(n,Jn)}async reopenCommentThread(t){const e=new Bn(t,this._documentId);await this._sendRequest(Bn.TYPE,e)}async updateCommentThread(t){const e=new Un(t.commentThreadId,this._documentId,t.context,t.attributes,t.unlinkedAt);await this._sendRequest(Un.TYPE,e)}async getCommentThread(t,e=1){const n=new En(t,this._documentId);try{const t=await this._sendRequest(En.TYPE,n),e=l.decode(t,jn);return{commentThreadId:e.commentThreadId,comments:e.comments,attributes:e.attributes,context:e.context,resolvedAt:e.resolvedAt,resolvedBy:e.resolvedBy,deletedAt:e.deletedAt,unlinkedAt:e.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.getCommentThread(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Yt.fromPublicError(n)}var r}async getDocumentThreads(){const t=new Dn(this._documentId),e=await this._sendRequest(Dn.TYPE,t),{threads:n}=l.decode(e,xn);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new Re("Comments",this);return this._connectedSessions||(this._connectedSessions=await un.getConnectedSessions(this._wsGateway,this._documentId,9)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(qn._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(Sn.TYPE),(t,e)=>{const n=l.decode(e,Sn);this.fire("commentAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(_n.TYPE),(t,e)=>{const n=l.decode(e,_n);this.fire("commentRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Pn.TYPE),(t,e)=>{const n=l.decode(e,Pn);this.fire("commentUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Cn.TYPE),(t,e)=>{const n=l.decode(e,Cn);this.fire("commentThreadRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Vn.TYPE),(t,e)=>{const n=l.decode(e,Vn);this.fire("commentThreadAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(Un.TYPE),(t,e)=>{const n=l.decode(e,Un);this.fire("commentThreadUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Mn.TYPE),(t,e)=>{const n=l.decode(e,Mn);this.fire("commentThreadResolved",n)}),this.listenTo(this._channel,this._channel.getEventName(Bn.TYPE),(t,e)=>{const n=l.decode(e,Bn);this.fire("commentThreadReopened",n)}))}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Comments",this);return this._wsGateway._sendRequest(9,t,l.encode(e))}}const Ln=qn,Gn=Yn;function Hn(){const t=["token","plugins","websocketgateway-missing-token","CONNECTED","_isBrowserOffline","error","1896aziQPS","websocketgateway-invalid-plugin-interface","state","cloudServices.connectionTimeout","1873044LyMJqm","19313dBoqED","connect","WebSocketGateway","4332456Husdcj","577424yptxCl","constructor","cloudservices-reconnection-error","CONNECTING","bind","websocketgateway-plugin-already-registered","DISCONNECTED","pluginName","224RQtyOI","CloudServices","listenTo","context","reconnect","offline","then","showWarning","init","delete","2447JMbeBU","real-time-collaboration","define","isPremiumPlugin","disconnect","limitExceeded","connection","code","webSocketUrl","isInReconnectionStack","connected","cloudServices.requestTimeout","stopListening","config","Connected users limit exceeded","isOfficialPlugin","from","change:me","_domEmitter","cloudservices-init","get","_reconnect","function","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","online","2265295ktdAzp","websocketgateway-missing-websocket-url","catch","_shouldPluginsReconnect","_reconnectionStack","has","requires","1581804GigZBv","initialReconnectionInterval","all","addToReconnectionStack","destroy","add","removeFromReconnectionStack","set"];return(Hn=function(){return t})()}function Yn(t,e){const n=Hn();return(Yn=function(t,e){return n[t-=214]})(t,e)}!function(t){const e=Yn,n=t();for(;;)try{if(451202===-parseInt(e(239))/1*(-parseInt(e(229))/2)+-parseInt(e(216))/3+-parseInt(e(221))/4+-parseInt(e(264))/5+parseInt(e(271))/6+parseInt(e(217))/7*(parseInt(e(285))/8)+parseInt(e(220))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Hn);class Fn extends e.ContextPlugin{static[Gn(219)]=(()=>ve)();static[Gn(272)]=1e3;[Gn(245)];[Gn(268)];[Gn(267)];[Gn(257)];static get[Gn(270)](){return[Gn(230),r.Notification]}static get[Gn(228)](){return Gn(219)}static get[Gn(254)](){return!0}static get[Gn(242)](){return!0}constructor(t){const e=Gn;super(t),this[e(278)](e(214),Ie[e(282)]),this[e(278)](e(283),!1),this[e(268)]=new Set,this[e(267)]=!1,this[e(257)]=new((0,n.DomEmitterMixin)())}[Gn(237)](){const t=Gn,e=this[t(232)],s=e[t(280)][t(259)](t(230)),o=e[t(280)][t(259)](r.Notification);if(!s[t(279)])throw new n.CKEditorError(t(281),this);if(!s[t(247)])throw new n.CKEditorError(t(265),this);return this[t(257)][t(231)](window,t(234),()=>this[t(283)]=!0),this[t(257)][t(231)](window,t(263),()=>this[t(283)]=!1),this[t(232)][t(252)][t(241)](t(215),10),this[t(232)][t(252)][t(241)](t(250),20),Fn[t(219)][t(218)](s[t(279)],s[t(247)],{timeout:1e3*this[t(232)][t(252)][t(259)](t(215)),requestTimeout:1e3*this[t(232)][t(252)][t(259)](t(250))})[t(235)](e=>{const r=t;if(this[r(245)]=e,this[r(225)](r(214)).to(e,r(214),this,r(283),(t,e)=>(r(249)!==t&&(this[r(267)]=!0),e||t!==Ie[r(282)]?Ie[r(227)]:this[r(214)]==Ie[r(227)]&&this[r(267)]?(this[r(267)]=!1,this[r(260)](),Ie[r(224)]):Ie[r(282)])),this[r(245)].on(r(284),(t,e)=>{const s=r;if(s(244)!==e[s(246)])throw console[s(284)](e),new n.CKEditorError(s(258),null,{originalError:e});o[s(236)](s(262),{title:s(253),namespace:s(240)})}),!e.me)return new Promise(t=>e.on(r(256),t))})[t(266)](e=>{const r=t;throw console[r(284)](e),new n.CKEditorError(r(258),null,{originalError:e})})}[Gn(274)](t){const e=Gn;if(e(261)!=typeof t[e(233)])throw new n.CKEditorError(e(286),this);if(this[e(248)](t))throw new n.CKEditorError(e(226),this,{name:t[e(222)][e(228)]});this[e(268)][e(276)](t)}[Gn(277)](t){const e=Gn;this[e(268)][e(238)](t)}[Gn(248)](t){const e=Gn;return this[e(268)][e(269)](t)}[Gn(260)](){const t=Gn;return this[t(245)][t(233)]()[t(235)](()=>Promise[t(273)](Array[t(255)](this[t(268)],e=>e[t(233)]())))[t(235)](()=>this[t(214)]=Ie[t(282)])[t(266)](e=>{const r=t;throw console[r(284)](e),new n.CKEditorError(r(223),this[r(232)])})}[Gn(243)](){const t=Gn;this[t(245)]&&this[t(245)][t(243)](),this[t(214)]=Ie[t(227)],this[t(257)][t(251)]()}[Gn(275)](){const t=Gn;this[t(243)](),super[t(275)]()}}var zn=__webpack_require__(211);const Kn=Wn;function Wn(t,e){const n=Qn();return(Wn=function(t,e){return n[t-=216]})(t,e)}function Qn(){const t=["orderNumber","isPremiumPlugin","plugins","channelConnectedUsers","register","70203Sxoath","isMe","138116qMDBNi","_uniqueUsersCount","hiddenInPresenceList","1118165gNefLK","53860dtdkCU","has","get","_createUser","_handleSessionAdd","context","getUserSessions","530586BWWbUy","defineMe","channelSessions","connection","sessions-unregister-not-exist","fire","role","getUserRole","delete","values","isOfficialPlugin","allConnectedUsers","init","_handleSessionRemove","add","Sessions","6kWHirC","pluginName","forEach","_registeredSessions","72GGHjZu","state","getUserBySessionId","change:state","assign","67440rgyuKs","listenTo","remove","clear","sessionAdd:","_users","unregister","4059909nyFIji","mySessionId","set","requires","addUser","user","connected","size","sessionId","stopListening","sessions-register-already-registered","getUser"];return(Qn=function(){return t})()}!function(t){const e=Wn,n=t();for(;;)try{if(126242===parseInt(e(276))/1+-parseInt(e(250))/2+-parseInt(e(241))/3*(parseInt(e(218))/4)+-parseInt(e(217))/5+-parseInt(e(225))/6+-parseInt(e(274))/7*(parseInt(e(245))/8)+parseInt(e(257))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Qn);class Xn extends e.ContextPlugin{[Kn(227)];[Kn(272)];[Kn(236)];[Kn(244)];[Kn(277)];[Kn(255)];static get[Kn(242)](){return Kn(240)}static get[Kn(235)](){return!0}static get[Kn(270)](){return!0}static get[Kn(260)](){return[Fn,zn.Users]}constructor(t){const e=Kn;super(t),this[e(227)]=new Map,this[e(272)]=new Map,this[e(236)]=new n.Collection,this[e(244)]=new Map,this[e(277)]=0,this[e(255)]=this[e(223)][e(271)][e(220)](zn.Users)}[Kn(237)](){const t=Kn,e=this[t(223)][t(271)][t(220)](Fn);this[t(251)](e,t(248),(e,n,r)=>{const s=t;if(s(263)!==r)this[s(227)][s(243)](t=>t[s(253)]()),this[s(272)][s(243)](t=>t[s(253)]()),this[s(236)][s(253)]();else for(const[t,e]of this[s(244)])for(const n of e)this[s(222)](t,n)}),this[t(221)](e[t(228)].me,!0)}[Kn(273)](t,e){const r=Kn;if(this[r(244)][r(219)](t))throw new n.CKEditorError(r(267),null,{channelId:t});this[r(244)][r(259)](t,e),this[r(227)][r(259)](t,new n.Collection),this[r(272)][r(259)](t,new n.Collection),this[r(251)](e,r(239),(e,n)=>this[r(222)](t,n)),this[r(251)](e,r(252),(e,n)=>this[r(238)](t,n));for(const n of e)this[r(222)](t,n)}[Kn(256)](t){const e=Kn;if(!this[e(244)][e(219)](t))throw new n.CKEditorError(e(229),null,{channelId:t});const r=this[e(244)][e(220)](t);this[e(266)](r);for(const n of r)e(263)===this[e(223)][e(271)][e(220)](Fn)[e(246)]&&this[e(238)](t,n);this[e(244)][e(233)](t),this[e(227)][e(233)](t),this[e(272)][e(233)](t)}get[Kn(258)](){const t=Kn;return this[t(223)][t(271)][t(220)](Fn)[t(228)][t(265)]}[Kn(247)](t){const e=Kn;for(const n of this[e(227)][e(234)]())for(const r of n)if(r.id===t)return r[e(262)]}[Kn(224)](t,e){const n=Kn,r=e?[this[n(227)][n(220)](e)]:this[n(227)][n(234)](),s=new Set;for(const e of r)for(const r of e)r[n(262)].id===t.id&&s[n(239)](r.id);return s}[Kn(232)](t){const e=Kn;for(const n of this[e(227)][e(234)]())for(const r of n)if(r[e(262)]===t)return r[e(231)]}[Kn(222)](t,e){const n=Kn;if(n(263)!==this[n(223)][n(271)][n(220)](Fn)[n(246)])return;const r=e[n(262)],s=this[n(255)][n(268)](r.id)||this[n(221)](r),o=Object[n(249)]({},e,{user:s});if(this[n(227)][n(220)](t)[n(239)](o),!r[n(216)]){const e=this[n(272)][n(220)](t);e[n(219)](s.id)||e[n(239)](s),this[n(236)][n(219)](s.id)||r[n(216)]||this[n(236)][n(239)](s,s[n(275)]?0:void 0)}this[n(230)](n(254)+t,{channelId:t,session:o})}[Kn(238)](t,e){const n=Kn;if(n(263)!==this[n(223)][n(271)][n(220)](Fn)[n(246)])return;const r=this[n(272)][n(220)](t),s=e[n(262)];s.id&&(this[n(227)][n(220)](t)[n(252)](e.id),r[n(219)](s.id)&&!this[n(224)](s,t)[n(264)]&&r[n(252)](s.id),this[n(236)][n(220)](s.id)&&!this[n(224)](s)[n(264)]&&this[n(236)][n(252)](s.id))}[Kn(221)](t,e){const n=Kn,r=this[n(255)][n(261)](t);return e&&this[n(255)][n(226)](t.id),r[n(269)]=this[n(277)]++,r}}var Zn=__webpack_require__(6),$n=__webpack_require__.n(Zn),tr=__webpack_require__(602),er=__webpack_require__.n(tr),nr=__webpack_require__(557),rr=__webpack_require__.n(nr),sr=__webpack_require__(302),or=__webpack_require__.n(sr),ir=__webpack_require__(290),ar=__webpack_require__.n(ir),cr=__webpack_require__(883),dr={attributes:{"data-cke":!0}};dr.setAttributes=or(),dr.insert=rr().bind(null,"head"),dr.domAPI=er(),dr.insertStyleElement=ar();$n()(cr.A,dr);cr.A&&cr.A.locals&&cr.A.locals;const ur=pr;function lr(){const t=["2681928bCeGns","user:","enqueueChange","oldRange","isOfficialPlugin","tableCell","editor","change","commands","nodeAfter","start","markerToElement","model","createRange","getContainedElement","toRange","_domEmitter","textContent","removeClass","user:range","5174235kpbGkq","userPositionMarker","clear","stopListening","459299yCrCth","markerName","span","mouseleave","selection","mySessionId","parent","mapper","setCustomProperty","$text","removeMarker","UserMarkers","isPremiumPlugin","reconvertMarker","229926cLmdrG","batch","requires","newRange","ck-user__marker-tooltip","document","update:user:range","color","editing","undo","createUserMarkerOperations","pluginName","size","set","deletionPosition","$graveyard","mouseenter","isInline","marker","getMarkerClass","toDomElement","markerRange","contenteditable","data-session-id","rootName","3015560bWaZKg","root","keydown","has","getCustomProperty","_createdBatches","spellcheck","hasContent","change:range","setAttribute","add","isObject","isDocumentOperation","view","markers","getFirstRange","remove",'<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"conversion","destroy","isLimit","detach","split","getUserBySessionId","highest","isCollapsed","classList","orderNumber","delete","ck-user__marker_hovered","editingDowncast","getStart","end","startsWith","user:position","updateMarker","createUIElement","getSelectionClass","2899300xHhSIv","afterInit","85EOcHkW","ck-user__marker ","hasDomSelection","addEventListener","getAttribute","type","user:position:","createElement","schema","markerNameToElements","addMarker","user:range:","innerHTML","for","ck-user__selection","render","name","element","isSimilar","getRange","checkChild","init","applyOperation","plugins","false","getNearestSelectionRange","markerToHighlight","getPositions","11665934DZCOIz","outerHTML","Escape","fromRange","get","listenTo"];return(lr=function(){return t})()}function pr(t,e){const n=lr();return(pr=function(t,e){return n[t-=128]})(t,e)}!function(t){const e=pr,n=t();for(;;)try{if(867855===parseInt(e(196))/1+parseInt(e(235))/2+-parseInt(e(192))/3+-parseInt(e(136))/4+-parseInt(e(138))/5*(parseInt(e(210))/6)+parseInt(e(166))/7+parseInt(e(172))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lr);class hr extends e.Plugin{[ur(188)]=new((0,n.DomEmitterMixin)());static get[ur(212)](){return[Xn]}static get[ur(221)](){return ur(207)}static get[ur(176)](){return!0}static get[ur(208)](){return!0}[ur(159)](){const t=ur,e=this[t(178)],r=e[t(161)][t(170)](Xn);e[t(253)][t(151)](t(128))[t(183)]({model:t(132),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(197)][o(257)](":")[2],a=r[o(258)](i);if(!a||i===r[o(201)])return;if(!s[o(184)][o(146)][o(158)](e[o(231)][o(182)],o(205)))return;const c={class:o(139)+a[o(217)][o(229)](),"data-name":a[o(154)],"data-session-id":i},d=s[o(184)][o(249)][o(170)](e[o(197)])[o(129)](),u=d[o(181)],l=s[o(184)][o(146)];if(u&&l[o(246)](u)&&l[o(227)](u)&&!s[o(184)][o(249)][o(170)](o(149)+i)[o(157)]()[o(260)])return;const p=d[o(202)];return s[o(184)][o(146)][o(255)](p)&&!s[o(184)][o(242)](p)&&(c[o(232)]=!1),function(t,e,n){const r=o,s=t[r(134)](r(198),e);return t[r(204)](r(193),!0,s),s[r(153)]=function(t){const e=r,s=this[e(230)](t),o=document[e(145)](e(198));return o[e(261)][e(245)](e(214)),o[e(244)](e(232),e(162)),o[e(244)](e(241),e(162)),o[e(189)]=n[e(154)],s[e(150)]=e(252)+o[e(167)]+"",s[e(141)](e(226),()=>{const t=e;s[t(261)][t(245)](t(264))}),s[e(141)](e(199),()=>{const t=e;s[t(261)][t(251)](t(264))}),s},s[r(156)]=function(t){const e=r;return!(!this[e(239)](e(193))||!t[e(239)](e(193))||this[e(142)](e(233))!=t[e(142)](e(233)))},s}(n,c,a)}(n,s,r,e)}),e[t(253)][t(151)](t(128))[t(164)]({model:t(191),view:e=>function(e,n){const r=t,s=e[r(197)][r(257)](":")[2];if(s===n[r(201)])return null;const o=n[r(258)](s);return o?{id:s,classes:[r(152),o[r(217)][r(135)]()],attributes:{"data-session-id":s},priority:2e3+o[r(262)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(184)],o=new Map,i=e[n(161)][n(170)](Xn);r[n(249)].on(n(216),(t,a,c,d)=>{const u=n;if(!d&&o[u(170)](a[u(154)]))return o[u(170)](a[u(154)])[u(256)](),void o[u(263)](a[u(154)]);const l=a[u(154)][u(257)](":")[2];if(l===i[u(201)])return;const p=u(144)+l;r[u(249)][u(238)](p)&&e[u(218)][u(209)](p),a.on(u(243),(t,e,n)=>{const i=u;if(i(225)!=e[i(236)][i(234)]&&i(225)==a[i(157)]()[i(236)][i(234)]&&!o[i(238)](a[i(154)])){const t=r[i(146)][i(163)](n[i(224)]);if(t){const e=s.ModelLiveRange[i(169)](t);o[i(223)](a[i(154)],e),e.on(i(243),(t,n,s)=>{const c=i;if(c(225)==e[c(236)][c(234)]){const t=r[c(146)][c(163)](s[c(224)]);t?(e[c(182)]=t[c(182)],e[c(130)]=t[c(130)]):(o[c(263)](a[c(154)]),e[c(256)]())}})}}})}),r[n(215)].on(n(179),()=>{const t=n;o[t(222)]>0&&r[t(174)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(225)==r[n(249)][n(170)](t)[n(157)]()[n(236)][n(234)]&&(fr(t[n(257)](":")[2],s[n(187)](),r,e),s[n(256)]());o[n(194)]()})})}(e),this[t(188)][t(171)](n.global[t(215)],t(237),(n,{key:r})=>{const s=t;s(168)===r&&function(t){const e=s;t[e(218)][e(248)][e(179)](n=>{const r=e;for(const e of t[r(184)][r(249)]){if(!e[r(154)][r(131)](r(132)))continue;const s=t[r(218)][r(203)][r(147)](e[r(154)]);if(s)for(const t of s)n[r(190)](r(264),t)}})}(e)},{useCapture:!0})}[ur(137)](){const t=ur,e=this[t(178)],n=e[t(180)][t(170)](t(219));n&&e[t(184)].on(t(160),(r,s)=>{const o=t,i=s[0];if(!i[o(247)])return;if(o(228)!=i[o(143)]||!i[o(154)][o(131)](o(173)))return;const a=i[o(211)];n[o(240)][o(238)](a)&&(i[o(213)]=i[o(175)]?e[o(184)][o(185)](i[o(175)][o(182)],i[o(175)][o(130)]):null)},{priority:t(259)})}[ur(254)](){const t=ur;return this[t(188)][t(195)](),super[t(254)]()}[ur(220)](){const t=ur,e=this[t(178)],n=e[t(184)][t(215)],r=e[t(161)][t(170)](Xn);e[t(184)][t(174)]({isUndoable:!1},s=>{const o=t,i=o(149)+r[o(201)],a=o(144)+r[o(201)],c=e[o(184)][o(249)][o(238)](i);e[o(218)][o(248)][o(140)]?fr(r[o(201)],n[o(200)][o(250)](),e[o(184)],s):c&&(s[o(206)](i),s[o(206)](a))})}}function fr(t,e,n,r){const s=ur,o=s(149)+t,i=s(144)+t,a=e[s(186)]();let c=e[s(182)];if(a&&a.is(s(155),s(177))){const t=function(t,e){const n=s;for(const r of t[n(165)]())if(e[n(146)][n(158)](r,n(205)))return r}(e,n);t&&(c=t,e=r[s(185)](c))}const d=r[s(185)](c);n[s(249)][s(238)](o)?(r[s(133)](o,{range:e}),r[s(133)](i,{range:d})):(r[s(148)](o,{range:e,usingOperation:!0}),r[s(148)](i,{range:d,usingOperation:!0}))}function mr(t,e,n){const r=t.t,s=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return s({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return s("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return s("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return s("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return s("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return s("Synchronization issue");case"Connected users list dropdown menu":return s("Connected users list dropdown menu");case"Collapsed connected users list (press ENTER to open it)":return s("Collapsed connected users list (press ENTER to open it)");case"Connected users list":return s("Connected users list");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return s({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}function yr(t,e){var n=gr();return(yr=function(t,e){return n[t-=346]})(t,e)}function gr(){var t=["oldName: string expected","prototype","MergeOperation","991152zYvgrv","rootMain","/Element","attributesJson: string expected","elementName: string expected",".MergeOperation.graveyardPosition: object expected","MoveOperation","shouldReceiveAttributes","oldValueJson: string expected","call","isInteger","oldRange","path","howMany: integer expected","/MoveOperation","wasUndone","bool","toJSON","InsertOperation","keys","oldRange.","decode","newName","oldValueBoolean: boolean expected","/RenameOperation",".MarkerOperation.oldRange: object expected","splitPosition","newName: string expected","splitPosition.","newRange.","rootGraveyard",".MoveOperation.sourcePosition: object expected","attributesBoolean: boolean{k:string} expected",".Position.path: array expected","302664sfNKfh","key: string expected",".Range.start: object expected","position","SplitOperation","oldValueJson","/RootOperation","name: string expected","root: string expected","constructor","push","elementName","stickiness","newValueBoolean: boolean expected","newValueJson: string expected","Range",".InsertOperation.nodes: array expected","/Position","emptyObject","RenameOperation",".MarkerOperation.newRange: object expected","howMany","hasOwnProperty","default","isAdd: boolean expected","rootMain: boolean expected","rootName","newValueJson","/AttributeOperation",".RenameOperation.position: object expected",".InsertOperation.nodes: object expected","Position","oldName","isObject","nodes.","11UlvhnR","Element","start.","12724550QFUPkQ","skipType","RootOperation","pos","encode","path: integer[] expected","objects","end.","uint32","attributesJson","position.","shouldReceiveAttributes: boolean expected","/MarkerOperation","fork","rootName: string expected","start",".Element.children: object expected","Reader","sourcePosition.","create",".SplitOperation.splitPosition: object expected","insertionPosition.","roots","1952613CddxmX","root",".AttributeOperation.range: object expected","oldValueBoolean",".SplitOperation.graveyardPosition: object expected","/InsertOperation","stickiness: string expected","range","affectsData: boolean expected","attributesBoolean: object expected","/MergeOperation","boolean","isArray","/RootAttributeOperation","name","176546BZAavk","util","len","newRange","MarkerOperation","type.googleapis.com","encodeDelimited","children",".Element.attributesBoolean: object expected","toJSONOptions","targetPosition","data: string expected","238LkKonf","string","emptyArray","/SplitOperation","key","isString","arrays",".MoveOperation.targetPosition: object expected","21bztfGN","getTypeUrl","object expected","graveyardPosition",".MergeOperation.targetPosition: object expected",".MergeOperation.sourcePosition: object expected",".SplitOperation.insertionPosition: object expected","children.","attributesBoolean",".Element.children: array expected","rootGraveyard: boolean expected",".InsertOperation.position: object expected","graveyardPosition.","verify","data","nodes: array expected","1zGeViL","fromObject","object",".Range.end: object expected","Writer","decodeDelimited","72htuFRp","children: array expected","/Range","insertionPosition","AttributeOperation","end","44395KiSqzC","RootAttributeOperation","nodes","isAdd","targetPosition.","newValueBoolean","affectsData","length","range.","sourcePosition","path: array expected","toObject","437508YttsGC","wasUndone: boolean expected","defaults","ldelim"];return(gr=function(){return t})()}!function(t){for(var e=yr,n=t();;)try{if(647040===parseInt(e(473))/1*(parseInt(e(437))/2)+-parseInt(e(457))/3*(-parseInt(e(497))/4)+parseInt(e(485))/5*(parseInt(e(479))/6)+-parseInt(e(449))/7*(parseInt(e(361))/8)+-parseInt(e(422))/9+parseInt(e(399))/10*(parseInt(e(396))/11)+-parseInt(e(504))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gr);const br=(()=>{var t=yr,e=d[t(416)],n=d[t(477)],r=d[t(438)],s=d[t(421)][t(384)]||(d[t(421)][t(384)]={});return s[t(483)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(429)]=null,i[o(502)][o(453)]="",i[o(502)][o(425)]=!1,i[o(502)][o(366)]="",i[o(502)][o(490)]=!1,i[o(502)][o(388)]="",i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(429)]&&Object[r(383)][r(513)](t,r(429))&&s[r(376)][r(403)](t[r(429)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(453)]&&Object[r(383)][r(513)](t,r(453))&&e[r(407)](18)[r(450)](t[r(453)]),null!=t[r(425)]&&Object[r(383)][r(513)](t,r(425))&&e[r(407)](24)[r(520)](t[r(425)]),null!=t[r(366)]&&Object[r(383)][r(513)](t,r(366))&&e[r(407)](34)[r(450)](t[r(366)]),null!=t[r(490)]&&Object[r(383)][r(513)](t,r(490))&&e[r(407)](40)[r(520)](t[r(490)]),null!=t[r(388)]&&Object[r(383)][r(513)](t,r(388))&&e[r(407)](50)[r(450)](t[r(388)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](56)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(483)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(429)]=s[r(376)][r(348)](t,t[r(407)]());break;case 2:a[r(453)]=t[r(450)]();break;case 3:a[r(425)]=t[r(520)]();break;case 4:a[r(366)]=t[r(450)]();break;case 5:a[r(490)]=t[r(520)]();break;case 6:a[r(388)]=t[r(450)]();break;case 7:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;if(e(475)!=typeof t||null===t)return e(459);if(null!=t[e(429)]&&t[e(383)](e(429))){var n=s[e(376)][e(470)](t[e(429)]);if(n)return e(493)+n}return null!=t[e(453)]&&t[e(383)](e(453))&&!r[e(454)](t[e(453)])?e(362):null!=t[e(425)]&&t[e(383)](e(425))&&e(433)!=typeof t[e(425)]?e(350):null!=t[e(366)]&&t[e(383)](e(366))&&!r[e(454)](t[e(366)])?e(512):null!=t[e(490)]&&t[e(383)](e(490))&&e(433)!=typeof t[e(490)]?e(374):null!=t[e(388)]&&t[e(383)](e(388))&&!r[e(454)](t[e(388)])?e(375):null!=t[e(519)]&&t[e(383)](e(519))&&e(433)!=typeof t[e(519)]?e(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(483)])return t;var n=new(s[e(483)]);if(null!=t[e(429)]){if(e(475)!=typeof t[e(429)])throw TypeError(e(424));n[e(429)]=s[e(376)][e(474)](t[e(429)])}return null!=t[e(453)]&&(n[e(453)]=String(t[e(453)])),null!=t[e(425)]&&(n[e(425)]=Boolean(t[e(425)])),null!=t[e(366)]&&(n[e(366)]=String(t[e(366)])),null!=t[e(490)]&&(n[e(490)]=Boolean(t[e(490)])),null!=t[e(388)]&&(n[e(388)]=String(t[e(388)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(429)]=null,r[n(453)]="",r[n(425)]=!1,r[n(366)]="",r[n(490)]=!1,r[n(388)]="",r[n(519)]=!1),null!=t[n(429)]&&t[n(383)](n(429))&&(r[n(429)]=s[n(376)][n(496)](t[n(429)],e)),null!=t[n(453)]&&t[n(383)](n(453))&&(r[n(453)]=t[n(453)]),null!=t[n(425)]&&t[n(383)](n(425))&&(r[n(425)]=t[n(425)]),null!=t[n(366)]&&t[n(383)](n(366))&&(r[n(366)]=t[n(366)]),null!=t[n(490)]&&t[n(383)](n(490))&&(r[n(490)]=t[n(490)]),null!=t[n(388)]&&t[n(383)](n(388))&&(r[n(388)]=t[n(388)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(389)},i}(),s[t(522)]=function(){var o=t;function i(t){var e=yr;if(this[e(487)]=[],t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(364)]=null,i[o(502)][o(487)]=r[o(451)],i[o(502)][o(511)]=!1,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;if(e||(e=n[r(418)]()),null!=t[r(364)]&&Object[r(383)][r(513)](t,r(364))&&s[r(392)][r(403)](t[r(364)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(487)]&&t[r(487)][r(492)])for(var i=0;i<t[r(487)][r(492)];++i)s[r(397)][r(403)](t[r(487)][i],e[r(407)](18)[r(412)]())[r(500)]();return null!=t[r(511)]&&Object[r(383)][r(513)](t,r(511))&&e[r(407)](24)[r(520)](t[r(511)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](32)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(522)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(364)]=s[r(392)][r(348)](t,t[r(407)]());break;case 2:a[r(487)]&&a[r(487)][r(492)]||(a[r(487)]=[]),a[r(487)][r(371)](s[r(397)][r(348)](t,t[r(407)]()));break;case 3:a[r(511)]=t[r(520)]();break;case 4:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;if(e(475)!=typeof t||null===t)return e(459);if(null!=t[e(364)]&&t[e(383)](e(364))&&(r=s[e(392)][e(470)](t[e(364)])))return e(409)+r;if(null!=t[e(487)]&&t[e(383)](e(487))){if(!Array[e(434)](t[e(487)]))return e(472);for(var n=0;n<t[e(487)][e(492)];++n){var r;if(r=s[e(397)][e(470)](t[e(487)][n]))return e(395)+r}}return null!=t[e(511)]&&t[e(383)](e(511))&&e(433)!=typeof t[e(511)]?e(410):null!=t[e(519)]&&t[e(383)](e(519))&&e(433)!=typeof t[e(519)]?e(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(522)])return t;var n=new(s[e(522)]);if(null!=t[e(364)]){if(e(475)!=typeof t[e(364)])throw TypeError(e(468));n[e(364)]=s[e(392)][e(474)](t[e(364)])}if(t[e(487)]){if(!Array[e(434)](t[e(487)]))throw TypeError(e(377));n[e(487)]=[];for(var r=0;r<t[e(487)][e(492)];++r){if(e(475)!=typeof t[e(487)][r])throw TypeError(e(391));n[e(487)][r]=s[e(397)][e(474)](t[e(487)][r])}}return null!=t[e(511)]&&(n[e(511)]=Boolean(t[e(511)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(455)]||e[n(499)])&&(r[n(487)]=[]),e[n(499)]&&(r[n(364)]=null,r[n(511)]=!1,r[n(519)]=!1),null!=t[n(364)]&&t[n(383)](n(364))&&(r[n(364)]=s[n(392)][n(496)](t[n(364)],e)),t[n(487)]&&t[n(487)][n(492)]){r[n(487)]=[];for(var i=0;i<t[n(487)][n(492)];++i)r[n(487)][i]=s[n(397)][n(496)](t[n(487)][i],e)}return null!=t[n(511)]&&t[n(383)](n(511))&&(r[n(511)]=t[n(511)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(427)},i}(),s[t(441)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(436)]="",i[o(502)][o(515)]=null,i[o(502)][o(440)]=null,i[o(502)][o(491)]=!1,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(436)]&&Object[r(383)][r(513)](t,r(436))&&e[r(407)](10)[r(450)](t[r(436)]),null!=t[r(515)]&&Object[r(383)][r(513)](t,r(515))&&s[r(376)][r(403)](t[r(515)],e[r(407)](18)[r(412)]())[r(500)](),null!=t[r(440)]&&Object[r(383)][r(513)](t,r(440))&&s[r(376)][r(403)](t[r(440)],e[r(407)](26)[r(412)]())[r(500)](),null!=t[r(491)]&&Object[r(383)][r(513)](t,r(491))&&e[r(407)](32)[r(520)](t[r(491)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](40)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(441)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(436)]=t[r(450)]();break;case 2:a[r(515)]=s[r(376)][r(348)](t,t[r(407)]());break;case 3:a[r(440)]=s[r(376)][r(348)](t,t[r(407)]());break;case 4:a[r(491)]=t[r(520)]();break;case 5:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e,n=o;return n(475)!=typeof t||null===t?n(459):null!=t[n(436)]&&t[n(383)](n(436))&&!r[n(454)](t[n(436)])?n(368):null!=t[n(515)]&&t[n(383)](n(515))&&(e=s[n(376)][n(470)](t[n(515)]))?n(347)+e:null!=t[n(440)]&&t[n(383)](n(440))&&(e=s[n(376)][n(470)](t[n(440)]))?n(356)+e:null!=t[n(491)]&&t[n(383)](n(491))&&n(433)!=typeof t[n(491)]?n(430):null!=t[n(519)]&&t[n(383)](n(519))&&n(433)!=typeof t[n(519)]?n(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(441)])return t;var n=new(s[e(441)]);if(null!=t[e(436)]&&(n[e(436)]=String(t[e(436)])),null!=t[e(515)]){if(e(475)!=typeof t[e(515)])throw TypeError(e(352));n[e(515)]=s[e(376)][e(474)](t[e(515)])}if(null!=t[e(440)]){if(e(475)!=typeof t[e(440)])throw TypeError(e(381));n[e(440)]=s[e(376)][e(474)](t[e(440)])}return null!=t[e(491)]&&(n[e(491)]=Boolean(t[e(491)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(436)]="",r[n(515)]=null,r[n(440)]=null,r[n(491)]=!1,r[n(519)]=!1),null!=t[n(436)]&&t[n(383)](n(436))&&(r[n(436)]=t[n(436)]),null!=t[n(515)]&&t[n(383)](n(515))&&(r[n(515)]=s[n(376)][n(496)](t[n(515)],e)),null!=t[n(440)]&&t[n(383)](n(440))&&(r[n(440)]=s[n(376)][n(496)](t[n(440)],e)),null!=t[n(491)]&&t[n(383)](n(491))&&(r[n(491)]=t[n(491)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(411)},i}(),s[t(503)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(494)]=null,i[o(502)][o(447)]=null,i[o(502)][o(460)]=null,i[o(502)][o(382)]=0,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(494)]&&Object[r(383)][r(513)](t,r(494))&&s[r(392)][r(403)](t[r(494)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(447)]&&Object[r(383)][r(513)](t,r(447))&&s[r(392)][r(403)](t[r(447)],e[r(407)](18)[r(412)]())[r(500)](),null!=t[r(460)]&&Object[r(383)][r(513)](t,r(460))&&s[r(392)][r(403)](t[r(460)],e[r(407)](26)[r(412)]())[r(500)](),null!=t[r(382)]&&Object[r(383)][r(513)](t,r(382))&&e[r(407)](32)[r(407)](t[r(382)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](40)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(503)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(494)]=s[r(392)][r(348)](t,t[r(407)]());break;case 2:a[r(447)]=s[r(392)][r(348)](t,t[r(407)]());break;case 3:a[r(460)]=s[r(392)][r(348)](t,t[r(407)]());break;case 4:a[r(382)]=t[r(407)]();break;case 5:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e,n=o;return n(475)!=typeof t||null===t?n(459):null!=t[n(494)]&&t[n(383)](n(494))&&(e=s[n(392)][n(470)](t[n(494)]))?n(417)+e:null!=t[n(447)]&&t[n(383)](n(447))&&(e=s[n(392)][n(470)](t[n(447)]))?n(489)+e:null!=t[n(460)]&&t[n(383)](n(460))&&(e=s[n(392)][n(470)](t[n(460)]))?n(469)+e:null!=t[n(382)]&&t[n(383)](n(382))&&!r[n(514)](t[n(382)])?n(517):null!=t[n(519)]&&t[n(383)](n(519))&&n(433)!=typeof t[n(519)]?n(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(503)])return t;var n=new(s[e(503)]);if(null!=t[e(494)]){if(e(475)!=typeof t[e(494)])throw TypeError(e(462));n[e(494)]=s[e(392)][e(474)](t[e(494)])}if(null!=t[e(447)]){if(e(475)!=typeof t[e(447)])throw TypeError(e(461));n[e(447)]=s[e(392)][e(474)](t[e(447)])}if(null!=t[e(460)]){if(e(475)!=typeof t[e(460)])throw TypeError(e(509));n[e(460)]=s[e(392)][e(474)](t[e(460)])}return null!=t[e(382)]&&(n[e(382)]=t[e(382)]>>>0),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(494)]=null,r[n(447)]=null,r[n(460)]=null,r[n(382)]=0,r[n(519)]=!1),null!=t[n(494)]&&t[n(383)](n(494))&&(r[n(494)]=s[n(392)][n(496)](t[n(494)],e)),null!=t[n(447)]&&t[n(383)](n(447))&&(r[n(447)]=s[n(392)][n(496)](t[n(447)],e)),null!=t[n(460)]&&t[n(383)](n(460))&&(r[n(460)]=s[n(392)][n(496)](t[n(460)],e)),null!=t[n(382)]&&t[n(383)](n(382))&&(r[n(382)]=t[n(382)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(432)},i}(),s[t(510)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(494)]=null,i[o(502)][o(382)]=0,i[o(502)][o(447)]=null,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(494)]&&Object[r(383)][r(513)](t,r(494))&&s[r(392)][r(403)](t[r(494)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(382)]&&Object[r(383)][r(513)](t,r(382))&&e[r(407)](16)[r(407)](t[r(382)]),null!=t[r(447)]&&Object[r(383)][r(513)](t,r(447))&&s[r(392)][r(403)](t[r(447)],e[r(407)](26)[r(412)]())[r(500)](),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](32)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(510)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(494)]=s[r(392)][r(348)](t,t[r(407)]());break;case 2:a[r(382)]=t[r(407)]();break;case 3:a[r(447)]=s[r(392)][r(348)](t,t[r(407)]());break;case 4:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e,n=o;return n(475)!=typeof t||null===t?n(459):null!=t[n(494)]&&t[n(383)](n(494))&&(e=s[n(392)][n(470)](t[n(494)]))?n(417)+e:null!=t[n(382)]&&t[n(383)](n(382))&&!r[n(514)](t[n(382)])?n(517):null!=t[n(447)]&&t[n(383)](n(447))&&(e=s[n(392)][n(470)](t[n(447)]))?n(489)+e:null!=t[n(519)]&&t[n(383)](n(519))&&n(433)!=typeof t[n(519)]?n(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(510)])return t;var n=new(s[e(510)]);if(null!=t[e(494)]){if(e(475)!=typeof t[e(494)])throw TypeError(e(358));n[e(494)]=s[e(392)][e(474)](t[e(494)])}if(null!=t[e(382)]&&(n[e(382)]=t[e(382)]>>>0),null!=t[e(447)]){if(e(475)!=typeof t[e(447)])throw TypeError(e(456));n[e(447)]=s[e(392)][e(474)](t[e(447)])}return null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(494)]=null,r[n(382)]=0,r[n(447)]=null,r[n(519)]=!1),null!=t[n(494)]&&t[n(383)](n(494))&&(r[n(494)]=s[n(392)][n(496)](t[n(494)],e)),null!=t[n(382)]&&t[n(383)](n(382))&&(r[n(382)]=t[n(382)]),null!=t[n(447)]&&t[n(383)](n(447))&&(r[n(447)]=s[n(392)][n(496)](t[n(447)],e)),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(518)},i}(),s[t(380)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(364)]=null,i[o(502)][o(393)]="",i[o(502)][o(349)]="",i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(364)]&&Object[r(383)][r(513)](t,r(364))&&s[r(392)][r(403)](t[r(364)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(393)]&&Object[r(383)][r(513)](t,r(393))&&e[r(407)](18)[r(450)](t[r(393)]),null!=t[r(349)]&&Object[r(383)][r(513)](t,r(349))&&e[r(407)](26)[r(450)](t[r(349)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](32)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(380)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(364)]=s[r(392)][r(348)](t,t[r(407)]());break;case 2:a[r(393)]=t[r(450)]();break;case 3:a[r(349)]=t[r(450)]();break;case 4:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;if(e(475)!=typeof t||null===t)return e(459);if(null!=t[e(364)]&&t[e(383)](e(364))){var n=s[e(392)][e(470)](t[e(364)]);if(n)return e(409)+n}return null!=t[e(393)]&&t[e(383)](e(393))&&!r[e(454)](t[e(393)])?e(501):null!=t[e(349)]&&t[e(383)](e(349))&&!r[e(454)](t[e(349)])?e(354):null!=t[e(519)]&&t[e(383)](e(519))&&e(433)!=typeof t[e(519)]?e(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(380)])return t;var n=new(s[e(380)]);if(null!=t[e(364)]){if(e(475)!=typeof t[e(364)])throw TypeError(e(390));n[e(364)]=s[e(392)][e(474)](t[e(364)])}return null!=t[e(393)]&&(n[e(393)]=String(t[e(393)])),null!=t[e(349)]&&(n[e(349)]=String(t[e(349)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(364)]=null,r[n(393)]="",r[n(349)]="",r[n(519)]=!1),null!=t[n(364)]&&t[n(383)](n(364))&&(r[n(364)]=s[n(392)][n(496)](t[n(364)],e)),null!=t[n(393)]&&t[n(383)](n(393))&&(r[n(393)]=t[n(393)]),null!=t[n(349)]&&t[n(383)](n(349))&&(r[n(349)]=t[n(349)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(351)},i}(),s[t(486)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(423)]="",i[o(502)][o(453)]="",i[o(502)][o(425)]=!1,i[o(502)][o(366)]="",i[o(502)][o(490)]=!1,i[o(502)][o(388)]="",i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(423)]&&Object[r(383)][r(513)](t,r(423))&&e[r(407)](10)[r(450)](t[r(423)]),null!=t[r(453)]&&Object[r(383)][r(513)](t,r(453))&&e[r(407)](18)[r(450)](t[r(453)]),null!=t[r(425)]&&Object[r(383)][r(513)](t,r(425))&&e[r(407)](24)[r(520)](t[r(425)]),null!=t[r(366)]&&Object[r(383)][r(513)](t,r(366))&&e[r(407)](34)[r(450)](t[r(366)]),null!=t[r(490)]&&Object[r(383)][r(513)](t,r(490))&&e[r(407)](40)[r(520)](t[r(490)]),null!=t[r(388)]&&Object[r(383)][r(513)](t,r(388))&&e[r(407)](50)[r(450)](t[r(388)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](56)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(486)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(423)]=t[r(450)]();break;case 2:a[r(453)]=t[r(450)]();break;case 3:a[r(425)]=t[r(520)]();break;case 4:a[r(366)]=t[r(450)]();break;case 5:a[r(490)]=t[r(520)]();break;case 6:a[r(388)]=t[r(450)]();break;case 7:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;return e(475)!=typeof t||null===t?e(459):null!=t[e(423)]&&t[e(383)](e(423))&&!r[e(454)](t[e(423)])?e(369):null!=t[e(453)]&&t[e(383)](e(453))&&!r[e(454)](t[e(453)])?e(362):null!=t[e(425)]&&t[e(383)](e(425))&&e(433)!=typeof t[e(425)]?e(350):null!=t[e(366)]&&t[e(383)](e(366))&&!r[e(454)](t[e(366)])?e(512):null!=t[e(490)]&&t[e(383)](e(490))&&e(433)!=typeof t[e(490)]?e(374):null!=t[e(388)]&&t[e(383)](e(388))&&!r[e(454)](t[e(388)])?e(375):null!=t[e(519)]&&t[e(383)](e(519))&&e(433)!=typeof t[e(519)]?e(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(486)])return t;var n=new(s[e(486)]);return null!=t[e(423)]&&(n[e(423)]=String(t[e(423)])),null!=t[e(453)]&&(n[e(453)]=String(t[e(453)])),null!=t[e(425)]&&(n[e(425)]=Boolean(t[e(425)])),null!=t[e(366)]&&(n[e(366)]=String(t[e(366)])),null!=t[e(490)]&&(n[e(490)]=Boolean(t[e(490)])),null!=t[e(388)]&&(n[e(388)]=String(t[e(388)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(423)]="",r[n(453)]="",r[n(425)]=!1,r[n(366)]="",r[n(490)]=!1,r[n(388)]="",r[n(519)]=!1),null!=t[n(423)]&&t[n(383)](n(423))&&(r[n(423)]=t[n(423)]),null!=t[n(453)]&&t[n(383)](n(453))&&(r[n(453)]=t[n(453)]),null!=t[n(425)]&&t[n(383)](n(425))&&(r[n(425)]=t[n(425)]),null!=t[n(366)]&&t[n(383)](n(366))&&(r[n(366)]=t[n(366)]),null!=t[n(490)]&&t[n(383)](n(490))&&(r[n(490)]=t[n(490)]),null!=t[n(388)]&&t[n(383)](n(388))&&(r[n(388)]=t[n(388)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(435)},i}(),s[t(401)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(387)]="",i[o(502)][o(372)]="",i[o(502)][o(488)]=!1,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(387)]&&Object[r(383)][r(513)](t,r(387))&&e[r(407)](10)[r(450)](t[r(387)]),null!=t[r(372)]&&Object[r(383)][r(513)](t,r(372))&&e[r(407)](18)[r(450)](t[r(372)]),null!=t[r(488)]&&Object[r(383)][r(513)](t,r(488))&&e[r(407)](24)[r(520)](t[r(488)]),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](32)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(401)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(387)]=t[r(450)]();break;case 2:a[r(372)]=t[r(450)]();break;case 3:a[r(488)]=t[r(520)]();break;case 4:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;return e(475)!=typeof t||null===t?e(459):null!=t[e(387)]&&t[e(383)](e(387))&&!r[e(454)](t[e(387)])?e(413):null!=t[e(372)]&&t[e(383)](e(372))&&!r[e(454)](t[e(372)])?e(508):null!=t[e(488)]&&t[e(383)](e(488))&&e(433)!=typeof t[e(488)]?e(385):null!=t[e(519)]&&t[e(383)](e(519))&&e(433)!=typeof t[e(519)]?e(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(401)])return t;var n=new(s[e(401)]);return null!=t[e(387)]&&(n[e(387)]=String(t[e(387)])),null!=t[e(372)]&&(n[e(372)]=String(t[e(372)])),null!=t[e(488)]&&(n[e(488)]=Boolean(t[e(488)])),null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(387)]="",r[n(372)]="",r[n(488)]=!1,r[n(519)]=!1),null!=t[n(387)]&&t[n(383)](n(387))&&(r[n(387)]=t[n(387)]),null!=t[n(372)]&&t[n(383)](n(372))&&(r[n(372)]=t[n(372)]),null!=t[n(488)]&&t[n(383)](n(488))&&(r[n(488)]=t[n(488)]),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(367)},i}(),s[t(365)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(353)]=null,i[o(502)][o(460)]=null,i[o(502)][o(382)]=0,i[o(502)][o(482)]=null,i[o(502)][o(519)]=!1,i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;return e||(e=n[r(418)]()),null!=t[r(353)]&&Object[r(383)][r(513)](t,r(353))&&s[r(392)][r(403)](t[r(353)],e[r(407)](10)[r(412)]())[r(500)](),null!=t[r(460)]&&Object[r(383)][r(513)](t,r(460))&&s[r(392)][r(403)](t[r(460)],e[r(407)](18)[r(412)]())[r(500)](),null!=t[r(382)]&&Object[r(383)][r(513)](t,r(382))&&e[r(407)](24)[r(407)](t[r(382)]),null!=t[r(482)]&&Object[r(383)][r(513)](t,r(482))&&s[r(392)][r(403)](t[r(482)],e[r(407)](34)[r(412)]())[r(500)](),null!=t[r(519)]&&Object[r(383)][r(513)](t,r(519))&&e[r(407)](40)[r(520)](t[r(519)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(365)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(353)]=s[r(392)][r(348)](t,t[r(407)]());break;case 2:a[r(460)]=s[r(392)][r(348)](t,t[r(407)]());break;case 3:a[r(382)]=t[r(407)]();break;case 4:a[r(482)]=s[r(392)][r(348)](t,t[r(407)]());break;case 5:a[r(519)]=t[r(520)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e,n=o;return n(475)!=typeof t||null===t?n(459):null!=t[n(353)]&&t[n(383)](n(353))&&(e=s[n(392)][n(470)](t[n(353)]))?n(355)+e:null!=t[n(460)]&&t[n(383)](n(460))&&(e=s[n(392)][n(470)](t[n(460)]))?n(469)+e:null!=t[n(382)]&&t[n(383)](n(382))&&!r[n(514)](t[n(382)])?n(517):null!=t[n(482)]&&t[n(383)](n(482))&&(e=s[n(392)][n(470)](t[n(482)]))?n(420)+e:null!=t[n(519)]&&t[n(383)](n(519))&&n(433)!=typeof t[n(519)]?n(498):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(365)])return t;var n=new(s[e(365)]);if(null!=t[e(353)]){if(e(475)!=typeof t[e(353)])throw TypeError(e(419));n[e(353)]=s[e(392)][e(474)](t[e(353)])}if(null!=t[e(460)]){if(e(475)!=typeof t[e(460)])throw TypeError(e(426));n[e(460)]=s[e(392)][e(474)](t[e(460)])}if(null!=t[e(382)]&&(n[e(382)]=t[e(382)]>>>0),null!=t[e(482)]){if(e(475)!=typeof t[e(482)])throw TypeError(e(463));n[e(482)]=s[e(392)][e(474)](t[e(482)])}return null!=t[e(519)]&&(n[e(519)]=Boolean(t[e(519)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};return e[n(499)]&&(r[n(353)]=null,r[n(460)]=null,r[n(382)]=0,r[n(482)]=null,r[n(519)]=!1),null!=t[n(353)]&&t[n(383)](n(353))&&(r[n(353)]=s[n(392)][n(496)](t[n(353)],e)),null!=t[n(460)]&&t[n(383)](n(460))&&(r[n(460)]=s[n(392)][n(496)](t[n(460)],e)),null!=t[n(382)]&&t[n(383)](n(382))&&(r[n(382)]=t[n(382)]),null!=t[n(482)]&&t[n(383)](n(482))&&(r[n(482)]=s[n(392)][n(496)](t[n(482)],e)),null!=t[n(519)]&&t[n(383)](n(519))&&(r[n(519)]=t[n(519)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(452)},i}(),s[t(392)]=function(){var o=t;function i(t){var e=yr;if(this[e(516)]=[],t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(423)]="",i[o(502)][o(505)]=!1,i[o(502)][o(357)]=!1,i[o(502)][o(516)]=r[o(451)],i[o(502)][o(373)]="",i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;if(e||(e=n[r(418)]()),null!=t[r(423)]&&Object[r(383)][r(513)](t,r(423))&&e[r(407)](10)[r(450)](t[r(423)]),null!=t[r(505)]&&Object[r(383)][r(513)](t,r(505))&&e[r(407)](16)[r(520)](t[r(505)]),null!=t[r(357)]&&Object[r(383)][r(513)](t,r(357))&&e[r(407)](24)[r(520)](t[r(357)]),null!=t[r(516)]&&t[r(516)][r(492)]){e[r(407)](34)[r(412)]();for(var s=0;s<t[r(516)][r(492)];++s)e[r(407)](t[r(516)][s]);e[r(500)]()}return null!=t[r(373)]&&Object[r(383)][r(513)](t,r(373))&&e[r(407)](42)[r(450)](t[r(373)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var r=o;t instanceof e||(t=e[r(418)](t));for(var i=void 0===n?t[r(439)]:t[r(402)]+n,a=new(s[r(392)]);t[r(402)]<i;){var c=t[r(407)]();switch(c>>>3){case 1:a[r(423)]=t[r(450)]();break;case 2:a[r(505)]=t[r(520)]();break;case 3:a[r(357)]=t[r(520)]();break;case 4:if(a[r(516)]&&a[r(516)][r(492)]||(a[r(516)]=[]),2==(7&c))for(var d=t[r(407)]()+t[r(402)];t[r(402)]<d;)a[r(516)][r(371)](t[r(407)]());else a[r(516)][r(371)](t[r(407)]());break;case 5:a[r(373)]=t[r(450)]();break;default:t[r(400)](7&c)}}return a},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;if(e(475)!=typeof t||null===t)return e(459);if(null!=t[e(423)]&&t[e(383)](e(423))&&!r[e(454)](t[e(423)]))return e(369);if(null!=t[e(505)]&&t[e(383)](e(505))&&e(433)!=typeof t[e(505)])return e(386);if(null!=t[e(357)]&&t[e(383)](e(357))&&e(433)!=typeof t[e(357)])return e(467);if(null!=t[e(516)]&&t[e(383)](e(516))){if(!Array[e(434)](t[e(516)]))return e(495);for(var n=0;n<t[e(516)][e(492)];++n)if(!r[e(514)](t[e(516)][n]))return e(404)}return null!=t[e(373)]&&t[e(383)](e(373))&&!r[e(454)](t[e(373)])?e(428):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(392)])return t;var n=new(s[e(392)]);if(null!=t[e(423)]&&(n[e(423)]=String(t[e(423)])),null!=t[e(505)]&&(n[e(505)]=Boolean(t[e(505)])),null!=t[e(357)]&&(n[e(357)]=Boolean(t[e(357)])),t[e(516)]){if(!Array[e(434)](t[e(516)]))throw TypeError(e(360));n[e(516)]=[];for(var r=0;r<t[e(516)][e(492)];++r)n[e(516)][r]=t[e(516)][r]>>>0}return null!=t[e(373)]&&(n[e(373)]=String(t[e(373)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(455)]||e[n(499)])&&(r[n(516)]=[]),e[n(499)]&&(r[n(423)]="",r[n(505)]=!1,r[n(357)]=!1,r[n(373)]=""),null!=t[n(423)]&&t[n(383)](n(423))&&(r[n(423)]=t[n(423)]),null!=t[n(505)]&&t[n(383)](n(505))&&(r[n(505)]=t[n(505)]),null!=t[n(357)]&&t[n(383)](n(357))&&(r[n(357)]=t[n(357)]),t[n(516)]&&t[n(516)][n(492)]){r[n(516)]=[];for(var s=0;s<t[n(516)][n(492)];++s)r[n(516)][s]=t[n(516)][s]}return null!=t[n(373)]&&t[n(383)](n(373))&&(r[n(373)]=t[n(373)]),r},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(378)},i}(),s[t(376)]=function(){var r=t;function o(t){var e=yr;if(t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(502)][r(414)]=null,o[r(502)][r(484)]=null,o[r(418)]=function(t){return new o(t)},o[r(403)]=function(t,e){var o=r;return e||(e=n[o(418)]()),null!=t[o(414)]&&Object[o(383)][o(513)](t,o(414))&&s[o(392)][o(403)](t[o(414)],e[o(407)](10)[o(412)]())[o(500)](),null!=t[o(484)]&&Object[o(383)][o(513)](t,o(484))&&s[o(392)][o(403)](t[o(484)],e[o(407)](18)[o(412)]())[o(500)](),e},o[r(443)]=function(t,e){var n=r;return this[n(403)](t,e)[n(500)]()},o[r(348)]=function(t,n){var o=r;t instanceof e||(t=e[o(418)](t));for(var i=void 0===n?t[o(439)]:t[o(402)]+n,a=new(s[o(376)]);t[o(402)]<i;){var c=t[o(407)]();switch(c>>>3){case 1:a[o(414)]=s[o(392)][o(348)](t,t[o(407)]());break;case 2:a[o(484)]=s[o(392)][o(348)](t,t[o(407)]());break;default:t[o(400)](7&c)}}return a},o[r(478)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},o[r(470)]=function(t){var e,n=r;return n(475)!=typeof t||null===t?n(459):null!=t[n(414)]&&t[n(383)](n(414))&&(e=s[n(392)][n(470)](t[n(414)]))?n(398)+e:null!=t[n(484)]&&t[n(383)](n(484))&&(e=s[n(392)][n(470)](t[n(484)]))?n(406)+e:null},o[r(474)]=function(t){var e=r;if(t instanceof s[e(376)])return t;var n=new(s[e(376)]);if(null!=t[e(414)]){if(e(475)!=typeof t[e(414)])throw TypeError(e(363));n[e(414)]=s[e(392)][e(474)](t[e(414)])}if(null!=t[e(484)]){if(e(475)!=typeof t[e(484)])throw TypeError(e(476));n[e(484)]=s[e(392)][e(474)](t[e(484)])}return n},o[r(496)]=function(t,e){var n=r;e||(e={});var o={};return e[n(499)]&&(o[n(414)]=null,o[n(484)]=null),null!=t[n(414)]&&t[n(383)](n(414))&&(o[n(414)]=s[n(392)][n(496)](t[n(414)],e)),null!=t[n(484)]&&t[n(383)](n(484))&&(o[n(484)]=s[n(392)][n(496)](t[n(484)],e)),o},o[r(502)][r(521)]=function(){var t=r;return this[t(370)][t(496)](this,d[t(438)][t(446)])},o[r(458)]=function(t){var e=r;return void 0===t&&(t=e(442)),t+e(481)},o}(),s[t(397)]=function(){var o=t;function i(t){var e=yr;if(this[e(444)]=[],this[e(465)]={},t)for(var n=Object[e(346)](t),r=0;r<n[e(492)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(502)][o(436)]="",i[o(502)][o(444)]=r[o(451)],i[o(502)][o(471)]="",i[o(502)][o(465)]=r[o(379)],i[o(502)][o(408)]="",i[o(418)]=function(t){return new i(t)},i[o(403)]=function(t,e){var r=o;if(e||(e=n[r(418)]()),null!=t[r(436)]&&Object[r(383)][r(513)](t,r(436))&&e[r(407)](10)[r(450)](t[r(436)]),null!=t[r(444)]&&t[r(444)][r(492)])for(var i=0;i<t[r(444)][r(492)];++i)s[r(397)][r(403)](t[r(444)][i],e[r(407)](18)[r(412)]())[r(500)]();if(null!=t[r(471)]&&Object[r(383)][r(513)](t,r(471))&&e[r(407)](26)[r(450)](t[r(471)]),null!=t[r(465)]&&Object[r(383)][r(513)](t,r(465))){var a=Object[r(346)](t[r(465)]);for(i=0;i<a[r(492)];++i)e[r(407)](34)[r(412)]()[r(407)](10)[r(450)](a[i])[r(407)](16)[r(520)](t[r(465)][a[i]])[r(500)]()}return null!=t[r(408)]&&Object[r(383)][r(513)](t,r(408))&&e[r(407)](42)[r(450)](t[r(408)]),e},i[o(443)]=function(t,e){var n=o;return this[n(403)](t,e)[n(500)]()},i[o(348)]=function(t,n){var i=o;t instanceof e||(t=e[i(418)](t));for(var a,c,d=void 0===n?t[i(439)]:t[i(402)]+n,u=new(s[i(397)]);t[i(402)]<d;){var l=t[i(407)]();switch(l>>>3){case 1:u[i(436)]=t[i(450)]();break;case 2:u[i(444)]&&u[i(444)][i(492)]||(u[i(444)]=[]),u[i(444)][i(371)](s[i(397)][i(348)](t,t[i(407)]()));break;case 3:u[i(471)]=t[i(450)]();break;case 4:u[i(465)]===r[i(379)]&&(u[i(465)]={});var p=t[i(407)]()+t[i(402)];for(a="",c=!1;t[i(402)]<p;){var h=t[i(407)]();switch(h>>>3){case 1:a=t[i(450)]();break;case 2:c=t[i(520)]();break;default:t[i(400)](7&h)}}u[i(465)][a]=c;break;case 5:u[i(408)]=t[i(450)]();break;default:t[i(400)](7&l)}}return u},i[o(478)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(348)](t,t[n(407)]())},i[o(470)]=function(t){var e=o;if(e(475)!=typeof t||null===t)return e(459);if(null!=t[e(436)]&&t[e(383)](e(436))&&!r[e(454)](t[e(436)]))return e(368);if(null!=t[e(444)]&&t[e(383)](e(444))){if(!Array[e(434)](t[e(444)]))return e(480);for(var n=0;n<t[e(444)][e(492)];++n){var i=s[e(397)][e(470)](t[e(444)][n]);if(i)return e(464)+i}}if(null!=t[e(471)]&&t[e(383)](e(471))&&!r[e(454)](t[e(471)]))return e(448);if(null!=t[e(465)]&&t[e(383)](e(465))){if(!r[e(394)](t[e(465)]))return e(431);var a=Object[e(346)](t[e(465)]);for(n=0;n<a[e(492)];++n)if(e(433)!=typeof t[e(465)][a[n]])return e(359)}return null!=t[e(408)]&&t[e(383)](e(408))&&!r[e(454)](t[e(408)])?e(507):null},i[o(474)]=function(t){var e=o;if(t instanceof s[e(397)])return t;var n=new(s[e(397)]);if(null!=t[e(436)]&&(n[e(436)]=String(t[e(436)])),t[e(444)]){if(!Array[e(434)](t[e(444)]))throw TypeError(e(466));n[e(444)]=[];for(var r=0;r<t[e(444)][e(492)];++r){if(e(475)!=typeof t[e(444)][r])throw TypeError(e(415));n[e(444)][r]=s[e(397)][e(474)](t[e(444)][r])}}if(null!=t[e(471)]&&(n[e(471)]=String(t[e(471)])),t[e(465)]){if(e(475)!=typeof t[e(465)])throw TypeError(e(445));n[e(465)]={};var i=Object[e(346)](t[e(465)]);for(r=0;r<i[e(492)];++r)n[e(465)][i[r]]=Boolean(t[e(465)][i[r]])}return null!=t[e(408)]&&(n[e(408)]=String(t[e(408)])),n},i[o(496)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(455)]||e[n(499)])&&(i[n(444)]=[]),(e[n(405)]||e[n(499)])&&(i[n(465)]={}),e[n(499)]&&(i[n(436)]="",i[n(471)]="",i[n(408)]=""),null!=t[n(436)]&&t[n(383)](n(436))&&(i[n(436)]=t[n(436)]),t[n(444)]&&t[n(444)][n(492)]){i[n(444)]=[];for(var a=0;a<t[n(444)][n(492)];++a)i[n(444)][a]=s[n(397)][n(496)](t[n(444)][a],e)}if(null!=t[n(471)]&&t[n(383)](n(471))&&(i[n(471)]=t[n(471)]),t[n(465)]&&(r=Object[n(346)](t[n(465)]))[n(492)])for(i[n(465)]={},a=0;a<r[n(492)];++a)i[n(465)][r[a]]=t[n(465)][r[a]];return null!=t[n(408)]&&t[n(383)](n(408))&&(i[n(408)]=t[n(408)]),i},i[o(502)][o(521)]=function(){var t=o;return this[t(370)][t(496)](this,d[t(438)][t(446)])},i[o(458)]=function(t){var e=o;return void 0===t&&(t=e(442)),t+e(506)},i}(),s})(),Ir=Or;function Or(t,e){const n=Sr();return(Or=function(t,e){return n[t-=331]})(t,e)}!function(t){const e=Or,n=t();for(;;)try{if(744823===-parseInt(e(341))/1+-parseInt(e(339))/2+-parseInt(e(338))/3*(-parseInt(e(335))/4)+-parseInt(e(352))/5*(parseInt(e(350))/6)+-parseInt(e(351))/7*(parseInt(e(334))/8)+parseInt(e(344))/9*(parseInt(e(349))/10)+parseInt(e(340))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Sr);class vr{[Ir(347)];constructor(){this[Ir(347)]=br}[Ir(331)](t){return new wr(this[Ir(347)][t])}}class wr{[Ir(333)];constructor(t){this[Ir(333)]=t}[Ir(332)](t){const e=Ir,n=this[e(333)][e(343)](t);if(n)throw Error(n);return this[e(333)][e(337)](this[e(333)][e(345)](t))[e(348)]()}[Ir(346)](t){const e=Ir;return this[e(333)][e(336)](this[e(333)][e(342)](t),{oneofs:!0})}}function Sr(){const t=["643790PCAAJa","6QRFIHZ","63tkWBIK","5400105dPDNtU","getDescriptor","compress","_protobuf","883208lpGXWO","14636HlbnvH","toObject","encode","957RPWZeG","2113320vDMYgk","19141309zoClPi","512944HewsHI","decode","verify","207iTAsHR","create","decompress","_protobufRoot","finish"];return(Sr=function(){return t})()}function kr(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Ar(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Tr="[object RegExp]",_r="[object String]",Cr="[object Number]",Pr="[object Boolean]",Er="[object Arguments]",jr="[object Symbol]",Dr="[object Date]",xr="[object Map]",Rr="[object Set]",Nr="[object Array]",Vr="[object ArrayBuffer]",Mr="[object Object]",Br="[object DataView]",Ur="[object Uint8Array]",Jr="[object Uint8ClampedArray]",qr="[object Uint16Array]",Lr="[object Uint32Array]",Gr="[object Int8Array]",Hr="[object Int16Array]",Yr="[object Int32Array]",Fr="[object Float32Array]",zr="[object Float64Array]";function Kr(t,e,n,r=new Map,s=void 0){const o=s?.(t,e,n,r);if(null!=o)return o;if(function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;r.set(t,e);for(const[o,i]of t)e.set(o,Kr(i,o,n,r,s));return e}if(t instanceof Set){const e=new Set;r.set(t,e);for(const o of t)e.add(Kr(o,void 0,n,r,s));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(i=t,ArrayBuffer.isView(i)&&!(i instanceof DataView)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return e}var i;if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return r.set(t,e),Wr(e,t,n,r,s),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Blob){const e=new Blob([t],{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Error){const e=new t.constructor;return r.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,Wr(e,t,n,r,s),e}if("object"==typeof t&&function(t){switch(Ar(t)){case Er:case Nr:case Vr:case Br:case Pr:case Dr:case Fr:case zr:case Gr:case Hr:case Yr:case xr:case Cr:case Mr:case Tr:case Rr:case _r:case jr:case Ur:case Jr:case qr:case Lr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Wr(e,t,n,r,s),e}return t}function Wr(t,e,n=t,r,s){const o=[...Object.keys(e),...kr(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Kr(e[a],a,n,r,s))}}function Qr(t,e){return function(t,e){return Kr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Cr:case _r:case Pr:{const e=new t.constructor(t?.valueOf());return Wr(e,t),e}case Er:{const e={};return Wr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Xr(t){return Qr(t)}function Zr(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function $r(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return ts(t,e,o,i)}return ts(t,e,o,i)}function ts(t,e,n,r){if(Object.is(t,e))return!0;let s=Ar(t),o=Ar(e);if(s===Er&&(s=Mr),o===Er&&(o=Mr),s!==o)return!1;switch(s){case _r:return t.toString()===e.toString();case Cr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Pr:case Dr:case jr:return Object.is(t.valueOf(),e.valueOf());case Tr:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case xr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!$r(o,e.get(s),s,t,e,n,r))return!1;return!0;case Rr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>$r(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Nr:case Ur:case Jr:case qr:case Lr:case"[object BigUint64Array]":case Gr:case Hr:case Yr:case"[object BigInt64Array]":case Fr:case zr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!$r(t[s],e[s],s,t,e,n,r))return!1;return!0;case Vr:return t.byteLength===e.byteLength&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case Br:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Mr:{if(!(ts(t.constructor,e.constructor,n,r)||Zr(t)&&Zr(e)))return!1;const s=[...Object.keys(t),...kr(t)],o=[...Object.keys(e),...kr(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!$r(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function es(){}function ns(t,e){return function(t,e,n){return $r(t,e,void 0,void 0,void 0,void 0,n)}(t,e,es)}function rs(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ss(t,e){const n=os,r=Xr(t);return r[n(282)][r[n(282)][n(283)]-1]+=e,r}function os(t,e){const n=us();return(os=function(t,e){return n[t-=281]})(t,e)}function is(t,e){const n=os;return t[n(298)]===e[n(298)]&&ns(t[n(282)],e[n(282)])}function as(t){const e=os;ds(t,t=>(e(281)==t[e(298)]?(t[e(284)]=!0,delete t[e(298)]):e(297)==t[e(298)]&&(t[e(289)]=!0,delete t[e(298)]),t))}function cs(t){const e=os;ds(t,t=>(t[e(284)]?(t[e(298)]=e(281),delete t[e(284)]):t[e(289)]&&(t[e(298)]=e(297),delete t[e(289)]),t))}function ds(t,e){const n=os;for(const r in t){const s=t[r];n(286)!==r&&rs(s)&&(s[n(282)]&&(s[n(298)]||s[n(284)]||s[n(289)])?t[r]=e(s):ds(s,e))}return t}function us(){const t=["10oYgwOu","main","path","length","rootMain","4487270VXywKS","nodes","3523116pmYlSA","665613gEoJKQ","rootGraveyard","2152cWAhpw","71113odorwT","22740773LmLryf","150KfODkt","2151ORrkgt","3jxFAiv","1113026dRRHkB","$graveyard","root"];return(us=function(){return t})()}!function(t){const e=os,n=t();for(;;)try{if(510276===-parseInt(e(288))/1+-parseInt(e(296))/2+-parseInt(e(295))/3*(-parseInt(e(287))/4)+-parseInt(e(285))/5+-parseInt(e(293))/6*(parseInt(e(291))/7)+parseInt(e(290))/8*(-parseInt(e(294))/9)+parseInt(e(299))/10*(parseInt(e(292))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(us);const ls=ps;function ps(t,e){const n=hs();return(ps=function(t,e){return n[t-=196]})(t,e)}function hs(){const t=["compress","_operationName","10250umZfwP","buffers","132WRafWt","1496pOHUyb","525427RzAmzI","453246EAtyMh","_id","4204673HhvMeT","shift","10tLWgVq","5499nHitzH","__className","_protobufDescriptor","88zlpAdf","decompress","push","3540308paqrtc","types","400mjhrth","3354645FcllII"];return(hs=function(){return t})()}!function(t){const e=ps,n=t();for(;;)try{if(601317===-parseInt(e(208))/1*(parseInt(e(201))/2)+-parseInt(e(202))/3+-parseInt(e(199))/4+-parseInt(e(214))/5*(-parseInt(e(210))/6)+parseInt(e(209))/7*(-parseInt(e(196))/8)+-parseInt(e(215))/9*(parseInt(e(205))/10)+-parseInt(e(212))/11*(-parseInt(e(207))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class fs{[ls(211)];[ls(204)];[ls(217)];constructor(t,e,n){const r=ls;this[r(211)]=t,this[r(204)]=e,this[r(217)]=n}[ls(203)](t,e){const n=ls,r=e[n(213)]();return as(r),t[n(206)][n(198)](this[n(217)][n(203)](r)),t[n(200)][n(198)](this[n(211)]),!0}[ls(197)](t,e){const n=ls;e[n(200)][n(213)]();const r=this[n(217)][n(197)](e[n(206)][n(213)]());cs(r),r[n(216)]=this[n(204)],t[n(198)](r)}}const ms=gs;function ys(){const t=["58846XnDTXW","28521ECLieN","push","333bRthej","7643471jboaxH","Json","newValue","compress","decompress","stringify","boolean","29NEFoKf","__className","_deserializeOneOf","_id","buffers","5809060EjHrWy","12jdWcTN","1708PeAlAa","Boolean","9426MwrJNS","3926272HvwKvt","10HFxwJQ","20444yRICNw","parse","_operationName","shift","_serializeOneOf","oldValue","_protobufDescriptor","types"];return(ys=function(){return t})()}function gs(t,e){const n=ys();return(gs=function(t,e){return n[t-=354]})(t,e)}!function(t){const e=gs,n=t();for(;;)try{if(863526===parseInt(e(369))/1*(parseInt(e(358))/2)+-parseInt(e(361))/3*(parseInt(e(381))/4)+parseInt(e(374))/5+parseInt(e(378))/6*(-parseInt(e(376))/7)+parseInt(e(379))/8+-parseInt(e(359))/9*(-parseInt(e(380))/10)+-parseInt(e(362))/11*(parseInt(e(375))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ys);class bs extends fs{[ms(365)](t,e){const n=ms,r=e[n(384)]();return this[n(354)](n(355),r),this[n(354)](n(364),r),as(r),t[n(373)][n(360)](this[n(356)][n(365)](r)),t[n(357)][n(360)](this[n(372)]),!0}[ms(366)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(356)][n(366)](s[n(384)]());r[n(384)](),this[n(371)](n(355),o),this[n(371)](n(364),o),cs(o),o[n(370)]=this[n(383)],t[n(360)](o)}[ms(354)](t,e){const n=ms,r=e[t];n(368)==typeof r?e[t+n(377)]=r:e[t+n(363)]=JSON[n(367)](r)}[ms(371)](t,e){const n=ms,r=t+n(363);e[r]?(e[t]=JSON[n(382)](e[r]),delete e[r]):(e[t]=e[t+n(377)],delete e[t+n(377)])}}function Is(t,e){const n=ws();return(Is=function(t,e){return n[t-=440]})(t,e)}const Os=Is;!function(t){const e=Is,n=t();for(;;)try{if(941780===-parseInt(e(458))/1*(-parseInt(e(456))/2)+parseInt(e(472))/3+-parseInt(e(444))/4+parseInt(e(453))/5+parseInt(e(443))/6*(parseInt(e(451))/7)+parseInt(e(464))/8*(parseInt(e(441))/9)+-parseInt(e(455))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ws);class vs extends fs{[Os(468)](t,e){const n=Os,r=e[n(447)]();return this[n(446)](r[n(460)]),as(r),t[n(448)][n(459)](this[n(454)][n(468)](r)),t[n(452)][n(459)](this[n(471)]),!0}[Os(457)](t,e){const n=Os,{types:r,buffers:s}=e,o=this[n(454)][n(457)](s[n(447)]());r[n(447)](),o[n(460)]||(o[n(460)]=[]),this[n(463)](o[n(460)]),cs(o),o[n(467)]=this[n(450)],t[n(459)](o)}[Os(446)](t){const e=Os;for(const n of t){if(n[e(440)]){const t=n[e(440)];this[e(469)](t)?n[e(470)]=t:n[e(465)]=JSON[e(462)](t)}n[e(461)]&&this[e(446)](n[e(461)])}}[Os(463)](t){const e=Os;for(const n of t)(n[e(470)]||n[e(465)])&&(n[e(470)]?(n[e(440)]=n[e(470)],delete n[e(470)]):(n[e(440)]=JSON[e(466)](n[e(465)]),delete n[e(465)])),n[e(461)]&&this[e(463)](n[e(461)])}[Os(469)](t){const e=Os;return Object[e(442)](t)[e(445)](n=>e(449)==typeof t[n])}}function ws(){const t=["1038PwkMoM","4746292XyqaIo","every","_serializeNodesAttributes","shift","buffers","boolean","_operationName","27398ZKFJCY","types","7738285giQepw","_protobufDescriptor","38460690FbxKrv","878hLOUbp","decompress","2081ZNgblz","push","nodes","children","stringify","_deserializeNodesAttributes","296RTEIaS","attributesJson","parse","__className","compress","_areValuesBoolean","attributesBoolean","_id","5636349TpSLpO","attributes","232857hmqRVs","keys"];return(ws=function(){return t})()}function Ss(t,e){const n=As();return(Ss=function(t,e){return n[t-=330]})(t,e)}const ks=Ss;function As(){const t=["4034298wGAxdd","decompress","length","1828FqFpQO","newRange","oldRange","2742784hAmFvH","307tcrmHR","4251961WRmTfN","1290QfqTSF","2836OwkgyI","126153TKOtmg","2762136ucKRUa","2190bskdtl"];return(As=function(){return t})()}!function(t){const e=Ss,n=t();for(;;)try{if(867562===parseInt(e(333))/1*(parseInt(e(336))/2)+-parseInt(e(340))/3+-parseInt(e(343))/4*(-parseInt(e(335))/5)+-parseInt(e(338))/6+-parseInt(e(334))/7+-parseInt(e(332))/8+parseInt(e(337))/9*(parseInt(e(339))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(As);class Ts extends fs{[ks(341)](t,e){const n=ks;super[n(341)](t,e);const r=t[t[n(342)]-1];r[n(331)]||(r[n(331)]=null),r[n(330)]||(r[n(330)]=null)}}function _s(t,e){var n=Ps();return(_s=function(t,e){return n[t-=184]})(t,e)}var Cs=_s;function Ps(){var t=["768344vlysHv","shift","_id","_operationName","2624020uIqhvU","compress","6245298dLajWg","38MwWmfW","6lpNKTU","push","6lQLjWk","types","7746gjOeWb","6262360CNzZWC","22AtLWyE","688565vKGGrl","1034710yluyPB","decompress"];return(Ps=function(){return t})()}!function(t){for(var e=_s,n=t();;)try{if(915166===parseInt(e(201))/1*(-parseInt(e(188))/2)+-parseInt(e(186))/3*(parseInt(e(194))/4)+-parseInt(e(191))/5*(-parseInt(e(184))/6)+-parseInt(e(198))/7+parseInt(e(189))/8+parseInt(e(200))/9+-parseInt(e(192))/10*(-parseInt(e(190))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ps);class Es extends fs{[Cs(199)](t,e){var n=Cs;return e[n(195)](),t[n(187)][n(185)](this[n(196)]),!0}[Cs(193)](t,e){var n=Cs;e[n(187)][n(195)](),t[n(185)]({__className:this[n(197)]})}}function js(){const t=["_omittedNamespace","328qTBsoJ","2949264nOjJgh","1012183BUmGzr","replace","7618086jdDNjv","name","startsWith","28twDKYA","2058218raEdfh","4298rWZTgi","__className","437105CjjuGA","length","decompress","MarkerOperation","compress","624780ukqSOh"];return(js=function(){return t})()}function Ds(t,e){const n=js();return(Ds=function(t,e){return n[t-=379]})(t,e)}const xs=Ds;!function(t){const e=Ds,n=t();for(;;)try{if(720794===parseInt(e(387))/1+parseInt(e(393))/2+parseInt(e(383))/3+parseInt(e(392))/4*(-parseInt(e(396))/5)+-parseInt(e(389))/6+parseInt(e(394))/7*(parseInt(e(385))/8)+parseInt(e(386))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(js);class Rs extends Ts{[xs(384)];constructor(t,e,n,r){const s=xs;super(t,e,n),this[s(384)]=r+":"}[xs(382)](t,e){const n=xs;return!(n(381)!=e[0][n(395)]||!e[0][n(390)][n(391)](this[n(384)])||(e[0][n(390)]=e[0][n(390)][n(388)](new RegExp("^"+this[n(384)]),""),super[n(382)](t,e),0))}[xs(380)](t,e){const n=xs;super[n(380)](t,e);const r=t[t[n(379)]-1];r[n(390)]=this[n(384)]+r[n(390)]}}function Ns(t,e){const n=Ms();return(Ns=function(t,e){return n[t-=344]})(t,e)}const Vs=Ns;function Ms(){const t=["2366637ebjBVu","_splitCurrent","_combineNext","501080NVLpYe","1453325sGXkYd","shift","2488704OWbxOm","decompress","_decompressSingleOperation","buffers","_compressSingleOperation","1104216FnGjeB","_context","_compareOperations","length","663722UySpMt","_id","push","types","2330352gZIUCw","compress"];return(Ms=function(){return t})()}!function(t){const e=Ns,n=t();for(;;)try{if(438311===-parseInt(e(361))/1+-parseInt(e(352))/2+-parseInt(e(348))/3+parseInt(e(364))/4+parseInt(e(362))/5+parseInt(e(356))/6+parseInt(e(358))/7)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ms);class Bs{[Vs(353)];[Vs(349)];constructor(t,e){const n=Vs;this[n(353)]=t,this[n(349)]=e}[Vs(357)](t,e){const n=Vs;let r;for(;e[n(351)]>1&&this[n(350)](e[0],e[1]);)r?(r=this[n(360)](e[n(363)](),r),t[n(355)][n(354)](0)):(r=Xr(e[n(363)]()),t[n(355)][n(354)](this[n(353)]));return!!r&&(r=this[n(360)](e[n(363)](),r),t[n(355)][n(354)](0),t[n(346)][n(354)](this[n(347)](r)),!0)}[Vs(344)](t,e){const n=Vs,r=this[n(345)](e);for(;0==e[n(355)][0];)e[n(355)][n(363)](),t[n(354)](this[n(359)](r));t[n(354)](r)}}const Us=Js;function Js(t,e){const n=Ls();return(Js=function(t,e){return n[t-=383]})(t,e)}!function(t){const e=Js,n=t();for(;;)try{if(357805===parseInt(e(398))/1*(parseInt(e(413))/2)+parseInt(e(416))/3+-parseInt(e(399))/4*(-parseInt(e(420))/5)+parseInt(e(412))/6*(parseInt(e(405))/7)+parseInt(e(401))/8*(-parseInt(e(390))/9)+parseInt(e(391))/10*(-parseInt(e(417))/11)+-parseInt(e(392))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ls);class qs extends Bs{[Us(397)](t,e){const n=Us;return e[n(395)][0][n(389)]+=t[n(395)][0][n(389)],e}[Us(388)](t){const e=Us,n=Xr(t),r=n[e(395)][0],s=t[e(395)][0],o=s[e(389)][Symbol[e(394)]]()[e(385)]()[e(403)],i=o[e(415)];return r[e(389)]=o,s[e(389)]=s[e(389)][e(409)](i),t[e(393)]=ss(t[e(393)],i),n}[Us(408)](t,e){const n=Us;if(this[n(406)](t)&&this[n(406)](e)){const r=t[n(395)][0][n(389)][n(415)],s=is(ss(t[n(393)],r),e[n(393)]),o=t[n(395)][0],i=e[n(395)][0];return s&&this[n(402)](o,i)}return!1}[Us(396)](t){const e=Us,n={types:[],buffers:[],baseVersion:0};return this[e(387)][e(386)](e(421))[e(419)](n,[t]),n[e(418)][0]}[Us(414)](t){const e=Us,n=[];return this[e(387)][e(386)](e(421))[e(400)](n,t),n[0]}[Us(406)](t){const e=Us;return e(421)==t[e(383)]&&1==t[e(395)][e(415)]&&t[e(395)][0][e(389)]&&!t[e(404)]&&1==Array[e(411)](t[e(395)][0][e(389)])[e(415)]}[Us(402)](t,e){const n=Us,r=Object[n(407)](t[n(384)]||{}),s=Object[n(407)](e[n(384)]||{});return r[n(415)]===s[n(415)]&&r[n(410)](r=>e[n(384)][r]&&e[n(384)][r]===t[n(384)][r])}}function Ls(){const t=["_compressSingleOperation","_combineNext","471315dmuAcU","4Yyktid","decompress","6744fXwKNd","_compareAttributes","value","wasUndone","569933vMLXfK","_checkOperation","keys","_compareOperations","substr","every","from","30dJgLhv","2OYvBbd","_decompressSingleOperation","length","912060mWhUXm","462935QkjPQh","buffers","compress","3428695gtyGfJ","InsertOperation","__className","attributes","next","_getCompressorByName","_context","_splitCurrent","data","5229VMmeQU","150MEryEq","4671672VJbGla","position","iterator","nodes"];return(Ls=function(){return t})()}const Gs=Ys;!function(t){const e=Ys,n=t();for(;;)try{if(677274===-parseInt(e(351))/1+parseInt(e(348))/2*(-parseInt(e(371))/3)+-parseInt(e(344))/4*(parseInt(e(355))/5)+parseInt(e(347))/6*(-parseInt(e(365))/7)+parseInt(e(360))/8+-parseInt(e(369))/9+-parseInt(e(352))/10*(-parseInt(e(358))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Fs);class Hs extends Bs{[Gs(357)](t,e){const n=Gs;return e[n(343)]++,e[n(362)]=Xr(t[n(362)]),e}[Gs(370)](t){const e=Gs,n=Xr(t);return t[e(343)]--,n[e(343)]=1,n[e(362)]=ss(n[e(362)],t[e(343)]),n}[Gs(364)](t,e){const n=Gs;return!(!this[n(346)](t)||!this[n(346)](e))&&is(ss(t[n(362)],-1),e[n(362)])&&is(t[n(366)],e[n(366)])}[Gs(350)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(359)][e(349)](e(342))[e(356)](n,[t]),n[e(353)][0]}[Gs(345)](t){const e=Gs,n=[];return this[e(359)][e(349)](e(342))[e(363)](n,t),n[0]}[Gs(346)](t){const e=Gs;return e(342)==t[e(361)]&&e(354)==t[e(366)][e(368)]&&1==t[e(343)]&&!t[e(367)]}}function Ys(t,e){const n=Fs();return(Ys=function(t,e){return n[t-=342]})(t,e)}function Fs(){const t=["root","5533731kvtGdJ","_splitCurrent","9735fPMRhD","MoveOperation","howMany","143932FlPIgD","_decompressSingleOperation","_checkOperation","14892xTOgpy","320errrHR","_getCompressorByName","_compressSingleOperation","418422JLQwMG","4673970FTpuvS","buffers","$graveyard","125ySHjzZ","compress","_combineNext","99lmHKAH","_context","277544zRXFTn","__className","sourcePosition","decompress","_compareOperations","3136UVDjWf","targetPosition","wasUndone"];return(Fs=function(){return t})()}const zs=Ks;function Ks(t,e){const n=Qs();return(Ks=function(t,e){return n[t-=256]})(t,e)}!function(t){const e=Ks,n=t();for(;;)try{if(205700===parseInt(e(282))/1+parseInt(e(270))/2+parseInt(e(272))/3+-parseInt(e(277))/4+-parseInt(e(256))/5+parseInt(e(273))/6*(-parseInt(e(259))/7)+parseInt(e(279))/8*(parseInt(e(264))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Qs);class Ws extends Bs{[zs(281)](t,e){return e[zs(263)]++,e}[zs(265)](t){const e=zs,n=Xr(t);return n[e(263)]=1,t[e(263)]--,n}[zs(267)](t,e){const n=zs;return!(!this[n(278)](t)||!this[n(278)](e))&&is(t[n(276)],e[n(276)])&&is(t[n(268)],e[n(268)])}[zs(260)](t){const e=zs,n={types:[],buffers:[],baseVersion:0};return this[e(257)][e(274)](e(266))[e(261)](n,[t]),n[e(283)][0]}[zs(269)](t){const e=zs,n=[];return this[e(257)][e(274)](e(266))[e(262)](n,t),n[0]}[zs(278)](t){const e=zs;return e(266)==t[e(271)]&&e(280)==t[e(268)][e(258)]&&1==t[e(263)]&&!t[e(275)]}}function Qs(){const t=["89380exvKVE","_context","root","101899cKcyOt","_compressSingleOperation","compress","decompress","howMany","984969tpmMoQ","_splitCurrent","MoveOperation","_compareOperations","targetPosition","_decompressSingleOperation","238766IRvICk","__className","733215DlOemH","42EOYhMe","_getCompressorByName","wasUndone","sourcePosition","1479204jximns","_checkOperation","24tWmRQL","$graveyard","_combineNext","3165brxDwb","buffers"];return(Qs=function(){return t})()}const Xs=$s;function Zs(){const t=["_compareOperations","1551rNBPCX","shift","_getCompressorByName","108PjZtwb","__className","11565WYiCHp","user:","oldRange","_context","start","1006542MFMleD","startsWith","8hJdDTc","60000YcosFf","end","5OfUDQh","user:position:","split","types","decompress","compress","stickiness","_compressSingleOperation","newRange","1871784msnkZi","9690QgLFdK","buffers","706174dyghyI","name","MarkerOperation","push","_decompressSingleOperation","toNone","_id","1537288unSHMr"];return(Zs=function(){return t})()}function $s(t,e){const n=Zs();return($s=function(t,e){return n[t-=152]})(t,e)}!function(t){const e=$s,n=t();for(;;)try{if(198767===parseInt(e(176))/1+-parseInt(e(166))/2*(parseInt(e(168))/3)+-parseInt(e(161))/4*(-parseInt(e(178))/5)+parseInt(e(187))/6+-parseInt(e(154))/7+-parseInt(e(175))/8*(parseInt(e(173))/9)+parseInt(e(152))/10*(-parseInt(e(163))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zs);class to extends Bs{[Xs(183)](t,e){const n=Xs;if(!this[n(162)](e[0],e[1]))return!1;const r=e[n(164)]();return r[n(170)]=null,r[n(186)]&&is(r[n(186)][n(172)],r[n(186)][n(177)])&&(r[n(186)][n(177)]=null),e[n(164)](),t[n(181)][n(157)](this[n(160)]),t[n(181)][n(157)](0),t[n(153)][n(157)](this[n(185)](r)),!0}[Xs(182)](t,e){const n=Xs,r=this[n(158)](e);r[n(186)]&&!r[n(186)][n(177)]&&(r[n(186)][n(177)]=Xr(r[n(186)][n(172)]));const s=Xr(r);s[n(186)]&&(s[n(186)][n(172)][n(184)]=n(159),s[n(186)][n(177)]=Xr(s[n(186)][n(172)])),s[n(155)]=n(179)+s[n(155)][n(180)](":")[2],e[n(181)][n(164)](),t[n(157)](r),t[n(157)](s)}[Xs(185)](t){const e=Xs,n={types:[],buffers:[],baseVersion:0};return this[e(171)][e(165)](e(156))[e(183)](n,[t]),n[e(153)][0]}[Xs(158)](t){const e=Xs,n=[];return this[e(171)][e(165)](e(156))[e(182)](n,t),n[0]}[Xs(162)](t,e){const n=Xs;return!!(t&&e&&n(156)==t[n(167)]&&n(156)==e[n(167)]&&t[n(155)][n(174)](n(169))&&e[n(155)][n(174)](n(169))&&t[n(155)]!=e[n(155)])}}const eo=ro;function no(){const t=["compress","suggestion","_registerActionCompressor","InsertOperation","1358430ncTFHd","MoveOperation","DeletingAction","baseVersion","10wXIQhk","set","comment","3818400AESYBm","NoOperation","TypingAction","_registerCompressor","no-operations-provided","CommentMarkerOperation","2YWUfjS","decompress","3551184mkGtJM","_registerOperationCompressor","MarkerOperation","__className","RootAttributeOperation","ForwardDeletingAction","4577027QFSJul","RenameOperation","_protobufFactory","674720bRFMWk","_compressorByName","UserSelectionAction","SplitOperation","getDescriptor","744753rYwdWK","AttributeOperation","_compressorById","types","forEach","49702mqRAdx","length","SuggestionMarkerOperation","_getCompressorByName","RootOperation","decompress-compressor-not-found","get","MergeOperation"];return(no=function(){return t})()}function ro(t,e){const n=no();return(ro=function(t,e){return n[t-=335]})(t,e)}!function(t){const e=ro,n=t();for(;;)try{if(525394===-parseInt(e(356))/1*(parseInt(e(377))/2)+parseInt(e(372))/3+parseInt(e(350))/4+-parseInt(e(347))/5*(parseInt(e(343))/6)+-parseInt(e(364))/7+parseInt(e(367))/8+parseInt(e(358))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(no);class so{[eo(374)];[eo(368)];[eo(366)];constructor(){const t=eo;this[t(374)]=new Map,this[t(368)]=new Map,this[t(366)]=new vr;const e=this[t(366)][t(371)](t(360));this[t(353)](1,t(351),new Es(1,t(351),void 0)),this[t(359)](10,t(373),bs),this[t(359)](11,t(342),vs),this[t(359)](12,t(360),Ts),this[t(359)](13,t(338),fs),this[t(359)](14,t(344),fs),this[t(359)](15,t(365),fs),this[t(359)](16,t(362),bs),this[t(359)](17,t(370),fs),this[t(353)](18,t(355),new Rs(18,t(360),e,t(349))),this[t(353)](19,t(379),new Rs(19,t(360),e,t(340))),this[t(359)](20,t(335),fs),this[t(341)](100,t(352),qs),this[t(341)](101,t(345),Hs),this[t(341)](102,t(363),Ws),this[t(341)](103,t(369),to)}[eo(339)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(354),this);const r={types:[],buffers:[],baseVersion:t[0][e(346)]};for(;t[e(378)];)this[e(380)](e(369))[e(339)](r,t)||this[e(380)](e(352))[e(339)](r,t)||this[e(380)](e(345))[e(339)](r,t)||this[e(380)](e(363))[e(339)](r,t)||this[e(380)](e(355))[e(339)](r,t)||this[e(380)](e(379))[e(339)](r,t)||this[e(380)](t[0][e(361)])[e(339)](r,t);return r}[eo(357)](t){const e=eo,r=[];for(;t[e(375)][e(378)];){const s=this[e(374)][e(337)](t[e(375)][0]);if(!s)throw new n.CKEditorError(e(336),this,{type:t[e(375)][0]});s[e(357)](r,t)}return r[e(376)]((n,r)=>n[e(346)]=t[e(346)]+r),r}[eo(380)](t){const e=eo;return this[e(368)][e(337)](t)}[eo(359)](t,e,n){const r=eo,s=new n(t,e,this[r(366)][r(371)](e));this[r(353)](t,e,s)}[eo(341)](t,e,n){const r=eo,s=new n(t,this);this[r(353)](t,e,s)}[eo(353)](t,e,n){const r=eo;this[r(374)][r(348)](t,n),this[r(368)][r(348)](e,n)}}function oo(){var t=["9qrDTlf","8gaUOzX","5270984mdaqxS","59321KbyekB","1030448FocQjt","796820tFTcyf","258853RBpYUs","3067464cBDKQs","140049WzFHZG"];return(oo=function(){return t})()}function io(t,e){var n=oo();return(io=function(t,e){return n[t-=473]})(t,e)}!function(t){for(var e=io,n=t();;)try{if(275100===-parseInt(e(476))/1+parseInt(e(477))/2+-parseInt(e(481))/3+-parseInt(e(474))/4*(parseInt(e(478))/5)+-parseInt(e(480))/6+parseInt(e(479))/7+parseInt(e(475))/8*(parseInt(e(473))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(oo);const ao=co;function co(t,e){const n=lo();return(co=function(t,e){return n[t-=101]})(t,e)}!function(t){const e=co,n=t();for(;;)try{if(626422===-parseInt(e(241))/1*(-parseInt(e(345))/2)+parseInt(e(197))/3+-parseInt(e(354))/4*(-parseInt(e(127))/5)+parseInt(e(107))/6*(parseInt(e(194))/7)+-parseInt(e(159))/8*(-parseInt(e(235))/9)+-parseInt(e(128))/10*(parseInt(e(262))/11)+-parseInt(e(122))/12*(parseInt(e(113))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lo);let uo=1;function lo(){const t=["_isPendingUpdate","listenTo","_isAttached","connection","keys","editor","fromJSON","unregister","high","add","_loadRoot","_sendBufferedOperationsDelayed","size","suppressErrorInCollaboration","656aVMsmV","_operationIdentifier","return","rootsAttributes","data","start","baseVersion","round","directChange","from","applyOperation","mySessionId","differ","offset","realtimecollaborationclient-init-non-existent-root","clone","catch","_shouldSendSelectionUpdate","isEnabled","document","sessionId","push","isOfficialPlugin","change:_isPendingUpdate","define","Notification","$root","_getAffectedRoot","getUser","position","change:_isEditingAllowed","_lastSyncedOperationId","initData","isDocumentOperation","channelSessions","28zgOiuE","_offset","_disconnectService","2040645qqlXaD","change:hasDomSelection","_lastServerVersion","rootName","error","selection","document:write","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","_connectAfterSessionHasBeenFlushed","permissions","404","plugins","remove","_refreshUserSelectionMarkers","metadata","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","_sendBufferedOperationsDelayId","reconnection: flushed session","cloud-services-internal-error: Request timeout.","_applyOperationsSet","loadRoot","addUser","addToReconnectionStack","sessionAdd:","then","PENDING_ACTION_SENDING_DATA","operationsReceived","length","parse","serverHistory","get","getOperationAuthor","markers","end","ready","_knownOperations","stopListening","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","21132OZIQln","isReadOnly","enqueueChange","wasUndone","move","sendOperations","8656jSxQlK","type","createdAt","_hasSynchronizationProblem","realtimecollaborationclient-init-connection-failed","path","InsertOperation","cloudServices.bundleVersion","realtimecollaborationclient-init-service-incorrect-server-operation","_pendingAction","getRoot","filter","init","realtimecollaborationclient","_fetchMissingUsers","history","409","lastOperationId","reset","_getOperationsFromInitData","multi-root-editor-root-attributes-no-root","27764OdZjzS","_initThrowingOnDataSet","insert","roots","collaboration-missing-channelid","realtimecollaborationclient-init-document-already-initialized","state","rtc-offline","realtimecollaborationclient-init-service-internal-error","_isLoaded","realtimecollaborationclient-handleserverresponse","_compressOperations","apply","decompress","realtimecollaborationclient-init-session-connection-error","_handleSendingSelectionMarkers","requires","slice","compress","getIdOfTheLastOperation","_isDisconnection","message","includes","set","createUserMarkerOperations","_hasSelectionChanged","rtc-destroyed","bind","Synchronization issue","version","removeFromReconnectionStack","startsWith","_bufferedOperations","_addKnownRoot","setIdForTheLastOperation","lastDocumentSession","entries","code","cs:removeUser","getOperations","lastOperationAcceptedAt","currentDocumentSession","_document","change:range","addRootAttribute","locale","toJSON","_updateServerHistory","_decompressOperations","createPositionAt","_baseBufferDelay","_setPendingAction","_clearPendingAction","wereChangesApplied","_handleReconnectionError","root","_isEditingAllowed","_crash","_currentBufferDelay","_handleExternalOperations","Permissions","_isConnected","_waitUntilSynced","sessionCreatedAt","_bufferRootLoad","_operationToId","forEach","string","setPermissions","has","stop","disconnected","showWarning","editing","RealTimeCollaborationClient","_shouldSendUpdate","map","attributes","_handleReceivedOperations","reconnect","model","CommentsOnly","realtimecollaborationclient-error","6PDSzaw","connected","_service","_saveOperationInBuffer","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","_handleServerResponse","collaboration","targetPosition","cloud-services-internal-error: Not connected.","4ycTRww","finally","disconnect","off","cloud-services-internal-error: Collaborative Editing Service is not connected.","batch","register","addRoot","disableReadOnlyMode","marker","real-time-collaboration","_connectService","getMany","lastSyncVersion","_disconnectionOperations","_ignoredOperations","_handleReconnectionResponse","getConnectedSessions","1415886lPIvGS","__className","view","collaboration.channelId","_handleInitialConnectionData","destroy","5744089jXuTGK","addOperation","CollaborativeEditingService","createRoot","cloudDocumentVersion","fire","_isInit","enableReadOnlyMode","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","36TwDTRN","newRange","_setUpDataInit","_sendBufferedOperations","userId","5455870HBglhP","3890ssUlrg","connect","_initSessionsHandling","realtimecollaborationclient-sendbufferedoperations","createRange","createPositionFromPath","getDocumentDetails","_compressor","affectedSelectable","pluginName","isUndoneOperation","isPremiumPlugin","_authorId","_knownRootNames","_channelId","config","affectsData"];return(lo=function(){return t})()}class po extends e.Plugin{static[ao(115)]=(()=>On)();[ao(195)];[ao(179)];[ao(226)];[ao(142)];[ao(347)];[ao(304)];[ao(135)];[ao(294)];[ao(232)];[ao(141)];[ao(250)];[ao(287)];[ao(213)];[ao(312)];[ao(320)];[ao(190)];[ao(103)];[ao(160)];static get[ao(278)](){return[Fn,Xn,hr,e.PendingActions,zn.Users,r.Notification]}static get[ao(137)](){return ao(336)}static get[ao(181)](){return!0}static get[ao(139)](){return!0}get[ao(117)](){const t=ao;return this[t(199)]+this[t(195)]}get[ao(199)](){const t=ao;return this[t(226)][t(291)]-this[t(195)]}get[ao(102)](){const t=ao,e=this[t(226)][t(301)]();for(let n=e[t(224)]-1;n>=0;n--){const r=e[n];if(!this[t(103)][t(331)](r))return r[t(165)]+1-this[t(195)]}return 0}constructor(t){const e=ao;if(super(t),this[e(195)]=0,this[e(179)]=null,this[e(226)]=new s.History,this[e(150)][e(143)][e(183)](e(351),{}),this[e(142)]=this[e(150)][e(143)][e(227)](e(110)),!this[e(142)])throw new n.CKEditorError(e(266),this);const r=t[e(143)][e(227)](e(248))||n.version;this[e(347)]=new(po[e(115)])(r,this[e(142)]),this[e(304)]=this[e(150)][e(342)][e(178)],this[e(135)]=new so,this[e(294)]=[],this[e(232)]=new WeakSet,this[e(141)]=new Set,this[e(285)](e(145),!1),this[e(285)](e(244),!1),this[e(250)]=null,this[e(287)]=!1,this[e(213)]=null,this[e(312)]=300,this[e(320)]=this[e(312)],this[e(190)]=null,this[e(103)]=new WeakSet,this[e(160)]=new mo(this[e(103)])}[ao(253)](){const t=ao,e=this[t(150)],n=e[t(208)][t(227)](zn.Users),r=e[t(208)][t(227)](Fn);this[t(146)](n,t(228),(e,r)=>{const s=t,o=r[0];o[s(140)]&&(e[s(161)]=n[s(187)](o[s(140)]),e[s(332)]()),null===o[s(140)]&&(e[s(161)]=null,e[s(332)]())},{priority:t(153)}),this[t(146)](e[t(342)][t(178)][t(202)],t(305),(e,n)=>{const r=t;n[r(167)]&&this[r(210)]()}),this[t(146)](e[t(335)][t(109)],t(198),()=>{this[t(210)]()}),this[t(263)](),e[t(342)].on(t(169),(e,n)=>{const r=t,s=n[0];s[r(192)]&&(this[r(348)](s),this[r(337)]()&&this[r(156)]())}),this[t(124)](),this[t(289)](t(318)).to(r,t(268),this,t(244),(e,n)=>t(346)===e&&!n),this.on(t(189),()=>{const n=t;this[n(318)]?e[n(362)](n(269)):e[n(120)](n(269))}),this[t(318)]?e[t(362)](t(269)):e[t(120)](t(269)),this[t(285)](t(323),!1)}async[ao(341)](){const t=ao,e=this[t(150)][t(208)][t(227)](Xn),n=this[t(150)][t(208)][t(227)](Fn);try{this[t(145)]=!0,e[t(152)](this[t(142)]);const r=await this[t(347)][t(341)](n[t(148)],this[t(102)]);await this[t(105)](r)&&(this[t(145)]=!1,this[t(314)]());const s=await this[t(347)][t(106)]();e[t(360)](this[t(142)],s),this[t(277)](),this[t(323)]=!0}catch(e){if(function(e){const n=t;return n(207)===e[n(299)]}(e)&&this[t(179)])await this[t(205)]();else if(function(e){const n=t;return n(257)===e[n(299)]}(e)){const e=mr(this[t(150)][t(307)],t(349));this[t(316)](e)}else{if(!(e instanceof ho))throw e;this[t(316)]()}}}[ao(112)](){const t=ao,e=this[t(150)][t(208)][t(227)](Fn),n=this[t(150)][t(208)][t(227)](Xn);this[t(150)][t(120)](t(288)),n[t(193)][t(331)](this[t(142)])&&n[t(152)](this[t(142)]),e[t(292)](this),this[t(196)](),super[t(112)]()}async[ao(105)](t){const e=ao;if(this[e(179)]!==t[e(179)]&&this[e(190)]!==t[e(258)])throw new ho;return this[e(179)]=t[e(179)],this[e(350)]([],{...t,wereChangesApplied:!1,data:t[e(163)]},e(341))}async[ao(365)](t,e=!1){const n=ao,{connection:r}=this[n(150)][n(208)][n(227)](Fn);po[n(115)][n(106)](r,this[n(142)])[n(221)](t=>this[n(130)](t))[n(175)](t=>{const e=n;this[e(319)](e(276),t)}),this[n(146)](this[n(347)],n(223),this[n(340)][n(289)](this)),this[n(146)](this[n(347)],n(201),(t,e)=>{const r=n;this[r(319)](r(270),e)}),this[n(146)](this[n(347)],n(333),()=>{this[n(323)]=!1});const s=this[n(160)][n(281)](t);this[n(145)]=!0;const o=await this[n(347)][n(129)](r,this[n(273)](t),s);if(this[n(179)]=o[n(179)],e){if(!o[n(315)])return void this[n(316)]();this[n(145)]=!1,this[n(314)](),this[n(226)][n(259)](),this[n(195)]=o[n(172)],this[n(226)][n(291)]=this[n(195)],await this[n(350)](t,o,n(214))}else await this[n(111)](o,t);this[n(277)](),this[n(323)]=!0}[ao(277)](){const t=ao,e=this[t(150)][t(208)][t(227)](Xn),n=this[t(150)][t(208)][t(227)](hr),r=e[t(193)][t(227)](this[t(142)]);r&&r[t(224)]>1?n[t(286)]():this[t(146)](e,t(220)+this[t(142)],()=>{const r=t;2===e[r(193)][r(227)](this[r(142)])[r(224)]&&n[r(286)]()})}async[ao(340)](t,e,n,r){const s=ao;if(!this[s(145)]&&this[s(304)][s(291)]==e){const t=this[s(310)](n,r);await this[s(255)](t),this[s(321)](t,e,n[s(258)])||this[s(319)](s(249))}}async[ao(205)](){const t=ao;this[t(196)]();const{locale:e}=this[t(150)];let n;try{n=await this[t(347)][t(134)]()}catch{const n=mr(e,t(204));return void this[t(316)](n)}const r=n[t(303)]||n[t(297)];if(this[t(190)]!==r[t(258)]){const n=mr(e,t(121));return void this[t(316)](n)}await this[t(365)](this[t(150)][t(342)][t(178)][t(256)][t(301)](),!0)}[ao(196)](){const t=ao;this[t(347)][t(356)](),this[t(294)]=[],clearTimeout(this[t(213)]),this[t(233)](this[t(347)])}[ao(130)](t){const e=ao,n=this[e(150)][e(208)][e(227)](Xn);this[e(146)](n,e(220)+this[e(142)],(t,{session:r})=>{const s=e;if(r.id===n[s(170)]){t[s(357)]();const e=this[s(150)][s(208)][s(331)](s(343))&&this[s(150)][s(208)][s(227)](s(343));let n=r[s(206)];e&&e[s(177)]&&(n=n[s(252)](t=>s(203)!==t)),this[s(150)][s(208)][s(227)](s(322))[s(330)](n,this[s(142)])}}),n[e(360)](this[e(142)],t)}[ao(263)](){const t=ao,e=this[t(150)][t(163)][t(285)];this[t(150)][t(163)][t(285)]=(...r)=>{const s=t;if(!r[r[s(224)]-1][s(158)])throw new n.CKEditorError(s(212),this);e[s(274)](this[s(150)][s(163)],r)}}[ao(124)](){const t=ao;this[t(150)][t(163)].on(t(253),(e,[r])=>{const o=t;if(this[o(304)][o(291)])throw new n.CKEditorError(o(267),this);e[o(332)](),this[o(313)]();const i=this[o(150)][o(143)][o(227)](o(162)),a=this[o(260)](r,i);0==a[o(224)]&&a[o(180)](new s.NoOperation(0)),e[o(161)]=this[o(365)](a)[o(221)](()=>{const t=o;this[t(150)][t(208)][t(227)](Fn)[t(219)](this),this[t(150)][t(163)][t(118)](t(231))})[o(175)](t=>this[o(319)](o(245),t))[o(355)](()=>this[o(314)]())},{priority:t(153)}),this[t(150)].on(t(217),async(e,[n,r])=>{const s=t;e[s(332)]();const o=this[s(150)][s(342)][s(178)][s(251)](n);if(!this[s(141)][s(331)](n)){const t=r&&r[s(163)]?r[s(163)]:"",e=r&&r[s(339)]?r[s(339)]:{};await this[s(155)](n,t,e)}this[s(150)][s(342)][s(237)]({isUndoable:!1},()=>{const t=s;o[t(271)]=!0,this[t(150)][t(342)][t(178)][t(171)][t(326)](o)})},{priority:t(153)})}async[ao(255)](t){const e=ao,n=this[e(150)][e(208)][e(227)](zn.Users),{connection:r}=this[e(150)][e(208)][e(227)](Fn),s=new Set;for(const r of t){const t=r[e(140)];t&&!n[e(187)](t)&&s[e(154)](t)}if(0===s[e(157)])return;const o=await b[e(101)](r,Array[e(168)](s));for(const t of o)n[e(187)](t.id)||n[e(218)](t)}[ao(260)](t,e={}){const r=ao,o=this[r(150)][r(342)],i=[];let a=0;const c=r(329)==typeof t?{main:t}:t;for(const t of Object[r(149)](c)){if(!this[r(304)][r(265)][r(331)](t))throw new n.CKEditorError(r(173),this);const e=this[r(150)][r(163)][r(225)](c[t]),d=this[r(304)][r(251)](t),u=new s.InsertOperation(o[r(311)](d,0),e,a++);i[r(180)](u);for(const[t,n]of e[r(229)]){const e=o[r(132)](o[r(133)](d,n[r(164)][r(246)][r(279)]()),o[r(133)](d,n[r(230)][r(246)][r(279)]())),c=new s.MarkerOperation(t,null,e,o[r(229)],!0,a++);i[r(180)](c)}}if(e)for(const[t,c]of Object[r(298)](e)){const e=o[r(178)][r(251)](t);if(!e)throw new n.CKEditorError(r(261),null);for(const[t,n]of Object[r(298)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(180)](o)}}return i}async[ao(155)](t,e,n){const r=ao;this[r(260)]({[t]:e},{[t]:n})[r(328)]((t,e)=>{const n=r;t[n(165)]=this[n(304)][n(291)]+e,t[n(119)]=!0,this[n(348)](t)}),this[r(156)](),await this[r(324)]()}async[ao(111)](t,e){const n=ao;let r;this[n(195)]=t[n(172)];const s=t[n(315)]&&!t[n(191)],o=s?0:t[n(163)][n(165)];if(e[n(328)](e=>{const r=n;e[r(119)]=!0,e[r(243)]=t[r(325)],e[r(140)]=null}),s)r=e,this[n(216)](r,s);else{if(t[n(191)]){const e=this[n(260)](t[n(191)]);this[n(304)][n(256)][n(291)]=-e[n(224)],e[n(328)](r=>{const s=n;r[s(165)]-=e[s(224)],r[s(243)]=t[s(325)],r[s(119)]=!0,r[s(140)]=null}),this[n(216)](e,!0),this[n(226)][n(291)]=-e[n(224)]+this[n(195)],this[n(309)](e)}this[n(304)][n(256)][n(291)]=o,r=this[n(310)](t[n(163)],t[n(211)]),await this[n(255)](r),this[n(216)](r,s)}t[n(258)]&&(this[n(160)][n(296)](r,t[n(258)]),this[n(190)]=t[n(258)]),this[n(226)][n(291)]=o+this[n(195)],this[n(309)](r),e[n(252)](t=>{const e=n,r=this[e(186)](t);return r&&!this[e(141)][e(331)](r)})[n(328)]((t,e)=>{const r=n;t[r(165)]=this[r(304)][r(291)]+e,this[r(348)](t)}),this[n(337)]()?(this[n(320)]=0,this[n(156)](!0),await this[n(324)]()):(this[n(145)]=!1,this[n(314)]())}[ao(319)](t,e){const r=ao,s=e&&e[r(283)];if(s&&s[r(293)](r(254)))throw e;const o=this[r(150)][r(208)][r(227)](Fn);throw this[r(145)]=!0,o[r(356)](),this[r(150)][r(120)](r(344)),new n.CKEditorError(t,this[r(150)],s?{originalError:s}:void 0)}[ao(348)](t){const e=ao;this[e(232)][e(331)](t)||(this[e(232)][e(154)](t),this[e(294)][e(180)](t),this[e(250)]||e(363)==t[e(242)]&&!t[e(144)]||this[e(313)]())}[ao(156)](t=!1){const e=ao;!t&&this[e(145)]||(this[e(145)]=!0,clearTimeout(this[e(213)]),this[e(213)]=setTimeout(()=>{const t=e;this[t(125)]()[t(221)](e=>{const n=t;e&&(this[n(314)](),this[n(145)]=!1)})[t(175)](e=>{const n=t;this[n(314)](),this[n(145)]=!1,function(t){const e=n;return t[e(283)][e(293)](e(353))||t[e(283)][e(293)](e(358))||t[e(283)][e(293)](e(215))}(e)||this[n(319)](e[n(283)],e)})},this[e(320)]))}[ao(324)](){return new Promise(t=>{const e=co;this.on(e(182),()=>{t()})})}async[ao(125)](){const t=ao,e=this[t(150)][t(208)][t(227)](hr);if(this[t(176)]()&&(e[t(286)](),this[t(287)]=!1),!this[t(337)]())return!0;const n=[...this[t(294)]];for(const e of n)e[t(238)]=this[t(304)][t(256)][t(138)](e);const r=this[t(160)][t(281)](n),s=uo++,o=this[t(273)](n),i=await this[t(347)][t(240)](o,o[t(165)],r);try{return await this[t(350)](n,i,s)}catch(e){return this[t(319)](t(131),e)}}async[ao(350)](t,e,n){const r=ao;if(r(201)in e)throw e[r(201)];let s=!1;if(e[r(315)]){e[r(258)]&&(this[r(190)]=e[r(258)]),this[r(294)]=this[r(294)][r(252)](e=>!t[r(284)](e));for(const n of t)n[r(243)]=r(302)in e&&e[r(302)]||void 0;fo(t,e[r(291)]-t[r(224)]),this[r(309)](t);const n=t[r(252)](t=>{const e=r;if(!t[e(119)])return!1;const n=this[e(186)](t);return n&&!this[e(141)][e(331)](n)});fo(n,this[r(304)][r(291)]),this[r(216)](n),s=!0,this[r(320)]=this[r(312)]}else{const t=this[r(310)](e[r(163)],e[r(211)])[r(252)](t=>t[r(165)]>=this[r(199)]);t[r(328)](t=>this[r(295)](t)),this[r(294)]=this[r(294)][r(252)](t=>!t[r(119)]||!this[r(141)][r(331)](this[r(186)](t))),this[r(294)][r(224)]&&fo(this[r(294)],this[r(294)][0][r(165)]),await this[r(255)](t),s=this[r(321)](t,e[r(291)],e[r(258)]),this[r(320)]=Math[r(166)](this[r(320)]/2)}return s?!this[r(337)]()||(this[r(156)](!0),!1):this[r(319)](r(272))}[ao(321)](t,e,n){const r=ao;try{const o={document:this[r(304)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(294)],o);fo(i,this[r(304)][r(291)]),fo(a,e);for(const t of i){const e=c[r(227)](t);t[r(140)]=e?e[r(140)]:null}n&&(this[r(160)][r(296)](t,n),this[r(190)]=n),this[r(294)]=[...a],this[r(216)](i),this[r(309)](t)}catch(t){return console[r(201)](t),!1}return!0}[ao(216)](t,e=!1){const n=ao;this[n(150)][n(342)][n(237)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(232)][r(154)](n),this[r(295)](n),e[r(359)][r(114)](n),this[r(150)][r(342)][r(169)](n)})}[ao(295)](t){const e=ao,n=this[e(186)](t);n&&this[e(141)][e(154)](n)}[ao(186)](t){const e=ao;let n,r;switch(t[e(242)]){case e(264):n=t[e(188)][e(317)];break;case e(363):if(r=t[e(123)],!r)return null;n=r[e(317)];break;case e(306):n=t[e(317)];break;case e(361):n=t[e(136)];break;case e(239):n=t[e(352)][e(317)];break;default:return null}return n[e(200)]}[ao(309)](t){const e=ao;t[e(328)](t=>{const n=e,r=t[n(174)]();r[n(140)]=t[n(140)],r[n(119)]=!!t[n(119)],r[n(243)]=t[n(243)],r[n(165)]+=this[n(195)],t[n(282)]&&this[n(103)][n(154)](r),this[n(226)][n(114)](r)})}[ao(316)](t){const e=ao,n=this[e(150)][e(208)][e(227)](e(184)),r=this[e(150)][e(307)];t||(t=mr(r,e(234))),n[e(334)](t,{title:mr(r,e(290)),namespace:e(364)}),this[e(244)]=!0,clearTimeout(this[e(213)]),this[e(294)]=[],this[e(150)][e(208)][e(227)](Fn)[e(356)]()}[ao(313)](){const t=ao;this[t(250)]||(this[t(250)]=this[t(150)][t(208)][t(227)](e.PendingActions)[t(154)](mr(this[t(150)][t(307)],t(222))))}[ao(314)](){const t=ao;this[t(250)]&&(this[t(150)][t(208)][t(227)](e.PendingActions)[t(209)](this[t(250)]),this[t(250)]=null)}[ao(273)](t){const e=ao,n=t[e(338)](t=>t[e(308)]());return this[e(135)][e(280)](n)}[ao(310)](t,e){const n=ao;return this[n(135)][n(275)](t)[n(338)]((t,r)=>{const o=n,i=o(253)==e[r][o(242)];if(o(247)==t[o(108)]){const e=t[o(188)][o(317)];!this[o(304)][o(251)](e)&&(this[o(304)][o(116)](o(185),e)[o(147)]=!1)}const a=s.OperationFactory[o(151)](t,this[o(304)]);return a[o(238)]=t[o(238)],a[o(119)]=i,a[o(140)]=i?null:e[r][o(126)],a[o(282)]=o(300)===e[r][o(242)],a[o(243)]=e[r][o(243)],a})}[ao(210)](){const t=ao;this[t(287)]=!0,this[t(176)]()?this[t(156)]():this[t(287)]=!1}[ao(176)](){const t=ao,e=this[t(150)][t(208)][t(227)](Xn)[t(193)][t(227)](this[t(142)]);return!this[t(150)][t(236)]&&!!e&&e[t(224)]>1&&this[t(287)]}[ao(337)](){const t=ao;return this[t(294)][t(224)]>0||this[t(176)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(165)]=e++}class mo{[ao(104)];[ao(327)];constructor(t){const e=ao;this[e(104)]=t,this[e(327)]=new WeakMap}[ao(281)](t){const e=ao;let r=t[e(224)];for(;r--;){const s=t[r];if(!this[e(104)][e(331)](s)){if(!this[e(327)][e(331)](s)){const t=(0,n.uid)()[e(279)](1,18);this[e(327)][e(285)](s,t)}return this[e(327)][e(227)](s)}}}[ao(296)](t,e){const n=ao;if(!e)return;let r=t[n(224)];for(;r--;){const s=t[r];this[n(104)][n(331)](s)||this[n(327)][n(285)](s,e)}}}var yo=bo;function go(){var t=["isPremiumPlugin","16209BauQFu","14425TWoVnq","604XPhwAy","isOfficialPlugin","RealTimeCollaborativeEditing","407890OSRbZA","231CknJqE","1096xdyOAZ","1503552sIOFpx","pluginName","2323349hrDivA","248784TsrbRU","3awYOzv","requires","1029531ypKRsU"];return(go=function(){return t})()}function bo(t,e){var n=go();return(bo=function(t,e){return n[t-=292]})(t,e)}!function(t){for(var e=bo,n=t();;)try{if(225513===parseInt(e(304))/1*(-parseInt(e(303))/2)+parseInt(e(306))/3+parseInt(e(294))/4*(-parseInt(e(293))/5)+-parseInt(e(300))/6+parseInt(e(302))/7+parseInt(e(299))/8*(-parseInt(e(292))/9)+parseInt(e(297))/10*(parseInt(e(298))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(go);class Io extends e.Plugin{static get[yo(305)](){return[po]}static get[yo(301)](){return yo(296)}static get[yo(295)](){return!0}static get[yo(307)](){return!0}}const Oo=vo;function vo(t,e){const n=wo();return(vo=function(t,e){return n[t-=179]})(t,e)}function wo(){const t=["message","isOfficialPlugin","updateCommentThread","set","CommentsService","catch","keys","requires","unregister","createdAt","getUser","addComment","cloudservicescommentsadapter-disconnect-not-exist","65880DoYKMa","getCommentThread","from","get","_connectService","4PBryHL","getConnectedSessions","commentId","_getService","commentAdded","cloud-services-internal-error: Not connected.","connect","register","deletedAt","cloudservicescommentsadapter-service-not-exist","update","disconnect","context","startsWith","Permissions","listenTo","isPremiumPlugin","init","addCommentThread","destroy","commentRemoved","comments","getCommentThreads","permissions","setPermissions","pluginName","1720860ylCWFj","_fetchMissingUsersForThreads","assign","commentThreadUpdated","commentThreadId","add","1997955DRkMYz","reopenCommentThread","commentThreadRemoved","off","cloud-services-internal-error: Comments Service is not connected.","attributes","_services","plugins","resolvedAt","_setUpService","_terminateService","316290TwFBuF","resolvedBy","updateComment","404","reopen","collaboration.channelId","size","remove","CloudServicesCommentsAdapter","cloud-services-internal-error: Request timeout.","removeComment","reconnect","getMany","338905YfDWow","config","addToReconnectionStack","mySessionId","1roQinn","cloudservicescommentsadapter-connect-already-connected","commentThreadResolved","7888060oqyEay","65028qpVLVA","commentUpdated","userId","getComment","map","resolveCommentThread","sessionAdd:","delete","code","content","CommentsRepository","removeCommentThread","addUser","adapter","authorId","commentThreadAdded","commentThreadReopened","has","40QCUysn","resolve"];return(wo=function(){return t})()}!function(t){const e=vo,n=t();for(;;)try{if(475104===-parseInt(e(207))/1*(-parseInt(e(211))/2)+parseInt(e(190))/3+-parseInt(e(249))/4*(parseInt(e(179))/5)+-parseInt(e(275))/6+-parseInt(e(203))/7*(-parseInt(e(229))/8)+-parseInt(e(244))/9+parseInt(e(210))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(wo);class So extends e.ContextPlugin{static[Oo(235)]=(()=>Ln)();[Oo(185)];static get[Oo(238)](){return[Fn,Oo(221),Xn,zn.Users]}static get[Oo(274)](){return Oo(198)}static get[Oo(232)](){return!0}static get[Oo(265)](){return!0}constructor(t){const e=Oo;super(t),this[e(185)]=new Map}async[Oo(266)](){const t=Oo,n=this[t(261)],r=n[t(186)][t(247)](t(221));if(n[t(186)][t(247)](Fn)[t(205)](this),r[t(224)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,d=await this[c(252)](e)[c(267)]({commentThreadId:n,comments:r[c(215)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(251)],userId:t[r(225)],content:t[r(220)],documentId:e,createdAt:t[r(240)],attributes:t[r(184)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(236)](Ao);return{threadId:d[c(279)],comments:d[c(270)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(252)](e)[r(245)](n)[r(236)](ko)[r(236)](Ao);return s?s[r(257)]?null:(await this[r(276)]([s]),{threadId:s[r(279)],comments:s[r(270)][r(215)](To),context:s[r(261)],resolvedAt:s[r(187)],resolvedBy:s[r(191)],attributes:s[r(184)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(252)](e)[t(233)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(236)](ko)[t(236)](Ao),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(252)](e)[r(216)](n)[r(236)](ko)[r(236)](Ao);return{threadId:s[r(279)],resolvedAt:s[r(187)],resolvedBy:s[r(191)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(252)](e)[t(180)](n)[t(236)](ko)[t(236)](Ao),removeCommentThread:({channelId:e,threadId:n})=>this[t(252)](e)[t(222)](n)[t(236)](ko)[t(236)](Ao),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(252)](e)[t(242)](n,r,s,o)[t(236)](Ao),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(252)](e)[t(192)](n,r,s,o)[t(236)](ko)[t(236)](Ao),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(252)](e)[t(200)](n,r)[t(236)](ko)[t(236)](Ao)},n instanceof e.Context){const e=n[t(204)][t(247)](t(195)),r=n[t(186)][t(247)](Xn);await this[t(188)](e);const s=await this[t(185)][t(247)](e)[t(250)]();this[t(264)](r,t(217)+e,(n,{session:s})=>{const o=t;s.id===r[o(206)]&&(n[o(182)](),this[o(261)][o(186)][o(247)](o(263))[o(273)](s[o(272)],e))}),r[t(256)](e,s)}}async[Oo(188)](t){const e=Oo;if(this[e(185)][e(228)](t))throw new n.CKEditorError(e(208),null,{channelId:t});const r=this[e(261)][e(186)][e(247)](e(221)),s=new(So[e(235)])(t);this[e(185)][e(234)](t,s),this[e(264)](s,e(226),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:d,resolvedBy:u,comments:l}=n;r[s(245)](o)||r[s(267)]({threadId:o,channelId:i,comments:l?l[s(215)](To):[],context:a,attributes:c,resolvedAt:d,resolvedBy:u,isFromAdapter:!0})}),this[e(264)](s,e(278),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(245)](n)&&r[c(233)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(264)](s,e(209),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(245)](n);a&&a[i(230)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(264)](s,e(227),(t,{commentThreadId:n})=>{const s=e,o=r[s(245)](n);o&&o[s(194)]({isFromAdapter:!0})}),this[e(264)](s,e(181),(t,{commentThreadId:n})=>{const s=e,o=r[s(245)](n);o&&o[s(197)]({isFromAdapter:!0})}),this[e(264)](s,e(253),(t,n)=>{const s=e,o=n[s(279)],i=r[s(245)](o);i&&i[s(242)]({...To(n),isFromAdapter:!0})}),this[e(264)](s,e(212),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(245)](n);if(c){const t=c[a(214)](s);t&&t[a(259)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(264)](s,e(269),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(245)](n);if(i){const t=i[o(214)](s);t&&t[o(197)]({isFromAdapter:!0})}}),await this[e(248)](t)}[Oo(268)](){const t=Oo;if(this[t(261)]instanceof e.Context){const e=this[t(261)][t(204)][t(247)](t(195));this[t(189)](e)}}[Oo(189)](t){const e=Oo;if(!this[e(185)][e(228)](t))throw new n.CKEditorError(e(243),null,{channelId:t});this[e(252)](t)[e(260)](),this[e(185)][e(218)](t)}async[Oo(201)](){const t=Oo;for(const e of this[t(185)][t(237)]())await this[t(248)](e);if(this[t(261)]instanceof e.Context){const e=this[t(261)][t(204)][t(247)](t(195)),n=this[t(261)][t(186)][t(247)](Xn);n[t(239)](e);const r=await this[t(185)][t(247)](e)[t(250)]();n[t(256)](e,r)}}async[Oo(248)](t){const e=Oo,{connection:n}=this[e(261)][e(186)][e(247)](Fn),r=this[e(261)][e(186)][e(247)](e(221)),s=this[e(185)][e(247)](t),o=await s[e(255)](n);await this[e(276)](o);const i=new Set(Array[e(246)](r[e(271)]({channelId:t}),t=>t.id));for(const t of o)t[e(257)]||i[e(218)](t[e(279)]);for(const t of i)r[e(245)](t)[e(197)]({isFromAdapter:!0});for(const n of o){let s=r[e(245)](n[e(279)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:d,unlinkedAt:u,deletedAt:l}=n;if(l)continue;s||(s=r[e(267)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:d,unlinkedAt:u,isFromAdapter:!0}));const p=new Set(Array[e(246)](s[e(270)],t=>t.id));for(const t of n[e(270)])p[e(218)](t[e(251)]);for(const t of p)s[e(214)](t)[e(197)]({isFromAdapter:!0});for(const t of n[e(270)]){const n=s[e(214)](t[e(251)]);n?n[e(220)]!==t[e(220)]&&n[e(259)]({content:t[e(220)],isFromAdapter:!0}):s[e(242)](Object[e(277)](To(t),{isFromAdapter:!0}))}}}[Oo(252)](t){const e=Oo;if(!this[e(185)][e(228)](t))throw new n.CKEditorError(e(258),null,{channelId:t});return this[e(185)][e(247)](t)}async[Oo(276)](t){const e=Oo,n=this[e(261)][e(186)][e(247)](zn.Users),{connection:r}=this[e(261)][e(186)][e(247)](Fn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(241)](r)&&s[e(280)](r);for(const{userId:t}of o)n[e(241)](t)||s[e(280)](t)}if(0===s[e(196)])return;const o=await b[e(202)](r,Array[e(246)](s));for(const t of o)n[e(241)](t.id)||n[e(223)](t)}}async function ko(t){const e=Oo;if(e(193)!==t[e(219)])throw t}function Ao(t){const e=Oo;if((n=t)[e(231)][e(262)](e(183))||n[e(231)][e(262)](e(254))||n[e(231)][e(262)](e(199)))return new Promise(()=>{});var n;throw t}function To(t){const e=Oo;return{threadId:t[e(279)],commentId:t[e(251)],content:t[e(220)],createdAt:t[e(240)],authorId:t[e(213)],attributes:t[e(184)]||{}}}const _o=Co;function Co(t,e){const n=Eo();return(Co=function(t,e){return n[t-=495]})(t,e)}!function(t){const e=Co,n=t();for(;;)try{if(663157===-parseInt(e(499))/1+parseInt(e(515))/2+-parseInt(e(533))/3*(parseInt(e(517))/4)+-parseInt(e(540))/5+-parseInt(e(524))/6+parseInt(e(553))/7+parseInt(e(514))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Eo);class Po extends e.Plugin{static[_o(527)]=(()=>Qe)();[_o(498)];[_o(549)];static get[_o(529)](){return[So,_o(511),Fn]}static get[_o(519)](){return _o(523)}static get[_o(539)](){return!0}static get[_o(522)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(502)][e(504)][e(507)](e(526));this[e(498)]=new Map,this[e(549)]=new(Po[e(527)])(n)}[_o(510)](){const t=_o,e=this[t(502)][t(544)][t(507)](Fn),n=this[t(502)][t(544)][t(507)](t(511));return n[t(534)]={getSuggestion:async e=>{const n=t;await this[n(551)]();const r=await this[n(549)][n(507)](e)[n(535)](jo);return await this[n(508)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(551)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(549)][i(509)](e,n,r,s,o)[i(535)](t=>{if(Do(t))return new Promise(t=>{const n=Co;this[n(498)][n(552)](e,{resolve:t,suggestionData:a})});throw t});return this[i(498)][i(520)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(551)](),r(536)!==n[r(542)])return this[r(549)][r(548)](e,n)[r(535)](jo)}},this[t(503)](this[t(549)],t(538),(e,r)=>{const s=t;n[s(496)](r.id)&&(n[s(513)](r.id)[s(537)]=r[s(537)])}),this[t(549)][t(532)](e[t(545)])[t(543)](r=>(e[t(541)](this),this[t(508)](r)[t(543)](()=>{const e=t;for(const t of r)n[e(501)](t)[e(516)]=!0})))}async[_o(521)](){const t=_o,e=this[t(502)][t(544)][t(507)](t(511)),{connection:n}=this[t(502)][t(544)][t(507)](Fn),r=await this[t(549)][t(532)](n);await this[t(508)](r);for(const{suggestionData:e,resolve:n}of this[t(498)][t(550)]()){let s=r[t(506)](t=>t.id===e.id);s||(s=await this[t(549)][t(509)](e.id,e[t(547)],e[t(530)],e[t(500)])),n(s)}for(const n of r)e[t(496)](n.id)||e[t(501)](n)}async[_o(551)](){const t=_o;this[t(549)][t(518)]||await new Promise(e=>{const n=t;this[n(503)](this[n(549)],n(512),t=>{t[n(546)](),e()})})}async[_o(508)](t){const e=_o,n=this[e(502)][e(544)][e(507)](zn.Users),{connection:r}=this[e(502)][e(544)][e(507)](Fn),s=new Set;for(const{authorId:r}of t)n[e(505)](r)||s[e(509)](r);if(0===s[e(497)])return;const o=await b[e(554)](r,Array[e(495)](s));for(const t of o)n[e(505)](t.id)||n[e(555)](t)}}function Eo(){const t=["update","_trackChangesService","values","_waitForServiceReady","set","7308525uZfcTW","getMany","addUser","cloud-services-internal-error: Not connected.","from","hasSuggestion","size","_bufferedRequests","653285QBHaWy","originalSuggestionId","addSuggestionData","editor","listenTo","config","getUser","find","get","_fetchMissingUsersForThreads","add","init","TrackChangesEditing","connected","getSuggestion","15437656COaqDn","2420550jlysNF","_saved","421556uAvthS","isConnected","pluginName","delete","reconnect","isPremiumPlugin","CloudServicesTrackChangesAdapter","3321264fHizGo","message","collaboration.channelId","TrackChangesService","cloud-services-internal-error: Request timeout.","requires","data","startsWith","connect","33ZRJbov","adapter","catch","open","attributes","suggestionUpdated","isOfficialPlugin","5773960kXFKlp","addToReconnectionStack","state","then","plugins","connection","off","type"];return(Eo=function(){return t})()}function jo(t){if(Do(t))return new Promise(()=>{});throw t}function Do(t){const e=_o;return t[e(525)][e(531)](e(556))||t[e(525)][e(531)](e(528))}const xo=Ro;function Ro(t,e){const n=Vo();return(Ro=function(t,e){return n[t-=161]})(t,e)}!function(t){const e=Ro,n=t();for(;;)try{if(610044===parseInt(e(163))/1+-parseInt(e(168))/2*(parseInt(e(177))/3)+-parseInt(e(170))/4*(parseInt(e(161))/5)+parseInt(e(175))/6*(parseInt(e(171))/7)+parseInt(e(193))/8+-parseInt(e(195))/9*(-parseInt(e(166))/10)+parseInt(e(187))/11*(-parseInt(e(196))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Vo);class No extends e.Plugin{static get[xo(183)](){return[xo(190),So,Io,Fn]}static get[xo(192)](){return xo(186)}static get[xo(191)](){return!0}static get[xo(172)](){return!0}[xo(182)](){const t=xo,e=this[t(164)][t(194)][t(197)](Fn),n=this[t(164)][t(194)][t(197)](t(174)),r=this[t(164)][t(194)][t(197)](So);return this[t(164)][t(167)][t(169)](t(173),()=>{const r=t;this[r(188)](e,r(179),(t,e,s)=>{const o=r;n[o(178)]=o(162)!==s})}),this[t(188)](e,t(179),(e,n,r)=>{const s=t;this[s(164)][s(194)][s(197)](s(180))[s(165)](s(162)!==r)}),r[t(189)](this[t(164)][t(185)][t(197)](t(181)))}[xo(176)](){const t=xo;this[t(164)][t(194)][t(197)](So)[t(184)](this[t(164)][t(185)][t(197)](t(181))),super[t(176)]()}}function Vo(){const t=["5ixZurG","connected","274943udpeGH","editor","switchReadOnly","1203810XvUoUm","data","21402AXzdnO","once","1060432ZNNvHH","245CLTbbu","isPremiumPlugin","ready","CommentsEditing","1962QtIVZp","destroy","6MuAIyL","isThreadsLoadingPaused","change:state","CommentsRepository","collaboration.channelId","init","requires","_terminateService","config","RealTimeCollaborativeComments","738111EiGnna","listenTo","_setUpService","Comments","isOfficialPlugin","pluginName","4139416spdwGw","plugins","27GHhIdt","48mUTnTl","get"];return(Vo=function(){return t})()}var Mo=Bo;function Bo(t,e){var n=Uo();return(Bo=function(t,e){return n[t-=102]})(t,e)}function Uo(){var t=["1PvbspX","isOfficialPlugin","1279280mhWiDl","3450hiulpH","814851pLIvQC","758462jflXfc","RealTimeCollaborativeTrackChanges","isPremiumPlugin","53390XPCCRX","2434776vsRmIt","388ApXrDZ","858655XXhRxW","TrackChanges","pluginName","8pkXZyq","requires"];return(Uo=function(){return t})()}!function(t){for(var e=Bo,n=t();;)try{if(213695===-parseInt(e(114))/1*(-parseInt(e(103))/2)+-parseInt(e(117))/3*(parseInt(e(108))/4)+parseInt(e(106))/5+-parseInt(e(107))/6+parseInt(e(109))/7*(parseInt(e(112))/8)+parseInt(e(102))/9+parseInt(e(116))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Uo);class Jo extends e.Plugin{static get[Mo(113)](){return[No,Po,Mo(110)]}static get[Mo(111)](){return Mo(104)}static get[Mo(115)](){return!0}static get[Mo(105)](){return!0}}const qo=Go;function Lo(){const t=["connection","cloud-services-internal-error: Not connected.","keys","reverse","wrongRequestId","requires","connected","addRevisionData","map","isEmptyCurrent","_startingVersion","config","data","getMany","isBundleUploaded","getRevisions","bind","remove","RevisionHistory","_fetchMissingUsers","cloud-services-internal-error: Revision History Service is not connected.","collaboration.channelId","updateRevisions","_bufferUpdate","getOperations","RevisionTracker","setRevisionData","startsWith","get","code","state","CONNECTED","adapter","catch","5839452SfoqFc","buildRevisionData","_revisionDataBuilder","revisionsUpdated","destroy","add","_revisionTracker","400469Aqjpsp","editor","diffData","cloudServices.bundleVersion","addToReconnectionStack","isEnabled","baseVersion","reInit","_waitForServiceReady","_lastRequestId","reconnect","plugins","isConnected","400","creatorId","pluginName","_handleRevisionsUpdate","2270604dGjavA","then","fromVersion","once","getRevision","sendBufferedUpdates","currentRevision","has","_isConnected","136JzswgG","type","authors","10417400KAHbsb","_fixRevision","change:_isPendingUpdate","setSource","marker","_update","2146617xnJloE","from","createdAt","10291332KfoumC","serverHistory","_isPendingUpdate","CloudServicesRevisionHistoryAdapter","_handleReconnectionError","isOfficialPlugin","repository","_getLatestVersionFromServerOperations","affectsData","size","addUser","off","cloud-services-internal-error: Request timeout.","getUser","_getLatestVersion","authorsIds","sessionId","_oldOffset","_offset","length","3910615WUCwIu","message","_revisionHistoryService","connect","_createCurrentRevision","_bufferedUpdates","_revisions","isPremiumPlugin","max","init","toVersion","_preventResendingRevisionData","listenTo","4mEiinD","change:_isConnected","RevisionHistoryService"];return(Lo=function(){return t})()}function Go(t,e){const n=Lo();return(Go=function(t,e){return n[t-=344]})(t,e)}!function(t){const e=Go,n=t();for(;;)try{if(926490===parseInt(e(366))/1+-parseInt(e(437))/2*(parseInt(e(383))/3)+-parseInt(e(359))/4+-parseInt(e(424))/5+parseInt(e(404))/6+-parseInt(e(395))/7+-parseInt(e(392))/8*(-parseInt(e(401))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Lo);class Ho extends e.Plugin{static[qo(439)]=(()=>Ve)();[qo(375)];[qo(365)];[qo(426)];[qo(421)];static get[qo(445)](){return[Fn,po,qo(458),Xn,zn.Users]}static get[qo(381)](){return qo(407)}static get[qo(409)](){return!0}static get[qo(431)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(367)][e(451)][e(353)](e(346));this[e(375)]=null,this[e(365)]=this[e(367)][e(377)][e(353)](e(350)),this[e(426)]=new(Ho[e(439)])(n)}async[qo(433)](){const t=qo,e=this[t(367)][t(377)][t(353)](po),r=e[t(405)],s=this[t(367)][t(377)][t(353)](Fn);this[t(365)][t(398)]({history:r,getLatestVersion:()=>this[t(418)](),getCurrentRevisionId:()=>e[t(420)]});const o=this[t(367)][t(451)][t(353)](t(369))||n.version,i=await Ae[t(454)](s[t(440)],o);this[t(367)][t(377)][t(353)](t(458))[t(357)]={getRevision:async({revisionId:e})=>(await this[t(374)](),await this[t(426)][t(387)](e)),updateRevisions:async e=>{const n=t;await this[n(374)]();const r=this[n(365)][n(389)];if(i&&1===e[n(423)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(449)]=t[n(385)]===t[n(434)]);return this[n(426)][n(347)](e,this[n(375)])[n(384)](t=>(this[n(375)]=t,e))[n(358)](t=>{const r=n;if(Yo(t)||r(379)===t[r(354)]&&void 0!==t[r(452)][r(444)]){for(const t of e)!this[r(365)][r(410)][r(387)](t.id)||this[r(365)][r(348)](t.id,t,!1);if(Yo(t))throw t;return e}throw t})}},this[t(436)](this[t(426)],t(362),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(432)](...n[s(448)](t=>t[s(434)]))>this[s(411)]()-1?this[s(418)]()[s(384)](()=>{this[s(382)](n,r)}):this[s(382)](n,r)});const{revisions:a,requestId:c}=await this[t(426)][t(427)](s[t(440)]);s[t(370)](this),this[t(375)]=c,await this[t(344)](a);for(const e of a)this[t(365)][t(447)](e);this[t(436)](e,t(438),(n,r,s)=>{const o=t;s&&(this[o(421)]=e[o(422)],n[o(415)]())}),this[t(365)][t(456)](t(371)).to(s,t(355),e=>e===Ie[t(356)])}async[qo(376)](){const t=qo,e=this[t(367)][t(377)][t(353)](Fn),n=this[t(367)][t(377)][t(353)](po),r=async()=>{const r=t,s=this[r(365)][r(389)],o=s.id,i=o!==n[r(420)];if(i){const t=n[r(422)]-this[r(421)],e=this[r(411)]();if(this[r(365)][r(361)][r(373)](),s[r(434)]+t!==e){const n=s[r(385)]+t,o=this[r(367)][r(377)][r(353)](zn.Users),i=this[r(365)][r(360)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(419)][r(448)](t=>o[r(417)](t));s[r(400)]({...i,authors:a},!0),this[r(365)][r(348)](s.id,i,!0)}this[r(365)][r(450)]=e,s[r(434)]===s[r(385)]&&!this[r(365)][r(429)][r(390)](o)&&this[r(365)][r(410)][r(430)][r(457)](o),this[r(365)][r(428)](e)}const{revisions:a,requestId:c}=await this[r(426)][r(376)](e[r(440)],this[r(375)]);i&&a[r(423)]>0?n[r(408)]():(await this[r(344)](a),this[r(382)](a,c),this[r(365)][r(388)]())};return n[t(391)]?r():new Promise((e,s)=>{const o=t;n[o(386)](o(438),()=>{const t=o;r()[t(384)](e)[t(358)](s)})})}[qo(363)](){super[qo(363)]()}async[qo(374)](){const t=qo;this[t(426)][t(378)]||await new Promise(e=>{const n=t;this[n(436)](this[n(426)],n(446),t=>{t[n(415)](),e()})})}[qo(411)](){const t=qo,e=this[t(367)][t(377)][t(353)](po)[t(405)][t(349)]()[t(443)]();for(const n of e)if(t(399)!==n[t(393)]||n[t(412)])return n[t(372)]+1}[qo(418)](){const t=qo,e=this[t(367)][t(377)][t(353)](po);return new Promise(n=>{const r=t;e[r(406)]?e[r(386)](r(397),()=>{n(this[r(411)]())}):n(this[r(411)]())})}[qo(382)](t,e){const n=qo,r=this[n(365)][n(410)];this[n(375)]=e;for(const e of t){const t=r[n(387)](e.id);if(t){if((e[n(385)]||e[n(434)])&&(e[n(368)]=null),t===this[n(365)][n(389)]){const r=Math[n(432)](t[n(434)],e[n(434)]),s=Math[n(432)](t[n(385)],e[n(385)]);let o;t[n(434)]===e[n(434)]&&t[n(385)]===e[n(385)]?(o=!0,this[n(435)](e)):e[n(434)]===r&&e[n(385)]===s?o=!1:(t[n(434)]===r&&t[n(385)]===s||this[n(396)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(385)],delete e[n(434)],delete e[n(368)],delete e[n(403)],delete e[n(419)])}this[n(365)][n(351)](e),this[n(435)](e)}else this[n(365)][n(447)](e)}const s=r[n(455)]();s[n(443)]();for(let t=0;t<s[n(423)]-1;t++){const e=s[t],r=s[t+1];if(e[n(385)]<r[n(434)]){const t=r[n(434)],s=Math[n(432)](t,e[n(434)]);this[n(396)]({revision:e,from:t,to:s})}}}[qo(396)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(367)][r(377)][r(353)](zn.Users),o=this[r(365)][r(360)]({revision:t,from:e,to:n});o[r(394)]=o[r(419)][r(448)](t=>s[r(417)](t)),t[r(400)](o)}[qo(435)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(442)](t))"id"!==r&&(n[r]=void 0);this[e(365)][e(348)](n.id,n,!0)}async[qo(344)](t){const e=qo,n=this[e(367)][e(377)][e(353)](zn.Users),{connection:r}=this[e(367)][e(377)][e(353)](Fn),s=new Set;for(const n of t){for(const t of n[e(419)])i(t);n[e(380)]&&i(n[e(380)])}if(0===s[e(413)])return;const o=await b[e(453)](r,Array[e(402)](s));for(const t of o)n[e(417)](t.id)||n[e(414)](t);function i(t){const r=e;n[r(417)](t)||s[r(364)](t)}}}function Yo(t){const e=qo;return t[e(425)][e(352)](e(345))||t[e(425)][e(352)](e(441))||t[e(425)][e(352)](e(416))}var Fo=zo;function zo(t,e){var n=Ko();return(zo=function(t,e){return n[t-=118]})(t,e)}function Ko(){var t=["requires","RevisionHistory","4ElMSBE","317845QtVXbb","1878036PtvFMO","198XAupIy","1192535TlnBYO","408YkhCjm","1110392YnNoGg","1171884fFvNTw","isPremiumPlugin","7rZQuar","15434GlapeD","pluginName","isOfficialPlugin","RealTimeCollaborativeRevisionHistory","35DceaYS","287570xibdlw"];return(Ko=function(){return t})()}!function(t){for(var e=zo,n=t();;)try{if(320187===-parseInt(e(119))/1*(-parseInt(e(133))/2)+parseInt(e(130))/3+parseInt(e(123))/4*(-parseInt(e(127))/5)+-parseInt(e(125))/6+parseInt(e(132))/7*(-parseInt(e(129))/8)+parseInt(e(126))/9*(-parseInt(e(120))/10)+parseInt(e(124))/11*(parseInt(e(128))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Wo extends e.Plugin{static get[Fo(121)](){return[Fo(122),Ho,Io]}static get[Fo(134)](){return Fo(118)}static get[Fo(135)](){return!0}static get[Fo(131)](){return!0}}function Qo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}function Xo(){const t=["usersCount","bind","9oOUwop","793355WkrbzH","listitem","toString","755280HqLbKJ","ck-presence-list__list-item","_collapseAt","isHidden","set","ck-presence-list__counter--hidden","1093036xYdtkn","14yhwAkG","ck-presence-list__users-counter","setTemplate","9AeLEWQ","div","3920384MViUfN","1096934xMZaHS","ck-presence-list__users-counter__text","7286650BLfXHe","bindTemplate","2039574bxSFbb"];return(Xo=function(){return t})()}const Zo=$o;function $o(t,e){const n=Xo();return($o=function(t,e){return n[t-=420]})(t,e)}!function(t){const e=$o,n=t();for(;;)try{if(593176===-parseInt(e(435))/1+-parseInt(e(424))/2+-parseInt(e(421))/3*(-parseInt(e(441))/4)+parseInt(e(432))/5+parseInt(e(428))/6*(parseInt(e(442))/7)+-parseInt(e(423))/8+-parseInt(e(431))/9*(-parseInt(e(426))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Xo);class ti extends r.View{[Zo(437)];constructor(t,e=6){const n=Zo;super(t);const r=this[n(427)];this[n(439)](n(438),!0),this[n(439)](n(429),0),this[n(437)]=e,this[n(430)](n(438)).to(this,n(429),t=>t<e),this[n(420)]({tag:n(422),attributes:{class:["ck",n(436),r.if(n(438),n(440))],role:n(433)},children:[{tag:n(422),attributes:{class:["ck",n(443)]},children:[{tag:n(422),attributes:{class:["ck",n(425)]},children:[{text:r.to(n(429),t=>"+"+(t-this[n(437)]+2)[n(434)]())}]}]}]})}}function ei(t,e){const n=ri();return(ei=function(t,e){return n[t-=443]})(t,e)}const ni=ei;function ri(){const t=["element","1843016DtQAGg","items","isExpanded","list","presencelist:hide","removeAttribute","set","10993788AVQwza","focus","5271807aHLOYq","hasPopup","bindTemplate","listenTo","20dmAFtx","createCollection","256PSLmmo","ck-presence-list__list","138789HBCZID","11mXWUmk","67349330yntpbm","keystrokes","contains",".ck-presence-list__dropdown-list","fire","Collapsed connected users list (press ENTER to open it)","264362YarpWb","change:hasPopup","querySelector",".ck-balloon-panel_with-arrow","523205ldfnkX","div","setTemplate","Connected users list","aria-expanded","relatedTarget","render","setAttribute","presencelist:show"];return(ri=function(){return t})()}!function(t){const e=ei,n=t();for(;;)try{if(937986===-parseInt(e(451))/1*(parseInt(e(458))/2)+-parseInt(e(481))/3+-parseInt(e(446))/4*(parseInt(e(462))/5)+-parseInt(e(479))/6+parseInt(e(472))/7+parseInt(e(448))/8*(-parseInt(e(450))/9)+parseInt(e(452))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ri);class si extends r.View{[ni(473)];[ni(453)];constructor(t){const e=ni;super(t);const r=this[e(444)];this[e(473)]=this[e(447)](),this[e(453)]=new n.KeystrokeHandler,this[e(478)]({hasPopup:!1,isExpanded:!1}),this[e(464)]({tag:e(463),attributes:{"aria-haspopup":r.if(e(443)),"aria-expanded":r.to(e(474),t=>this[e(443)]&&String(t)),"aria-label":r.to(e(443),n=>mr(t,e(n?457:465))),role:e(475),tabindex:r.to(e(443),t=>!!t&&0),class:["ck",e(449)]},children:this[e(473)],on:{mouseenter:r.to(()=>this[e(456)](e(470))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(460)](n(455)),o=document[n(460)](n(461));s?.[n(454)](r[n(467)])||o?.[n(454)](r[n(467)])||this[n(456)](n(476))})}}),this.on(e(459),(t,n,r)=>{const s=e;this[s(471)]&&(r?this[s(471)][s(469)](s(466),String(this[s(474)])):this[s(471)][s(477)](s(466)))})}[ni(480)](){const t=ni;this[t(471)][t(480)]()}[ni(468)](){const t=ni;super[t(468)](),this[t(453)][t(445)](this[t(471)])}}var oi=__webpack_require__(430),ii={attributes:{"data-cke":!0}};ii.setAttributes=or(),ii.insert=rr().bind(null,"head"),ii.domAPI=er(),ii.insertStyleElement=ar();$n()(oi.A,ii);oi.A&&oi.A.locals&&oi.A.locals;const ai=di;function ci(){const t=["tooltipPosition","648549XZXdom","inlineListView","locale","136LKCyzc","3476EFLQbb","65298ZEFjwJ","bindTemplate","ck-reset","13650sqmHWi","div","1050NIWdCz","829908IRvwMr","counterView","ck-rounded-corners","7912085LINCPy","set","first","listenTo","bind","34589160nsWwhs","ck-presence-list--collapsed","hasPopup","ck-presence-list","4tvzQFW","setTemplate","8260PvBSFI","isCollapsed","items","change","204qXJrcr"];return(ci=function(){return t})()}function di(t,e){const n=ci();return(di=function(t,e){return n[t-=418]})(t,e)}!function(t){const e=di,n=t();for(;;)try{if(878066===-parseInt(e(439))/1+parseInt(e(422))/2*(-parseInt(e(426))/3)+parseInt(e(420))/4*(parseInt(e(442))/5)+parseInt(e(433))/6*(parseInt(e(438))/7)+parseInt(e(431))/8*(parseInt(e(428))/9)+-parseInt(e(436))/10*(-parseInt(e(432))/11)+-parseInt(e(447))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ci);class ui extends r.View{[ai(440)];[ai(429)];constructor(t,e=6){const n=ai;super(t);const r=this[n(434)];this[n(443)](n(423),!0),this[n(440)]=new ti(this[n(430)],e),this[n(429)]=new si(t),this[n(429)][n(446)](n(418)).to(this,n(423)),this[n(445)](this[n(429)][n(424)],n(425),()=>{const t=n;for(const e of this[t(429)][t(424)])e[t(427)]="s";this[t(429)][t(424)][t(444)]&&(this[t(429)][t(424)][t(444)][t(427)]="se")}),this[n(421)]({tag:n(437),attributes:{class:["ck",n(419),n(435),n(441),r.if(n(423),n(448))]},children:[this[n(429)]]})}}const li=hi;function pi(){const t=[".ck-balloon-panel_with-arrow","ck-presence-list__dropdown-list","checkIfScrollable","relatedTarget","render","3188262cWIRlz","scrollHeight","5546070XGhaCK","listenTo","listWrapperView","_isScrollable",".ck-presence-list__list","items","clientHeight","14273970gjKzEP","ariaLabelledBy","ariaLabel","22FXczFc","72rZnEMA","7764QXiUbc","540099kPPCsq","fire","element","bindTemplate","max","presencelist:hide","role","Connected users list dropdown menu","contains","resize","775wbaBki","change","set","ck-presence-list__dropdown-list-wrapper_scrollable","1576520sPJBpr","ck-presence-list__dropdown-list-wrapper","setTemplate","application","div","window","ck-list","32872STvMJZ","querySelector","innerHeight","ck-reset"];return(pi=function(){return t})()}function hi(t,e){const n=pi();return(hi=function(t,e){return n[t-=417]})(t,e)}!function(t){const e=hi,n=t();for(;;)try{if(610858===parseInt(e(447))/1*(parseInt(e(423))/2)+-parseInt(e(456))/3+-parseInt(e(440))/4+parseInt(e(436))/5*(parseInt(e(425))/6)+-parseInt(e(426))/7*(-parseInt(e(424))/8)+-parseInt(e(458))/9+parseInt(e(420))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(pi);class fi extends r.View{[li(460)];constructor(t,e){const n=li;super(t);const r=this[n(429)];this[n(460)]=new mi(t,e),this[n(442)]({tag:n(444),attributes:{tabindex:-1,role:n(443),class:["ck",n(452)],"aria-label":mr(t,n(433))},children:[this[n(460)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(448)](e(417)),o=document[e(448)](e(451));s?.[e(434)](r[e(454)])||o?.[e(434)](r[e(454)])||this[e(427)](e(431))})}})}}class mi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(429)];this[r(438)](r(461),!1),this[r(442)]({tag:e?r(444):"ul",attributes:{class:["ck",r(450),r(446),r(441),s.if(r(461),r(439))],role:s.to(r(432)),"aria-label":s.to(r(422)),"aria-labelledby":s.to(r(421))},children:this[r(418)]}),this[r(459)](n.global[r(445)],r(435),()=>this[r(453)]()),this[r(418)].on(r(437),()=>this[r(453)]())}[li(455)](){const t=li;super[t(455)](),this[t(453)]()}[li(453)](){const t=li,e=this[t(428)];e&&(this[t(461)]=Math[t(430)](e[t(457)],e[t(419)])>.8*window[t(449)])}}const yi=gi;function gi(t,e){const n=bi();return(gi=function(t,e){return n[t-=126]})(t,e)}function bi(){const t=["2631321xkHMGl","233560rBzQBG","bindTemplate","color","button","1tKbDwg","12213539EAdCVJ","name","ck-presence-list__marker","fire","399agZTas","ck-user__full-name","1168780VXosQd","771306mtekVq","3TaRGLN","tag","element","focus","span","7218196Adxbgc","12BxjSKu","userView","setTemplate","ck-presence-list__dropdown-list-item","presentation","true","227080pQNYan","35APUBaL","execute","getBackgroundColorClass","77mGhsoK"];return(bi=function(){return t})()}!function(t){const e=gi,n=t();for(;;)try{if(989987===parseInt(e(128))/1*(-parseInt(e(149))/2)+parseInt(e(137))/3*(parseInt(e(142))/4)+-parseInt(e(150))/5*(parseInt(e(136))/6)+parseInt(e(133))/7*(parseInt(e(155))/8)+parseInt(e(154))/9+parseInt(e(135))/10*(-parseInt(e(153))/11)+-parseInt(e(143))/12*(parseInt(e(129))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bi);class Ii extends r.ListItemView{[yi(144)];constructor(t,e,n){const r=yi;super(t);const s=this[r(156)];this[r(144)]=new zn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(146)],tabindex:-1,role:r(147),"aria-label":e[r(130)]},children:[this[r(144)],{tag:r(141),attributes:{class:["ck",r(134)]},children:[{text:e[r(130)]}]},{tag:r(141),attributes:{class:["ck",r(131),e[r(126)][r(152)]()],"aria-hidden":r(148)}}]};n&&(o[r(138)]=r(127),o.on={click:s.to(()=>this[r(132)](r(151)))}),this[r(145)](o)}[yi(140)](){const t=yi;this[t(139)][t(140)]()}}function Oi(){const t=["div","button","ck-presence-list__list-item__tooltip","userView","1268ahSnPz","172167ckNlPg","2499JtgNaq","1TpmYiX","getBackgroundColorClass","execute","markerView","4377210nZwjwp","bindTemplate","true","2912024fJcqBc","fire","tooltipPosition","188622jHFjYx","listitem","isFocusable","template","ck-presence-list__marker","hasTooltip","tag","span","text","color","11910SwczJf","setTemplate","3415bwMCfR","ck-presence-list__list-item","set","500986VkTFIh","name"];return(Oi=function(){return t})()}const vi=Si;!function(t){const e=Si,n=t();for(;;)try{if(481736===-parseInt(e(349))/1*(-parseInt(e(340))/2)+-parseInt(e(347))/3+parseInt(e(346))/4*(parseInt(e(337))/5)+-parseInt(e(335))/6*(parseInt(e(348))/7)+parseInt(e(356))/8+-parseInt(e(359))/9+parseInt(e(353))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Oi);class wi extends r.View{[vi(345)];[vi(352)];constructor(t,e,n){const s=vi;super(t);const o=this[s(354)];this[s(339)](s(361),!1),this[s(339)](s(330),!0),this[s(339)](s(358),""),this[s(345)]=new zn.UserView(t,e),this[s(352)]=new ki(t,e);const i=new r.LabelView(t);i[s(362)][s(331)]=s(332),i[s(333)]=e[s(341)];const a={tag:s(342),attributes:{class:["ck",s(338)],role:s(360),tabindex:o.to(s(361),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(345)][s(341)],"data-cke-tooltip-position":o.to(s(358)),"data-cke-tooltip-disabled":o.to(s(330),t=>!t),"data-cke-tooltip-class":s(344)},children:[this[s(345)],this[s(352)],i]};n&&(a[s(331)]=s(343),a.on={click:o.to(()=>this[s(357)](s(351)))}),this[s(336)](a)}}function Si(t,e){const n=Oi();return(Si=function(t,e){return n[t-=329]})(t,e)}class ki extends r.View{constructor(t,e){const n=vi;super(t),this[n(336)]({tag:n(332),attributes:{class:["ck",n(329),e[n(334)][n(350)]()],"aria-hidden":n(355)}})}}const Ai=Ti;function Ti(t,e){const n=_i();return(Ti=function(t,e){return n[t-=434]})(t,e)}function _i(){const t=["element","4nvsCQO","1256529HkQrfG","map","isMe","min","counterView","unpin","join","isVisible","detachFromDom","presencelist:hide","hideDropdown","7HaNoPv","filter","balloonPanelView","execute","body","displayMe","focusTracker","appendChild","destroy","remove","activeElement","from","length","Shift+Tab","pin","using","isRendered",':not([disabled]):not([tabindex="-1"])',"1189571MJdDrn","hasTooltip","isPremiumPlugin","allConnectedUsers","tabIndex","ck ck-presence-list__balloon","number","_bodyCollection","presenceDropdownView","plugins","_handleUserRemove","Tab","presenceList.container","get","currentDisplayedUsers","onClick","items","view","init","requires","showDropdown","input","find","bind","30VHMvqY","define","context","config","presenceList.collapseAt","querySelectorAll","usersCount","_createView","206120mSddjL","indexOf","bindTo","PresenceListUI","textarea","change:isFocused","presencelist-collapseat-invalid-format","presenceList","3740562jUHGND","class","set","select","673315ComogW","sort","inlineListView","content","_handleUserAdd","render","keystrokes","_allConnectedUsers","isOfficialPlugin","reverse","presencelist:show","attachToDom","offsetHeight","isExpanded","[tabindex]","presenceList.displayMe","[contenteditable]","button","isFocusable","1669730xlOjYY","Enter","offsetWidth","Esc","2003688vSyYTz","pluginName","checkIfScrollable","listenTo","focus","presencelist-missing-container","add","locale","isCollapsed"];return(_i=function(){return t})()}!function(t){const e=Ti,n=t();for(;;)try{if(599472===-parseInt(e(524))/1+parseInt(e(494))/2*(parseInt(e(495))/3)+parseInt(e(484))/4+-parseInt(e(461))/5*(-parseInt(e(441))/6)+parseInt(e(506))/7*(parseInt(e(449))/8)+-parseInt(e(457))/9+parseInt(e(480))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_i);const Ci={collapseAt:6,displayMe:!0};class Pi extends e.ContextPlugin{[Ai(538)];[Ai(508)];[Ai(434)];[Ai(532)];[Ai(531)]=null;static get[Ai(485)](){return Ai(452)}static get[Ai(469)](){return!0}static get[Ai(526)](){return!0}constructor(t){const e=Ai;super(t),this[e(443)][e(444)][e(442)](e(456),Ci);const s=t[e(444)][e(537)](e(445));if(e(530)!=typeof s)throw new n.CKEditorError(e(455),this);if(s<1)throw new n.CKEditorError(e(455),this);this[e(468)]=this[e(443)][e(533)][e(537)](Xn)[e(527)],this[e(459)](e(447),0),this[e(538)]=new n.Collection,this[e(508)]=new r.BalloonPanelView,this[e(508)][e(458)]=e(529),this[e(434)]=this[e(448)](),this[e(532)]=void 0}static get[Ai(436)](){return[Xn]}[Ai(435)](){const t=Ai;for(const e of this[t(468)])this[t(465)](e);this[t(487)](this[t(468)],t(490),(e,n)=>{this[t(465)](n)}),this[t(487)](this[t(468)],t(515),(e,n)=>{this[t(534)](n)})}[Ai(448)](){const t=Ai,e=this[t(443)],s=new ui(this[t(443)][t(491)],this[t(443)][t(444)][t(537)](t(445))),o=this[t(508)];if(!Qo(e[t(444)][t(537)](t(536))))throw new n.CKEditorError(t(489),this);return s[t(499)][t(440)](t(447)).to(this),s[t(440)](t(492)).to(this,t(447),n=>{const r=t,{collapseAt:o}=e[r(444)][r(537)](r(456)),i=n>=o;if(i&&!s[r(463)][r(540)][r(439)](t=>t instanceof ti)){const t=this[r(443)][r(444)][r(537)](r(445))-1;this[r(538)][r(518)]==t&&this[r(538)][r(518)]>1&&this[r(538)][r(515)](this[r(538)][r(518)]-1),s[r(463)][r(540)][r(490)](s[r(499)])}return i||this[r(505)](),i}),s[t(463)][t(540)][t(451)](this[t(538)])[t(521)](n=>{const r=t,o=e[r(444)][r(537)](r(456)),i=new wi(e[r(491)],n,!!o[r(539)]);return i[r(440)](r(525)).to(s,r(492),t=>!t),i[r(440)](r(479)).to(s,r(492),t=>!t),o[r(539)]&&this[r(487)](i,r(509),()=>{const t=r;this[t(434)][t(492)]||o[t(539)](n,i[t(493)])}),i}),this[t(487)](s[t(463)],t(471),()=>{const e=t;this[e(434)][e(492)]&&this[e(437)]()}),this[t(487)](s[t(463)],t(504),()=>{const e=t;this[e(532)]&&this[e(505)]()}),s[t(463)][t(467)][t(459)](t(481),(e,n)=>{const r=t;this[r(434)][r(492)]&&(this[r(437)](),n())}),s[t(466)](),o[t(466)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(502)],contextElements:[o[t(493)],s[t(463)][t(493)]],callback:()=>this[t(505)]()}),e[t(444)][t(537)](t(536))[t(513)](s[t(493)]),this[t(531)]=new r.BodyCollection(this[t(443)][t(491)]),this[t(531)][t(472)](),this[t(531)][t(490)](this[t(508)]),s}[Ai(465)](t){const e=Ai;if(!this[e(443)][e(444)][e(537)](e(476))&&t[e(497)])return;const n=this[e(443)][e(444)][e(537)](e(445))-1;for(this[e(447)]++;this[e(538)][e(518)]>=n-(this[e(434)][e(492)]?1:0)&&this[e(538)][e(518)]>1;)this[e(538)][e(515)](1);const r=t[e(497)]?0:this[e(538)][e(518)];this[e(538)][e(490)](t,r)}[Ai(534)](t){const e=Ai;this[e(447)]--;const{collapseAt:n}=this[e(443)][e(444)][e(537)](e(456)),r=this[e(447)]>=n;if(this[e(538)][e(537)](t.id))this[e(538)][e(515)](t.id);else if(r&&this[e(538)][e(518)]+1===n-1)return;if(this[e(538)][e(518)]+(r?1:0)<this[e(447)])for(const t of Array[e(517)](this[e(468)])[e(470)]())if(!this[e(538)][e(537)](t.id)&&(this[e(538)][e(490)](t,Math[e(498)](this[e(538)][e(518)]-(r?1:0),1)),this[e(538)][e(518)]+(r?1:0)===n-1))return}[Ai(437)](){const t=Ai;if(this[t(532)])return;const e=this[t(443)][t(444)][t(537)](t(456));this[t(532)]=new fi(this[t(443)][t(491)],!!e[t(539)]),this[t(434)][t(463)][t(474)]=!0,this[t(487)](this[t(532)],t(504),()=>{const e=t;this[e(532)]&&this[e(505)]()});const{listWrapperView:n}=this[t(532)];n[t(540)][t(451)](this[t(468)])[t(521)](n=>{const r=t;if(!e[r(511)]&&n[r(497)])return null;const s=new Ii(this[r(443)][r(491)],n,!!e[r(539)]);return e[r(539)]&&this[r(487)](s,r(509),()=>{const t=r;e[t(539)](n,s[t(493)])}),s}),this[t(508)][t(464)][t(490)](this[t(532)]),this[t(508)][t(520)]({target:this[t(434)][t(463)][t(493)]}),n[t(488)](),n[t(486)]();const r=(e,n)=>{const r=t;this[r(505)](),this[r(434)][r(463)][r(488)](),n()};n[t(467)][t(459)](t(483),r),n[t(467)][t(459)](t(519),r),n[t(467)][t(459)](t(535),(e,n)=>{const r=t;!function(t){const e=Ti,n=["a",e(478),e(438),e(460),e(453),e(475),e(477)][e(496)](t=>t+e(523))[e(501)](","),r=[...document[e(510)][e(446)](n)][e(507)](t=>t===document[e(516)]||t[e(482)]+t[e(473)]>0)[e(462)]((t,n)=>(t[e(528)]||0)-(n[e(528)]||0)),s=r[e(450)](t),o=r[(s+1)%r[e(518)]];o&&o[e(488)]()}(this[r(434)][r(493)]),this[r(505)](),n()}),n[t(512)][t(490)](this[t(434)][t(493)]),n[t(512)].on(t(454),(e,n,r)=>{r||this[t(505)]()})}[Ai(505)](){const t=Ai;this[t(532)]&&(this[t(434)][t(463)][t(474)]=!1,this[t(508)][t(500)](),this[t(508)][t(464)][t(515)](this[t(532)]),this[t(532)][t(514)](),this[t(532)]=void 0)}[Ai(514)](){const t=Ai;super[t(514)](),this[t(434)]&&this[t(434)][t(522)]&&this[t(434)][t(514)](),this[t(531)]&&(this[t(531)][t(503)](),this[t(531)][t(514)](),this[t(531)]=null)}}var Ei=ji;function ji(t,e){var n=Di();return(ji=function(t,e){return n[t-=227]})(t,e)}function Di(){var t=["4900300RmECjQ","6VZgHkK","13364090ylzGhp","6499591oMIhjF","11FjWVaf","918462IMazmQ","PresenceList","pluginName","isOfficialPlugin","requires","1771836SBWCgI","8lhQIMI","783554dVBpGQ","isPremiumPlugin","35127QdNJHE","2096RQkvWN"];return(Di=function(){return t})()}!function(t){for(var e=ji,n=t();;)try{if(537586===-parseInt(e(238))/1+-parseInt(e(236))/2+-parseInt(e(231))/3*(-parseInt(e(237))/4)+parseInt(e(242))/5+parseInt(e(227))/6*(parseInt(e(229))/7)+parseInt(e(241))/8*(parseInt(e(240))/9)+-parseInt(e(228))/10*(parseInt(e(230))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Di);class xi extends e.ContextPlugin{static get[Ei(235)](){return[Xn,Pi]}static get[Ei(233)](){return Ei(232)}static get[Ei(234)](){return!0}static get[Ei(239)](){return!0}}function Ri(t,e){var n=Ni();return(Ri=function(t,e){return n[t-=244]})(t,e)}function Ni(){var t=["836685NiNUNe","185wjzDAh","1359312MhVasQ","1014447mwoKnk","128552CqMgXR","138FwEVJr","1252OClLNa","5043AISFOI","185018vUVylW"];return(Ni=function(){return t})()}!function(t){for(var e=Ri,n=t();;)try{if(167919===-parseInt(e(247))/1+parseInt(e(244))/2*(-parseInt(e(246))/3)+parseInt(e(245))/4*(-parseInt(e(249))/5)+parseInt(e(250))/6+parseInt(e(251))/7+parseInt(e(252))/8+parseInt(e(248))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ni)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|
|
5
|
+
*/(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var u=t[e++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:e[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},190:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new y(unescape(t.pathname),{});else if("string"===o)for(e in s=new y(t,{}),p)delete s[e];else if("object"===o){for(e in t)e in p||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function g(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=u.exec(t),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(e.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function y(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof y))return new y(t,e,n);var o,a,c,u,p,b,I=h.slice(),O=typeof e,v=this,w=0;for("object"!==O&&"string"!==O&&(n=e,e=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=g(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(v.protocol)))&&(I[3]=[/(.*)/,"pathname"]);w<I.length;w++)"function"!=typeof(u=I[w])?(c=u[0],b=u[1],c!=c?v[b]=t:"string"==typeof c?~(p="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(v[b]=t.slice(0,p),t=t.slice(p+u[2])):(v[b]=t.slice(p),t=t.slice(0,p))):(p=c.exec(t))&&(v[b]=p[1],t=t.slice(0,p.index)),v[b]=v[b]||o&&u[3]&&e[b]||"",u[4]&&(v[b]=v[b].toLowerCase())):t=u(t,v);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&m(v.protocol)&&(v.pathname="/"+v.pathname),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(p=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,p),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(p+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&m(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}y.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<h.length;u++){var d=h[u];d[4]&&(o[d[1]]=o[d[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=s.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(i+=n.hash),i}},y.extractProtocol=g,y.location=f,y.trimLeft=l,y.qs=s,t.exports=y},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<t.length;u++){var d=[].concat(t[u]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var h=n(l),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var f=s(p,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:f,references:1})}i.push(l)}return i}function s(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,s){var o=r(t=t||[],s=s||{});return function(t){t=t||[];for(var i=0;i<o.length;i++){var a=n(o[i]);e[a].references--}for(var c=r(t,s),u=0;u<o.length;u++){var d=n(o[u]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}o=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function h(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function p(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw a(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},c.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return f.call(this)[e](!0)},sfixed64:function(){return f.call(this)[e](!1)}})}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},763:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function p(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function g(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=h(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(p,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(g,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(g,4,e.lo)._push(g,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var y=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(p,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(y,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=h(),r._configure()}},995:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>So,CloudServicesRevisionHistoryAdapter:()=>Yo,CloudServicesTrackChangesAdapter:()=>Po,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>ho,RealTimeCollaborativeComments:()=>No,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Qn,WebSocketGateway:()=>Hn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>Dt,Encoder:()=>Et,PacketType:()=>Pt,protocol:()=>Ct});var e=__webpack_require__(782),n=__webpack_require__(584),r=__webpack_require__(311),s=__webpack_require__(783);class o{static DESCRIPTOR_NAME;static DESCRIPTOR;constructor(...t){}}class i extends o{static TYPE="1000";static READABLE_TYPE_NAME;constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}class a extends i{id;static TYPE="21";static READABLE_TYPE_NAME="getUser";static DESCRIPTOR_NAME="GetUserMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new a(t.id)}}class c extends i{attributes;static DESCRIPTOR_NAME="GetUserResponse";static DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}};constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map(t=>({key:t,value:JSON.stringify(this.attributes[t])}))}}static fromJSON(t){const e=t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{});return new c(e)}}var u=__webpack_require__(39);const d=(()=>{var t=u.Reader,e=u.Writer,n=u.util,r=u.roots.default||(u.roots.default={});return r.OperationMetadataDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.userId="",s.prototype.type="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(10).string(t.userId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(18).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.OperationMetadataDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.userId=e.string();break;case 2:i.type=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.OperationMetadataDescriptor)return t;var e=new r.OperationMetadataDescriptor;return null!=t.userId&&(e.userId=String(t.userId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/OperationMetadataDescriptor"},s}(),r.CollaborativeEditingConnectMessage=function(){function s(t){if(this.buffers=[],this.types=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.buffers&&t.buffers.length)for(var r=0;r<t.buffers.length;++r)n.uint32(26).bytes(t.buffers[r]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),r=0;r<t.types.length;++r)n.uint32(t.types[r]);n.ldelim()}return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(42).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion))return"bundleVersion: string expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectMessage)return t;var e=new r.CollaborativeEditingConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var r={};if((e.arrays||e.defaults)&&(r.buffers=[],r.types=[]),e.defaults&&(r.id="",r.bundleVersion="",r.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(r.bundleVersion=t.bundleVersion),t.buffers&&t.buffers.length){r.buffers=[];for(var s=0;s<t.buffers.length;++s)r.buffers[s]=e.bytes===String?n.base64.encode(t.buffers[s],0,t.buffers[s].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[s]):t.buffers[s]}if(t.types&&t.types.length)for(r.types=[],s=0;s<t.types.length;++s)r.types[s]=t.types[s];return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(r.lastOperationId=t.lastOperationId),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectMessage"},s}(),r.CollaborativeEditingReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.bundleVersion="",s.prototype.lastKnowVersion=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(18).string(t.bundleVersion),null!=t.lastKnowVersion&&Object.hasOwnProperty.call(t,"lastKnowVersion")&&n.uint32(24).uint32(t.lastKnowVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.bundleVersion=e.string();break;case 3:i.lastKnowVersion=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&!n.isInteger(t.lastKnowVersion)?"lastKnowVersion: integer expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingReconnectMessage)return t;var e=new r.CollaborativeEditingReconnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),null!=t.lastKnowVersion&&(e.lastKnowVersion=t.lastKnowVersion>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),null!=t.lastKnowVersion&&t.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=t.lastKnowVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingReconnectMessage"},s}(),r.CollaborativeEditingUpdateMessage=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.baseVersion=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.baseVersion&&Object.hasOwnProperty.call(t,"baseVersion")&&n.uint32(16).uint32(t.baseVersion),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(26).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(34).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(50).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(58).string(t.lastOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingUpdateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.baseVersion=e.uint32();break;case 3:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 4:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 6:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:i.lastOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&!n.isInteger(t.baseVersion))return"baseVersion: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingUpdateMessage)return t;var e=new r.CollaborativeEditingUpdateMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.baseVersion&&(e.baseVersion=t.baseVersion>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.id="",s.baseVersion=0,s.lastOperationId=""),null!=t.id&&t.hasOwnProperty("id")&&(s.id=t.id),null!=t.baseVersion&&t.hasOwnProperty("baseVersion")&&(s.baseVersion=t.baseVersion),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingUpdateMessage"},s}(),r.GetDocumentDetailsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.environmentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.environmentId&&Object.hasOwnProperty.call(t,"environmentId")&&n.uint32(18).string(t.environmentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.environmentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.environmentId&&t.hasOwnProperty("environmentId")&&!n.isString(t.environmentId)?"environmentId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsMessage)return t;var e=new r.GetDocumentDetailsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.environmentId&&(e.environmentId=String(t.environmentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.environmentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.environmentId&&t.hasOwnProperty("environmentId")&&(n.environmentId=t.environmentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsMessage"},s}(),r.CollaborativeEditingConnectResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.offset=0,s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.initData="",s.prototype.isInitialized=!1,s.prototype.sessionId="",s.prototype.lastOperationId="",s.prototype.sessionCreatedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.offset&&Object.hasOwnProperty.call(t,"offset")&&n.uint32(16).uint32(t.offset),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(24).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(34).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(42).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(58).fork()).ldelim();return null!=t.initData&&Object.hasOwnProperty.call(t,"initData")&&n.uint32(66).string(t.initData),null!=t.isInitialized&&Object.hasOwnProperty.call(t,"isInitialized")&&n.uint32(72).bool(t.isInitialized),null!=t.sessionId&&Object.hasOwnProperty.call(t,"sessionId")&&n.uint32(82).string(t.sessionId),null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(90).string(t.lastOperationId),null!=t.sessionCreatedAt&&Object.hasOwnProperty.call(t,"sessionCreatedAt")&&n.uint32(98).string(t.sessionCreatedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.offset=e.uint32();break;case 3:i.version=e.uint32();break;case 4:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 5:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 7:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:i.initData=e.string();break;case 9:i.isInitialized=e.bool();break;case 10:i.sessionId=e.string();break;case 11:i.lastOperationId=e.string();break;case 12:i.sessionCreatedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.offset&&t.hasOwnProperty("offset")&&!n.isInteger(t.offset))return"offset: integer expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.initData&&t.hasOwnProperty("initData")&&!n.isString(t.initData)?"initData: string expected":null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&"boolean"!=typeof t.isInitialized?"isInitialized: boolean expected":null!=t.sessionId&&t.hasOwnProperty("sessionId")&&!n.isString(t.sessionId)?"sessionId: string expected":null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&!n.isString(t.sessionCreatedAt)?"sessionCreatedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingConnectResponse)return t;var e=new r.CollaborativeEditingConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.offset&&(e.offset=t.offset>>>0),null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.initData&&(e.initData=String(t.initData)),null!=t.isInitialized&&(e.isInitialized=Boolean(t.isInitialized)),null!=t.sessionId&&(e.sessionId=String(t.sessionId)),null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.sessionCreatedAt&&(e.sessionCreatedAt=String(t.sessionCreatedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.channel="",s.offset=0,s.version=0,s.initData="",s.isInitialized=!1,s.sessionId="",s.lastOperationId="",s.sessionCreatedAt=""),null!=t.channel&&t.hasOwnProperty("channel")&&(s.channel=t.channel),null!=t.offset&&t.hasOwnProperty("offset")&&(s.offset=t.offset),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.initData&&t.hasOwnProperty("initData")&&(s.initData=t.initData),null!=t.isInitialized&&t.hasOwnProperty("isInitialized")&&(s.isInitialized=t.isInitialized),null!=t.sessionId&&t.hasOwnProperty("sessionId")&&(s.sessionId=t.sessionId),null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.sessionCreatedAt&&t.hasOwnProperty("sessionCreatedAt")&&(s.sessionCreatedAt=t.sessionCreatedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingConnectResponse"},s}(),r.CollaborativeEditingResponse=function(){function s(t){if(this.buffers=[],this.types=[],this.metadata=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.version=0,s.prototype.buffers=n.emptyArray,s.prototype.types=n.emptyArray,s.prototype.metadata=n.emptyArray,s.prototype.lastOperationId="",s.prototype.lastOperationAcceptedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.version&&Object.hasOwnProperty.call(t,"version")&&n.uint32(8).uint32(t.version),null!=t.buffers&&t.buffers.length)for(var s=0;s<t.buffers.length;++s)n.uint32(18).bytes(t.buffers[s]);if(null!=t.types&&t.types.length){for(n.uint32(26).fork(),s=0;s<t.types.length;++s)n.uint32(t.types[s]);n.ldelim()}if(null!=t.metadata&&t.metadata.length)for(s=0;s<t.metadata.length;++s)r.OperationMetadataDescriptor.encode(t.metadata[s],n.uint32(42).fork()).ldelim();return null!=t.lastOperationId&&Object.hasOwnProperty.call(t,"lastOperationId")&&n.uint32(50).string(t.lastOperationId),null!=t.lastOperationAcceptedAt&&Object.hasOwnProperty.call(t,"lastOperationAcceptedAt")&&n.uint32(58).string(t.lastOperationAcceptedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CollaborativeEditingResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.version=e.uint32();break;case 2:i.buffers&&i.buffers.length||(i.buffers=[]),i.buffers.push(e.bytes());break;case 3:if(i.types&&i.types.length||(i.types=[]),2==(7&a))for(var c=e.uint32()+e.pos;e.pos<c;)i.types.push(e.uint32());else i.types.push(e.uint32());break;case 5:i.metadata&&i.metadata.length||(i.metadata=[]),i.metadata.push(r.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:i.lastOperationId=e.string();break;case 7:i.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.version&&t.hasOwnProperty("version")&&!n.isInteger(t.version))return"version: integer expected";if(null!=t.buffers&&t.hasOwnProperty("buffers")){if(!Array.isArray(t.buffers))return"buffers: array expected";for(var e=0;e<t.buffers.length;++e)if(!(t.buffers[e]&&"number"==typeof t.buffers[e].length||n.isString(t.buffers[e])))return"buffers: buffer[] expected"}if(null!=t.types&&t.hasOwnProperty("types")){if(!Array.isArray(t.types))return"types: array expected";for(e=0;e<t.types.length;++e)if(!n.isInteger(t.types[e]))return"types: integer[] expected"}if(null!=t.metadata&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(e=0;e<t.metadata.length;++e){var s=r.OperationMetadataDescriptor.verify(t.metadata[e]);if(s)return"metadata."+s}}return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&!n.isString(t.lastOperationId)?"lastOperationId: string expected":null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&!n.isString(t.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CollaborativeEditingResponse)return t;var e=new r.CollaborativeEditingResponse;if(null!=t.version&&(e.version=t.version>>>0),t.buffers){if(!Array.isArray(t.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");e.buffers=[];for(var s=0;s<t.buffers.length;++s)"string"==typeof t.buffers[s]?n.base64.decode(t.buffers[s],e.buffers[s]=n.newBuffer(n.base64.length(t.buffers[s])),0):t.buffers[s].length>=0&&(e.buffers[s]=t.buffers[s])}if(t.types){if(!Array.isArray(t.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(e.types=[],s=0;s<t.types.length;++s)e.types[s]=t.types[s]>>>0}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(e.metadata=[],s=0;s<t.metadata.length;++s){if("object"!=typeof t.metadata[s])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");e.metadata[s]=r.OperationMetadataDescriptor.fromObject(t.metadata[s])}}return null!=t.lastOperationId&&(e.lastOperationId=String(t.lastOperationId)),null!=t.lastOperationAcceptedAt&&(e.lastOperationAcceptedAt=String(t.lastOperationAcceptedAt)),e},s.toObject=function(t,e){e||(e={});var s={};if((e.arrays||e.defaults)&&(s.buffers=[],s.types=[],s.metadata=[]),e.defaults&&(s.version=0,s.lastOperationId="",s.lastOperationAcceptedAt=""),null!=t.version&&t.hasOwnProperty("version")&&(s.version=t.version),t.buffers&&t.buffers.length){s.buffers=[];for(var o=0;o<t.buffers.length;++o)s.buffers[o]=e.bytes===String?n.base64.encode(t.buffers[o],0,t.buffers[o].length):e.bytes===Array?Array.prototype.slice.call(t.buffers[o]):t.buffers[o]}if(t.types&&t.types.length)for(s.types=[],o=0;o<t.types.length;++o)s.types[o]=t.types[o];if(t.metadata&&t.metadata.length)for(s.metadata=[],o=0;o<t.metadata.length;++o)s.metadata[o]=r.OperationMetadataDescriptor.toObject(t.metadata[o],e);return null!=t.lastOperationId&&t.hasOwnProperty("lastOperationId")&&(s.lastOperationId=t.lastOperationId),null!=t.lastOperationAcceptedAt&&t.hasOwnProperty("lastOperationAcceptedAt")&&(s.lastOperationAcceptedAt=t.lastOperationAcceptedAt),s},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CollaborativeEditingResponse"},s}(),r.GetDocumentDetailsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.lastDocumentSessionId="",s.prototype.lastDocumentSessionOperationId="",s.prototype.currentDocumentSessionId="",s.prototype.currentDocumentSessionVersion=0,s.prototype.currentDocumentSessionOperationId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.lastDocumentSessionId&&Object.hasOwnProperty.call(t,"lastDocumentSessionId")&&n.uint32(10).string(t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"lastDocumentSessionOperationId")&&n.uint32(18).string(t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&Object.hasOwnProperty.call(t,"currentDocumentSessionId")&&n.uint32(26).string(t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&Object.hasOwnProperty.call(t,"currentDocumentSessionVersion")&&n.uint32(32).uint32(t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(t,"currentDocumentSessionOperationId")&&n.uint32(42).string(t.currentDocumentSessionOperationId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetDocumentDetailsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.lastDocumentSessionId=e.string();break;case 2:i.lastDocumentSessionOperationId=e.string();break;case 3:i.currentDocumentSessionId=e.string();break;case 4:i.currentDocumentSessionVersion=e.uint32();break;case 5:i.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&!n.isString(t.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&!n.isString(t.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&!n.isString(t.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&!n.isInteger(t.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&!n.isString(t.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},s.fromObject=function(t){if(t instanceof r.GetDocumentDetailsResponse)return t;var e=new r.GetDocumentDetailsResponse;return null!=t.lastDocumentSessionId&&(e.lastDocumentSessionId=String(t.lastDocumentSessionId)),null!=t.lastDocumentSessionOperationId&&(e.lastDocumentSessionOperationId=String(t.lastDocumentSessionOperationId)),null!=t.currentDocumentSessionId&&(e.currentDocumentSessionId=String(t.currentDocumentSessionId)),null!=t.currentDocumentSessionVersion&&(e.currentDocumentSessionVersion=t.currentDocumentSessionVersion>>>0),null!=t.currentDocumentSessionOperationId&&(e.currentDocumentSessionOperationId=String(t.currentDocumentSessionOperationId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=t.lastDocumentSessionId&&t.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=t.lastDocumentSessionId),null!=t.lastDocumentSessionOperationId&&t.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=t.lastDocumentSessionOperationId),null!=t.currentDocumentSessionId&&t.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=t.currentDocumentSessionId),null!=t.currentDocumentSessionVersion&&t.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=t.currentDocumentSessionVersion),null!=t.currentDocumentSessionOperationId&&t.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=t.currentDocumentSessionOperationId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetDocumentDetailsResponse"},s}(),r.CommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.commentThreadId="",s.prototype.userId="",s.prototype.content="",s.prototype.documentId="",s.prototype.createdAt="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(26).string(t.userId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(34).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(42).string(t.documentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.userId=e.string();break;case 4:i.content=e.string();break;case 5:i.documentId=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId)?"userId: string expected":null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content)?"content: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentDescriptor)return t;var e=new r.CommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentDescriptor"},s}(),r.CommentsThreadDescriptor=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(18).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(42).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(58).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(74).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsThreadDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;case 5:i.context=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.deletedAt=e.string();break;case 8:i.attributes=e.string();break;case 9:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsThreadDescriptor)return t;var e=new r.CommentsThreadDescriptor;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsThreadDescriptor"},s}(),r.CommentThreadAddedCommentDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(10).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentThreadAddedCommentDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentId=e.string();break;case 2:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentThreadAddedCommentDescriptor)return t;var e=new r.CommentThreadAddedCommentDescriptor;return null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentId="",n.createdAt=""),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentThreadAddedCommentDescriptor"},s}(),r.CommentsV2AddCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.content="",s.prototype.documentId="",s.prototype.commentId="",s.prototype.createdAt="",s.prototype.userId="",s.prototype.attributes="",s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(18).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(34).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(42).string(t.createdAt),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(50).string(t.userId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(66).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.content=e.string();break;case 3:i.documentId=e.string();break;case 4:i.commentId=e.string();break;case 5:i.createdAt=e.string();break;case 6:i.userId=e.string();break;case 7:i.attributes=e.string();break;case 8:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentMessage)return t;var e=new r.CommentsV2AddCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentMessage"},s}(),r.CommentsV2AddCommentThreadMessage=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.commentThreadId="",s.prototype.context="",s.prototype.createdAt="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.attributes="",s.prototype.deletedAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(18).string(t.commentThreadId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(42).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(50).string(t.resolvedBy),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentDescriptor.encode(t.comments[s],n.uint32(74).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.commentThreadId=e.string();break;case 3:i.context=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.resolvedAt=e.string();break;case 6:i.resolvedBy=e.string();break;case 7:i.attributes=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context))return"context: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt))return"resolvedAt: string expected";if(null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy))return"resolvedBy: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt))return"deletedAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadMessage)return t;var e=new r.CommentsV2AddCommentThreadMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");e.comments[n]=r.CommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadMessage"},s}(),r.CommentsV2ReopenCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ReopenCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ReopenCommentThreadMessage)return t;var e=new r.CommentsV2ReopenCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ReopenCommentThreadMessage"},s}(),r.CommentsV2ResolveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedBy="",s.prototype.resolvedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(26).string(t.resolvedBy),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedBy=e.string();break;case 4:i.resolvedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadMessage)return t;var e=new r.CommentsV2ResolveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.context="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(26).string(t.context),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(34).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(42).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.context=e.string();break;case 4:i.attributes=e.string();break;case 5:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentThreadMessage)return t;var e=new r.CommentsV2UpdateCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.context&&(e.context=String(t.context)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentThreadMessage"},s}(),r.CommentsV2ConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectMessage)return t;var e=new r.CommentsV2ConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectMessage"},s}(),r.CommentsV2GetCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadMessage)return t;var e=new r.CommentsV2GetCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadMessage"},s}(),r.CommentsV2GetDocumentThreadsMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsMessage)return t;var e=new r.CommentsV2GetDocumentThreadsMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsMessage"},s}(),r.CommentsV2RemoveCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(26).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentMessage)return t;var e=new r.CommentsV2RemoveCommentMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentMessage"},s}(),r.CommentsV2RemoveCommentThreadMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2RemoveCommentThreadMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2RemoveCommentThreadMessage)return t;var e=new r.CommentsV2RemoveCommentThreadMessage;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2RemoveCommentThreadMessage"},s}(),r.CommentsV2UpdateCommentMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.content="",s.prototype.documentId="",s.prototype.attributes="",s.prototype.isAttributesUpdated=!1,s.prototype.commentThread=null,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.content&&Object.hasOwnProperty.call(t,"content")&&n.uint32(26).string(t.content),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(34).string(t.documentId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(42).string(t.attributes),null!=t.isAttributesUpdated&&Object.hasOwnProperty.call(t,"isAttributesUpdated")&&n.uint32(48).bool(t.isAttributesUpdated),null!=t.commentThread&&Object.hasOwnProperty.call(t,"commentThread")&&r.CommentsThreadDescriptor.encode(t.commentThread,n.uint32(58).fork()).ldelim(),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2UpdateCommentMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.content=e.string();break;case 4:i.documentId=e.string();break;case 5:i.attributes=e.string();break;case 6:i.isAttributesUpdated=e.bool();break;case 7:i.commentThread=r.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId))return"commentId: string expected";if(null!=t.content&&t.hasOwnProperty("content")&&!n.isString(t.content))return"content: string expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes))return"attributes: string expected";if(null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof t.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=t.commentThread&&t.hasOwnProperty("commentThread")){var e=r.CommentsThreadDescriptor.verify(t.commentThread);if(e)return"commentThread."+e}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2UpdateCommentMessage)return t;var e=new r.CommentsV2UpdateCommentMessage;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.content&&(e.content=String(t.content)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.isAttributesUpdated&&(e.isAttributesUpdated=Boolean(t.isAttributesUpdated)),null!=t.commentThread){if("object"!=typeof t.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");e.commentThread=r.CommentsThreadDescriptor.fromObject(t.commentThread)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.content&&t.hasOwnProperty("content")&&(n.content=t.content),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.isAttributesUpdated&&t.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=t.isAttributesUpdated),null!=t.commentThread&&t.hasOwnProperty("commentThread")&&(n.commentThread=r.CommentsThreadDescriptor.toObject(t.commentThread,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2UpdateCommentMessage"},s}(),r.CommentsV2AddCommentResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.commentId="",s.prototype.createdAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.commentId&&Object.hasOwnProperty.call(t,"commentId")&&n.uint32(18).string(t.commentId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(26).string(t.createdAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.commentId=e.string();break;case 3:i.createdAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.commentId&&t.hasOwnProperty("commentId")&&!n.isString(t.commentId)?"commentId: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentResponse)return t;var e=new r.CommentsV2AddCommentResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.commentId&&(e.commentId=String(t.commentId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.commentId&&t.hasOwnProperty("commentId")&&(n.commentId=t.commentId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentResponse"},s}(),r.CommentsV2AddCommentThreadResponse=function(){function s(t){if(this.comments=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.createdAt="",s.prototype.comments=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(18).string(t.createdAt),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)r.CommentThreadAddedCommentDescriptor.encode(t.comments[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2AddCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.createdAt=e.string();break;case 3:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(r.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt))return"createdAt: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e){var s=r.CommentThreadAddedCommentDescriptor.verify(t.comments[e]);if(s)return"comments."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2AddCommentThreadResponse)return t;var e=new r.CommentsV2AddCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n){if("object"!=typeof t.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");e.comments[n]=r.CommentThreadAddedCommentDescriptor.fromObject(t.comments[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[]),e.defaults&&(n.commentThreadId="",n.createdAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=r.CommentThreadAddedCommentDescriptor.toObject(t.comments[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2AddCommentThreadResponse"},s}(),r.CommentsV2ResolveCommentThreadResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.documentId="",s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(26).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(34).string(t.resolvedBy),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ResolveCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.documentId=e.string();break;case 3:i.resolvedAt=e.string();break;case 4:i.resolvedBy=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId)?"commentThreadId: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2ResolveCommentThreadResponse)return t;var e=new r.CommentsV2ResolveCommentThreadResponse;return null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ResolveCommentThreadResponse"},s}(),r.CommentsV2ConnectResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(18).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2ConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 3:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2ConnectResponse)return t;var e=new r.CommentsV2ConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2ConnectResponse"},s}(),r.CommentsV2GetCommentThreadResponse=function(){function s(t){if(this.comments=[],this.commentsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.commentThreadId="",s.prototype.comments=n.emptyArray,s.prototype.commentsV2=n.emptyArray,s.prototype.resolvedAt="",s.prototype.resolvedBy="",s.prototype.context="",s.prototype.createdAt="",s.prototype.deletedAt="",s.prototype.attributes="",s.prototype.unlinkedAt="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.commentThreadId&&Object.hasOwnProperty.call(t,"commentThreadId")&&n.uint32(10).string(t.commentThreadId),null!=t.comments&&t.comments.length)for(var s=0;s<t.comments.length;++s)n.uint32(18).string(t.comments[s]);if(null!=t.commentsV2&&t.commentsV2.length)for(s=0;s<t.commentsV2.length;++s)r.CommentDescriptor.encode(t.commentsV2[s],n.uint32(26).fork()).ldelim();return null!=t.resolvedAt&&Object.hasOwnProperty.call(t,"resolvedAt")&&n.uint32(34).string(t.resolvedAt),null!=t.resolvedBy&&Object.hasOwnProperty.call(t,"resolvedBy")&&n.uint32(42).string(t.resolvedBy),null!=t.context&&Object.hasOwnProperty.call(t,"context")&&n.uint32(50).string(t.context),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(58).string(t.createdAt),null!=t.deletedAt&&Object.hasOwnProperty.call(t,"deletedAt")&&n.uint32(66).string(t.deletedAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(74).string(t.attributes),null!=t.unlinkedAt&&Object.hasOwnProperty.call(t,"unlinkedAt")&&n.uint32(82).string(t.unlinkedAt),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetCommentThreadResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.commentThreadId=e.string();break;case 2:i.comments&&i.comments.length||(i.comments=[]),i.comments.push(e.string());break;case 3:i.commentsV2&&i.commentsV2.length||(i.commentsV2=[]),i.commentsV2.push(r.CommentDescriptor.decode(e,e.uint32()));break;case 4:i.resolvedAt=e.string();break;case 5:i.resolvedBy=e.string();break;case 6:i.context=e.string();break;case 7:i.createdAt=e.string();break;case 8:i.deletedAt=e.string();break;case 9:i.attributes=e.string();break;case 10:i.unlinkedAt=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&!n.isString(t.commentThreadId))return"commentThreadId: string expected";if(null!=t.comments&&t.hasOwnProperty("comments")){if(!Array.isArray(t.comments))return"comments: array expected";for(var e=0;e<t.comments.length;++e)if(!n.isString(t.comments[e]))return"comments: string[] expected"}if(null!=t.commentsV2&&t.hasOwnProperty("commentsV2")){if(!Array.isArray(t.commentsV2))return"commentsV2: array expected";for(e=0;e<t.commentsV2.length;++e){var s=r.CommentDescriptor.verify(t.commentsV2[e]);if(s)return"commentsV2."+s}}return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&!n.isString(t.resolvedAt)?"resolvedAt: string expected":null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&!n.isString(t.resolvedBy)?"resolvedBy: string expected":null!=t.context&&t.hasOwnProperty("context")&&!n.isString(t.context)?"context: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&!n.isString(t.deletedAt)?"deletedAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&!n.isString(t.unlinkedAt)?"unlinkedAt: string expected":null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetCommentThreadResponse)return t;var e=new r.CommentsV2GetCommentThreadResponse;if(null!=t.commentThreadId&&(e.commentThreadId=String(t.commentThreadId)),t.comments){if(!Array.isArray(t.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");e.comments=[];for(var n=0;n<t.comments.length;++n)e.comments[n]=String(t.comments[n])}if(t.commentsV2){if(!Array.isArray(t.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(e.commentsV2=[],n=0;n<t.commentsV2.length;++n){if("object"!=typeof t.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");e.commentsV2[n]=r.CommentDescriptor.fromObject(t.commentsV2[n])}}return null!=t.resolvedAt&&(e.resolvedAt=String(t.resolvedAt)),null!=t.resolvedBy&&(e.resolvedBy=String(t.resolvedBy)),null!=t.context&&(e.context=String(t.context)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.deletedAt&&(e.deletedAt=String(t.deletedAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.unlinkedAt&&(e.unlinkedAt=String(t.unlinkedAt)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.comments=[],n.commentsV2=[]),e.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=t.commentThreadId&&t.hasOwnProperty("commentThreadId")&&(n.commentThreadId=t.commentThreadId),t.comments&&t.comments.length){n.comments=[];for(var s=0;s<t.comments.length;++s)n.comments[s]=t.comments[s]}if(t.commentsV2&&t.commentsV2.length)for(n.commentsV2=[],s=0;s<t.commentsV2.length;++s)n.commentsV2[s]=r.CommentDescriptor.toObject(t.commentsV2[s],e);return null!=t.resolvedAt&&t.hasOwnProperty("resolvedAt")&&(n.resolvedAt=t.resolvedAt),null!=t.resolvedBy&&t.hasOwnProperty("resolvedBy")&&(n.resolvedBy=t.resolvedBy),null!=t.context&&t.hasOwnProperty("context")&&(n.context=t.context),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.deletedAt&&t.hasOwnProperty("deletedAt")&&(n.deletedAt=t.deletedAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.unlinkedAt&&t.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=t.unlinkedAt),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetCommentThreadResponse"},s}(),r.CommentsV2GetDocumentThreadsResponse=function(){function s(t){if(this.threads=[],this.threadsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.threads=n.emptyArray,s.prototype.threadsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.threads&&t.threads.length)for(var s=0;s<t.threads.length;++s)n.uint32(10).string(t.threads[s]);if(null!=t.threadsV2&&t.threadsV2.length)for(s=0;s<t.threadsV2.length;++s)r.CommentsThreadDescriptor.encode(t.threadsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.CommentsV2GetDocumentThreadsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.threads&&i.threads.length||(i.threads=[]),i.threads.push(e.string());break;case 2:i.threadsV2&&i.threadsV2.length||(i.threadsV2=[]),i.threadsV2.push(r.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.threads&&t.hasOwnProperty("threads")){if(!Array.isArray(t.threads))return"threads: array expected";for(var e=0;e<t.threads.length;++e)if(!n.isString(t.threads[e]))return"threads: string[] expected"}if(null!=t.threadsV2&&t.hasOwnProperty("threadsV2")){if(!Array.isArray(t.threadsV2))return"threadsV2: array expected";for(e=0;e<t.threadsV2.length;++e){var s=r.CommentsThreadDescriptor.verify(t.threadsV2[e]);if(s)return"threadsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.CommentsV2GetDocumentThreadsResponse)return t;var e=new r.CommentsV2GetDocumentThreadsResponse;if(t.threads){if(!Array.isArray(t.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");e.threads=[];for(var n=0;n<t.threads.length;++n)e.threads[n]=String(t.threads[n])}if(t.threadsV2){if(!Array.isArray(t.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(e.threadsV2=[],n=0;n<t.threadsV2.length;++n){if("object"!=typeof t.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");e.threadsV2[n]=r.CommentsThreadDescriptor.fromObject(t.threadsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.threads=[],n.threadsV2=[]),t.threads&&t.threads.length){n.threads=[];for(var s=0;s<t.threads.length;++s)n.threads[s]=t.threads[s]}if(t.threadsV2&&t.threadsV2.length)for(n.threadsV2=[],s=0;s<t.threadsV2.length;++s)n.threadsV2[s]=r.CommentsThreadDescriptor.toObject(t.threadsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/CommentsV2GetDocumentThreadsResponse"},s}(),r.KeyValueDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.key="",s.prototype.value="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.key&&Object.hasOwnProperty.call(t,"key")&&n.uint32(10).string(t.key),null!=t.value&&Object.hasOwnProperty.call(t,"value")&&n.uint32(18).string(t.value),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.KeyValueDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.key&&t.hasOwnProperty("key")&&!n.isString(t.key)?"key: string expected":null!=t.value&&t.hasOwnProperty("value")&&!n.isString(t.value)?"value: string expected":null},s.fromObject=function(t){if(t instanceof r.KeyValueDescriptor)return t;var e=new r.KeyValueDescriptor;return null!=t.key&&(e.key=String(t.key)),null!=t.value&&(e.value=String(t.value)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=""),null!=t.key&&t.hasOwnProperty("key")&&(n.key=t.key),null!=t.value&&t.hasOwnProperty("value")&&(n.value=t.value),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/KeyValueDescriptor"},s}(),r.IsEditorBundleUploadedMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.bundleVersion="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.bundleVersion&&Object.hasOwnProperty.call(t,"bundleVersion")&&n.uint32(10).string(t.bundleVersion),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.bundleVersion=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&!n.isString(t.bundleVersion)?"bundleVersion: string expected":null},s.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedMessage)return t;var e=new r.IsEditorBundleUploadedMessage;return null!=t.bundleVersion&&(e.bundleVersion=String(t.bundleVersion)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.bundleVersion=""),null!=t.bundleVersion&&t.hasOwnProperty("bundleVersion")&&(n.bundleVersion=t.bundleVersion),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedMessage"},s}(),r.IsEditorBundleUploadedResponse=function(){function n(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return n.prototype.isUploaded=!1,n.create=function(t){return new n(t)},n.encode=function(t,n){return n||(n=e.create()),null!=t.isUploaded&&Object.hasOwnProperty.call(t,"isUploaded")&&n.uint32(8).bool(t.isUploaded),n},n.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},n.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.IsEditorBundleUploadedResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.isUploaded=e.bool():e.skipType(7&a)}return i},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&"boolean"!=typeof t.isUploaded?"isUploaded: boolean expected":null},n.fromObject=function(t){if(t instanceof r.IsEditorBundleUploadedResponse)return t;var e=new r.IsEditorBundleUploadedResponse;return null!=t.isUploaded&&(e.isUploaded=Boolean(t.isUploaded)),e},n.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.isUploaded=!1),null!=t.isUploaded&&t.hasOwnProperty("isUploaded")&&(n.isUploaded=t.isUploaded),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},n.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/IsEditorBundleUploadedResponse"},n}(),r.RevisionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionDescriptor)return t;var e=new r.RevisionDescriptor;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionDescriptor"},s}(),r.RevisionHistoryConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectMessage)return t;var e=new r.RevisionHistoryConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectMessage"},s}(),r.RevisionHistoryGetRevisionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.revisionId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(18).string(t.revisionId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.revisionId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionMessage)return t;var e=new r.RevisionHistoryGetRevisionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.revisionId&&(e.revisionId=String(t.revisionId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.revisionId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionMessage"},s}(),r.RevisionHistoryReconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryReconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryReconnectMessage)return t;var e=new r.RevisionHistoryReconnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryReconnectMessage"},s}(),r.RevisionHistoryUpdateRevisionsMessage=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.documentId=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId))return"documentId: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsMessage)return t;var e=new r.RevisionHistoryUpdateRevisionsMessage;if(null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.documentId="",n.requestId=0),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsMessage"},s}(),r.RevisionHistoryConnectResponse=function(){function s(t){if(this.revisions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.requestId=0,s.prototype.revisions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(16).uint32(t.requestId),null!=t.revisions&&t.revisions.length)for(var s=0;s<t.revisions.length;++s)r.RevisionDescriptor.encode(t.revisions[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.requestId=e.uint32();break;case 3:i.revisions&&i.revisions.length||(i.revisions=[]),i.revisions.push(r.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId))return"requestId: integer expected";if(null!=t.revisions&&t.hasOwnProperty("revisions")){if(!Array.isArray(t.revisions))return"revisions: array expected";for(var e=0;e<t.revisions.length;++e){var s=r.RevisionDescriptor.verify(t.revisions[e]);if(s)return"revisions."+s}}return null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryConnectResponse)return t;var e=new r.RevisionHistoryConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),null!=t.requestId&&(e.requestId=t.requestId>>>0),t.revisions){if(!Array.isArray(t.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");e.revisions=[];for(var n=0;n<t.revisions.length;++n){if("object"!=typeof t.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");e.revisions[n]=r.RevisionDescriptor.fromObject(t.revisions[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.revisions=[]),e.defaults&&(n.channel="",n.requestId=0),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),t.revisions&&t.revisions.length){n.revisions=[];for(var s=0;s<t.revisions.length;++s)n.revisions[s]=r.RevisionDescriptor.toObject(t.revisions[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryConnectResponse"},s}(),r.RevisionHistoryGetRevisionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.revisionId="",s.prototype.name="",s.prototype.creatorId="",s.prototype.authorsIds="",s.prototype.diffData="",s.prototype.createdAt="",s.prototype.attributes="",s.prototype.toVersion=0,s.prototype.fromVersion=0,s.prototype.isEmptyCurrent=!1,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.revisionId&&Object.hasOwnProperty.call(t,"revisionId")&&n.uint32(10).string(t.revisionId),null!=t.name&&Object.hasOwnProperty.call(t,"name")&&n.uint32(18).string(t.name),null!=t.creatorId&&Object.hasOwnProperty.call(t,"creatorId")&&n.uint32(26).string(t.creatorId),null!=t.authorsIds&&Object.hasOwnProperty.call(t,"authorsIds")&&n.uint32(34).string(t.authorsIds),null!=t.diffData&&Object.hasOwnProperty.call(t,"diffData")&&n.uint32(42).string(t.diffData),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(50).string(t.createdAt),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(58).string(t.attributes),null!=t.toVersion&&Object.hasOwnProperty.call(t,"toVersion")&&n.uint32(64).uint32(t.toVersion),null!=t.fromVersion&&Object.hasOwnProperty.call(t,"fromVersion")&&n.uint32(72).uint32(t.fromVersion),null!=t.isEmptyCurrent&&Object.hasOwnProperty.call(t,"isEmptyCurrent")&&n.uint32(80).bool(t.isEmptyCurrent),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryGetRevisionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.revisionId=e.string();break;case 2:i.name=e.string();break;case 3:i.creatorId=e.string();break;case 4:i.authorsIds=e.string();break;case 5:i.diffData=e.string();break;case 6:i.createdAt=e.string();break;case 7:i.attributes=e.string();break;case 8:i.toVersion=e.uint32();break;case 9:i.fromVersion=e.uint32();break;case 10:i.isEmptyCurrent=e.bool();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.revisionId&&t.hasOwnProperty("revisionId")&&!n.isString(t.revisionId)?"revisionId: string expected":null!=t.name&&t.hasOwnProperty("name")&&!n.isString(t.name)?"name: string expected":null!=t.creatorId&&t.hasOwnProperty("creatorId")&&!n.isString(t.creatorId)?"creatorId: string expected":null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&!n.isString(t.authorsIds)?"authorsIds: string expected":null!=t.diffData&&t.hasOwnProperty("diffData")&&!n.isString(t.diffData)?"diffData: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null!=t.toVersion&&t.hasOwnProperty("toVersion")&&!n.isInteger(t.toVersion)?"toVersion: integer expected":null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&!n.isInteger(t.fromVersion)?"fromVersion: integer expected":null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof t.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryGetRevisionResponse)return t;var e=new r.RevisionHistoryGetRevisionResponse;return null!=t.revisionId&&(e.revisionId=String(t.revisionId)),null!=t.name&&(e.name=String(t.name)),null!=t.creatorId&&(e.creatorId=String(t.creatorId)),null!=t.authorsIds&&(e.authorsIds=String(t.authorsIds)),null!=t.diffData&&(e.diffData=String(t.diffData)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.attributes&&(e.attributes=String(t.attributes)),null!=t.toVersion&&(e.toVersion=t.toVersion>>>0),null!=t.fromVersion&&(e.fromVersion=t.fromVersion>>>0),null!=t.isEmptyCurrent&&(e.isEmptyCurrent=Boolean(t.isEmptyCurrent)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=t.revisionId&&t.hasOwnProperty("revisionId")&&(n.revisionId=t.revisionId),null!=t.name&&t.hasOwnProperty("name")&&(n.name=t.name),null!=t.creatorId&&t.hasOwnProperty("creatorId")&&(n.creatorId=t.creatorId),null!=t.authorsIds&&t.hasOwnProperty("authorsIds")&&(n.authorsIds=t.authorsIds),null!=t.diffData&&t.hasOwnProperty("diffData")&&(n.diffData=t.diffData),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),null!=t.toVersion&&t.hasOwnProperty("toVersion")&&(n.toVersion=t.toVersion),null!=t.fromVersion&&t.hasOwnProperty("fromVersion")&&(n.fromVersion=t.fromVersion),null!=t.isEmptyCurrent&&t.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=t.isEmptyCurrent),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryGetRevisionResponse"},s}(),r.RevisionHistoryUpdateRevisionsResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.requestId=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.requestId&&Object.hasOwnProperty.call(t,"requestId")&&n.uint32(8).uint32(t.requestId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.RevisionHistoryUpdateRevisionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.requestId=e.uint32():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.requestId&&t.hasOwnProperty("requestId")&&!n.isInteger(t.requestId)?"requestId: integer expected":null},s.fromObject=function(t){if(t instanceof r.RevisionHistoryUpdateRevisionsResponse)return t;var e=new r.RevisionHistoryUpdateRevisionsResponse;return null!=t.requestId&&(e.requestId=t.requestId>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.requestId=0),null!=t.requestId&&t.hasOwnProperty("requestId")&&(n.requestId=t.requestId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/RevisionHistoryUpdateRevisionsResponse"},s}(),r.SessionsSocketDescriptor=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.session="",s.prototype.user="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.session&&Object.hasOwnProperty.call(t,"session")&&n.uint32(10).string(t.session),null!=t.user&&Object.hasOwnProperty.call(t,"user")&&n.uint32(18).string(t.user),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsSocketDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.session=e.string();break;case 2:i.user=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.session&&t.hasOwnProperty("session")&&!n.isString(t.session))return"session: string expected";if(null!=t.user&&t.hasOwnProperty("user")&&!n.isString(t.user))return"user: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SessionsSocketDescriptor)return t;var e=new r.SessionsSocketDescriptor;if(null!=t.session&&(e.session=String(t.session)),null!=t.user&&(e.user=String(t.user)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.session="",n.user="",n.role=""),null!=t.session&&t.hasOwnProperty("session")&&(n.session=t.session),null!=t.user&&t.hasOwnProperty("user")&&(n.user=t.user),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsSocketDescriptor"},s}(),r.SessionsConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.sessionType=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.sessionType&&Object.hasOwnProperty.call(t,"sessionType")&&n.uint32(16).uint32(t.sessionType),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.sessionType=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.sessionType&&t.hasOwnProperty("sessionType")&&!n.isInteger(t.sessionType)?"sessionType: integer expected":null},s.fromObject=function(t){if(t instanceof r.SessionsConnectMessage)return t;var e=new r.SessionsConnectMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.sessionType&&(e.sessionType=t.sessionType>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.sessionType=0),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.sessionType&&t.hasOwnProperty("sessionType")&&(n.sessionType=t.sessionType),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectMessage"},s}(),r.SocketConnectMessage=function(){function s(t){if(this.permissions=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.userId="",s.prototype.role="",s.prototype.permissions=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.userId&&Object.hasOwnProperty.call(t,"userId")&&n.uint32(18).string(t.userId),null!=t.role&&Object.hasOwnProperty.call(t,"role")&&n.uint32(26).string(t.role),null!=t.permissions&&t.permissions.length)for(var r=0;r<t.permissions.length;++r)n.uint32(34).string(t.permissions[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.userId=e.string();break;case 3:i.role=e.string();break;case 4:i.permissions&&i.permissions.length||(i.permissions=[]),i.permissions.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id))return"id: string expected";if(null!=t.userId&&t.hasOwnProperty("userId")&&!n.isString(t.userId))return"userId: string expected";if(null!=t.role&&t.hasOwnProperty("role")&&!n.isString(t.role))return"role: string expected";if(null!=t.permissions&&t.hasOwnProperty("permissions")){if(!Array.isArray(t.permissions))return"permissions: array expected";for(var e=0;e<t.permissions.length;++e)if(!n.isString(t.permissions[e]))return"permissions: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.SocketConnectMessage)return t;var e=new r.SocketConnectMessage;if(null!=t.id&&(e.id=String(t.id)),null!=t.userId&&(e.userId=String(t.userId)),null!=t.role&&(e.role=String(t.role)),t.permissions){if(!Array.isArray(t.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");e.permissions=[];for(var n=0;n<t.permissions.length;++n)e.permissions[n]=String(t.permissions[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.permissions=[]),e.defaults&&(n.id="",n.userId="",n.role=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.userId&&t.hasOwnProperty("userId")&&(n.userId=t.userId),null!=t.role&&t.hasOwnProperty("role")&&(n.role=t.role),t.permissions&&t.permissions.length){n.permissions=[];for(var r=0;r<t.permissions.length;++r)n.permissions[r]=t.permissions[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketConnectMessage"},s}(),r.SocketDisconnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SocketDisconnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.SocketDisconnectMessage)return t;var e=new r.SocketDisconnectMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SocketDisconnectMessage"},s}(),r.SessionsConnectResponse=function(){function s(t){if(this.sockets=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.sockets=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.sockets&&t.sockets.length)for(var s=0;s<t.sockets.length;++s)r.SessionsSocketDescriptor.encode(t.sockets[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SessionsConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.sockets&&i.sockets.length||(i.sockets=[]),i.sockets.push(r.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.sockets&&t.hasOwnProperty("sockets")){if(!Array.isArray(t.sockets))return"sockets: array expected";for(var e=0;e<t.sockets.length;++e){var s=r.SessionsSocketDescriptor.verify(t.sockets[e]);if(s)return"sockets."+s}}return null},s.fromObject=function(t){if(t instanceof r.SessionsConnectResponse)return t;var e=new r.SessionsConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.sockets){if(!Array.isArray(t.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");e.sockets=[];for(var n=0;n<t.sockets.length;++n){if("object"!=typeof t.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");e.sockets[n]=r.SessionsSocketDescriptor.fromObject(t.sockets[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.sockets=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.sockets&&t.sockets.length){n.sockets=[];for(var s=0;s<t.sockets.length;++s)n.sockets[s]=r.SessionsSocketDescriptor.toObject(t.sockets[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SessionsConnectResponse"},s}(),r.SuggestionDescriptor=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.SuggestionDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.SuggestionDescriptor)return t;var e=new r.SuggestionDescriptor;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/SuggestionDescriptor"},s}(),r.TrackChangesAddSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.type="",s.prototype.data="",s.prototype.originalSuggestionId="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).string(t.data),null!=t.originalSuggestionId&&Object.hasOwnProperty.call(t,"originalSuggestionId")&&n.uint32(42).string(t.originalSuggestionId),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.type=e.string();break;case 4:i.data=e.string();break;case 5:i.originalSuggestionId=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&!n.isString(t.originalSuggestionId)?"originalSuggestionId: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionMessage)return t;var e=new r.TrackChangesAddSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.type&&(e.type=String(t.type)),null!=t.data&&(e.data=String(t.data)),null!=t.originalSuggestionId&&(e.originalSuggestionId=String(t.originalSuggestionId)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.originalSuggestionId&&t.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=t.originalSuggestionId),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionMessage"},s}(),r.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.prototype.documentId="",s.prototype.state="",s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(26).string(t.state),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string());break;case 2:i.documentId=e.string();break;case 3:i.state=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesBatchUpdateSuggestionsStateMessage)return t;var e=new r.TrackChangesBatchUpdateSuggestionsStateMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.state&&(e.state=String(t.state)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),e.defaults&&(n.documentId="",n.state=""),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesBatchUpdateSuggestionsStateMessage"},s}(),r.TrackChangesConnectMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectMessage)return t;var e=new r.TrackChangesConnectMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectMessage"},s}(),r.TrackChangesGetAllSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(10).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.documentId=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionMessage)return t;var e=new r.TrackChangesGetAllSuggestionMessage;return null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.documentId=""),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionMessage"},s}(),r.TrackChangesGetSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionMessage)return t;var e=new r.TrackChangesGetSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionMessage"},s}(),r.TrackChangesUpdateSuggestionMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.documentId="",s.prototype.hasComments=!1,s.prototype.isHasCommentsModified=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.documentId&&Object.hasOwnProperty.call(t,"documentId")&&n.uint32(18).string(t.documentId),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(24).bool(t.hasComments),null!=t.isHasCommentsModified&&Object.hasOwnProperty.call(t,"isHasCommentsModified")&&n.uint32(32).bool(t.isHasCommentsModified),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(42).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(50).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesUpdateSuggestionMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.documentId=e.string();break;case 3:i.hasComments=e.bool();break;case 4:i.isHasCommentsModified=e.bool();break;case 5:i.state=e.string();break;case 6:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.documentId&&t.hasOwnProperty("documentId")&&!n.isString(t.documentId)?"documentId: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof t.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesUpdateSuggestionMessage)return t;var e=new r.TrackChangesUpdateSuggestionMessage;return null!=t.id&&(e.id=String(t.id)),null!=t.documentId&&(e.documentId=String(t.documentId)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.isHasCommentsModified&&(e.isHasCommentsModified=Boolean(t.isHasCommentsModified)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.documentId&&t.hasOwnProperty("documentId")&&(n.documentId=t.documentId),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.isHasCommentsModified&&t.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=t.isHasCommentsModified),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesUpdateSuggestionMessage"},s}(),r.TrackChangesAddSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesAddSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesAddSuggestionResponse)return t;var e=new r.TrackChangesAddSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesAddSuggestionResponse"},s}(),r.TrackChangesConnectResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.channel="",s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.channel&&Object.hasOwnProperty.call(t,"channel")&&n.uint32(10).string(t.channel),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(18).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesConnectResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.channel=e.string();break;case 2:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 3:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.channel&&t.hasOwnProperty("channel")&&!n.isString(t.channel))return"channel: string expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesConnectResponse)return t;var e=new r.TrackChangesConnectResponse;if(null!=t.channel&&(e.channel=String(t.channel)),t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.defaults&&(n.channel=""),null!=t.channel&&t.hasOwnProperty("channel")&&(n.channel=t.channel),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesConnectResponse"},s}(),r.TrackChangesGetAllSuggestionsResponse=function(){function s(t){if(this.suggestions=[],this.suggestionsV2=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.suggestions=n.emptyArray,s.prototype.suggestionsV2=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;++s)n.uint32(10).string(t.suggestions[s]);if(null!=t.suggestionsV2&&t.suggestionsV2.length)for(s=0;s<t.suggestionsV2.length;++s)r.SuggestionDescriptor.encode(t.suggestionsV2[s],n.uint32(18).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetAllSuggestionsResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.suggestions&&i.suggestions.length||(i.suggestions=[]),i.suggestions.push(e.string());break;case 2:i.suggestionsV2&&i.suggestionsV2.length||(i.suggestionsV2=[]),i.suggestionsV2.push(r.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.suggestions&&t.hasOwnProperty("suggestions")){if(!Array.isArray(t.suggestions))return"suggestions: array expected";for(var e=0;e<t.suggestions.length;++e)if(!n.isString(t.suggestions[e]))return"suggestions: string[] expected"}if(null!=t.suggestionsV2&&t.hasOwnProperty("suggestionsV2")){if(!Array.isArray(t.suggestionsV2))return"suggestionsV2: array expected";for(e=0;e<t.suggestionsV2.length;++e){var s=r.SuggestionDescriptor.verify(t.suggestionsV2[e]);if(s)return"suggestionsV2."+s}}return null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetAllSuggestionsResponse)return t;var e=new r.TrackChangesGetAllSuggestionsResponse;if(t.suggestions){if(!Array.isArray(t.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");e.suggestions=[];for(var n=0;n<t.suggestions.length;++n)e.suggestions[n]=String(t.suggestions[n])}if(t.suggestionsV2){if(!Array.isArray(t.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(e.suggestionsV2=[],n=0;n<t.suggestionsV2.length;++n){if("object"!=typeof t.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");e.suggestionsV2[n]=r.SuggestionDescriptor.fromObject(t.suggestionsV2[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.suggestions&&t.suggestions.length){n.suggestions=[];for(var s=0;s<t.suggestions.length;++s)n.suggestions[s]=t.suggestions[s]}if(t.suggestionsV2&&t.suggestionsV2.length)for(n.suggestionsV2=[],s=0;s<t.suggestionsV2.length;++s)n.suggestionsV2[s]=r.SuggestionDescriptor.toObject(t.suggestionsV2[s],e);return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetAllSuggestionsResponse"},s}(),r.TrackChangesGetSuggestionResponse=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.prototype.authorId="",s.prototype.type="",s.prototype.createdAt="",s.prototype.data="",s.prototype.hasComments=!1,s.prototype.state="",s.prototype.attributes="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),null!=t.authorId&&Object.hasOwnProperty.call(t,"authorId")&&n.uint32(18).string(t.authorId),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(26).string(t.type),null!=t.createdAt&&Object.hasOwnProperty.call(t,"createdAt")&&n.uint32(34).string(t.createdAt),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(42).string(t.data),null!=t.hasComments&&Object.hasOwnProperty.call(t,"hasComments")&&n.uint32(48).bool(t.hasComments),null!=t.state&&Object.hasOwnProperty.call(t,"state")&&n.uint32(58).string(t.state),null!=t.attributes&&Object.hasOwnProperty.call(t,"attributes")&&n.uint32(66).string(t.attributes),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.TrackChangesGetSuggestionResponse;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.id=e.string();break;case 2:i.authorId=e.string();break;case 3:i.type=e.string();break;case 4:i.createdAt=e.string();break;case 5:i.data=e.string();break;case 6:i.hasComments=e.bool();break;case 7:i.state=e.string();break;case 8:i.attributes=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null!=t.authorId&&t.hasOwnProperty("authorId")&&!n.isString(t.authorId)?"authorId: string expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isString(t.type)?"type: string expected":null!=t.createdAt&&t.hasOwnProperty("createdAt")&&!n.isString(t.createdAt)?"createdAt: string expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.hasComments&&t.hasOwnProperty("hasComments")&&"boolean"!=typeof t.hasComments?"hasComments: boolean expected":null!=t.state&&t.hasOwnProperty("state")&&!n.isString(t.state)?"state: string expected":null!=t.attributes&&t.hasOwnProperty("attributes")&&!n.isString(t.attributes)?"attributes: string expected":null},s.fromObject=function(t){if(t instanceof r.TrackChangesGetSuggestionResponse)return t;var e=new r.TrackChangesGetSuggestionResponse;return null!=t.id&&(e.id=String(t.id)),null!=t.authorId&&(e.authorId=String(t.authorId)),null!=t.type&&(e.type=String(t.type)),null!=t.createdAt&&(e.createdAt=String(t.createdAt)),null!=t.data&&(e.data=String(t.data)),null!=t.hasComments&&(e.hasComments=Boolean(t.hasComments)),null!=t.state&&(e.state=String(t.state)),null!=t.attributes&&(e.attributes=String(t.attributes)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),null!=t.authorId&&t.hasOwnProperty("authorId")&&(n.authorId=t.authorId),null!=t.type&&t.hasOwnProperty("type")&&(n.type=t.type),null!=t.createdAt&&t.hasOwnProperty("createdAt")&&(n.createdAt=t.createdAt),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.hasComments&&t.hasOwnProperty("hasComments")&&(n.hasComments=t.hasComments),null!=t.state&&t.hasOwnProperty("state")&&(n.state=t.state),null!=t.attributes&&t.hasOwnProperty("attributes")&&(n.attributes=t.attributes),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/TrackChangesGetSuggestionResponse"},s}(),r.UserDescriptor=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.UserDescriptor;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.UserDescriptor)return t;var e=new r.UserDescriptor;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".UserDescriptor.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/UserDescriptor"},s}(),r.GetManyUsersMessage=function(){function s(t){if(this.ids=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.ids=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.ids&&t.ids.length)for(var r=0;r<t.ids.length;++r)n.uint32(10).string(t.ids[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.ids&&i.ids.length||(i.ids=[]),i.ids.push(e.string())):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.ids&&t.hasOwnProperty("ids")){if(!Array.isArray(t.ids))return"ids: array expected";for(var e=0;e<t.ids.length;++e)if(!n.isString(t.ids[e]))return"ids: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersMessage)return t;var e=new r.GetManyUsersMessage;if(t.ids){if(!Array.isArray(t.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");e.ids=[];for(var n=0;n<t.ids.length;++n)e.ids[n]=String(t.ids[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.ids=[]),t.ids&&t.ids.length){n.ids=[];for(var r=0;r<t.ids.length;++r)n.ids[r]=t.ids[r]}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersMessage"},s}(),r.GetUserMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.id="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(10).string(t.id),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserMessage;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?i.id=e.string():e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isString(t.id)?"id: string expected":null},s.fromObject=function(t){if(t instanceof r.GetUserMessage)return t;var e=new r.GetUserMessage;return null!=t.id&&(e.id=String(t.id)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.id=""),null!=t.id&&t.hasOwnProperty("id")&&(n.id=t.id),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserMessage"},s}(),r.GetManyUsersResponse=function(){function s(t){if(this.users=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.users=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.users&&t.users.length)for(var s=0;s<t.users.length;++s)r.UserDescriptor.encode(t.users[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetManyUsersResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.users&&i.users.length||(i.users=[]),i.users.push(r.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.users&&t.hasOwnProperty("users")){if(!Array.isArray(t.users))return"users: array expected";for(var e=0;e<t.users.length;++e){var n=r.UserDescriptor.verify(t.users[e]);if(n)return"users."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetManyUsersResponse)return t;var e=new r.GetManyUsersResponse;if(t.users){if(!Array.isArray(t.users))throw TypeError(".GetManyUsersResponse.users: array expected");e.users=[];for(var n=0;n<t.users.length;++n){if("object"!=typeof t.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");e.users[n]=r.UserDescriptor.fromObject(t.users[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.users=[]),t.users&&t.users.length){n.users=[];for(var s=0;s<t.users.length;++s)n.users[s]=r.UserDescriptor.toObject(t.users[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetManyUsersResponse"},s}(),r.GetUserResponse=function(){function s(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.attributes=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.attributes&&t.attributes.length)for(var s=0;s<t.attributes.length;++s)r.KeyValueDescriptor.encode(t.attributes[s],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.GetUserResponse;e.pos<o;){var a=e.uint32();if(a===s)break;a>>>3==1?(i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(r.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&a)}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.attributes&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=r.KeyValueDescriptor.verify(t.attributes[e]);if(n)return"attributes."+n}}return null},s.fromObject=function(t){if(t instanceof r.GetUserResponse)return t;var e=new r.GetUserResponse;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".GetUserResponse.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if("object"!=typeof t.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");e.attributes[n]=r.KeyValueDescriptor.fromObject(t.attributes[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=r.KeyValueDescriptor.toObject(t.attributes[s],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/GetUserResponse"},s}(),r.ChannelMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.socketId="",s.prototype.data=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.socketId&&Object.hasOwnProperty.call(t,"socketId")&&n.uint32(18).string(t.socketId),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(26).bytes(t.data),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ChannelMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.socketId=e.string();break;case 3:i.data=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.socketId&&t.hasOwnProperty("socketId")&&!n.isString(t.socketId)?"socketId: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ChannelMessage)return t;var e=new r.ChannelMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.socketId&&(e.socketId=String(t.socketId)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.socketId="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.socketId&&t.hasOwnProperty("socketId")&&(r.socketId=t.socketId),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ChannelMessage"},s}(),r.BytesBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=n.newBuffer([]),s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).bytes(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.BytesBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.bytes();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.BytesBytesPacketDataMessage)return t;var e=new r.BytesBytesPacketDataMessage;return null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/BytesBytesPacketDataMessage"},s}(),r.NumberBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.NumberBytesPacketDataMessage)return t;var e=new r.NumberBytesPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data=0,e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberBytesPacketDataMessage"},s}(),r.NumberNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.NumberNumberPacketDataMessage)return t;var e=new r.NumberNumberPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberNumberPacketDataMessage"},s}(),r.NumberObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberObjectPacketDataMessage)return t;var e=new r.NumberObjectPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberObjectPacketDataMessage"},s}(),r.NumberStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data=0,s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(8).uint32(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.NumberStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.uint32();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isInteger(t.data)?"data: integer expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.NumberStringPacketDataMessage)return t;var e=new r.NumberStringPacketDataMessage;return null!=t.data&&(e.data=t.data>>>0),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data=0,n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/NumberStringPacketDataMessage"},s}(),r.ObjectBufferPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectBufferPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.ObjectBufferPacketDataMessage)return t;var e=new r.ObjectBufferPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectBufferPacketDataMessage"},s}(),r.ObjectObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.ObjectObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.ObjectObjectPacketDataMessage)return t;var e=new r.ObjectObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/ObjectObjectPacketDataMessage"},s}(),r.PacketMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.type=0,s.prototype.id=0,s.prototype.nsp="",s.prototype.data=n.newBuffer([]),s.prototype.options=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.type&&Object.hasOwnProperty.call(t,"type")&&n.uint32(8).uint32(t.type),null!=t.id&&Object.hasOwnProperty.call(t,"id")&&n.uint32(16).uint32(t.id),null!=t.nsp&&Object.hasOwnProperty.call(t,"nsp")&&n.uint32(26).string(t.nsp),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(34).bytes(t.data),null!=t.options&&Object.hasOwnProperty.call(t,"options")&&n.uint32(42).bytes(t.options),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.type=e.uint32();break;case 2:i.id=e.uint32();break;case 3:i.nsp=e.string();break;case 4:i.data=e.bytes();break;case 5:i.options=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.type&&t.hasOwnProperty("type")&&!n.isInteger(t.type)?"type: integer expected":null!=t.id&&t.hasOwnProperty("id")&&!n.isInteger(t.id)?"id: integer expected":null!=t.nsp&&t.hasOwnProperty("nsp")&&!n.isString(t.nsp)?"nsp: string expected":null!=t.data&&t.hasOwnProperty("data")&&!(t.data&&"number"==typeof t.data.length||n.isString(t.data))?"data: buffer expected":null!=t.options&&t.hasOwnProperty("options")&&!(t.options&&"number"==typeof t.options.length||n.isString(t.options))?"options: buffer expected":null},s.fromObject=function(t){if(t instanceof r.PacketMessage)return t;var e=new r.PacketMessage;return null!=t.type&&(e.type=t.type>>>0),null!=t.id&&(e.id=t.id>>>0),null!=t.nsp&&(e.nsp=String(t.nsp)),null!=t.data&&("string"==typeof t.data?n.base64.decode(t.data,e.data=n.newBuffer(n.base64.length(t.data)),0):t.data.length>=0&&(e.data=t.data)),null!=t.options&&("string"==typeof t.options?n.base64.decode(t.options,e.options=n.newBuffer(n.base64.length(t.options)),0):t.options.length>=0&&(e.options=t.options)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.type=0,r.id=0,r.nsp="",e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=n.newBuffer(r.data))),e.bytes===String?r.options="":(r.options=[],e.bytes!==Array&&(r.options=n.newBuffer(r.options)))),null!=t.type&&t.hasOwnProperty("type")&&(r.type=t.type),null!=t.id&&t.hasOwnProperty("id")&&(r.id=t.id),null!=t.nsp&&t.hasOwnProperty("nsp")&&(r.nsp=t.nsp),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?n.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),null!=t.options&&t.hasOwnProperty("options")&&(r.options=e.bytes===String?n.base64.encode(t.options,0,t.options.length):e.bytes===Array?Array.prototype.slice.call(t.options):t.options),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketMessage"},s}(),r.PacketOptionsMessage=function(){function s(t){if(this.rooms=[],this.except=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.flags="",s.prototype.rooms=n.emptyArray,s.prototype.except=n.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,n){if(n||(n=e.create()),null!=t.flags&&Object.hasOwnProperty.call(t,"flags")&&n.uint32(10).string(t.flags),null!=t.rooms&&t.rooms.length)for(var r=0;r<t.rooms.length;++r)n.uint32(18).string(t.rooms[r]);if(null!=t.except&&t.except.length)for(r=0;r<t.except.length;++r)n.uint32(26).string(t.except[r]);return n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.PacketOptionsMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.flags=e.string();break;case 2:i.rooms&&i.rooms.length||(i.rooms=[]),i.rooms.push(e.string());break;case 3:i.except&&i.except.length||(i.except=[]),i.except.push(e.string());break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.flags&&t.hasOwnProperty("flags")&&!n.isString(t.flags))return"flags: string expected";if(null!=t.rooms&&t.hasOwnProperty("rooms")){if(!Array.isArray(t.rooms))return"rooms: array expected";for(var e=0;e<t.rooms.length;++e)if(!n.isString(t.rooms[e]))return"rooms: string[] expected"}if(null!=t.except&&t.hasOwnProperty("except")){if(!Array.isArray(t.except))return"except: array expected";for(e=0;e<t.except.length;++e)if(!n.isString(t.except[e]))return"except: string[] expected"}return null},s.fromObject=function(t){if(t instanceof r.PacketOptionsMessage)return t;var e=new r.PacketOptionsMessage;if(null!=t.flags&&(e.flags=String(t.flags)),t.rooms){if(!Array.isArray(t.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");e.rooms=[];for(var n=0;n<t.rooms.length;++n)e.rooms[n]=String(t.rooms[n])}if(t.except){if(!Array.isArray(t.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(e.except=[],n=0;n<t.except.length;++n)e.except[n]=String(t.except[n])}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.rooms=[],n.except=[]),e.defaults&&(n.flags=""),null!=t.flags&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.rooms&&t.rooms.length){n.rooms=[];for(var r=0;r<t.rooms.length;++r)n.rooms[r]=t.rooms[r]}if(t.except&&t.except.length)for(n.except=[],r=0;r<t.except.length;++r)n.except[r]=t.except[r];return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/PacketOptionsMessage"},s}(),r.StringBytesPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=n.newBuffer([]),s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).bytes(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringBytesPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.bytes();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!(t.data1&&"number"==typeof t.data1.length||n.isString(t.data1))?"data1: buffer expected":null},s.fromObject=function(t){if(t instanceof r.StringBytesPacketDataMessage)return t;var e=new r.StringBytesPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&("string"==typeof t.data1?n.base64.decode(t.data1,e.data1=n.newBuffer(n.base64.length(t.data1)),0):t.data1.length>=0&&(e.data1=t.data1)),e},s.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.data="",e.bytes===String?r.data1="":(r.data1=[],e.bytes!==Array&&(r.data1=n.newBuffer(r.data1)))),null!=t.data&&t.hasOwnProperty("data")&&(r.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(r.data1=e.bytes===String?n.base64.encode(t.data1,0,t.data1.length):e.bytes===Array?Array.prototype.slice.call(t.data1):t.data1),r},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringBytesPacketDataMessage"},s}(),r.StringNumberPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1=0,s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(16).uint32(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringNumberPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.uint32();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isInteger(t.data1)?"data1: integer expected":null},s.fromObject=function(t){if(t instanceof r.StringNumberPacketDataMessage)return t;var e=new r.StringNumberPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=t.data1>>>0),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=0),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringNumberPacketDataMessage"},s}(),r.StringObjectPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringObjectPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringObjectPacketDataMessage)return t;var e=new r.StringObjectPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringObjectPacketDataMessage"},s}(),r.StringStringPacketDataMessage=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return s.prototype.data="",s.prototype.data1="",s.create=function(t){return new s(t)},s.encode=function(t,n){return n||(n=e.create()),null!=t.data&&Object.hasOwnProperty.call(t,"data")&&n.uint32(10).string(t.data),null!=t.data1&&Object.hasOwnProperty.call(t,"data1")&&n.uint32(18).string(t.data1),n},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(e,n,s){e instanceof t||(e=t.create(e));for(var o=void 0===n?e.len:e.pos+n,i=new r.StringStringPacketDataMessage;e.pos<o;){var a=e.uint32();if(a===s)break;switch(a>>>3){case 1:i.data=e.string();break;case 2:i.data1=e.string();break;default:e.skipType(7&a)}}return i},s.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},s.verify=function(t){return"object"!=typeof t||null===t?"object expected":null!=t.data&&t.hasOwnProperty("data")&&!n.isString(t.data)?"data: string expected":null!=t.data1&&t.hasOwnProperty("data1")&&!n.isString(t.data1)?"data1: string expected":null},s.fromObject=function(t){if(t instanceof r.StringStringPacketDataMessage)return t;var e=new r.StringStringPacketDataMessage;return null!=t.data&&(e.data=String(t.data)),null!=t.data1&&(e.data1=String(t.data1)),e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.data="",n.data1=""),null!=t.data&&t.hasOwnProperty("data")&&(n.data=t.data),null!=t.data1&&t.hasOwnProperty("data1")&&(n.data1=t.data1),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,u.util.toJSONOptions)},s.getTypeUrl=function(t){return void 0===t&&(t="type.googleapis.com"),t+"/StringStringPacketDataMessage"},s}(),r})();class l{static decode(t,e){const n=h(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...n})}static encode(t){const e=h(t.constructor),n=t.toJSON(),r=e.verify(n);if(r)throw Error(r);return e.encode(e.create(n)).finish()}}function h(t){return d[t.DESCRIPTOR_NAME]}class p extends i{ids;static TYPE="22";static READABLE_TYPE_NAME="getManyUsers";static DESCRIPTOR_NAME="GetManyUsersMessage";static DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}};constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new p(t.ids)}}class f extends i{users;static DESCRIPTOR_NAME="GetManyUsersResponse";static DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}};constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(m)}}static fromJSON(t){return new f(t.users.map(g))}}function m(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function g(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class y{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new y(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(y._SERVICE,a.TYPE,l.encode(n)),r=l.decode(e,c);return new y(r.attributes)}catch(t){return new y({id:e})}}static async getMany(t,e){const n=new p(e);try{const e=await t._sendRequest(y._SERVICE,p.TYPE,l.encode(n));return l.decode(e,f).users.map(t=>new y(t))}catch(t){return e.map(t=>new y({id:t}))}}}const b=y,I=Object.create(null);I.open="0",I.close="1",I.ping="2",I.pong="3",I.message="4",I.upgrade="5",I.noop="6";const O=Object.create(null);Object.keys(I).forEach(t=>{O[I[t]]=t});const v={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),S="function"==typeof ArrayBuffer,k=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,A=({type:t,data:e},n,r)=>w&&e instanceof Blob?n?r(e):T(e,r):S&&(e instanceof ArrayBuffer||k(e))?n?r(e):T(new Blob([e]),r):r(I[t]+(e||"")),T=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let C;const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)E[P.charCodeAt(t)]=t;const j="function"==typeof ArrayBuffer,D=(t,e)=>{if("string"!=typeof t)return{type:"message",data:R(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:x(t.substring(1),e)};return O[n]?t.length>1?{type:O[n],data:t.substring(1)}:{type:O[n]}:v},x=(t,e)=>{if(j){const n=(t=>{let e,n,r,s,o,i=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);const u=new ArrayBuffer(i),d=new Uint8Array(u);for(e=0;e<a;e+=4)n=E[t.charCodeAt(e)],r=E[t.charCodeAt(e+1)],s=E[t.charCodeAt(e+2)],o=E[t.charCodeAt(e+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|s>>2,d[c++]=(3&s)<<6|63&o;return u})(t);return R(n,e)}return{base64:!0,data:t}},R=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,N=String.fromCharCode(30);function V(){return new TransformStream({transform(t,e){!function(t,e){w&&t.data instanceof Blob?t.data.arrayBuffer().then(_).then(e):S&&(t.data instanceof ArrayBuffer||k(t.data))?e(_(t.data)):A(t,!1,t=>{C||(C=new TextEncoder),e(C.encode(t))})}(t,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(s[0]|=128),e.enqueue(s),e.enqueue(n)})}})}let M;function B(t){return t.reduce((t,e)=>t+e.length,0)}function J(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function U(t){if(t)return function(t){for(var e in U.prototype)t[e]=U.prototype[e];return t}(t)}U.prototype.on=U.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},U.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},U.prototype.off=U.prototype.removeListener=U.prototype.removeAllListeners=U.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},U.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,e)}return this},U.prototype.emitReserved=U.prototype.emit,U.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},U.prototype.hasListeners=function(t){return!!this.listeners(t).length};const q="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function L(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const G=q.setTimeout,Y=q.clearTimeout;function H(t,e){e.useNativeTimers?(t.setTimeoutFn=G.bind(q),t.clearTimeoutFn=Y.bind(q)):(t.setTimeoutFn=q.setTimeout.bind(q),t.clearTimeoutFn=q.clearTimeout.bind(q))}function z(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}class F extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class K extends U{constructor(t){super(),this.writable=!1,H(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,n){return super.emitReserved("error",new F(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=D(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const W="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),X={};let Q,Z=0,$=0;function tt(t){let e="";do{e=W[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function et(){const t=tt(+new Date);return t!==Q?(Z=0,Q=t):t+"."+tt(Z++)}for(;$<64;$++)X[W[$]]=$;let nt=!1;try{nt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const rt=nt;function st(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||rt))return new XMLHttpRequest}catch(t){}if(!e)try{return new(q[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function ot(){}const it=null!=new st({xdomain:!1}).responseType;class at extends U{constructor(t,e){super(),H(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=L(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new st(e);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof n.status?n.status:0)},0))},n.send(this.data)}catch(t){return void this.setTimeoutFn(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=at.requestsCount++,at.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=ot,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete at.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(at.requestsCount=0,at.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",ct);else if("function"==typeof addEventListener){addEventListener("onpagehide"in q?"pagehide":"unload",ct,!1)}function ct(){for(let t in at.requests)at.requests.hasOwnProperty(t)&&at.requests[t].abort()}const ut="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),dt=q.WebSocket||q.MozWebSocket,lt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const ht={websocket:class extends K{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=lt?{}:L(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=lt?new dt(t,e,n):e?new dt(t,e):new dt(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;A(n,this.supportsBinary,t=>{try{this.ws.send(t)}catch(t){}r&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!dt}},webtransport:class extends K{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const e=function(t,e){M||(M=new TextDecoder);const n=[];let r=0,s=-1,o=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(0===r){if(B(n)<1)break;const t=J(n,1);o=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(B(n)<2)break;const t=J(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(B(n)<8)break;const t=J(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(v);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(B(n)<s)break;const t=J(n,s);a.enqueue(D(o?t:M.decode(t),e)),r=0}if(0===s||s>t){a.enqueue(v);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=V();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const s=()=>{n.read().then(({done:t,value:e})=>{t||(this.onPacket(e),s())}).catch(t=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this.writer.write(n).then(()=>{r&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends K{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}const e=t&&t.forceBase64;this.supportsBinary=it&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const n=t.split(N),r=[];for(let t=0;t<n.length;t++){const s=D(n[t],e);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((t,o)=>{A(t,!1,t=>{r[o]=t,++s===n&&e(r.join(N))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new at(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}},pt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ft=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mt(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=pt.exec(t||""),o={},i=14;for(;i--;)o[ft[i]]=s[i]||"";return-1!=n&&-1!=r&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,r){e&&(n[e]=r)}),n}(0,o.query),o}class gt extends U{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=mt(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=mt(e.host).host),H(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new ht[t](n)}open(){let t;if(this.opts.rememberUpgrade&>.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;gt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;gt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function s(){n||(n=!0,u(),e.close(),e=null)}const o=t=>{const n=new Error("probe error: "+t);n.transport=e.name,s(),this.emitReserved("upgradeError",n)};function i(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&s()}const u=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",o),e.once("close",i),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onOpen(){if(this.readyState="open",gt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=z(n)),e>0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:t,data:e,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){gt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}gt.protocol=4;gt.protocol;const yt="function"==typeof ArrayBuffer,bt=Object.prototype.toString,It="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),Ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function vt(t){return yt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||It&&t instanceof Blob||Ot&&t instanceof File}function wt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(wt(t[e]))return!0;return!1}if(vt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return wt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&wt(t[e]))return!0;return!1}function St(t){const e=[],n=t.data,r=t;return r.data=kt(n,e),r.attachments=e.length,{packet:r,buffers:e}}function kt(t,e){if(!t)return t;if(vt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=kt(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=kt(t[r],e));return n}return t}function At(t,e){return t.data=Tt(t.data,e),delete t.attachments,t}function Tt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Tt(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Tt(t[n],e));return t}const _t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ct=5;var Pt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Pt||(Pt={}));class Et{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!wt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=St(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function jt(t){return"[object Object]"===Object.prototype.toString.call(t)}class Dt extends U{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===Pt.BINARY_EVENT;n||e.type===Pt.BINARY_ACK?(e.type=n?Pt.EVENT:Pt.ACK,this.reconstructor=new xt(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!vt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===Pt[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(r,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!Dt.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return jt(e);case Pt.DISCONNECT:return void 0===e;case Pt.CONNECT_ERROR:return"string"==typeof e||jt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===_t.indexOf(e[0]));case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=At(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Rt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Nt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vt extends U{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Rt(t,"open",this.onopen.bind(this)),Rt(t,"packet",this.onpacket.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Nt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:Pt.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(s),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,s)=>{e.push((t,e)=>n?t?s(t):r(e):r(t)),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,e.packet({type:Pt.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Mt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},Mt.prototype.reset=function(){this.attempts=0},Mt.prototype.setMin=function(t){this.ms=t},Mt.prototype.setMax=function(t){this.max=t},Mt.prototype.setJitter=function(t){this.jitter=t};class Bt extends U{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,H(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Mt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=e;const s=n.parser||t;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new gt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Rt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){ut(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Vt(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Jt={};function Ut(t,e){"object"==typeof t&&(e=t,t=void 0);const n=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=mt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Jt[s]&&o in Jt[s].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||i?a=new Bt(r,e):(Jt[s]||(Jt[s]=new Bt(r,e)),a=Jt[s]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}Object.assign(Ut,{Manager:Bt,Socket:Vt,io:Ut,connect:Ut});var qt=__webpack_require__(337);class Lt extends i{type;socketId;data;static DESCRIPTOR_NAME="ChannelMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}};constructor(t,e,n){super(),this.type=t,this.socketId=e,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new Lt(t.type,t.socketId,t.data)}}const Gt=class extends((0,n.EmitterMixin)()){_channelName;_wsGateway;_socket;constructor(t,e,n){super(),this._channelName=t,this._wsGateway=e,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let n="";return e&&(n+="all:"),n+="event",t&&(n+=":"+t),n}_subscribeToChannel(){this._socket.on(this._channelName,t=>{const e=l.decode(t,Lt);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)})}};class Yt extends Error{context;code;data;constructor(t,e,n=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new Yt(function(t){let e="cloud-services-error: "+t.message;return t.data&&(e+="\nError data: "+JSON.stringify(t.data)),t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Ht extends Error{code;traceId;data;constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new Ht(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class zt extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new zt(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const Ft=(()=>!("undefined"==typeof process||!process.versions?.node))(),Kt=1,Wt=2,Xt=3,Qt=4;class Zt{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if(Zt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Xt:Qt}static isBuffer(t){return Ft&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class $t extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class te extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Kt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new te(t.data,t.data1)}static create(t,e){return new te(t,e)}}class ee extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Kt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Kt,Kt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Qt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new re(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new re(t,e)}}class se extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Qt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Kt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ie(t,e)}}class ae extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ae(t.data,t.data1)}static create(t,e){return new ae(t,e)}}class ce extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Xt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class ue extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Xt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Wt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}const le=(()=>[te,ee,ne,re,se,oe,ie,ae,ce,ue,de].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class he extends i{type;data;id;nsp;options;static TYPE=10;static DESCRIPTOR_NAME="PacketMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}};constructor(t,e,n,r="/",s){super(),this.type=t,this.data=e,this.id=n,this.nsp=r,this.options=s??new zt}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=l.encode(this.options),e=l.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new he(t.type-10*e,l.decode(t.data,le[e]),t.id,t.nsp,t.options?l.decode(t.options,zt):new zt)}static create(t,e={}){const n=Zt.getPacketType(Zt.getType(t.data[0]),Zt.getType(t.data[1]??t.data[0]));return new he(t.type,le[n].create(t.data[0],t.data[1]),t.id,t.nsp,new zt(e.flags,e.rooms,e.except))}}class pe{encode(t,e,n,r="/",s={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const o={type:t,data:e,id:n,nsp:r};return l.encode(he.create(o,s))}decode(t){const e=l.decode(t,he);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}const fe=(()=>[Pt.EVENT,Pt.ACK,Pt.BINARY_ACK,Pt.BINARY_EVENT])();class me extends Et{_packetParser;constructor(t){super(),this._packetParser=t??new pe}encode(t){if(fe.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}class ge extends Dt{_packetParser;constructor(t){super(),this._packetParser=t??new pe}add(t){if(!Zt.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class ye{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new Yt("Request timeout.",this._context)),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}class be{_context;_requests=new Set;constructor(t){this._context=t}async send(t,e=45e3){const n=this._createRequest(e);try{return t(n),await n.promise}finally{this._finishRequest(n)}}errorAll(t){for(const e of this._requests)e.error(t)}waitForAllRequests(t=45e3){return this._waitForRequests(t)}_createRequest(t){const e=new ye(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Ie={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class Oe extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Ie.DISCONNECTED)();static STATE_CONNECTING=(()=>Ie.CONNECTING)();static STATE_CONNECTED=(()=>Ie.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??Ut,this._userFactory=s??b.get,this._requestsManager=new be(this),this._channels=new Map,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=qt(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",Ie.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",async(t,e,n)=>{if(this._debugEvent("ws-gw:change:state",n),n!==Oe.STATE_CONNECTED){if(n===Oe.STATE_DISCONNECTED)return this._requestsManager.errorAll(new Yt("Not connected.",this))}else try{this.me=await this._userFactory.call(b,this,this._socketAuth?.userId)}catch(t){}},{priority:Oe._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",(t,e)=>{this._options.onError?this._options.onError(e):console.error(e)})}get sessionId(){return this.socketId}waitForAllRequests(t){return this._requestsManager.waitForAllRequests(t)}disconnect(){this.state!==Ie.DISCONNECTED&&(this._socket?.disconnect(),this._socket=void 0,this.state=Ie.DISCONNECTED)}async reconnect(){this._socket||this.state!==Ie.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",n={},r=Ut,s=b.get){const o=new Oe(e,t,n,r,s);return await o._connect(),o}_sendRequest(t,e,n){if(!t)throw new Yt("`serviceName` must be provided.",this);if(this.state!==Oe.STATE_CONNECTED)throw new Yt("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new Yt("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=t,s[1]=parseInt(e),s.set(n,2),this._emit(1,s)}_getChannel(t,e){const n=""+t+e;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new Gt(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise((t,e)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(e)}),n.once("connect",async()=>{this._debugEvent("once-connect");try{await this._onConnect(),t()}catch(t){e(t)}}),n.connect()})}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),e=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,n=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",r=this._connectionProvider(e,{parser:{Encoder:me,Decoder:ge},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Ie.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Ie.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(Ht.fromPublicError(t));r.response(e)})},this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=Ie.CONNECTED;const t=async(t,e,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",()=>{this._token.off("change:value",t)})}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=Ie.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(t,e){if(!this._isDebugModeEnabled())return;const n=void 0!==e?", data: "+e:"";console.info((new Date).toLocaleString()+" "+t+n)}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(Yt.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:t}){this._removeAuthData(),this.fire("error",Ht.fromPublicError(t))}async _authenticate(t){try{this._debugEvent("authenticate:start");const e=await this._emit(2,{token:t});this._debugEvent("authenticate:success","envId: "+e.environmentId+", userId: "+e.userId),this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._debugEvent("authenticate:error",t.message),this._removeAuthData(),t}}_isDebugModeEnabled(){return!!n.global.window.localStorage&&"true"===(n.global.window.localStorage.getItem("csClientDebugMode")??"false").toLowerCase()}}const ve=Oe;class we extends i{bundleVersion;static TYPE="131";static READABLE_TYPE_NAME="isEditorBundleUploaded";static DESCRIPTOR_NAME="IsEditorBundleUploadedMessage";static DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}};constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new we(t.bundleVersion)}}class Se extends i{isUploaded;static DESCRIPTOR_NAME="IsEditorBundleUploadedResponse";static DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}};constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new Se(t.isUploaded)}}class ke extends((0,n.EmitterMixin)()){static _SERVICE=13;static async isBundleUploaded(t,e){const n=new we(e);if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(ke._SERVICE,we.TYPE,l.encode(n));return l.decode(r,Se).isUploaded}}const Ae=ke;class Te extends i{documentId;revisionId;static TYPE="123";static READABLE_TYPE_NAME="getRevision";static DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new Te(t.documentId,t.revisionId)}}class _e extends o{static DESCRIPTOR_NAME="RevisionDescriptor";static DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}};static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}class Ce extends i{revisionId;name;creatorId;authorsIds;createdAt;diffData;attributes;fromVersion;toVersion;isEmptyCurrent;static DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse";static DESCRIPTOR=(()=>_e.DESCRIPTOR)();constructor(t,e,n,r,s,o,i,a,c,u){super(),this.revisionId=t,this.name=e,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return _e.toJSON(this)}toObject(){return _e.toObject(this)}static create(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new Ce(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}class Pe extends i{documentId;requestId;revisions;static TYPE="124";static READABLE_TYPE_NAME="updateRevisions";static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.documentId=t,this.requestId=e,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static create(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.create))}static fromJSON(t){return new Pe(t.documentId,t.requestId,t.revisions.map(_e.fromJSON))}}class Ee extends i{requestId;static DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse";static DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}};constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new Ee(t.requestId)}}class je extends i{documentId;static TYPE="121";static READABLE_TYPE_NAME="connectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new je(t.documentId)}}class De extends i{channel;requestId;revisions;static DESCRIPTOR_NAME="RevisionHistoryConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}};constructor(t,e,n){super(),this.channel=t,this.requestId=e,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(_e.toObject)}}static fromJSON(t){return new De(t.channel,t.requestId,t.revisions.map(_e.fromJSON))}}class xe extends i{documentId;requestId;static TYPE="122";static READABLE_TYPE_NAME="reconnectToRevisionHistory";static DESCRIPTOR_NAME="RevisionHistoryReconnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}};constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new xe(t.documentId,t.requestId)}}class Re extends Yt{constructor(t,e){super(t+" Service is not connected.",e)}}class Ne extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=12;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new je(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(t,e){if(this.isConnected)throw new Yt("Cannot reconnect to already connected service.",t);return this._connect(t,new xe(this._documentId,e))}async updateRevisions(t,e){const n=Pe.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(Pe.TYPE,n),{requestId:s}=l.decode(r,Ee);return s}async getRevision(t){const e=new Te(this._documentId,t),n=await this._sendRequest(Te.TYPE,e);return l.decode(n,Ce).toObject()}async _connect(t,e){if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(12,e.constructor.TYPE,l.encode(e)),{channel:r,requestId:s,revisions:o}=l.decode(n,De).toObject();return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:s}}_connectToChannel(t,e){this._channel=t._getChannel(Ne._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Pe.TYPE),(t,e)=>{const{documentId:n,requestId:r,revisions:s}=l.decode(e,Pe).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Revision History",this);return this._wsGateway._sendRequest(12,t,l.encode(e))}}const Ve=Ne;class Me extends i{id;documentId;type;data;originalSuggestionId;attributes;static TYPE="101";static READABLE_TYPE_NAME="addSuggestion";static DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r={},s=null,o=null){super(),this.id=t,this.documentId=e,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Me(t.id,t.documentId,t.type,JSON.parse(t.data),t.originalSuggestionId??null,t.attributes?JSON.parse(t.attributes):null)}}class Be extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt?.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Be(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Je extends i{id;documentId;static TYPE="103";static READABLE_TYPE_NAME="getSuggestion";static DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new Je(t.id,t.documentId)}}class Ue extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Ue(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class qe extends i{documentId;static TYPE="102";static READABLE_TYPE_NAME="getAllSuggestions";static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new qe(t.documentId)}}class Le extends o{static DESCRIPTOR_NAME="SuggestionDescriptor";static DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}};static toJSON(t){return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}class Ge extends i{_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse";static DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=e?.length?e:t}toJSON(){return{suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Ge(t.suggestions?.map(Ye),t.suggestionsV2?.map(Le.fromJSON))}}function Ye(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}class He extends i{id;documentId;hasComments;isHasCommentsModified;state;attributes;static TYPE="104";static READABLE_TYPE_NAME="updateSuggestion";static DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r,s,o=null){super(),this.id=t,this.documentId=e,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new He(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}class ze extends i{documentId;static TYPE="105";static READABLE_TYPE_NAME="connectToSuggestions";static DESCRIPTOR_NAME="TrackChangesConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new ze(t.documentId)}}class Fe extends i{channel;_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=n,this.suggestions=n?.length?n:e}toJSON(){return{channel:this.channel,suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Fe(t.channel,t.suggestions?.map(t=>JSON.parse(t)),t.suggestionsV2?.map(Le.fromJSON))}}class Ke extends i{ids;documentId;state;static TYPE="106";static READABLE_TYPE_NAME="batchUpdateSuggestionsState";static DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage";static DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}};constructor(t,e,n){super(),this.ids=t,this.documentId=e,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new Ke(t.ids,t.documentId,t.state)}}class We extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=10;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const e=new ze(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(10,ze.TYPE,l.encode(e)),r=l.decode(n,Fe);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,n,r=null,s){const o=new Me(t,this._documentId,e,n,r,s),i=await this._sendRequest(Me.TYPE,o);return l.decode(i,Be)}async get(t,e=1){const n=new Je(t,this._documentId);try{const t=await this._sendRequest(Je.TYPE,n);return l.decode(t,Ue)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getAll(){const t=new qe(this._documentId),e=await this._sendRequest(qe.TYPE,t),{suggestions:n}=l.decode(e,Ge);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new He(t,this._documentId,n,o,r,s);await this._sendRequest(He.TYPE,i)}async batchUpdateState(t){const e=new Ke(t.ids,this._documentId,t.state);await this._sendRequest(Ke.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(We._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(He.TYPE),(t,e)=>{const n=l.decode(e,He);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Track Changes",this);return this._wsGateway._sendRequest(10,t,l.encode(e))}}const Xe=We,Qe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ze;const $e=new Uint8Array(16);function tn(){if(!Ze&&(Ze="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ze))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ze($e)}const en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function nn(t,e=0){return en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]}const rn=function(t,e,n){if(Qe.randomUUID&&!e&&!t)return Qe.randomUUID();const r=(t=t||{}).random||(t.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return nn(r)};class sn extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new sn(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class on extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new on(t.id,t.sessionType)}}class an extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new an(t.id,t.userId,t.role,t.permissions)}}class cn extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new cn(t.id)}}const un=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new on(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,on.TYPE,l.encode(e));n=l.decode(t,sn)}catch(t){n=new sn(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await b.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new b,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,an.TYPE,async e=>{const n=l.decode(e,an);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await b.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,cn.TYPE,t=>{const e=l.decode(t,cn);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect(!1),t===ve.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class dn{static async getConnectedSessions(t,e,n){const r=new un(e,n);return await r.connect(t),r}}class ln extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new ln(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class hn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class pn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class fn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(pn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new fn(t.id,t.buffers,t.types,t.baseVersion,hn.prepareMetadataForOperations(t.types,t.metadata).map(pn.fromJSON),t.lastOperationId)}}class mn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new mn(t.id,t.lastKnowVersion,t.bundleVersion)}}class gn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(pn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new gn(t.version,t.buffers,t.types,hn.prepareMetadataForOperations(t.types,t.metadata).map(pn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new gn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class yn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:pn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",u=null){super(),this.channel=t,this.version=e,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){return!this.types?.length&&null===this.initData}toJSON(){return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:hn.removeUnnecessaryMetadata(this.types,this.metadata).map(pn.toJSON),initData:this.initData??"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new yn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),yn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:hn.prepareMetadataForOperations(t.types,t.metadata).map(pn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class bn extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new bn(e,n)}}class In extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new In(t.documentId)}}const On=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??rn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new ln(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new Yt("Cannot reconnect to already connected service.",t);return this._connect(t,new mn(this.getId(),e,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const t=new In(this.getId());if(!this._wsGateway)throw new Re("Collaborative Editing",this);const e=await this._wsGateway._sendRequest(1,In.TYPE,l.encode(t));return l.decode(e,bn)}async sendOperations(t,e,n){if(!t?.types?.length)throw new Yt("Cannot send empty update.",this._wsGateway);const r="number"==typeof e?e:parseInt(e);if(!Number.isInteger(r)||r<0)throw new Yt("Base version not provided.",this._wsGateway);const s=new fn(this.getId(),t.buffers,t.types,r,[],n);if(!this._wsGateway||!this._isConnected)throw new Re("Collaborative Editing",this);const o=await this._wsGateway._sendRequest(1,fn.TYPE,l.encode(s));return l.decode(o,gn)}async getConnectedSessions(){if(!this._isConnected)throw new Re("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await dn.getConnectedSessions(this._wsGateway,this._id,1)),this._connectedSessions}static getConnectedSessions(t,e){return dn.getConnectedSessions(t,e,1)}async _connect(t,e){if(this.isConnected())return;if(t.state!==ve.STATE_CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(1,e.constructor.TYPE,l.encode(e)),r=l.decode(n,yn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(fn.TYPE),(t,e)=>{const n=l.decode(e,fn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect()}};class vn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class wn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(vn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(vn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class Sn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Sn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class kn extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new kn(t.commentThreadId,t.commentId,t.createdAt)}}class An extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new An(t.documentId)}}class Tn extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new Tn(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(wn.fromJSON))}}class _n extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new _n(t.documentId,t.commentThreadId,t.commentId)}}class Cn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId)}}class Pn extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class En extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new En(t.commentThreadId,t.documentId)}}class jn extends i{commentThreadId;_comments;_commentsV2;resolvedBy;comments;createdAt;deletedAt;resolvedAt;attributes;context;unlinkedAt;static DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}};constructor(t,e,n,r,s,o,i,a,c,u){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=n,this.resolvedBy=s,this.comments=n?.length?n:e,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof u?new Date(u):u,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){return{commentThreadId:this.commentThreadId,comments:this._comments?.map(t=>JSON.stringify(t)),commentsV2:this._commentsV2?.map(vn.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:this.createdAt?.toISOString(),deletedAt:this.deletedAt?.toISOString(),resolvedAt:this.resolvedAt?.toISOString(),unlinkedAt:this.unlinkedAt?.toISOString()}}static fromJSON(t){return new jn(t.commentThreadId,t.comments?.map(t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t)),t.commentsV2?.map(vn.fromJSON),t.attributes?JSON.parse(t.attributes):t.attributes,t.resolvedBy,t.context?JSON.parse(t.context):t.context,t.createdAt,t.deletedAt,t.resolvedAt,t.unlinkedAt)}}class Dn extends i{documentId;static TYPE="94";static READABLE_TYPE_NAME="getDocumentThreads";static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Dn(t.documentId)}}class xn extends i{_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse";static DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=e?.length?e:t}toJSON(){return{threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new xn(t.threads?.map(t=>function(t){const e=JSON.parse(t),n={...e};return e.comments&&(n.comments=e.comments?.map(t=>({...t,createdAt:new Date(t.createdAt)}))),n}(t)),t.threadsV2?.map(wn.fromJSON))}}class Rn extends o{static DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}};static toJSON(t){return{commentId:t.commentId,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{commentId:t.commentId,createdAt:new Date(t.createdAt)}}}class Nn extends i{commentThreadId;comments;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}};constructor(t,e,n=[]){super(),this.commentThreadId=t,this.comments=n,this.createdAt=new Date(e)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map(t=>Rn.toJSON(t))}}static fromJSON(t){return new Nn(t.commentThreadId,t.createdAt,t.comments.map(t=>Rn.fromJSON(t)))}}class Vn extends i{documentId;commentThreadId;comments;context;resolvedBy;attributes;createdAt;resolvedAt;deletedAt;static TYPE="140";static READABLE_TYPE_NAME="addCommentThread";static DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}};constructor(t,e,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=t,this.commentThreadId=e,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:this.comments?.map(t=>vn.toJSON(t))}}static fromJSON(t){return new Vn(t.documentId,t.commentThreadId,t.comments?.map(e=>vn.fromJSON({...e,documentId:t.documentId,commentThreadId:t.commentThreadId})),t.context?JSON.parse(t.context):t.context,t.resolvedBy,t.createdAt?new Date(t.createdAt):void 0,t.resolvedAt?new Date(t.resolvedAt):void 0,t.deletedAt?new Date(t.deletedAt):void 0,t.attributes?JSON.parse(t.attributes):t.attributes)}}class Mn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static TYPE="142";static READABLE_TYPE_NAME="resolveCommentThread";static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt?.toISOString()}}static fromJSON(t){return new Mn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Bn extends i{commentThreadId;documentId;static TYPE="141";static READABLE_TYPE_NAME="reopenCommentThread";static DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Bn(t.commentThreadId,t.documentId)}}class Jn extends i{commentThreadId;documentId;context;attributes;unlinkedAt;static TYPE="143";static READABLE_TYPE_NAME="updateCommentThread";static DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}};constructor(t,e,n,r=null,s=null){super(),this.commentThreadId=t,this.documentId=e,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(t){return new Jn(t.commentThreadId,t.documentId,t.context?JSON.parse(t.context):t.context,t.attributes?JSON.parse(t.attributes):null,t.unlinkedAt?new Date(t.unlinkedAt):null)}}class Un extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(t){return new Un(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class qn extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;_connectedSessions;static _SERVICE=9;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const e=new An(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(9,An.TYPE,l.encode(e)),{channel:r,threads:s}=l.decode(n,Tn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),s}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(t,e,n,r){const s=new Sn(this._documentId,t,n,e,void 0,void 0,r),o=await this._sendRequest(Sn.TYPE,s);return l.decode(o,kn)}async updateComment(t,e,n,r){const s=void 0!==r,o=new Pn(this._documentId,t,e,n,r,s);await this._sendRequest(Pn.TYPE,o)}async removeComment(t,e){const n=new _n(this._documentId,t,e);await this._sendRequest(_n.TYPE,n)}async removeCommentThread(t){const e=new Cn(this._documentId,t);await this._sendRequest(Cn.TYPE,e)}async addCommentThread(t){const e=new Vn(this._documentId,t.commentThreadId,t.comments?.map(e=>({...e,documentId:this._documentId,commentThreadId:t.commentThreadId})),t.context,t.resolvedBy,t.createdAt,t.resolvedAt,t.deletedAt,t.attributes),n=await this._sendRequest(Vn.TYPE,e);return l.decode(n,Nn)}async resolveCommentThread(t){const e=new Mn(t,this._documentId),n=await this._sendRequest(Mn.TYPE,e);return l.decode(n,Un)}async reopenCommentThread(t){const e=new Bn(t,this._documentId);await this._sendRequest(Bn.TYPE,e)}async updateCommentThread(t){const e=new Jn(t.commentThreadId,this._documentId,t.context,t.attributes,t.unlinkedAt);await this._sendRequest(Jn.TYPE,e)}async getCommentThread(t,e=1){const n=new En(t,this._documentId);try{const t=await this._sendRequest(En.TYPE,n),e=l.decode(t,jn);return{commentThreadId:e.commentThreadId,comments:e.comments,attributes:e.attributes,context:e.context,resolvedAt:e.resolvedAt,resolvedBy:e.resolvedBy,deletedAt:e.deletedAt,unlinkedAt:e.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.getCommentThread(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getDocumentThreads(){const t=new Dn(this._documentId),e=await this._sendRequest(Dn.TYPE,t),{threads:n}=l.decode(e,xn);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new Re("Comments",this);return this._connectedSessions||(this._connectedSessions=await dn.getConnectedSessions(this._wsGateway,this._documentId,9)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(qn._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(Sn.TYPE),(t,e)=>{const n=l.decode(e,Sn);this.fire("commentAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(_n.TYPE),(t,e)=>{const n=l.decode(e,_n);this.fire("commentRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Pn.TYPE),(t,e)=>{const n=l.decode(e,Pn);this.fire("commentUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Cn.TYPE),(t,e)=>{const n=l.decode(e,Cn);this.fire("commentThreadRemoved",n)}),this.listenTo(this._channel,this._channel.getEventName(Vn.TYPE),(t,e)=>{const n=l.decode(e,Vn);this.fire("commentThreadAdded",n)}),this.listenTo(this._channel,this._channel.getEventName(Jn.TYPE),(t,e)=>{const n=l.decode(e,Jn);this.fire("commentThreadUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Mn.TYPE),(t,e)=>{const n=l.decode(e,Mn);this.fire("commentThreadResolved",n)}),this.listenTo(this._channel,this._channel.getEventName(Bn.TYPE),(t,e)=>{const n=l.decode(e,Bn);this.fire("commentThreadReopened",n)}))}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Comments",this);return this._wsGateway._sendRequest(9,t,l.encode(e))}}const Ln=qn,Gn=Yn;function Yn(t,e){const n=zn();return(Yn=function(t,e){return n[t-=235]})(t,e)}!function(t){const e=Yn,n=t();for(;;)try{if(526649===parseInt(e(271))/1+-parseInt(e(258))/2*(-parseInt(e(287))/3)+-parseInt(e(274))/4*(-parseInt(e(241))/5)+-parseInt(e(246))/6+-parseInt(e(285))/7+parseInt(e(265))/8+-parseInt(e(270))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(zn);class Hn extends e.ContextPlugin{static[Gn(302)]=(()=>ve)();static[Gn(238)]=1e3;[Gn(278)];[Gn(249)];[Gn(282)];[Gn(299)];static get[Gn(281)](){return[Gn(247),r.Notification]}static get[Gn(240)](){return Gn(302)}static get[Gn(300)](){return!0}static get[Gn(279)](){return!0}constructor(t){const e=Gn;super(t),this[e(268)](e(262),Ie[e(284)]),this[e(268)](e(303),!1),this[e(249)]=new Set,this[e(282)]=!1,this[e(299)]=new((0,n.DomEmitterMixin)())}[Gn(245)](){const t=Gn,e=this[t(264)],s=e[t(250)][t(304)](t(247)),o=e[t(250)][t(304)](r.Notification);if(!s[t(254)])throw new n.CKEditorError(t(296),this);if(!s[t(290)])throw new n.CKEditorError(t(293),this);return this[t(299)][t(244)](window,t(277),()=>this[t(303)]=!0),this[t(299)][t(244)](window,t(283),()=>this[t(303)]=!1),this[t(264)][t(239)][t(289)](t(267),10),this[t(264)][t(239)][t(289)](t(243),20),Hn[t(302)][t(275)](s[t(254)],s[t(290)],{timeout:1e3*this[t(264)][t(239)][t(304)](t(267)),requestTimeout:1e3*this[t(264)][t(239)][t(304)](t(243))})[t(295)](e=>{const r=t;if(this[r(278)]=e,this[r(256)](r(262)).to(e,r(262),this,r(303),(t,e)=>(r(298)!==t&&(this[r(282)]=!0),e||t!==Ie[r(284)]?Ie[r(242)]:this[r(262)]==Ie[r(242)]&&this[r(282)]?(this[r(282)]=!1,this[r(288)](),Ie[r(273)]):Ie[r(284)])),this[r(278)].on(r(292),(t,e)=>{const s=r;if(s(236)!==e[s(301)])throw console[s(292)](e),new n.CKEditorError(s(286),null,{originalError:e});o[s(269)](s(291),{title:s(305),namespace:s(263)})}),!e.me)return new Promise(t=>e.on(r(253),t))})[t(280)](e=>{const r=t;throw console[r(292)](e),new n.CKEditorError(r(286),null,{originalError:e})})}[Gn(260)](t){const e=Gn;if(e(259)!=typeof t[e(276)])throw new n.CKEditorError(e(251),this);if(this[e(294)](t))throw new n.CKEditorError(e(252),this,{name:t[e(266)][e(240)]});this[e(249)][e(237)](t)}[Gn(307)](t){const e=Gn;this[e(249)][e(272)](t)}[Gn(294)](t){const e=Gn;return this[e(249)][e(257)](t)}[Gn(288)](){const t=Gn;return this[t(278)][t(276)]()[t(295)](()=>Promise[t(235)](Array[t(261)](this[t(249)],e=>e[t(276)]())))[t(295)](()=>this[t(262)]=Ie[t(284)])[t(280)](e=>{const r=t;throw console[r(292)](e),new n.CKEditorError(r(255),this[r(264)])})}[Gn(306)](){const t=Gn;this[t(278)]&&this[t(278)][t(306)](),this[t(262)]=Ie[t(242)],this[t(299)][t(248)]()}[Gn(297)](){const t=Gn;this[t(306)](),super[t(297)]()}}function zn(){const t=["_reconnectionStack","plugins","websocketgateway-invalid-plugin-interface","websocketgateway-plugin-already-registered","change:me","token","cloudservices-reconnection-error","bind","has","4jZhzDf","function","addToReconnectionStack","from","state","real-time-collaboration","context","5889760oONVtd","constructor","cloudServices.connectionTimeout","set","showWarning","10909170uhqHRd","945126GLGwtD","delete","CONNECTING","4hLjYBq","connect","reconnect","offline","connection","isPremiumPlugin","catch","requires","_shouldPluginsReconnect","online","CONNECTED","7253470zfBjwG","cloudservices-init","1460607qUhjfY","_reconnect","define","webSocketUrl","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","error","websocketgateway-missing-websocket-url","isInReconnectionStack","then","websocketgateway-missing-token","destroy","connected","_domEmitter","isOfficialPlugin","code","WebSocketGateway","_isBrowserOffline","get","Connected users limit exceeded","disconnect","removeFromReconnectionStack","all","limitExceeded","add","initialReconnectionInterval","config","pluginName","1918255hYINUJ","DISCONNECTED","cloudServices.requestTimeout","listenTo","init","1582476YqtDvF","CloudServices","stopListening"];return(zn=function(){return t})()}var Fn=__webpack_require__(211);const Kn=Xn;function Wn(){const t=["orderNumber","plugins","channelConnectedUsers","fire","sessionId","getUserBySessionId","_createUser","has","assign","14412HpkChh","mySessionId","channelSessions","54072eFgdzw","connection","set","pluginName","3231090GmnucB","120BPzaLm","requires","7mIkNNT","add","listenTo","_users","_handleSessionRemove","_registeredSessions","sessionAdd:","stopListening","remove","context","unregister","values","isPremiumPlugin","5EnsLUi","size","isMe","Sessions","clear","_uniqueUsersCount","getUser","2140104MaMPLB","getUserRole","getUserSessions","addUser","role","2231748EqfzCk","defineMe","355145tCfKHM","sessions-unregister-not-exist","register","sessions-register-already-registered","delete","change:state","hiddenInPresenceList","9713RBbTDO","connected","get","allConnectedUsers","18288sTrvwO","120zqDYIH","_handleSessionAdd","state","user","init","forEach","isOfficialPlugin"];return(Wn=function(){return t})()}function Xn(t,e){const n=Wn();return(Xn=function(t,e){return n[t-=497]})(t,e)}!function(t){const e=Xn,n=t();for(;;)try{if(269657===-parseInt(e(536))/1+parseInt(e(547))/2*(-parseInt(e(548))/3)+-parseInt(e(529))/4*(-parseInt(e(522))/5)+parseInt(e(534))/6*(-parseInt(e(509))/7)+parseInt(e(507))/8*(parseInt(e(502))/9)+-parseInt(e(506))/10+parseInt(e(543))/11*(parseInt(e(499))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Wn);class Qn extends e.ContextPlugin{[Kn(501)];[Kn(557)];[Kn(546)];[Kn(514)];[Kn(527)];[Kn(512)];static get[Kn(505)](){return Kn(525)}static get[Kn(554)](){return!0}static get[Kn(521)](){return!0}static get[Kn(508)](){return[Hn,Fn.Users]}constructor(t){const e=Kn;super(t),this[e(501)]=new Map,this[e(557)]=new Map,this[e(546)]=new n.Collection,this[e(514)]=new Map,this[e(527)]=0,this[e(512)]=this[e(518)][e(556)][e(545)](Fn.Users)}[Kn(552)](){const t=Kn,e=this[t(518)][t(556)][t(545)](Hn);this[t(511)](e,t(541),(e,n,r)=>{const s=t;if(s(544)!==r)this[s(501)][s(553)](t=>t[s(526)]()),this[s(557)][s(553)](t=>t[s(526)]()),this[s(546)][s(526)]();else for(const[t,e]of this[s(514)])for(const n of e)this[s(549)](t,n)}),this[t(561)](e[t(503)].me,!0)}[Kn(538)](t,e){const r=Kn;if(this[r(514)][r(497)](t))throw new n.CKEditorError(r(539),null,{channelId:t});this[r(514)][r(504)](t,e),this[r(501)][r(504)](t,new n.Collection),this[r(557)][r(504)](t,new n.Collection),this[r(511)](e,r(510),(e,n)=>this[r(549)](t,n)),this[r(511)](e,r(517),(e,n)=>this[r(513)](t,n));for(const n of e)this[r(549)](t,n)}[Kn(519)](t){const e=Kn;if(!this[e(514)][e(497)](t))throw new n.CKEditorError(e(537),null,{channelId:t});const r=this[e(514)][e(545)](t);this[e(516)](r);for(const n of r)e(544)===this[e(518)][e(556)][e(545)](Hn)[e(550)]&&this[e(513)](t,n);this[e(514)][e(540)](t),this[e(501)][e(540)](t),this[e(557)][e(540)](t)}get[Kn(500)](){const t=Kn;return this[t(518)][t(556)][t(545)](Hn)[t(503)][t(559)]}[Kn(560)](t){const e=Kn;for(const n of this[e(501)][e(520)]())for(const r of n)if(r.id===t)return r[e(551)]}[Kn(531)](t,e){const n=Kn,r=e?[this[n(501)][n(545)](e)]:this[n(501)][n(520)](),s=new Set;for(const e of r)for(const r of e)r[n(551)].id===t.id&&s[n(510)](r.id);return s}[Kn(530)](t){const e=Kn;for(const n of this[e(501)][e(520)]())for(const r of n)if(r[e(551)]===t)return r[e(533)]}[Kn(549)](t,e){const n=Kn;if(n(544)!==this[n(518)][n(556)][n(545)](Hn)[n(550)])return;const r=e[n(551)],s=this[n(512)][n(528)](r.id)||this[n(561)](r),o=Object[n(498)]({},e,{user:s});if(this[n(501)][n(545)](t)[n(510)](o),!r[n(542)]){const e=this[n(557)][n(545)](t);e[n(497)](s.id)||e[n(510)](s),this[n(546)][n(497)](s.id)||r[n(542)]||this[n(546)][n(510)](s,s[n(524)]?0:void 0)}this[n(558)](n(515)+t,{channelId:t,session:o})}[Kn(513)](t,e){const n=Kn;if(n(544)!==this[n(518)][n(556)][n(545)](Hn)[n(550)])return;const r=this[n(557)][n(545)](t),s=e[n(551)];s.id&&(this[n(501)][n(545)](t)[n(517)](e.id),r[n(497)](s.id)&&!this[n(531)](s,t)[n(523)]&&r[n(517)](s.id),this[n(546)][n(545)](s.id)&&!this[n(531)](s)[n(523)]&&this[n(546)][n(517)](s.id))}[Kn(561)](t,e){const n=Kn,r=this[n(512)][n(532)](t);return e&&this[n(512)][n(535)](t.id),r[n(555)]=this[n(527)]++,r}}var Zn=__webpack_require__(450),$n=__webpack_require__.n(Zn),tr=__webpack_require__(774),er=__webpack_require__.n(tr),nr=__webpack_require__(265),rr=__webpack_require__.n(nr),sr=__webpack_require__(410),or=__webpack_require__.n(sr),ir=__webpack_require__(238),ar=__webpack_require__.n(ir),cr=__webpack_require__(763),ur={attributes:{"data-cke":!0}};ur.setAttributes=or(),ur.insert=rr().bind(null,"head"),ur.domAPI=er(),ur.insertStyleElement=ar();$n()(cr.A,ur);cr.A&&cr.A.locals&&cr.A.locals;const dr=hr;function lr(){const t=["applyOperation","update:user:range","markerRange","get","isOfficialPlugin","reconvertMarker","toRange","keydown","destroy","for","createUIElement","getStart","batch","span","enqueueChange",'<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"mySessionId","type","13321ZCuVDY","startsWith","markerToElement","Escape","isDocumentOperation","getContainedElement","data-session-id","getNearestSelectionRange","color","editingDowncast","isObject","root","conversion","ck-user__marker ","nodeAfter","createUserMarkerOperations","schema","3252qNQqld","user:","3483423DILSoY","toDomElement","markerNameToElements","isPremiumPlugin","pluginName","editing","element","requires","hasContent","isSimilar","635daQNUt","mouseleave","editor","mapper","getRange","outerHTML","newRange","markerToHighlight","226800xgBAYF","deletionPosition","hasDomSelection","commands","delete","spellcheck","getFirstRange","1025416fGaaBL","getMarkerClass","init","add","classList","getSelectionClass","name","ck-user__selection","rootName","ck-user__marker-tooltip","render","addMarker","updateMarker","checkChild","user:position","isCollapsed","getAttribute","marker","76569ncfTRp","undo","detach","setCustomProperty","$text","createElement","fromRange","textContent","getCustomProperty","afterInit","change:range","user:range","mouseenter","tableCell","highest","orderNumber","start","addEventListener","selection","document","getUserBySessionId","_domEmitter","remove","change","ck-user__marker_hovered","getPositions","createRange","model","innerHTML","plugins","listenTo","UserMarkers","user:position:","331409HSRUEZ","set","removeMarker","stopListening","isLimit","size","has","contenteditable","split","oldRange","markerName","clear","false","parent","984YuVBdk","end","user:range:","setAttribute","removeClass","isInline","view","$graveyard","userPositionMarker","markers","_createdBatches"];return(lr=function(){return t})()}function hr(t,e){const n=lr();return(hr=function(t,e){return n[t-=474]})(t,e)}!function(t){const e=hr,n=t();for(;;)try{if(227028===parseInt(e(516))/1+-parseInt(e(596))/2+-parseInt(e(483))/3+parseInt(e(603))/4+-parseInt(e(588))/5*(parseInt(e(576))/6)+parseInt(e(559))/7*(parseInt(e(530))/8)+-parseInt(e(578))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lr);class pr extends e.Plugin{[dr(504)]=new((0,n.DomEmitterMixin)());static get[dr(585)](){return[Qn]}static get[dr(582)](){return dr(514)}static get[dr(545)](){return!0}static get[dr(581)](){return!0}[dr(605)](){const t=dr,e=this[t(590)],r=e[t(512)][t(544)](Qn);e[t(571)][t(550)](t(568))[t(561)]({model:t(479),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(526)][o(524)](":")[2],a=r[o(503)](i);if(!a||i===r[o(557)])return;if(!s[o(510)][o(575)][o(478)](e[o(543)][o(499)],o(487)))return;const c={class:o(572)+a[o(567)][o(604)](),"data-name":a[o(609)],"data-session-id":i},u=s[o(510)][o(539)][o(544)](e[o(526)])[o(552)](),d=u[o(573)],l=s[o(510)][o(575)];if(d&&l[o(569)](d)&&l[o(535)](d)&&!s[o(510)][o(539)][o(544)](o(532)+i)[o(592)]()[o(480)])return;const h=u[o(529)];return s[o(510)][o(575)][o(520)](h)&&!s[o(510)][o(586)](h)&&(c[o(523)]=!1),function(t,e,n){const r=o,s=t[r(551)](r(554),e);return t[r(486)](r(538),!0,s),s[r(475)]=function(t){const e=r,s=this[e(579)](t),o=document[e(488)](e(554));return o[e(607)][e(606)](e(474)),o[e(533)](e(523),e(528)),o[e(533)](e(601),e(528)),o[e(490)]=n[e(609)],s[e(511)]=e(556)+o[e(593)]+"",s[e(500)](e(495),()=>{const t=e;s[t(607)][t(606)](t(507))}),s[e(500)](e(589),()=>{const t=e;s[t(607)][t(505)](t(507))}),s},s[r(587)]=function(t){const e=r;return!(!this[e(491)](e(538))||!t[e(491)](e(538))||this[e(481)](e(565))!=t[e(481)](e(565)))},s}(n,c,a)}(n,s,r,e)}),e[t(571)][t(550)](t(568))[t(595)]({model:t(494),view:e=>function(e,n){const r=t,s=e[r(526)][r(524)](":")[2];if(s===n[r(557)])return null;const o=n[r(503)](s);return o?{id:s,classes:[r(610),o[r(567)][r(608)]()],attributes:{"data-session-id":s},priority:2e3+o[r(498)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(510)],o=new Map,i=e[n(512)][n(544)](Qn);r[n(539)].on(n(542),(t,a,c,u)=>{const d=n;if(!u&&o[d(544)](a[d(609)]))return o[d(544)](a[d(609)])[d(485)](),void o[d(600)](a[d(609)]);const l=a[d(609)][d(524)](":")[2];if(l===i[d(557)])return;const h=d(515)+l;r[d(539)][d(522)](h)&&e[d(583)][d(546)](h),a.on(d(493),(t,e,n)=>{const i=d;if(i(537)!=e[i(570)][i(611)]&&i(537)==a[i(592)]()[i(570)][i(611)]&&!o[i(522)](a[i(609)])){const t=r[i(575)][i(566)](n[i(597)]);if(t){const e=s.ModelLiveRange[i(489)](t);o[i(517)](a[i(609)],e),e.on(i(493),(t,n,s)=>{const c=i;if(c(537)==e[c(570)][c(611)]){const t=r[c(575)][c(566)](s[c(597)]);t?(e[c(499)]=t[c(499)],e[c(531)]=t[c(531)]):(o[c(600)](a[c(609)]),e[c(485)]())}})}}})}),r[n(502)].on(n(506),()=>{const t=n;o[t(521)]>0&&r[t(555)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(537)==r[n(539)][n(544)](t)[n(592)]()[n(570)][n(611)]&&(fr(t[n(524)](":")[2],s[n(547)](),r,e),s[n(485)]());o[n(527)]()})})}(e),this[t(504)][t(513)](n.global[t(502)],t(548),(n,{key:r})=>{const s=t;s(562)===r&&function(t){const e=s;t[e(583)][e(536)][e(506)](n=>{const r=e;for(const e of t[r(510)][r(539)]){if(!e[r(609)][r(560)](r(479)))continue;const s=t[r(583)][r(591)][r(580)](e[r(609)]);if(s)for(const t of s)n[r(534)](r(507),t)}})}(e)},{useCapture:!0})}[dr(492)](){const t=dr,e=this[t(590)],n=e[t(599)][t(544)](t(484));n&&e[t(510)].on(t(541),(r,s)=>{const o=t,i=s[0];if(!i[o(563)])return;if(o(482)!=i[o(558)]||!i[o(609)][o(560)](o(577)))return;const a=i[o(553)];n[o(540)][o(522)](a)&&(i[o(594)]=i[o(525)]?e[o(510)][o(509)](i[o(525)][o(499)],i[o(525)][o(531)]):null)},{priority:t(497)})}[dr(549)](){const t=dr;return this[t(504)][t(519)](),super[t(549)]()}[dr(574)](){const t=dr,e=this[t(590)],n=e[t(510)][t(502)],r=e[t(512)][t(544)](Qn);e[t(510)][t(555)]({isUndoable:!1},s=>{const o=t,i=o(532)+r[o(557)],a=o(515)+r[o(557)],c=e[o(510)][o(539)][o(522)](i);e[o(583)][o(536)][o(598)]?fr(r[o(557)],n[o(501)][o(602)](),e[o(510)],s):c&&(s[o(518)](i),s[o(518)](a))})}}function fr(t,e,n,r){const s=dr,o=s(532)+t,i=s(515)+t,a=e[s(564)]();let c=e[s(499)];if(a&&a.is(s(584),s(496))){const t=function(t,e){const n=s;for(const r of t[n(508)]())if(e[n(575)][n(478)](r,n(487)))return r}(e,n);t&&(c=t,e=r[s(509)](c))}const u=r[s(509)](c);n[s(539)][s(522)](o)?(r[s(477)](o,{range:e}),r[s(477)](i,{range:u})):(r[s(476)](o,{range:e,usingOperation:!0}),r[s(476)](i,{range:u,usingOperation:!0}))}function mr(t,e,n){const r=t.t,s=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return s({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return s("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return s("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return s("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return s("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return s("Synchronization issue");case"Connected users list dropdown menu":return s("Connected users list dropdown menu");case"Collapsed connected users list (press ENTER to open it)":return s("Collapsed connected users list (press ENTER to open it)");case"Connected users list":return s("Connected users list");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return s({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}function gr(t,e){var n=yr();return(gr=function(t,e){return n[t-=479]})(t,e)}function yr(){var t=["newName: string expected","/Range","uint32","toJSONOptions","getTypeUrl","/Position","/InsertOperation","howMany","oldRange.","Element","start","rootName","RootAttributeOperation","path: array expected","object expected","rootName: string expected","44616ALZRmk","21162DYUDdK",".MergeOperation.graveyardPosition: object expected","string","insertionPosition.","newValueBoolean","sourcePosition","shouldReceiveAttributes",".InsertOperation.position: object expected","root",".MoveOperation.targetPosition: object expected","targetPosition","oldValueBoolean: boolean expected",".SplitOperation.insertionPosition: object expected",".SplitOperation.graveyardPosition: object expected","data","/Element",".InsertOperation.nodes: object expected","5IzbzLD","name: string expected","key","range","boolean","splitPosition.","/SplitOperation","ldelim","affectsData","defaults",".MoveOperation.sourcePosition: object expected",".Element.attributesBoolean: object expected","isInteger",".Range.end: object expected","fork","call","path","attributesJson: string expected","name","range.","365607ZsUrxU","/MoveOperation",".MergeOperation.targetPosition: object expected","howMany: integer expected","rootGraveyard",".MergeOperation.sourcePosition: object expected","splitPosition","decode","sourcePosition.","objects","newName","newRange.","end","attributesBoolean: object expected","nodes.","nodes","rootMain: boolean expected","attributesJson","isAdd","SplitOperation","hasOwnProperty","util","AttributeOperation","wasUndone: boolean expected","root: string expected",".AttributeOperation.range: object expected","keys",".SplitOperation.splitPosition: object expected","position.","/MarkerOperation","elementName: string expected","Writer","arrays","wasUndone","4648snxubx","path: integer[] expected","roots","prototype","/RootAttributeOperation","/RootOperation",".Element.children: object expected","encodeDelimited","322980VedIBZ","RenameOperation","create","data: string expected","isArray","attributesBoolean","959eQwCiu","isString","position","834CUryfo","toObject","children: array expected","Position","skipType",".MarkerOperation.oldRange: object expected","graveyardPosition","key: string expected","newValueJson","start.","MarkerOperation",".Range.start: object expected","/MergeOperation","default","decodeDelimited","oldValueBoolean","nodes: array expected","isAdd: boolean expected","fromObject","end.","encode","pos",".RenameOperation.position: object expected","rootMain","shouldReceiveAttributes: boolean expected","children","16643250FiUQEX","constructor","/AttributeOperation","oldName: string expected","stickiness","oldName","MergeOperation","targetPosition.","push","object","len","newRange","affectsData: boolean expected","type.googleapis.com","oldValueJson: string expected","toJSON","emptyObject","oldValueJson","bool","isObject","elementName","emptyArray",".Position.path: array expected","graveyardPosition.","InsertOperation","children.","/RenameOperation","MoveOperation","attributesBoolean: boolean{k:string} expected","stickiness: string expected","rootGraveyard: boolean expected","Reader",".MarkerOperation.newRange: object expected","newValueJson: string expected","length",".InsertOperation.nodes: array expected","oldRange","RootOperation","newValueBoolean: boolean expected","verify","8996373ZwPdyq","insertionPosition",".Element.children: array expected","Range"];return(yr=function(){return t})()}!function(t){for(var e=gr,n=t();;)try{if(747285===parseInt(e(602))/1+parseInt(e(644))/2+-parseInt(e(653))/3*(-parseInt(e(636))/4)+-parseInt(e(582))/5*(parseInt(e(565))/6)+parseInt(e(650))/7*(-parseInt(e(564))/8)+-parseInt(e(544))/9+parseInt(e(504))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yr);const br=(()=>{var t=gr,e=u[t(535)],n=u[t(633)],r=u[t(623)],s=u[t(638)][t(491)]||(u[t(638)][t(491)]={});return s[t(624)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(585)]=null,i[o(639)][o(584)]="",i[o(639)][o(493)]=!1,i[o(639)][o(521)]="",i[o(639)][o(569)]=!1,i[o(639)][o(486)]="",i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(585)]&&Object[r(622)][r(597)](t,r(585))&&s[r(547)][r(498)](t[r(585)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(584)]&&Object[r(622)][r(597)](t,r(584))&&e[r(550)](18)[r(567)](t[r(584)]),null!=t[r(493)]&&Object[r(622)][r(597)](t,r(493))&&e[r(550)](24)[r(522)](t[r(493)]),null!=t[r(521)]&&Object[r(622)][r(597)](t,r(521))&&e[r(550)](34)[r(567)](t[r(521)]),null!=t[r(569)]&&Object[r(622)][r(597)](t,r(569))&&e[r(550)](40)[r(522)](t[r(569)]),null!=t[r(486)]&&Object[r(622)][r(597)](t,r(486))&&e[r(550)](50)[r(567)](t[r(486)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](56)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(624)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(585)]=s[r(547)][r(609)](t,t[r(550)]());break;case 2:a[r(584)]=t[r(567)]();break;case 3:a[r(493)]=t[r(522)]();break;case 4:a[r(521)]=t[r(567)]();break;case 5:a[r(569)]=t[r(522)]();break;case 6:a[r(486)]=t[r(567)]();break;case 7:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;if(e(513)!=typeof t||null===t)return e(562);if(null!=t[e(585)]&&t[e(622)](e(585))){var n=s[e(547)][e(543)](t[e(585)]);if(n)return e(601)+n}return null!=t[e(584)]&&t[e(622)](e(584))&&!r[e(651)](t[e(584)])?e(485):null!=t[e(493)]&&t[e(622)](e(493))&&e(586)!=typeof t[e(493)]?e(576):null!=t[e(521)]&&t[e(622)](e(521))&&!r[e(651)](t[e(521)])?e(518):null!=t[e(569)]&&t[e(622)](e(569))&&e(586)!=typeof t[e(569)]?e(542):null!=t[e(486)]&&t[e(622)](e(486))&&!r[e(651)](t[e(486)])?e(537):null!=t[e(635)]&&t[e(622)](e(635))&&e(586)!=typeof t[e(635)]?e(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(624)])return t;var n=new(s[e(624)]);if(null!=t[e(585)]){if(e(513)!=typeof t[e(585)])throw TypeError(e(627));n[e(585)]=s[e(547)][e(496)](t[e(585)])}return null!=t[e(584)]&&(n[e(584)]=String(t[e(584)])),null!=t[e(493)]&&(n[e(493)]=Boolean(t[e(493)])),null!=t[e(521)]&&(n[e(521)]=String(t[e(521)])),null!=t[e(569)]&&(n[e(569)]=Boolean(t[e(569)])),null!=t[e(486)]&&(n[e(486)]=String(t[e(486)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(585)]=null,r[n(584)]="",r[n(493)]=!1,r[n(521)]="",r[n(569)]=!1,r[n(486)]="",r[n(635)]=!1),null!=t[n(585)]&&t[n(622)](n(585))&&(r[n(585)]=s[n(547)][n(479)](t[n(585)],e)),null!=t[n(584)]&&t[n(622)](n(584))&&(r[n(584)]=t[n(584)]),null!=t[n(493)]&&t[n(622)](n(493))&&(r[n(493)]=t[n(493)]),null!=t[n(521)]&&t[n(622)](n(521))&&(r[n(521)]=t[n(521)]),null!=t[n(569)]&&t[n(622)](n(569))&&(r[n(569)]=t[n(569)]),null!=t[n(486)]&&t[n(622)](n(486))&&(r[n(486)]=t[n(486)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(506)},i}(),s[t(528)]=function(){var o=t;function i(t){var e=gr;if(this[e(617)]=[],t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(652)]=null,i[o(639)][o(617)]=r[o(525)],i[o(639)][o(571)]=!1,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;if(e||(e=n[r(646)]()),null!=t[r(652)]&&Object[r(622)][r(597)](t,r(652))&&s[r(481)][r(498)](t[r(652)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(617)]&&t[r(617)][r(538)])for(var i=0;i<t[r(617)][r(538)];++i)s[r(557)][r(498)](t[r(617)][i],e[r(550)](18)[r(596)]())[r(589)]();return null!=t[r(571)]&&Object[r(622)][r(597)](t,r(571))&&e[r(550)](24)[r(522)](t[r(571)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](32)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(528)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(652)]=s[r(481)][r(609)](t,t[r(550)]());break;case 2:a[r(617)]&&a[r(617)][r(538)]||(a[r(617)]=[]),a[r(617)][r(512)](s[r(557)][r(609)](t,t[r(550)]()));break;case 3:a[r(571)]=t[r(522)]();break;case 4:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;if(e(513)!=typeof t||null===t)return e(562);if(null!=t[e(652)]&&t[e(622)](e(652))&&(r=s[e(481)][e(543)](t[e(652)])))return e(630)+r;if(null!=t[e(617)]&&t[e(622)](e(617))){if(!Array[e(648)](t[e(617)]))return e(494);for(var n=0;n<t[e(617)][e(538)];++n){var r;if(r=s[e(557)][e(543)](t[e(617)][n]))return e(616)+r}}return null!=t[e(571)]&&t[e(622)](e(571))&&e(586)!=typeof t[e(571)]?e(502):null!=t[e(635)]&&t[e(622)](e(635))&&e(586)!=typeof t[e(635)]?e(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(528)])return t;var n=new(s[e(528)]);if(null!=t[e(652)]){if(e(513)!=typeof t[e(652)])throw TypeError(e(572));n[e(652)]=s[e(481)][e(496)](t[e(652)])}if(t[e(617)]){if(!Array[e(648)](t[e(617)]))throw TypeError(e(539));n[e(617)]=[];for(var r=0;r<t[e(617)][e(538)];++r){if(e(513)!=typeof t[e(617)][r])throw TypeError(e(581));n[e(617)][r]=s[e(557)][e(496)](t[e(617)][r])}}return null!=t[e(571)]&&(n[e(571)]=Boolean(t[e(571)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(634)]||e[n(591)])&&(r[n(617)]=[]),e[n(591)]&&(r[n(652)]=null,r[n(571)]=!1,r[n(635)]=!1),null!=t[n(652)]&&t[n(622)](n(652))&&(r[n(652)]=s[n(481)][n(479)](t[n(652)],e)),t[n(617)]&&t[n(617)][n(538)]){r[n(617)]=[];for(var i=0;i<t[n(617)][n(538)];++i)r[n(617)][i]=s[n(557)][n(479)](t[n(617)][i],e)}return null!=t[n(571)]&&t[n(622)](n(571))&&(r[n(571)]=t[n(571)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(554)},i}(),s[t(488)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(600)]="",i[o(639)][o(540)]=null,i[o(639)][o(515)]=null,i[o(639)][o(590)]=!1,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(600)]&&Object[r(622)][r(597)](t,r(600))&&e[r(550)](10)[r(567)](t[r(600)]),null!=t[r(540)]&&Object[r(622)][r(597)](t,r(540))&&s[r(547)][r(498)](t[r(540)],e[r(550)](18)[r(596)]())[r(589)](),null!=t[r(515)]&&Object[r(622)][r(597)](t,r(515))&&s[r(547)][r(498)](t[r(515)],e[r(550)](26)[r(596)]())[r(589)](),null!=t[r(590)]&&Object[r(622)][r(597)](t,r(590))&&e[r(550)](32)[r(522)](t[r(590)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](40)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(488)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(600)]=t[r(567)]();break;case 2:a[r(540)]=s[r(547)][r(609)](t,t[r(550)]());break;case 3:a[r(515)]=s[r(547)][r(609)](t,t[r(550)]());break;case 4:a[r(590)]=t[r(522)]();break;case 5:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e,n=o;return n(513)!=typeof t||null===t?n(562):null!=t[n(600)]&&t[n(622)](n(600))&&!r[n(651)](t[n(600)])?n(583):null!=t[n(540)]&&t[n(622)](n(540))&&(e=s[n(547)][n(543)](t[n(540)]))?n(556)+e:null!=t[n(515)]&&t[n(622)](n(515))&&(e=s[n(547)][n(543)](t[n(515)]))?n(613)+e:null!=t[n(590)]&&t[n(622)](n(590))&&n(586)!=typeof t[n(590)]?n(516):null!=t[n(635)]&&t[n(622)](n(635))&&n(586)!=typeof t[n(635)]?n(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(488)])return t;var n=new(s[e(488)]);if(null!=t[e(600)]&&(n[e(600)]=String(t[e(600)])),null!=t[e(540)]){if(e(513)!=typeof t[e(540)])throw TypeError(e(483));n[e(540)]=s[e(547)][e(496)](t[e(540)])}if(null!=t[e(515)]){if(e(513)!=typeof t[e(515)])throw TypeError(e(536));n[e(515)]=s[e(547)][e(496)](t[e(515)])}return null!=t[e(590)]&&(n[e(590)]=Boolean(t[e(590)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(600)]="",r[n(540)]=null,r[n(515)]=null,r[n(590)]=!1,r[n(635)]=!1),null!=t[n(600)]&&t[n(622)](n(600))&&(r[n(600)]=t[n(600)]),null!=t[n(540)]&&t[n(622)](n(540))&&(r[n(540)]=s[n(547)][n(479)](t[n(540)],e)),null!=t[n(515)]&&t[n(622)](n(515))&&(r[n(515)]=s[n(547)][n(479)](t[n(515)],e)),null!=t[n(590)]&&t[n(622)](n(590))&&(r[n(590)]=t[n(590)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(631)},i}(),s[t(510)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(570)]=null,i[o(639)][o(575)]=null,i[o(639)][o(484)]=null,i[o(639)][o(555)]=0,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(570)]&&Object[r(622)][r(597)](t,r(570))&&s[r(481)][r(498)](t[r(570)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(575)]&&Object[r(622)][r(597)](t,r(575))&&s[r(481)][r(498)](t[r(575)],e[r(550)](18)[r(596)]())[r(589)](),null!=t[r(484)]&&Object[r(622)][r(597)](t,r(484))&&s[r(481)][r(498)](t[r(484)],e[r(550)](26)[r(596)]())[r(589)](),null!=t[r(555)]&&Object[r(622)][r(597)](t,r(555))&&e[r(550)](32)[r(550)](t[r(555)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](40)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(510)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(570)]=s[r(481)][r(609)](t,t[r(550)]());break;case 2:a[r(575)]=s[r(481)][r(609)](t,t[r(550)]());break;case 3:a[r(484)]=s[r(481)][r(609)](t,t[r(550)]());break;case 4:a[r(555)]=t[r(550)]();break;case 5:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e,n=o;return n(513)!=typeof t||null===t?n(562):null!=t[n(570)]&&t[n(622)](n(570))&&(e=s[n(481)][n(543)](t[n(570)]))?n(610)+e:null!=t[n(575)]&&t[n(622)](n(575))&&(e=s[n(481)][n(543)](t[n(575)]))?n(511)+e:null!=t[n(484)]&&t[n(622)](n(484))&&(e=s[n(481)][n(543)](t[n(484)]))?n(527)+e:null!=t[n(555)]&&t[n(622)](n(555))&&!r[n(594)](t[n(555)])?n(605):null!=t[n(635)]&&t[n(622)](n(635))&&n(586)!=typeof t[n(635)]?n(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(510)])return t;var n=new(s[e(510)]);if(null!=t[e(570)]){if(e(513)!=typeof t[e(570)])throw TypeError(e(607));n[e(570)]=s[e(481)][e(496)](t[e(570)])}if(null!=t[e(575)]){if(e(513)!=typeof t[e(575)])throw TypeError(e(604));n[e(575)]=s[e(481)][e(496)](t[e(575)])}if(null!=t[e(484)]){if(e(513)!=typeof t[e(484)])throw TypeError(e(566));n[e(484)]=s[e(481)][e(496)](t[e(484)])}return null!=t[e(555)]&&(n[e(555)]=t[e(555)]>>>0),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(570)]=null,r[n(575)]=null,r[n(484)]=null,r[n(555)]=0,r[n(635)]=!1),null!=t[n(570)]&&t[n(622)](n(570))&&(r[n(570)]=s[n(481)][n(479)](t[n(570)],e)),null!=t[n(575)]&&t[n(622)](n(575))&&(r[n(575)]=s[n(481)][n(479)](t[n(575)],e)),null!=t[n(484)]&&t[n(622)](n(484))&&(r[n(484)]=s[n(481)][n(479)](t[n(484)],e)),null!=t[n(555)]&&t[n(622)](n(555))&&(r[n(555)]=t[n(555)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(490)},i}(),s[t(531)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(570)]=null,i[o(639)][o(555)]=0,i[o(639)][o(575)]=null,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(570)]&&Object[r(622)][r(597)](t,r(570))&&s[r(481)][r(498)](t[r(570)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(555)]&&Object[r(622)][r(597)](t,r(555))&&e[r(550)](16)[r(550)](t[r(555)]),null!=t[r(575)]&&Object[r(622)][r(597)](t,r(575))&&s[r(481)][r(498)](t[r(575)],e[r(550)](26)[r(596)]())[r(589)](),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](32)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(531)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(570)]=s[r(481)][r(609)](t,t[r(550)]());break;case 2:a[r(555)]=t[r(550)]();break;case 3:a[r(575)]=s[r(481)][r(609)](t,t[r(550)]());break;case 4:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e,n=o;return n(513)!=typeof t||null===t?n(562):null!=t[n(570)]&&t[n(622)](n(570))&&(e=s[n(481)][n(543)](t[n(570)]))?n(610)+e:null!=t[n(555)]&&t[n(622)](n(555))&&!r[n(594)](t[n(555)])?n(605):null!=t[n(575)]&&t[n(622)](n(575))&&(e=s[n(481)][n(543)](t[n(575)]))?n(511)+e:null!=t[n(635)]&&t[n(622)](n(635))&&n(586)!=typeof t[n(635)]?n(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(531)])return t;var n=new(s[e(531)]);if(null!=t[e(570)]){if(e(513)!=typeof t[e(570)])throw TypeError(e(592));n[e(570)]=s[e(481)][e(496)](t[e(570)])}if(null!=t[e(555)]&&(n[e(555)]=t[e(555)]>>>0),null!=t[e(575)]){if(e(513)!=typeof t[e(575)])throw TypeError(e(574));n[e(575)]=s[e(481)][e(496)](t[e(575)])}return null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(570)]=null,r[n(555)]=0,r[n(575)]=null,r[n(635)]=!1),null!=t[n(570)]&&t[n(622)](n(570))&&(r[n(570)]=s[n(481)][n(479)](t[n(570)],e)),null!=t[n(555)]&&t[n(622)](n(555))&&(r[n(555)]=t[n(555)]),null!=t[n(575)]&&t[n(622)](n(575))&&(r[n(575)]=s[n(481)][n(479)](t[n(575)],e)),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(603)},i}(),s[t(645)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(652)]=null,i[o(639)][o(509)]="",i[o(639)][o(612)]="",i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(652)]&&Object[r(622)][r(597)](t,r(652))&&s[r(481)][r(498)](t[r(652)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(509)]&&Object[r(622)][r(597)](t,r(509))&&e[r(550)](18)[r(567)](t[r(509)]),null!=t[r(612)]&&Object[r(622)][r(597)](t,r(612))&&e[r(550)](26)[r(567)](t[r(612)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](32)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(645)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(652)]=s[r(481)][r(609)](t,t[r(550)]());break;case 2:a[r(509)]=t[r(567)]();break;case 3:a[r(612)]=t[r(567)]();break;case 4:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;if(e(513)!=typeof t||null===t)return e(562);if(null!=t[e(652)]&&t[e(622)](e(652))){var n=s[e(481)][e(543)](t[e(652)]);if(n)return e(630)+n}return null!=t[e(509)]&&t[e(622)](e(509))&&!r[e(651)](t[e(509)])?e(507):null!=t[e(612)]&&t[e(622)](e(612))&&!r[e(651)](t[e(612)])?e(548):null!=t[e(635)]&&t[e(622)](e(635))&&e(586)!=typeof t[e(635)]?e(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(645)])return t;var n=new(s[e(645)]);if(null!=t[e(652)]){if(e(513)!=typeof t[e(652)])throw TypeError(e(500));n[e(652)]=s[e(481)][e(496)](t[e(652)])}return null!=t[e(509)]&&(n[e(509)]=String(t[e(509)])),null!=t[e(612)]&&(n[e(612)]=String(t[e(612)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(652)]=null,r[n(509)]="",r[n(612)]="",r[n(635)]=!1),null!=t[n(652)]&&t[n(622)](n(652))&&(r[n(652)]=s[n(481)][n(479)](t[n(652)],e)),null!=t[n(509)]&&t[n(622)](n(509))&&(r[n(509)]=t[n(509)]),null!=t[n(612)]&&t[n(622)](n(612))&&(r[n(612)]=t[n(612)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(530)},i}(),s[t(560)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(573)]="",i[o(639)][o(584)]="",i[o(639)][o(493)]=!1,i[o(639)][o(521)]="",i[o(639)][o(569)]=!1,i[o(639)][o(486)]="",i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(573)]&&Object[r(622)][r(597)](t,r(573))&&e[r(550)](10)[r(567)](t[r(573)]),null!=t[r(584)]&&Object[r(622)][r(597)](t,r(584))&&e[r(550)](18)[r(567)](t[r(584)]),null!=t[r(493)]&&Object[r(622)][r(597)](t,r(493))&&e[r(550)](24)[r(522)](t[r(493)]),null!=t[r(521)]&&Object[r(622)][r(597)](t,r(521))&&e[r(550)](34)[r(567)](t[r(521)]),null!=t[r(569)]&&Object[r(622)][r(597)](t,r(569))&&e[r(550)](40)[r(522)](t[r(569)]),null!=t[r(486)]&&Object[r(622)][r(597)](t,r(486))&&e[r(550)](50)[r(567)](t[r(486)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](56)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(560)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(573)]=t[r(567)]();break;case 2:a[r(584)]=t[r(567)]();break;case 3:a[r(493)]=t[r(522)]();break;case 4:a[r(521)]=t[r(567)]();break;case 5:a[r(569)]=t[r(522)]();break;case 6:a[r(486)]=t[r(567)]();break;case 7:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;return e(513)!=typeof t||null===t?e(562):null!=t[e(573)]&&t[e(622)](e(573))&&!r[e(651)](t[e(573)])?e(626):null!=t[e(584)]&&t[e(622)](e(584))&&!r[e(651)](t[e(584)])?e(485):null!=t[e(493)]&&t[e(622)](e(493))&&e(586)!=typeof t[e(493)]?e(576):null!=t[e(521)]&&t[e(622)](e(521))&&!r[e(651)](t[e(521)])?e(518):null!=t[e(569)]&&t[e(622)](e(569))&&e(586)!=typeof t[e(569)]?e(542):null!=t[e(486)]&&t[e(622)](e(486))&&!r[e(651)](t[e(486)])?e(537):null!=t[e(635)]&&t[e(622)](e(635))&&e(586)!=typeof t[e(635)]?e(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(560)])return t;var n=new(s[e(560)]);return null!=t[e(573)]&&(n[e(573)]=String(t[e(573)])),null!=t[e(584)]&&(n[e(584)]=String(t[e(584)])),null!=t[e(493)]&&(n[e(493)]=Boolean(t[e(493)])),null!=t[e(521)]&&(n[e(521)]=String(t[e(521)])),null!=t[e(569)]&&(n[e(569)]=Boolean(t[e(569)])),null!=t[e(486)]&&(n[e(486)]=String(t[e(486)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(573)]="",r[n(584)]="",r[n(493)]=!1,r[n(521)]="",r[n(569)]=!1,r[n(486)]="",r[n(635)]=!1),null!=t[n(573)]&&t[n(622)](n(573))&&(r[n(573)]=t[n(573)]),null!=t[n(584)]&&t[n(622)](n(584))&&(r[n(584)]=t[n(584)]),null!=t[n(493)]&&t[n(622)](n(493))&&(r[n(493)]=t[n(493)]),null!=t[n(521)]&&t[n(622)](n(521))&&(r[n(521)]=t[n(521)]),null!=t[n(569)]&&t[n(622)](n(569))&&(r[n(569)]=t[n(569)]),null!=t[n(486)]&&t[n(622)](n(486))&&(r[n(486)]=t[n(486)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(640)},i}(),s[t(541)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(559)]="",i[o(639)][o(524)]="",i[o(639)][o(620)]=!1,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(559)]&&Object[r(622)][r(597)](t,r(559))&&e[r(550)](10)[r(567)](t[r(559)]),null!=t[r(524)]&&Object[r(622)][r(597)](t,r(524))&&e[r(550)](18)[r(567)](t[r(524)]),null!=t[r(620)]&&Object[r(622)][r(597)](t,r(620))&&e[r(550)](24)[r(522)](t[r(620)]),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](32)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(541)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(559)]=t[r(567)]();break;case 2:a[r(524)]=t[r(567)]();break;case 3:a[r(620)]=t[r(522)]();break;case 4:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;return e(513)!=typeof t||null===t?e(562):null!=t[e(559)]&&t[e(622)](e(559))&&!r[e(651)](t[e(559)])?e(563):null!=t[e(524)]&&t[e(622)](e(524))&&!r[e(651)](t[e(524)])?e(632):null!=t[e(620)]&&t[e(622)](e(620))&&e(586)!=typeof t[e(620)]?e(495):null!=t[e(635)]&&t[e(622)](e(635))&&e(586)!=typeof t[e(635)]?e(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(541)])return t;var n=new(s[e(541)]);return null!=t[e(559)]&&(n[e(559)]=String(t[e(559)])),null!=t[e(524)]&&(n[e(524)]=String(t[e(524)])),null!=t[e(620)]&&(n[e(620)]=Boolean(t[e(620)])),null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(559)]="",r[n(524)]="",r[n(620)]=!1,r[n(635)]=!1),null!=t[n(559)]&&t[n(622)](n(559))&&(r[n(559)]=t[n(559)]),null!=t[n(524)]&&t[n(622)](n(524))&&(r[n(524)]=t[n(524)]),null!=t[n(620)]&&t[n(622)](n(620))&&(r[n(620)]=t[n(620)]),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(641)},i}(),s[t(621)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(608)]=null,i[o(639)][o(484)]=null,i[o(639)][o(555)]=0,i[o(639)][o(545)]=null,i[o(639)][o(635)]=!1,i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;return e||(e=n[r(646)]()),null!=t[r(608)]&&Object[r(622)][r(597)](t,r(608))&&s[r(481)][r(498)](t[r(608)],e[r(550)](10)[r(596)]())[r(589)](),null!=t[r(484)]&&Object[r(622)][r(597)](t,r(484))&&s[r(481)][r(498)](t[r(484)],e[r(550)](18)[r(596)]())[r(589)](),null!=t[r(555)]&&Object[r(622)][r(597)](t,r(555))&&e[r(550)](24)[r(550)](t[r(555)]),null!=t[r(545)]&&Object[r(622)][r(597)](t,r(545))&&s[r(481)][r(498)](t[r(545)],e[r(550)](34)[r(596)]())[r(589)](),null!=t[r(635)]&&Object[r(622)][r(597)](t,r(635))&&e[r(550)](40)[r(522)](t[r(635)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(621)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(608)]=s[r(481)][r(609)](t,t[r(550)]());break;case 2:a[r(484)]=s[r(481)][r(609)](t,t[r(550)]());break;case 3:a[r(555)]=t[r(550)]();break;case 4:a[r(545)]=s[r(481)][r(609)](t,t[r(550)]());break;case 5:a[r(635)]=t[r(522)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e,n=o;return n(513)!=typeof t||null===t?n(562):null!=t[n(608)]&&t[n(622)](n(608))&&(e=s[n(481)][n(543)](t[n(608)]))?n(587)+e:null!=t[n(484)]&&t[n(622)](n(484))&&(e=s[n(481)][n(543)](t[n(484)]))?n(527)+e:null!=t[n(555)]&&t[n(622)](n(555))&&!r[n(594)](t[n(555)])?n(605):null!=t[n(545)]&&t[n(622)](n(545))&&(e=s[n(481)][n(543)](t[n(545)]))?n(568)+e:null!=t[n(635)]&&t[n(622)](n(635))&&n(586)!=typeof t[n(635)]?n(625):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(621)])return t;var n=new(s[e(621)]);if(null!=t[e(608)]){if(e(513)!=typeof t[e(608)])throw TypeError(e(629));n[e(608)]=s[e(481)][e(496)](t[e(608)])}if(null!=t[e(484)]){if(e(513)!=typeof t[e(484)])throw TypeError(e(578));n[e(484)]=s[e(481)][e(496)](t[e(484)])}if(null!=t[e(555)]&&(n[e(555)]=t[e(555)]>>>0),null!=t[e(545)]){if(e(513)!=typeof t[e(545)])throw TypeError(e(577));n[e(545)]=s[e(481)][e(496)](t[e(545)])}return null!=t[e(635)]&&(n[e(635)]=Boolean(t[e(635)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};return e[n(591)]&&(r[n(608)]=null,r[n(484)]=null,r[n(555)]=0,r[n(545)]=null,r[n(635)]=!1),null!=t[n(608)]&&t[n(622)](n(608))&&(r[n(608)]=s[n(481)][n(479)](t[n(608)],e)),null!=t[n(484)]&&t[n(622)](n(484))&&(r[n(484)]=s[n(481)][n(479)](t[n(484)],e)),null!=t[n(555)]&&t[n(622)](n(555))&&(r[n(555)]=t[n(555)]),null!=t[n(545)]&&t[n(622)](n(545))&&(r[n(545)]=s[n(481)][n(479)](t[n(545)],e)),null!=t[n(635)]&&t[n(622)](n(635))&&(r[n(635)]=t[n(635)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(588)},i}(),s[t(481)]=function(){var o=t;function i(t){var e=gr;if(this[e(598)]=[],t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(573)]="",i[o(639)][o(501)]=!1,i[o(639)][o(606)]=!1,i[o(639)][o(598)]=r[o(525)],i[o(639)][o(508)]="",i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;if(e||(e=n[r(646)]()),null!=t[r(573)]&&Object[r(622)][r(597)](t,r(573))&&e[r(550)](10)[r(567)](t[r(573)]),null!=t[r(501)]&&Object[r(622)][r(597)](t,r(501))&&e[r(550)](16)[r(522)](t[r(501)]),null!=t[r(606)]&&Object[r(622)][r(597)](t,r(606))&&e[r(550)](24)[r(522)](t[r(606)]),null!=t[r(598)]&&t[r(598)][r(538)]){e[r(550)](34)[r(596)]();for(var s=0;s<t[r(598)][r(538)];++s)e[r(550)](t[r(598)][s]);e[r(589)]()}return null!=t[r(508)]&&Object[r(622)][r(597)](t,r(508))&&e[r(550)](42)[r(567)](t[r(508)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var r=o;t instanceof e||(t=e[r(646)](t));for(var i=void 0===n?t[r(514)]:t[r(499)]+n,a=new(s[r(481)]);t[r(499)]<i;){var c=t[r(550)]();switch(c>>>3){case 1:a[r(573)]=t[r(567)]();break;case 2:a[r(501)]=t[r(522)]();break;case 3:a[r(606)]=t[r(522)]();break;case 4:if(a[r(598)]&&a[r(598)][r(538)]||(a[r(598)]=[]),2==(7&c))for(var u=t[r(550)]()+t[r(499)];t[r(499)]<u;)a[r(598)][r(512)](t[r(550)]());else a[r(598)][r(512)](t[r(550)]());break;case 5:a[r(508)]=t[r(567)]();break;default:t[r(482)](7&c)}}return a},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;if(e(513)!=typeof t||null===t)return e(562);if(null!=t[e(573)]&&t[e(622)](e(573))&&!r[e(651)](t[e(573)]))return e(626);if(null!=t[e(501)]&&t[e(622)](e(501))&&e(586)!=typeof t[e(501)])return e(618);if(null!=t[e(606)]&&t[e(622)](e(606))&&e(586)!=typeof t[e(606)])return e(534);if(null!=t[e(598)]&&t[e(622)](e(598))){if(!Array[e(648)](t[e(598)]))return e(561);for(var n=0;n<t[e(598)][e(538)];++n)if(!r[e(594)](t[e(598)][n]))return e(637)}return null!=t[e(508)]&&t[e(622)](e(508))&&!r[e(651)](t[e(508)])?e(533):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(481)])return t;var n=new(s[e(481)]);if(null!=t[e(573)]&&(n[e(573)]=String(t[e(573)])),null!=t[e(501)]&&(n[e(501)]=Boolean(t[e(501)])),null!=t[e(606)]&&(n[e(606)]=Boolean(t[e(606)])),t[e(598)]){if(!Array[e(648)](t[e(598)]))throw TypeError(e(526));n[e(598)]=[];for(var r=0;r<t[e(598)][e(538)];++r)n[e(598)][r]=t[e(598)][r]>>>0}return null!=t[e(508)]&&(n[e(508)]=String(t[e(508)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(634)]||e[n(591)])&&(r[n(598)]=[]),e[n(591)]&&(r[n(573)]="",r[n(501)]=!1,r[n(606)]=!1,r[n(508)]=""),null!=t[n(573)]&&t[n(622)](n(573))&&(r[n(573)]=t[n(573)]),null!=t[n(501)]&&t[n(622)](n(501))&&(r[n(501)]=t[n(501)]),null!=t[n(606)]&&t[n(622)](n(606))&&(r[n(606)]=t[n(606)]),t[n(598)]&&t[n(598)][n(538)]){r[n(598)]=[];for(var s=0;s<t[n(598)][n(538)];++s)r[n(598)][s]=t[n(598)][s]}return null!=t[n(508)]&&t[n(622)](n(508))&&(r[n(508)]=t[n(508)]),r},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(553)},i}(),s[t(547)]=function(){var r=t;function o(t){var e=gr;if(t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(639)][r(558)]=null,o[r(639)][r(614)]=null,o[r(646)]=function(t){return new o(t)},o[r(498)]=function(t,e){var o=r;return e||(e=n[o(646)]()),null!=t[o(558)]&&Object[o(622)][o(597)](t,o(558))&&s[o(481)][o(498)](t[o(558)],e[o(550)](10)[o(596)]())[o(589)](),null!=t[o(614)]&&Object[o(622)][o(597)](t,o(614))&&s[o(481)][o(498)](t[o(614)],e[o(550)](18)[o(596)]())[o(589)](),e},o[r(643)]=function(t,e){var n=r;return this[n(498)](t,e)[n(589)]()},o[r(609)]=function(t,n){var o=r;t instanceof e||(t=e[o(646)](t));for(var i=void 0===n?t[o(514)]:t[o(499)]+n,a=new(s[o(547)]);t[o(499)]<i;){var c=t[o(550)]();switch(c>>>3){case 1:a[o(558)]=s[o(481)][o(609)](t,t[o(550)]());break;case 2:a[o(614)]=s[o(481)][o(609)](t,t[o(550)]());break;default:t[o(482)](7&c)}}return a},o[r(492)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},o[r(543)]=function(t){var e,n=r;return n(513)!=typeof t||null===t?n(562):null!=t[n(558)]&&t[n(622)](n(558))&&(e=s[n(481)][n(543)](t[n(558)]))?n(487)+e:null!=t[n(614)]&&t[n(622)](n(614))&&(e=s[n(481)][n(543)](t[n(614)]))?n(497)+e:null},o[r(496)]=function(t){var e=r;if(t instanceof s[e(547)])return t;var n=new(s[e(547)]);if(null!=t[e(558)]){if(e(513)!=typeof t[e(558)])throw TypeError(e(489));n[e(558)]=s[e(481)][e(496)](t[e(558)])}if(null!=t[e(614)]){if(e(513)!=typeof t[e(614)])throw TypeError(e(595));n[e(614)]=s[e(481)][e(496)](t[e(614)])}return n},o[r(479)]=function(t,e){var n=r;e||(e={});var o={};return e[n(591)]&&(o[n(558)]=null,o[n(614)]=null),null!=t[n(558)]&&t[n(622)](n(558))&&(o[n(558)]=s[n(481)][n(479)](t[n(558)],e)),null!=t[n(614)]&&t[n(622)](n(614))&&(o[n(614)]=s[n(481)][n(479)](t[n(614)],e)),o},o[r(639)][r(519)]=function(){var t=r;return this[t(505)][t(479)](this,u[t(623)][t(551)])},o[r(552)]=function(t){var e=r;return void 0===t&&(t=e(517)),t+e(549)},o}(),s[t(557)]=function(){var o=t;function i(t){var e=gr;if(this[e(503)]=[],this[e(649)]={},t)for(var n=Object[e(628)](t),r=0;r<n[e(538)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(639)][o(600)]="",i[o(639)][o(503)]=r[o(525)],i[o(639)][o(579)]="",i[o(639)][o(649)]=r[o(520)],i[o(639)][o(619)]="",i[o(646)]=function(t){return new i(t)},i[o(498)]=function(t,e){var r=o;if(e||(e=n[r(646)]()),null!=t[r(600)]&&Object[r(622)][r(597)](t,r(600))&&e[r(550)](10)[r(567)](t[r(600)]),null!=t[r(503)]&&t[r(503)][r(538)])for(var i=0;i<t[r(503)][r(538)];++i)s[r(557)][r(498)](t[r(503)][i],e[r(550)](18)[r(596)]())[r(589)]();if(null!=t[r(579)]&&Object[r(622)][r(597)](t,r(579))&&e[r(550)](26)[r(567)](t[r(579)]),null!=t[r(649)]&&Object[r(622)][r(597)](t,r(649))){var a=Object[r(628)](t[r(649)]);for(i=0;i<a[r(538)];++i)e[r(550)](34)[r(596)]()[r(550)](10)[r(567)](a[i])[r(550)](16)[r(522)](t[r(649)][a[i]])[r(589)]()}return null!=t[r(619)]&&Object[r(622)][r(597)](t,r(619))&&e[r(550)](42)[r(567)](t[r(619)]),e},i[o(643)]=function(t,e){var n=o;return this[n(498)](t,e)[n(589)]()},i[o(609)]=function(t,n){var i=o;t instanceof e||(t=e[i(646)](t));for(var a,c,u=void 0===n?t[i(514)]:t[i(499)]+n,d=new(s[i(557)]);t[i(499)]<u;){var l=t[i(550)]();switch(l>>>3){case 1:d[i(600)]=t[i(567)]();break;case 2:d[i(503)]&&d[i(503)][i(538)]||(d[i(503)]=[]),d[i(503)][i(512)](s[i(557)][i(609)](t,t[i(550)]()));break;case 3:d[i(579)]=t[i(567)]();break;case 4:d[i(649)]===r[i(520)]&&(d[i(649)]={});var h=t[i(550)]()+t[i(499)];for(a="",c=!1;t[i(499)]<h;){var p=t[i(550)]();switch(p>>>3){case 1:a=t[i(567)]();break;case 2:c=t[i(522)]();break;default:t[i(482)](7&p)}}d[i(649)][a]=c;break;case 5:d[i(619)]=t[i(567)]();break;default:t[i(482)](7&l)}}return d},i[o(492)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(609)](t,t[n(550)]())},i[o(543)]=function(t){var e=o;if(e(513)!=typeof t||null===t)return e(562);if(null!=t[e(600)]&&t[e(622)](e(600))&&!r[e(651)](t[e(600)]))return e(583);if(null!=t[e(503)]&&t[e(622)](e(503))){if(!Array[e(648)](t[e(503)]))return e(480);for(var n=0;n<t[e(503)][e(538)];++n){var i=s[e(557)][e(543)](t[e(503)][n]);if(i)return e(529)+i}}if(null!=t[e(579)]&&t[e(622)](e(579))&&!r[e(651)](t[e(579)]))return e(647);if(null!=t[e(649)]&&t[e(622)](e(649))){if(!r[e(523)](t[e(649)]))return e(615);var a=Object[e(628)](t[e(649)]);for(n=0;n<a[e(538)];++n)if(e(586)!=typeof t[e(649)][a[n]])return e(532)}return null!=t[e(619)]&&t[e(622)](e(619))&&!r[e(651)](t[e(619)])?e(599):null},i[o(496)]=function(t){var e=o;if(t instanceof s[e(557)])return t;var n=new(s[e(557)]);if(null!=t[e(600)]&&(n[e(600)]=String(t[e(600)])),t[e(503)]){if(!Array[e(648)](t[e(503)]))throw TypeError(e(546));n[e(503)]=[];for(var r=0;r<t[e(503)][e(538)];++r){if(e(513)!=typeof t[e(503)][r])throw TypeError(e(642));n[e(503)][r]=s[e(557)][e(496)](t[e(503)][r])}}if(null!=t[e(579)]&&(n[e(579)]=String(t[e(579)])),t[e(649)]){if(e(513)!=typeof t[e(649)])throw TypeError(e(593));n[e(649)]={};var i=Object[e(628)](t[e(649)]);for(r=0;r<i[e(538)];++r)n[e(649)][i[r]]=Boolean(t[e(649)][i[r]])}return null!=t[e(619)]&&(n[e(619)]=String(t[e(619)])),n},i[o(479)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(634)]||e[n(591)])&&(i[n(503)]=[]),(e[n(611)]||e[n(591)])&&(i[n(649)]={}),e[n(591)]&&(i[n(600)]="",i[n(579)]="",i[n(619)]=""),null!=t[n(600)]&&t[n(622)](n(600))&&(i[n(600)]=t[n(600)]),t[n(503)]&&t[n(503)][n(538)]){i[n(503)]=[];for(var a=0;a<t[n(503)][n(538)];++a)i[n(503)][a]=s[n(557)][n(479)](t[n(503)][a],e)}if(null!=t[n(579)]&&t[n(622)](n(579))&&(i[n(579)]=t[n(579)]),t[n(649)]&&(r=Object[n(628)](t[n(649)]))[n(538)])for(i[n(649)]={},a=0;a<r[n(538)];++a)i[n(649)][r[a]]=t[n(649)][r[a]];return null!=t[n(619)]&&t[n(622)](n(619))&&(i[n(619)]=t[n(619)]),i},i[o(639)][o(519)]=function(){var t=o;return this[t(505)][t(479)](this,u[t(623)][t(551)])},i[o(552)]=function(t){var e=o;return void 0===t&&(t=e(517)),t+e(580)},i}(),s})(),Ir=vr;function Or(){const t=["decompress","23905rWcwNW","_protobuf","646872RPtvsz","getDescriptor","534588rWuVgI","encode","finish","toObject","_protobufRoot","212894PcHfJt","decode","verify","compress","438AqNoUw","3283368tRTMqM","4732665JphIJH","4138227KMMcYZ","create","9hneFun"];return(Or=function(){return t})()}function vr(t,e){const n=Or();return(vr=function(t,e){return n[t-=123]})(t,e)}!function(t){const e=vr,n=t();for(;;)try{if(414511===parseInt(e(136))/1+-parseInt(e(141))/2*(-parseInt(e(130))/3)+-parseInt(e(134))/4+parseInt(e(132))/5*(parseInt(e(125))/6)+-parseInt(e(127))/7+-parseInt(e(126))/8+parseInt(e(128))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Or);class wr{[Ir(140)];constructor(){this[Ir(140)]=br}[Ir(135)](t){return new Sr(this[Ir(140)][t])}}class Sr{[Ir(133)];constructor(t){this[Ir(133)]=t}[Ir(124)](t){const e=Ir,n=this[e(133)][e(123)](t);if(n)throw Error(n);return this[e(133)][e(137)](this[e(133)][e(129)](t))[e(138)]()}[Ir(131)](t){const e=Ir;return this[e(133)][e(139)](this[e(133)][e(142)](t),{oneofs:!0})}}function kr(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Ar(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Tr="[object RegExp]",_r="[object String]",Cr="[object Number]",Pr="[object Boolean]",Er="[object Arguments]",jr="[object Symbol]",Dr="[object Date]",xr="[object Map]",Rr="[object Set]",Nr="[object Array]",Vr="[object ArrayBuffer]",Mr="[object Object]",Br="[object DataView]",Jr="[object Uint8Array]",Ur="[object Uint8ClampedArray]",qr="[object Uint16Array]",Lr="[object Uint32Array]",Gr="[object Int8Array]",Yr="[object Int16Array]",Hr="[object Int32Array]",zr="[object Float32Array]",Fr="[object Float64Array]";function Kr(t,e,n,r=new Map,s=void 0){const o=s?.(t,e,n,r);if(null!=o)return o;if(function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;r.set(t,e);for(const[o,i]of t)e.set(o,Kr(i,o,n,r,s));return e}if(t instanceof Set){const e=new Set;r.set(t,e);for(const o of t)e.add(Kr(o,void 0,n,r,s));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(i=t,ArrayBuffer.isView(i)&&!(i instanceof DataView)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return e}var i;if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return r.set(t,e),Wr(e,t,n,r,s),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Blob){const e=new Blob([t],{type:t.type});return r.set(t,e),Wr(e,t,n,r,s),e}if(t instanceof Error){const e=new t.constructor;return r.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,Wr(e,t,n,r,s),e}if("object"==typeof t&&function(t){switch(Ar(t)){case Er:case Nr:case Vr:case Br:case Pr:case Dr:case zr:case Fr:case Gr:case Yr:case Hr:case xr:case Cr:case Mr:case Tr:case Rr:case _r:case jr:case Jr:case Ur:case qr:case Lr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Wr(e,t,n,r,s),e}return t}function Wr(t,e,n=t,r,s){const o=[...Object.keys(e),...kr(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Kr(e[a],a,n,r,s))}}function Xr(t,e){return function(t,e){return Kr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Cr:case _r:case Pr:{const e=new t.constructor(t?.valueOf());return Wr(e,t),e}case Er:{const e={};return Wr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Qr(t){return Xr(t)}function Zr(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function $r(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return ts(t,e,o,i)}return ts(t,e,o,i)}function ts(t,e,n,r){if(Object.is(t,e))return!0;let s=Ar(t),o=Ar(e);if(s===Er&&(s=Mr),o===Er&&(o=Mr),s!==o)return!1;switch(s){case _r:return t.toString()===e.toString();case Cr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Pr:case Dr:case jr:return Object.is(t.valueOf(),e.valueOf());case Tr:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case xr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!$r(o,e.get(s),s,t,e,n,r))return!1;return!0;case Rr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>$r(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Nr:case Jr:case Ur:case qr:case Lr:case"[object BigUint64Array]":case Gr:case Yr:case Hr:case"[object BigInt64Array]":case zr:case Fr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!$r(t[s],e[s],s,t,e,n,r))return!1;return!0;case Vr:return t.byteLength===e.byteLength&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case Br:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Mr:{if(!(ts(t.constructor,e.constructor,n,r)||Zr(t)&&Zr(e)))return!1;const s=[...Object.keys(t),...kr(t)],o=[...Object.keys(e),...kr(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!$r(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function es(){}function ns(t,e){return function(t,e,n){return $r(t,e,void 0,void 0,void 0,void 0,n)}(t,e,es)}function rs(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ss(){const t=["nodes","root","217ihgqgz","main","4164420kbDqcs","743098adNWzn","988844FSPcHT","593325lCPNQa","rootGraveyard","48XpHQXH","length","4614000AdmoVH","rootMain","path","2740frOyYj","381EEWwji","$graveyard","150006NtYmTe"];return(ss=function(){return t})()}function os(t,e){const n=cs,r=Qr(t);return r[n(274)][r[n(274)][n(271)]-1]+=e,r}function is(t,e){const n=cs;return t[n(280)]===e[n(280)]&&ns(t[n(274)],e[n(274)])}function as(t){const e=cs;ds(t,t=>(e(282)==t[e(280)]?(t[e(273)]=!0,delete t[e(280)]):e(277)==t[e(280)]&&(t[e(287)]=!0,delete t[e(280)]),t))}function cs(t,e){const n=ss();return(cs=function(t,e){return n[t-=271]})(t,e)}function us(t){const e=cs;ds(t,t=>(t[e(273)]?(t[e(280)]=e(282),delete t[e(273)]):t[e(287)]&&(t[e(280)]=e(277),delete t[e(287)]),t))}function ds(t,e){const n=cs;for(const r in t){const s=t[r];n(279)!==r&&rs(s)&&(s[n(274)]&&(s[n(280)]||s[n(273)]||s[n(287)])?t[r]=e(s):ds(s,e))}return t}!function(t){const e=cs,n=t();for(;;)try{if(522433===parseInt(e(285))/1+parseInt(e(284))/2+-parseInt(e(276))/3*(parseInt(e(275))/4)+-parseInt(e(283))/5+-parseInt(e(278))/6*(parseInt(e(281))/7)+-parseInt(e(288))/8*(-parseInt(e(286))/9)+parseInt(e(272))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ss);const ls=ps;function hs(){const t=["9771624PJlfOv","504987RHmpaW","types","buffers","decompress","shift","9VsJAsQ","25tvzLAH","18yzPnjn","_protobufDescriptor","__className","_id","compress","9398837OJyPrS","552424IYWJNL","push","1041042dfssDC","_operationName","2986250xpTYAc","897694gwmvcC"];return(hs=function(){return t})()}function ps(t,e){const n=hs();return(ps=function(t,e){return n[t-=271]})(t,e)}!function(t){const e=ps,n=t();for(;;)try{if(696005===-parseInt(e(285))/1+-parseInt(e(283))/2*(-parseInt(e(290))/3)+parseInt(e(278))/4*(-parseInt(e(271))/5)+-parseInt(e(280))/6+parseInt(e(277))/7+-parseInt(e(284))/8+parseInt(e(272))/9*(parseInt(e(282))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class fs{[ls(275)];[ls(281)];[ls(273)];constructor(t,e,n){const r=ls;this[r(275)]=t,this[r(281)]=e,this[r(273)]=n}[ls(276)](t,e){const n=ls,r=e[n(289)]();return as(r),t[n(287)][n(279)](this[n(273)][n(276)](r)),t[n(286)][n(279)](this[n(275)]),!0}[ls(288)](t,e){const n=ls;e[n(286)][n(289)]();const r=this[n(273)][n(288)](e[n(287)][n(289)]());us(r),r[n(274)]=this[n(281)],t[n(279)](r)}}const ms=ys;function gs(){const t=["11184QpPPga","69697foxnLe","_id","748yjddrY","boolean","_deserializeOneOf","types","_operationName","push","shift","6DSDxxy","_protobufDescriptor","oldValue","3051655SHhiOH","decompress","15850QkeqPF","Json","1179128tlozJf","1670001PByehP","__className","10739172flbOHg","parse","buffers","1449EqYcKs","newValue","_serializeOneOf","stringify","Boolean","9YhvsUo","4KddEMY","compress"];return(gs=function(){return t})()}function ys(t,e){const n=gs();return(ys=function(t,e){return n[t-=273]})(t,e)}!function(t){const e=ys,n=t();for(;;)try{if(350481===parseInt(e(302))/1*(parseInt(e(280))/2)+parseInt(e(288))/3*(parseInt(e(299))/4)+parseInt(e(283))/5+-parseInt(e(301))/6*(parseInt(e(293))/7)+parseInt(e(287))/8*(parseInt(e(298))/9)+parseInt(e(285))/10*(parseInt(e(273))/11)+-parseInt(e(290))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gs);class bs extends fs{[ms(300)](t,e){const n=ms,r=e[n(279)]();return this[n(295)](n(282),r),this[n(295)](n(294),r),as(r),t[n(292)][n(278)](this[n(281)][n(300)](r)),t[n(276)][n(278)](this[n(303)]),!0}[ms(284)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(281)][n(284)](s[n(279)]());r[n(279)](),this[n(275)](n(282),o),this[n(275)](n(294),o),us(o),o[n(289)]=this[n(277)],t[n(278)](o)}[ms(295)](t,e){const n=ms,r=e[t];n(274)==typeof r?e[t+n(297)]=r:e[t+n(286)]=JSON[n(296)](r)}[ms(275)](t,e){const n=ms,r=t+n(286);e[r]?(e[t]=JSON[n(291)](e[r]),delete e[r]):(e[t]=e[t+n(297)],delete e[t+n(297)])}}const Is=Os;function Os(t,e){const n=ws();return(Os=function(t,e){return n[t-=378]})(t,e)}!function(t){const e=Os,n=t();for(;;)try{if(181863===-parseInt(e(397))/1*(-parseInt(e(388))/2)+-parseInt(e(379))/3+-parseInt(e(409))/4*(-parseInt(e(390))/5)+parseInt(e(396))/6*(-parseInt(e(402))/7)+parseInt(e(407))/8*(parseInt(e(403))/9)+-parseInt(e(391))/10+-parseInt(e(395))/11*(-parseInt(e(378))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ws);class vs extends fs{[Is(384)](t,e){const n=Is,r=e[n(408)]();return this[n(412)](r[n(410)]),as(r),t[n(386)][n(383)](this[n(394)][n(384)](r)),t[n(400)][n(383)](this[n(380)]),!0}[Is(387)](t,e){const n=Is,{types:r,buffers:s}=e,o=this[n(394)][n(387)](s[n(408)]());r[n(408)](),o[n(410)]||(o[n(410)]=[]),this[n(411)](o[n(410)]),us(o),o[n(382)]=this[n(398)],t[n(383)](o)}[Is(412)](t){const e=Is;for(const n of t){if(n[e(381)]){const t=n[e(381)];this[e(385)](t)?n[e(405)]=t:n[e(401)]=JSON[e(389)](t)}n[e(392)]&&this[e(412)](n[e(392)])}}[Is(411)](t){const e=Is;for(const n of t)(n[e(405)]||n[e(401)])&&(n[e(405)]?(n[e(381)]=n[e(405)],delete n[e(405)]):(n[e(381)]=JSON[e(399)](n[e(401)]),delete n[e(401)])),n[e(392)]&&this[e(411)](n[e(392)])}[Is(385)](t){const e=Is;return Object[e(406)](t)[e(393)](n=>e(404)==typeof t[n])}}function ws(){const t=["8327cArFXZ","354iKtHYA","2lpeyOS","_operationName","parse","types","attributesJson","23023NIIERv","18ksghre","boolean","attributesBoolean","keys","664120wHngdQ","shift","15676vvILLv","nodes","_deserializeNodesAttributes","_serializeNodesAttributes","5532XOjzpw","292281kpZeSw","_id","attributes","__className","push","compress","_areValuesBoolean","buffers","decompress","139926sOmayE","stringify","115EsvSmp","2717290NbDPUP","children","every","_protobufDescriptor"];return(ws=function(){return t})()}const Ss=ks;function ks(t,e){const n=As();return(ks=function(t,e){return n[t-=410]})(t,e)}function As(){const t=["744058DtseaP","decompress","4447233dYQkLb","4388VmHeXB","8rlxspg","12qTfvez","oldRange","767249tZwjhM","31319079hEgSKc","1737ckLWqG","2oYacAM","7618850smiRgi","length","newRange","1750115azWOSS"];return(As=function(){return t})()}!function(t){const e=ks,n=t();for(;;)try{if(404997===-parseInt(e(418))/1*(-parseInt(e(421))/2)+-parseInt(e(420))/3*(-parseInt(e(414))/4)+-parseInt(e(410))/5*(-parseInt(e(416))/6)+parseInt(e(411))/7*(-parseInt(e(415))/8)+parseInt(e(413))/9+parseInt(e(422))/10+-parseInt(e(419))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(As);class Ts extends fs{[Ss(412)](t,e){const n=Ss;super[n(412)](t,e);const r=t[t[n(423)]-1];r[n(417)]||(r[n(417)]=null),r[n(424)]||(r[n(424)]=null)}}var _s=Ps;function Cs(){var t=["decompress","push","compress","28oGHkvg","types","435717hCYOhT","721033DxUMfn","710176YEuvps","2UKbhzV","472242GlVCcw","4VHZfqY","_id","962050tCsuBx","3265200zVqbZL","10492290XCgwXk","shift","_operationName"];return(Cs=function(){return t})()}function Ps(t,e){var n=Cs();return(Ps=function(t,e){return n[t-=296]})(t,e)}!function(t){for(var e=Ps,n=t();;)try{if(594850===-parseInt(e(310))/1+-parseInt(e(312))/2*(-parseInt(e(309))/3)+parseInt(e(297))/4*(parseInt(e(299))/5)+-parseInt(e(296))/6+-parseInt(e(307))/7*(parseInt(e(311))/8)+parseInt(e(300))/9+parseInt(e(301))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Cs);class Es extends fs{[_s(306)](t,e){var n=_s;return e[n(302)](),t[n(308)][n(305)](this[n(298)]),!0}[_s(304)](t,e){var n=_s;e[n(308)][n(302)](),t[n(305)]({__className:this[n(303)]})}}const js=xs;function Ds(){const t=["820YuYuya","startsWith","replace","_omittedNamespace","decompress","2089485ZLyWHn","3858HbQLrp","name","10698XjCJIs","514811lRkFPm","24093PqEWup","length","1414eLtknN","225hBOrby","compress","10567376QhBvYP","MarkerOperation","__className","561220MXZPxj","488FEPKZd"];return(Ds=function(){return t})()}function xs(t,e){const n=Ds();return(xs=function(t,e){return n[t-=287]})(t,e)}!function(t){const e=xs,n=t();for(;;)try{if(891663===-parseInt(e(294))/1*(parseInt(e(301))/2)+parseInt(e(305))/3*(parseInt(e(295))/4)+parseInt(e(300))/5+parseInt(e(303))/6*(-parseInt(e(287))/7)+-parseInt(e(290))/8+-parseInt(e(288))/9*(-parseInt(e(293))/10)+parseInt(e(304))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ds);class Rs extends Ts{[js(298)];constructor(t,e,n,r){const s=js;super(t,e,n),this[s(298)]=r+":"}[js(289)](t,e){const n=js;return!(n(291)!=e[0][n(292)]||!e[0][n(302)][n(296)](this[n(298)])||(e[0][n(302)]=e[0][n(302)][n(297)](new RegExp("^"+this[n(298)]),""),super[n(289)](t,e),0))}[js(299)](t,e){const n=js;super[n(299)](t,e);const r=t[t[n(306)]-1];r[n(302)]=this[n(298)]+r[n(302)]}}const Ns=Vs;function Vs(t,e){const n=Bs();return(Vs=function(t,e){return n[t-=462]})(t,e)}!function(t){const e=Vs,n=t();for(;;)try{if(883168===-parseInt(e(474))/1+parseInt(e(470))/2+-parseInt(e(481))/3*(parseInt(e(475))/4)+-parseInt(e(469))/5+parseInt(e(484))/6+parseInt(e(483))/7*(-parseInt(e(476))/8)+parseInt(e(467))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bs);class Ms{[Ns(480)];[Ns(465)];constructor(t,e){const n=Ns;this[n(480)]=t,this[n(465)]=e}[Ns(479)](t,e){const n=Ns;let r;for(;e[n(471)]>1&&this[n(463)](e[0],e[1]);)r?(r=this[n(468)](e[n(473)](),r),t[n(478)][n(462)](0)):(r=Qr(e[n(473)]()),t[n(478)][n(462)](this[n(480)]));return!!r&&(r=this[n(468)](e[n(473)](),r),t[n(478)][n(462)](0),t[n(466)][n(462)](this[n(472)](r)),!0)}[Ns(464)](t,e){const n=Ns,r=this[n(477)](e);for(;0==e[n(478)][0];)e[n(478)][n(473)](),t[n(462)](this[n(482)](r));t[n(462)](r)}}function Bs(){const t=["700968Dgmqyz","_decompressSingleOperation","types","compress","_id","6FVWwga","_splitCurrent","133OGBJuw","2090562kwfUXJ","push","_compareOperations","decompress","_context","buffers","38892195URinUP","_combineNext","8583195Qzwkkk","1162660BxDaFH","length","_compressSingleOperation","shift","897320zXwmvB","178372AJejUT"];return(Bs=function(){return t})()}function Js(t,e){const n=Ls();return(Js=function(t,e){return n[t-=173]})(t,e)}const Us=Js;!function(t){const e=Js,n=t();for(;;)try{if(694692===-parseInt(e(179))/1+-parseInt(e(192))/2+parseInt(e(185))/3*(parseInt(e(188))/4)+-parseInt(e(202))/5*(parseInt(e(201))/6)+-parseInt(e(189))/7+-parseInt(e(183))/8*(parseInt(e(194))/9)+parseInt(e(205))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ls);class qs extends Ms{[Us(174)](t,e){const n=Us;return e[n(178)][0][n(204)]+=t[n(178)][0][n(204)],e}[Us(203)](t){const e=Us,n=Qr(t),r=n[e(178)][0],s=t[e(178)][0],o=s[e(204)][Symbol[e(184)]]()[e(181)]()[e(209)],i=o[e(186)];return r[e(204)]=o,s[e(204)]=s[e(204)][e(182)](i),t[e(208)]=os(t[e(208)],i),n}[Us(198)](t,e){const n=Us;if(this[n(200)](t)&&this[n(200)](e)){const r=t[n(178)][0][n(204)][n(186)],s=is(os(t[n(208)],r),e[n(208)]),o=t[n(178)][0],i=e[n(178)][0];return s&&this[n(199)](o,i)}return!1}[Us(196)](t){const e=Us,n={types:[],buffers:[],baseVersion:0};return this[e(190)][e(191)](e(180))[e(207)](n,[t]),n[e(176)][0]}[Us(175)](t){const e=Us,n=[];return this[e(190)][e(191)](e(180))[e(177)](n,t),n[0]}[Us(200)](t){const e=Us;return e(180)==t[e(173)]&&1==t[e(178)][e(186)]&&t[e(178)][0][e(204)]&&!t[e(206)]&&1==Array[e(187)](t[e(178)][0][e(204)])[e(186)]}[Us(199)](t,e){const n=Us,r=Object[n(197)](t[n(195)]||{}),s=Object[n(197)](e[n(195)]||{});return r[n(186)]===s[n(186)]&&r[n(193)](r=>e[n(195)][r]&&e[n(195)][r]===t[n(195)][r])}}function Ls(){const t=["39574210myrzGv","wasUndone","compress","position","value","__className","_combineNext","_decompressSingleOperation","buffers","decompress","nodes","1331392jGzVCL","InsertOperation","next","substr","152RRkpvb","iterator","2188911yJzYWL","length","from","4OiZkgk","9067919PJkIXG","_context","_getCompressorByName","118978CqcchM","every","8406YwuYgN","attributes","_compressSingleOperation","keys","_compareOperations","_compareAttributes","_checkOperation","7729932CoPTpm","5SUSFPs","_splitCurrent","data"];return(Ls=function(){return t})()}function Gs(){const t=["_decompressSingleOperation","_combineNext","buffers","2211750uuItbt","targetPosition","11OIZfdk","131756DojMcw","root","__className","4029930PqvDcC","sourcePosition","wasUndone","3457032fQgXeF","16808028IZiPJA","howMany","_compressSingleOperation","_checkOperation","19748SBMfbm","MoveOperation","_compareOperations","_getCompressorByName","123vNVlpG","4ojWykX","compress","_context","_splitCurrent","322bjWMCd","$graveyard","decompress","34086prxcul","9QmfjKc"];return(Gs=function(){return t})()}const Ys=Hs;function Hs(t,e){const n=Gs();return(Hs=function(t,e){return n[t-=139]})(t,e)}!function(t){const e=Hs,n=t();for(;;)try{if(260200===-parseInt(e(164))/1*(parseInt(e(148))/2)+-parseInt(e(163))/3*(parseInt(e(159))/4)+-parseInt(e(145))/5+-parseInt(e(140))/6*(parseInt(e(168))/7)+parseInt(e(154))/8+parseInt(e(141))/9*(-parseInt(e(151))/10)+parseInt(e(147))/11*(parseInt(e(155))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Gs);class zs extends Ms{[Ys(143)](t,e){const n=Ys;return e[n(156)]++,e[n(152)]=Qr(t[n(152)]),e}[Ys(167)](t){const e=Ys,n=Qr(t);return t[e(156)]--,n[e(156)]=1,n[e(152)]=os(n[e(152)],t[e(156)]),n}[Ys(161)](t,e){const n=Ys;return!(!this[n(158)](t)||!this[n(158)](e))&&is(os(t[n(152)],-1),e[n(152)])&&is(t[n(146)],e[n(146)])}[Ys(157)](t){const e=Ys,n={types:[],buffers:[],baseVersion:0};return this[e(166)][e(162)](e(160))[e(165)](n,[t]),n[e(144)][0]}[Ys(142)](t){const e=Ys,n=[];return this[e(166)][e(162)](e(160))[e(139)](n,t),n[0]}[Ys(158)](t){const e=Ys;return e(160)==t[e(150)]&&e(169)==t[e(146)][e(149)]&&1==t[e(156)]&&!t[e(153)]}}function Fs(){const t=["_checkOperation","_compareOperations","1810251ujhNVr","18535sNZkKH","$graveyard","__className","compress","_context","_combineNext","root","MoveOperation","buffers","129532nRmmXk","156ofWNdh","_splitCurrent","15iWcdDt","5UQNbpL","_getCompressorByName","2152832WkpTdF","wasUndone","decompress","sourcePosition","targetPosition","_decompressSingleOperation","68408WMvApz","2243318fwJSRJ","howMany","6130qnrGQf","_compressSingleOperation","53195LYEBns"];return(Fs=function(){return t})()}const Ks=Ws;function Ws(t,e){const n=Fs();return(Ws=function(t,e){return n[t-=293]})(t,e)}!function(t){const e=Ws,n=t();for(;;)try{if(197182===-parseInt(e(320))/1*(parseInt(e(316))/2)+-parseInt(e(319))/3*(parseInt(e(298))/4)+parseInt(e(303))/5*(-parseInt(e(317))/6)+parseInt(e(299))/7+-parseInt(e(322))/8+-parseInt(e(306))/9+-parseInt(e(301))/10*(-parseInt(e(307))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Fs);class Xs extends Ms{[Ks(312)](t,e){return e[Ks(300)]++,e}[Ks(318)](t){const e=Ks,n=Qr(t);return n[e(300)]=1,t[e(300)]--,n}[Ks(305)](t,e){const n=Ks;return!(!this[n(304)](t)||!this[n(304)](e))&&is(t[n(295)],e[n(295)])&&is(t[n(296)],e[n(296)])}[Ks(302)](t){const e=Ks,n={types:[],buffers:[],baseVersion:0};return this[e(311)][e(321)](e(314))[e(310)](n,[t]),n[e(315)][0]}[Ks(297)](t){const e=Ks,n=[];return this[e(311)][e(321)](e(314))[e(294)](n,t),n[0]}[Ks(304)](t){const e=Ks;return e(314)==t[e(309)]&&e(308)==t[e(296)][e(313)]&&1==t[e(300)]&&!t[e(293)]}}const Qs=$s;function Zs(){const t=["toNone","1579881IiXiCs","user:","__className","types","_compareOperations","3882969uYUtBC","MarkerOperation","buffers","_getCompressorByName","2006680GvMXfy","_id","user:position:","push","decompress","shift","12766vQySwY","_context","4840705atxYTg","4bZyizJ","_compressSingleOperation","stickiness","start","20CyYuPd","3528MLhEXW","name","split","end","_decompressSingleOperation","oldRange","10332dTCydv","newRange","1900085ANzcda","compress","startsWith","122vjcbjE"];return(Zs=function(){return t})()}function $s(t,e){const n=Zs();return($s=function(t,e){return n[t-=128]})(t,e)}!function(t){const e=$s,n=t();for(;;)try{if(497070===-parseInt(e(135))/1*(-parseInt(e(154))/2)+parseInt(e(156))/3*(parseInt(e(138))/4)+-parseInt(e(137))/5+-parseInt(e(149))/6*(parseInt(e(143))/7)+parseInt(e(129))/8+parseInt(e(161))/9+-parseInt(e(142))/10*(-parseInt(e(151))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zs);class to extends Ms{[Qs(152)](t,e){const n=Qs;if(!this[n(160)](e[0],e[1]))return!1;const r=e[n(134)]();return r[n(148)]=null,r[n(150)]&&is(r[n(150)][n(141)],r[n(150)][n(146)])&&(r[n(150)][n(146)]=null),e[n(134)](),t[n(159)][n(132)](this[n(130)]),t[n(159)][n(132)](0),t[n(163)][n(132)](this[n(139)](r)),!0}[Qs(133)](t,e){const n=Qs,r=this[n(147)](e);r[n(150)]&&!r[n(150)][n(146)]&&(r[n(150)][n(146)]=Qr(r[n(150)][n(141)]));const s=Qr(r);s[n(150)]&&(s[n(150)][n(141)][n(140)]=n(155),s[n(150)][n(146)]=Qr(s[n(150)][n(141)])),s[n(144)]=n(131)+s[n(144)][n(145)](":")[2],e[n(159)][n(134)](),t[n(132)](r),t[n(132)](s)}[Qs(139)](t){const e=Qs,n={types:[],buffers:[],baseVersion:0};return this[e(136)][e(128)](e(162))[e(152)](n,[t]),n[e(163)][0]}[Qs(147)](t){const e=Qs,n=[];return this[e(136)][e(128)](e(162))[e(133)](n,t),n[0]}[Qs(160)](t,e){const n=Qs;return!!(t&&e&&n(162)==t[n(158)]&&n(162)==e[n(158)]&&t[n(144)][n(153)](n(157))&&e[n(144)][n(153)](n(157))&&t[n(144)]!=e[n(144)])}}const eo=ro;function no(){const t=["22bIrNUp","suggestion","7899EvnCZX","ForwardDeletingAction","CommentMarkerOperation","types","getDescriptor","comment","_compressorById","9wofNcj","baseVersion","RenameOperation","NoOperation","359544YNNdqK","6240dJAOVs","RootAttributeOperation","1670SvRayw","set","327bUHnov","_registerCompressor","MergeOperation","218022QFsAMl","AttributeOperation","91kjjmUC","72rmRhua","868488nPDhhq","forEach","361610GPaAIh","_registerOperationCompressor","85UvfsRp","SplitOperation","InsertOperation","TypingAction","_getCompressorByName","compress","no-operations-provided","MoveOperation","UserSelectionAction","decompress-compressor-not-found","DeletingAction","__className","_compressorByName","get","_protobufFactory","decompress","length","42LnCnFV","MarkerOperation","_registerActionCompressor","SuggestionMarkerOperation","RootOperation"];return(no=function(){return t})()}function ro(t,e){const n=no();return(ro=function(t,e){return n[t-=144]})(t,e)}!function(t){const e=ro,n=t();for(;;)try{if(149137===-parseInt(e(193))/1*(parseInt(e(191))/2)+parseInt(e(177))/3*(-parseInt(e(148))/4)+-parseInt(e(153))/5*(parseInt(e(189))/6)+-parseInt(e(170))/7*(-parseInt(e(188))/8)+parseInt(e(184))/9*(-parseInt(e(151))/10)+parseInt(e(175))/11*(parseInt(e(149))/12)+-parseInt(e(147))/13*(-parseInt(e(145))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(no);class so{[eo(183)];[eo(165)];[eo(167)];constructor(){const t=eo;this[t(183)]=new Map,this[t(165)]=new Map,this[t(167)]=new wr;const e=this[t(167)][t(181)](t(171));this[t(194)](1,t(187),new Es(1,t(187),void 0)),this[t(152)](10,t(146),bs),this[t(152)](11,t(155),vs),this[t(152)](12,t(171),Ts),this[t(152)](13,t(144),fs),this[t(152)](14,t(160),fs),this[t(152)](15,t(186),fs),this[t(152)](16,t(190),bs),this[t(152)](17,t(154),fs),this[t(194)](18,t(179),new Rs(18,t(171),e,t(182))),this[t(194)](19,t(173),new Rs(19,t(171),e,t(176))),this[t(152)](20,t(174),fs),this[t(172)](100,t(156),qs),this[t(172)](101,t(163),zs),this[t(172)](102,t(178),Xs),this[t(172)](103,t(161),to)}[eo(158)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(159),this);const r={types:[],buffers:[],baseVersion:t[0][e(185)]};for(;t[e(169)];)this[e(157)](e(161))[e(158)](r,t)||this[e(157)](e(156))[e(158)](r,t)||this[e(157)](e(163))[e(158)](r,t)||this[e(157)](e(178))[e(158)](r,t)||this[e(157)](e(179))[e(158)](r,t)||this[e(157)](e(173))[e(158)](r,t)||this[e(157)](t[0][e(164)])[e(158)](r,t);return r}[eo(168)](t){const e=eo,r=[];for(;t[e(180)][e(169)];){const s=this[e(183)][e(166)](t[e(180)][0]);if(!s)throw new n.CKEditorError(e(162),this,{type:t[e(180)][0]});s[e(168)](r,t)}return r[e(150)]((n,r)=>n[e(185)]=t[e(185)]+r),r}[eo(157)](t){const e=eo;return this[e(165)][e(166)](t)}[eo(152)](t,e,n){const r=eo,s=new n(t,e,this[r(167)][r(181)](e));this[r(194)](t,e,s)}[eo(172)](t,e,n){const r=eo,s=new n(t,this);this[r(194)](t,e,s)}[eo(194)](t,e,n){const r=eo;this[r(183)][r(192)](t,n),this[r(165)][r(192)](e,n)}}function oo(){var t=["535930jWcAlS","3236964gAEnpU","2721715jGboDB","4890qxawiL","289615QcoEOh","816oJnqGK","2023IGcVco","2680JgNShW","657496QqilnI","261HGKJhu"];return(oo=function(){return t})()}function io(t,e){var n=oo();return(io=function(t,e){return n[t-=386]})(t,e)}!function(t){for(var e=io,n=t();;)try{if(333504===-parseInt(e(393))/1+parseInt(e(394))/2*(-parseInt(e(392))/3)+-parseInt(e(387))/4+-parseInt(e(391))/5+parseInt(e(390))/6+parseInt(e(395))/7*(-parseInt(e(386))/8)+-parseInt(e(388))/9*(-parseInt(e(389))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(oo);const ao=co;function co(t,e){const n=uo();return(co=function(t,e){return n[t-=340]})(t,e)}function uo(){const t=["_ignoredOperations","realtimecollaborationclient-init-connection-failed","_pendingAction","_refreshUserSelectionMarkers","_crash","9820ggTqbx","Permissions","affectsData","startsWith","cloudDocumentVersion","disableReadOnlyMode","selection","rtc-offline","unregister","suppressErrorInCollaboration","_authorId","_lastSyncedOperationId","_updateServerHistory","_isInit","from","baseVersion","lastSyncVersion","_initSessionsHandling","addToReconnectionStack","_shouldSendSelectionUpdate","_decompressOperations","11153NhJPsu","_getOperationsFromInitData","getDocumentDetails","root","filter","requires","error","addRootAttribute","fromJSON","listenTo","realtimecollaborationclient-init-service-internal-error","affectedSelectable","state","map","_loadRoot","Synchronization issue","channelSessions","collaboration.channelId","locale","_connectService","Notification","position","stop","document","directChange","_service","66esScvv","_isConnected","_isAttached","off","sessionCreatedAt","createUserMarkerOperations","realtimecollaborationclient-init-document-already-initialized","change:_isEditingAllowed","wasUndone","_clearPendingAction","bind","isEnabled","wereChangesApplied","define","2163210tSwSOQ","realtimecollaborationclient-init-session-connection-error","newRange","decompress","disconnect","reconnection: flushed session","getOperationAuthor","slice","config","markers","4788fIYRHy","editing","getConnectedSessions","loadRoot","2446499HndPjm","_knownOperations","attributes","toJSON","_fetchMissingUsers","CollaborativeEditingService","realtimecollaborationclient","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","size","data","enqueueChange","RealTimeCollaborationClient","cloud-services-internal-error: Request timeout.","version","batch","getUser","catch","_compressor","serverHistory","realtimecollaborationclient-init-service-incorrect-server-operation","realtimecollaborationclient-handleserverresponse","set","change:range","_lastServerVersion","insert","getRoot","init","offset","_hasSynchronizationProblem","targetPosition","_isPendingUpdate","_bufferedOperations","_handleSendingSelectionMarkers","currentDocumentSession","initData","isPremiumPlugin","connected","get","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","register","cloudServices.bundleVersion","finally","createRoot","reset","_sendBufferedOperations","collaboration-missing-channelid","_hasSelectionChanged","_handleReceivedOperations","_channelId","createPositionFromPath","_disconnectService","start","_isEditingAllowed","PENDING_ACTION_SENDING_DATA","model","applyOperation","_disconnectionOperations","_sendBufferedOperationsDelayId","createPositionAt","_handleExternalOperations","apply","_handleReconnectionResponse","CommentsOnly","getMany","remove","view","_knownRootNames","rootName","lastOperationId","return","editor","move","mySessionId","message","$root","_initThrowingOnDataSet","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","addOperation","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","showWarning","history","14MUlDYN","createdAt","addUser","1526370IxlhaS","cloud-services-internal-error: Collaborative Editing Service is not connected.","rootsAttributes","operationsReceived","_sendBufferedOperationsDelayed","addRoot","_handleInitialConnectionData","_document","_applyOperationsSet","isReadOnly","then","_isLoaded","lastDocumentSession","code","fire","_currentBufferDelay","494152RHprAS","_bufferRootLoad","_waitUntilSynced","clone","destroy","realtimecollaborationclient-error","reconnect","93HuasZJ","cs:removeUser","stopListening","_baseBufferDelay","_getAffectedRoot","lastOperationAcceptedAt","parse","cloud-services-internal-error: Not connected.","404","high","_operationToId","marker","realtimecollaborationclient-init-non-existent-root","setPermissions","includes","permissions","end","add","getIdOfTheLastOperation","has","23748BZqLXT","sessionAdd:","_isDisconnection","keys","pluginName","realtimecollaborationclient-sendbufferedoperations","connect","_handleReconnectionError","isUndoneOperation","type","isDocumentOperation","metadata","change:_isPendingUpdate","userId","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","__className","_handleServerResponse","isOfficialPlugin","rtc-destroyed","connection","forEach","_compressOperations","roots","differ","409","InsertOperation","real-time-collaboration","setIdForTheLastOperation","removeFromReconnectionStack","_saveOperationInBuffer","path","change:hasDomSelection","_addKnownRoot","_setPendingAction","length","compress","_offset","ready","getOperations","entries","push","disconnected","plugins","sessionId","document:write","sendOperations","_setUpDataInit","_operationIdentifier","_shouldSendUpdate","collaboration","createRange","enableReadOnlyMode","multi-root-editor-root-attributes-no-root","_connectAfterSessionHasBeenFlushed","string","round"];return(uo=function(){return t})()}!function(t){const e=co,n=t();for(;;)try{if(309840===parseInt(e(486))/1*(parseInt(e(512))/2)+-parseInt(e(384))/3*(-parseInt(e(404))/4)+-parseInt(e(361))/5+-parseInt(e(526))/6+parseInt(e(358))/7*(parseInt(e(377))/8)+-parseInt(e(536))/9*(-parseInt(e(465))/10)+-parseInt(e(540))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(uo);let lo=1;class ho extends e.Plugin{static[ao(545)]=(()=>On)();[ao(440)];[ao(447)];[ao(558)];[ao(588)];[ao(511)];[ao(368)];[ao(557)];[ao(571)];[ao(541)];[ao(343)];[ao(462)];[ao(586)];[ao(597)];[ao(387)];[ao(376)];[ao(476)];[ao(596)];[ao(451)];static get[ao(491)](){return[Hn,Qn,pr,e.PendingActions,Fn.Users,r.Notification]}static get[ao(408)](){return ao(551)}static get[ao(421)](){return!0}static get[ao(575)](){return!0}get[ao(469)](){const t=ao;return this[t(563)]+this[t(440)]}get[ao(563)](){const t=ao;return this[t(558)][t(553)]-this[t(440)]}get[ao(481)](){const t=ao,e=this[t(558)][t(442)]();for(let n=e[t(438)]-1;n>=0;n--){const r=e[n];if(!this[t(596)][t(403)](r))return r[t(480)]+1-this[t(440)]}return 0}constructor(t){const e=ao;if(super(t),this[e(440)]=0,this[e(447)]=null,this[e(558)]=new s.History,this[e(347)][e(534)][e(525)](e(453),{}),this[e(588)]=this[e(347)][e(534)][e(577)](e(503)),!this[e(588)])throw new n.CKEditorError(e(585),this);const r=t[e(534)][e(577)](e(580))||n.version;this[e(511)]=new(ho[e(545)])(r,this[e(588)]),this[e(368)]=this[e(347)][e(594)][e(509)],this[e(557)]=new so,this[e(571)]=[],this[e(541)]=new WeakSet,this[e(343)]=new Set,this[e(561)](e(570),!1),this[e(561)](e(568),!1),this[e(462)]=null,this[e(586)]=!1,this[e(597)]=null,this[e(387)]=300,this[e(376)]=this[e(387)],this[e(476)]=null,this[e(596)]=new WeakSet,this[e(451)]=new mo(this[e(596)])}[ao(566)](){const t=ao,e=this[t(347)],n=e[t(446)][t(577)](Fn.Users),r=e[t(446)][t(577)](Hn);this[t(495)](n,t(532),(e,r)=>{const s=t,o=r[0];o[s(475)]&&(e[s(346)]=n[s(555)](o[s(475)]),e[s(508)]()),null===o[s(475)]&&(e[s(346)]=null,e[s(508)]())},{priority:t(393)}),this[t(495)](e[t(594)][t(509)][t(471)],t(562),(e,n)=>{const r=t;n[r(510)]&&this[r(463)]()}),this[t(495)](e[t(537)][t(342)],t(435),()=>{this[t(463)]()}),this[t(352)](),e[t(594)].on(t(595),(e,n)=>{const r=t,s=n[0];s[r(414)]&&(this[r(433)](s),this[r(452)]()&&this[r(365)]())}),this[t(450)](),this[t(522)](t(592)).to(r,t(498),this,t(568),(e,n)=>t(576)===e&&!n),this.on(t(519),()=>{const n=t;this[n(592)]?e[n(470)](n(472)):e[n(455)](n(472))}),this[t(592)]?e[t(470)](t(472)):e[t(455)](t(472)),this[t(561)](t(513),!1)}async[ao(383)](){const t=ao,e=this[t(347)][t(446)][t(577)](Qn),n=this[t(347)][t(446)][t(577)](Hn);try{this[t(570)]=!0,e[t(473)](this[t(588)]);const r=await this[t(511)][t(383)](n[t(423)],this[t(481)]);await this[t(601)](r)&&(this[t(570)]=!1,this[t(521)]());const s=await this[t(511)][t(538)]();e[t(579)](this[t(588)],s),this[t(572)](),this[t(513)]=!0}catch(e){if(function(e){const n=t;return n(392)===e[n(374)]}(e)&&this[t(447)])await this[t(457)]();else if(function(e){const n=t;return n(428)===e[n(374)]}(e)){const e=mr(this[t(347)][t(504)],t(547));this[t(411)](e)}else{if(!(e instanceof po))throw e;this[t(411)]()}}}[ao(381)](){const t=ao,e=this[t(347)][t(446)][t(577)](Hn),n=this[t(347)][t(446)][t(577)](Qn);this[t(347)][t(455)](t(422)),n[t(502)][t(403)](this[t(588)])&&n[t(473)](this[t(588)]),e[t(432)](this),this[t(590)](),super[t(381)]()}async[ao(601)](t){const e=ao;if(this[e(447)]!==t[e(447)]&&this[e(476)]!==t[e(345)])throw new po;return this[e(447)]=t[e(447)],this[e(420)]([],{...t,wereChangesApplied:!1,data:t[e(549)]},e(383))}async[ao(505)](t,e=!1){const n=ao,{connection:r}=this[n(347)][n(446)][n(577)](Hn);ho[n(545)][n(538)](r,this[n(588)])[n(371)](t=>this[n(482)](t))[n(556)](t=>{const e=n;this[e(464)](e(527),t)}),this[n(495)](this[n(511)],n(364),this[n(587)][n(522)](this)),this[n(495)](this[n(511)],n(492),(t,e)=>{const r=n;this[r(464)](r(496),e)}),this[n(495)](this[n(511)],n(445),()=>{this[n(513)]=!1});const s=this[n(451)][n(402)](t);this[n(570)]=!0;const o=await this[n(511)][n(410)](r,this[n(425)](t),s);if(this[n(447)]=o[n(447)],e){if(!o[n(524)])return void this[n(411)]();this[n(570)]=!1,this[n(521)](),this[n(558)][n(583)](),this[n(440)]=o[n(567)],this[n(558)][n(553)]=this[n(440)],await this[n(420)](t,o,n(531))}else await this[n(367)](o,t);this[n(572)](),this[n(513)]=!0}[ao(572)](){const t=ao,e=this[t(347)][t(446)][t(577)](Qn),n=this[t(347)][t(446)][t(577)](pr),r=e[t(502)][t(577)](this[t(588)]);r&&r[t(438)]>1?n[t(517)]():this[t(495)](e,t(405)+this[t(588)],()=>{const r=t;2===e[r(502)][r(577)](this[r(588)])[r(438)]&&n[r(517)]()})}async[ao(587)](t,e,n,r){const s=ao;if(!this[s(570)]&&this[s(368)][s(553)]==e){const t=this[s(485)](n,r);await this[s(544)](t),this[s(599)](t,e,n[s(345)])||this[s(464)](s(559))}}async[ao(457)](){const t=ao;this[t(590)]();const{locale:e}=this[t(347)];let n;try{n=await this[t(511)][t(488)]()}catch{const n=mr(e,t(353));return void this[t(411)](n)}const r=n[t(573)]||n[t(373)];if(this[t(476)]!==r[t(345)]){const n=mr(e,t(418));return void this[t(411)](n)}await this[t(505)](this[t(347)][t(594)][t(509)][t(357)][t(442)](),!0)}[ao(590)](){const t=ao;this[t(511)][t(530)](),this[t(571)]=[],clearTimeout(this[t(597)]),this[t(386)](this[t(511)])}[ao(482)](t){const e=ao,n=this[e(347)][e(446)][e(577)](Qn);this[e(495)](n,e(405)+this[e(588)],(t,{session:r})=>{const s=e;if(r.id===n[s(349)]){t[s(515)]();const e=this[s(347)][s(446)][s(403)](s(602))&&this[s(347)][s(446)][s(577)](s(602));let n=r[s(399)];e&&e[s(523)]&&(n=n[s(490)](t=>s(448)!==t)),this[s(347)][s(446)][s(577)](s(466))[s(397)](n,this[s(588)])}}),n[e(579)](this[e(588)],t)}[ao(352)](){const t=ao,e=this[t(347)][t(549)][t(561)];this[t(347)][t(549)][t(561)]=(...r)=>{const s=t;if(!r[r[s(438)]-1][s(474)])throw new n.CKEditorError(s(355),this);e[s(600)](this[s(347)][s(549)],r)}}[ao(450)](){const t=ao;this[t(347)][t(549)].on(t(566),(e,[r])=>{const o=t;if(this[o(368)][o(553)])throw new n.CKEditorError(o(518),this);e[o(508)](),this[o(437)]();const i=this[o(347)][o(534)][o(577)](o(363)),a=this[o(487)](r,i);0==a[o(438)]&&a[o(444)](new s.NoOperation(0)),e[o(346)]=this[o(505)](a)[o(371)](()=>{const t=o;this[t(347)][t(446)][t(577)](Hn)[t(483)](this),this[t(347)][t(549)][t(375)](t(441))})[o(556)](t=>this[o(464)](o(461),t))[o(581)](()=>this[o(521)]())},{priority:t(393)}),this[t(347)].on(t(539),async(e,[n,r])=>{const s=t;e[s(508)]();const o=this[s(347)][s(594)][s(509)][s(565)](n);if(!this[s(343)][s(403)](n)){const t=r&&r[s(549)]?r[s(549)]:"",e=r&&r[s(542)]?r[s(542)]:{};await this[s(500)](n,t,e)}this[s(347)][s(594)][s(550)]({isUndoable:!1},()=>{const t=s;o[t(372)]=!0,this[t(347)][t(594)][t(509)][t(427)][t(378)](o)})},{priority:t(393)})}async[ao(544)](t){const e=ao,n=this[e(347)][e(446)][e(577)](Fn.Users),{connection:r}=this[e(347)][e(446)][e(577)](Hn),s=new Set;for(const r of t){const t=r[e(475)];t&&!n[e(555)](t)&&s[e(401)](t)}if(0===s[e(548)])return;const o=await b[e(340)](r,Array[e(479)](s));for(const t of o)n[e(555)](t.id)||n[e(360)](t)}[ao(487)](t,e={}){const r=ao,o=this[r(347)][r(594)],i=[];let a=0;const c=r(458)==typeof t?{main:t}:t;for(const t of Object[r(407)](c)){if(!this[r(368)][r(426)][r(403)](t))throw new n.CKEditorError(r(396),this);const e=this[r(347)][r(549)][r(390)](c[t]),u=this[r(368)][r(565)](t),d=new s.InsertOperation(o[r(598)](u,0),e,a++);i[r(444)](d);for(const[t,n]of e[r(535)]){const e=o[r(454)](o[r(589)](u,n[r(591)][r(434)][r(533)]()),o[r(589)](u,n[r(400)][r(434)][r(533)]())),c=new s.MarkerOperation(t,null,e,o[r(535)],!0,a++);i[r(444)](c)}}if(e)for(const[t,c]of Object[r(443)](e)){const e=o[r(509)][r(565)](t);if(!e)throw new n.CKEditorError(r(456),null);for(const[t,n]of Object[r(443)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(444)](o)}}return i}async[ao(500)](t,e,n){const r=ao;this[r(487)]({[t]:e},{[t]:n})[r(424)]((t,e)=>{const n=r;t[n(480)]=this[n(368)][n(553)]+e,t[n(478)]=!0,this[n(433)](t)}),this[r(365)](),await this[r(379)]()}async[ao(367)](t,e){const n=ao;let r;this[n(440)]=t[n(567)];const s=t[n(524)]&&!t[n(574)],o=s?0:t[n(549)][n(480)];if(e[n(424)](e=>{const r=n;e[r(478)]=!0,e[r(359)]=t[r(516)],e[r(475)]=null}),s)r=e,this[n(369)](r,s);else{if(t[n(574)]){const e=this[n(487)](t[n(574)]);this[n(368)][n(357)][n(553)]=-e[n(438)],e[n(424)](r=>{const s=n;r[s(480)]-=e[s(438)],r[s(359)]=t[s(516)],r[s(478)]=!0,r[s(475)]=null}),this[n(369)](e,!0),this[n(558)][n(553)]=-e[n(438)]+this[n(440)],this[n(477)](e)}this[n(368)][n(357)][n(553)]=o,r=this[n(485)](t[n(549)],t[n(415)]),await this[n(544)](r),this[n(369)](r,s)}t[n(345)]&&(this[n(451)][n(431)](r,t[n(345)]),this[n(476)]=t[n(345)]),this[n(558)][n(553)]=o+this[n(440)],this[n(477)](r),e[n(490)](t=>{const e=n,r=this[e(388)](t);return r&&!this[e(343)][e(403)](r)})[n(424)]((t,e)=>{const r=n;t[r(480)]=this[r(368)][r(553)]+e,this[r(433)](t)}),this[n(452)]()?(this[n(376)]=0,this[n(365)](!0),await this[n(379)]()):(this[n(570)]=!1,this[n(521)]())}[ao(464)](t,e){const r=ao,s=e&&e[r(350)];if(s&&s[r(468)](r(546)))throw e;const o=this[r(347)][r(446)][r(577)](Hn);throw this[r(570)]=!0,o[r(530)](),this[r(347)][r(455)](r(382)),new n.CKEditorError(t,this[r(347)],s?{originalError:s}:void 0)}[ao(433)](t){const e=ao;this[e(541)][e(403)](t)||(this[e(541)][e(401)](t),this[e(571)][e(444)](t),this[e(462)]||e(395)==t[e(413)]&&!t[e(467)]||this[e(437)]())}[ao(365)](t=!1){const e=ao;!t&&this[e(570)]||(this[e(570)]=!0,clearTimeout(this[e(597)]),this[e(597)]=setTimeout(()=>{const t=e;this[t(584)]()[t(371)](e=>{const n=t;e&&(this[n(521)](),this[n(570)]=!1)})[t(556)](e=>{const n=t;this[n(521)](),this[n(570)]=!1,function(t){const e=n;return t[e(350)][e(468)](e(391))||t[e(350)][e(468)](e(362))||t[e(350)][e(468)](e(552))}(e)||this[n(464)](e[n(350)],e)})},this[e(376)]))}[ao(379)](){return new Promise(t=>{const e=co;this.on(e(416),()=>{t()})})}async[ao(584)](){const t=ao,e=this[t(347)][t(446)][t(577)](pr);if(this[t(484)]()&&(e[t(517)](),this[t(586)]=!1),!this[t(452)]())return!0;const n=[...this[t(571)]];for(const e of n)e[t(520)]=this[t(368)][t(357)][t(412)](e);const r=this[t(451)][t(402)](n),s=lo++,o=this[t(425)](n),i=await this[t(511)][t(449)](o,o[t(480)],r);try{return await this[t(420)](n,i,s)}catch(e){return this[t(464)](t(409),e)}}async[ao(420)](t,e,n){const r=ao;if(r(492)in e)throw e[r(492)];let s=!1;if(e[r(524)]){e[r(345)]&&(this[r(476)]=e[r(345)]),this[r(571)]=this[r(571)][r(490)](e=>!t[r(398)](e));for(const n of t)n[r(359)]=r(389)in e&&e[r(389)]||void 0;fo(t,e[r(553)]-t[r(438)]),this[r(477)](t);const n=t[r(490)](t=>{const e=r;if(!t[e(478)])return!1;const n=this[e(388)](t);return n&&!this[e(343)][e(403)](n)});fo(n,this[r(368)][r(553)]),this[r(369)](n),s=!0,this[r(376)]=this[r(387)]}else{const t=this[r(485)](e[r(549)],e[r(415)])[r(490)](t=>t[r(480)]>=this[r(563)]);t[r(424)](t=>this[r(436)](t)),this[r(571)]=this[r(571)][r(490)](t=>!t[r(478)]||!this[r(343)][r(403)](this[r(388)](t))),this[r(571)][r(438)]&&fo(this[r(571)],this[r(571)][0][r(480)]),await this[r(544)](t),s=this[r(599)](t,e[r(553)],e[r(345)]),this[r(376)]=Math[r(459)](this[r(376)]/2)}return s?!this[r(452)]()||(this[r(365)](!0),!1):this[r(464)](r(560))}[ao(599)](t,e,n){const r=ao;try{const o={document:this[r(368)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(571)],o);fo(i,this[r(368)][r(553)]),fo(a,e);for(const t of i){const e=c[r(577)](t);t[r(475)]=e?e[r(475)]:null}n&&(this[r(451)][r(431)](t,n),this[r(476)]=n),this[r(571)]=[...a],this[r(369)](i),this[r(477)](t)}catch(t){return console[r(492)](t),!1}return!0}[ao(369)](t,e=!1){const n=ao;this[n(347)][n(594)][n(550)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(541)][r(401)](n),this[r(436)](n),e[r(554)][r(354)](n),this[r(347)][r(594)][r(595)](n)})}[ao(436)](t){const e=ao,n=this[e(388)](t);n&&this[e(343)][e(401)](n)}[ao(388)](t){const e=ao;let n,r;switch(t[e(413)]){case e(564):n=t[e(507)][e(489)];break;case e(395):if(r=t[e(528)],!r)return null;n=r[e(489)];break;case e(493):n=t[e(489)];break;case e(366):n=t[e(497)];break;case e(348):n=t[e(569)][e(489)];break;default:return null}return n[e(344)]}[ao(477)](t){const e=ao;t[e(424)](t=>{const n=e,r=t[n(380)]();r[n(475)]=t[n(475)],r[n(478)]=!!t[n(478)],r[n(359)]=t[n(359)],r[n(480)]+=this[n(440)],t[n(406)]&&this[n(596)][n(401)](r),this[n(558)][n(354)](r)})}[ao(411)](t){const e=ao,n=this[e(347)][e(446)][e(577)](e(506)),r=this[e(347)][e(504)];t||(t=mr(r,e(578))),n[e(356)](t,{title:mr(r,e(501)),namespace:e(430)}),this[e(568)]=!0,clearTimeout(this[e(597)]),this[e(571)]=[],this[e(347)][e(446)][e(577)](Hn)[e(530)]()}[ao(437)](){const t=ao;this[t(462)]||(this[t(462)]=this[t(347)][t(446)][t(577)](e.PendingActions)[t(401)](mr(this[t(347)][t(504)],t(593))))}[ao(521)](){const t=ao;this[t(462)]&&(this[t(347)][t(446)][t(577)](e.PendingActions)[t(341)](this[t(462)]),this[t(462)]=null)}[ao(425)](t){const e=ao,n=t[e(499)](t=>t[e(543)]());return this[e(557)][e(439)](n)}[ao(485)](t,e){const n=ao;return this[n(557)][n(529)](t)[n(499)]((t,r)=>{const o=n,i=o(566)==e[r][o(413)];if(o(429)==t[o(419)]){const e=t[o(507)][o(489)];!this[o(368)][o(565)](e)&&(this[o(368)][o(582)](o(351),e)[o(514)]=!1)}const a=s.OperationFactory[o(494)](t,this[o(368)]);return a[o(520)]=t[o(520)],a[o(478)]=i,a[o(475)]=i?null:e[r][o(417)],a[o(406)]=o(385)===e[r][o(413)],a[o(359)]=e[r][o(359)],a})}[ao(463)](){const t=ao;this[t(586)]=!0,this[t(484)]()?this[t(365)]():this[t(586)]=!1}[ao(484)](){const t=ao,e=this[t(347)][t(446)][t(577)](Qn)[t(502)][t(577)](this[t(588)]);return!this[t(347)][t(370)]&&!!e&&e[t(438)]>1&&this[t(586)]}[ao(452)](){const t=ao;return this[t(571)][t(438)]>0||this[t(484)]()}}class po extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(480)]=e++}class mo{[ao(460)];[ao(394)];constructor(t){const e=ao;this[e(460)]=t,this[e(394)]=new WeakMap}[ao(402)](t){const e=ao;let r=t[e(438)];for(;r--;){const s=t[r];if(!this[e(460)][e(403)](s)){if(!this[e(394)][e(403)](s)){const t=(0,n.uid)()[e(533)](1,18);this[e(394)][e(561)](s,t)}return this[e(394)][e(577)](s)}}}[ao(431)](t,e){const n=ao;if(!e)return;let r=t[n(438)];for(;r--;){const s=t[r];this[n(460)][n(403)](s)||this[n(394)][n(561)](s,e)}}}function go(){var t=["11967424aiIhdg","5855928GYZOBX","1PjLoTJ","1698324ScooNU","RealTimeCollaborativeEditing","pluginName","isOfficialPlugin","1810696BJIRDf","isPremiumPlugin","1555424wmeAdu","6871837BfKJYx","requires","1194590dsQiAC"];return(go=function(){return t})()}var yo=bo;function bo(t,e){var n=go();return(bo=function(t,e){return n[t-=428]})(t,e)}!function(t){for(var e=bo,n=t();;)try{if(587029===-parseInt(e(440))/1*(parseInt(e(434))/2)+parseInt(e(428))/3+-parseInt(e(432))/4+-parseInt(e(437))/5+parseInt(e(439))/6+-parseInt(e(435))/7+parseInt(e(438))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(go);class Io extends e.Plugin{static get[yo(436)](){return[ho]}static get[yo(430)](){return yo(429)}static get[yo(431)](){return!0}static get[yo(433)](){return!0}}const Oo=wo;function vo(){const t=["220920cJGRsh","destroy","3242922BrbCRu","adapter","CloudServicesCommentsAdapter","commentRemoved","getCommentThread","cloudservicescommentsadapter-connect-already-connected","resolveCommentThread","CommentsService","_fetchMissingUsersForThreads","_connectService","init","comments","has","reconnect","commentThreadReopened","resolve","cloud-services-internal-error: Comments Service is not connected.","getComment","commentThreadRemoved","cloud-services-internal-error: Not connected.","cloudservicescommentsadapter-service-not-exist","setPermissions","commentThreadResolved","permissions","plugins","update","context","Permissions","commentThreadUpdated","sessionAdd:","getUser","404","add","message","423gaAiGA","CommentsRepository","disconnect","removeCommentThread","reopen","collaboration.channelId","cloudservicescommentsadapter-disconnect-not-exist","content","get","catch","22275sMtZvT","keys","resolvedBy","_terminateService","isOfficialPlugin","getCommentThreads","7479262XvexEu","addUser","isPremiumPlugin","authorId","commentId","885340CmQbcJ","userId","assign","cloud-services-internal-error: Request timeout.","updateCommentThread","getConnectedSessions","addToReconnectionStack","register","612ktjZBb","delete","remove","mySessionId","622512AsvgkX","resolvedAt","off","_services","493032AAWAaT","pluginName","commentThreadId","addComment","code","3CfNlLj","commentUpdated","addCommentThread","getMany","set","createdAt","startsWith","deletedAt","map","listenTo","_setUpService","reopenCommentThread","unregister","connect","updateComment","attributes","_getService","commentThreadAdded","from","config","requires","removeComment","size","commentAdded"];return(vo=function(){return t})()}function wo(t,e){const n=vo();return(wo=function(t,e){return n[t-=293]})(t,e)}!function(t){const e=wo,n=t();for(;;)try{if(549501===parseInt(e(337))/1*(-parseInt(e(332))/2)+-parseInt(e(363))/3+parseInt(e(324))/4*(-parseInt(e(305))/5)+parseInt(e(361))/6+-parseInt(e(311))/7+-parseInt(e(328))/8+parseInt(e(295))/9*(parseInt(e(316))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vo);class So extends e.ContextPlugin{static[Oo(370)]=(()=>Ln)();[Oo(331)];static get[Oo(357)](){return[Hn,Oo(296),Qn,Fn.Users]}static get[Oo(333)](){return Oo(365)}static get[Oo(309)](){return!0}static get[Oo(313)](){return!0}constructor(t){const e=Oo;super(t),this[e(331)]=new Map}async[Oo(373)](){const t=Oo,n=this[t(389)],r=n[t(387)][t(303)](t(296));if(n[t(387)][t(303)](Hn)[t(322)](this),r[t(364)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(353)](e)[c(339)]({commentThreadId:n,comments:r[c(345)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(315)],userId:t[r(314)],content:t[r(302)],documentId:e,createdAt:t[r(342)],attributes:t[r(352)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(304)](Ao);return{threadId:u[c(334)],comments:u[c(374)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(353)](e)[r(367)](n)[r(304)](ko)[r(304)](Ao);return s?s[r(344)]?null:(await this[r(371)]([s]),{threadId:s[r(334)],comments:s[r(374)][r(345)](To),context:s[r(389)],resolvedAt:s[r(329)],resolvedBy:s[r(307)],attributes:s[r(352)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(353)](e)[t(320)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(304)](ko)[t(304)](Ao),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(353)](e)[r(369)](n)[r(304)](ko)[r(304)](Ao);return{threadId:s[r(334)],resolvedAt:s[r(329)],resolvedBy:s[r(307)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(353)](e)[t(348)](n)[t(304)](ko)[t(304)](Ao),removeCommentThread:({channelId:e,threadId:n})=>this[t(353)](e)[t(298)](n)[t(304)](ko)[t(304)](Ao),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(353)](e)[t(335)](n,r,s,o)[t(304)](Ao),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(353)](e)[t(351)](n,r,s,o)[t(304)](ko)[t(304)](Ao),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(353)](e)[t(358)](n,r)[t(304)](ko)[t(304)](Ao)},n instanceof e.Context){const e=n[t(356)][t(303)](t(300)),r=n[t(387)][t(303)](Qn);await this[t(347)](e);const s=await this[t(331)][t(303)](e)[t(321)]();this[t(346)](r,t(392)+e,(n,{session:s})=>{const o=t;s.id===r[o(327)]&&(n[o(330)](),this[o(389)][o(387)][o(303)](o(390))[o(384)](s[o(386)],e))}),r[t(323)](e,s)}}async[Oo(347)](t){const e=Oo;if(this[e(331)][e(375)](t))throw new n.CKEditorError(e(368),null,{channelId:t});const r=this[e(389)][e(387)][e(303)](e(296)),s=new(So[e(370)])(t);this[e(331)][e(341)](t,s),this[e(346)](s,e(354),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(367)](o)||r[s(339)]({threadId:o,channelId:i,comments:l?l[s(345)](To):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(346)](s,e(391),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(367)](n)&&r[c(320)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(346)](s,e(385),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(367)](n);a&&a[i(378)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(346)](s,e(377),(t,{commentThreadId:n})=>{const s=e,o=r[s(367)](n);o&&o[s(299)]({isFromAdapter:!0})}),this[e(346)](s,e(381),(t,{commentThreadId:n})=>{const s=e,o=r[s(367)](n);o&&o[s(326)]({isFromAdapter:!0})}),this[e(346)](s,e(360),(t,n)=>{const s=e,o=n[s(334)],i=r[s(367)](o);i&&i[s(335)]({...To(n),isFromAdapter:!0})}),this[e(346)](s,e(338),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(367)](n);if(c){const t=c[a(380)](s);t&&t[a(388)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(346)](s,e(366),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(367)](n);if(i){const t=i[o(380)](s);t&&t[o(326)]({isFromAdapter:!0})}}),await this[e(372)](t)}[Oo(362)](){const t=Oo;if(this[t(389)]instanceof e.Context){const e=this[t(389)][t(356)][t(303)](t(300));this[t(308)](e)}}[Oo(308)](t){const e=Oo;if(!this[e(331)][e(375)](t))throw new n.CKEditorError(e(301),null,{channelId:t});this[e(353)](t)[e(297)](),this[e(331)][e(325)](t)}async[Oo(376)](){const t=Oo;for(const e of this[t(331)][t(306)]())await this[t(372)](e);if(this[t(389)]instanceof e.Context){const e=this[t(389)][t(356)][t(303)](t(300)),n=this[t(389)][t(387)][t(303)](Qn);n[t(349)](e);const r=await this[t(331)][t(303)](e)[t(321)]();n[t(323)](e,r)}}async[Oo(372)](t){const e=Oo,{connection:n}=this[e(389)][e(387)][e(303)](Hn),r=this[e(389)][e(387)][e(303)](e(296)),s=this[e(331)][e(303)](t),o=await s[e(350)](n);await this[e(371)](o);const i=new Set(Array[e(355)](r[e(310)]({channelId:t}),t=>t.id));for(const t of o)t[e(344)]||i[e(325)](t[e(334)]);for(const t of i)r[e(367)](t)[e(326)]({isFromAdapter:!0});for(const n of o){let s=r[e(367)](n[e(334)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(339)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const h=new Set(Array[e(355)](s[e(374)],t=>t.id));for(const t of n[e(374)])h[e(325)](t[e(315)]);for(const t of h)s[e(380)](t)[e(326)]({isFromAdapter:!0});for(const t of n[e(374)]){const n=s[e(380)](t[e(315)]);n?n[e(302)]!==t[e(302)]&&n[e(388)]({content:t[e(302)],isFromAdapter:!0}):s[e(335)](Object[e(318)](To(t),{isFromAdapter:!0}))}}}[Oo(353)](t){const e=Oo;if(!this[e(331)][e(375)](t))throw new n.CKEditorError(e(383),null,{channelId:t});return this[e(331)][e(303)](t)}async[Oo(371)](t){const e=Oo,n=this[e(389)][e(387)][e(303)](Fn.Users),{connection:r}=this[e(389)][e(387)][e(303)](Hn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(393)](r)&&s[e(293)](r);for(const{userId:t}of o)n[e(393)](t)||s[e(293)](t)}if(0===s[e(359)])return;const o=await b[e(340)](r,Array[e(355)](s));for(const t of o)n[e(393)](t.id)||n[e(312)](t)}}async function ko(t){const e=Oo;if(e(394)!==t[e(336)])throw t}function Ao(t){const e=Oo;if((n=t)[e(294)][e(343)](e(379))||n[e(294)][e(343)](e(382))||n[e(294)][e(343)](e(319)))return new Promise(()=>{});var n;throw t}function To(t){const e=Oo;return{threadId:t[e(334)],commentId:t[e(315)],content:t[e(302)],createdAt:t[e(342)],authorId:t[e(317)],attributes:t[e(352)]||{}}}const _o=Co;function Co(t,e){const n=Eo();return(Co=function(t,e){return n[t-=293]})(t,e)}!function(t){const e=Co,n=t();for(;;)try{if(584566===parseInt(e(338))/1*(-parseInt(e(333))/2)+parseInt(e(336))/3*(parseInt(e(316))/4)+parseInt(e(335))/5+-parseInt(e(347))/6+-parseInt(e(344))/7+-parseInt(e(326))/8*(-parseInt(e(322))/9)+parseInt(e(325))/10*(parseInt(e(321))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Eo);class Po extends e.Plugin{static[_o(300)]=(()=>Xe)();[_o(350)];[_o(293)];static get[_o(312)](){return[So,_o(308),Hn]}static get[_o(299)](){return _o(353)}static get[_o(309)](){return!0}static get[_o(317)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(296)][e(304)][e(340)](e(328));this[e(350)]=new Map,this[e(293)]=new(Po[e(300)])(n)}[_o(339)](){const t=_o,e=this[t(296)][t(343)][t(340)](Hn),n=this[t(296)][t(343)][t(340)](t(308));return n[t(330)]={getSuggestion:async e=>{const n=t;await this[n(327)]();const r=await this[n(293)][n(340)](e)[n(354)](jo);return await this[n(329)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(327)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(293)][i(311)](e,n,r,s,o)[i(354)](t=>{if(Do(t))return new Promise(t=>{const n=Co;this[n(350)][n(356)](e,{resolve:t,suggestionData:a})});throw t});return this[i(350)][i(295)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(327)](),r(301)!==n[r(352)])return this[r(293)][r(319)](e,n)[r(354)](jo)}},this[t(348)](this[t(293)],t(306),(e,r)=>{const s=t;n[s(302)](r.id)&&(n[s(318)](r.id)[s(346)]=r[s(346)])}),this[t(293)][t(297)](e[t(305)])[t(342)](r=>(e[t(315)](this),this[t(329)](r)[t(342)](()=>{const e=t;for(const t of r)n[e(294)](t)[e(310)]=!0})))}async[_o(337)](){const t=_o,e=this[t(296)][t(343)][t(340)](t(308)),{connection:n}=this[t(296)][t(343)][t(340)](Hn),r=await this[t(293)][t(297)](n);await this[t(329)](r);for(const{suggestionData:e,resolve:n}of this[t(350)][t(303)]()){let s=r[t(341)](t=>t.id===e.id);s||(s=await this[t(293)][t(311)](e.id,e[t(324)],e[t(314)],e[t(332)])),n(s)}for(const n of r)e[t(302)](n.id)||e[t(294)](n)}async[_o(327)](){const t=_o;this[t(293)][t(345)]||await new Promise(e=>{const n=t;this[n(348)](this[n(293)],n(351),t=>{t[n(334)](),e()})})}async[_o(329)](t){const e=_o,n=this[e(296)][e(343)][e(340)](Fn.Users),{connection:r}=this[e(296)][e(343)][e(340)](Hn),s=new Set;for(const{authorId:r}of t)n[e(298)](r)||s[e(311)](r);if(0===s[e(313)])return;const o=await b[e(307)](r,Array[e(320)](s));for(const t of o)n[e(298)](t.id)||n[e(323)](t)}}function Eo(){const t=["addUser","type","10rFrvkq","3317320OhOuUm","_waitForServiceReady","collaboration.channelId","_fetchMissingUsersForThreads","adapter","cloud-services-internal-error: Request timeout.","originalSuggestionId","2GoNWUt","off","1043775ihAznk","3SQZYei","reconnect","1098635IlEwDd","init","get","find","then","plugins","1791216ezgSpp","isConnected","attributes","6811788rveEOF","listenTo","cloud-services-internal-error: Not connected.","_bufferedRequests","connected","state","CloudServicesTrackChangesAdapter","catch","message","set","startsWith","_trackChangesService","addSuggestionData","delete","editor","connect","getUser","pluginName","TrackChangesService","open","hasSuggestion","values","config","connection","suggestionUpdated","getMany","TrackChangesEditing","isOfficialPlugin","_saved","add","requires","size","data","addToReconnectionStack","1857196JanznU","isPremiumPlugin","getSuggestion","update","from","21853348whzEau","9rCXIPt"];return(Eo=function(){return t})()}function jo(t){if(Do(t))return new Promise(()=>{});throw t}function Do(t){const e=_o;return t[e(355)][e(357)](e(349))||t[e(355)][e(357)](e(331))}const xo=Ro;function Ro(t,e){const n=Vo();return(Ro=function(t,e){return n[t-=215]})(t,e)}!function(t){const e=Ro,n=t();for(;;)try{if(325936===-parseInt(e(238))/1*(parseInt(e(220))/2)+-parseInt(e(224))/3+parseInt(e(248))/4+parseInt(e(245))/5*(-parseInt(e(219))/6)+-parseInt(e(243))/7+-parseInt(e(228))/8*(parseInt(e(217))/9)+parseInt(e(222))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Vo);class No extends e.Plugin{static get[xo(215)](){return[xo(236),So,Io,Hn]}static get[xo(240)](){return xo(216)}static get[xo(234)](){return!0}static get[xo(235)](){return!0}[xo(227)](){const t=xo,e=this[t(247)][t(230)][t(233)](Hn),n=this[t(247)][t(230)][t(233)](t(223)),r=this[t(247)][t(230)][t(233)](So);return this[t(247)][t(244)][t(246)](t(225),()=>{const r=t;this[r(241)](e,r(232),(t,e,s)=>{const o=r;n[o(231)]=o(237)!==s})}),this[t(241)](e,t(232),(e,n,r)=>{const s=t;this[s(247)][s(230)][s(233)](s(242))[s(226)](s(237)!==r)}),r[t(229)](this[t(247)][t(218)][t(233)](t(249)))}[xo(221)](){const t=xo;this[t(247)][t(230)][t(233)](So)[t(239)](this[t(247)][t(218)][t(233)](t(249))),super[t(221)]()}}function Vo(){const t=["data","3460EjdCJJ","once","editor","168728XADcCs","collaboration.channelId","requires","RealTimeCollaborativeComments","2439zYhOlN","config","2568OIaXmX","170ZzXFIw","destroy","21110030VVWkEv","CommentsEditing","366501mCThmN","ready","switchReadOnly","init","15240okCFRw","_setUpService","plugins","isThreadsLoadingPaused","change:state","get","isOfficialPlugin","isPremiumPlugin","Comments","connected","6121vpfUCv","_terminateService","pluginName","listenTo","CommentsRepository","2606562GAOYmu"];return(Vo=function(){return t})()}var Mo=Bo;function Bo(t,e){var n=Jo();return(Bo=function(t,e){return n[t-=458]})(t,e)}function Jo(){var t=["77NhBhak","207356UjzhSH","297DhTiBA","33896vKACOo","requires","pluginName","TrackChanges","2108802TnRwOC","2791250vTVmbd","isPremiumPlugin","1013184dsXDtM","451460ORsasK","716765reKQyD","RealTimeCollaborativeTrackChanges","36qOlmZZ","isOfficialPlugin","63efzyBk"];return(Jo=function(){return t})()}!function(t){for(var e=Bo,n=t();;)try{if(623151===parseInt(e(463))/1+parseInt(e(460))/2+-parseInt(e(469))/3*(-parseInt(e(471))/4)+parseInt(e(464))/5*(-parseInt(e(467))/6)+parseInt(e(465))/7+parseInt(e(473))/8*(-parseInt(e(472))/9)+-parseInt(e(461))/10*(parseInt(e(470))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Jo);class Uo extends e.Plugin{static get[Mo(474)](){return[No,Po,Mo(459)]}static get[Mo(458)](){return Mo(466)}static get[Mo(468)](){return!0}static get[Mo(462)](){return!0}}const qo=Go;function Lo(){const t=["_fetchMissingUsers","getRevision","listenTo","7598521NsvJuF","fromVersion","getUser","requires","_handleReconnectionError","creatorId","code","once","addToReconnectionStack","message","authors","plugins","change:_isPendingUpdate","isEnabled","init","authorsIds","config","_lastRequestId","CloudServicesRevisionHistoryAdapter","wrongRequestId","affectsData","_revisionDataBuilder","setRevisionData","43003iuqHro","_preventResendingRevisionData","from","has","pluginName","isConnected","RevisionHistory","data","_createCurrentRevision","add","getOperations","_revisionTracker","addRevisionData","cloudServices.bundleVersion","marker","RevisionHistoryService","diffData","max","setSource","destroy","_bufferedUpdates","buildRevisionData","map","400","RevisionTracker","_revisions","connected","_handleRevisionsUpdate","revisionsUpdated","reInit","925920mqJsEk","isBundleUploaded","_waitForServiceReady","currentRevision","_oldOffset","_revisionHistoryService","keys","CONNECTED","_getLatestVersionFromServerOperations","change:_isConnected","get","state","getRevisions","remove","35QjNSLk","length","_bufferUpdate","updateRevisions","_startingVersion","cloud-services-internal-error: Request timeout.","serverHistory","sessionId","5227600nuliwf","collaboration.channelId","reverse","adapter","startsWith","_isPendingUpdate","repository","connection","type","connect","then","_update","addUser","_isConnected","createdAt","editor","isPremiumPlugin","reconnect","bind","isOfficialPlugin","off","_offset","31855752JjrkXa","_fixRevision","1039782Bggjlf","toVersion","getMany","catch","cloud-services-internal-error: Not connected.","size","cloud-services-internal-error: Revision History Service is not connected.","3460512dtUKXq","baseVersion","sendBufferedUpdates","_getLatestVersion","isEmptyCurrent","26TWicCX"];return(Lo=function(){return t})()}function Go(t,e){const n=Lo();return(Go=function(t,e){return n[t-=335]})(t,e)}!function(t){const e=Go,n=t();for(;;)try{if(951043===-parseInt(e(382))/1*(parseInt(e(355))/2)+-parseInt(e(350))/3+parseInt(e(434))/4+-parseInt(e(426))/5*(parseInt(e(343))/6)+-parseInt(e(359))/7+parseInt(e(412))/8+parseInt(e(341))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Lo);class Yo extends e.Plugin{static[qo(397)]=(()=>Ve)();[qo(376)];[qo(393)];[qo(417)];[qo(416)];static get[qo(362)](){return[Hn,ho,qo(388),Qn,Fn.Users]}static get[qo(386)](){return qo(377)}static get[qo(338)](){return!0}static get[qo(335)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(449)][e(375)][e(422)](e(435));this[e(376)]=null,this[e(393)]=this[e(449)][e(370)][e(422)](e(406)),this[e(417)]=new(Yo[e(397)])(n)}async[qo(373)](){const t=qo,e=this[t(449)][t(370)][t(422)](ho),r=e[t(432)],s=this[t(449)][t(370)][t(422)](Hn);this[t(393)][t(400)]({history:r,getLatestVersion:()=>this[t(353)](),getCurrentRevisionId:()=>e[t(433)]});const o=this[t(449)][t(375)][t(422)](t(395))||n.version,i=await Ae[t(413)](s[t(441)],o);this[t(449)][t(370)][t(422)](t(388))[t(437)]={getRevision:async({revisionId:e})=>(await this[t(414)](),await this[t(417)][t(357)](e)),updateRevisions:async e=>{const n=t;await this[n(414)]();const r=this[n(393)][n(415)];if(i&&1===e[n(427)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(354)]=t[n(360)]===t[n(344)]);return this[n(417)][n(429)](e,this[n(376)])[n(444)](t=>(this[n(376)]=t,e))[n(346)](t=>{const r=n;if(Ho(t)||r(405)===t[r(365)]&&void 0!==t[r(389)][r(378)]){for(const t of e)!this[r(393)][r(440)][r(357)](t.id)||this[r(393)][r(428)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(358)](this[t(417)],t(410),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(399)](...n[s(404)](t=>t[s(344)]))>this[s(420)]()-1?this[s(353)]()[s(444)](()=>{this[s(409)](n,r)}):this[s(409)](n,r)});const{revisions:a,requestId:c}=await this[t(417)][t(443)](s[t(441)]);s[t(367)](this),this[t(376)]=c,await this[t(356)](a);for(const e of a)this[t(393)][t(394)](e);this[t(358)](e,t(421),(n,r,s)=>{const o=t;s&&(this[o(416)]=e[o(340)],n[o(339)]())}),this[t(393)][t(337)](t(372)).to(s,t(423),e=>e===Ie[t(419)])}async[qo(336)](){const t=qo,e=this[t(449)][t(370)][t(422)](Hn),n=this[t(449)][t(370)][t(422)](ho),r=async()=>{const r=t,s=this[r(393)][r(415)],o=s.id,i=o!==n[r(433)];if(i){const t=n[r(340)]-this[r(416)],e=this[r(420)]();if(this[r(393)][r(380)][r(411)](),s[r(344)]+t!==e){const n=s[r(360)]+t,o=this[r(449)][r(370)][r(422)](Fn.Users),i=this[r(393)][r(403)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(374)][r(404)](t=>o[r(361)](t));s[r(445)]({...i,authors:a},!0),this[r(393)][r(428)](s.id,i,!0)}this[r(393)][r(430)]=e,s[r(344)]===s[r(360)]&&!this[r(393)][r(402)][r(385)](o)&&this[r(393)][r(440)][r(407)][r(425)](o),this[r(393)][r(390)](e)}const{revisions:a,requestId:c}=await this[r(417)][r(336)](e[r(441)],this[r(376)]);i&&a[r(427)]>0?n[r(363)]():(await this[r(356)](a),this[r(409)](a,c),this[r(393)][r(352)]())};return n[t(447)]?r():new Promise((e,s)=>{const o=t;n[o(366)](o(421),()=>{const t=o;r()[t(444)](e)[t(346)](s)})})}[qo(401)](){super[qo(401)]()}async[qo(414)](){const t=qo;this[t(417)][t(387)]||await new Promise(e=>{const n=t;this[n(358)](this[n(417)],n(408),t=>{t[n(339)](),e()})})}[qo(420)](){const t=qo,e=this[t(449)][t(370)][t(422)](ho)[t(432)][t(392)]()[t(436)]();for(const n of e)if(t(396)!==n[t(442)]||n[t(379)])return n[t(351)]+1}[qo(353)](){const t=qo,e=this[t(449)][t(370)][t(422)](ho);return new Promise(n=>{const r=t;e[r(439)]?e[r(366)](r(371),()=>{n(this[r(420)]())}):n(this[r(420)]())})}[qo(409)](t,e){const n=qo,r=this[n(393)][n(440)];this[n(376)]=e;for(const e of t){const t=r[n(357)](e.id);if(t){if((e[n(360)]||e[n(344)])&&(e[n(398)]=null),t===this[n(393)][n(415)]){const r=Math[n(399)](t[n(344)],e[n(344)]),s=Math[n(399)](t[n(360)],e[n(360)]);let o;t[n(344)]===e[n(344)]&&t[n(360)]===e[n(360)]?(o=!0,this[n(383)](e)):e[n(344)]===r&&e[n(360)]===s?o=!1:(t[n(344)]===r&&t[n(360)]===s||this[n(342)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(360)],delete e[n(344)],delete e[n(398)],delete e[n(448)],delete e[n(374)])}this[n(393)][n(381)](e),this[n(383)](e)}else this[n(393)][n(394)](e)}const s=r[n(424)]();s[n(436)]();for(let t=0;t<s[n(427)]-1;t++){const e=s[t],r=s[t+1];if(e[n(360)]<r[n(344)]){const t=r[n(344)],s=Math[n(399)](t,e[n(344)]);this[n(342)]({revision:e,from:t,to:s})}}}[qo(342)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(449)][r(370)][r(422)](Fn.Users),o=this[r(393)][r(403)]({revision:t,from:e,to:n});o[r(369)]=o[r(374)][r(404)](t=>s[r(361)](t)),t[r(445)](o)}[qo(383)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(418)](t))"id"!==r&&(n[r]=void 0);this[e(393)][e(428)](n.id,n,!0)}async[qo(356)](t){const e=qo,n=this[e(449)][e(370)][e(422)](Fn.Users),{connection:r}=this[e(449)][e(370)][e(422)](Hn),s=new Set;for(const n of t){for(const t of n[e(374)])i(t);n[e(364)]&&i(n[e(364)])}if(0===s[e(348)])return;const o=await b[e(345)](r,Array[e(384)](s));for(const t of o)n[e(361)](t.id)||n[e(446)](t);function i(t){const r=e;n[r(361)](t)||s[r(391)](t)}}}function Ho(t){const e=qo;return t[e(368)][e(438)](e(349))||t[e(368)][e(438)](e(347))||t[e(368)][e(438)](e(431))}var zo=Ko;function Fo(){var t=["35tUhweq","RevisionHistory","1059816AkafSs","isPremiumPlugin","902108duowBP","requires","10GVkblb","2299092vlXgAn","isOfficialPlugin","RealTimeCollaborativeRevisionHistory","10718296hWSdHz","721449XCLJzB","pluginName","5DnNQvp","659065OyLxBl","580617AhVMjw"];return(Fo=function(){return t})()}function Ko(t,e){var n=Fo();return(Ko=function(t,e){return n[t-=332]})(t,e)}!function(t){for(var e=Ko,n=t();;)try{if(944879===-parseInt(e(347))/1+-parseInt(e(340))/2+parseInt(e(344))/3+-parseInt(e(337))/4*(-parseInt(e(346))/5)+parseInt(e(335))/6*(parseInt(e(333))/7)+parseInt(e(343))/8+parseInt(e(332))/9*(parseInt(e(339))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Fo);class Wo extends e.Plugin{static get[zo(338)](){return[zo(334),Yo,Io]}static get[zo(345)](){return zo(342)}static get[zo(341)](){return!0}static get[zo(336)](){return!0}}function Xo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}const Qo=$o;function Zo(){const t=["818755pIXegq","set","954306dVPzHA","toString","ck-presence-list__list-item","usersCount","bind","listitem","_collapseAt","isHidden","5UYDKpX","setTemplate","1511456SGKrpA","2571976YRYNrJ","ck-presence-list__users-counter__text","969042FEAEFm","ck-presence-list__users-counter","3061686JPOPoe","div","ck-presence-list__counter--hidden","bindTemplate","222054wnaxwu"];return(Zo=function(){return t})()}function $o(t,e){const n=Zo();return($o=function(t,e){return n[t-=425]})(t,e)}!function(t){const e=$o,n=t();for(;;)try{if(394048===-parseInt(e(442))/1+parseInt(e(436))/2+-parseInt(e(445))/3+parseInt(e(433))/4+-parseInt(e(431))/5*(-parseInt(e(438))/6)+-parseInt(e(443))/7+-parseInt(e(434))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zo);class ti extends r.View{[Qo(429)];constructor(t,e=6){const n=Qo;super(t);const r=this[n(441)];this[n(444)](n(430),!0),this[n(444)](n(426),0),this[n(429)]=e,this[n(427)](n(430)).to(this,n(426),t=>t<e),this[n(432)]({tag:n(439),attributes:{class:["ck",n(425),r.if(n(430),n(440))],role:n(428)},children:[{tag:n(439),attributes:{class:["ck",n(437)]},children:[{tag:n(439),attributes:{class:["ck",n(435)]},children:[{text:r.to(n(426),t=>"+"+(t-this[n(429)]+2)[n(446)]())}]}]}]})}}const ei=ni;function ni(t,e){const n=ri();return(ni=function(t,e){return n[t-=130]})(t,e)}function ri(){const t=["ck-presence-list__list","Connected users list","11636464rTjisC","6778112tlFimW",".ck-balloon-panel_with-arrow","setAttribute","Collapsed connected users list (press ENTER to open it)","bindTemplate","contains","isExpanded","presencelist:show","520jdSjgq","aria-expanded","1031313ijYwVe","hasPopup","relatedTarget","6yfLqiT","setTemplate","fire","render","change:hasPopup","list","listenTo","1WnUsiw","195814znfJAw","2253960qxdJSE",".ck-presence-list__dropdown-list","5476079yRMzIu","set","querySelector","element","keystrokes","div","items","removeAttribute","presencelist:hide","focus","createCollection","543420WXUdwN"];return(ri=function(){return t})()}!function(t){const e=ni,n=t();for(;;)try{if(996551===-parseInt(e(151))/1*(-parseInt(e(152))/2)+-parseInt(e(141))/3+parseInt(e(131))/4+parseInt(e(153))/5+parseInt(e(144))/6*(parseInt(e(155))/7)+parseInt(e(130))/8+parseInt(e(166))/9*(-parseInt(e(139))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ri);class si extends r.View{[ei(161)];[ei(159)];constructor(t){const e=ei;super(t);const r=this[e(135)];this[e(161)]=this[e(165)](),this[e(159)]=new n.KeystrokeHandler,this[e(156)]({hasPopup:!1,isExpanded:!1}),this[e(145)]({tag:e(160),attributes:{"aria-haspopup":r.if(e(142)),"aria-expanded":r.to(e(137),t=>this[e(142)]&&String(t)),"aria-label":r.to(e(142),n=>mr(t,e(n?134:168))),role:e(149),tabindex:r.to(e(142),t=>!!t&&0),class:["ck",e(167)]},children:this[e(161)],on:{mouseenter:r.to(()=>this[e(146)](e(138))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(157)](n(154)),o=document[n(157)](n(132));s?.[n(136)](r[n(143)])||o?.[n(136)](r[n(143)])||this[n(146)](n(163))})}}),this.on(e(148),(t,n,r)=>{const s=e;this[s(158)]&&(r?this[s(158)][s(133)](s(140),String(this[s(137)])):this[s(158)][s(162)](s(140)))})}[ei(164)](){const t=ei;this[t(158)][t(164)]()}[ei(147)](){const t=ei;super[t(147)](),this[t(159)][t(150)](this[t(158)])}}var oi=__webpack_require__(190),ii={attributes:{"data-cke":!0}};ii.setAttributes=or(),ii.insert=rr().bind(null,"head"),ii.domAPI=er(),ii.insertStyleElement=ar();$n()(oi.A,ii);oi.A&&oi.A.locals&&oi.A.locals;const ai=ui;function ci(){const t=["first","ck-presence-list--collapsed","444305bFHMGv","24558sLWNle","2263635GvirOF","counterView","14EtqPHj","change","inlineListView","tooltipPosition","ck-reset","locale","bindTemplate","setTemplate","bind","ck-presence-list","ck-rounded-corners","376268XymNIJ","div","95412NhxBJZ","506ldVsmi","set","348803xkscul","412188sOtkQJ","items","20jUZELi","listenTo","72XvyCyJ","hasPopup","16fXtDiS","isCollapsed"];return(ci=function(){return t})()}function ui(t,e){const n=ci();return(ui=function(t,e){return n[t-=322]})(t,e)}!function(t){const e=ui,n=t();for(;;)try{if(320605===parseInt(e(340))/1+parseInt(e(329))/2*(parseInt(e(326))/3)+parseInt(e(352))/4*(-parseInt(e(325))/5)+-parseInt(e(346))/6+-parseInt(e(345))/7*(-parseInt(e(350))/8)+-parseInt(e(327))/9*(parseInt(e(348))/10)+-parseInt(e(343))/11*(-parseInt(e(342))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ci);class di extends r.View{[ai(328)];[ai(331)];constructor(t,e=6){const n=ai;super(t);const r=this[n(335)];this[n(344)](n(322),!0),this[n(328)]=new ti(this[n(334)],e),this[n(331)]=new si(t),this[n(331)][n(337)](n(351)).to(this,n(322)),this[n(349)](this[n(331)][n(347)],n(330),()=>{const t=n;for(const e of this[t(331)][t(347)])e[t(332)]="s";this[t(331)][t(347)][t(323)]&&(this[t(331)][t(347)][t(323)][t(332)]="se")}),this[n(336)]({tag:n(341),attributes:{class:["ck",n(338),n(333),n(339),r.if(n(322),n(324))]},children:[this[n(331)]]})}}const li=fi;!function(t){const e=fi,n=t();for(;;)try{if(475110===parseInt(e(451))/1*(-parseInt(e(455))/2)+parseInt(e(466))/3+-parseInt(e(431))/4*(parseInt(e(438))/5)+-parseInt(e(440))/6+parseInt(e(468))/7+-parseInt(e(445))/8+parseInt(e(449))/9*(parseInt(e(439))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(mi);class hi extends r.View{[li(453)];constructor(t,e){const n=li;super(t);const r=this[n(459)];this[n(453)]=new pi(t,e),this[n(436)]({tag:n(458),attributes:{tabindex:-1,role:n(435),class:["ck",n(437)],"aria-label":mr(t,n(429))},children:[this[n(453)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(446)](e(434)),o=document[e(446)](e(433));s?.[e(450)](r[e(456)])||o?.[e(450)](r[e(456)])||this[e(457)](e(454))})}})}}class pi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(459)];this[r(441)](r(448),!1),this[r(436)]({tag:e?r(458):"ul",attributes:{class:["ck",r(462),r(463),r(461),s.if(r(448),r(428))],role:s.to(r(427)),"aria-label":s.to(r(426)),"aria-labelledby":s.to(r(430))},children:this[r(465)]}),this[r(470)](n.global[r(467)],r(464),()=>this[r(443)]()),this[r(465)].on(r(460),()=>this[r(443)]())}[li(469)](){const t=li;super[t(469)](),this[t(443)]()}[li(443)](){const t=li,e=this[t(452)];e&&(this[t(448)]=Math[t(444)](e[t(442)],e[t(447)])>.8*window[t(432)])}}function fi(t,e){const n=mi();return(fi=function(t,e){return n[t-=426]})(t,e)}function mi(){const t=["ariaLabel","role","ck-presence-list__dropdown-list-wrapper_scrollable","Connected users list dropdown menu","ariaLabelledBy","12CWKnlr","innerHeight",".ck-balloon-panel_with-arrow",".ck-presence-list__list","application","setTemplate","ck-presence-list__dropdown-list","629325QCthAL","10bRPoWg","229932EJNwiN","set","scrollHeight","checkIfScrollable","max","3334936jZHZXi","querySelector","clientHeight","_isScrollable","12437739wAFtCP","contains","747449Coailq","element","listWrapperView","presencelist:hide","2mbIJpn","relatedTarget","fire","div","bindTemplate","change","ck-presence-list__dropdown-list-wrapper","ck-reset","ck-list","resize","items","866865ZIjuCg","window","2690919bwNXdp","render","listenTo"];return(mi=function(){return t})()}function gi(){const t=["5942096osBPqg","194890dKEFEZ","fire","tag","16756790DIiDbA","span","ck-presence-list__dropdown-list-item","6338196fNbQJE","focus","11BjlklG","true","6pcKejZ","name","1335040MnbLRT","108qgOJdB","ck-user__full-name","userView","60uYlVuz","ck-presence-list__marker","bindTemplate","presentation","element","button","getBackgroundColorClass","setTemplate","execute","color","73739ujeogg","16749xYPDsT"];return(gi=function(){return t})()}const yi=bi;function bi(t,e){const n=gi();return(bi=function(t,e){return n[t-=393]})(t,e)}!function(t){const e=bi,n=t();for(;;)try{if(526179===-parseInt(e(413))/1*(parseInt(e(397))/2)+parseInt(e(414))/3*(parseInt(e(403))/4)+parseInt(e(416))/5*(parseInt(e(400))/6)+parseInt(e(399))/7+parseInt(e(415))/8+parseInt(e(393))/9+parseInt(e(419))/10*(-parseInt(e(395))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gi);class Ii extends r.ListItemView{[yi(402)];constructor(t,e,n){const r=yi;super(t);const s=this[r(405)];this[r(402)]=new Fn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(421)],tabindex:-1,role:r(406),"aria-label":e[r(398)]},children:[this[r(402)],{tag:r(420),attributes:{class:["ck",r(401)]},children:[{text:e[r(398)]}]},{tag:r(420),attributes:{class:["ck",r(404),e[r(412)][r(409)]()],"aria-hidden":r(396)}}]};n&&(o[r(418)]=r(408),o.on={click:s.to(()=>this[r(417)](r(411)))}),this[r(410)](o)}[yi(394)](){const t=yi;this[t(407)][t(394)]()}}const Oi=Si;function vi(){const t=["set","span","name","708295CYLbJp","execute","color","true","360JQvSdU","setTemplate","hasTooltip","listitem","154330rLLLqk","tooltipPosition","fire","markerView","2315922NiGdXB","3489nFlGfn","button","tag","3482872EMeWXx","ck-presence-list__marker","div","getBackgroundColorClass","ck-presence-list__list-item","9gzPfAX","template","4936694jKaQKN","ck-presence-list__list-item__tooltip","isFocusable","bindTemplate","text","userView","3132978OtddWH"];return(vi=function(){return t})()}!function(t){const e=Si,n=t();for(;;)try{if(775750===-parseInt(e(467))/1+parseInt(e(446))/2+parseInt(e(447))/3*(parseInt(e(438))/4)+-parseInt(e(442))/5+parseInt(e(463))/6+-parseInt(e(457))/7+-parseInt(e(450))/8*(-parseInt(e(455))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vi);class wi extends r.View{[Oi(462)];[Oi(445)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(460)];this[s(464)](s(459),!1),this[s(464)](s(440),!0),this[s(464)](s(443),""),this[s(462)]=new Fn.UserView(t,e),this[s(445)]=new ki(t,e);const i=new r.LabelView(t);i[s(456)][s(449)]=s(465),i[s(461)]=e[s(466)];const a={tag:s(452),attributes:{class:["ck",s(454)],role:s(441),tabindex:o.to(s(459),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(462)][s(466)],"data-cke-tooltip-position":o.to(s(443)),"data-cke-tooltip-disabled":o.to(s(440),t=>!t),"data-cke-tooltip-class":s(458)},children:[this[s(462)],this[s(445)],i]};n&&(a[s(449)]=s(448),a.on={click:o.to(()=>this[s(444)](s(468)))}),this[s(439)](a)}}function Si(t,e){const n=vi();return(Si=function(t,e){return n[t-=436]})(t,e)}class ki extends r.View{constructor(t,e){const n=Oi;super(t),this[n(439)]({tag:n(465),attributes:{class:["ck",n(451),e[n(436)][n(453)]()],"aria-hidden":n(437)}})}}const Ai=Ci;function Ti(){const t=["presenceDropdownView","354890mZpXli","70402EqoPuL","pin","offsetWidth","min","ck ck-presence-list__balloon","select","isFocusable","destroy","from","bindTo","displayMe","hasTooltip","4FPwnDv","reverse",':not([disabled]):not([tabindex="-1"])',"allConnectedUsers","button","listenTo","keystrokes","isOfficialPlugin","sort","pluginName","remove","requires","[tabindex]","join","init","187kEiCum","321123LQDfJy","isExpanded","bind","filter","usersCount","define","balloonPanelView","presenceList.displayMe","unpin","focus","appendChild","length","isPremiumPlugin","_handleUserAdd","onClick","_allConnectedUsers","Shift+Tab","presenceList","[contenteditable]","PresenceListUI","items","content","isRendered","6587aYrmDn","context","plugins","detachFromDom","341235aYwpYf","element","currentDisplayedUsers","find","input","set","Esc","presencelist:hide","config","using","_createView","focusTracker","presencelist-collapseat-invalid-format","177648XlGXqX","isCollapsed","querySelectorAll","class","Enter","hideDropdown","attachToDom","counterView","presencelist:show","inlineListView","number","_handleUserRemove","body","presenceList.container","_bodyCollection","tabIndex","isMe","Tab","3oMHsmh","presenceList.collapseAt","add","view","showDropdown","2812878CnEVnz","map","offsetHeight","isVisible","activeElement","get","render","execute","locale","textarea","indexOf","presencelist-missing-container","change:isFocused","checkIfScrollable","1362PIihlX"];return(Ti=function(){return t})()}!function(t){const e=Ci,n=t();for(;;)try{if(194095===-parseInt(e(378))/1+parseInt(e(350))/2*(-parseInt(e(436))/3)+parseInt(e(362))/4*(parseInt(e(405))/5)+parseInt(e(347))/6*(parseInt(e(401))/7)+-parseInt(e(418))/8+-parseInt(e(441))/9+-parseInt(e(349))/10*(-parseInt(e(377))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ti);const _i={collapseAt:6,displayMe:!0};function Ci(t,e){const n=Ti();return(Ci=function(t,e){return n[t-=344]})(t,e)}class Pi extends e.ContextPlugin{[Ai(407)];[Ai(384)];[Ai(439)];[Ai(348)];[Ai(432)]=null;static get[Ai(371)](){return Ai(397)}static get[Ai(369)](){return!0}static get[Ai(390)](){return!0}constructor(t){const e=Ai;super(t),this[e(402)][e(413)][e(383)](e(395),_i);const s=t[e(413)][e(446)](e(437));if(e(428)!=typeof s)throw new n.CKEditorError(e(417),this);if(s<1)throw new n.CKEditorError(e(417),this);this[e(393)]=this[e(402)][e(403)][e(446)](Qn)[e(365)],this[e(410)](e(382),0),this[e(407)]=new n.Collection,this[e(384)]=new r.BalloonPanelView,this[e(384)][e(421)]=e(354),this[e(439)]=this[e(415)](),this[e(348)]=void 0}static get[Ai(373)](){return[Qn]}[Ai(376)](){const t=Ai;for(const e of this[t(393)])this[t(391)](e);this[t(367)](this[t(393)],t(438),(e,n)=>{this[t(391)](n)}),this[t(367)](this[t(393)],t(372),(e,n)=>{this[t(429)](n)})}[Ai(415)](){const t=Ai,e=this[t(402)],s=new di(this[t(402)][t(449)],this[t(402)][t(413)][t(446)](t(437))),o=this[t(384)];if(!Xo(e[t(413)][t(446)](t(431))))throw new n.CKEditorError(t(344),this);return s[t(425)][t(380)](t(382)).to(this),s[t(380)](t(419)).to(this,t(382),n=>{const r=t,{collapseAt:o}=e[r(413)][r(446)](r(395)),i=n>=o;if(i&&!s[r(427)][r(398)][r(408)](t=>t instanceof ti)){const t=this[r(402)][r(413)][r(446)](r(437))-1;this[r(407)][r(389)]==t&&this[r(407)][r(389)]>1&&this[r(407)][r(372)](this[r(407)][r(389)]-1),s[r(427)][r(398)][r(438)](s[r(425)])}return i||this[r(423)](),i}),s[t(427)][t(398)][t(359)](this[t(407)])[t(414)](n=>{const r=t,o=e[r(413)][r(446)](r(395)),i=new wi(e[r(449)],n,!!o[r(392)]);return i[r(380)](r(361)).to(s,r(419),t=>!t),i[r(380)](r(356)).to(s,r(419),t=>!t),o[r(392)]&&this[r(367)](i,r(448),()=>{const t=r;this[t(439)][t(419)]||o[t(392)](n,i[t(406)])}),i}),this[t(367)](s[t(427)],t(426),()=>{const e=t;this[e(439)][e(419)]&&this[e(440)]()}),this[t(367)](s[t(427)],t(412),()=>{const e=t;this[e(348)]&&this[e(423)]()}),s[t(427)][t(368)][t(410)](t(422),(e,n)=>{const r=t;this[r(439)][r(419)]&&(this[r(440)](),n())}),s[t(447)](),o[t(447)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(444)],contextElements:[o[t(406)],s[t(427)][t(406)]],callback:()=>this[t(423)]()}),e[t(413)][t(446)](t(431))[t(388)](s[t(406)]),this[t(432)]=new r.BodyCollection(this[t(402)][t(449)]),this[t(432)][t(424)](),this[t(432)][t(438)](this[t(384)]),s}[Ai(391)](t){const e=Ai;if(!this[e(402)][e(413)][e(446)](e(385))&&t[e(434)])return;const n=this[e(402)][e(413)][e(446)](e(437))-1;for(this[e(382)]++;this[e(407)][e(389)]>=n-(this[e(439)][e(419)]?1:0)&&this[e(407)][e(389)]>1;)this[e(407)][e(372)](1);const r=t[e(434)]?0:this[e(407)][e(389)];this[e(407)][e(438)](t,r)}[Ai(429)](t){const e=Ai;this[e(382)]--;const{collapseAt:n}=this[e(402)][e(413)][e(446)](e(395)),r=this[e(382)]>=n;if(this[e(407)][e(446)](t.id))this[e(407)][e(372)](t.id);else if(r&&this[e(407)][e(389)]+1===n-1)return;if(this[e(407)][e(389)]+(r?1:0)<this[e(382)])for(const t of Array[e(358)](this[e(393)])[e(363)]())if(!this[e(407)][e(446)](t.id)&&(this[e(407)][e(438)](t,Math[e(353)](this[e(407)][e(389)]-(r?1:0),1)),this[e(407)][e(389)]+(r?1:0)===n-1))return}[Ai(440)](){const t=Ai;if(this[t(348)])return;const e=this[t(402)][t(413)][t(446)](t(395));this[t(348)]=new hi(this[t(402)][t(449)],!!e[t(392)]),this[t(439)][t(427)][t(379)]=!0,this[t(367)](this[t(348)],t(412),()=>{const e=t;this[e(348)]&&this[e(423)]()});const{listWrapperView:n}=this[t(348)];n[t(398)][t(359)](this[t(393)])[t(414)](n=>{const r=t;if(!e[r(360)]&&n[r(434)])return null;const s=new Ii(this[r(402)][r(449)],n,!!e[r(392)]);return e[r(392)]&&this[r(367)](s,r(448),()=>{const t=r;e[t(392)](n,s[t(406)])}),s}),this[t(384)][t(399)][t(438)](this[t(348)]),this[t(384)][t(351)]({target:this[t(439)][t(427)][t(406)]}),n[t(387)](),n[t(346)]();const r=(e,n)=>{const r=t;this[r(423)](),this[r(439)][r(427)][r(387)](),n()};n[t(368)][t(410)](t(411),r),n[t(368)][t(410)](t(394),r),n[t(368)][t(410)](t(435),(e,n)=>{const r=t;!function(t){const e=Ci,n=["a",e(366),e(409),e(355),e(450),e(374),e(396)][e(442)](t=>t+e(364))[e(375)](","),r=[...document[e(430)][e(420)](n)][e(381)](t=>t===document[e(445)]||t[e(352)]+t[e(443)]>0)[e(370)]((t,n)=>(t[e(433)]||0)-(n[e(433)]||0)),s=r[e(451)](t),o=r[(s+1)%r[e(389)]];o&&o[e(387)]()}(this[r(439)][r(406)]),this[r(423)](),n()}),n[t(416)][t(438)](this[t(439)][t(406)]),n[t(416)].on(t(345),(e,n,r)=>{r||this[t(423)]()})}[Ai(423)](){const t=Ai;this[t(348)]&&(this[t(439)][t(427)][t(379)]=!1,this[t(384)][t(386)](),this[t(384)][t(399)][t(372)](this[t(348)]),this[t(348)][t(357)](),this[t(348)]=void 0)}[Ai(357)](){const t=Ai;super[t(357)](),this[t(439)]&&this[t(439)][t(400)]&&this[t(439)][t(357)](),this[t(432)]&&(this[t(432)][t(404)](),this[t(432)][t(357)](),this[t(432)]=null)}}var Ei=Di;function ji(){var t=["8097910juMjwm","9909482nyZYKg","isPremiumPlugin","PresenceList","2621942UJXZBA","14TwFsRb","3RlVSkp","2313608sBAtlN","20MaBWWG","244435kOBJXR","12489255UhcMBa","isOfficialPlugin","971196tedgYo","6YsmbyG","pluginName","requires"];return(ji=function(){return t})()}function Di(t,e){var n=ji();return(Di=function(t,e){return n[t-=445]})(t,e)}!function(t){for(var e=Di,n=t();;)try{if(813808===-parseInt(e(450))/1+-parseInt(e(445))/2*(parseInt(e(447))/3)+-parseInt(e(453))/4+-parseInt(e(457))/5*(-parseInt(e(454))/6)+-parseInt(e(446))/7*(-parseInt(e(448))/8)+-parseInt(e(451))/9+-parseInt(e(449))/10*(-parseInt(e(458))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ji);class xi extends e.ContextPlugin{static get[Ei(456)](){return[Qn,Pi]}static get[Ei(455)](){return Ei(460)}static get[Ei(452)](){return!0}static get[Ei(459)](){return!0}}function Ri(){var t=["14gvQDFa","252ngbXWB","528150wzbBgk","2717ATicWF","2488206TCRjUD","9042597QPEphn","1383932bKMebj","1197944MVlNYU","238623dwLfHF"];return(Ri=function(){return t})()}function Ni(t,e){var n=Ri();return(Ni=function(t,e){return n[t-=432]})(t,e)}!function(t){for(var e=Ni,n=t();;)try{if(212608===parseInt(e(440))/1*(parseInt(e(438))/2)+-parseInt(e(436))/3+parseInt(e(434))/4+-parseInt(e(439))/5+parseInt(e(432))/6+-parseInt(e(437))/7*(-parseInt(e(435))/8)+-parseInt(e(433))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ri)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|