@ckeditor/ckeditor5-real-time-collaboration 47.0.0-alpha.9 → 47.1.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.
Files changed (170) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +14 -14
  150. package/src/common-translations.js +1 -1
  151. package/src/index.js +1 -1
  152. package/src/presencelist/presencelistui.js +1 -1
  153. package/src/presencelist/view/presencecounterview.js +1 -1
  154. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  155. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  156. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  157. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  158. package/src/presencelist/view/presencelistview.js +1 -1
  159. package/src/presencelist.js +1 -1
  160. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +2 -2
  161. package/src/realtimecollaborativecomments.js +1 -1
  162. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +2 -2
  163. package/src/realtimecollaborativeediting/sessions.js +1 -1
  164. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  165. package/src/realtimecollaborativeediting/websocketgateway.js +2 -2
  166. package/src/realtimecollaborativeediting.js +1 -1
  167. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +2 -2
  168. package/src/realtimecollaborativerevisionhistory.js +1 -1
  169. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +2 -2
  170. 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 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)}},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],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+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),u=0;u<o.length;u++){var d=n(o[u]);0===e[d].references&&(e[d].updater(),e.splice(d,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+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[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 y(unescape(t.pathname),{});else if("string"===o)for(e in s=new y(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 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,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=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?~(h="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(v[b]=t.slice(0,h),t=t.slice(h+u[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&&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&&(~(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()}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<p.length;u++){var d=p[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}}},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 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 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=(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 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 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}},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,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()},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 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 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 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=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(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(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(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(h,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=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:()=>wo,CloudServicesRevisionHistoryAdapter:()=>Yo,CloudServicesTrackChangesAdapter:()=>Co,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>Vo,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Qn,WebSocketGateway:()=>zn});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=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 d[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(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 h(e);try{const e=await t._sendRequest(y._SERVICE,h.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(""),Q={};let Z,X=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!==Z?(X=0,Z=t):t+"."+tt(X++)}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 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 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 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}}},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 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 pt[t](n)}open(){let t;if(this.opts.rememberUpgrade&&gt.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,Qt=3,Zt=4;class Xt{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(Xt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Qt:Zt}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=(()=>Xt.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=(()=>Xt.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=(()=>Xt.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=(()=>Xt.getPacketType(Wt,Zt))();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=(()=>Xt.getPacketType(Qt,Zt))();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=(()=>Xt.getPacketType(Zt,Zt))();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=(()=>Xt.getPacketType(Zt,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=(()=>Xt.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=(()=>Xt.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 ue extends $t{data;data1;static TYPE=(()=>Xt.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 ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Xt.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 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 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 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 pe(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=Xt.getPacketType(Xt.getType(t.data[0]),Xt.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 zt(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 ge extends Dt{_packetParser;constructor(t){super(),this._packetParser=t??new he}add(t){if(!Xt.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 Qe=We,Ze={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xe;const $e=new Uint8Array(16);function tn(){if(!Xe&&(Xe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe($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(Ze.randomUUID&&!e&&!t)return Ze.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 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 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: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 gn(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 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: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="",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: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 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: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 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;function Gn(){const t=["websocketgateway-invalid-plugin-interface","then","10GedXIf","plugins","real-time-collaboration","set","_reconnect","12772040ITUhjH","state","showWarning","config","delete","connect","token","9655JlnrDJ","cloudservices-init","bind","CONNECTING","isInReconnectionStack","disconnect","pluginName","1361028oPNSnz","online","requires","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.","175285QZQtWN","stopListening","isPremiumPlugin","_isBrowserOffline","addToReconnectionStack","context","connection","has","cloudservices-reconnection-error","CONNECTED","8HrPCpU","initialReconnectionInterval","get","WebSocketGateway","destroy","isOfficialPlugin","add","error","code","all","from","_domEmitter","change:me","function","define","_reconnectionStack","websocketgateway-missing-token","Connected users limit exceeded","CloudServices","DISCONNECTED","_shouldPluginsReconnect","offline","297397VUAtZY","10116639YngarF","cloudServices.connectionTimeout","catch","774Nblpbf","constructor","listenTo","websocketgateway-plugin-already-registered","removeFromReconnectionStack","webSocketUrl","cloudServices.requestTimeout","1764oVgMmV","reconnect","limitExceeded","websocketgateway-missing-websocket-url","6AuDEHT","connected","2380168ouruIu","init"];return(Gn=function(){return t})()}function Yn(t,e){const n=Gn();return(Yn=function(t,e){return n[t-=449]})(t,e)}const Hn=Yn;!function(t){const e=Yn,n=t();for(;;)try{if(832289===-parseInt(e(473))/1*(-parseInt(e(488))/2)+parseInt(e(513))/3*(parseInt(e(451))/4)+-parseInt(e(506))/5*(parseInt(e(477))/6)+-parseInt(e(490))/7+-parseInt(e(499))/8+parseInt(e(474))/9*(-parseInt(e(494))/10)+parseInt(e(517))/11*(parseInt(e(484))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Gn);class zn extends e.ContextPlugin{static[Hn(454)]=(()=>ve)();static[Hn(452)]=1e3;[Hn(523)];[Hn(466)];[Hn(471)];[Hn(462)];static get[Hn(515)](){return[Hn(469),r.Notification]}static get[Hn(512)](){return Hn(454)}static get[Hn(456)](){return!0}static get[Hn(519)](){return!0}constructor(t){const e=Hn;super(t),this[e(497)](e(500),Ie[e(450)]),this[e(497)](e(520),!1),this[e(466)]=new Set,this[e(471)]=!1,this[e(462)]=new((0,n.DomEmitterMixin)())}[Hn(491)](){const t=Hn,e=this[t(522)],s=e[t(495)][t(453)](t(469)),o=e[t(495)][t(453)](r.Notification);if(!s[t(505)])throw new n.CKEditorError(t(467),this);if(!s[t(482)])throw new n.CKEditorError(t(487),this);return this[t(462)][t(479)](window,t(472),()=>this[t(520)]=!0),this[t(462)][t(479)](window,t(514),()=>this[t(520)]=!1),this[t(522)][t(502)][t(465)](t(475),10),this[t(522)][t(502)][t(465)](t(483),20),zn[t(454)][t(504)](s[t(505)],s[t(482)],{timeout:1e3*this[t(522)][t(502)][t(453)](t(475)),requestTimeout:1e3*this[t(522)][t(502)][t(453)](t(483))})[t(493)](e=>{const r=t;if(this[r(523)]=e,this[r(508)](r(500)).to(e,r(500),this,r(520),(t,e)=>(r(489)!==t&&(this[r(471)]=!0),e||t!==Ie[r(450)]?Ie[r(470)]:this[r(500)]==Ie[r(470)]&&this[r(471)]?(this[r(471)]=!1,this[r(498)](),Ie[r(509)]):Ie[r(450)])),this[r(523)].on(r(458),(t,e)=>{const s=r;if(s(486)!==e[s(459)])throw console[s(458)](e),new n.CKEditorError(s(507),null,{originalError:e});o[s(501)](s(516),{title:s(468),namespace:s(496)})}),!e.me)return new Promise(t=>e.on(r(463),t))})[t(476)](e=>{const r=t;throw console[r(458)](e),new n.CKEditorError(r(507),null,{originalError:e})})}[Hn(521)](t){const e=Hn;if(e(464)!=typeof t[e(485)])throw new n.CKEditorError(e(492),this);if(this[e(510)](t))throw new n.CKEditorError(e(480),this,{name:t[e(478)][e(512)]});this[e(466)][e(457)](t)}[Hn(481)](t){const e=Hn;this[e(466)][e(503)](t)}[Hn(510)](t){const e=Hn;return this[e(466)][e(524)](t)}[Hn(498)](){const t=Hn;return this[t(523)][t(485)]()[t(493)](()=>Promise[t(460)](Array[t(461)](this[t(466)],e=>e[t(485)]())))[t(493)](()=>this[t(500)]=Ie[t(450)])[t(476)](e=>{const r=t;throw console[r(458)](e),new n.CKEditorError(r(449),this[r(522)])})}[Hn(511)](){const t=Hn;this[t(523)]&&this[t(523)][t(511)](),this[t(500)]=Ie[t(470)],this[t(462)][t(518)]()}[Hn(455)](){const t=Hn;this[t(511)](),super[t(455)]()}}var Fn=__webpack_require__(211);const Kn=Wn;function Wn(t,e){const n=Zn();return(Wn=function(t,e){return n[t-=266]})(t,e)}!function(t){const e=Wn,n=t();for(;;)try{if(314498===-parseInt(e(291))/1+-parseInt(e(289))/2*(-parseInt(e(306))/3)+-parseInt(e(276))/4+parseInt(e(301))/5*(parseInt(e(273))/6)+-parseInt(e(277))/7+parseInt(e(300))/8*(parseInt(e(292))/9)+-parseInt(e(321))/10*(-parseInt(e(295))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zn);class Qn extends e.ContextPlugin{[Kn(305)];[Kn(313)];[Kn(311)];[Kn(272)];[Kn(308)];[Kn(274)];static get[Kn(328)](){return Kn(303)}static get[Kn(310)](){return!0}static get[Kn(271)](){return!0}static get[Kn(298)](){return[zn,Fn.Users]}constructor(t){const e=Kn;super(t),this[e(305)]=new Map,this[e(313)]=new Map,this[e(311)]=new n.Collection,this[e(272)]=new Map,this[e(308)]=0,this[e(274)]=this[e(297)][e(309)][e(290)](Fn.Users)}[Kn(319)](){const t=Kn,e=this[t(297)][t(309)][t(290)](zn);this[t(282)](e,t(278),(e,n,r)=>{const s=t;if(s(283)!==r)this[s(305)][s(286)](t=>t[s(268)]()),this[s(313)][s(286)](t=>t[s(268)]()),this[s(311)][s(268)]();else for(const[t,e]of this[s(272)])for(const n of e)this[s(280)](t,n)}),this[t(279)](e[t(304)].me,!0)}[Kn(329)](t,e){const r=Kn;if(this[r(272)][r(293)](t))throw new n.CKEditorError(r(316),null,{channelId:t});this[r(272)][r(270)](t,e),this[r(305)][r(270)](t,new n.Collection),this[r(313)][r(270)](t,new n.Collection),this[r(282)](e,r(294),(e,n)=>this[r(280)](t,n)),this[r(282)](e,r(325),(e,n)=>this[r(267)](t,n));for(const n of e)this[r(280)](t,n)}[Kn(327)](t){const e=Kn;if(!this[e(272)][e(293)](t))throw new n.CKEditorError(e(324),null,{channelId:t});const r=this[e(272)][e(290)](t);this[e(288)](r);for(const n of r)e(283)===this[e(297)][e(309)][e(290)](zn)[e(299)]&&this[e(267)](t,n);this[e(272)][e(322)](t),this[e(305)][e(322)](t),this[e(313)][e(322)](t)}get[Kn(287)](){const t=Kn;return this[t(297)][t(309)][t(290)](zn)[t(304)][t(315)]}[Kn(302)](t){const e=Kn;for(const n of this[e(305)][e(266)]())for(const r of n)if(r.id===t)return r[e(284)]}[Kn(312)](t,e){const n=Kn,r=e?[this[n(305)][n(290)](e)]:this[n(305)][n(266)](),s=new Set;for(const e of r)for(const r of e)r[n(284)].id===t.id&&s[n(294)](r.id);return s}[Kn(326)](t){const e=Kn;for(const n of this[e(305)][e(266)]())for(const r of n)if(r[e(284)]===t)return r[e(323)]}[Kn(280)](t,e){const n=Kn;if(n(283)!==this[n(297)][n(309)][n(290)](zn)[n(299)])return;const r=e[n(284)],s=this[n(274)][n(281)](r.id)||this[n(279)](r),o=Object[n(269)]({},e,{user:s});if(this[n(305)][n(290)](t)[n(294)](o),!r[n(317)]){const e=this[n(313)][n(290)](t);e[n(293)](s.id)||e[n(294)](s),this[n(311)][n(293)](s.id)||r[n(317)]||this[n(311)][n(294)](s,s[n(314)]?0:void 0)}this[n(275)](n(320)+t,{channelId:t,session:o})}[Kn(267)](t,e){const n=Kn;if(n(283)!==this[n(297)][n(309)][n(290)](zn)[n(299)])return;const r=this[n(313)][n(290)](t),s=e[n(284)];s.id&&(this[n(305)][n(290)](t)[n(325)](e.id),r[n(293)](s.id)&&!this[n(312)](s,t)[n(296)]&&r[n(325)](s.id),this[n(311)][n(290)](s.id)&&!this[n(312)](s)[n(296)]&&this[n(311)][n(325)](s.id))}[Kn(279)](t,e){const n=Kn,r=this[n(274)][n(307)](t);return e&&this[n(274)][n(318)](t.id),r[n(285)]=this[n(308)]++,r}}function Zn(){const t=["isMe","sessionId","sessions-register-already-registered","hiddenInPresenceList","defineMe","init","sessionAdd:","3290920MbgkYj","delete","role","sessions-unregister-not-exist","remove","getUserRole","unregister","pluginName","register","values","_handleSessionRemove","clear","assign","set","isPremiumPlugin","_registeredSessions","582KchUvI","_users","fire","1259632aMTQGQ","1857065XBjwzK","change:state","_createUser","_handleSessionAdd","getUser","listenTo","connected","user","orderNumber","forEach","mySessionId","stopListening","159472PlcXZe","get","556341GQjjwF","1350OafVYt","has","add","11DYAXfq","size","context","requires","state","17912hDxWXZ","15860JDttEd","getUserBySessionId","Sessions","connection","channelSessions","18WKZIrp","addUser","_uniqueUsersCount","plugins","isOfficialPlugin","allConnectedUsers","getUserSessions","channelConnectedUsers"];return(Zn=function(){return t})()}var Xn=__webpack_require__(6),$n=__webpack_require__.n(Xn),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),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;function dr(){const t=["isObject","getContainedElement","requires","user:position","detach","stopListening","Escape","mySessionId","mouseleave","toRange","$text","setCustomProperty","ck-user__selection","getAttribute","change","destroy","name","getNearestSelectionRange","applyOperation","addMarker","962BMAvsV","10RNBRCM","$graveyard","isCollapsed","startsWith","marker","35HyjpIz","conversion","afterInit","createUIElement","remove","mapper","highest","user:","start","markerRange","document","toDomElement","isSimilar","selection","enqueueChange","size","createUserMarkerOperations","false","add","getCustomProperty","root","reconvertMarker","getPositions","8Fcchpn","view","createRange","markers","user:range","deletionPosition","span","getStart","rootName","ck-user__marker_hovered","setAttribute","innerHTML","schema","for","395520ggDige","pluginName","removeClass","newRange","batch","user:range:","clear","data-session-id","mouseenter","isOfficialPlugin","793vAIiWm","orderNumber","isPremiumPlugin","contenteditable","getUserBySessionId","574125QdVLzX","undo","314200yPyeze","spellcheck","userPositionMarker","updateMarker","getMarkerClass","isLimit","model","change:range","oldRange","editingDowncast",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"render","type","_createdBatches","createElement","1026432AyyKoY","markerName","hasContent","keydown","update:user:range","markerNameToElements","split","listenTo","_domEmitter","isDocumentOperation","5637346tPmcDz","has","isInline","markerToElement","fromRange","element","end","getFirstRange","user:position:","removeMarker","color","markerToHighlight","parent","commands","tableCell","get","checkChild","editing","init","hasDomSelection","delete","4857pQvdNM","ck-user__marker-tooltip","editor","plugins","ck-user__marker ","getRange","outerHTML","textContent","nodeAfter","addEventListener","getSelectionClass","UserMarkers","classList","set"];return(dr=function(){return t})()}const lr=pr;function pr(t,e){const n=dr();return(pr=function(t,e){return n[t-=433]})(t,e)}!function(t){const e=pr,n=t();for(;;)try{if(257493===parseInt(e(445))/1*(-parseInt(e(532))/2)+parseInt(e(498))/3*(-parseInt(e(561))/4)+-parseInt(e(450))/5+-parseInt(e(435))/6+-parseInt(e(538))/7*(-parseInt(e(452))/8)+parseInt(e(467))/9+parseInt(e(533))/10*(parseInt(e(477))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dr);class hr extends e.Plugin{[lr(475)]=new((0,n.DomEmitterMixin)());static get[lr(514)](){return[Qn]}static get[lr(436)](){return lr(509)}static get[lr(444)](){return!0}static get[lr(447)](){return!0}[lr(495)](){const t=lr,e=this[t(500)],r=e[t(501)][t(492)](Qn);e[t(539)][t(434)](t(461))[t(480)]({model:t(515),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(468)][o(473)](":")[2],a=r[o(449)](i);if(!a||i===r[o(519)])return;if(!s[o(458)][o(433)][o(493)](e[o(547)][o(546)],o(522)))return;const c={class:o(502)+a[o(487)][o(456)](),"data-name":a[o(528)],"data-session-id":i},u=s[o(458)][o(564)][o(492)](e[o(468)])[o(568)](),d=u[o(506)],l=s[o(458)][o(433)];if(d&&l[o(512)](d)&&l[o(479)](d)&&!s[o(458)][o(564)][o(492)](o(440)+i)[o(503)]()[o(535)])return;const p=u[o(489)];return s[o(458)][o(433)][o(457)](p)&&!s[o(458)][o(469)](p)&&(c[o(448)]=!1),function(t,e,n){const r=o,s=t[r(541)](r(567),e);return t[r(523)](r(454),!0,s),s[r(463)]=function(t){const e=r,s=this[e(549)](t),o=document[e(466)](e(567));return o[e(510)][e(556)](e(499)),o[e(571)](e(448),e(555)),o[e(571)](e(453),e(555)),o[e(505)]=n[e(528)],s[e(572)]=e(462)+o[e(504)]+"⁠",s[e(507)](e(443),()=>{const t=e;s[t(510)][t(556)](t(570))}),s[e(507)](e(520),()=>{const t=e;s[t(510)][t(542)](t(570))}),s},s[r(550)]=function(t){const e=r;return!(!this[e(557)](e(454))||!t[e(557)](e(454))||this[e(525)](e(442))!=t[e(525)](e(442)))},s}(n,c,a)}(n,s,r,e)}),e[t(539)][t(434)](t(461))[t(488)]({model:t(565),view:e=>function(e,n){const r=t,s=e[r(468)][r(473)](":")[2];if(s===n[r(519)])return null;const o=n[r(449)](s);return o?{id:s,classes:[r(524),o[r(487)][r(508)]()],attributes:{"data-session-id":s},priority:2e3+o[r(446)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(458)],o=new Map,i=e[n(501)][n(492)](Qn);r[n(564)].on(n(471),(t,a,c,u)=>{const d=n;if(!u&&o[d(492)](a[d(528)]))return o[d(492)](a[d(528)])[d(516)](),void o[d(497)](a[d(528)]);const l=a[d(528)][d(473)](":")[2];if(l===i[d(519)])return;const p=d(485)+l;r[d(564)][d(478)](p)&&e[d(494)][d(559)](p),a.on(d(459),(t,e,n)=>{const i=d;if(i(534)!=e[i(558)][i(569)]&&i(534)==a[i(503)]()[i(558)][i(569)]&&!o[i(478)](a[i(528)])){const t=r[i(433)][i(529)](n[i(566)]);if(t){const e=s.ModelLiveRange[i(481)](t);o[i(511)](a[i(528)],e),e.on(i(459),(t,n,s)=>{const c=i;if(c(534)==e[c(558)][c(569)]){const t=r[c(433)][c(529)](s[c(566)]);t?(e[c(546)]=t[c(546)],e[c(483)]=t[c(483)]):(o[c(497)](a[c(528)]),e[c(516)]())}})}}})}),r[n(548)].on(n(526),()=>{const t=n;o[t(553)]>0&&r[t(552)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(534)==r[n(564)][n(492)](t)[n(503)]()[n(558)][n(569)]&&(fr(t[n(473)](":")[2],s[n(521)](),r,e),s[n(516)]());o[n(441)]()})})}(e),this[t(475)][t(474)](n.global[t(548)],t(470),(n,{key:r})=>{const s=t;s(518)===r&&function(t){const e=s;t[e(494)][e(562)][e(526)](n=>{const r=e;for(const e of t[r(458)][r(564)]){if(!e[r(528)][r(536)](r(515)))continue;const s=t[r(494)][r(543)][r(472)](e[r(528)]);if(s)for(const t of s)n[r(437)](r(570),t)}})}(e)},{useCapture:!0})}[lr(540)](){const t=lr,e=this[t(500)],n=e[t(490)][t(492)](t(451));n&&e[t(458)].on(t(530),(r,s)=>{const o=t,i=s[0];if(!i[o(476)])return;if(o(537)!=i[o(464)]||!i[o(528)][o(536)](o(545)))return;const a=i[o(439)];n[o(465)][o(478)](a)&&(i[o(438)]=i[o(460)]?e[o(458)][o(563)](i[o(460)][o(546)],i[o(460)][o(483)]):null)},{priority:t(544)})}[lr(527)](){const t=lr;return this[t(475)][t(517)](),super[t(527)]()}[lr(554)](){const t=lr,e=this[t(500)],n=e[t(458)][t(548)],r=e[t(501)][t(492)](Qn);e[t(458)][t(552)]({isUndoable:!1},s=>{const o=t,i=o(440)+r[o(519)],a=o(485)+r[o(519)],c=e[o(458)][o(564)][o(478)](i);e[o(494)][o(562)][o(496)]?fr(r[o(519)],n[o(551)][o(484)](),e[o(458)],s):c&&(s[o(486)](i),s[o(486)](a))})}}function fr(t,e,n,r){const s=lr,o=s(440)+t,i=s(485)+t,a=e[s(513)]();let c=e[s(546)];if(a&&a.is(s(482),s(491))){const t=function(t,e){const n=s;for(const r of t[n(560)]())if(e[n(433)][n(493)](r,n(522)))return r}(e,n);t&&(c=t,e=r[s(563)](c))}const u=r[s(563)](c);n[s(564)][s(478)](o)?(r[s(455)](o,{range:e}),r[s(455)](i,{range:u})):(r[s(531)](o,{range:e,usingOperation:!0}),r[s(531)](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=br();return(gr=function(t,e){return n[t-=284]})(t,e)}!function(t){for(var e=gr,n=t();;)try{if(537204===parseInt(e(389))/1+-parseInt(e(415))/2*(parseInt(e(414))/3)+-parseInt(e(364))/4*(-parseInt(e(370))/5)+parseInt(e(447))/6*(-parseInt(e(298))/7)+parseInt(e(312))/8+-parseInt(e(305))/9*(parseInt(e(395))/10)+parseInt(e(287))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(br);const yr=(()=>{var t=gr,e=u[t(396)],n=u[t(372)],r=u[t(448)],s=u[t(373)][t(323)]||(u[t(373)][t(323)]={});return s[t(459)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(297)]=null,i[o(446)][o(443)]="",i[o(446)][o(434)]=!1,i[o(446)][o(311)]="",i[o(446)][o(338)]=!1,i[o(446)][o(436)]="",i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(297)]&&Object[r(362)][r(441)](t,r(297))&&s[r(383)][r(401)](t[r(297)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(443)]&&Object[r(362)][r(441)](t,r(443))&&e[r(442)](18)[r(315)](t[r(443)]),null!=t[r(434)]&&Object[r(362)][r(441)](t,r(434))&&e[r(442)](24)[r(327)](t[r(434)]),null!=t[r(311)]&&Object[r(362)][r(441)](t,r(311))&&e[r(442)](34)[r(315)](t[r(311)]),null!=t[r(338)]&&Object[r(362)][r(441)](t,r(338))&&e[r(442)](40)[r(327)](t[r(338)]),null!=t[r(436)]&&Object[r(362)][r(441)](t,r(436))&&e[r(442)](50)[r(315)](t[r(436)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](56)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(459)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(297)]=s[r(383)][r(432)](t,t[r(442)]());break;case 2:a[r(443)]=t[r(315)]();break;case 3:a[r(434)]=t[r(327)]();break;case 4:a[r(311)]=t[r(315)]();break;case 5:a[r(338)]=t[r(327)]();break;case 6:a[r(436)]=t[r(315)]();break;case 7:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;if(e(300)!=typeof t||null===t)return e(403);if(null!=t[e(297)]&&t[e(362)](e(297))){var n=s[e(383)][e(352)](t[e(297)]);if(n)return e(437)+n}return null!=t[e(443)]&&t[e(362)](e(443))&&!r[e(307)](t[e(443)])?e(405):null!=t[e(434)]&&t[e(362)](e(434))&&e(451)!=typeof t[e(434)]?e(296):null!=t[e(311)]&&t[e(362)](e(311))&&!r[e(307)](t[e(311)])?e(431):null!=t[e(338)]&&t[e(362)](e(338))&&e(451)!=typeof t[e(338)]?e(303):null!=t[e(436)]&&t[e(362)](e(436))&&!r[e(307)](t[e(436)])?e(422):null!=t[e(404)]&&t[e(362)](e(404))&&e(451)!=typeof t[e(404)]?e(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(459)])return t;var n=new(s[e(459)]);if(null!=t[e(297)]){if(e(300)!=typeof t[e(297)])throw TypeError(e(421));n[e(297)]=s[e(383)][e(350)](t[e(297)])}return null!=t[e(443)]&&(n[e(443)]=String(t[e(443)])),null!=t[e(434)]&&(n[e(434)]=Boolean(t[e(434)])),null!=t[e(311)]&&(n[e(311)]=String(t[e(311)])),null!=t[e(338)]&&(n[e(338)]=Boolean(t[e(338)])),null!=t[e(436)]&&(n[e(436)]=String(t[e(436)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(297)]=null,r[n(443)]="",r[n(434)]=!1,r[n(311)]="",r[n(338)]=!1,r[n(436)]="",r[n(404)]=!1),null!=t[n(297)]&&t[n(362)](n(297))&&(r[n(297)]=s[n(383)][n(354)](t[n(297)],e)),null!=t[n(443)]&&t[n(362)](n(443))&&(r[n(443)]=t[n(443)]),null!=t[n(434)]&&t[n(362)](n(434))&&(r[n(434)]=t[n(434)]),null!=t[n(311)]&&t[n(362)](n(311))&&(r[n(311)]=t[n(311)]),null!=t[n(338)]&&t[n(362)](n(338))&&(r[n(338)]=t[n(338)]),null!=t[n(436)]&&t[n(362)](n(436))&&(r[n(436)]=t[n(436)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(306)},i}(),s[t(424)]=function(){var o=t;function i(t){var e=gr;if(this[e(355)]=[],t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(336)]=null,i[o(446)][o(355)]=r[o(310)],i[o(446)][o(318)]=!1,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;if(e||(e=n[r(309)]()),null!=t[r(336)]&&Object[r(362)][r(441)](t,r(336))&&s[r(457)][r(401)](t[r(336)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(355)]&&t[r(355)][r(291)])for(var i=0;i<t[r(355)][r(291)];++i)s[r(379)][r(401)](t[r(355)][i],e[r(442)](18)[r(419)]())[r(378)]();return null!=t[r(318)]&&Object[r(362)][r(441)](t,r(318))&&e[r(442)](24)[r(327)](t[r(318)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](32)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(424)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(336)]=s[r(457)][r(432)](t,t[r(442)]());break;case 2:a[r(355)]&&a[r(355)][r(291)]||(a[r(355)]=[]),a[r(355)][r(345)](s[r(379)][r(432)](t,t[r(442)]()));break;case 3:a[r(318)]=t[r(327)]();break;case 4:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;if(e(300)!=typeof t||null===t)return e(403);if(null!=t[e(336)]&&t[e(362)](e(336))&&(r=s[e(457)][e(352)](t[e(336)])))return e(331)+r;if(null!=t[e(355)]&&t[e(362)](e(355))){if(!Array[e(294)](t[e(355)]))return e(288);for(var n=0;n<t[e(355)][e(291)];++n){var r;if(r=s[e(379)][e(352)](t[e(355)][n]))return e(290)+r}}return null!=t[e(318)]&&t[e(362)](e(318))&&e(451)!=typeof t[e(318)]?e(420):null!=t[e(404)]&&t[e(362)](e(404))&&e(451)!=typeof t[e(404)]?e(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(424)])return t;var n=new(s[e(424)]);if(null!=t[e(336)]){if(e(300)!=typeof t[e(336)])throw TypeError(e(418));n[e(336)]=s[e(457)][e(350)](t[e(336)])}if(t[e(355)]){if(!Array[e(294)](t[e(355)]))throw TypeError(e(435));n[e(355)]=[];for(var r=0;r<t[e(355)][e(291)];++r){if(e(300)!=typeof t[e(355)][r])throw TypeError(e(384));n[e(355)][r]=s[e(379)][e(350)](t[e(355)][r])}}return null!=t[e(318)]&&(n[e(318)]=Boolean(t[e(318)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(313)]||e[n(339)])&&(r[n(355)]=[]),e[n(339)]&&(r[n(336)]=null,r[n(318)]=!1,r[n(404)]=!1),null!=t[n(336)]&&t[n(362)](n(336))&&(r[n(336)]=s[n(457)][n(354)](t[n(336)],e)),t[n(355)]&&t[n(355)][n(291)]){r[n(355)]=[];for(var i=0;i<t[n(355)][n(291)];++i)r[n(355)][i]=s[n(379)][n(354)](t[n(355)][i],e)}return null!=t[n(318)]&&t[n(362)](n(318))&&(r[n(318)]=t[n(318)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(427)},i}(),s[t(390)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(392)]="",i[o(446)][o(347)]=null,i[o(446)][o(340)]=null,i[o(446)][o(326)]=!1,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(392)]&&Object[r(362)][r(441)](t,r(392))&&e[r(442)](10)[r(315)](t[r(392)]),null!=t[r(347)]&&Object[r(362)][r(441)](t,r(347))&&s[r(383)][r(401)](t[r(347)],e[r(442)](18)[r(419)]())[r(378)](),null!=t[r(340)]&&Object[r(362)][r(441)](t,r(340))&&s[r(383)][r(401)](t[r(340)],e[r(442)](26)[r(419)]())[r(378)](),null!=t[r(326)]&&Object[r(362)][r(441)](t,r(326))&&e[r(442)](32)[r(327)](t[r(326)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](40)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(390)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(392)]=t[r(315)]();break;case 2:a[r(347)]=s[r(383)][r(432)](t,t[r(442)]());break;case 3:a[r(340)]=s[r(383)][r(432)](t,t[r(442)]());break;case 4:a[r(326)]=t[r(327)]();break;case 5:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e,n=o;return n(300)!=typeof t||null===t?n(403):null!=t[n(392)]&&t[n(362)](n(392))&&!r[n(307)](t[n(392)])?n(410):null!=t[n(347)]&&t[n(362)](n(347))&&(e=s[n(383)][n(352)](t[n(347)]))?n(289)+e:null!=t[n(340)]&&t[n(362)](n(340))&&(e=s[n(383)][n(352)](t[n(340)]))?n(433)+e:null!=t[n(326)]&&t[n(362)](n(326))&&n(451)!=typeof t[n(326)]?n(407):null!=t[n(404)]&&t[n(362)](n(404))&&n(451)!=typeof t[n(404)]?n(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(390)])return t;var n=new(s[e(390)]);if(null!=t[e(392)]&&(n[e(392)]=String(t[e(392)])),null!=t[e(347)]){if(e(300)!=typeof t[e(347)])throw TypeError(e(334));n[e(347)]=s[e(383)][e(350)](t[e(347)])}if(null!=t[e(340)]){if(e(300)!=typeof t[e(340)])throw TypeError(e(445));n[e(340)]=s[e(383)][e(350)](t[e(340)])}return null!=t[e(326)]&&(n[e(326)]=Boolean(t[e(326)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(392)]="",r[n(347)]=null,r[n(340)]=null,r[n(326)]=!1,r[n(404)]=!1),null!=t[n(392)]&&t[n(362)](n(392))&&(r[n(392)]=t[n(392)]),null!=t[n(347)]&&t[n(362)](n(347))&&(r[n(347)]=s[n(383)][n(354)](t[n(347)],e)),null!=t[n(340)]&&t[n(362)](n(340))&&(r[n(340)]=s[n(383)][n(354)](t[n(340)],e)),null!=t[n(326)]&&t[n(362)](n(326))&&(r[n(326)]=t[n(326)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(304)},i}(),s[t(456)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(413)]=null,i[o(446)][o(371)]=null,i[o(446)][o(449)]=null,i[o(446)][o(365)]=0,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(413)]&&Object[r(362)][r(441)](t,r(413))&&s[r(457)][r(401)](t[r(413)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(371)]&&Object[r(362)][r(441)](t,r(371))&&s[r(457)][r(401)](t[r(371)],e[r(442)](18)[r(419)]())[r(378)](),null!=t[r(449)]&&Object[r(362)][r(441)](t,r(449))&&s[r(457)][r(401)](t[r(449)],e[r(442)](26)[r(419)]())[r(378)](),null!=t[r(365)]&&Object[r(362)][r(441)](t,r(365))&&e[r(442)](32)[r(442)](t[r(365)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](40)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(456)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(413)]=s[r(457)][r(432)](t,t[r(442)]());break;case 2:a[r(371)]=s[r(457)][r(432)](t,t[r(442)]());break;case 3:a[r(449)]=s[r(457)][r(432)](t,t[r(442)]());break;case 4:a[r(365)]=t[r(442)]();break;case 5:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e,n=o;return n(300)!=typeof t||null===t?n(403):null!=t[n(413)]&&t[n(362)](n(413))&&(e=s[n(457)][n(352)](t[n(413)]))?n(399)+e:null!=t[n(371)]&&t[n(362)](n(371))&&(e=s[n(457)][n(352)](t[n(371)]))?n(380)+e:null!=t[n(449)]&&t[n(362)](n(449))&&(e=s[n(457)][n(352)](t[n(449)]))?n(426)+e:null!=t[n(365)]&&t[n(362)](n(365))&&!r[n(400)](t[n(365)])?n(402):null!=t[n(404)]&&t[n(362)](n(404))&&n(451)!=typeof t[n(404)]?n(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(456)])return t;var n=new(s[e(456)]);if(null!=t[e(413)]){if(e(300)!=typeof t[e(413)])throw TypeError(e(438));n[e(413)]=s[e(457)][e(350)](t[e(413)])}if(null!=t[e(371)]){if(e(300)!=typeof t[e(371)])throw TypeError(e(375));n[e(371)]=s[e(457)][e(350)](t[e(371)])}if(null!=t[e(449)]){if(e(300)!=typeof t[e(449)])throw TypeError(e(391));n[e(449)]=s[e(457)][e(350)](t[e(449)])}return null!=t[e(365)]&&(n[e(365)]=t[e(365)]>>>0),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(413)]=null,r[n(371)]=null,r[n(449)]=null,r[n(365)]=0,r[n(404)]=!1),null!=t[n(413)]&&t[n(362)](n(413))&&(r[n(413)]=s[n(457)][n(354)](t[n(413)],e)),null!=t[n(371)]&&t[n(362)](n(371))&&(r[n(371)]=s[n(457)][n(354)](t[n(371)],e)),null!=t[n(449)]&&t[n(362)](n(449))&&(r[n(449)]=s[n(457)][n(354)](t[n(449)],e)),null!=t[n(365)]&&t[n(362)](n(365))&&(r[n(365)]=t[n(365)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(368)},i}(),s[t(453)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(413)]=null,i[o(446)][o(365)]=0,i[o(446)][o(371)]=null,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(413)]&&Object[r(362)][r(441)](t,r(413))&&s[r(457)][r(401)](t[r(413)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(365)]&&Object[r(362)][r(441)](t,r(365))&&e[r(442)](16)[r(442)](t[r(365)]),null!=t[r(371)]&&Object[r(362)][r(441)](t,r(371))&&s[r(457)][r(401)](t[r(371)],e[r(442)](26)[r(419)]())[r(378)](),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](32)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(453)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(413)]=s[r(457)][r(432)](t,t[r(442)]());break;case 2:a[r(365)]=t[r(442)]();break;case 3:a[r(371)]=s[r(457)][r(432)](t,t[r(442)]());break;case 4:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e,n=o;return n(300)!=typeof t||null===t?n(403):null!=t[n(413)]&&t[n(362)](n(413))&&(e=s[n(457)][n(352)](t[n(413)]))?n(399)+e:null!=t[n(365)]&&t[n(362)](n(365))&&!r[n(400)](t[n(365)])?n(402):null!=t[n(371)]&&t[n(362)](n(371))&&(e=s[n(457)][n(352)](t[n(371)]))?n(380)+e:null!=t[n(404)]&&t[n(362)](n(404))&&n(451)!=typeof t[n(404)]?n(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(453)])return t;var n=new(s[e(453)]);if(null!=t[e(413)]){if(e(300)!=typeof t[e(413)])throw TypeError(e(321));n[e(413)]=s[e(457)][e(350)](t[e(413)])}if(null!=t[e(365)]&&(n[e(365)]=t[e(365)]>>>0),null!=t[e(371)]){if(e(300)!=typeof t[e(371)])throw TypeError(e(381));n[e(371)]=s[e(457)][e(350)](t[e(371)])}return null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(413)]=null,r[n(365)]=0,r[n(371)]=null,r[n(404)]=!1),null!=t[n(413)]&&t[n(362)](n(413))&&(r[n(413)]=s[n(457)][n(354)](t[n(413)],e)),null!=t[n(365)]&&t[n(362)](n(365))&&(r[n(365)]=t[n(365)]),null!=t[n(371)]&&t[n(362)](n(371))&&(r[n(371)]=s[n(457)][n(354)](t[n(371)],e)),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(455)},i}(),s[t(342)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(336)]=null,i[o(446)][o(374)]="",i[o(446)][o(417)]="",i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(336)]&&Object[r(362)][r(441)](t,r(336))&&s[r(457)][r(401)](t[r(336)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(374)]&&Object[r(362)][r(441)](t,r(374))&&e[r(442)](18)[r(315)](t[r(374)]),null!=t[r(417)]&&Object[r(362)][r(441)](t,r(417))&&e[r(442)](26)[r(315)](t[r(417)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](32)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(342)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(336)]=s[r(457)][r(432)](t,t[r(442)]());break;case 2:a[r(374)]=t[r(315)]();break;case 3:a[r(417)]=t[r(315)]();break;case 4:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;if(e(300)!=typeof t||null===t)return e(403);if(null!=t[e(336)]&&t[e(362)](e(336))){var n=s[e(457)][e(352)](t[e(336)]);if(n)return e(331)+n}return null!=t[e(374)]&&t[e(362)](e(374))&&!r[e(307)](t[e(374)])?e(335):null!=t[e(417)]&&t[e(362)](e(417))&&!r[e(307)](t[e(417)])?e(450):null!=t[e(404)]&&t[e(362)](e(404))&&e(451)!=typeof t[e(404)]?e(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(342)])return t;var n=new(s[e(342)]);if(null!=t[e(336)]){if(e(300)!=typeof t[e(336)])throw TypeError(e(332));n[e(336)]=s[e(457)][e(350)](t[e(336)])}return null!=t[e(374)]&&(n[e(374)]=String(t[e(374)])),null!=t[e(417)]&&(n[e(417)]=String(t[e(417)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(336)]=null,r[n(374)]="",r[n(417)]="",r[n(404)]=!1),null!=t[n(336)]&&t[n(362)](n(336))&&(r[n(336)]=s[n(457)][n(354)](t[n(336)],e)),null!=t[n(374)]&&t[n(362)](n(374))&&(r[n(374)]=t[n(374)]),null!=t[n(417)]&&t[n(362)](n(417))&&(r[n(417)]=t[n(417)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(322)},i}(),s[t(358)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(285)]="",i[o(446)][o(443)]="",i[o(446)][o(434)]=!1,i[o(446)][o(311)]="",i[o(446)][o(338)]=!1,i[o(446)][o(436)]="",i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(285)]&&Object[r(362)][r(441)](t,r(285))&&e[r(442)](10)[r(315)](t[r(285)]),null!=t[r(443)]&&Object[r(362)][r(441)](t,r(443))&&e[r(442)](18)[r(315)](t[r(443)]),null!=t[r(434)]&&Object[r(362)][r(441)](t,r(434))&&e[r(442)](24)[r(327)](t[r(434)]),null!=t[r(311)]&&Object[r(362)][r(441)](t,r(311))&&e[r(442)](34)[r(315)](t[r(311)]),null!=t[r(338)]&&Object[r(362)][r(441)](t,r(338))&&e[r(442)](40)[r(327)](t[r(338)]),null!=t[r(436)]&&Object[r(362)][r(441)](t,r(436))&&e[r(442)](50)[r(315)](t[r(436)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](56)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(358)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(285)]=t[r(315)]();break;case 2:a[r(443)]=t[r(315)]();break;case 3:a[r(434)]=t[r(327)]();break;case 4:a[r(311)]=t[r(315)]();break;case 5:a[r(338)]=t[r(327)]();break;case 6:a[r(436)]=t[r(315)]();break;case 7:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;return e(300)!=typeof t||null===t?e(403):null!=t[e(285)]&&t[e(362)](e(285))&&!r[e(307)](t[e(285)])?e(458):null!=t[e(443)]&&t[e(362)](e(443))&&!r[e(307)](t[e(443)])?e(405):null!=t[e(434)]&&t[e(362)](e(434))&&e(451)!=typeof t[e(434)]?e(296):null!=t[e(311)]&&t[e(362)](e(311))&&!r[e(307)](t[e(311)])?e(431):null!=t[e(338)]&&t[e(362)](e(338))&&e(451)!=typeof t[e(338)]?e(303):null!=t[e(436)]&&t[e(362)](e(436))&&!r[e(307)](t[e(436)])?e(422):null!=t[e(404)]&&t[e(362)](e(404))&&e(451)!=typeof t[e(404)]?e(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(358)])return t;var n=new(s[e(358)]);return null!=t[e(285)]&&(n[e(285)]=String(t[e(285)])),null!=t[e(443)]&&(n[e(443)]=String(t[e(443)])),null!=t[e(434)]&&(n[e(434)]=Boolean(t[e(434)])),null!=t[e(311)]&&(n[e(311)]=String(t[e(311)])),null!=t[e(338)]&&(n[e(338)]=Boolean(t[e(338)])),null!=t[e(436)]&&(n[e(436)]=String(t[e(436)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(285)]="",r[n(443)]="",r[n(434)]=!1,r[n(311)]="",r[n(338)]=!1,r[n(436)]="",r[n(404)]=!1),null!=t[n(285)]&&t[n(362)](n(285))&&(r[n(285)]=t[n(285)]),null!=t[n(443)]&&t[n(362)](n(443))&&(r[n(443)]=t[n(443)]),null!=t[n(434)]&&t[n(362)](n(434))&&(r[n(434)]=t[n(434)]),null!=t[n(311)]&&t[n(362)](n(311))&&(r[n(311)]=t[n(311)]),null!=t[n(338)]&&t[n(362)](n(338))&&(r[n(338)]=t[n(338)]),null!=t[n(436)]&&t[n(362)](n(436))&&(r[n(436)]=t[n(436)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(343)},i}(),s[t(337)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(349)]="",i[o(446)][o(295)]="",i[o(446)][o(439)]=!1,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(349)]&&Object[r(362)][r(441)](t,r(349))&&e[r(442)](10)[r(315)](t[r(349)]),null!=t[r(295)]&&Object[r(362)][r(441)](t,r(295))&&e[r(442)](18)[r(315)](t[r(295)]),null!=t[r(439)]&&Object[r(362)][r(441)](t,r(439))&&e[r(442)](24)[r(327)](t[r(439)]),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](32)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(337)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(349)]=t[r(315)]();break;case 2:a[r(295)]=t[r(315)]();break;case 3:a[r(439)]=t[r(327)]();break;case 4:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;return e(300)!=typeof t||null===t?e(403):null!=t[e(349)]&&t[e(362)](e(349))&&!r[e(307)](t[e(349)])?e(416):null!=t[e(295)]&&t[e(362)](e(295))&&!r[e(307)](t[e(295)])?e(302):null!=t[e(439)]&&t[e(362)](e(439))&&e(451)!=typeof t[e(439)]?e(363):null!=t[e(404)]&&t[e(362)](e(404))&&e(451)!=typeof t[e(404)]?e(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(337)])return t;var n=new(s[e(337)]);return null!=t[e(349)]&&(n[e(349)]=String(t[e(349)])),null!=t[e(295)]&&(n[e(295)]=String(t[e(295)])),null!=t[e(439)]&&(n[e(439)]=Boolean(t[e(439)])),null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(349)]="",r[n(295)]="",r[n(439)]=!1,r[n(404)]=!1),null!=t[n(349)]&&t[n(362)](n(349))&&(r[n(349)]=t[n(349)]),null!=t[n(295)]&&t[n(362)](n(295))&&(r[n(295)]=t[n(295)]),null!=t[n(439)]&&t[n(362)](n(439))&&(r[n(439)]=t[n(439)]),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(348)},i}(),s[t(329)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(357)]=null,i[o(446)][o(449)]=null,i[o(446)][o(365)]=0,i[o(446)][o(397)]=null,i[o(446)][o(404)]=!1,i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;return e||(e=n[r(309)]()),null!=t[r(357)]&&Object[r(362)][r(441)](t,r(357))&&s[r(457)][r(401)](t[r(357)],e[r(442)](10)[r(419)]())[r(378)](),null!=t[r(449)]&&Object[r(362)][r(441)](t,r(449))&&s[r(457)][r(401)](t[r(449)],e[r(442)](18)[r(419)]())[r(378)](),null!=t[r(365)]&&Object[r(362)][r(441)](t,r(365))&&e[r(442)](24)[r(442)](t[r(365)]),null!=t[r(397)]&&Object[r(362)][r(441)](t,r(397))&&s[r(457)][r(401)](t[r(397)],e[r(442)](34)[r(419)]())[r(378)](),null!=t[r(404)]&&Object[r(362)][r(441)](t,r(404))&&e[r(442)](40)[r(327)](t[r(404)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(329)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(357)]=s[r(457)][r(432)](t,t[r(442)]());break;case 2:a[r(449)]=s[r(457)][r(432)](t,t[r(442)]());break;case 3:a[r(365)]=t[r(442)]();break;case 4:a[r(397)]=s[r(457)][r(432)](t,t[r(442)]());break;case 5:a[r(404)]=t[r(327)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e,n=o;return n(300)!=typeof t||null===t?n(403):null!=t[n(357)]&&t[n(362)](n(357))&&(e=s[n(457)][n(352)](t[n(357)]))?n(325)+e:null!=t[n(449)]&&t[n(362)](n(449))&&(e=s[n(457)][n(352)](t[n(449)]))?n(426)+e:null!=t[n(365)]&&t[n(362)](n(365))&&!r[n(400)](t[n(365)])?n(402):null!=t[n(397)]&&t[n(362)](n(397))&&(e=s[n(457)][n(352)](t[n(397)]))?n(382)+e:null!=t[n(404)]&&t[n(362)](n(404))&&n(451)!=typeof t[n(404)]?n(440):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(329)])return t;var n=new(s[e(329)]);if(null!=t[e(357)]){if(e(300)!=typeof t[e(357)])throw TypeError(e(319));n[e(357)]=s[e(457)][e(350)](t[e(357)])}if(null!=t[e(449)]){if(e(300)!=typeof t[e(449)])throw TypeError(e(316));n[e(449)]=s[e(457)][e(350)](t[e(449)])}if(null!=t[e(365)]&&(n[e(365)]=t[e(365)]>>>0),null!=t[e(397)]){if(e(300)!=typeof t[e(397)])throw TypeError(e(320));n[e(397)]=s[e(457)][e(350)](t[e(397)])}return null!=t[e(404)]&&(n[e(404)]=Boolean(t[e(404)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};return e[n(339)]&&(r[n(357)]=null,r[n(449)]=null,r[n(365)]=0,r[n(397)]=null,r[n(404)]=!1),null!=t[n(357)]&&t[n(362)](n(357))&&(r[n(357)]=s[n(457)][n(354)](t[n(357)],e)),null!=t[n(449)]&&t[n(362)](n(449))&&(r[n(449)]=s[n(457)][n(354)](t[n(449)],e)),null!=t[n(365)]&&t[n(362)](n(365))&&(r[n(365)]=t[n(365)]),null!=t[n(397)]&&t[n(362)](n(397))&&(r[n(397)]=s[n(457)][n(354)](t[n(397)],e)),null!=t[n(404)]&&t[n(362)](n(404))&&(r[n(404)]=t[n(404)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(360)},i}(),s[t(457)]=function(){var o=t;function i(t){var e=gr;if(this[e(393)]=[],t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(285)]="",i[o(446)][o(356)]=!1,i[o(446)][o(346)]=!1,i[o(446)][o(393)]=r[o(310)],i[o(446)][o(301)]="",i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;if(e||(e=n[r(309)]()),null!=t[r(285)]&&Object[r(362)][r(441)](t,r(285))&&e[r(442)](10)[r(315)](t[r(285)]),null!=t[r(356)]&&Object[r(362)][r(441)](t,r(356))&&e[r(442)](16)[r(327)](t[r(356)]),null!=t[r(346)]&&Object[r(362)][r(441)](t,r(346))&&e[r(442)](24)[r(327)](t[r(346)]),null!=t[r(393)]&&t[r(393)][r(291)]){e[r(442)](34)[r(419)]();for(var s=0;s<t[r(393)][r(291)];++s)e[r(442)](t[r(393)][s]);e[r(378)]()}return null!=t[r(301)]&&Object[r(362)][r(441)](t,r(301))&&e[r(442)](42)[r(315)](t[r(301)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var r=o;t instanceof e||(t=e[r(309)](t));for(var i=void 0===n?t[r(284)]:t[r(394)]+n,a=new(s[r(457)]);t[r(394)]<i;){var c=t[r(442)]();switch(c>>>3){case 1:a[r(285)]=t[r(315)]();break;case 2:a[r(356)]=t[r(327)]();break;case 3:a[r(346)]=t[r(327)]();break;case 4:if(a[r(393)]&&a[r(393)][r(291)]||(a[r(393)]=[]),2==(7&c))for(var u=t[r(442)]()+t[r(394)];t[r(394)]<u;)a[r(393)][r(345)](t[r(442)]());else a[r(393)][r(345)](t[r(442)]());break;case 5:a[r(301)]=t[r(315)]();break;default:t[r(367)](7&c)}}return a},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;if(e(300)!=typeof t||null===t)return e(403);if(null!=t[e(285)]&&t[e(362)](e(285))&&!r[e(307)](t[e(285)]))return e(458);if(null!=t[e(356)]&&t[e(362)](e(356))&&e(451)!=typeof t[e(356)])return e(408);if(null!=t[e(346)]&&t[e(362)](e(346))&&e(451)!=typeof t[e(346)])return e(341);if(null!=t[e(393)]&&t[e(362)](e(393))){if(!Array[e(294)](t[e(393)]))return e(377);for(var n=0;n<t[e(393)][e(291)];++n)if(!r[e(400)](t[e(393)][n]))return e(330)}return null!=t[e(301)]&&t[e(362)](e(301))&&!r[e(307)](t[e(301)])?e(412):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(457)])return t;var n=new(s[e(457)]);if(null!=t[e(285)]&&(n[e(285)]=String(t[e(285)])),null!=t[e(356)]&&(n[e(356)]=Boolean(t[e(356)])),null!=t[e(346)]&&(n[e(346)]=Boolean(t[e(346)])),t[e(393)]){if(!Array[e(294)](t[e(393)]))throw TypeError(e(369));n[e(393)]=[];for(var r=0;r<t[e(393)][e(291)];++r)n[e(393)][r]=t[e(393)][r]>>>0}return null!=t[e(301)]&&(n[e(301)]=String(t[e(301)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(313)]||e[n(339)])&&(r[n(393)]=[]),e[n(339)]&&(r[n(285)]="",r[n(356)]=!1,r[n(346)]=!1,r[n(301)]=""),null!=t[n(285)]&&t[n(362)](n(285))&&(r[n(285)]=t[n(285)]),null!=t[n(356)]&&t[n(362)](n(356))&&(r[n(356)]=t[n(356)]),null!=t[n(346)]&&t[n(362)](n(346))&&(r[n(346)]=t[n(346)]),t[n(393)]&&t[n(393)][n(291)]){r[n(393)]=[];for(var s=0;s<t[n(393)][n(291)];++s)r[n(393)][s]=t[n(393)][s]}return null!=t[n(301)]&&t[n(362)](n(301))&&(r[n(301)]=t[n(301)]),r},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(430)},i}(),s[t(383)]=function(){var r=t;function o(t){var e=gr;if(t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(446)][r(409)]=null,o[r(446)][r(423)]=null,o[r(309)]=function(t){return new o(t)},o[r(401)]=function(t,e){var o=r;return e||(e=n[o(309)]()),null!=t[o(409)]&&Object[o(362)][o(441)](t,o(409))&&s[o(457)][o(401)](t[o(409)],e[o(442)](10)[o(419)]())[o(378)](),null!=t[o(423)]&&Object[o(362)][o(441)](t,o(423))&&s[o(457)][o(401)](t[o(423)],e[o(442)](18)[o(419)]())[o(378)](),e},o[r(299)]=function(t,e){var n=r;return this[n(401)](t,e)[n(378)]()},o[r(432)]=function(t,n){var o=r;t instanceof e||(t=e[o(309)](t));for(var i=void 0===n?t[o(284)]:t[o(394)]+n,a=new(s[o(383)]);t[o(394)]<i;){var c=t[o(442)]();switch(c>>>3){case 1:a[o(409)]=s[o(457)][o(432)](t,t[o(442)]());break;case 2:a[o(423)]=s[o(457)][o(432)](t,t[o(442)]());break;default:t[o(367)](7&c)}}return a},o[r(344)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},o[r(352)]=function(t){var e,n=r;return n(300)!=typeof t||null===t?n(403):null!=t[n(409)]&&t[n(362)](n(409))&&(e=s[n(457)][n(352)](t[n(409)]))?n(454)+e:null!=t[n(423)]&&t[n(362)](n(423))&&(e=s[n(457)][n(352)](t[n(423)]))?n(428)+e:null},o[r(350)]=function(t){var e=r;if(t instanceof s[e(383)])return t;var n=new(s[e(383)]);if(null!=t[e(409)]){if(e(300)!=typeof t[e(409)])throw TypeError(e(366));n[e(409)]=s[e(457)][e(350)](t[e(409)])}if(null!=t[e(423)]){if(e(300)!=typeof t[e(423)])throw TypeError(e(388));n[e(423)]=s[e(457)][e(350)](t[e(423)])}return n},o[r(354)]=function(t,e){var n=r;e||(e={});var o={};return e[n(339)]&&(o[n(409)]=null,o[n(423)]=null),null!=t[n(409)]&&t[n(362)](n(409))&&(o[n(409)]=s[n(457)][n(354)](t[n(409)],e)),null!=t[n(423)]&&t[n(362)](n(423))&&(o[n(423)]=s[n(457)][n(354)](t[n(423)],e)),o},o[r(446)][r(314)]=function(){var t=r;return this[t(361)][t(354)](this,u[t(448)][t(398)])},o[r(385)]=function(t){var e=r;return void 0===t&&(t=e(293)),t+e(406)},o}(),s[t(379)]=function(){var o=t;function i(t){var e=gr;if(this[e(317)]=[],this[e(351)]={},t)for(var n=Object[e(308)](t),r=0;r<n[e(291)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(446)][o(392)]="",i[o(446)][o(317)]=r[o(310)],i[o(446)][o(387)]="",i[o(446)][o(351)]=r[o(292)],i[o(446)][o(333)]="",i[o(309)]=function(t){return new i(t)},i[o(401)]=function(t,e){var r=o;if(e||(e=n[r(309)]()),null!=t[r(392)]&&Object[r(362)][r(441)](t,r(392))&&e[r(442)](10)[r(315)](t[r(392)]),null!=t[r(317)]&&t[r(317)][r(291)])for(var i=0;i<t[r(317)][r(291)];++i)s[r(379)][r(401)](t[r(317)][i],e[r(442)](18)[r(419)]())[r(378)]();if(null!=t[r(387)]&&Object[r(362)][r(441)](t,r(387))&&e[r(442)](26)[r(315)](t[r(387)]),null!=t[r(351)]&&Object[r(362)][r(441)](t,r(351))){var a=Object[r(308)](t[r(351)]);for(i=0;i<a[r(291)];++i)e[r(442)](34)[r(419)]()[r(442)](10)[r(315)](a[i])[r(442)](16)[r(327)](t[r(351)][a[i]])[r(378)]()}return null!=t[r(333)]&&Object[r(362)][r(441)](t,r(333))&&e[r(442)](42)[r(315)](t[r(333)]),e},i[o(299)]=function(t,e){var n=o;return this[n(401)](t,e)[n(378)]()},i[o(432)]=function(t,n){var i=o;t instanceof e||(t=e[i(309)](t));for(var a,c,u=void 0===n?t[i(284)]:t[i(394)]+n,d=new(s[i(379)]);t[i(394)]<u;){var l=t[i(442)]();switch(l>>>3){case 1:d[i(392)]=t[i(315)]();break;case 2:d[i(317)]&&d[i(317)][i(291)]||(d[i(317)]=[]),d[i(317)][i(345)](s[i(379)][i(432)](t,t[i(442)]()));break;case 3:d[i(387)]=t[i(315)]();break;case 4:d[i(351)]===r[i(292)]&&(d[i(351)]={});var p=t[i(442)]()+t[i(394)];for(a="",c=!1;t[i(394)]<p;){var h=t[i(442)]();switch(h>>>3){case 1:a=t[i(315)]();break;case 2:c=t[i(327)]();break;default:t[i(367)](7&h)}}d[i(351)][a]=c;break;case 5:d[i(333)]=t[i(315)]();break;default:t[i(367)](7&l)}}return d},i[o(344)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(432)](t,t[n(442)]())},i[o(352)]=function(t){var e=o;if(e(300)!=typeof t||null===t)return e(403);if(null!=t[e(392)]&&t[e(362)](e(392))&&!r[e(307)](t[e(392)]))return e(410);if(null!=t[e(317)]&&t[e(362)](e(317))){if(!Array[e(294)](t[e(317)]))return e(411);for(var n=0;n<t[e(317)][e(291)];++n){var i=s[e(379)][e(352)](t[e(317)][n]);if(i)return e(328)+i}}if(null!=t[e(387)]&&t[e(362)](e(387))&&!r[e(307)](t[e(387)]))return e(425);if(null!=t[e(351)]&&t[e(362)](e(351))){if(!r[e(324)](t[e(351)]))return e(452);var a=Object[e(308)](t[e(351)]);for(n=0;n<a[e(291)];++n)if(e(451)!=typeof t[e(351)][a[n]])return e(376)}return null!=t[e(333)]&&t[e(362)](e(333))&&!r[e(307)](t[e(333)])?e(429):null},i[o(350)]=function(t){var e=o;if(t instanceof s[e(379)])return t;var n=new(s[e(379)]);if(null!=t[e(392)]&&(n[e(392)]=String(t[e(392)])),t[e(317)]){if(!Array[e(294)](t[e(317)]))throw TypeError(e(386));n[e(317)]=[];for(var r=0;r<t[e(317)][e(291)];++r){if(e(300)!=typeof t[e(317)][r])throw TypeError(e(359));n[e(317)][r]=s[e(379)][e(350)](t[e(317)][r])}}if(null!=t[e(387)]&&(n[e(387)]=String(t[e(387)])),t[e(351)]){if(e(300)!=typeof t[e(351)])throw TypeError(e(353));n[e(351)]={};var i=Object[e(308)](t[e(351)]);for(r=0;r<i[e(291)];++r)n[e(351)][i[r]]=Boolean(t[e(351)][i[r]])}return null!=t[e(333)]&&(n[e(333)]=String(t[e(333)])),n},i[o(354)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(313)]||e[n(339)])&&(i[n(317)]=[]),(e[n(286)]||e[n(339)])&&(i[n(351)]={}),e[n(339)]&&(i[n(392)]="",i[n(387)]="",i[n(333)]=""),null!=t[n(392)]&&t[n(362)](n(392))&&(i[n(392)]=t[n(392)]),t[n(317)]&&t[n(317)][n(291)]){i[n(317)]=[];for(var a=0;a<t[n(317)][n(291)];++a)i[n(317)][a]=s[n(379)][n(354)](t[n(317)][a],e)}if(null!=t[n(387)]&&t[n(362)](n(387))&&(i[n(387)]=t[n(387)]),t[n(351)]&&(r=Object[n(308)](t[n(351)]))[n(291)])for(i[n(351)]={},a=0;a<r[n(291)];++a)i[n(351)][r[a]]=t[n(351)][r[a]];return null!=t[n(333)]&&t[n(362)](n(333))&&(i[n(333)]=t[n(333)]),i},i[o(446)][o(314)]=function(){var t=o;return this[t(361)][t(354)](this,u[t(448)][t(398)])},i[o(385)]=function(t){var e=o;return void 0===t&&(t=e(293)),t+e(444)},i}(),s})();function br(){var t=["sourcePosition","653061QccjLR","2ALPZpM","rootName: string expected","newName",".InsertOperation.position: object expected","fork","shouldReceiveAttributes: boolean expected",".AttributeOperation.range: object expected","newValueJson: string expected","end","InsertOperation","data: string expected","graveyardPosition.","/InsertOperation","end.","attributesJson: string expected","/Position","oldValueJson: string expected","decode","newRange.","oldValueBoolean",".InsertOperation.nodes: array expected","newValueJson","range.",".MergeOperation.sourcePosition: object expected","isAdd","wasUndone: boolean expected","call","uint32","key","/Element",".MarkerOperation.newRange: object expected","prototype","5052PETngT","util","graveyardPosition","newName: string expected","boolean","attributesBoolean: object expected","MoveOperation","start.","/MoveOperation","MergeOperation","Position","root: string expected","AttributeOperation","len","root","objects","3922710liUaXn","nodes: array expected","oldRange.","nodes.","length","emptyObject","type.googleapis.com","isArray","elementName","oldValueBoolean: boolean expected","range","4179VQtjrh","encodeDelimited","object","stickiness","elementName: string expected","newValueBoolean: boolean expected","/MarkerOperation","3834NmUuCV","/AttributeOperation","isString","keys","create","emptyArray","oldValueJson","6536608DmxyWC","arrays","toJSON","string",".SplitOperation.graveyardPosition: object expected","children","shouldReceiveAttributes",".SplitOperation.splitPosition: object expected",".SplitOperation.insertionPosition: object expected",".MoveOperation.sourcePosition: object expected","/RenameOperation","default","isObject","splitPosition.","affectsData","bool","children.","SplitOperation","path: integer[] expected","position.",".RenameOperation.position: object expected","attributesJson",".MarkerOperation.oldRange: object expected","oldName: string expected","position","RootOperation","newValueBoolean","defaults","newRange","rootGraveyard: boolean expected","RenameOperation","/RootAttributeOperation","decodeDelimited","push","rootGraveyard","oldRange","/RootOperation","rootName","fromObject","attributesBoolean","verify",".Element.attributesBoolean: object expected","toObject","nodes","rootMain","splitPosition","RootAttributeOperation",".Element.children: object expected","/SplitOperation","constructor","hasOwnProperty","isAdd: boolean expected","4YfPMVx","howMany",".Range.start: object expected","skipType","/MergeOperation",".Position.path: array expected","1545950flZLYy","targetPosition","Writer","roots","oldName",".MergeOperation.targetPosition: object expected","attributesBoolean: boolean{k:string} expected","path: array expected","ldelim","Element","targetPosition.",".MoveOperation.targetPosition: object expected","insertionPosition.","Range",".InsertOperation.nodes: object expected","getTypeUrl",".Element.children: array expected","data",".Range.end: object expected","484831kBZgbT","MarkerOperation",".MergeOperation.graveyardPosition: object expected","name","path","pos","16670bcDEYu","Reader","insertionPosition","toJSONOptions","sourcePosition.","isInteger","encode","howMany: integer expected","object expected","wasUndone","key: string expected","/Range","affectsData: boolean expected","rootMain: boolean expected","start","name: string expected","children: array expected","stickiness: string expected"];return(br=function(){return t})()}function Ir(){const t=["verify","_protobufRoot","decode","_protobuf","4002lBuuEX","compress","2978czqceU","187617rphigg","13540VJNmok","6534oQNGhg","getDescriptor","toObject","9IEzTSj","2218314kejeBy","encode","create","decompress","1985TEKhdO","140UCDDyL","1198064JQUiyt","499368BhqOpF","finish"];return(Ir=function(){return t})()}const Or=vr;function vr(t,e){const n=Ir();return(vr=function(t,e){return n[t-=463]})(t,e)}!function(t){const e=vr,n=t();for(;;)try{if(188671===parseInt(e(481))/1*(-parseInt(e(471))/2)+-parseInt(e(482))/3+parseInt(e(472))/4+parseInt(e(470))/5*(-parseInt(e(479))/6)+-parseInt(e(466))/7+parseInt(e(473))/8*(-parseInt(e(465))/9)+-parseInt(e(483))/10*(-parseInt(e(484))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ir);class wr{[Or(476)];constructor(){this[Or(476)]=yr}[Or(463)](t){return new Sr(this[Or(476)][t])}}class Sr{[Or(478)];constructor(t){this[Or(478)]=t}[Or(480)](t){const e=Or,n=this[e(478)][e(475)](t);if(n)throw Error(n);return this[e(478)][e(467)](this[e(478)][e(468)](t))[e(474)]()}[Or(469)](t){const e=Or;return this[e(478)][e(464)](this[e(478)][e(477)](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(function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)){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}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 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 Zr(t){return Qr(t)}function Xr(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)||Xr(t)&&Xr(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=Zr(t);return r[n(280)][r[n(280)][n(296)]-1]+=e,r}function os(t,e){const n=as();return(os=function(t,e){return n[t-=279]})(t,e)}function is(t,e){const n=os;return t[n(281)]===e[n(281)]&&ns(t[n(280)],e[n(280)])}function as(){const t=["470GDULKu","1432922NUJdkn","main","nodes","rootGraveyard","rootMain","164465jXGuIJ","110ZTeqOP","$graveyard","273528krLtpp","82557FNeNSN","length","853637WlXpLW","16794272SYndnz","path","root","3COSPAW","552sHqxih","1916084YuBqob"];return(as=function(){return t})()}function cs(t){const e=os;ds(t,t=>(e(287)==t[e(281)]?(t[e(290)]=!0,delete t[e(281)]):e(293)==t[e(281)]&&(t[e(289)]=!0,delete t[e(281)]),t))}function us(t){const e=os;ds(t,t=>(t[e(290)]?(t[e(281)]=e(287),delete t[e(290)]):t[e(289)]&&(t[e(281)]=e(293),delete t[e(289)]),t))}function ds(t,e){const n=os;for(const r in t){const s=t[r];n(288)!==r&&rs(s)&&(s[n(280)]&&(s[n(281)]||s[n(290)]||s[n(289)])?t[r]=e(s):ds(s,e))}return t}function ls(t,e){const n=hs();return(ls=function(t,e){return n[t-=421]})(t,e)}!function(t){const e=os,n=t();for(;;)try{if(912273===-parseInt(e(297))/1+parseInt(e(286))/2+parseInt(e(282))/3*(-parseInt(e(284))/4)+-parseInt(e(292))/5*(-parseInt(e(294))/6)+parseInt(e(291))/7*(parseInt(e(283))/8)+-parseInt(e(295))/9*(-parseInt(e(285))/10)+-parseInt(e(279))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(as);const ps=ls;function hs(){const t=["2GgeZlk","1422506luyHvh","decompress","compress","__className","585144iHspgS","6320688DSLcqf","_operationName","7083265KMihTR","types","17614683rWYHjt","_protobufDescriptor","10600976FKiTAN","shift","buffers","_id","10iPODUk","27185KqEbuI","push","1014HgSECs"];return(hs=function(){return t})()}!function(t){const e=ls,n=t();for(;;)try{if(998847===parseInt(e(439))/1*(parseInt(e(440))/2)+-parseInt(e(424))/3+-parseInt(e(425))/4+-parseInt(e(436))/5*(parseInt(e(438))/6)+-parseInt(e(427))/7+parseInt(e(431))/8+-parseInt(e(429))/9*(-parseInt(e(435))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class fs{[ps(434)];[ps(426)];[ps(430)];constructor(t,e,n){const r=ps;this[r(434)]=t,this[r(426)]=e,this[r(430)]=n}[ps(422)](t,e){const n=ps,r=e[n(432)]();return cs(r),t[n(433)][n(437)](this[n(430)][n(422)](r)),t[n(428)][n(437)](this[n(434)]),!0}[ps(421)](t,e){const n=ps;e[n(428)][n(432)]();const r=this[n(430)][n(421)](e[n(433)][n(432)]());us(r),r[n(423)]=this[n(426)],t[n(437)](r)}}const ms=gs;function gs(t,e){const n=ys();return(gs=function(t,e){return n[t-=426]})(t,e)}function ys(){const t=["compress","6038532dZQXEj","9244008YVKfXS","_serializeOneOf","103481ZYCfJq","23443370IudLOL","_operationName","_id","_deserializeOneOf","468LfiLKQ","newValue","buffers","Boolean","493597TYwfNe","stringify","_protobufDescriptor","9ChBHhU","parse","Json","shift","3954iSnhhk","boolean","200XqjqxH","types","__className","push","decompress","oldValue","43205cxrmTG"];return(ys=function(){return t})()}!function(t){const e=gs,n=t();for(;;)try{if(582797===-parseInt(e(438))/1+parseInt(e(447))/2*(-parseInt(e(445))/3)+-parseInt(e(434))/4*(-parseInt(e(453))/5)+-parseInt(e(426))/6+parseInt(e(429))/7+-parseInt(e(427))/8+-parseInt(e(441))/9*(-parseInt(e(430))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ys);class bs extends fs{[ms(454)](t,e){const n=ms,r=e[n(444)]();return this[n(428)](n(452),r),this[n(428)](n(435),r),cs(r),t[n(436)][n(450)](this[n(440)][n(454)](r)),t[n(448)][n(450)](this[n(432)]),!0}[ms(451)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(440)][n(451)](s[n(444)]());r[n(444)](),this[n(433)](n(452),o),this[n(433)](n(435),o),us(o),o[n(449)]=this[n(431)],t[n(450)](o)}[ms(428)](t,e){const n=ms,r=e[t];n(446)==typeof r?e[t+n(437)]=r:e[t+n(443)]=JSON[n(439)](r)}[ms(433)](t,e){const n=ms,r=t+n(443);e[r]?(e[t]=JSON[n(442)](e[r]),delete e[r]):(e[t]=e[t+n(437)],delete e[t+n(437)])}}const Is=vs;function Os(){const t=["nodes","attributesJson","20946913NJAzsa","__className","_protobufDescriptor","keys","every","parse","boolean","5XXHVwt","attributes","217daDfDm","1019127irUjrf","246504VfZRlj","_operationName","12xiVjFg","_id","push","children","102140VPHJqm","1401138PaKoVc","_serializeNodesAttributes","_areValuesBoolean","660SVJMnb","54610ihnoAt","compress","shift","attributesBoolean","decompress","4xssAGD","buffers","_deserializeNodesAttributes","812364oqLmsl","stringify","49CahHsK","types"];return(Os=function(){return t})()}function vs(t,e){const n=Os();return(vs=function(t,e){return n[t-=112]})(t,e)}!function(t){const e=vs,n=t();for(;;)try{if(975716===-parseInt(e(131))/1*(parseInt(e(121))/2)+parseInt(e(145))/3*(parseInt(e(126))/4)+-parseInt(e(142))/5*(parseInt(e(129))/6)+-parseInt(e(144))/7*(-parseInt(e(146))/8)+parseInt(e(117))/9+-parseInt(e(116))/10*(parseInt(e(120))/11)+parseInt(e(112))/12*(parseInt(e(135))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Os);class ws extends fs{[Is(122)](t,e){const n=Is,r=e[n(123)]();return this[n(118)](r[n(133)]),cs(r),t[n(127)][n(114)](this[n(137)][n(122)](r)),t[n(132)][n(114)](this[n(113)]),!0}[Is(125)](t,e){const n=Is,{types:r,buffers:s}=e,o=this[n(137)][n(125)](s[n(123)]());r[n(123)](),o[n(133)]||(o[n(133)]=[]),this[n(128)](o[n(133)]),us(o),o[n(136)]=this[n(147)],t[n(114)](o)}[Is(118)](t){const e=Is;for(const n of t){if(n[e(143)]){const t=n[e(143)];this[e(119)](t)?n[e(124)]=t:n[e(134)]=JSON[e(130)](t)}n[e(115)]&&this[e(118)](n[e(115)])}}[Is(128)](t){const e=Is;for(const n of t)(n[e(124)]||n[e(134)])&&(n[e(124)]?(n[e(143)]=n[e(124)],delete n[e(124)]):(n[e(143)]=JSON[e(140)](n[e(134)]),delete n[e(134)])),n[e(115)]&&this[e(128)](n[e(115)])}[Is(119)](t){const e=Is;return Object[e(138)](t)[e(139)](n=>e(141)==typeof t[n])}}const Ss=As;function ks(){const t=["13998btjzmA","newRange","9duBKFa","2155nBuUZu","500376EtfApl","2666192PlxQlU","50QKkzTD","830762AhkLdf","length","78603sziaCd","decompress","oldRange","827563SloaVg","1099fARjKA","2236QjqdmV"];return(ks=function(){return t})()}function As(t,e){const n=ks();return(As=function(t,e){return n[t-=238]})(t,e)}!function(t){const e=As,n=t();for(;;)try{if(237127===-parseInt(e(238))/1+-parseInt(e(251))/2+parseInt(e(248))/3+parseInt(e(243))/4*(parseInt(e(247))/5)+parseInt(e(244))/6*(parseInt(e(242))/7)+-parseInt(e(249))/8*(-parseInt(e(246))/9)+-parseInt(e(250))/10*(parseInt(e(241))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ks);class Ts extends fs{[Ss(239)](t,e){const n=Ss;super[n(239)](t,e);const r=t[t[n(252)]-1];r[n(240)]||(r[n(240)]=null),r[n(245)]||(r[n(245)]=null)}}var _s=Cs;function Cs(t,e){var n=Ps();return(Cs=function(t,e){return n[t-=411]})(t,e)}function Ps(){var t=["compress","6Uxtyxo","_operationName","10iXzKkb","types","13926231ftFwoc","63855814ZReuxZ","8iJTkfW","decompress","push","shift","43942aHUDtb","2420049jDxFIe","9695546fUBAFG","3122915bUTuct","3313924aJxUKl","_id","71fGPdBZ"];return(Ps=function(){return t})()}!function(t){for(var e=Cs,n=t();;)try{if(947051===parseInt(e(411))/1*(parseInt(e(423))/2)+parseInt(e(424))/3+parseInt(e(427))/4+parseInt(e(426))/5+-parseInt(e(413))/6*(-parseInt(e(425))/7)+-parseInt(e(419))/8*(-parseInt(e(417))/9)+parseInt(e(415))/10*(-parseInt(e(418))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ps);class Es extends fs{[_s(412)](t,e){var n=_s;return e[n(422)](),t[n(416)][n(421)](this[n(428)]),!0}[_s(420)](t,e){var n=_s;e[n(416)][n(422)](),t[n(421)]({__className:this[n(414)]})}}const js=xs;function Ds(){const t=["replace","10iceKvk","2916435sUyOva","6uBVLxR","name","11144HBbjOc","startsWith","1118232klMFbv","__className","_omittedNamespace","23271303ZZyUBm","1066364ukboUQ","58896OjGFud","MarkerOperation","264PMvIeS","decompress","5433309sSvwaH","compress","2359oCmAaH","length"];return(Ds=function(){return t})()}function xs(t,e){const n=Ds();return(xs=function(t,e){return n[t-=498]})(t,e)}!function(t){const e=xs,n=t();for(;;)try{if(850810===-parseInt(e(509))/1+-parseInt(e(505))/2+parseInt(e(510))/3*(-parseInt(e(512))/4)+parseInt(e(500))/5*(parseInt(e(501))/6)+parseInt(e(516))/7*(parseInt(e(503))/8)+parseInt(e(514))/9+-parseInt(e(499))/10*(-parseInt(e(508))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ds);class Rs extends Ts{[js(507)];constructor(t,e,n,r){const s=js;super(t,e,n),this[s(507)]=r+":"}[js(515)](t,e){const n=js;return!(n(511)!=e[0][n(506)]||!e[0][n(502)][n(504)](this[n(507)])||(e[0][n(502)]=e[0][n(502)][n(498)](new RegExp("^"+this[n(507)]),""),super[n(515)](t,e),0))}[js(513)](t,e){const n=js;super[n(513)](t,e);const r=t[t[n(517)]-1];r[n(502)]=this[n(507)]+r[n(502)]}}const Ns=Vs;function Vs(t,e){const n=Bs();return(Vs=function(t,e){return n[t-=434]})(t,e)}!function(t){const e=Vs,n=t();for(;;)try{if(763060===parseInt(e(458))/1+parseInt(e(436))/2*(-parseInt(e(440))/3)+-parseInt(e(457))/4*(-parseInt(e(454))/5)+parseInt(e(453))/6*(parseInt(e(439))/7)+parseInt(e(449))/8*(parseInt(e(443))/9)+-parseInt(e(446))/10+parseInt(e(435))/11*(-parseInt(e(455))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bs);class Ms{[Ns(441)];[Ns(452)];constructor(t,e){const n=Ns;this[n(441)]=t,this[n(452)]=e}[Ns(434)](t,e){const n=Ns;let r;for(;e[n(442)]>1&&this[n(456)](e[0],e[1]);)r?(r=this[n(438)](e[n(447)](),r),t[n(459)][n(437)](0)):(r=Zr(e[n(447)]()),t[n(459)][n(437)](this[n(441)]));return!!r&&(r=this[n(438)](e[n(447)](),r),t[n(459)][n(437)](0),t[n(445)][n(437)](this[n(448)](r)),!0)}[Ns(451)](t,e){const n=Ns,r=this[n(450)](e);for(;0==e[n(459)][0];)e[n(459)][n(447)](),t[n(437)](this[n(444)](r));t[n(437)](r)}}function Bs(){const t=["22JgnKSn","push","_combineNext","6727nFGlDT","130533VptrOL","_id","length","45jdcLgZ","_splitCurrent","buffers","8320170fWMxlL","shift","_compressSingleOperation","704112KCZJko","_decompressSingleOperation","decompress","_context","6702ChIYAU","5fSkNEc","1320reCSqL","_compareOperations","1356988GOayLP","845194CmgRra","types","compress","62425VhLTPw"];return(Bs=function(){return t})()}const Js=Us;function Us(t,e){const n=qs();return(Us=function(t,e){return n[t-=415]})(t,e)}function qs(){const t=["16429jgYeRH","from","length","_getCompressorByName","_compressSingleOperation","position","substr","_context","895711Nbplhr","_compareOperations","492095gJiuZk","every","value","_checkOperation","decompress","1124994aVuSRR","_splitCurrent","keys","__className","171720iDOZLr","iterator","attributes","InsertOperation","_decompressSingleOperation","buffers","next","wasUndone","17870913muFOKO","_compareAttributes","_combineNext","2984AAFJsI","compress","nodes","data","42hEOzpk","950086KWUizQ"];return(qs=function(){return t})()}!function(t){const e=Us,n=t();for(;;)try{if(531533===parseInt(e(432))/1+parseInt(e(423))/2+-parseInt(e(439))/3+-parseInt(e(443))/4+parseInt(e(434))/5*(parseInt(e(422))/6)+parseInt(e(424))/7*(parseInt(e(418))/8)+-parseInt(e(415))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qs);class Ls extends Ms{[Js(417)](t,e){const n=Js;return e[n(420)][0][n(421)]+=t[n(420)][0][n(421)],e}[Js(440)](t){const e=Js,n=Zr(t),r=n[e(420)][0],s=t[e(420)][0],o=s[e(421)][Symbol[e(444)]]()[e(449)]()[e(436)],i=o[e(426)];return r[e(421)]=o,s[e(421)]=s[e(421)][e(430)](i),t[e(429)]=ss(t[e(429)],i),n}[Js(433)](t,e){const n=Js;if(this[n(437)](t)&&this[n(437)](e)){const r=t[n(420)][0][n(421)][n(426)],s=is(ss(t[n(429)],r),e[n(429)]),o=t[n(420)][0],i=e[n(420)][0];return s&&this[n(416)](o,i)}return!1}[Js(428)](t){const e=Js,n={types:[],buffers:[],baseVersion:0};return this[e(431)][e(427)](e(446))[e(419)](n,[t]),n[e(448)][0]}[Js(447)](t){const e=Js,n=[];return this[e(431)][e(427)](e(446))[e(438)](n,t),n[0]}[Js(437)](t){const e=Js;return e(446)==t[e(442)]&&1==t[e(420)][e(426)]&&t[e(420)][0][e(421)]&&!t[e(450)]&&1==Array[e(425)](t[e(420)][0][e(421)])[e(426)]}[Js(416)](t,e){const n=Js,r=Object[n(441)](t[n(445)]||{}),s=Object[n(441)](e[n(445)]||{});return r[n(426)]===s[n(426)]&&r[n(435)](r=>e[n(445)][r]&&e[n(445)][r]===t[n(445)][r])}}const Gs=Ys;function Ys(t,e){const n=Hs();return(Ys=function(t,e){return n[t-=235]})(t,e)}function Hs(){const t=["_decompressSingleOperation","targetPosition","_splitCurrent","_compressSingleOperation","6aujplb","wasUndone","349061onRYVG","decompress","2200355EhbOQC","2TTMRJL","_compareOperations","10CXxBVk","howMany","_combineNext","11009824XiZjAO","buffers","4933800WlvjdQ","$graveyard","_getCompressorByName","sourcePosition","_context","__className","compress","3487539vWcXlo","root","1897023LGsAXg","60boKRyU","_checkOperation","7517565yioQHJ","12ilmTbq","MoveOperation"];return(Hs=function(){return t})()}!function(t){const e=Ys,n=t();for(;;)try{if(862018===parseInt(e(249))/1+-parseInt(e(252))/2*(-parseInt(e(237))/3)+-parseInt(e(241))/4*(-parseInt(e(251))/5)+-parseInt(e(247))/6*(parseInt(e(257))/7)+-parseInt(e(259))/8+-parseInt(e(240))/9*(parseInt(e(254))/10)+-parseInt(e(235))/11*(-parseInt(e(238))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Hs);class zs extends Ms{[Gs(256)](t,e){const n=Gs;return e[n(255)]++,e[n(262)]=Zr(t[n(262)]),e}[Gs(245)](t){const e=Gs,n=Zr(t);return t[e(255)]--,n[e(255)]=1,n[e(262)]=ss(n[e(262)],t[e(255)]),n}[Gs(253)](t,e){const n=Gs;return!(!this[n(239)](t)||!this[n(239)](e))&&is(ss(t[n(262)],-1),e[n(262)])&&is(t[n(244)],e[n(244)])}[Gs(246)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(263)][e(261)](e(242))[e(265)](n,[t]),n[e(258)][0]}[Gs(243)](t){const e=Gs,n=[];return this[e(263)][e(261)](e(242))[e(250)](n,t),n[0]}[Gs(239)](t){const e=Gs;return e(242)==t[e(264)]&&e(260)==t[e(244)][e(236)]&&1==t[e(255)]&&!t[e(248)]}}const Fs=Ws;function Ks(){const t=["707055AqgWKW","$graveyard","1195216kGyCwr","_compareOperations","MoveOperation","_context","sourcePosition","870834FNAoTP","wasUndone","_decompressSingleOperation","_checkOperation","decompress","__className","8Odyxoi","61958JCGrbJ","2681694IdIGZS","_getCompressorByName","howMany","compress","_splitCurrent","targetPosition","_compressSingleOperation","_combineNext","14110mbHmkz","918LShiBb","205387SkZETB","root","buffers"];return(Ks=function(){return t})()}function Ws(t,e){const n=Ks();return(Ws=function(t,e){return n[t-=483]})(t,e)}!function(t){const e=Ws,n=t();for(;;)try{if(481308===-parseInt(e(509))/1+parseInt(e(488))/2+-parseInt(e(502))/3*(-parseInt(e(487))/4)+-parseInt(e(497))/5*(-parseInt(e(498))/6)+-parseInt(e(499))/7+parseInt(e(504))/8+parseInt(e(489))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ks);class Qs extends Ms{[Fs(496)](t,e){return e[Fs(491)]++,e}[Fs(493)](t){const e=Fs,n=Zr(t);return n[e(491)]=1,t[e(491)]--,n}[Fs(505)](t,e){const n=Fs;return!(!this[n(484)](t)||!this[n(484)](e))&&is(t[n(508)],e[n(508)])&&is(t[n(494)],e[n(494)])}[Fs(495)](t){const e=Fs,n={types:[],buffers:[],baseVersion:0};return this[e(507)][e(490)](e(506))[e(492)](n,[t]),n[e(501)][0]}[Fs(483)](t){const e=Fs,n=[];return this[e(507)][e(490)](e(506))[e(485)](n,t),n[0]}[Fs(484)](t){const e=Fs;return e(506)==t[e(486)]&&e(503)==t[e(494)][e(500)]&&1==t[e(491)]&&!t[e(510)]}}function Zs(t,e){const n=$s();return(Zs=function(t,e){return n[t-=124]})(t,e)}const Xs=Zs;function $s(){const t=["__className","newRange","_compressSingleOperation","push","shift","types","split","56rnymzF","name","user:position:","end","decompress","_decompressSingleOperation","_id","MarkerOperation","129951HHEkzg","start","436800VXkmEi","_context","_getCompressorByName","_compareOperations","28180KGIQaV","startsWith","5110tseNUT","buffers","3243WLgeFY","compress","oldRange","stickiness","6622CzccZV","toNone","510837JFHWKD","188735syGNkM","58NLcimP","user:","6nPGtjn"];return($s=function(){return t})()}!function(t){const e=Zs,n=t();for(;;)try{if(112671===-parseInt(e(147))/1*(parseInt(e(155))/2)+-parseInt(e(153))/3+-parseInt(e(143))/4+-parseInt(e(154))/5*(-parseInt(e(157))/6)+-parseInt(e(139))/7+parseInt(e(129))/8*(parseInt(e(137))/9)+parseInt(e(145))/10*(parseInt(e(151))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}($s);class to extends Ms{[Xs(148)](t,e){const n=Xs;if(!this[n(142)](e[0],e[1]))return!1;const r=e[n(126)]();return r[n(149)]=null,r[n(159)]&&is(r[n(159)][n(138)],r[n(159)][n(132)])&&(r[n(159)][n(132)]=null),e[n(126)](),t[n(127)][n(125)](this[n(135)]),t[n(127)][n(125)](0),t[n(146)][n(125)](this[n(124)](r)),!0}[Xs(133)](t,e){const n=Xs,r=this[n(134)](e);r[n(159)]&&!r[n(159)][n(132)]&&(r[n(159)][n(132)]=Zr(r[n(159)][n(138)]));const s=Zr(r);s[n(159)]&&(s[n(159)][n(138)][n(150)]=n(152),s[n(159)][n(132)]=Zr(s[n(159)][n(138)])),s[n(130)]=n(131)+s[n(130)][n(128)](":")[2],e[n(127)][n(126)](),t[n(125)](r),t[n(125)](s)}[Xs(124)](t){const e=Xs,n={types:[],buffers:[],baseVersion:0};return this[e(140)][e(141)](e(136))[e(148)](n,[t]),n[e(146)][0]}[Xs(134)](t){const e=Xs,n=[];return this[e(140)][e(141)](e(136))[e(133)](n,t),n[0]}[Xs(142)](t,e){const n=Xs;return!!(t&&e&&n(136)==t[n(158)]&&n(136)==e[n(158)]&&t[n(130)][n(144)](n(156))&&e[n(130)][n(144)](n(156))&&t[n(130)]!=e[n(130)])}}const eo=no;function no(t,e){const n=ro();return(no=function(t,e){return n[t-=259]})(t,e)}function ro(){const t=["TypingAction","get","decompress-compressor-not-found","DeletingAction","_compressorById","_registerActionCompressor","ForwardDeletingAction","7512sCHfQR","1123146ewZrqZ","RenameOperation","8OxjVap","626255hrpsYU","UserSelectionAction","_protobufFactory","decompress","MarkerOperation","SplitOperation","1167636Qabmtb","suggestion","MergeOperation","RootAttributeOperation","compress","AttributeOperation","MoveOperation","types","length","set","727074RHjrmI","_getCompressorByName","1792RLhizs","forEach","RootOperation","baseVersion","getDescriptor","SuggestionMarkerOperation","188871heagwh","comment","_compressorByName","_registerCompressor","_registerOperationCompressor","CommentMarkerOperation","no-operations-provided","InsertOperation","__className","NoOperation","344412aRvzGo"];return(ro=function(){return t})()}!function(t){const e=no,n=t();for(;;)try{if(399330===parseInt(e(262))/1+parseInt(e(290))/2+-parseInt(e(298))/3*(-parseInt(e(273))/4)+parseInt(e(274))/5+-parseInt(e(280))/6+-parseInt(e(292))/7*(parseInt(e(270))/8)+-parseInt(e(271))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ro);class so{[eo(267)];[eo(300)];[eo(276)];constructor(){const t=eo;this[t(267)]=new Map,this[t(300)]=new Map,this[t(276)]=new wr;const e=this[t(276)][t(296)](t(278));this[t(301)](1,t(261),new Es(1,t(261),void 0)),this[t(302)](10,t(285),bs),this[t(302)](11,t(259),ws),this[t(302)](12,t(278),Ts),this[t(302)](13,t(282),fs),this[t(302)](14,t(286),fs),this[t(302)](15,t(272),fs),this[t(302)](16,t(283),bs),this[t(302)](17,t(279),fs),this[t(301)](18,t(303),new Rs(18,t(278),e,t(299))),this[t(301)](19,t(297),new Rs(19,t(278),e,t(281))),this[t(302)](20,t(294),fs),this[t(268)](100,t(263),Ls),this[t(268)](101,t(266),zs),this[t(268)](102,t(269),Qs),this[t(268)](103,t(275),to)}[eo(284)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(304),this);const r={types:[],buffers:[],baseVersion:t[0][e(295)]};for(;t[e(288)];)this[e(291)](e(275))[e(284)](r,t)||this[e(291)](e(263))[e(284)](r,t)||this[e(291)](e(266))[e(284)](r,t)||this[e(291)](e(269))[e(284)](r,t)||this[e(291)](e(303))[e(284)](r,t)||this[e(291)](e(297))[e(284)](r,t)||this[e(291)](t[0][e(260)])[e(284)](r,t);return r}[eo(277)](t){const e=eo,r=[];for(;t[e(287)][e(288)];){const s=this[e(267)][e(264)](t[e(287)][0]);if(!s)throw new n.CKEditorError(e(265),this,{type:t[e(287)][0]});s[e(277)](r,t)}return r[e(293)]((n,r)=>n[e(295)]=t[e(295)]+r),r}[eo(291)](t){const e=eo;return this[e(300)][e(264)](t)}[eo(302)](t,e,n){const r=eo,s=new n(t,e,this[r(276)][r(296)](e));this[r(301)](t,e,s)}[eo(268)](t,e,n){const r=eo,s=new n(t,this);this[r(301)](t,e,s)}[eo(301)](t,e,n){const r=eo;this[r(267)][r(289)](t,n),this[r(300)][r(289)](e,n)}}function oo(t,e){var n=io();return(oo=function(t,e){return n[t-=481]})(t,e)}function io(){var t=["4964010oOdxRr","3948QVBgiq","107800njBeTx","2989kFfRCg","64257dXeGTb","1940bKdTqs","40BYCuqm","457210fviyOi","64UMokIQ","1609785HhwBLN"];return(io=function(){return t})()}!function(t){for(var e=oo,n=t();;)try{if(234873===parseInt(e(488))/1*(parseInt(e(481))/2)+parseInt(e(487))/3*(parseInt(e(489))/4)+-parseInt(e(490))/5+parseInt(e(484))/6*(-parseInt(e(486))/7)+parseInt(e(485))/8+-parseInt(e(482))/9+parseInt(e(483))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(io);const ao=uo;function co(){const t=["insert","_currentBufferDelay","includes","createUserMarkerOperations","disconnected","lastSyncVersion","selection","loadRoot","connect","editing","_compressor","currentDocumentSession","fire","metadata","push","_loadRoot","remove","realtimecollaborationclient-handleserverresponse","finally","newRange","get","ready","high","_isAttached","_sendBufferedOperationsDelayed","addRootAttribute","apply","has","cloudServices.bundleVersion","serverHistory","toJSON","applyOperation","document:write","CollaborativeEditingService","_setUpDataInit","PENDING_ACTION_SENDING_DATA","_shouldSendUpdate","_clearPendingAction","disconnect","getMany","_saveOperationInBuffer","length","multi-root-editor-root-attributes-no-root","getDocumentDetails","Permissions","mySessionId","realtimecollaborationclient-init-document-already-initialized","reconnection: flushed session","_handleInitialConnectionData","setPermissions","_sendBufferedOperationsDelayId","baseVersion","keys","_operationToId","isEnabled","realtimecollaborationclient-init-non-existent-root","realtimecollaborationclient-init-connection-failed","isReadOnly","reconnect","collaboration","createRoot","cloud-services-internal-error: Request timeout.","realtimecollaborationclient-error","end","set","_offset","view","99027wKsmTS","30VpvNJM","config","_sendBufferedOperations","_isEditingAllowed","document","_connectService","_operationIdentifier","_disconnectionOperations","cloudDocumentVersion","roots","collaboration.channelId","lastOperationId","root","_baseBufferDelay","forEach","editor","sendOperations","25176948KwVeuJ","wasUndone","code","directChange","_isInit","_getOperationsFromInitData","offset","startsWith","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.","error","pluginName","requires","_handleSendingSelectionMarkers","cloud-services-internal-error: Not connected.","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","size","add","showWarning","_isDisconnection","_isConnected","_handleReconnectionError","_addKnownRoot","21qNdHOP","isPremiumPlugin","string","_handleReceivedOperations","bind","removeFromReconnectionStack","path","position","$root","CommentsOnly","fromJSON","_waitUntilSynced","getUser","_pendingAction","enableReadOnlyMode","connection","_hasSynchronizationProblem","unregister","lastDocumentSession","stop","15354207GrQQce","createPositionFromPath","lastOperationAcceptedAt","register","_bufferRootLoad","from","suppressErrorInCollaboration","change:hasDomSelection","targetPosition","type","_shouldSendSelectionUpdate","permissions","differ","_decompressOperations","change:_isPendingUpdate","getOperationAuthor","parse","isDocumentOperation","filter","connected","sessionCreatedAt","_document","createPositionAt","_authorId","isUndoneOperation","addRoot","getConnectedSessions","message","collaboration-missing-channelid","destroy","realtimecollaborationclient-init-service-internal-error","move","plugins","slice","__className","real-time-collaboration","listenTo","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","setIdForTheLastOperation","wereChangesApplied","affectsData","then","reset","_handleServerResponse","137476gTmkyP","_isLoaded","rtc-destroyed","_compressOperations","clone","_crash","catch","userId","sessionAdd:","_bufferedOperations","_getAffectedRoot","channelSessions","Synchronization issue","stopListening","disableReadOnlyMode","rtc-offline","_refreshUserSelectionMarkers","_isPendingUpdate","operationsReceived","decompress","realtimecollaborationclient-init-session-connection-error","_channelId","RealTimeCollaborationClient","compress","12afDwSc","_setPendingAction","locale","addToReconnectionStack","cs:removeUser","_lastSyncedOperationId","370072AbAkmb","realtimecollaborationclient","realtimecollaborationclient-init-service-incorrect-server-operation","round","cloud-services-internal-error: Collaborative Editing Service is not connected.","409","attributes","off","_initThrowingOnDataSet","_handleReconnectionResponse","_knownOperations","6NlcqtK","map","isOfficialPlugin","change:_isEditingAllowed","getRoot","404","_initSessionsHandling","_knownRootNames","version","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","22hypVTf","_ignoredOperations","batch","8466530JsOysS","createRange","_hasSelectionChanged","entries","_updateServerHistory","history","init","_lastServerVersion","model","InsertOperation","Notification","_applyOperationsSet","addUser","rootName","realtimecollaborationclient-sendbufferedoperations","_service","593148keUYJo","_handleExternalOperations","getIdOfTheLastOperation","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.","addOperation","start","affectedSelectable","enqueueChange","change:range","return","state","sessionId","rootsAttributes","_fetchMissingUsers","initData","marker","_disconnectService","markers","_connectAfterSessionHasBeenFlushed","createdAt","data","define","getOperations"];return(co=function(){return t})()}function uo(t,e){const n=co();return(uo=function(t,e){return n[t-=242]})(t,e)}!function(t){const e=uo,n=t();for(;;)try{if(987290===parseInt(e(296))/1*(-parseInt(e(347))/2)+-parseInt(e(366))/3*(-parseInt(e(320))/4)+parseInt(e(350))/5*(-parseInt(e(337))/6)+-parseInt(e(496))/7*(-parseInt(e(326))/8)+parseInt(e(456))/9*(-parseInt(e(457))/10)+parseInt(e(252))/11+parseInt(e(474))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(co);let lo=1;class po extends e.Plugin{static[ao(422)]=(()=>On)();[ao(454)];[ao(377)];[ao(418)];[ao(317)];[ao(365)];[ao(273)];[ao(399)];[ao(305)];[ao(336)];[ao(344)];[ao(245)];[ao(352)];[ao(439)];[ao(470)];[ao(390)];[ao(325)];[ao(464)];[ao(463)];static get[ao(485)](){return[zn,Qn,hr,e.PendingActions,Fn.Users,r.Notification]}static get[ao(484)](){return ao(318)}static get[ao(339)](){return!0}static get[ao(497)](){return!0}get[ao(465)](){const t=ao;return this[t(357)]+this[t(454)]}get[ao(357)](){const t=ao;return this[t(418)][t(345)]-this[t(454)]}get[ao(394)](){const t=ao,e=this[t(418)][t(388)]();for(let n=e[t(430)]-1;n>=0;n--){const r=e[n];if(!this[t(464)][t(416)](r))return r[t(440)]+1-this[t(454)]}return 0}constructor(t){const e=ao;if(super(t),this[e(454)]=0,this[e(377)]=null,this[e(418)]=new s.History,this[e(472)][e(458)][e(387)](e(448),{}),this[e(317)]=this[e(472)][e(458)][e(409)](e(467)),!this[e(317)])throw new n.CKEditorError(e(280),this);const r=t[e(458)][e(409)](e(417))||n.version;this[e(365)]=new(po[e(422)])(r,this[e(317)]),this[e(273)]=this[e(472)][e(358)][e(461)],this[e(399)]=new so,this[e(305)]=[],this[e(336)]=new WeakSet,this[e(344)]=new Set,this[e(453)](e(313),!1),this[e(453)](e(248),!1),this[e(245)]=null,this[e(352)]=!1,this[e(439)]=null,this[e(470)]=300,this[e(390)]=this[e(470)],this[e(325)]=null,this[e(464)]=new WeakSet,this[e(463)]=new mo(this[e(464)])}[ao(356)](){const t=ao,e=this[t(472)],n=e[t(284)][t(409)](Fn.Users),r=e[t(284)][t(409)](zn);this[t(288)](n,t(267),(e,r)=>{const s=t,o=r[0];o[s(275)]&&(e[s(375)]=n[s(244)](o[s(275)]),e[s(251)]()),null===o[s(275)]&&(e[s(375)]=null,e[s(251)]())},{priority:t(411)}),this[t(288)](e[t(358)][t(461)][t(395)],t(374),(e,n)=>{const r=t;n[r(477)]&&this[r(312)]()}),this[t(288)](e[t(398)][t(455)],t(259),()=>{this[t(312)]()}),this[t(334)](),e[t(358)].on(t(420),(e,n)=>{const r=t,s=n[0];s[r(269)]&&(this[r(429)](s),this[r(425)]()&&this[r(413)]())}),this[t(423)](),this[t(500)](t(460)).to(r,t(376),this,t(248),(e,n)=>t(271)===e&&!n),this.on(t(340),()=>{const n=t;this[n(460)]?e[n(310)](n(311)):e[n(246)](n(311))}),this[t(460)]?e[t(310)](t(311)):e[t(246)](t(311)),this[t(453)](t(493),!1)}async[ao(447)](){const t=ao,e=this[t(472)][t(284)][t(409)](Qn),n=this[t(472)][t(284)][t(409)](zn);try{this[t(313)]=!0,e[t(249)](this[t(317)]);const r=await this[t(365)][t(447)](n[t(247)],this[t(394)]);await this[t(335)](r)&&(this[t(313)]=!1,this[t(426)]());const s=await this[t(365)][t(278)]();e[t(255)](this[t(317)],s),this[t(486)](),this[t(493)]=!0}catch(e){if(function(e){const n=t;return n(342)===e[n(476)]}(e)&&this[t(377)])await this[t(384)]();else if(function(e){const n=t;return n(331)===e[n(476)]}(e)){const e=mr(this[t(472)][t(322)],t(488));this[t(494)](e)}else{if(!(e instanceof ho))throw e;this[t(494)]()}}}[ao(281)](){const t=ao,e=this[t(472)][t(284)][t(409)](zn),n=this[t(472)][t(284)][t(409)](Qn);this[t(472)][t(246)](t(298)),n[t(307)][t(416)](this[t(317)])&&n[t(249)](this[t(317)]),e[t(501)](this),this[t(382)](),super[t(281)]()}async[ao(335)](t){const e=ao;if(this[e(377)]!==t[e(377)]&&this[e(325)]!==t[e(468)])throw new ho;return this[e(377)]=t[e(377)],this[e(295)]([],{...t,wereChangesApplied:!1,data:t[e(386)]},e(447))}async[ao(462)](t,e=!1){const n=ao,{connection:r}=this[n(472)][n(284)][n(409)](zn);po[n(422)][n(278)](r,this[n(317)])[n(293)](t=>this[n(343)](t))[n(302)](t=>{const e=n;this[e(301)](e(316),t)}),this[n(288)](this[n(365)],n(314),this[n(499)][n(500)](this)),this[n(288)](this[n(365)],n(483),(t,e)=>{const r=n;this[r(301)](r(282),e)}),this[n(288)](this[n(365)],n(393),()=>{this[n(493)]=!1});const s=this[n(463)][n(368)](t);this[n(313)]=!0;const o=await this[n(365)][n(397)](r,this[n(299)](t),s);if(this[n(377)]=o[n(377)],e){if(!o[n(291)])return void this[n(494)]();this[n(313)]=!1,this[n(426)](),this[n(418)][n(294)](),this[n(454)]=o[n(480)],this[n(418)][n(345)]=this[n(454)],await this[n(295)](t,o,n(436))}else await this[n(437)](o,t);this[n(486)](),this[n(493)]=!0}[ao(486)](){const t=ao,e=this[t(472)][t(284)][t(409)](Qn),n=this[t(472)][t(284)][t(409)](hr),r=e[t(307)][t(409)](this[t(317)]);r&&r[t(430)]>1?n[t(392)]():this[t(288)](e,t(304)+this[t(317)],()=>{const r=t;2===e[r(307)][r(409)](this[r(317)])[r(430)]&&n[r(392)]()})}async[ao(499)](t,e,n,r){const s=ao;if(!this[s(313)]&&this[s(273)][s(345)]==e){const t=this[s(265)](n,r);await this[s(379)](t),this[s(367)](t,e,n[s(468)])||this[s(301)](s(328))}}async[ao(384)](){const t=ao;this[t(382)]();const{locale:e}=this[t(472)];let n;try{n=await this[t(365)][t(432)]()}catch{const n=mr(e,t(346));return void this[t(494)](n)}const r=n[t(400)]||n[t(250)];if(this[t(325)]!==r[t(468)]){const n=mr(e,t(369));return void this[t(494)](n)}await this[t(462)](this[t(472)][t(358)][t(461)][t(355)][t(388)](),!0)}[ao(382)](){const t=ao;this[t(365)][t(427)](),this[t(305)]=[],clearTimeout(this[t(439)]),this[t(309)](this[t(365)])}[ao(343)](t){const e=ao,n=this[e(472)][e(284)][e(409)](Qn);this[e(288)](n,e(304)+this[e(317)],(t,{session:r})=>{const s=e;if(r.id===n[s(434)]){t[s(333)]();const e=this[s(472)][s(284)][s(416)](s(505))&&this[s(472)][s(284)][s(409)](s(505));let n=r[s(263)];e&&e[s(443)]&&(n=n[s(270)](t=>s(421)!==t)),this[s(472)][s(284)][s(409)](s(433))[s(438)](n,this[s(317)])}}),n[e(255)](this[e(317)],t)}[ao(334)](){const t=ao,e=this[t(472)][t(386)][t(453)];this[t(472)][t(386)][t(453)]=(...r)=>{const s=t;if(!r[r[s(430)]-1][s(258)])throw new n.CKEditorError(s(289),this);e[s(415)](this[s(472)][s(386)],r)}}[ao(423)](){const t=ao;this[t(472)][t(386)].on(t(356),(e,[r])=>{const o=t;if(this[o(273)][o(345)])throw new n.CKEditorError(o(435),this);e[o(251)](),this[o(321)]();const i=this[o(472)][o(458)][o(409)](o(378)),a=this[o(479)](r,i);0==a[o(430)]&&a[o(403)](new s.NoOperation(0)),e[o(375)]=this[o(462)](a)[o(293)](()=>{const t=o;this[t(472)][t(284)][t(409)](zn)[t(323)](this),this[t(472)][t(386)][t(401)](t(410))})[o(302)](t=>this[o(301)](o(445),t))[o(407)](()=>this[o(426)]())},{priority:t(411)}),this[t(472)].on(t(396),async(e,[n,r])=>{const s=t;e[s(251)]();const o=this[s(472)][s(358)][s(461)][s(341)](n);if(!this[s(344)][s(416)](n)){const t=r&&r[s(386)]?r[s(386)]:"",e=r&&r[s(332)]?r[s(332)]:{};await this[s(404)](n,t,e)}this[s(472)][s(358)][s(373)]({isUndoable:!1},()=>{const t=s;o[t(297)]=!0,this[t(472)][t(358)][t(461)][t(264)][t(256)](o)})},{priority:t(411)})}async[ao(379)](t){const e=ao,n=this[e(472)][e(284)][e(409)](Fn.Users),{connection:r}=this[e(472)][e(284)][e(409)](zn),s=new Set;for(const r of t){const t=r[e(275)];t&&!n[e(244)](t)&&s[e(490)](t)}if(0===s[e(489)])return;const o=await b[e(428)](r,Array[e(257)](s));for(const t of o)n[e(244)](t.id)||n[e(362)](t)}[ao(479)](t,e={}){const r=ao,o=this[r(472)][r(358)],i=[];let a=0;const c=r(498)==typeof t?{main:t}:t;for(const t of Object[r(441)](c)){if(!this[r(273)][r(466)][r(416)](t))throw new n.CKEditorError(r(444),this);const e=this[r(472)][r(386)][r(268)](c[t]),u=this[r(273)][r(341)](t),d=new s.InsertOperation(o[r(274)](u,0),e,a++);i[r(403)](d);for(const[t,n]of e[r(383)]){const e=o[r(351)](o[r(253)](u,n[r(371)][r(502)][r(285)]()),o[r(253)](u,n[r(452)][r(502)][r(285)]())),c=new s.MarkerOperation(t,null,e,o[r(383)],!0,a++);i[r(403)](c)}}if(e)for(const[t,c]of Object[r(353)](e)){const e=o[r(461)][r(341)](t);if(!e)throw new n.CKEditorError(r(431),null);for(const[t,n]of Object[r(353)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(403)](o)}}return i}async[ao(404)](t,e,n){const r=ao;this[r(479)]({[t]:e},{[t]:n})[r(471)]((t,e)=>{const n=r;t[n(440)]=this[n(273)][n(345)]+e,t[n(478)]=!0,this[n(429)](t)}),this[r(413)](),await this[r(243)]()}async[ao(437)](t,e){const n=ao;let r;this[n(454)]=t[n(480)];const s=t[n(291)]&&!t[n(380)],o=s?0:t[n(386)][n(440)];if(e[n(471)](e=>{const r=n;e[r(478)]=!0,e[r(385)]=t[r(272)],e[r(275)]=null}),s)r=e,this[n(361)](r,s);else{if(t[n(380)]){const e=this[n(479)](t[n(380)]);this[n(273)][n(355)][n(345)]=-e[n(430)],e[n(471)](r=>{const s=n;r[s(440)]-=e[s(430)],r[s(385)]=t[s(272)],r[s(478)]=!0,r[s(275)]=null}),this[n(361)](e,!0),this[n(418)][n(345)]=-e[n(430)]+this[n(454)],this[n(354)](e)}this[n(273)][n(355)][n(345)]=o,r=this[n(265)](t[n(386)],t[n(402)]),await this[n(379)](r),this[n(361)](r,s)}t[n(468)]&&(this[n(463)][n(290)](r,t[n(468)]),this[n(325)]=t[n(468)]),this[n(418)][n(345)]=o+this[n(454)],this[n(354)](r),e[n(270)](t=>{const e=n,r=this[e(306)](t);return r&&!this[e(344)][e(416)](r)})[n(471)]((t,e)=>{const r=n;t[r(440)]=this[r(273)][r(345)]+e,this[r(429)](t)}),this[n(425)]()?(this[n(390)]=0,this[n(413)](!0),await this[n(243)]()):(this[n(313)]=!1,this[n(426)]())}[ao(301)](t,e){const r=ao,s=e&&e[r(279)];if(s&&s[r(481)](r(327)))throw e;const o=this[r(472)][r(284)][r(409)](zn);throw this[r(313)]=!0,o[r(427)](),this[r(472)][r(246)](r(451)),new n.CKEditorError(t,this[r(472)],s?{originalError:s}:void 0)}[ao(429)](t){const e=ao;this[e(336)][e(416)](t)||(this[e(336)][e(490)](t),this[e(305)][e(403)](t),this[e(245)]||e(381)==t[e(261)]&&!t[e(292)]||this[e(321)]())}[ao(413)](t=!1){const e=ao;!t&&this[e(313)]||(this[e(313)]=!0,clearTimeout(this[e(439)]),this[e(439)]=setTimeout(()=>{const t=e;this[t(459)]()[t(293)](e=>{const n=t;e&&(this[n(426)](),this[n(313)]=!1)})[t(302)](e=>{const n=t;this[n(426)](),this[n(313)]=!1,function(t){const e=n;return t[e(279)][e(481)](e(487))||t[e(279)][e(481)](e(330))||t[e(279)][e(481)](e(450))}(e)||this[n(301)](e[n(279)],e)})},this[e(390)]))}[ao(243)](){return new Promise(t=>{const e=uo;this.on(e(266),()=>{t()})})}async[ao(459)](){const t=ao,e=this[t(472)][t(284)][t(409)](hr);if(this[t(262)]()&&(e[t(392)](),this[t(352)]=!1),!this[t(425)]())return!0;const n=[...this[t(305)]];for(const e of n)e[t(475)]=this[t(273)][t(355)][t(276)](e);const r=this[t(463)][t(368)](n),s=lo++,o=this[t(299)](n),i=await this[t(365)][t(473)](o,o[t(440)],r);try{return await this[t(295)](n,i,s)}catch(e){return this[t(301)](t(364),e)}}async[ao(295)](t,e,n){const r=ao;if(r(483)in e)throw e[r(483)];let s=!1;if(e[r(291)]){e[r(468)]&&(this[r(325)]=e[r(468)]),this[r(305)]=this[r(305)][r(270)](e=>!t[r(391)](e));for(const n of t)n[r(385)]=r(254)in e&&e[r(254)]||void 0;fo(t,e[r(345)]-t[r(430)]),this[r(354)](t);const n=t[r(270)](t=>{const e=r;if(!t[e(478)])return!1;const n=this[e(306)](t);return n&&!this[e(344)][e(416)](n)});fo(n,this[r(273)][r(345)]),this[r(361)](n),s=!0,this[r(390)]=this[r(470)]}else{const t=this[r(265)](e[r(386)],e[r(402)])[r(270)](t=>t[r(440)]>=this[r(357)]);t[r(471)](t=>this[r(495)](t)),this[r(305)]=this[r(305)][r(270)](t=>!t[r(478)]||!this[r(344)][r(416)](this[r(306)](t))),this[r(305)][r(430)]&&fo(this[r(305)],this[r(305)][0][r(440)]),await this[r(379)](t),s=this[r(367)](t,e[r(345)],e[r(468)]),this[r(390)]=Math[r(329)](this[r(390)]/2)}return s?!this[r(425)]()||(this[r(413)](!0),!1):this[r(301)](r(406))}[ao(367)](t,e,n){const r=ao;try{const o={document:this[r(273)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(305)],o);fo(i,this[r(273)][r(345)]),fo(a,e);for(const t of i){const e=c[r(409)](t);t[r(275)]=e?e[r(275)]:null}n&&(this[r(463)][r(290)](t,n),this[r(325)]=n),this[r(305)]=[...a],this[r(361)](i),this[r(354)](t)}catch(t){return console[r(483)](t),!1}return!0}[ao(361)](t,e=!1){const n=ao;this[n(472)][n(358)][n(373)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(336)][r(490)](n),this[r(495)](n),e[r(349)][r(370)](n),this[r(472)][r(358)][r(420)](n)})}[ao(495)](t){const e=ao,n=this[e(306)](t);n&&this[e(344)][e(490)](n)}[ao(306)](t){const e=ao;let n,r;switch(t[e(261)]){case e(389):n=t[e(503)][e(469)];break;case e(381):if(r=t[e(408)],!r)return null;n=r[e(469)];break;case e(414):n=t[e(469)];break;case e(277):n=t[e(372)];break;case e(283):n=t[e(260)][e(469)];break;default:return null}return n[e(363)]}[ao(354)](t){const e=ao;t[e(471)](t=>{const n=e,r=t[n(300)]();r[n(275)]=t[n(275)],r[n(478)]=!!t[n(478)],r[n(385)]=t[n(385)],r[n(440)]+=this[n(454)],t[n(492)]&&this[n(464)][n(490)](r),this[n(418)][n(370)](r)})}[ao(494)](t){const e=ao,n=this[e(472)][e(284)][e(409)](e(360)),r=this[e(472)][e(322)];t||(t=mr(r,e(482))),n[e(491)](t,{title:mr(r,e(308)),namespace:e(287)}),this[e(248)]=!0,clearTimeout(this[e(439)]),this[e(305)]=[],this[e(472)][e(284)][e(409)](zn)[e(427)]()}[ao(321)](){const t=ao;this[t(245)]||(this[t(245)]=this[t(472)][t(284)][t(409)](e.PendingActions)[t(490)](mr(this[t(472)][t(322)],t(424))))}[ao(426)](){const t=ao;this[t(245)]&&(this[t(472)][t(284)][t(409)](e.PendingActions)[t(405)](this[t(245)]),this[t(245)]=null)}[ao(299)](t){const e=ao,n=t[e(338)](t=>t[e(419)]());return this[e(399)][e(319)](n)}[ao(265)](t,e){const n=ao;return this[n(399)][n(315)](t)[n(338)]((t,r)=>{const o=n,i=o(356)==e[r][o(261)];if(o(359)==t[o(286)]){const e=t[o(503)][o(469)];!this[o(273)][o(341)](e)&&(this[o(273)][o(449)](o(504),e)[o(412)]=!1)}const a=s.OperationFactory[o(242)](t,this[o(273)]);return a[o(475)]=t[o(475)],a[o(478)]=i,a[o(275)]=i?null:e[r][o(303)],a[o(492)]=o(324)===e[r][o(261)],a[o(385)]=e[r][o(385)],a})}[ao(312)](){const t=ao;this[t(352)]=!0,this[t(262)]()?this[t(413)]():this[t(352)]=!1}[ao(262)](){const t=ao,e=this[t(472)][t(284)][t(409)](Qn)[t(307)][t(409)](this[t(317)]);return!this[t(472)][t(446)]&&!!e&&e[t(430)]>1&&this[t(352)]}[ao(425)](){const t=ao;return this[t(305)][t(430)]>0||this[t(262)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(440)]=e++}class mo{[ao(348)];[ao(442)];constructor(t){const e=ao;this[e(348)]=t,this[e(442)]=new WeakMap}[ao(368)](t){const e=ao;let r=t[e(430)];for(;r--;){const s=t[r];if(!this[e(348)][e(416)](s)){if(!this[e(442)][e(416)](s)){const t=(0,n.uid)()[e(285)](1,18);this[e(442)][e(453)](s,t)}return this[e(442)][e(409)](s)}}}[ao(290)](t,e){const n=ao;if(!e)return;let r=t[n(430)];for(;r--;){const s=t[r];this[n(348)][n(416)](s)||this[n(442)][n(453)](s,e)}}}var go=yo;function yo(t,e){var n=bo();return(yo=function(t,e){return n[t-=403]})(t,e)}function bo(){var t=["isPremiumPlugin","RealTimeCollaborativeEditing","2451lrloXX","5yaBSRd","440754iGLIrz","1298825mhBpyx","123254RfhluD","177130rzJeJb","292omJMQh","isOfficialPlugin","4952eOHPpS","18uLVwGY","pluginName","1631tkjdsr","requires","12814JrhffM"];return(bo=function(){return t})()}!function(t){for(var e=yo,n=t();;)try{if(125117===parseInt(e(404))/1+parseInt(e(413))/2+-parseInt(e(416))/3*(-parseInt(e(406))/4)+parseInt(e(417))/5*(-parseInt(e(418))/6)+parseInt(e(411))/7*(-parseInt(e(408))/8)+parseInt(e(409))/9*(parseInt(e(405))/10)+parseInt(e(403))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bo);class Io extends e.Plugin{static get[go(412)](){return[po]}static get[go(410)](){return go(415)}static get[go(407)](){return!0}static get[go(414)](){return!0}}const Oo=vo;function vo(t,e){const n=To();return(vo=function(t,e){return n[t-=282]})(t,e)}!function(t){const e=vo,n=t();for(;;)try{if(723575===-parseInt(e(331))/1+parseInt(e(287))/2*(parseInt(e(320))/3)+parseInt(e(358))/4+-parseInt(e(305))/5+-parseInt(e(347))/6*(parseInt(e(325))/7)+-parseInt(e(323))/8+parseInt(e(297))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(To);class wo extends e.ContextPlugin{static[Oo(306)]=(()=>Ln)();[Oo(341)];static get[Oo(333)](){return[zn,Oo(316),Qn,Fn.Users]}static get[Oo(343)](){return Oo(298)}static get[Oo(361)](){return!0}static get[Oo(344)](){return!0}constructor(t){const e=Oo;super(t),this[e(341)]=new Map}async[Oo(374)](){const t=Oo,n=this[t(373)],r=n[t(336)][t(319)](t(316));if(n[t(336)][t(319)](zn)[t(381)](this),r[t(291)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(283)](e)[c(303)]({commentThreadId:n,comments:r[c(340)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(356)],userId:t[r(289)],content:t[r(290)],documentId:e,createdAt:t[r(310)],attributes:t[r(282)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(286)](ko);return{threadId:u[c(346)],comments:u[c(337)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(283)](e)[r(370)](n)[r(286)](So)[r(286)](ko);return s?s[r(313)]?null:(await this[r(351)]([s]),{threadId:s[r(346)],comments:s[r(337)][r(340)](Ao),context:s[r(373)],resolvedAt:s[r(369)],resolvedBy:s[r(379)],attributes:s[r(282)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(283)](e)[t(294)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(286)](So)[t(286)](ko),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(283)](e)[r(308)](n)[r(286)](So)[r(286)](ko);return{threadId:s[r(346)],resolvedAt:s[r(369)],resolvedBy:s[r(379)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(283)](e)[t(349)](n)[t(286)](So)[t(286)](ko),removeCommentThread:({channelId:e,threadId:n})=>this[t(283)](e)[t(335)](n)[t(286)](So)[t(286)](ko),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(283)](e)[t(355)](n,r,s,o)[t(286)](ko),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(283)](e)[t(318)](n,r,s,o)[t(286)](So)[t(286)](ko),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(283)](e)[t(375)](n,r)[t(286)](So)[t(286)](ko)},n instanceof e.Context){const e=n[t(380)][t(319)](t(288)),r=n[t(336)][t(319)](Qn);await this[t(372)](e);const s=await this[t(341)][t(319)](e)[t(378)]();this[t(342)](r,t(354)+e,(n,{session:s})=>{const o=t;s.id===r[o(366)]&&(n[o(327)](),this[o(373)][o(336)][o(319)](o(295))[o(322)](s[o(301)],e))}),r[t(365)](e,s)}}async[Oo(372)](t){const e=Oo;if(this[e(341)][e(348)](t))throw new n.CKEditorError(e(329),null,{channelId:t});const r=this[e(373)][e(336)][e(319)](e(316)),s=new(wo[e(306)])(t);this[e(341)][e(339)](t,s),this[e(342)](s,e(315),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(370)](o)||r[s(303)]({threadId:o,channelId:i,comments:l?l[s(340)](Ao):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(342)](s,e(360),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(370)](n)&&r[c(294)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(342)](s,e(368),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(370)](n);a&&a[i(338)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(342)](s,e(376),(t,{commentThreadId:n})=>{const s=e,o=r[s(370)](n);o&&o[s(350)]({isFromAdapter:!0})}),this[e(342)](s,e(364),(t,{commentThreadId:n})=>{const s=e,o=r[s(370)](n);o&&o[s(371)]({isFromAdapter:!0})}),this[e(342)](s,e(382),(t,n)=>{const s=e,o=n[s(346)],i=r[s(370)](o);i&&i[s(355)]({...Ao(n),isFromAdapter:!0})}),this[e(342)](s,e(353),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(370)](n);if(c){const t=c[a(309)](s);t&&t[a(363)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(342)](s,e(299),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(370)](n);if(i){const t=i[o(309)](s);t&&t[o(371)]({isFromAdapter:!0})}}),await this[e(352)](t)}[Oo(324)](){const t=Oo;if(this[t(373)]instanceof e.Context){const e=this[t(373)][t(380)][t(319)](t(288));this[t(311)](e)}}[Oo(311)](t){const e=Oo;if(!this[e(341)][e(348)](t))throw new n.CKEditorError(e(367),null,{channelId:t});this[e(283)](t)[e(362)](),this[e(341)][e(302)](t)}async[Oo(334)](){const t=Oo;for(const e of this[t(341)][t(326)]())await this[t(352)](e);if(this[t(373)]instanceof e.Context){const e=this[t(373)][t(380)][t(319)](t(288)),n=this[t(373)][t(336)][t(319)](Qn);n[t(284)](e);const r=await this[t(341)][t(319)](e)[t(378)]();n[t(365)](e,r)}}async[Oo(352)](t){const e=Oo,{connection:n}=this[e(373)][e(336)][e(319)](zn),r=this[e(373)][e(336)][e(319)](e(316)),s=this[e(341)][e(319)](t),o=await s[e(292)](n);await this[e(351)](o);const i=new Set(Array[e(328)](r[e(377)]({channelId:t}),t=>t.id));for(const t of o)t[e(313)]||i[e(302)](t[e(346)]);for(const t of i)r[e(370)](t)[e(371)]({isFromAdapter:!0});for(const n of o){let s=r[e(370)](n[e(346)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(303)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(328)](s[e(337)],t=>t.id));for(const t of n[e(337)])p[e(302)](t[e(356)]);for(const t of p)s[e(309)](t)[e(371)]({isFromAdapter:!0});for(const t of n[e(337)]){const n=s[e(309)](t[e(356)]);n?n[e(290)]!==t[e(290)]&&n[e(363)]({content:t[e(290)],isFromAdapter:!0}):s[e(355)](Object[e(314)](Ao(t),{isFromAdapter:!0}))}}}[Oo(283)](t){const e=Oo;if(!this[e(341)][e(348)](t))throw new n.CKEditorError(e(285),null,{channelId:t});return this[e(341)][e(319)](t)}async[Oo(351)](t){const e=Oo,n=this[e(373)][e(336)][e(319)](Fn.Users),{connection:r}=this[e(373)][e(336)][e(319)](zn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(304)](r)&&s[e(300)](r);for(const{userId:t}of o)n[e(304)](t)||s[e(300)](t)}if(0===s[e(312)])return;const o=await b[e(330)](r,Array[e(328)](s));for(const t of o)n[e(304)](t.id)||n[e(317)](t)}}async function So(t){const e=Oo;if(e(357)!==t[e(321)])throw t}function ko(t){const e=Oo;if((n=t)[e(296)][e(307)](e(345))||n[e(296)][e(307)](e(359))||n[e(296)][e(307)](e(293)))return new Promise(()=>{});var n;throw t}function Ao(t){const e=Oo;return{threadId:t[e(346)],commentId:t[e(356)],content:t[e(290)],createdAt:t[e(310)],authorId:t[e(332)],attributes:t[e(282)]||{}}}function To(){const t=["getConnectedSessions","resolvedBy","config","addToReconnectionStack","commentAdded","attributes","_getService","unregister","cloudservicescommentsadapter-service-not-exist","catch","413454huMAbw","collaboration.channelId","authorId","content","adapter","connect","cloud-services-internal-error: Request timeout.","updateCommentThread","Permissions","message","20985507rKHDwf","CloudServicesCommentsAdapter","commentRemoved","add","permissions","delete","addCommentThread","getUser","6315815ulQrxQ","CommentsService","startsWith","resolveCommentThread","getComment","createdAt","_terminateService","size","deletedAt","assign","commentThreadAdded","CommentsRepository","addUser","updateComment","get","15kearbC","code","setPermissions","8689272syjUQz","destroy","7bnESQe","keys","off","from","cloudservicescommentsadapter-connect-already-connected","getMany","258445uNGkyF","userId","requires","reconnect","removeCommentThread","plugins","comments","resolve","set","map","_services","listenTo","pluginName","isPremiumPlugin","cloud-services-internal-error: Comments Service is not connected.","commentThreadId","2367888acawVE","has","reopenCommentThread","reopen","_fetchMissingUsersForThreads","_connectService","commentUpdated","sessionAdd:","addComment","commentId","404","1442528RqbkNk","cloud-services-internal-error: Not connected.","commentThreadUpdated","isOfficialPlugin","disconnect","update","commentThreadRemoved","register","mySessionId","cloudservicescommentsadapter-disconnect-not-exist","commentThreadResolved","resolvedAt","getCommentThread","remove","_setUpService","context","init","removeComment","commentThreadReopened","getCommentThreads"];return(To=function(){return t})()}const _o=jo;!function(t){const e=jo,n=t();for(;;)try{if(827812===parseInt(e(475))/1+parseInt(e(428))/2*(-parseInt(e(440))/3)+-parseInt(e(480))/4*(-parseInt(e(426))/5)+parseInt(e(460))/6*(-parseInt(e(421))/7)+parseInt(e(425))/8+parseInt(e(466))/9+-parseInt(e(445))/10*(parseInt(e(438))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Eo);class Co extends e.Plugin{static[_o(447)]=(()=>Qe)();[_o(469)];[_o(458)];static get[_o(433)](){return[wo,_o(432),zn]}static get[_o(419)](){return _o(454)}static get[_o(453)](){return!0}static get[_o(467)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(436)][e(434)][e(468)](e(449));this[e(469)]=new Map,this[e(458)]=new(Co[e(447)])(n)}[_o(431)](){const t=_o,e=this[t(436)][t(429)][t(468)](zn),n=this[t(436)][t(429)][t(468)](t(432));return n[t(422)]={getSuggestion:async e=>{const n=t;await this[n(474)]();const r=await this[n(458)][n(468)](e)[n(470)](Po);return await this[n(439)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(474)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(458)][i(452)](e,n,r,s,o)[i(470)](t=>{if(Do(t))return new Promise(t=>{const n=jo;this[n(469)][n(461)](e,{resolve:t,suggestionData:a})});throw t});return this[i(469)][i(459)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(474)](),r(443)!==n[r(455)])return this[r(458)][r(456)](e,n)[r(470)](Po)}},this[t(463)](this[t(458)],t(437),(e,r)=>{const s=t;n[s(465)](r.id)&&(n[s(417)](r.id)[s(476)]=r[s(476)])}),this[t(458)][t(420)](e[t(478)])[t(472)](r=>(e[t(462)](this),this[t(439)](r)[t(472)](()=>{const e=t;for(const t of r)n[e(424)](t)[e(479)]=!0})))}async[_o(446)](){const t=_o,e=this[t(436)][t(429)][t(468)](t(432)),{connection:n}=this[t(436)][t(429)][t(468)](zn),r=await this[t(458)][t(420)](n);await this[t(439)](r);for(const{suggestionData:e,resolve:n}of this[t(469)][t(418)]()){let s=r[t(464)](t=>t.id===e.id);s||(s=await this[t(458)][t(452)](e.id,e[t(450)],e[t(481)],e[t(442)])),n(s)}for(const n of r)e[t(465)](n.id)||e[t(424)](n)}async[_o(474)](){const t=_o;this[t(458)][t(427)]||await new Promise(e=>{const n=t;this[n(463)](this[n(458)],n(423),t=>{t[n(435)](),e()})})}async[_o(439)](t){const e=_o,n=this[e(436)][e(429)][e(468)](Fn.Users),{connection:r}=this[e(436)][e(429)][e(468)](zn),s=new Set;for(const{authorId:r}of t)n[e(444)](r)||s[e(452)](r);if(0===s[e(477)])return;const o=await b[e(471)](r,Array[e(451)](s));for(const t of o)n[e(444)](t.id)||n[e(448)](t)}}function Po(t){if(Do(t))return new Promise(()=>{});throw t}function Eo(){const t=["TrackChangesEditing","requires","config","off","editor","suggestionUpdated","737RZXbtP","_fetchMissingUsersForThreads","1408539uSALaC","cloud-services-internal-error: Request timeout.","originalSuggestionId","open","getUser","208160IAwRst","reconnect","TrackChangesService","addUser","collaboration.channelId","type","from","add","isOfficialPlugin","CloudServicesTrackChangesAdapter","state","update","startsWith","_trackChangesService","delete","696eCNAva","set","addToReconnectionStack","listenTo","find","hasSuggestion","8799660bMwGSw","isPremiumPlugin","get","_bufferedRequests","catch","getMany","then","message","_waitForServiceReady","1466054ODnCSR","attributes","size","connection","_saved","4ddxncr","data","getSuggestion","values","pluginName","connect","9429kLAJnn","adapter","connected","addSuggestionData","622968qBCjJs","3980485PGsVcU","isConnected","4SXczAg","plugins","cloud-services-internal-error: Not connected.","init"];return(Eo=function(){return t})()}function jo(t,e){const n=Eo();return(jo=function(t,e){return n[t-=417]})(t,e)}function Do(t){const e=_o;return t[e(473)][e(457)](e(430))||t[e(473)][e(457)](e(441))}const xo=No;function Ro(){const t=["3264086nmzRUd","config","1934760VNZcBm","CommentsRepository","pluginName","change:state","isOfficialPlugin","once","_setUpService","data","isThreadsLoadingPaused","ready","plugins","RealTimeCollaborativeComments","6178452mLvJIr","switchReadOnly","editor","get","_terminateService","destroy","CommentsEditing","21787448fHLeQg","Comments","isPremiumPlugin","connected","3254668ZwuePy","586nITMIB","20055ICGaXr","collaboration.channelId","listenTo","3336sCXUYm","requires","init"];return(Ro=function(){return t})()}function No(t,e){const n=Ro();return(No=function(t,e){return n[t-=199]})(t,e)}!function(t){const e=No,n=t();for(;;)try{if(854851===parseInt(e(203))/1*(-parseInt(e(199))/2)+-parseInt(e(208))/3+-parseInt(e(231))/4+parseInt(e(200))/5+parseInt(e(220))/6+-parseInt(e(206))/7+parseInt(e(227))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ro);class Vo extends e.Plugin{static get[xo(204)](){return[xo(228),wo,Io,zn]}static get[xo(210)](){return xo(219)}static get[xo(212)](){return!0}static get[xo(229)](){return!0}[xo(205)](){const t=xo,e=this[t(222)][t(218)][t(223)](zn),n=this[t(222)][t(218)][t(223)](t(226)),r=this[t(222)][t(218)][t(223)](wo);return this[t(222)][t(215)][t(213)](t(217),()=>{const r=t;this[r(202)](e,r(211),(t,e,s)=>{const o=r;n[o(216)]=o(230)!==s})}),this[t(202)](e,t(211),(e,n,r)=>{const s=t;this[s(222)][s(218)][s(223)](s(209))[s(221)](s(230)!==r)}),r[t(214)](this[t(222)][t(207)][t(223)](t(201)))}[xo(225)](){const t=xo;this[t(222)][t(218)][t(223)](wo)[t(224)](this[t(222)][t(207)][t(223)](t(201))),super[t(225)]()}}var Mo=Jo;function Bo(){var t=["isOfficialPlugin","141808VPlfcV","TrackChanges","52990GQxolq","583YJXNXO","15uXcMUz","15SXRGkz","13RpqFSg","pluginName","18607872HWkYvu","requires","94840buUTzU","2495oHKEwB","84biLyWf","207SoXxen","186552UzXGKz","isPremiumPlugin","RealTimeCollaborativeTrackChanges","196063HQmKvh"];return(Bo=function(){return t})()}function Jo(t,e){var n=Bo();return(Jo=function(t,e){return n[t-=483]})(t,e)}!function(t){for(var e=Jo,n=t();;)try{if(312525===-parseInt(e(493))/1*(parseInt(e(491))/2)+-parseInt(e(494))/3*(-parseInt(e(489))/4)+-parseInt(e(500))/5*(parseInt(e(501))/6)+parseInt(e(487))/7+parseInt(e(484))/8*(-parseInt(e(483))/9)+parseInt(e(499))/10*(-parseInt(e(492))/11)+parseInt(e(497))/12*(parseInt(e(495))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bo);class Uo extends e.Plugin{static get[Mo(498)](){return[Vo,Co,Mo(490)]}static get[Mo(496)](){return Mo(486)}static get[Mo(488)](){return!0}static get[Mo(485)](){return!0}}const qo=Go;function Lo(){const t=["reconnect","connected","RevisionTracker","toVersion","length","_revisionHistoryService","startsWith","config","_fetchMissingUsers","_handleReconnectionError","_offset","baseVersion","setRevisionData","get","off","RevisionHistoryService","add","marker","createdAt","_preventResendingRevisionData","isConnected","from","cloudServices.bundleVersion","once","9QpkEoY","message","isPremiumPlugin","4qWumAl","CONNECTED","creatorId","reInit","buildRevisionData","addRevisionData","_fixRevision","_getLatestVersionFromServerOperations","editor","cloud-services-internal-error: Request timeout.","connect","_bufferUpdate","code","addToReconnectionStack","change:_isConnected","RevisionHistory","getRevision","400","isEnabled","adapter","fromVersion","_revisionDataBuilder","getMany","type","requires","authors","_update","affectsData","468EDJcCk","267328VPSGwx","diffData","serverHistory","_startingVersion","state","245994CoEOFn","_isPendingUpdate","catch","_revisionTracker","isEmptyCurrent","collaboration.channelId","getRevisions","_revisions","change:_isPendingUpdate","sessionId","data","currentRevision","CloudServicesRevisionHistoryAdapter","wrongRequestId","686IHJFZd","_getLatestVersion","size","_handleRevisionsUpdate","getUser","getOperations","max","setSource","bind","has","authorsIds","1315eUazYT","isBundleUploaded","_lastRequestId","_bufferedUpdates","isOfficialPlugin","128517QuLgzZ","listenTo","destroy","_createCurrentRevision","map","plugins","remove","repository","revisionsUpdated","then","updateRevisions","pluginName","2298130DxhrCM","10046938FUesKZ","keys","sendBufferedUpdates","cloud-services-internal-error: Not connected.","_isConnected","_oldOffset","5874GszNQu","reverse","_waitForServiceReady","init","connection","addUser","cloud-services-internal-error: Revision History Service is not connected."];return(Lo=function(){return t})()}function Go(t,e){const n=Lo();return(Go=function(t,e){return n[t-=465]})(t,e)}!function(t){const e=Go,n=t();for(;;)try{if(154147===parseInt(e(513))/1*(-parseInt(e(493))/2)+-parseInt(e(529))/3*(parseInt(e(465))/4)+parseInt(e(524))/5*(-parseInt(e(548))/6)+-parseInt(e(499))/7+-parseInt(e(494))/8*(parseInt(e(579))/9)+-parseInt(e(541))/10+parseInt(e(542))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Lo);class Yo extends e.Plugin{static[qo(570)]=(()=>Ve)();[qo(526)];[qo(502)];[qo(560)];[qo(547)];static get[qo(489)](){return[zn,po,qo(480),Qn,Fn.Users]}static get[qo(540)](){return qo(511)}static get[qo(528)](){return!0}static get[qo(581)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(473)][e(562)][e(568)](e(504));this[e(526)]=null,this[e(502)]=this[e(473)][e(534)][e(568)](e(557)),this[e(560)]=new(Yo[e(570)])(n)}async[qo(551)](){const t=qo,e=this[t(473)][t(534)][t(568)](po),r=e[t(496)],s=this[t(473)][t(534)][t(568)](zn);this[t(502)][t(520)]({history:r,getLatestVersion:()=>this[t(514)](),getCurrentRevisionId:()=>e[t(508)]});const o=this[t(473)][t(562)][t(568)](t(577))||n.version,i=await Ae[t(525)](s[t(552)],o);this[t(473)][t(534)][t(568)](t(480))[t(484)]={getRevision:async({revisionId:e})=>(await this[t(550)](),await this[t(560)][t(481)](e)),updateRevisions:async e=>{const n=t;await this[n(550)]();const r=this[n(502)][n(510)];if(i&&1===e[n(559)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(503)]=t[n(485)]===t[n(558)]);return this[n(560)][n(539)](e,this[n(526)])[n(538)](t=>(this[n(526)]=t,e))[n(501)](t=>{const r=n;if(Ho(t)||r(482)===t[r(477)]&&void 0!==t[r(509)][r(512)]){for(const t of e)!this[r(502)][r(536)][r(481)](t.id)||this[r(502)][r(476)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(530)](this[t(560)],t(537),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(519)](...n[s(533)](t=>t[s(558)]))>this[s(472)]()-1?this[s(514)]()[s(538)](()=>{this[s(516)](n,r)}):this[s(516)](n,r)});const{revisions:a,requestId:c}=await this[t(560)][t(475)](s[t(552)]);s[t(478)](this),this[t(526)]=c,await this[t(563)](a);for(const e of a)this[t(502)][t(470)](e);this[t(530)](e,t(479),(n,r,s)=>{const o=t;s&&(this[o(547)]=e[o(565)],n[o(569)]())}),this[t(502)][t(521)](t(483)).to(s,t(498),e=>e===Ie[t(466)])}async[qo(555)](){const t=qo,e=this[t(473)][t(534)][t(568)](zn),n=this[t(473)][t(534)][t(568)](po),r=async()=>{const r=t,s=this[r(502)][r(510)],o=s.id,i=o!==n[r(508)];if(i){const t=n[r(565)]-this[r(547)],e=this[r(472)]();if(this[r(502)][r(486)][r(468)](),s[r(558)]+t!==e){const n=s[r(485)]+t,o=this[r(473)][r(534)][r(568)](Fn.Users),i=this[r(502)][r(469)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(523)][r(533)](t=>o[r(517)](t));s[r(491)]({...i,authors:a},!0),this[r(502)][r(476)](s.id,i,!0)}this[r(502)][r(497)]=e,s[r(558)]===s[r(485)]&&!this[r(502)][r(527)][r(522)](o)&&this[r(502)][r(536)][r(506)][r(535)](o),this[r(502)][r(532)](e)}const{revisions:a,requestId:c}=await this[r(560)][r(555)](e[r(552)],this[r(526)]);i&&a[r(559)]>0?n[r(564)]():(await this[r(563)](a),this[r(516)](a,c),this[r(502)][r(544)]())};return n[t(546)]?r():new Promise((e,s)=>{const o=t;n[o(578)](o(479),()=>{const t=o;r()[t(538)](e)[t(501)](s)})})}[qo(531)](){super[qo(531)]()}async[qo(550)](){const t=qo;this[t(560)][t(575)]||await new Promise(e=>{const n=t;this[n(530)](this[n(560)],n(556),t=>{t[n(569)](),e()})})}[qo(472)](){const t=qo,e=this[t(473)][t(534)][t(568)](po)[t(496)][t(518)]()[t(549)]();for(const n of e)if(t(572)!==n[t(488)]||n[t(492)])return n[t(566)]+1}[qo(514)](){const t=qo,e=this[t(473)][t(534)][t(568)](po);return new Promise(n=>{const r=t;e[r(500)]?e[r(578)](r(507),()=>{n(this[r(472)]())}):n(this[r(472)]())})}[qo(516)](t,e){const n=qo,r=this[n(502)][n(536)];this[n(526)]=e;for(const e of t){const t=r[n(481)](e.id);if(t){if((e[n(485)]||e[n(558)])&&(e[n(495)]=null),t===this[n(502)][n(510)]){const r=Math[n(519)](t[n(558)],e[n(558)]),s=Math[n(519)](t[n(485)],e[n(485)]);let o;t[n(558)]===e[n(558)]&&t[n(485)]===e[n(485)]?(o=!0,this[n(574)](e)):e[n(558)]===r&&e[n(485)]===s?o=!1:(t[n(558)]===r&&t[n(485)]===s||this[n(471)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(485)],delete e[n(558)],delete e[n(495)],delete e[n(573)],delete e[n(523)])}this[n(502)][n(567)](e),this[n(574)](e)}else this[n(502)][n(470)](e)}const s=r[n(505)]();s[n(549)]();for(let t=0;t<s[n(559)]-1;t++){const e=s[t],r=s[t+1];if(e[n(485)]<r[n(558)]){const t=r[n(558)],s=Math[n(519)](t,e[n(558)]);this[n(471)]({revision:e,from:t,to:s})}}}[qo(471)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(473)][r(534)][r(568)](Fn.Users),o=this[r(502)][r(469)]({revision:t,from:e,to:n});o[r(490)]=o[r(523)][r(533)](t=>s[r(517)](t)),t[r(491)](o)}[qo(574)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(543)](t))"id"!==r&&(n[r]=void 0);this[e(502)][e(476)](n.id,n,!0)}async[qo(563)](t){const e=qo,n=this[e(473)][e(534)][e(568)](Fn.Users),{connection:r}=this[e(473)][e(534)][e(568)](zn),s=new Set;for(const n of t){for(const t of n[e(523)])i(t);n[e(467)]&&i(n[e(467)])}if(0===s[e(515)])return;const o=await b[e(487)](r,Array[e(576)](s));for(const t of o)n[e(517)](t.id)||n[e(553)](t);function i(t){const r=e;n[r(517)](t)||s[r(571)](t)}}}function Ho(t){const e=qo;return t[e(580)][e(561)](e(554))||t[e(580)][e(561)](e(545))||t[e(580)][e(561)](e(474))}var zo=Fo;function Fo(t,e){var n=Ko();return(Fo=function(t,e){return n[t-=192]})(t,e)}function Ko(){var t=["3445jezEXo","5584iEABkr","1104wdJgPK","isOfficialPlugin","RevisionHistory","2417822eKxpZt","isPremiumPlugin","945174XCgXou","7149ZqQvcj","pluginName","63wAqVeP","requires","191205SUBAJj","9zVajmk","RealTimeCollaborativeRevisionHistory","972240jkKNoZ","14oCdMEJ"];return(Ko=function(){return t})()}!function(t){for(var e=Fo,n=t();;)try{if(103585===-parseInt(e(192))/1+-parseInt(e(196))/2*(-parseInt(e(205))/3)+-parseInt(e(199))/4*(parseInt(e(197))/5)+parseInt(e(204))/6+-parseInt(e(207))/7*(parseInt(e(198))/8)+parseInt(e(193))/9*(parseInt(e(195))/10)+parseInt(e(202))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Wo extends e.Plugin{static get[zo(208)](){return[zo(201),Yo,Io]}static get[zo(206)](){return zo(194)}static get[zo(200)](){return!0}static get[zo(203)](){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)}const Zo=Xo;function Xo(t,e){const n=ti();return(Xo=function(t,e){return n[t-=326]})(t,e)}!function(t){const e=Xo,n=t();for(;;)try{if(422638===parseInt(e(332))/1+-parseInt(e(344))/2+parseInt(e(327))/3*(-parseInt(e(338))/4)+parseInt(e(346))/5+parseInt(e(345))/6*(parseInt(e(330))/7)+parseInt(e(339))/8+parseInt(e(333))/9*(parseInt(e(334))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ti);class $o extends r.View{[Zo(349)];constructor(t,e=6){const n=Zo;super(t);const r=this[n(343)];this[n(340)](n(336),!0),this[n(340)](n(342),0),this[n(349)]=e,this[n(335)](n(336)).to(this,n(342),t=>t<e),this[n(348)]({tag:n(331),attributes:{class:["ck",n(328),r.if(n(336),n(347))],role:n(326)},children:[{tag:n(331),attributes:{class:["ck",n(329)]},children:[{tag:n(331),attributes:{class:["ck",n(337)]},children:[{text:r.to(n(342),t=>"+"+(t-this[n(349)]+2)[n(341)]())}]}]}]})}}function ti(){const t=["ck-presence-list__list-item","ck-presence-list__users-counter","7gwBDXM","div","224233ghUZIW","1643562YagsBS","10RNBrZn","bind","isHidden","ck-presence-list__users-counter__text","3036508kNzrwL","3286984Guhpsx","set","toString","usersCount","bindTemplate","850668ZRXOHS","2566488UAwILT","1808135dqYBtm","ck-presence-list__counter--hidden","setTemplate","_collapseAt","listitem","3CYElgP"];return(ti=function(){return t})()}const ei=ri;function ni(){const t=["list","setTemplate","createCollection","7611232aaqgQN",".ck-balloon-panel_with-arrow","isExpanded","24160389ejcdiE","ck-presence-list__list","change:hasPopup",".ck-presence-list__dropdown-list","setAttribute","117252FBXZmU","fire","div","Collapsed connected users list (press ENTER to open it)","aria-expanded","10dUNzxR","hasPopup","bindTemplate","listenTo","render","presencelist:hide","3710277FfksFs","contains","element","presencelist:show","keystrokes","removeAttribute","focus","118CppoLT","133PsIBnr","392955QPZdxD","375hBsAwR","set","16304WVYeLn","querySelector","items","Connected users list","relatedTarget","29994cJhGyY"];return(ni=function(){return t})()}function ri(t,e){const n=ni();return(ri=function(t,e){return n[t-=199]})(t,e)}!function(t){const e=ri,n=t();for(;;)try{if(995455===-parseInt(e(202))/1+-parseInt(e(200))/2*(-parseInt(e(210))/3)+parseInt(e(214))/4+parseInt(e(203))/5*(parseInt(e(222))/6)+parseInt(e(201))/7*(parseInt(e(205))/8)+parseInt(e(233))/9*(-parseInt(e(227))/10)+-parseInt(e(217))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ni);class si extends r.View{[ei(207)];[ei(237)];constructor(t){const e=ei;super(t);const r=this[e(229)];this[e(207)]=this[e(213)](),this[e(237)]=new n.KeystrokeHandler,this[e(204)]({hasPopup:!1,isExpanded:!1}),this[e(212)]({tag:e(224),attributes:{"aria-haspopup":r.if(e(228)),"aria-expanded":r.to(e(216),t=>this[e(228)]&&String(t)),"aria-label":r.to(e(228),n=>mr(t,e(n?225:208))),role:e(211),tabindex:r.to(e(228),t=>!!t&&0),class:["ck",e(218)]},children:this[e(207)],on:{mouseenter:r.to(()=>this[e(223)](e(236))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(206)](n(220)),o=document[n(206)](n(215));s?.[n(234)](r[n(209)])||o?.[n(234)](r[n(209)])||this[n(223)](n(232))})}}),this.on(e(219),(t,n,r)=>{const s=e;this[s(235)]&&(r?this[s(235)][s(221)](s(226),String(this[s(216)])):this[s(235)][s(238)](s(226)))})}[ei(199)](){const t=ei;this[t(235)][t(199)]()}[ei(231)](){const t=ei;super[t(231)](),this[t(237)][t(230)](this[t(235)])}}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=ui;function ci(){const t=["1669944mozWJy","tooltipPosition","11393140gwEcpX","hasPopup","counterView","setTemplate","21NRBbJP","bind","10rGAomb","div","locale","items","set","inlineListView","ck-reset","isCollapsed","ck-presence-list","listenTo","change","bindTemplate","41367JhHzQI","1890PNYpGr","ck-rounded-corners","first","ck-presence-list--collapsed","436DsZcgv","12SDXifs","74511iEGAOk","287374oNkmWo","2740534sGwiLO","2044984yEJHYy"];return(ci=function(){return t})()}function ui(t,e){const n=ci();return(ui=function(t,e){return n[t-=254]})(t,e)}!function(t){const e=ui,n=t();for(;;)try{if(949166===parseInt(e(270))/1+parseInt(e(271))/2+-parseInt(e(262))/3*(parseInt(e(267))/4)+parseInt(e(281))/5*(parseInt(e(273))/6)+-parseInt(e(279))/7*(-parseInt(e(272))/8)+-parseInt(e(269))/9*(parseInt(e(263))/10)+parseInt(e(275))/11*(parseInt(e(268))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ci);class di extends r.View{[ai(277)];[ai(255)];constructor(t,e=6){const n=ai;super(t);const r=this[n(261)];this[n(254)](n(257),!0),this[n(277)]=new $o(this[n(283)],e),this[n(255)]=new si(t),this[n(255)][n(280)](n(276)).to(this,n(257)),this[n(259)](this[n(255)][n(284)],n(260),()=>{const t=n;for(const e of this[t(255)][t(284)])e[t(274)]="s";this[t(255)][t(284)][t(265)]&&(this[t(255)][t(284)][t(265)][t(274)]="se")}),this[n(278)]({tag:n(282),attributes:{class:["ck",n(258),n(256),n(264),r.if(n(257),n(266))]},children:[this[n(255)]]})}}const li=pi;function pi(t,e){const n=hi();return(pi=function(t,e){return n[t-=179]})(t,e)}function hi(){const t=[".ck-balloon-panel_with-arrow","innerHeight","834VoJHeH","resize","8126139pkbvNr","_isScrollable","div",".ck-presence-list__list","7565968afFTlg","4331652OhCsps","window","1215377BzRYoJ","element","4076841QGaylN","1808218amIAgy","scrollHeight","application","change","role","max","checkIfScrollable","clientHeight","querySelector","bindTemplate","Connected users list dropdown menu","23755FsfcFU","contains","set","ariaLabel","ck-presence-list__dropdown-list-wrapper","listenTo","presencelist:hide","fire","ck-presence-list__dropdown-list-wrapper_scrollable","setTemplate","ck-reset","ck-list","relatedTarget","ck-presence-list__dropdown-list","items","render","ariaLabelledBy","listWrapperView"];return(hi=function(){return t})()}!function(t){const e=pi,n=t();for(;;)try{if(858932===-parseInt(e(181))/1+parseInt(e(184))/2+-parseInt(e(183))/3+parseInt(e(179))/4+-parseInt(e(195))/5*(parseInt(e(215))/6)+parseInt(e(217))/7+parseInt(e(221))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hi);class fi extends r.View{[li(212)];constructor(t,e){const n=li;super(t);const r=this[n(193)];this[n(212)]=new mi(t,e),this[n(204)]({tag:n(219),attributes:{tabindex:-1,role:n(186),class:["ck",n(208)],"aria-label":mr(t,n(194))},children:[this[n(212)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(192)](e(220)),o=document[e(192)](e(213));s?.[e(196)](r[e(207)])||o?.[e(196)](r[e(207)])||this[e(202)](e(201))})}})}}class mi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(193)];this[r(197)](r(218),!1),this[r(204)]({tag:e?r(219):"ul",attributes:{class:["ck",r(205),r(206),r(199),s.if(r(218),r(203))],role:s.to(r(188)),"aria-label":s.to(r(198)),"aria-labelledby":s.to(r(211))},children:this[r(209)]}),this[r(200)](n.global[r(180)],r(216),()=>this[r(190)]()),this[r(209)].on(r(187),()=>this[r(190)]())}[li(210)](){const t=li;super[t(210)](),this[t(190)]()}[li(190)](){const t=li,e=this[t(182)];e&&(this[t(218)]=Math[t(189)](e[t(185)],e[t(191)])>.8*window[t(214)])}}const gi=bi;!function(t){const e=bi,n=t();for(;;)try{if(498887===parseInt(e(494))/1*(-parseInt(e(471))/2)+-parseInt(e(475))/3+-parseInt(e(489))/4*(parseInt(e(479))/5)+parseInt(e(484))/6+parseInt(e(483))/7*(-parseInt(e(487))/8)+-parseInt(e(490))/9+parseInt(e(478))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ii);class yi extends r.ListItemView{[gi(481)];constructor(t,e,n){const r=gi;super(t);const s=this[r(492)];this[r(481)]=new Fn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(485)],tabindex:-1,role:r(477),"aria-label":e[r(488)]},children:[this[r(481)],{tag:r(470),attributes:{class:["ck",r(473)]},children:[{text:e[r(488)]}]},{tag:r(470),attributes:{class:["ck",r(480),e[r(482)][r(491)]()],"aria-hidden":r(476)}}]};n&&(o[r(496)]=r(472),o.on={click:s.to(()=>this[r(495)](r(474)))}),this[r(469)](o)}[gi(486)](){const t=gi;this[t(493)][t(486)]()}}function bi(t,e){const n=Ii();return(bi=function(t,e){return n[t-=469]})(t,e)}function Ii(){const t=["presentation","24642520qTOhoG","877465iwMUFj","ck-presence-list__marker","userView","color","4113739FQqDVO","1394538jfqxxS","ck-presence-list__dropdown-list-item","focus","8tuIPvZ","name","8ZuGTow","2462094ZGgiBr","getBackgroundColorClass","bindTemplate","element","1HnWtQd","fire","tag","setTemplate","span","1601534NvvYEg","button","ck-user__full-name","execute","554376ddlRhx","true"];return(Ii=function(){return t})()}const Oi=vi;function vi(t,e){const n=ki();return(vi=function(t,e){return n[t-=396]})(t,e)}!function(t){const e=vi,n=t();for(;;)try{if(973490===parseInt(e(400))/1*(parseInt(e(428))/2)+parseInt(e(401))/3+parseInt(e(418))/4+-parseInt(e(414))/5+-parseInt(e(402))/6*(parseInt(e(408))/7)+-parseInt(e(426))/8*(-parseInt(e(404))/9)+-parseInt(e(425))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ki);class wi extends r.View{[Oi(407)];[Oi(429)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(397)];this[s(409)](s(415),!1),this[s(409)](s(422),!0),this[s(409)](s(411),""),this[s(407)]=new Fn.UserView(t,e),this[s(429)]=new Si(t,e);const i=new r.LabelView(t);i[s(416)][s(423)]=s(413),i[s(427)]=e[s(424)];const a={tag:s(406),attributes:{class:["ck",s(405)],role:s(396),tabindex:o.to(s(415),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(407)][s(424)],"data-cke-tooltip-position":o.to(s(411)),"data-cke-tooltip-disabled":o.to(s(422),t=>!t),"data-cke-tooltip-class":s(421)},children:[this[s(407)],this[s(429)],i]};n&&(a[s(423)]=s(410),a.on={click:o.to(()=>this[s(399)](s(420)))}),this[s(417)](a)}}class Si extends r.View{constructor(t,e){const n=Oi;super(t),this[n(417)]({tag:n(413),attributes:{class:["ck",n(419),e[n(398)][n(412)]()],"aria-hidden":n(403)}})}}function ki(){const t=["isFocusable","template","setTemplate","5882740rhQBCL","ck-presence-list__marker","execute","ck-presence-list__list-item__tooltip","hasTooltip","tag","name","17184960OYnRss","8mfXObC","text","3686168SjYRSQ","markerView","listitem","bindTemplate","color","fire","1ZtRBCq","104460quoebX","24fvUcsA","true","6688557XgiPQS","ck-presence-list__list-item","div","userView","2197951yWIRcE","set","button","tooltipPosition","getBackgroundColorClass","span","719020vimytn"];return(ki=function(){return t})()}const Ai=Ti;function Ti(t,e){const n=Ci();return(Ti=function(t,e){return n[t-=499]})(t,e)}!function(t){const e=Ti,n=t();for(;;)try{if(809288===-parseInt(e(572))/1*(-parseInt(e(554))/2)+parseInt(e(558))/3+-parseInt(e(546))/4+-parseInt(e(536))/5*(-parseInt(e(533))/6)+-parseInt(e(520))/7*(-parseInt(e(599))/8)+-parseInt(e(504))/9+-parseInt(e(523))/10*(parseInt(e(538))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ci);const _i={collapseAt:6,displayMe:!0};function Ci(){const t=["textarea","execute","reverse","Enter","checkIfScrollable","isFocusable","[contenteditable]","Shift+Tab","unpin","13291605CGpELV","content","body","Tab","isCollapsed","allConnectedUsers","_bodyCollection","isVisible","counterView","presencelist:hide","filter","inlineListView","sort","attachToDom","bind","PresenceListUI","30765pnZxgr","Esc","button","40trjkaU","select","focus","appendChild","usersCount","join","add","presenceList.displayMe","input","indexOf","3311094MLhEbe","isRendered","init","5EDjwsn","presenceList","1303423sHaPYC","_allConnectedUsers","plugins","listenTo","class","_createView","presenceList.collapseAt","focusTracker","4029744CfsNBp","detachFromDom","set","number","presenceDropdownView","hideDropdown","from","context","16BwqpLI","querySelectorAll","map","onClick","3055983IiBGxE","isExpanded","min","keystrokes","activeElement","find","length","view","presenceList.container","render","locale","element","presencelist:show","items","78502TNaTBk","isPremiumPlugin","balloonPanelView","[tabindex]","define","ck ck-presence-list__balloon","isMe","currentDisplayedUsers","config","pluginName","hasTooltip","using","displayMe","get","isOfficialPlugin","requires","destroy","pin","showDropdown",':not([disabled]):not([tabindex="-1"])',"presencelist-missing-container","change:isFocused","offsetWidth","presencelist-collapseat-invalid-format","remove","_handleUserRemove","offsetHeight","2856NDYvNK","tabIndex","_handleUserAdd","bindTo"];return(Ci=function(){return t})()}class Pi extends e.ContextPlugin{[Ai(579)];[Ai(574)];[Ai(565)];[Ai(550)];[Ai(510)]=null;static get[Ai(581)](){return Ai(519)}static get[Ai(586)](){return!0}static get[Ai(573)](){return!0}constructor(t){const e=Ai;super(t),this[e(553)][e(580)][e(576)](e(537),_i);const s=t[e(580)][e(585)](e(544));if(e(549)!=typeof s)throw new n.CKEditorError(e(595),this);if(s<1)throw new n.CKEditorError(e(595),this);this[e(539)]=this[e(553)][e(540)][e(585)](Qn)[e(509)],this[e(548)](e(527),0),this[e(579)]=new n.Collection,this[e(574)]=new r.BalloonPanelView,this[e(574)][e(542)]=e(577),this[e(565)]=this[e(543)](),this[e(550)]=void 0}static get[Ai(587)](){return[Qn]}[Ai(535)](){const t=Ai;for(const e of this[t(539)])this[t(601)](e);this[t(541)](this[t(539)],t(529),(e,n)=>{this[t(601)](n)}),this[t(541)](this[t(539)],t(596),(e,n)=>{this[t(597)](n)})}[Ai(543)](){const t=Ai,e=this[t(553)],s=new di(this[t(553)][t(568)],this[t(553)][t(580)][t(585)](t(544))),o=this[t(574)];if(!Qo(e[t(580)][t(585)](t(566))))throw new n.CKEditorError(t(592),this);return s[t(512)][t(518)](t(527)).to(this),s[t(518)](t(508)).to(this,t(527),n=>{const r=t,{collapseAt:o}=e[r(580)][r(585)](r(537)),i=n>=o;if(i&&!s[r(515)][r(571)][r(563)](t=>t instanceof $o)){const t=this[r(553)][r(580)][r(585)](r(544))-1;this[r(579)][r(564)]==t&&this[r(579)][r(564)]>1&&this[r(579)][r(596)](this[r(579)][r(564)]-1),s[r(515)][r(571)][r(529)](s[r(512)])}return i||this[r(551)](),i}),s[t(515)][t(571)][t(602)](this[t(579)])[t(583)](n=>{const r=t,o=e[r(580)][r(585)](r(537)),i=new wi(e[r(568)],n,!!o[r(557)]);return i[r(518)](r(582)).to(s,r(508),t=>!t),i[r(518)](r(500)).to(s,r(508),t=>!t),o[r(557)]&&this[r(541)](i,r(604),()=>{const t=r;this[t(565)][t(508)]||o[t(557)](n,i[t(569)])}),i}),this[t(541)](s[t(515)],t(570),()=>{const e=t;this[e(565)][e(508)]&&this[e(590)]()}),this[t(541)](s[t(515)],t(513),()=>{const e=t;this[e(550)]&&this[e(551)]()}),s[t(515)][t(561)][t(548)](t(606),(e,n)=>{const r=t;this[r(565)][r(508)]&&(this[r(590)](),n())}),s[t(567)](),o[t(567)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(511)],contextElements:[o[t(569)],s[t(515)][t(569)]],callback:()=>this[t(551)]()}),e[t(580)][t(585)](t(566))[t(526)](s[t(569)]),this[t(510)]=new r.BodyCollection(this[t(553)][t(568)]),this[t(510)][t(517)](),this[t(510)][t(529)](this[t(574)]),s}[Ai(601)](t){const e=Ai;if(!this[e(553)][e(580)][e(585)](e(530))&&t[e(578)])return;const n=this[e(553)][e(580)][e(585)](e(544))-1;for(this[e(527)]++;this[e(579)][e(564)]>=n-(this[e(565)][e(508)]?1:0)&&this[e(579)][e(564)]>1;)this[e(579)][e(596)](1);const r=t[e(578)]?0:this[e(579)][e(564)];this[e(579)][e(529)](t,r)}[Ai(597)](t){const e=Ai;this[e(527)]--;const{collapseAt:n}=this[e(553)][e(580)][e(585)](e(537)),r=this[e(527)]>=n;if(this[e(579)][e(585)](t.id))this[e(579)][e(596)](t.id);else if(r&&this[e(579)][e(564)]+1===n-1)return;if(this[e(579)][e(564)]+(r?1:0)<this[e(527)])for(const t of Array[e(552)](this[e(539)])[e(605)]())if(!this[e(579)][e(585)](t.id)&&(this[e(579)][e(529)](t,Math[e(560)](this[e(579)][e(564)]-(r?1:0),1)),this[e(579)][e(564)]+(r?1:0)===n-1))return}[Ai(590)](){const t=Ai;if(this[t(550)])return;const e=this[t(553)][t(580)][t(585)](t(537));this[t(550)]=new fi(this[t(553)][t(568)],!!e[t(557)]),this[t(565)][t(515)][t(559)]=!0,this[t(541)](this[t(550)],t(513),()=>{const e=t;this[e(550)]&&this[e(551)]()});const{listWrapperView:n}=this[t(550)];n[t(571)][t(602)](this[t(539)])[t(583)](n=>{const r=t;if(!e[r(584)]&&n[r(578)])return null;const s=new yi(this[r(553)][r(568)],n,!!e[r(557)]);return e[r(557)]&&this[r(541)](s,r(604),()=>{const t=r;e[t(557)](n,s[t(569)])}),s}),this[t(574)][t(505)][t(529)](this[t(550)]),this[t(574)][t(589)]({target:this[t(565)][t(515)][t(569)]}),n[t(525)](),n[t(499)]();const r=(e,n)=>{const r=t;this[r(551)](),this[r(565)][r(515)][r(525)](),n()};n[t(561)][t(548)](t(521),r),n[t(561)][t(548)](t(502),r),n[t(561)][t(548)](t(507),(e,n)=>{const r=t;!function(t){const e=Ti,n=["a",e(522),e(531),e(524),e(603),e(575),e(501)][e(556)](t=>t+e(591))[e(528)](","),r=[...document[e(506)][e(555)](n)][e(514)](t=>t===document[e(562)]||t[e(594)]+t[e(598)]>0)[e(516)]((t,n)=>(t[e(600)]||0)-(n[e(600)]||0)),s=r[e(532)](t),o=r[(s+1)%r[e(564)]];o&&o[e(525)]()}(this[r(565)][r(569)]),this[r(551)](),n()}),n[t(545)][t(529)](this[t(565)][t(569)]),n[t(545)].on(t(593),(e,n,r)=>{r||this[t(551)]()})}[Ai(551)](){const t=Ai;this[t(550)]&&(this[t(565)][t(515)][t(559)]=!1,this[t(574)][t(503)](),this[t(574)][t(505)][t(596)](this[t(550)]),this[t(550)][t(588)](),this[t(550)]=void 0)}[Ai(588)](){const t=Ai;super[t(588)](),this[t(565)]&&this[t(565)][t(534)]&&this[t(565)][t(588)](),this[t(510)]&&(this[t(510)][t(547)](),this[t(510)][t(588)](),this[t(510)]=null)}}var Ei=Di;function ji(){var t=["324104uGfveC","6IgGhDj","requires","6246616cRwOIO","1559510SkrXNa","736842gthhOr","2059295KTnpNH","1675943OOYKjJ","PresenceList","pluginName","isOfficialPlugin","2LjKjxB","3022857uKhTQm","isPremiumPlugin"];return(ji=function(){return t})()}function Di(t,e){var n=ji();return(Di=function(t,e){return n[t-=460]})(t,e)}!function(t){for(var e=Di,n=t();;)try{if(868166===parseInt(e(471))/1+-parseInt(e(461))/2*(-parseInt(e(469))/3)+parseInt(e(464))/4+-parseInt(e(468))/5+parseInt(e(465))/6*(parseInt(e(470))/7)+-parseInt(e(467))/8+-parseInt(e(462))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ji);class xi extends e.ContextPlugin{static get[Ei(466)](){return[Qn,Pi]}static get[Ei(473)](){return Ei(472)}static get[Ei(460)](){return!0}static get[Ei(463)](){return!0}}function Ri(t,e){var n=Ni();return(Ri=function(t,e){return n[t-=291]})(t,e)}function Ni(){var t=["117105fsyTxS","1uhOjfi","19395iNpfZq","14301452ZlCWeD","2688469CfzceF","8LvMoRa","634342RbDJvd","7715QnSthZ","2110iNtWdl","428514YlsNqC","12gfKCSq","56LgjpWc"];return(Ni=function(){return t})()}!function(t){for(var e=Ri,n=t();;)try{if(233041===-parseInt(e(292))/1*(parseInt(e(297))/2)+parseInt(e(291))/3+parseInt(e(302))/4*(-parseInt(e(298))/5)+parseInt(e(300))/6+-parseInt(e(295))/7*(parseInt(e(296))/8)+parseInt(e(293))/9*(-parseInt(e(299))/10)+parseInt(e(294))/11*(parseInt(e(301))/12))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)}},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],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+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),u=0;u<o.length;u++){var d=n(o[u]);0===e[d].references&&(e[d].updater(),e.splice(d,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+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[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 y(unescape(t.pathname),{});else if("string"===o)for(e in s=new y(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 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,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=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?~(h="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(v[b]=t.slice(0,h),t=t.slice(h+u[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&&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&&(~(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()}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<p.length;u++){var d=p[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}}},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 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 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=(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 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 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}},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,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()},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 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 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 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=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(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(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(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(h,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=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:()=>Yo,CloudServicesTrackChangesAdapter:()=>Eo,PresenceList:()=>Di,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>Vo,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Xn,WebSocketGateway:()=>zn});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=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 d[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(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 h(e);try{const e=await t._sendRequest(y._SERVICE,h.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(""),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 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 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 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}}},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 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 pt[t](n)}open(){let t;if(this.opts.rememberUpgrade&&gt.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,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 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(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 ue 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 ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de 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 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 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 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 pe(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 pe(t.type,le[n].create(t.data[0],t.data[1]),t.id,t.nsp,new zt(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 ge 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 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 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 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 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 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: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 gn(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 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: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="",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: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 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: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 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;function Gn(){const t=["catch","9757930gBzXfg","connected","20tMLQqN","delete","context","CONNECTING","change:me","from","initialReconnectionInterval","offline","cloudservices-reconnection-error","9834100QfKXLt","1054tHudmm","isPremiumPlugin","constructor","state","connect","config","bind","all","removeFromReconnectionStack","error","5202312izjvSV","set","_reconnectionStack","showWarning","then","requires","addToReconnectionStack","_isBrowserOffline","CONNECTED","limitExceeded","destroy","_shouldPluginsReconnect","connection","WebSocketGateway","2453202gSYuiB","352490oBDkgV","online","websocketgateway-plugin-already-registered","listenTo","disconnect","reconnect","get","plugins","isInReconnectionStack","9cOPXgU","init","websocketgateway-missing-token","add","_reconnect","6412936NmjIbk","token","websocketgateway-invalid-plugin-interface","isOfficialPlugin","websocketgateway-missing-websocket-url","DISCONNECTED","stopListening","cloudServices.connectionTimeout","1369tTPwdO","Connected users limit exceeded","function","code","has","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.","CloudServices","pluginName","webSocketUrl","cloudServices.requestTimeout","cloudservices-init","define","_domEmitter","real-time-collaboration"];return(Gn=function(){return t})()}const Yn=Hn;function Hn(t,e){const n=Gn();return(Hn=function(t,e){return n[t-=109]})(t,e)}!function(t){const e=Hn,n=t();for(;;)try{if(732234===-parseInt(e(129))/1*(-parseInt(e(156))/2)+-parseInt(e(180))/3+-parseInt(e(146))/4*(-parseInt(e(181))/5)+parseInt(e(166))/6+parseInt(e(144))/7+parseInt(e(121))/8*(-parseInt(e(116))/9)+-parseInt(e(155))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Gn);class zn extends e.ContextPlugin{static[Yn(179)]=(()=>ve)();static[Yn(152)]=1e3;[Yn(178)];[Yn(168)];[Yn(177)];[Yn(141)];static get[Yn(171)](){return[Yn(135),r.Notification]}static get[Yn(136)](){return Yn(179)}static get[Yn(124)](){return!0}static get[Yn(157)](){return!0}constructor(t){const e=Yn;super(t),this[e(167)](e(159),Ie[e(174)]),this[e(167)](e(173),!1),this[e(168)]=new Set,this[e(177)]=!1,this[e(141)]=new((0,n.DomEmitterMixin)())}[Yn(117)](){const t=Yn,e=this[t(148)],s=e[t(114)][t(113)](t(135)),o=e[t(114)][t(113)](r.Notification);if(!s[t(122)])throw new n.CKEditorError(t(118),this);if(!s[t(137)])throw new n.CKEditorError(t(125),this);return this[t(141)][t(110)](window,t(153),()=>this[t(173)]=!0),this[t(141)][t(110)](window,t(182),()=>this[t(173)]=!1),this[t(148)][t(161)][t(140)](t(128),10),this[t(148)][t(161)][t(140)](t(138),20),zn[t(179)][t(160)](s[t(122)],s[t(137)],{timeout:1e3*this[t(148)][t(161)][t(113)](t(128)),requestTimeout:1e3*this[t(148)][t(161)][t(113)](t(138))})[t(170)](e=>{const r=t;if(this[r(178)]=e,this[r(162)](r(159)).to(e,r(159),this,r(173),(t,e)=>(r(145)!==t&&(this[r(177)]=!0),e||t!==Ie[r(174)]?Ie[r(126)]:this[r(159)]==Ie[r(126)]&&this[r(177)]?(this[r(177)]=!1,this[r(120)](),Ie[r(149)]):Ie[r(174)])),this[r(178)].on(r(165),(t,e)=>{const s=r;if(s(175)!==e[s(132)])throw console[s(165)](e),new n.CKEditorError(s(139),null,{originalError:e});o[s(169)](s(134),{title:s(130),namespace:s(142)})}),!e.me)return new Promise(t=>e.on(r(150),t))})[t(143)](e=>{const r=t;throw console[r(165)](e),new n.CKEditorError(r(139),null,{originalError:e})})}[Yn(172)](t){const e=Yn;if(e(131)!=typeof t[e(112)])throw new n.CKEditorError(e(123),this);if(this[e(115)](t))throw new n.CKEditorError(e(109),this,{name:t[e(158)][e(136)]});this[e(168)][e(119)](t)}[Yn(164)](t){const e=Yn;this[e(168)][e(147)](t)}[Yn(115)](t){const e=Yn;return this[e(168)][e(133)](t)}[Yn(120)](){const t=Yn;return this[t(178)][t(112)]()[t(170)](()=>Promise[t(163)](Array[t(151)](this[t(168)],e=>e[t(112)]())))[t(170)](()=>this[t(159)]=Ie[t(174)])[t(143)](e=>{const r=t;throw console[r(165)](e),new n.CKEditorError(r(154),this[r(148)])})}[Yn(111)](){const t=Yn;this[t(178)]&&this[t(178)][t(111)](),this[t(159)]=Ie[t(126)],this[t(141)][t(127)]()}[Yn(176)](){const t=Yn;this[t(111)](),super[t(176)]()}}var Fn=__webpack_require__(211);const Kn=Qn;function Wn(){const t=["1304114RcayIe","set","getUserSessions","forEach","assign","getUser","getUserBySessionId","context","orderNumber","2dFykbj","clear","user","_uniqueUsersCount","mySessionId","values","add","isMe","51038RajpxX","listenTo","connected","12nuYMlA","change:state","role","requires","fire","plugins","channelConnectedUsers","unregister","328552oqDSOG","get","register","_handleSessionAdd","1011520ggJaYt","has","getUserRole","defineMe","sessionAdd:","stopListening","_registeredSessions","sessions-register-already-registered","521994sFdVQc","_handleSessionRemove","connection","Sessions","_createUser","state","size","addUser","sessions-unregister-not-exist","pluginName","init","sessionId","385848OyNhyW","isPremiumPlugin","channelSessions","isOfficialPlugin","2621290rjVgFP","delete","remove","hiddenInPresenceList","_users","allConnectedUsers"];return(Wn=function(){return t})()}function Qn(t,e){const n=Wn();return(Qn=function(t,e){return n[t-=202]})(t,e)}!function(t){const e=Qn,n=t();for(;;)try{if(283377===parseInt(e(221))/1*(parseInt(e(213))/2)+-parseInt(e(244))/3+parseInt(e(236))/4+parseInt(e(260))/5+parseInt(e(224))/6*(-parseInt(e(204))/7)+-parseInt(e(232))/8+parseInt(e(256))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Wn);class Xn extends e.ContextPlugin{[Kn(258)];[Kn(230)];[Kn(203)];[Kn(242)];[Kn(216)];[Kn(202)];static get[Kn(253)](){return Kn(247)}static get[Kn(259)](){return!0}static get[Kn(257)](){return!0}static get[Kn(227)](){return[zn,Fn.Users]}constructor(t){const e=Kn;super(t),this[e(258)]=new Map,this[e(230)]=new Map,this[e(203)]=new n.Collection,this[e(242)]=new Map,this[e(216)]=0,this[e(202)]=this[e(211)][e(229)][e(233)](Fn.Users)}[Kn(254)](){const t=Kn,e=this[t(211)][t(229)][t(233)](zn);this[t(222)](e,t(225),(e,n,r)=>{const s=t;if(s(223)!==r)this[s(258)][s(207)](t=>t[s(214)]()),this[s(230)][s(207)](t=>t[s(214)]()),this[s(203)][s(214)]();else for(const[t,e]of this[s(242)])for(const n of e)this[s(235)](t,n)}),this[t(248)](e[t(246)].me,!0)}[Kn(234)](t,e){const r=Kn;if(this[r(242)][r(237)](t))throw new n.CKEditorError(r(243),null,{channelId:t});this[r(242)][r(205)](t,e),this[r(258)][r(205)](t,new n.Collection),this[r(230)][r(205)](t,new n.Collection),this[r(222)](e,r(219),(e,n)=>this[r(235)](t,n)),this[r(222)](e,r(262),(e,n)=>this[r(245)](t,n));for(const n of e)this[r(235)](t,n)}[Kn(231)](t){const e=Kn;if(!this[e(242)][e(237)](t))throw new n.CKEditorError(e(252),null,{channelId:t});const r=this[e(242)][e(233)](t);this[e(241)](r);for(const n of r)e(223)===this[e(211)][e(229)][e(233)](zn)[e(249)]&&this[e(245)](t,n);this[e(242)][e(261)](t),this[e(258)][e(261)](t),this[e(230)][e(261)](t)}get[Kn(217)](){const t=Kn;return this[t(211)][t(229)][t(233)](zn)[t(246)][t(255)]}[Kn(210)](t){const e=Kn;for(const n of this[e(258)][e(218)]())for(const r of n)if(r.id===t)return r[e(215)]}[Kn(206)](t,e){const n=Kn,r=e?[this[n(258)][n(233)](e)]:this[n(258)][n(218)](),s=new Set;for(const e of r)for(const r of e)r[n(215)].id===t.id&&s[n(219)](r.id);return s}[Kn(238)](t){const e=Kn;for(const n of this[e(258)][e(218)]())for(const r of n)if(r[e(215)]===t)return r[e(226)]}[Kn(235)](t,e){const n=Kn;if(n(223)!==this[n(211)][n(229)][n(233)](zn)[n(249)])return;const r=e[n(215)],s=this[n(202)][n(209)](r.id)||this[n(248)](r),o=Object[n(208)]({},e,{user:s});if(this[n(258)][n(233)](t)[n(219)](o),!r[n(263)]){const e=this[n(230)][n(233)](t);e[n(237)](s.id)||e[n(219)](s),this[n(203)][n(237)](s.id)||r[n(263)]||this[n(203)][n(219)](s,s[n(220)]?0:void 0)}this[n(228)](n(240)+t,{channelId:t,session:o})}[Kn(245)](t,e){const n=Kn;if(n(223)!==this[n(211)][n(229)][n(233)](zn)[n(249)])return;const r=this[n(230)][n(233)](t),s=e[n(215)];s.id&&(this[n(258)][n(233)](t)[n(262)](e.id),r[n(237)](s.id)&&!this[n(206)](s,t)[n(250)]&&r[n(262)](s.id),this[n(203)][n(233)](s.id)&&!this[n(206)](s)[n(250)]&&this[n(203)][n(262)](s.id))}[Kn(248)](t,e){const n=Kn,r=this[n(202)][n(251)](t);return e&&this[n(202)][n(239)](t.id),r[n(212)]=this[n(216)]++,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),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;function dr(t,e){const n=pr();return(dr=function(t,e){return n[t-=156]})(t,e)}const lr=dr;function pr(){const t=["stopListening","pluginName","getNearestSelectionRange","getMarkerClass","user:range","listenTo","getContainedElement","span","destroy","editingDowncast","getFirstRange","markerNameToElements","getAttribute","reconvertMarker","detach","clear","plugins","createUserMarkerOperations","size","getCustomProperty","split","$text","render","781300roLBQc","nodeAfter","markerName","set","name","parent","element","type","createElement","enqueueChange","UserMarkers","newRange","mySessionId","Escape","orderNumber","hasContent","requires","update:user:range","mouseenter","marker","init","11108388qwtaJq","document","editing","tableCell","outerHTML","isCollapsed","deletionPosition","selection","false","user:","getPositions","remove","userPositionMarker","isSimilar","isInline","schema","editor","rootName","contenteditable","user:position:","get","$graveyard","afterInit","_createdBatches","118228UoZcwu","oldRange","mouseleave","delete","11dEBZKl","view","fromRange","isLimit","has","ck-user__selection","root","addEventListener","createUIElement","end","removeClass","8Yolhgo","innerHTML","189eSTHVR","markerToHighlight","removeMarker","getRange","change","isOfficialPlugin","setCustomProperty","model","getSelectionClass","ck-user__marker_hovered","toRange","createRange","markerToElement",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"getUserBySessionId","conversion","classList","getStart","change:range","startsWith","addMarker","checkChild","markers","isDocumentOperation","setAttribute","spellcheck","hasDomSelection","1099qJifrD","keydown","textContent","color","5916jeSMMw","toDomElement","batch","_domEmitter","markerRange","isObject","user:position","highest","data-session-id","ck-user__marker ","start","for","ck-user__marker-tooltip","mapper","153811GUNVfS","updateMarker","undo","isPremiumPlugin","add","7206YdaerU","1162737mKyLkk","applyOperation","15eyMqdB","commands","user:range:"];return(pr=function(){return t})()}!function(t){const e=dr,n=t();for(;;)try{if(100983===-parseInt(e(270))/1+-parseInt(e(256))/2*(parseInt(e(225))/3)+-parseInt(e(208))/4*(parseInt(e(278))/5)+-parseInt(e(275))/6*(parseInt(e(252))/7)+parseInt(e(223))/8*(-parseInt(e(276))/9)+-parseInt(e(163))/10*(parseInt(e(212))/11)+parseInt(e(184))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(pr);class hr extends e.Plugin{[lr(259)]=new((0,n.DomEmitterMixin)());static get[lr(179)](){return[Xn]}static get[lr(282)](){return lr(173)}static get[lr(230)](){return!0}static get[lr(273)](){return!0}[lr(183)](){const t=lr,e=this[t(200)],r=e[t(156)][t(204)](Xn);e[t(240)][t(267)](t(290))[t(237)]({model:t(262),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(165)][o(160)](":")[2],a=r[o(239)](i);if(!a||i===r[o(175)])return;if(!s[o(232)][o(199)][o(246)](e[o(260)][o(266)],o(161)))return;const c={class:o(265)+a[o(255)][o(284)](),"data-name":a[o(167)],"data-session-id":i},u=s[o(232)][o(247)][o(204)](e[o(165)])[o(242)](),d=u[o(164)],l=s[o(232)][o(199)];if(d&&l[o(261)](d)&&l[o(198)](d)&&!s[o(232)][o(247)][o(204)](o(280)+i)[o(228)]()[o(189)])return;const p=u[o(168)];return s[o(232)][o(199)][o(215)](p)&&!s[o(232)][o(178)](p)&&(c[o(202)]=!1),function(t,e,n){const r=o,s=t[r(220)](r(288),e);return t[r(231)](r(196),!0,s),s[r(162)]=function(t){const e=r,s=this[e(257)](t),o=document[e(171)](e(288));return o[e(241)][e(274)](e(268)),o[e(249)](e(202),e(192)),o[e(249)](e(250),e(192)),o[e(254)]=n[e(167)],s[e(224)]=e(238)+o[e(188)]+"⁠",s[e(219)](e(181),()=>{const t=e;s[t(241)][t(274)](t(234))}),s[e(219)](e(210),()=>{const t=e;s[t(241)][t(195)](t(234))}),s},s[r(197)]=function(t){const e=r;return!(!this[e(159)](e(196))||!t[e(159)](e(196))||this[e(293)](e(264))!=t[e(293)](e(264)))},s}(n,c,a)}(n,s,r,e)}),e[t(240)][t(267)](t(290))[t(226)]({model:t(285),view:e=>function(e,n){const r=t,s=e[r(165)][r(160)](":")[2];if(s===n[r(175)])return null;const o=n[r(239)](s);return o?{id:s,classes:[r(217),o[r(255)][r(233)]()],attributes:{"data-session-id":s},priority:2e3+o[r(177)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(232)],o=new Map,i=e[n(156)][n(204)](Xn);r[n(247)].on(n(180),(t,a,c,u)=>{const d=n;if(!u&&o[d(204)](a[d(167)]))return o[d(204)](a[d(167)])[d(295)](),void o[d(211)](a[d(167)]);const l=a[d(167)][d(160)](":")[2];if(l===i[d(175)])return;const p=d(203)+l;r[d(247)][d(216)](p)&&e[d(186)][d(294)](p),a.on(d(243),(t,e,n)=>{const i=d;if(i(205)!=e[i(218)][i(201)]&&i(205)==a[i(228)]()[i(218)][i(201)]&&!o[i(216)](a[i(167)])){const t=r[i(199)][i(283)](n[i(190)]);if(t){const e=s.ModelLiveRange[i(214)](t);o[i(166)](a[i(167)],e),e.on(i(243),(t,n,s)=>{const c=i;if(c(205)==e[c(218)][c(201)]){const t=r[c(199)][c(283)](s[c(190)]);t?(e[c(266)]=t[c(266)],e[c(221)]=t[c(221)]):(o[c(211)](a[c(167)]),e[c(295)]())}})}}})}),r[n(185)].on(n(229),()=>{const t=n;o[t(158)]>0&&r[t(172)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(205)==r[n(247)][n(204)](t)[n(228)]()[n(218)][n(201)]&&(fr(t[n(160)](":")[2],s[n(235)](),r,e),s[n(295)]());o[n(296)]()})})}(e),this[t(259)][t(286)](n.global[t(185)],t(253),(n,{key:r})=>{const s=t;s(176)===r&&function(t){const e=s;t[e(186)][e(213)][e(229)](n=>{const r=e;for(const e of t[r(232)][r(247)]){if(!e[r(167)][r(244)](r(262)))continue;const s=t[r(186)][r(269)][r(292)](e[r(167)]);if(s)for(const t of s)n[r(222)](r(234),t)}})}(e)},{useCapture:!0})}[lr(206)](){const t=lr,e=this[t(200)],n=e[t(279)][t(204)](t(272));n&&e[t(232)].on(t(277),(r,s)=>{const o=t,i=s[0];if(!i[o(248)])return;if(o(182)!=i[o(170)]||!i[o(167)][o(244)](o(193)))return;const a=i[o(258)];n[o(207)][o(216)](a)&&(i[o(174)]=i[o(209)]?e[o(232)][o(236)](i[o(209)][o(266)],i[o(209)][o(221)]):null)},{priority:t(263)})}[lr(289)](){const t=lr;return this[t(259)][t(281)](),super[t(289)]()}[lr(157)](){const t=lr,e=this[t(200)],n=e[t(232)][t(185)],r=e[t(156)][t(204)](Xn);e[t(232)][t(172)]({isUndoable:!1},s=>{const o=t,i=o(280)+r[o(175)],a=o(203)+r[o(175)],c=e[o(232)][o(247)][o(216)](i);e[o(186)][o(213)][o(251)]?fr(r[o(175)],n[o(191)][o(291)](),e[o(232)],s):c&&(s[o(227)](i),s[o(227)](a))})}}function fr(t,e,n,r){const s=lr,o=s(280)+t,i=s(203)+t,a=e[s(287)]();let c=e[s(266)];if(a&&a.is(s(169),s(187))){const t=function(t,e){const n=s;for(const r of t[n(194)]())if(e[n(199)][n(246)](r,n(161)))return r}(e,n);t&&(c=t,e=r[s(236)](c))}const u=r[s(236)](c);n[s(247)][s(216)](o)?(r[s(271)](o,{range:e}),r[s(271)](i,{range:u})):(r[s(245)](o,{range:e,usingOperation:!0}),r[s(245)](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-=317]})(t,e)}function yr(){var t=["attributesJson: string expected","splitPosition.","oldName","children: array expected","uint32","splitPosition","2215uqlMpn","affectsData: boolean expected","AttributeOperation","emptyArray","24851BNIVUc","4593830ooCAgd","oldValueBoolean: boolean expected",".InsertOperation.position: object expected","position","object expected","key: string expected","rootName: string expected","nodes: array expected","key","skipType",".MarkerOperation.newRange: object expected","/MarkerOperation",".Element.children: array expected","/RenameOperation","length",".Element.attributesBoolean: object expected","attributesBoolean","bool","decode","/Element","shouldReceiveAttributes","graveyardPosition","Reader","/RootOperation","encode","toJSON","SplitOperation","oldValueJson","insertionPosition","wasUndone: boolean expected",".AttributeOperation.range: object expected","Position","len","rootName",".Range.end: object expected","targetPosition.","rootMain","Range","/RootAttributeOperation","defaults","Writer","elementName: string expected","attributesJson","newRange",".Position.path: array expected","root","oldRange","roots","/Range","sourcePosition.","9xHlEhU","util","isObject",".SplitOperation.graveyardPosition: object expected","14lvufDm","end","newValueJson","newValueBoolean: boolean expected","newName","isInteger","keys","targetPosition","nodes.","/MoveOperation","stickiness","name: string expected","fromObject","MoveOperation","data: string expected","howMany: integer expected",".MergeOperation.targetPosition: object expected","default",".MergeOperation.graveyardPosition: object expected","attributesBoolean: boolean{k:string} expected","arrays","/InsertOperation","1178586uVxZjv","name","start",".MarkerOperation.oldRange: object expected","hasOwnProperty","wasUndone","boolean","1279440QlMENg","oldRange.","range","MergeOperation","newRange.","/Position","RootOperation","children","children.","fork","start.","create",".Element.children: object expected","range.","elementName","emptyObject","rootGraveyard","2210659GzBwqy","RootAttributeOperation","path","isString","InsertOperation","5448588JmEigF","getTypeUrl","oldName: string expected","verify",".Range.start: object expected","sourcePosition","8572XLhfjc","objects","ldelim","newValueJson: string expected","object",".InsertOperation.nodes: object expected","encodeDelimited","position.","stickiness: string expected","Element","call","prototype","toJSONOptions","constructor",".InsertOperation.nodes: array expected","decodeDelimited","7jeVWOI",".MoveOperation.targetPosition: object expected","oldValueJson: string expected","type.googleapis.com",".MergeOperation.sourcePosition: object expected","path: integer[] expected","howMany","newValueBoolean","path: array expected","isAdd: boolean expected","push","rootGraveyard: boolean expected","/AttributeOperation","MarkerOperation",".RenameOperation.position: object expected","end.","newName: string expected","isAdd","oldValueBoolean","pos","insertionPosition.","RenameOperation","graveyardPosition.","shouldReceiveAttributes: boolean expected","affectsData","root: string expected",".MoveOperation.sourcePosition: object expected","rootMain: boolean expected","144mGkMSh","nodes",".SplitOperation.splitPosition: object expected","toObject","/SplitOperation","data","/MergeOperation","string","isArray",".SplitOperation.insertionPosition: object expected","attributesBoolean: object expected"];return(yr=function(){return t})()}!function(t){for(var e=gr,n=t();;)try{if(606675===parseInt(e(416))/1*(-parseInt(e(471))/2)+-parseInt(e(493))/3+-parseInt(e(351))/4*(parseInt(e(412))/5)+-parseInt(e(345))/6*(parseInt(e(367))/7)+parseInt(e(323))/8+parseInt(e(467))/9*(parseInt(e(417))/10)+-parseInt(e(340))/11*(-parseInt(e(395))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yr);const br=(()=>{var t=gr,e=u[t(439)],n=u[t(457)],r=u[t(468)],s=u[t(464)][t(488)]||(u[t(464)][t(488)]={});return s[t(414)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(325)]=null,i[o(362)][o(425)]="",i[o(362)][o(385)]=!1,i[o(362)][o(444)]="",i[o(362)][o(374)]=!1,i[o(362)][o(473)]="",i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(325)]&&Object[r(320)][r(361)](t,r(325))&&s[r(454)][r(441)](t[r(325)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(425)]&&Object[r(320)][r(361)](t,r(425))&&e[r(410)](18)[r(402)](t[r(425)]),null!=t[r(385)]&&Object[r(320)][r(361)](t,r(385))&&e[r(410)](24)[r(434)](t[r(385)]),null!=t[r(444)]&&Object[r(320)][r(361)](t,r(444))&&e[r(410)](34)[r(402)](t[r(444)]),null!=t[r(374)]&&Object[r(320)][r(361)](t,r(374))&&e[r(410)](40)[r(434)](t[r(374)]),null!=t[r(473)]&&Object[r(320)][r(361)](t,r(473))&&e[r(410)](50)[r(402)](t[r(473)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](56)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(414)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(325)]=s[r(454)][r(435)](t,t[r(410)]());break;case 2:a[r(425)]=t[r(402)]();break;case 3:a[r(385)]=t[r(434)]();break;case 4:a[r(444)]=t[r(402)]();break;case 5:a[r(374)]=t[r(434)]();break;case 6:a[r(473)]=t[r(402)]();break;case 7:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;if(e(355)!=typeof t||null===t)return e(421);if(null!=t[e(325)]&&t[e(320)](e(325))){var n=s[e(454)][e(348)](t[e(325)]);if(n)return e(336)+n}return null!=t[e(425)]&&t[e(320)](e(425))&&!r[e(343)](t[e(425)])?e(422):null!=t[e(385)]&&t[e(320)](e(385))&&e(322)!=typeof t[e(385)]?e(418):null!=t[e(444)]&&t[e(320)](e(444))&&!r[e(343)](t[e(444)])?e(369):null!=t[e(374)]&&t[e(320)](e(374))&&e(322)!=typeof t[e(374)]?e(474):null!=t[e(473)]&&t[e(320)](e(473))&&!r[e(343)](t[e(473)])?e(354):null!=t[e(321)]&&t[e(320)](e(321))&&e(322)!=typeof t[e(321)]?e(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(414)])return t;var n=new(s[e(414)]);if(null!=t[e(325)]){if(e(355)!=typeof t[e(325)])throw TypeError(e(447));n[e(325)]=s[e(454)][e(483)](t[e(325)])}return null!=t[e(425)]&&(n[e(425)]=String(t[e(425)])),null!=t[e(385)]&&(n[e(385)]=Boolean(t[e(385)])),null!=t[e(444)]&&(n[e(444)]=String(t[e(444)])),null!=t[e(374)]&&(n[e(374)]=Boolean(t[e(374)])),null!=t[e(473)]&&(n[e(473)]=String(t[e(473)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(325)]=null,r[n(425)]="",r[n(385)]=!1,r[n(444)]="",r[n(374)]=!1,r[n(473)]="",r[n(321)]=!1),null!=t[n(325)]&&t[n(320)](n(325))&&(r[n(325)]=s[n(454)][n(398)](t[n(325)],e)),null!=t[n(425)]&&t[n(320)](n(425))&&(r[n(425)]=t[n(425)]),null!=t[n(385)]&&t[n(320)](n(385))&&(r[n(385)]=t[n(385)]),null!=t[n(444)]&&t[n(320)](n(444))&&(r[n(444)]=t[n(444)]),null!=t[n(374)]&&t[n(320)](n(374))&&(r[n(374)]=t[n(374)]),null!=t[n(473)]&&t[n(320)](n(473))&&(r[n(473)]=t[n(473)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(379)},i}(),s[t(344)]=function(){var o=t;function i(t){var e=gr;if(this[e(396)]=[],t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(420)]=null,i[o(362)][o(396)]=r[o(415)],i[o(362)][o(437)]=!1,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;if(e||(e=n[r(334)]()),null!=t[r(420)]&&Object[r(320)][r(361)](t,r(420))&&s[r(448)][r(441)](t[r(420)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(396)]&&t[r(396)][r(431)])for(var i=0;i<t[r(396)][r(431)];++i)s[r(360)][r(441)](t[r(396)][i],e[r(410)](18)[r(332)]())[r(353)]();return null!=t[r(437)]&&Object[r(320)][r(361)](t,r(437))&&e[r(410)](24)[r(434)](t[r(437)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](32)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(344)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(420)]=s[r(448)][r(435)](t,t[r(410)]());break;case 2:a[r(396)]&&a[r(396)][r(431)]||(a[r(396)]=[]),a[r(396)][r(377)](s[r(360)][r(435)](t,t[r(410)]()));break;case 3:a[r(437)]=t[r(434)]();break;case 4:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;if(e(355)!=typeof t||null===t)return e(421);if(null!=t[e(420)]&&t[e(320)](e(420))&&(r=s[e(448)][e(348)](t[e(420)])))return e(358)+r;if(null!=t[e(396)]&&t[e(320)](e(396))){if(!Array[e(403)](t[e(396)]))return e(424);for(var n=0;n<t[e(396)][e(431)];++n){var r;if(r=s[e(360)][e(348)](t[e(396)][n]))return e(479)+r}}return null!=t[e(437)]&&t[e(320)](e(437))&&e(322)!=typeof t[e(437)]?e(390):null!=t[e(321)]&&t[e(320)](e(321))&&e(322)!=typeof t[e(321)]?e(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(344)])return t;var n=new(s[e(344)]);if(null!=t[e(420)]){if(e(355)!=typeof t[e(420)])throw TypeError(e(419));n[e(420)]=s[e(448)][e(483)](t[e(420)])}if(t[e(396)]){if(!Array[e(403)](t[e(396)]))throw TypeError(e(365));n[e(396)]=[];for(var r=0;r<t[e(396)][e(431)];++r){if(e(355)!=typeof t[e(396)][r])throw TypeError(e(356));n[e(396)][r]=s[e(360)][e(483)](t[e(396)][r])}}return null!=t[e(437)]&&(n[e(437)]=Boolean(t[e(437)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(491)]||e[n(456)])&&(r[n(396)]=[]),e[n(456)]&&(r[n(420)]=null,r[n(437)]=!1,r[n(321)]=!1),null!=t[n(420)]&&t[n(320)](n(420))&&(r[n(420)]=s[n(448)][n(398)](t[n(420)],e)),t[n(396)]&&t[n(396)][n(431)]){r[n(396)]=[];for(var i=0;i<t[n(396)][n(431)];++i)r[n(396)][i]=s[n(360)][n(398)](t[n(396)][i],e)}return null!=t[n(437)]&&t[n(320)](n(437))&&(r[n(437)]=t[n(437)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(492)},i}(),s[t(380)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(317)]="",i[o(362)][o(463)]=null,i[o(362)][o(460)]=null,i[o(362)][o(391)]=!1,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(317)]&&Object[r(320)][r(361)](t,r(317))&&e[r(410)](10)[r(402)](t[r(317)]),null!=t[r(463)]&&Object[r(320)][r(361)](t,r(463))&&s[r(454)][r(441)](t[r(463)],e[r(410)](18)[r(332)]())[r(353)](),null!=t[r(460)]&&Object[r(320)][r(361)](t,r(460))&&s[r(454)][r(441)](t[r(460)],e[r(410)](26)[r(332)]())[r(353)](),null!=t[r(391)]&&Object[r(320)][r(361)](t,r(391))&&e[r(410)](32)[r(434)](t[r(391)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](40)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(380)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(317)]=t[r(402)]();break;case 2:a[r(463)]=s[r(454)][r(435)](t,t[r(410)]());break;case 3:a[r(460)]=s[r(454)][r(435)](t,t[r(410)]());break;case 4:a[r(391)]=t[r(434)]();break;case 5:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e,n=o;return n(355)!=typeof t||null===t?n(421):null!=t[n(317)]&&t[n(320)](n(317))&&!r[n(343)](t[n(317)])?n(482):null!=t[n(463)]&&t[n(320)](n(463))&&(e=s[n(454)][n(348)](t[n(463)]))?n(324)+e:null!=t[n(460)]&&t[n(320)](n(460))&&(e=s[n(454)][n(348)](t[n(460)]))?n(327)+e:null!=t[n(391)]&&t[n(320)](n(391))&&n(322)!=typeof t[n(391)]?n(413):null!=t[n(321)]&&t[n(320)](n(321))&&n(322)!=typeof t[n(321)]?n(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(380)])return t;var n=new(s[e(380)]);if(null!=t[e(317)]&&(n[e(317)]=String(t[e(317)])),null!=t[e(463)]){if(e(355)!=typeof t[e(463)])throw TypeError(e(319));n[e(463)]=s[e(454)][e(483)](t[e(463)])}if(null!=t[e(460)]){if(e(355)!=typeof t[e(460)])throw TypeError(e(427));n[e(460)]=s[e(454)][e(483)](t[e(460)])}return null!=t[e(391)]&&(n[e(391)]=Boolean(t[e(391)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(317)]="",r[n(463)]=null,r[n(460)]=null,r[n(391)]=!1,r[n(321)]=!1),null!=t[n(317)]&&t[n(320)](n(317))&&(r[n(317)]=t[n(317)]),null!=t[n(463)]&&t[n(320)](n(463))&&(r[n(463)]=s[n(454)][n(398)](t[n(463)],e)),null!=t[n(460)]&&t[n(320)](n(460))&&(r[n(460)]=s[n(454)][n(398)](t[n(460)],e)),null!=t[n(391)]&&t[n(320)](n(391))&&(r[n(391)]=t[n(391)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(428)},i}(),s[t(326)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(350)]=null,i[o(362)][o(478)]=null,i[o(362)][o(438)]=null,i[o(362)][o(373)]=0,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(350)]&&Object[r(320)][r(361)](t,r(350))&&s[r(448)][r(441)](t[r(350)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(478)]&&Object[r(320)][r(361)](t,r(478))&&s[r(448)][r(441)](t[r(478)],e[r(410)](18)[r(332)]())[r(353)](),null!=t[r(438)]&&Object[r(320)][r(361)](t,r(438))&&s[r(448)][r(441)](t[r(438)],e[r(410)](26)[r(332)]())[r(353)](),null!=t[r(373)]&&Object[r(320)][r(361)](t,r(373))&&e[r(410)](32)[r(410)](t[r(373)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](40)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(326)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(350)]=s[r(448)][r(435)](t,t[r(410)]());break;case 2:a[r(478)]=s[r(448)][r(435)](t,t[r(410)]());break;case 3:a[r(438)]=s[r(448)][r(435)](t,t[r(410)]());break;case 4:a[r(373)]=t[r(410)]();break;case 5:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e,n=o;return n(355)!=typeof t||null===t?n(421):null!=t[n(350)]&&t[n(320)](n(350))&&(e=s[n(448)][n(348)](t[n(350)]))?n(466)+e:null!=t[n(478)]&&t[n(320)](n(478))&&(e=s[n(448)][n(348)](t[n(478)]))?n(452)+e:null!=t[n(438)]&&t[n(320)](n(438))&&(e=s[n(448)][n(348)](t[n(438)]))?n(389)+e:null!=t[n(373)]&&t[n(320)](n(373))&&!r[n(476)](t[n(373)])?n(486):null!=t[n(321)]&&t[n(320)](n(321))&&n(322)!=typeof t[n(321)]?n(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(326)])return t;var n=new(s[e(326)]);if(null!=t[e(350)]){if(e(355)!=typeof t[e(350)])throw TypeError(e(371));n[e(350)]=s[e(448)][e(483)](t[e(350)])}if(null!=t[e(478)]){if(e(355)!=typeof t[e(478)])throw TypeError(e(487));n[e(478)]=s[e(448)][e(483)](t[e(478)])}if(null!=t[e(438)]){if(e(355)!=typeof t[e(438)])throw TypeError(e(489));n[e(438)]=s[e(448)][e(483)](t[e(438)])}return null!=t[e(373)]&&(n[e(373)]=t[e(373)]>>>0),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(350)]=null,r[n(478)]=null,r[n(438)]=null,r[n(373)]=0,r[n(321)]=!1),null!=t[n(350)]&&t[n(320)](n(350))&&(r[n(350)]=s[n(448)][n(398)](t[n(350)],e)),null!=t[n(478)]&&t[n(320)](n(478))&&(r[n(478)]=s[n(448)][n(398)](t[n(478)],e)),null!=t[n(438)]&&t[n(320)](n(438))&&(r[n(438)]=s[n(448)][n(398)](t[n(438)],e)),null!=t[n(373)]&&t[n(320)](n(373))&&(r[n(373)]=t[n(373)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(401)},i}(),s[t(484)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(350)]=null,i[o(362)][o(373)]=0,i[o(362)][o(478)]=null,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(350)]&&Object[r(320)][r(361)](t,r(350))&&s[r(448)][r(441)](t[r(350)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(373)]&&Object[r(320)][r(361)](t,r(373))&&e[r(410)](16)[r(410)](t[r(373)]),null!=t[r(478)]&&Object[r(320)][r(361)](t,r(478))&&s[r(448)][r(441)](t[r(478)],e[r(410)](26)[r(332)]())[r(353)](),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](32)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(484)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(350)]=s[r(448)][r(435)](t,t[r(410)]());break;case 2:a[r(373)]=t[r(410)]();break;case 3:a[r(478)]=s[r(448)][r(435)](t,t[r(410)]());break;case 4:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e,n=o;return n(355)!=typeof t||null===t?n(421):null!=t[n(350)]&&t[n(320)](n(350))&&(e=s[n(448)][n(348)](t[n(350)]))?n(466)+e:null!=t[n(373)]&&t[n(320)](n(373))&&!r[n(476)](t[n(373)])?n(486):null!=t[n(478)]&&t[n(320)](n(478))&&(e=s[n(448)][n(348)](t[n(478)]))?n(452)+e:null!=t[n(321)]&&t[n(320)](n(321))&&n(322)!=typeof t[n(321)]?n(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(484)])return t;var n=new(s[e(484)]);if(null!=t[e(350)]){if(e(355)!=typeof t[e(350)])throw TypeError(e(393));n[e(350)]=s[e(448)][e(483)](t[e(350)])}if(null!=t[e(373)]&&(n[e(373)]=t[e(373)]>>>0),null!=t[e(478)]){if(e(355)!=typeof t[e(478)])throw TypeError(e(368));n[e(478)]=s[e(448)][e(483)](t[e(478)])}return null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(350)]=null,r[n(373)]=0,r[n(478)]=null,r[n(321)]=!1),null!=t[n(350)]&&t[n(320)](n(350))&&(r[n(350)]=s[n(448)][n(398)](t[n(350)],e)),null!=t[n(373)]&&t[n(320)](n(373))&&(r[n(373)]=t[n(373)]),null!=t[n(478)]&&t[n(320)](n(478))&&(r[n(478)]=s[n(448)][n(398)](t[n(478)],e)),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(480)},i}(),s[t(388)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(420)]=null,i[o(362)][o(408)]="",i[o(362)][o(475)]="",i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(420)]&&Object[r(320)][r(361)](t,r(420))&&s[r(448)][r(441)](t[r(420)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(408)]&&Object[r(320)][r(361)](t,r(408))&&e[r(410)](18)[r(402)](t[r(408)]),null!=t[r(475)]&&Object[r(320)][r(361)](t,r(475))&&e[r(410)](26)[r(402)](t[r(475)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](32)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(388)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(420)]=s[r(448)][r(435)](t,t[r(410)]());break;case 2:a[r(408)]=t[r(402)]();break;case 3:a[r(475)]=t[r(402)]();break;case 4:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;if(e(355)!=typeof t||null===t)return e(421);if(null!=t[e(420)]&&t[e(320)](e(420))){var n=s[e(448)][e(348)](t[e(420)]);if(n)return e(358)+n}return null!=t[e(408)]&&t[e(320)](e(408))&&!r[e(343)](t[e(408)])?e(347):null!=t[e(475)]&&t[e(320)](e(475))&&!r[e(343)](t[e(475)])?e(383):null!=t[e(321)]&&t[e(320)](e(321))&&e(322)!=typeof t[e(321)]?e(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(388)])return t;var n=new(s[e(388)]);if(null!=t[e(420)]){if(e(355)!=typeof t[e(420)])throw TypeError(e(381));n[e(420)]=s[e(448)][e(483)](t[e(420)])}return null!=t[e(408)]&&(n[e(408)]=String(t[e(408)])),null!=t[e(475)]&&(n[e(475)]=String(t[e(475)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(420)]=null,r[n(408)]="",r[n(475)]="",r[n(321)]=!1),null!=t[n(420)]&&t[n(320)](n(420))&&(r[n(420)]=s[n(448)][n(398)](t[n(420)],e)),null!=t[n(408)]&&t[n(320)](n(408))&&(r[n(408)]=t[n(408)]),null!=t[n(475)]&&t[n(320)](n(475))&&(r[n(475)]=t[n(475)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(430)},i}(),s[t(341)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(462)]="",i[o(362)][o(425)]="",i[o(362)][o(385)]=!1,i[o(362)][o(444)]="",i[o(362)][o(374)]=!1,i[o(362)][o(473)]="",i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(462)]&&Object[r(320)][r(361)](t,r(462))&&e[r(410)](10)[r(402)](t[r(462)]),null!=t[r(425)]&&Object[r(320)][r(361)](t,r(425))&&e[r(410)](18)[r(402)](t[r(425)]),null!=t[r(385)]&&Object[r(320)][r(361)](t,r(385))&&e[r(410)](24)[r(434)](t[r(385)]),null!=t[r(444)]&&Object[r(320)][r(361)](t,r(444))&&e[r(410)](34)[r(402)](t[r(444)]),null!=t[r(374)]&&Object[r(320)][r(361)](t,r(374))&&e[r(410)](40)[r(434)](t[r(374)]),null!=t[r(473)]&&Object[r(320)][r(361)](t,r(473))&&e[r(410)](50)[r(402)](t[r(473)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](56)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(341)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(462)]=t[r(402)]();break;case 2:a[r(425)]=t[r(402)]();break;case 3:a[r(385)]=t[r(434)]();break;case 4:a[r(444)]=t[r(402)]();break;case 5:a[r(374)]=t[r(434)]();break;case 6:a[r(473)]=t[r(402)]();break;case 7:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;return e(355)!=typeof t||null===t?e(421):null!=t[e(462)]&&t[e(320)](e(462))&&!r[e(343)](t[e(462)])?e(392):null!=t[e(425)]&&t[e(320)](e(425))&&!r[e(343)](t[e(425)])?e(422):null!=t[e(385)]&&t[e(320)](e(385))&&e(322)!=typeof t[e(385)]?e(418):null!=t[e(444)]&&t[e(320)](e(444))&&!r[e(343)](t[e(444)])?e(369):null!=t[e(374)]&&t[e(320)](e(374))&&e(322)!=typeof t[e(374)]?e(474):null!=t[e(473)]&&t[e(320)](e(473))&&!r[e(343)](t[e(473)])?e(354):null!=t[e(321)]&&t[e(320)](e(321))&&e(322)!=typeof t[e(321)]?e(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(341)])return t;var n=new(s[e(341)]);return null!=t[e(462)]&&(n[e(462)]=String(t[e(462)])),null!=t[e(425)]&&(n[e(425)]=String(t[e(425)])),null!=t[e(385)]&&(n[e(385)]=Boolean(t[e(385)])),null!=t[e(444)]&&(n[e(444)]=String(t[e(444)])),null!=t[e(374)]&&(n[e(374)]=Boolean(t[e(374)])),null!=t[e(473)]&&(n[e(473)]=String(t[e(473)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(462)]="",r[n(425)]="",r[n(385)]=!1,r[n(444)]="",r[n(374)]=!1,r[n(473)]="",r[n(321)]=!1),null!=t[n(462)]&&t[n(320)](n(462))&&(r[n(462)]=t[n(462)]),null!=t[n(425)]&&t[n(320)](n(425))&&(r[n(425)]=t[n(425)]),null!=t[n(385)]&&t[n(320)](n(385))&&(r[n(385)]=t[n(385)]),null!=t[n(444)]&&t[n(320)](n(444))&&(r[n(444)]=t[n(444)]),null!=t[n(374)]&&t[n(320)](n(374))&&(r[n(374)]=t[n(374)]),null!=t[n(473)]&&t[n(320)](n(473))&&(r[n(473)]=t[n(473)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(455)},i}(),s[t(329)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(450)]="",i[o(362)][o(337)]="",i[o(362)][o(384)]=!1,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(450)]&&Object[r(320)][r(361)](t,r(450))&&e[r(410)](10)[r(402)](t[r(450)]),null!=t[r(337)]&&Object[r(320)][r(361)](t,r(337))&&e[r(410)](18)[r(402)](t[r(337)]),null!=t[r(384)]&&Object[r(320)][r(361)](t,r(384))&&e[r(410)](24)[r(434)](t[r(384)]),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](32)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(329)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(450)]=t[r(402)]();break;case 2:a[r(337)]=t[r(402)]();break;case 3:a[r(384)]=t[r(434)]();break;case 4:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;return e(355)!=typeof t||null===t?e(421):null!=t[e(450)]&&t[e(320)](e(450))&&!r[e(343)](t[e(450)])?e(423):null!=t[e(337)]&&t[e(320)](e(337))&&!r[e(343)](t[e(337)])?e(458):null!=t[e(384)]&&t[e(320)](e(384))&&e(322)!=typeof t[e(384)]?e(376):null!=t[e(321)]&&t[e(320)](e(321))&&e(322)!=typeof t[e(321)]?e(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(329)])return t;var n=new(s[e(329)]);return null!=t[e(450)]&&(n[e(450)]=String(t[e(450)])),null!=t[e(337)]&&(n[e(337)]=String(t[e(337)])),null!=t[e(384)]&&(n[e(384)]=Boolean(t[e(384)])),null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(450)]="",r[n(337)]="",r[n(384)]=!1,r[n(321)]=!1),null!=t[n(450)]&&t[n(320)](n(450))&&(r[n(450)]=t[n(450)]),null!=t[n(337)]&&t[n(320)](n(337))&&(r[n(337)]=t[n(337)]),null!=t[n(384)]&&t[n(320)](n(384))&&(r[n(384)]=t[n(384)]),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(440)},i}(),s[t(443)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(411)]=null,i[o(362)][o(438)]=null,i[o(362)][o(373)]=0,i[o(362)][o(445)]=null,i[o(362)][o(321)]=!1,i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;return e||(e=n[r(334)]()),null!=t[r(411)]&&Object[r(320)][r(361)](t,r(411))&&s[r(448)][r(441)](t[r(411)],e[r(410)](10)[r(332)]())[r(353)](),null!=t[r(438)]&&Object[r(320)][r(361)](t,r(438))&&s[r(448)][r(441)](t[r(438)],e[r(410)](18)[r(332)]())[r(353)](),null!=t[r(373)]&&Object[r(320)][r(361)](t,r(373))&&e[r(410)](24)[r(410)](t[r(373)]),null!=t[r(445)]&&Object[r(320)][r(361)](t,r(445))&&s[r(448)][r(441)](t[r(445)],e[r(410)](34)[r(332)]())[r(353)](),null!=t[r(321)]&&Object[r(320)][r(361)](t,r(321))&&e[r(410)](40)[r(434)](t[r(321)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(443)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(411)]=s[r(448)][r(435)](t,t[r(410)]());break;case 2:a[r(438)]=s[r(448)][r(435)](t,t[r(410)]());break;case 3:a[r(373)]=t[r(410)]();break;case 4:a[r(445)]=s[r(448)][r(435)](t,t[r(410)]());break;case 5:a[r(321)]=t[r(434)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e,n=o;return n(355)!=typeof t||null===t?n(421):null!=t[n(411)]&&t[n(320)](n(411))&&(e=s[n(448)][n(348)](t[n(411)]))?n(407)+e:null!=t[n(438)]&&t[n(320)](n(438))&&(e=s[n(448)][n(348)](t[n(438)]))?n(389)+e:null!=t[n(373)]&&t[n(320)](n(373))&&!r[n(476)](t[n(373)])?n(486):null!=t[n(445)]&&t[n(320)](n(445))&&(e=s[n(448)][n(348)](t[n(445)]))?n(387)+e:null!=t[n(321)]&&t[n(320)](n(321))&&n(322)!=typeof t[n(321)]?n(446):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(443)])return t;var n=new(s[e(443)]);if(null!=t[e(411)]){if(e(355)!=typeof t[e(411)])throw TypeError(e(397));n[e(411)]=s[e(448)][e(483)](t[e(411)])}if(null!=t[e(438)]){if(e(355)!=typeof t[e(438)])throw TypeError(e(470));n[e(438)]=s[e(448)][e(483)](t[e(438)])}if(null!=t[e(373)]&&(n[e(373)]=t[e(373)]>>>0),null!=t[e(445)]){if(e(355)!=typeof t[e(445)])throw TypeError(e(404));n[e(445)]=s[e(448)][e(483)](t[e(445)])}return null!=t[e(321)]&&(n[e(321)]=Boolean(t[e(321)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};return e[n(456)]&&(r[n(411)]=null,r[n(438)]=null,r[n(373)]=0,r[n(445)]=null,r[n(321)]=!1),null!=t[n(411)]&&t[n(320)](n(411))&&(r[n(411)]=s[n(448)][n(398)](t[n(411)],e)),null!=t[n(438)]&&t[n(320)](n(438))&&(r[n(438)]=s[n(448)][n(398)](t[n(438)],e)),null!=t[n(373)]&&t[n(320)](n(373))&&(r[n(373)]=t[n(373)]),null!=t[n(445)]&&t[n(320)](n(445))&&(r[n(445)]=s[n(448)][n(398)](t[n(445)],e)),null!=t[n(321)]&&t[n(320)](n(321))&&(r[n(321)]=t[n(321)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(399)},i}(),s[t(448)]=function(){var o=t;function i(t){var e=gr;if(this[e(342)]=[],t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(462)]="",i[o(362)][o(453)]=!1,i[o(362)][o(339)]=!1,i[o(362)][o(342)]=r[o(415)],i[o(362)][o(481)]="",i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;if(e||(e=n[r(334)]()),null!=t[r(462)]&&Object[r(320)][r(361)](t,r(462))&&e[r(410)](10)[r(402)](t[r(462)]),null!=t[r(453)]&&Object[r(320)][r(361)](t,r(453))&&e[r(410)](16)[r(434)](t[r(453)]),null!=t[r(339)]&&Object[r(320)][r(361)](t,r(339))&&e[r(410)](24)[r(434)](t[r(339)]),null!=t[r(342)]&&t[r(342)][r(431)]){e[r(410)](34)[r(332)]();for(var s=0;s<t[r(342)][r(431)];++s)e[r(410)](t[r(342)][s]);e[r(353)]()}return null!=t[r(481)]&&Object[r(320)][r(361)](t,r(481))&&e[r(410)](42)[r(402)](t[r(481)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var r=o;t instanceof e||(t=e[r(334)](t));for(var i=void 0===n?t[r(449)]:t[r(386)]+n,a=new(s[r(448)]);t[r(386)]<i;){var c=t[r(410)]();switch(c>>>3){case 1:a[r(462)]=t[r(402)]();break;case 2:a[r(453)]=t[r(434)]();break;case 3:a[r(339)]=t[r(434)]();break;case 4:if(a[r(342)]&&a[r(342)][r(431)]||(a[r(342)]=[]),2==(7&c))for(var u=t[r(410)]()+t[r(386)];t[r(386)]<u;)a[r(342)][r(377)](t[r(410)]());else a[r(342)][r(377)](t[r(410)]());break;case 5:a[r(481)]=t[r(402)]();break;default:t[r(426)](7&c)}}return a},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;if(e(355)!=typeof t||null===t)return e(421);if(null!=t[e(462)]&&t[e(320)](e(462))&&!r[e(343)](t[e(462)]))return e(392);if(null!=t[e(453)]&&t[e(320)](e(453))&&e(322)!=typeof t[e(453)])return e(394);if(null!=t[e(339)]&&t[e(320)](e(339))&&e(322)!=typeof t[e(339)])return e(378);if(null!=t[e(342)]&&t[e(320)](e(342))){if(!Array[e(403)](t[e(342)]))return e(375);for(var n=0;n<t[e(342)][e(431)];++n)if(!r[e(476)](t[e(342)][n]))return e(372)}return null!=t[e(481)]&&t[e(320)](e(481))&&!r[e(343)](t[e(481)])?e(359):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(448)])return t;var n=new(s[e(448)]);if(null!=t[e(462)]&&(n[e(462)]=String(t[e(462)])),null!=t[e(453)]&&(n[e(453)]=Boolean(t[e(453)])),null!=t[e(339)]&&(n[e(339)]=Boolean(t[e(339)])),t[e(342)]){if(!Array[e(403)](t[e(342)]))throw TypeError(e(461));n[e(342)]=[];for(var r=0;r<t[e(342)][e(431)];++r)n[e(342)][r]=t[e(342)][r]>>>0}return null!=t[e(481)]&&(n[e(481)]=String(t[e(481)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(491)]||e[n(456)])&&(r[n(342)]=[]),e[n(456)]&&(r[n(462)]="",r[n(453)]=!1,r[n(339)]=!1,r[n(481)]=""),null!=t[n(462)]&&t[n(320)](n(462))&&(r[n(462)]=t[n(462)]),null!=t[n(453)]&&t[n(320)](n(453))&&(r[n(453)]=t[n(453)]),null!=t[n(339)]&&t[n(320)](n(339))&&(r[n(339)]=t[n(339)]),t[n(342)]&&t[n(342)][n(431)]){r[n(342)]=[];for(var s=0;s<t[n(342)][n(431)];++s)r[n(342)][s]=t[n(342)][s]}return null!=t[n(481)]&&t[n(320)](n(481))&&(r[n(481)]=t[n(481)]),r},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(328)},i}(),s[t(454)]=function(){var r=t;function o(t){var e=gr;if(t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(362)][r(318)]=null,o[r(362)][r(472)]=null,o[r(334)]=function(t){return new o(t)},o[r(441)]=function(t,e){var o=r;return e||(e=n[o(334)]()),null!=t[o(318)]&&Object[o(320)][o(361)](t,o(318))&&s[o(448)][o(441)](t[o(318)],e[o(410)](10)[o(332)]())[o(353)](),null!=t[o(472)]&&Object[o(320)][o(361)](t,o(472))&&s[o(448)][o(441)](t[o(472)],e[o(410)](18)[o(332)]())[o(353)](),e},o[r(357)]=function(t,e){var n=r;return this[n(441)](t,e)[n(353)]()},o[r(435)]=function(t,n){var o=r;t instanceof e||(t=e[o(334)](t));for(var i=void 0===n?t[o(449)]:t[o(386)]+n,a=new(s[o(454)]);t[o(386)]<i;){var c=t[o(410)]();switch(c>>>3){case 1:a[o(318)]=s[o(448)][o(435)](t,t[o(410)]());break;case 2:a[o(472)]=s[o(448)][o(435)](t,t[o(410)]());break;default:t[o(426)](7&c)}}return a},o[r(366)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},o[r(348)]=function(t){var e,n=r;return n(355)!=typeof t||null===t?n(421):null!=t[n(318)]&&t[n(320)](n(318))&&(e=s[n(448)][n(348)](t[n(318)]))?n(333)+e:null!=t[n(472)]&&t[n(320)](n(472))&&(e=s[n(448)][n(348)](t[n(472)]))?n(382)+e:null},o[r(483)]=function(t){var e=r;if(t instanceof s[e(454)])return t;var n=new(s[e(454)]);if(null!=t[e(318)]){if(e(355)!=typeof t[e(318)])throw TypeError(e(349));n[e(318)]=s[e(448)][e(483)](t[e(318)])}if(null!=t[e(472)]){if(e(355)!=typeof t[e(472)])throw TypeError(e(451));n[e(472)]=s[e(448)][e(483)](t[e(472)])}return n},o[r(398)]=function(t,e){var n=r;e||(e={});var o={};return e[n(456)]&&(o[n(318)]=null,o[n(472)]=null),null!=t[n(318)]&&t[n(320)](n(318))&&(o[n(318)]=s[n(448)][n(398)](t[n(318)],e)),null!=t[n(472)]&&t[n(320)](n(472))&&(o[n(472)]=s[n(448)][n(398)](t[n(472)],e)),o},o[r(362)][r(442)]=function(){var t=r;return this[t(364)][t(398)](this,u[t(468)][t(363)])},o[r(346)]=function(t){var e=r;return void 0===t&&(t=e(370)),t+e(465)},o}(),s[t(360)]=function(){var o=t;function i(t){var e=gr;if(this[e(330)]=[],this[e(433)]={},t)for(var n=Object[e(477)](t),r=0;r<n[e(431)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(362)][o(317)]="",i[o(362)][o(330)]=r[o(415)],i[o(362)][o(400)]="",i[o(362)][o(433)]=r[o(338)],i[o(362)][o(459)]="",i[o(334)]=function(t){return new i(t)},i[o(441)]=function(t,e){var r=o;if(e||(e=n[r(334)]()),null!=t[r(317)]&&Object[r(320)][r(361)](t,r(317))&&e[r(410)](10)[r(402)](t[r(317)]),null!=t[r(330)]&&t[r(330)][r(431)])for(var i=0;i<t[r(330)][r(431)];++i)s[r(360)][r(441)](t[r(330)][i],e[r(410)](18)[r(332)]())[r(353)]();if(null!=t[r(400)]&&Object[r(320)][r(361)](t,r(400))&&e[r(410)](26)[r(402)](t[r(400)]),null!=t[r(433)]&&Object[r(320)][r(361)](t,r(433))){var a=Object[r(477)](t[r(433)]);for(i=0;i<a[r(431)];++i)e[r(410)](34)[r(332)]()[r(410)](10)[r(402)](a[i])[r(410)](16)[r(434)](t[r(433)][a[i]])[r(353)]()}return null!=t[r(459)]&&Object[r(320)][r(361)](t,r(459))&&e[r(410)](42)[r(402)](t[r(459)]),e},i[o(357)]=function(t,e){var n=o;return this[n(441)](t,e)[n(353)]()},i[o(435)]=function(t,n){var i=o;t instanceof e||(t=e[i(334)](t));for(var a,c,u=void 0===n?t[i(449)]:t[i(386)]+n,d=new(s[i(360)]);t[i(386)]<u;){var l=t[i(410)]();switch(l>>>3){case 1:d[i(317)]=t[i(402)]();break;case 2:d[i(330)]&&d[i(330)][i(431)]||(d[i(330)]=[]),d[i(330)][i(377)](s[i(360)][i(435)](t,t[i(410)]()));break;case 3:d[i(400)]=t[i(402)]();break;case 4:d[i(433)]===r[i(338)]&&(d[i(433)]={});var p=t[i(410)]()+t[i(386)];for(a="",c=!1;t[i(386)]<p;){var h=t[i(410)]();switch(h>>>3){case 1:a=t[i(402)]();break;case 2:c=t[i(434)]();break;default:t[i(426)](7&h)}}d[i(433)][a]=c;break;case 5:d[i(459)]=t[i(402)]();break;default:t[i(426)](7&l)}}return d},i[o(366)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(435)](t,t[n(410)]())},i[o(348)]=function(t){var e=o;if(e(355)!=typeof t||null===t)return e(421);if(null!=t[e(317)]&&t[e(320)](e(317))&&!r[e(343)](t[e(317)]))return e(482);if(null!=t[e(330)]&&t[e(320)](e(330))){if(!Array[e(403)](t[e(330)]))return e(409);for(var n=0;n<t[e(330)][e(431)];++n){var i=s[e(360)][e(348)](t[e(330)][n]);if(i)return e(331)+i}}if(null!=t[e(400)]&&t[e(320)](e(400))&&!r[e(343)](t[e(400)]))return e(485);if(null!=t[e(433)]&&t[e(320)](e(433))){if(!r[e(469)](t[e(433)]))return e(405);var a=Object[e(477)](t[e(433)]);for(n=0;n<a[e(431)];++n)if(e(322)!=typeof t[e(433)][a[n]])return e(490)}return null!=t[e(459)]&&t[e(320)](e(459))&&!r[e(343)](t[e(459)])?e(406):null},i[o(483)]=function(t){var e=o;if(t instanceof s[e(360)])return t;var n=new(s[e(360)]);if(null!=t[e(317)]&&(n[e(317)]=String(t[e(317)])),t[e(330)]){if(!Array[e(403)](t[e(330)]))throw TypeError(e(429));n[e(330)]=[];for(var r=0;r<t[e(330)][e(431)];++r){if(e(355)!=typeof t[e(330)][r])throw TypeError(e(335));n[e(330)][r]=s[e(360)][e(483)](t[e(330)][r])}}if(null!=t[e(400)]&&(n[e(400)]=String(t[e(400)])),t[e(433)]){if(e(355)!=typeof t[e(433)])throw TypeError(e(432));n[e(433)]={};var i=Object[e(477)](t[e(433)]);for(r=0;r<i[e(431)];++r)n[e(433)][i[r]]=Boolean(t[e(433)][i[r]])}return null!=t[e(459)]&&(n[e(459)]=String(t[e(459)])),n},i[o(398)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(491)]||e[n(456)])&&(i[n(330)]=[]),(e[n(352)]||e[n(456)])&&(i[n(433)]={}),e[n(456)]&&(i[n(317)]="",i[n(400)]="",i[n(459)]=""),null!=t[n(317)]&&t[n(320)](n(317))&&(i[n(317)]=t[n(317)]),t[n(330)]&&t[n(330)][n(431)]){i[n(330)]=[];for(var a=0;a<t[n(330)][n(431)];++a)i[n(330)][a]=s[n(360)][n(398)](t[n(330)][a],e)}if(null!=t[n(400)]&&t[n(320)](n(400))&&(i[n(400)]=t[n(400)]),t[n(433)]&&(r=Object[n(477)](t[n(433)]))[n(431)])for(i[n(433)]={},a=0;a<r[n(431)];++a)i[n(433)][r[a]]=t[n(433)][r[a]];return null!=t[n(459)]&&t[n(320)](n(459))&&(i[n(459)]=t[n(459)]),i},i[o(362)][o(442)]=function(){var t=o;return this[t(364)][t(398)](this,u[t(468)][t(363)])},i[o(346)]=function(t){var e=o;return void 0===t&&(t=e(370)),t+e(436)},i}(),s})(),Ir=Or;function Or(t,e){const n=Sr();return(Or=function(t,e){return n[t-=312]})(t,e)}!function(t){const e=Or,n=t();for(;;)try{if(111469===-parseInt(e(333))/1*(-parseInt(e(315))/2)+-parseInt(e(317))/3*(parseInt(e(330))/4)+parseInt(e(323))/5+parseInt(e(329))/6+parseInt(e(332))/7*(parseInt(e(325))/8)+-parseInt(e(324))/9+parseInt(e(312))/10*(-parseInt(e(326))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Sr);class vr{[Ir(327)];constructor(){this[Ir(327)]=br}[Ir(319)](t){return new wr(this[Ir(327)][t])}}class wr{[Ir(316)];constructor(t){this[Ir(316)]=t}[Ir(313)](t){const e=Ir,n=this[e(316)][e(320)](t);if(n)throw Error(n);return this[e(316)][e(328)](this[e(316)][e(322)](t))[e(321)]()}[Ir(314)](t){const e=Ir;return this[e(316)][e(318)](this[e(316)][e(331)](t),{oneofs:!0})}}function Sr(){const t=["_protobuf","669QSYAIE","toObject","getDescriptor","verify","finish","create","149885JBWiqC","429003bgnmHB","40296jkJImj","92081cCagUY","_protobufRoot","encode","1168926GshAOx","536TkGTzM","decode","21zQJlSG","312gqJkzW","170jwTeWr","compress","decompress","586ksGxlQ"];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]",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 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 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(t,e){const n=is,r=Xr(t);return r[n(442)][r[n(442)][n(444)]-1]+=e,r}function os(){const t=["14LxRyCs","rootGraveyard","66930FkjvlV","176785ArrHBB","main","rootMain","38417ZSYDJo","32YCzXQE","root","nodes","208851XmmAuv","$graveyard","path","312813wCncvl","length","2238078etqSlL","4633790yQCkdH","28hvluzV"];return(os=function(){return t})()}function is(t,e){const n=os();return(is=function(t,e){return n[t-=442]})(t,e)}function as(t,e){const n=is;return t[n(456)]===e[n(456)]&&ns(t[n(442)],e[n(442)])}function cs(t){const e=is;ds(t,t=>(e(452)==t[e(456)]?(t[e(453)]=!0,delete t[e(456)]):e(459)==t[e(456)]&&(t[e(449)]=!0,delete t[e(456)]),t))}function us(t){const e=is;ds(t,t=>(t[e(453)]?(t[e(456)]=e(452),delete t[e(453)]):t[e(449)]&&(t[e(456)]=e(459),delete t[e(449)]),t))}function ds(t,e){const n=is;for(const r in t){const s=t[r];n(457)!==r&&rs(s)&&(s[n(442)]&&(s[n(456)]||s[n(453)]||s[n(449)])?t[r]=e(s):ds(s,e))}return t}!function(t){const e=is,n=t();for(;;)try{if(257823===parseInt(e(454))/1*(-parseInt(e(448))/2)+parseInt(e(458))/3*(-parseInt(e(447))/4)+parseInt(e(450))/5+parseInt(e(445))/6+parseInt(e(451))/7+parseInt(e(455))/8*(parseInt(e(443))/9)+parseInt(e(446))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(os);const ls=hs;function ps(){const t=["1595151qkLuud","7HZxeDN","787980utbOVy","_id","349637exHJlB","35736EmLlpy","compress","shift","buffers","__className","2XAnwDo","decompress","1630986ZctiMp","push","_operationName","195ZXCAmK","types","17065390YCxGpe","_protobufDescriptor","4752632gZeHxf"];return(ps=function(){return t})()}function hs(t,e){const n=ps();return(hs=function(t,e){return n[t-=289]})(t,e)}!function(t){const e=hs,n=t();for(;;)try{if(361111===parseInt(e(301))/1*(-parseInt(e(307))/2)+-parseInt(e(289))/3+parseInt(e(299))/4+-parseInt(e(292))/5*(parseInt(e(302))/6)+-parseInt(e(298))/7*(parseInt(e(296))/8)+parseInt(e(297))/9+parseInt(e(294))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ps);class fs{[ls(300)];[ls(291)];[ls(295)];constructor(t,e,n){const r=ls;this[r(300)]=t,this[r(291)]=e,this[r(295)]=n}[ls(303)](t,e){const n=ls,r=e[n(304)]();return cs(r),t[n(305)][n(290)](this[n(295)][n(303)](r)),t[n(293)][n(290)](this[n(300)]),!0}[ls(308)](t,e){const n=ls;e[n(293)][n(304)]();const r=this[n(295)][n(308)](e[n(305)][n(304)]());us(r),r[n(306)]=this[n(291)],t[n(290)](r)}}const ms=gs;function gs(t,e){const n=bs();return(gs=function(t,e){return n[t-=138]})(t,e)}!function(t){const e=gs,n=t();for(;;)try{if(933644===parseInt(e(158))/1*(-parseInt(e(147))/2)+parseInt(e(156))/3+-parseInt(e(138))/4*(parseInt(e(163))/5)+parseInt(e(140))/6+parseInt(e(143))/7*(-parseInt(e(165))/8)+-parseInt(e(154))/9*(parseInt(e(145))/10)+parseInt(e(139))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bs);class ys extends fs{[ms(155)](t,e){const n=ms,r=e[n(161)]();return this[n(151)](n(157),r),this[n(151)](n(146),r),cs(r),t[n(149)][n(167)](this[n(142)][n(155)](r)),t[n(166)][n(167)](this[n(148)]),!0}[ms(141)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(142)][n(141)](s[n(161)]());r[n(161)](),this[n(152)](n(157),o),this[n(152)](n(146),o),us(o),o[n(144)]=this[n(159)],t[n(167)](o)}[ms(151)](t,e){const n=ms,r=e[t];n(160)==typeof r?e[t+n(150)]=r:e[t+n(164)]=JSON[n(162)](r)}[ms(152)](t,e){const n=ms,r=t+n(164);e[r]?(e[t]=JSON[n(153)](e[r]),delete e[r]):(e[t]=e[t+n(150)],delete e[t+n(150)])}}function bs(){const t=["4dCykwv","23472911buLumg","3718710QiPXWI","decompress","_protobufDescriptor","14eLEutv","__className","210pRheau","newValue","4846SCRKIi","_id","buffers","Boolean","_serializeOneOf","_deserializeOneOf","parse","451746WruWhJ","compress","4990005PvvpcS","oldValue","146JATLTc","_operationName","boolean","shift","stringify","2976085pshrZt","Json","5921312FivBZJ","types","push"];return(bs=function(){return t})()}const Is=vs;function Os(){const t=["boolean","6iIFGRj","types","2524248YjVfJR","1116731DIqHNp","67566gjiwfb","_operationName","push","__className","buffers","_serializeNodesAttributes","_deserializeNodesAttributes","attributesJson","_protobufDescriptor","_id","parse","9KAiBxQ","2815210SeTMaG","shift","keys","attributesBoolean","1608692XHjDyE","24GcOzwb","22RkdcTv","2357655QjdGQc","nodes","stringify","_areValuesBoolean","every","decompress","children","attributes","3431005UelvLy","compress"];return(Os=function(){return t})()}function vs(t,e){const n=Os();return(vs=function(t,e){return n[t-=303]})(t,e)}!function(t){const e=vs,n=t();for(;;)try{if(459919===-parseInt(e(310))/1*(-parseInt(e(327))/2)+-parseInt(e(329))/3+parseInt(e(326))/4+-parseInt(e(303))/5+parseInt(e(306))/6*(-parseInt(e(309))/7)+parseInt(e(308))/8*(parseInt(e(321))/9)+-parseInt(e(322))/10*(-parseInt(e(328))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Os);class ws extends fs{[Is(304)](t,e){const n=Is,r=e[n(323)]();return this[n(315)](r[n(330)]),cs(r),t[n(314)][n(312)](this[n(318)][n(304)](r)),t[n(307)][n(312)](this[n(319)]),!0}[Is(334)](t,e){const n=Is,{types:r,buffers:s}=e,o=this[n(318)][n(334)](s[n(323)]());r[n(323)](),o[n(330)]||(o[n(330)]=[]),this[n(316)](o[n(330)]),us(o),o[n(313)]=this[n(311)],t[n(312)](o)}[Is(315)](t){const e=Is;for(const n of t){if(n[e(336)]){const t=n[e(336)];this[e(332)](t)?n[e(325)]=t:n[e(317)]=JSON[e(331)](t)}n[e(335)]&&this[e(315)](n[e(335)])}}[Is(316)](t){const e=Is;for(const n of t)(n[e(325)]||n[e(317)])&&(n[e(325)]?(n[e(336)]=n[e(325)],delete n[e(325)]):(n[e(336)]=JSON[e(320)](n[e(317)]),delete n[e(317)])),n[e(335)]&&this[e(316)](n[e(335)])}[Is(332)](t){const e=Is;return Object[e(324)](t)[e(333)](n=>e(305)==typeof t[n])}}const Ss=ks;function ks(t,e){const n=As();return(ks=function(t,e){return n[t-=403]})(t,e)}function As(){const t=["22Triatj","116175BVeyrm","9485052ppykhe","decompress","490jOafFg","7QtGgjx","1BHpJHB","595370rWtFSA","31054hrSoNY","oldRange","newRange","95654QfKbCw","15YEJqVK","983036cDvZOP","7594208oczwol","117jhXWvp","276YODEFd","length"];return(As=function(){return t})()}!function(t){const e=ks,n=t();for(;;)try{if(972505===-parseInt(e(418))/1*(parseInt(e(420))/2)+-parseInt(e(406))/3*(parseInt(e(407))/4)+-parseInt(e(413))/5*(-parseInt(e(410))/6)+parseInt(e(417))/7*(-parseInt(e(408))/8)+-parseInt(e(409))/9*(-parseInt(e(419))/10)+parseInt(e(412))/11*(parseInt(e(414))/12)+-parseInt(e(405))/13*(parseInt(e(416))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(As);class Ts extends fs{[Ss(415)](t,e){const n=Ss;super[n(415)](t,e);const r=t[t[n(411)]-1];r[n(403)]||(r[n(403)]=null),r[n(404)]||(r[n(404)]=null)}}function _s(t,e){var n=Ps();return(_s=function(t,e){return n[t-=207]})(t,e)}var Cs=_s;function Ps(){var t=["types","compress","657BlCPXV","48VARNEd","_id","451374CXdgvN","9khOQWi","decompress","240hPyKMk","2093696OPWECe","_operationName","20456fXCbWM","50733wFeTjU","push","4584uIdHWb","54018ResGRf","shift","2026210BeFOYG"];return(Ps=function(){return t})()}!function(t){for(var e=_s,n=t();;)try{if(162037===-parseInt(e(208))/1*(parseInt(e(217))/2)+-parseInt(e(214))/3*(-parseInt(e(223))/4)+parseInt(e(210))/5*(-parseInt(e(216))/6)+parseInt(e(207))/7+-parseInt(e(213))/8*(-parseInt(e(222))/9)+-parseInt(e(219))/10+parseInt(e(211))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ps);class Es extends fs{[Cs(221)](t,e){var n=Cs;return e[n(218)](),t[n(220)][n(215)](this[n(224)]),!0}[Cs(209)](t,e){var n=Cs;e[n(220)][n(218)](),t[n(215)]({__className:this[n(212)]})}}const js=xs;function Ds(){const t=["startsWith","441QHZWdq","15682qfUXiY","10mpaRsn","compress","308qiOBEl","11788620mGPiGq","1009532LVAckL","3734544XaQpfK","_omittedNamespace","length","name","1435620vfmwpO","__className","1729768mahxnJ","9YmzfZL","7ZUPqOB","replace","507061VOSWAx","MarkerOperation","decompress"];return(Ds=function(){return t})()}function xs(t,e){const n=Ds();return(xs=function(t,e){return n[t-=237]})(t,e)}!function(t){const e=xs,n=t();for(;;)try{if(832181===parseInt(e(252))/1+-parseInt(e(257))/2*(-parseInt(e(256))/3)+-parseInt(e(241))/4*(-parseInt(e(237))/5)+parseInt(e(242))/6+-parseInt(e(250))/7*(-parseInt(e(248))/8)+parseInt(e(249))/9*(parseInt(e(240))/10)+-parseInt(e(239))/11*(parseInt(e(246))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ds);class Rs extends Ts{[js(243)];constructor(t,e,n,r){const s=js;super(t,e,n),this[s(243)]=r+":"}[js(238)](t,e){const n=js;return!(n(253)!=e[0][n(247)]||!e[0][n(245)][n(255)](this[n(243)])||(e[0][n(245)]=e[0][n(245)][n(251)](new RegExp("^"+this[n(243)]),""),super[n(238)](t,e),0))}[js(254)](t,e){const n=js;super[n(254)](t,e);const r=t[t[n(244)]-1];r[n(245)]=this[n(243)]+r[n(245)]}}const Ns=Ms;function Vs(){const t=["_context","18UnapVl","shift","_splitCurrent","156404DMopUn","7325549KpUNId","_compressSingleOperation","1765816dvDxkT","length","240954WntKoO","compress","decompress","_decompressSingleOperation","_combineNext","buffers","_id","_compareOperations","2808090Nvvily","types","5160152iYQSwI","push","1332PRWXoB","15435JLIpTQ"];return(Vs=function(){return t})()}function Ms(t,e){const n=Vs();return(Ms=function(t,e){return n[t-=192]})(t,e)}!function(t){const e=Ms,n=t();for(;;)try{if(743999===parseInt(e(196))/1+parseInt(e(199))/2+parseInt(e(209))/3+parseInt(e(213))/4*(-parseInt(e(214))/5)+parseInt(e(201))/6+parseInt(e(197))/7+-parseInt(e(211))/8*(parseInt(e(193))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Vs);class Bs{[Ns(207)];[Ns(192)];constructor(t,e){const n=Ns;this[n(207)]=t,this[n(192)]=e}[Ns(202)](t,e){const n=Ns;let r;for(;e[n(200)]>1&&this[n(208)](e[0],e[1]);)r?(r=this[n(205)](e[n(194)](),r),t[n(210)][n(212)](0)):(r=Xr(e[n(194)]()),t[n(210)][n(212)](this[n(207)]));return!!r&&(r=this[n(205)](e[n(194)](),r),t[n(210)][n(212)](0),t[n(206)][n(212)](this[n(198)](r)),!0)}[Ns(203)](t,e){const n=Ns,r=this[n(204)](e);for(;0==e[n(210)][0];)e[n(210)][n(194)](),t[n(212)](this[n(195)](r));t[n(212)](r)}}const Js=Us;function Us(t,e){const n=qs();return(Us=function(t,e){return n[t-=380]})(t,e)}function qs(){const t=["compress","99NLOnGi","length","_compareAttributes","_compareOperations","position","_getCompressorByName","256962iXJajW","9110ADwHoJ","3236568FXTnkj","from","data","every","546861BleHqm","43YzamBj","406390DIPBBh","next","nodes","_combineNext","_checkOperation","value","_splitCurrent","InsertOperation","2492546YppGlx","__className","attributes","buffers","7697464rQjvzY","wasUndone","_decompressSingleOperation","substr","decompress","keys","_context","iterator","95GAhnok","_compressSingleOperation"];return(qs=function(){return t})()}!function(t){const e=Us,n=t();for(;;)try{if(765201===parseInt(e(404))/1*(parseInt(e(398))/2)+-parseInt(e(403))/3+parseInt(e(399))/4+parseInt(e(388))/5*(parseInt(e(397))/6)+-parseInt(e(413))/7+-parseInt(e(380))/8+parseInt(e(391))/9*(parseInt(e(405))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qs);class Ls extends Bs{[Js(408)](t,e){const n=Js;return e[n(407)][0][n(401)]+=t[n(407)][0][n(401)],e}[Js(411)](t){const e=Js,n=Xr(t),r=n[e(407)][0],s=t[e(407)][0],o=s[e(401)][Symbol[e(387)]]()[e(406)]()[e(410)],i=o[e(392)];return r[e(401)]=o,s[e(401)]=s[e(401)][e(383)](i),t[e(395)]=ss(t[e(395)],i),n}[Js(394)](t,e){const n=Js;if(this[n(409)](t)&&this[n(409)](e)){const r=t[n(407)][0][n(401)][n(392)],s=as(ss(t[n(395)],r),e[n(395)]),o=t[n(407)][0],i=e[n(407)][0];return s&&this[n(393)](o,i)}return!1}[Js(389)](t){const e=Js,n={types:[],buffers:[],baseVersion:0};return this[e(386)][e(396)](e(412))[e(390)](n,[t]),n[e(416)][0]}[Js(382)](t){const e=Js,n=[];return this[e(386)][e(396)](e(412))[e(384)](n,t),n[0]}[Js(409)](t){const e=Js;return e(412)==t[e(414)]&&1==t[e(407)][e(392)]&&t[e(407)][0][e(401)]&&!t[e(381)]&&1==Array[e(400)](t[e(407)][0][e(401)])[e(392)]}[Js(393)](t,e){const n=Js,r=Object[n(385)](t[n(415)]||{}),s=Object[n(385)](e[n(415)]||{});return r[n(392)]===s[n(392)]&&r[n(402)](r=>e[n(415)][r]&&e[n(415)][r]===t[n(415)][r])}}const Gs=Hs;function Ys(){const t=["1067871hnhADT","311238xxbruM","targetPosition","_decompressSingleOperation","wasUndone","30ScxSrF","_checkOperation","buffers","__className","howMany","$graveyard","3102CqtJFZ","1491790BXHAlH","1412512BobWWB","compress","_compressSingleOperation","160OatYEc","_getCompressorByName","_context","decompress","root","_compareOperations","1695CLxntO","_combineNext","sourcePosition","99ZJMzwl","919173dmHwPT","_splitCurrent","899454NzVoMG","MoveOperation"];return(Ys=function(){return t})()}function Hs(t,e){const n=Ys();return(Hs=function(t,e){return n[t-=349]})(t,e)}!function(t){const e=Hs,n=t();for(;;)try{if(460116===parseInt(e(365))/1+parseInt(e(350))/2*(parseInt(e(361))/3)+-parseInt(e(352))/4+-parseInt(e(374))/5*(-parseInt(e(367))/6)+parseInt(e(369))/7+-parseInt(e(355))/8*(parseInt(e(370))/9)+-parseInt(e(351))/10*(parseInt(e(364))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ys);class zs extends Bs{[Gs(362)](t,e){const n=Gs;return e[n(378)]++,e[n(363)]=Xr(t[n(363)]),e}[Gs(366)](t){const e=Gs,n=Xr(t);return t[e(378)]--,n[e(378)]=1,n[e(363)]=ss(n[e(363)],t[e(378)]),n}[Gs(360)](t,e){const n=Gs;return!(!this[n(375)](t)||!this[n(375)](e))&&as(ss(t[n(363)],-1),e[n(363)])&&as(t[n(371)],e[n(371)])}[Gs(354)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(357)][e(356)](e(368))[e(353)](n,[t]),n[e(376)][0]}[Gs(372)](t){const e=Gs,n=[];return this[e(357)][e(356)](e(368))[e(358)](n,t),n[0]}[Gs(375)](t){const e=Gs;return e(368)==t[e(377)]&&e(349)==t[e(371)][e(359)]&&1==t[e(378)]&&!t[e(373)]}}function Fs(t,e){const n=Ws();return(Fs=function(t,e){return n[t-=449]})(t,e)}const Ks=Fs;function Ws(){const t=["howMany","110ubGcrg","5895175QMePUW","__className","546kKyaor","913347yGOhOF","MoveOperation","_checkOperation","1030zkBdzF","1361848KnmniS","_decompressSingleOperation","746121fYFPXg","3495988CNYyVa","_compressSingleOperation","$graveyard","_getCompressorByName","targetPosition","_compareOperations","_combineNext","buffers","compress","sourcePosition","wasUndone","5JEvkXZ","_context","_splitCurrent","root","6354780ZyYTek","decompress","35DZnood"];return(Ws=function(){return t})()}!function(t){const e=Fs,n=t();for(;;)try{if(594019===-parseInt(e(478))/1+parseInt(e(475))/2*(parseInt(e(471))/3)+-parseInt(e(449))/4*(-parseInt(e(460))/5)+-parseInt(e(464))/6+parseInt(e(466))/7*(parseInt(e(476))/8)+-parseInt(e(472))/9*(-parseInt(e(468))/10)+-parseInt(e(469))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ws);class Qs extends Bs{[Ks(455)](t,e){return e[Ks(467)]++,e}[Ks(462)](t){const e=Ks,n=Xr(t);return n[e(467)]=1,t[e(467)]--,n}[Ks(454)](t,e){const n=Ks;return!(!this[n(474)](t)||!this[n(474)](e))&&as(t[n(458)],e[n(458)])&&as(t[n(453)],e[n(453)])}[Ks(450)](t){const e=Ks,n={types:[],buffers:[],baseVersion:0};return this[e(461)][e(452)](e(473))[e(457)](n,[t]),n[e(456)][0]}[Ks(477)](t){const e=Ks,n=[];return this[e(461)][e(452)](e(473))[e(465)](n,t),n[0]}[Ks(474)](t){const e=Ks;return e(473)==t[e(470)]&&e(451)==t[e(453)][e(463)]&&1==t[e(467)]&&!t[e(459)]}}const Xs=$s;function Zs(){const t=["550PZgpHG","user:position:","26487758KHhTkp","startsWith","newRange","401314WLiMlk","163089ImJwpY","buffers","compress","stickiness","split","shift","_id","types","start","_context","75594VFmryD","40jSVHgA","_compareOperations","push","2arqSrF","MarkerOperation","39684zjvUPw","decompress","__className","oldRange","toNone","45055XUfFPl","user:","4452104HqqVpN","end","_getCompressorByName","_decompressSingleOperation","_compressSingleOperation","959wVMWdg","name"];return(Zs=function(){return t})()}function $s(t,e){const n=Zs();return($s=function(t,e){return n[t-=443]})(t,e)}!function(t){const e=$s,n=t();for(;;)try{if(592975===-parseInt(e(475))/1*(-parseInt(e(454))/2)+parseInt(e(450))/3*(parseInt(e(451))/4)+-parseInt(e(461))/5+parseInt(e(456))/6*(-parseInt(e(468))/7)+-parseInt(e(463))/8+-parseInt(e(476))/9*(parseInt(e(470))/10)+parseInt(e(472))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zs);class to extends Bs{[Xs(478)](t,e){const n=Xs;if(!this[n(452)](e[0],e[1]))return!1;const r=e[n(445)]();return r[n(459)]=null,r[n(474)]&&as(r[n(474)][n(448)],r[n(474)][n(464)])&&(r[n(474)][n(464)]=null),e[n(445)](),t[n(447)][n(453)](this[n(446)]),t[n(447)][n(453)](0),t[n(477)][n(453)](this[n(467)](r)),!0}[Xs(457)](t,e){const n=Xs,r=this[n(466)](e);r[n(474)]&&!r[n(474)][n(464)]&&(r[n(474)][n(464)]=Xr(r[n(474)][n(448)]));const s=Xr(r);s[n(474)]&&(s[n(474)][n(448)][n(443)]=n(460),s[n(474)][n(464)]=Xr(s[n(474)][n(448)])),s[n(469)]=n(471)+s[n(469)][n(444)](":")[2],e[n(447)][n(445)](),t[n(453)](r),t[n(453)](s)}[Xs(467)](t){const e=Xs,n={types:[],buffers:[],baseVersion:0};return this[e(449)][e(465)](e(455))[e(478)](n,[t]),n[e(477)][0]}[Xs(466)](t){const e=Xs,n=[];return this[e(449)][e(465)](e(455))[e(457)](n,t),n[0]}[Xs(452)](t,e){const n=Xs;return!!(t&&e&&n(455)==t[n(458)]&&n(455)==e[n(458)]&&t[n(469)][n(473)](n(462))&&e[n(469)][n(473)](n(462))&&t[n(469)]!=e[n(469)])}}const eo=ro;function no(){const t=["67910ldCBkl","RenameOperation","RootAttributeOperation","baseVersion","_getCompressorByName","_compressorByName","591460VpJOEB","_protobufFactory","_registerCompressor","_registerOperationCompressor","SuggestionMarkerOperation","set","MergeOperation","suggestion","RootOperation","MoveOperation","154822CBXnqG","SplitOperation","no-operations-provided","decompress-compressor-not-found","279ssuVRx","5MJtczY","comment","DeletingAction","types","_registerActionCompressor","TypingAction","ForwardDeletingAction","8egCIof","NoOperation","get","decompress","forEach","183131mIYZcu","UserSelectionAction","compress","length","CommentMarkerOperation","24GJjzJU","__className","InsertOperation","MarkerOperation","getDescriptor","AttributeOperation","8369240LiAYyL","2691294bKitDK","128eaPykT","456grFLCG","_compressorById","131250FEbXgO"];return(no=function(){return t})()}function ro(t,e){const n=no();return(ro=function(t,e){return n[t-=390]})(t,e)}!function(t){const e=ro,n=t();for(;;)try{if(697168===parseInt(e(402))/1*(-parseInt(e(390))/2)+-parseInt(e(412))/3*(-parseInt(e(430))/4)+-parseInt(e(395))/5*(-parseInt(e(419))/6)+-parseInt(e(423))/7*(parseInt(e(420))/8)+-parseInt(e(394))/9*(-parseInt(e(424))/10)+-parseInt(e(418))/11+parseInt(e(421))/12*(parseInt(e(407))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(no);class so{[eo(422)];[eo(429)];[eo(431)];constructor(){const t=eo;this[t(422)]=new Map,this[t(429)]=new Map,this[t(431)]=new vr;const e=this[t(431)][t(416)](t(415));this[t(432)](1,t(403),new Es(1,t(403),void 0)),this[t(433)](10,t(417),ys),this[t(433)](11,t(414),ws),this[t(433)](12,t(415),Ts),this[t(433)](13,t(436),fs),this[t(433)](14,t(439),fs),this[t(433)](15,t(425),fs),this[t(433)](16,t(426),ys),this[t(433)](17,t(391),fs),this[t(432)](18,t(411),new Rs(18,t(415),e,t(396))),this[t(432)](19,t(434),new Rs(19,t(415),e,t(437))),this[t(433)](20,t(438),fs),this[t(399)](100,t(400),Ls),this[t(399)](101,t(397),zs),this[t(399)](102,t(401),Qs),this[t(399)](103,t(408),to)}[eo(409)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(392),this);const r={types:[],buffers:[],baseVersion:t[0][e(427)]};for(;t[e(410)];)this[e(428)](e(408))[e(409)](r,t)||this[e(428)](e(400))[e(409)](r,t)||this[e(428)](e(397))[e(409)](r,t)||this[e(428)](e(401))[e(409)](r,t)||this[e(428)](e(411))[e(409)](r,t)||this[e(428)](e(434))[e(409)](r,t)||this[e(428)](t[0][e(413)])[e(409)](r,t);return r}[eo(405)](t){const e=eo,r=[];for(;t[e(398)][e(410)];){const s=this[e(422)][e(404)](t[e(398)][0]);if(!s)throw new n.CKEditorError(e(393),this,{type:t[e(398)][0]});s[e(405)](r,t)}return r[e(406)]((n,r)=>n[e(427)]=t[e(427)]+r),r}[eo(428)](t){const e=eo;return this[e(429)][e(404)](t)}[eo(433)](t,e,n){const r=eo,s=new n(t,e,this[r(431)][r(416)](e));this[r(432)](t,e,s)}[eo(399)](t,e,n){const r=eo,s=new n(t,this);this[r(432)](t,e,s)}[eo(432)](t,e,n){const r=eo;this[r(422)][r(435)](t,n),this[r(429)][r(435)](e,n)}}function oo(){var t=["6866870KRsnOi","596892ntJRsM","891220iGCGXI","9TkibAd","29477892uXpEjk","11WZHfxx","13030BpiJFj","21WLhTEr","21SalCpP","5FdFObC","2698616vPlBPr","1326084UVcOyt"];return(oo=function(){return t})()}function io(t,e){var n=oo();return(io=function(t,e){return n[t-=408]})(t,e)}!function(t){for(var e=io,n=t();;)try{if(462577===-parseInt(e(414))/1+-parseInt(e(418))/2*(parseInt(e(419))/3)+-parseInt(e(411))/4*(parseInt(e(409))/5)+parseInt(e(413))/6*(parseInt(e(408))/7)+-parseInt(e(410))/8+-parseInt(e(415))/9*(parseInt(e(412))/10)+-parseInt(e(417))/11*(-parseInt(e(416))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(oo);const ao=uo;function co(){const t=["InsertOperation","_isDisconnection","getIdOfTheLastOperation","_applyOperationsSet","_clearPendingAction","realtimecollaborationclient-init-non-existent-root","_setPendingAction","destroy","collaboration-missing-channelid","1204782KBQzdJ","isPremiumPlugin","plugins","realtimecollaborationclient-error","_setUpDataInit","editor","isOfficialPlugin","_connectAfterSessionHasBeenFlushed","root","_shouldSendUpdate","409","_currentBufferDelay","includes","initData","_pendingAction","change:_isEditingAllowed","setIdForTheLastOperation","sendOperations","targetPosition","_baseBufferDelay","has","654090hOiGyw","_handleInitialConnectionData","_loadRoot","_handleExternalOperations","183155KnKQIs","start","code","addOperation","getOperations","insert","_sendBufferedOperationsDelayed","PENDING_ACTION_SENDING_DATA","parse","metadata","selection","differ","_disconnectionOperations","clone","view","compress","_fetchMissingUsers","addToReconnectionStack","sessionCreatedAt","operationsReceived","realtimecollaborationclient-init-service-incorrect-server-operation","_decompressOperations","realtimecollaborationclient","register","cloud-services-internal-error: Not connected.","reconnection: flushed session","_crash","_isLoaded","define","getConnectedSessions","multi-root-editor-root-attributes-no-root","Synchronization issue","_sendBufferedOperations","createPositionAt","_hasSynchronizationProblem","from","marker","rootsAttributes","channelSessions","addRootAttribute","round","Notification","createPositionFromPath","size","1056230elDUma","newRange","createdAt","_handleSendingSelectionMarkers","rtc-offline","unregister","get","directChange","then","_knownRootNames","requires","userId","isDocumentOperation","_handleReconnectionError","editing","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","_operationIdentifier","_initThrowingOnDataSet","remove","_channelId","_isPendingUpdate","type","createRange","isEnabled","serverHistory","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","return","_compressOperations","_getOperationsFromInitData","string","affectedSelectable","finally","offset","document:write","getOperationAuthor","decompress","realtimecollaborationclient-init-document-already-initialized","stopListening","lastOperationAcceptedAt","change:_isPendingUpdate","disconnect","realtimecollaborationclient-init-service-internal-error","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.","currentDocumentSession","move","length","forEach","end","rtc-destroyed","191813nfvjun","fromJSON","createRoot","filter","__className","disconnected","map","isReadOnly","startsWith","set","error","change:hasDomSelection","connected","addUser","locale","_isEditingAllowed","_offset","realtimecollaborationclient-init-session-connection-error","add","enableReadOnlyMode","_ignoredOperations","collaboration.channelId","push","_authorId","_handleReceivedOperations","high","affectsData","message","_sendBufferedOperationsDelayId","data","_hasSelectionChanged","871182OtFIDI","CommentsOnly","sessionAdd:","connect","realtimecollaborationclient-sendbufferedoperations","_connectService","off","_service","_lastSyncedOperationId","lastOperationId","CollaborativeEditingService","loadRoot","position","removeFromReconnectionStack","pluginName","suppressErrorInCollaboration","2oCibzC","history","connection","catch","_addKnownRoot","cloud-services-internal-error: Request timeout.","_initSessionsHandling","reconnect","roots","_compressor","getUser","markers","217QJeerS","_updateServerHistory","_handleServerResponse","wasUndone","ready","1592NMzSpn","_waitUntilSynced","cs:removeUser","change:range","stop","_shouldSendSelectionUpdate","cloudServices.bundleVersion","sessionId","404","config","_isConnected","cloudDocumentVersion","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.","_bufferedOperations","_isAttached","baseVersion","version","createUserMarkerOperations","cloud-services-internal-error: Collaborative Editing Service is not connected.","_refreshUserSelectionMarkers","getMany","toJSON","listenTo","mySessionId","getDocumentDetails","reset","_disconnectService","path","wereChangesApplied","addRoot","lastSyncVersion","_knownOperations","RealTimeCollaborationClient","batch","getRoot","setPermissions","apply","real-time-collaboration","enqueueChange","_isInit","fire","_document","state","showWarning","entries","lastDocumentSession","$root","keys","isUndoneOperation","attributes","_saveOperationInBuffer","permissions","slice","44gkxuOr","Permissions","_bufferRootLoad","disableReadOnlyMode","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","rootName","realtimecollaborationclient-init-connection-failed","_operationToId","_handleReconnectionResponse","init","realtimecollaborationclient-handleserverresponse","applyOperation","bind","model","_getAffectedRoot","collaboration","_lastServerVersion","document"];return(co=function(){return t})()}function uo(t,e){const n=co();return(uo=function(t,e){return n[t-=197]})(t,e)}!function(t){const e=uo,n=t();for(;;)try{if(205043===-parseInt(e(363))/1*(-parseInt(e(410))/2)+parseInt(e(266))/3+parseInt(e(218))/4*(-parseInt(e(270))/5)+parseInt(e(245))/6+-parseInt(e(422))/7*(-parseInt(e(427))/8)+parseInt(e(394))/9+-parseInt(e(314))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(co);let lo=1;class po extends e.Plugin{static[ao(404)]=(()=>On)();[ao(379)];[ao(434)];[ao(338)];[ao(333)];[ao(401)];[ao(206)];[ao(419)];[ao(440)];[ao(458)];[ao(323)];[ao(259)];[ao(393)];[ao(391)];[ao(264)];[ao(256)];[ao(402)];[ao(282)];[ao(330)];static get[ao(324)](){return[zn,Xn,hr,e.PendingActions,Fn.Users,r.Notification]}static get[ao(408)](){return ao(197)}static get[ao(251)](){return!0}static get[ao(246)](){return!0}get[ao(438)](){const t=ao;return this[t(234)]+this[t(379)]}get[ao(234)](){const t=ao;return this[t(338)][t(443)]-this[t(379)]}get[ao(457)](){const t=ao,e=this[t(338)][t(274)]();for(let n=e[t(359)]-1;n>=0;n--){const r=e[n];if(!this[t(282)][t(265)](r))return r[t(442)]+1-this[t(379)]}return 0}constructor(t){const e=ao;if(super(t),this[e(379)]=0,this[e(434)]=null,this[e(338)]=new s.History,this[e(250)][e(436)][e(298)](e(233),{}),this[e(333)]=this[e(250)][e(436)][e(320)](e(384)),!this[e(333)])throw new n.CKEditorError(e(244),this);const r=t[e(436)][e(320)](e(433))||n.version;this[e(401)]=new(po[e(404)])(r,this[e(333)]),this[e(206)]=this[e(250)][e(231)][e(235)],this[e(419)]=new so,this[e(440)]=[],this[e(458)]=new WeakSet,this[e(323)]=new Set,this[e(372)](e(334),!1),this[e(372)](e(304),!1),this[e(259)]=null,this[e(393)]=!1,this[e(391)]=null,this[e(264)]=300,this[e(256)]=this[e(264)],this[e(402)]=null,this[e(282)]=new WeakSet,this[e(330)]=new mo(this[e(282)])}[ao(227)](){const t=ao,e=this[t(250)],n=e[t(247)][t(320)](Fn.Users),r=e[t(247)][t(320)](zn);this[t(449)](n,t(348),(e,r)=>{const s=t,o=r[0];o[s(386)]&&(e[s(340)]=n[s(420)](o[s(386)]),e[s(431)]()),null===o[s(386)]&&(e[s(340)]=null,e[s(431)]())},{priority:t(388)}),this[t(449)](e[t(231)][t(235)][t(280)],t(430),(e,n)=>{const r=t;n[r(321)]&&this[r(446)]()}),this[t(449)](e[t(328)][t(284)],t(374),()=>{this[t(446)]()}),this[t(331)](),e[t(231)].on(t(229),(e,n)=>{const r=t,s=n[0];s[r(326)]&&(this[r(215)](s),this[r(254)]()&&this[r(276)]())}),this[t(249)](),this[t(230)](t(378)).to(r,t(207),this,t(304),(e,n)=>t(375)===e&&!n),this.on(t(260),()=>{const n=t;this[n(378)]?e[n(221)](n(318)):e[n(382)](n(318))}),this[t(378)]?e[t(221)](t(318)):e[t(382)](t(318)),this[t(372)](t(437),!1)}async[ao(417)](){const t=ao,e=this[t(250)][t(247)][t(320)](Xn),n=this[t(250)][t(247)][t(320)](zn);try{this[t(334)]=!0,e[t(319)](this[t(333)]);const r=await this[t(401)][t(417)](n[t(412)],this[t(457)]);await this[t(226)](r)&&(this[t(334)]=!1,this[t(240)]());const s=await this[t(401)][t(299)]();e[t(293)](this[t(333)],s),this[t(317)](),this[t(437)]=!0}catch(e){if(function(e){const n=t;return n(435)===e[n(272)]}(e)&&this[t(434)])await this[t(252)]();else if(function(e){const n=t;return n(255)===e[n(272)]}(e)){const e=mr(this[t(250)][t(377)],t(222));this[t(327)](e)}else{if(!(e instanceof ho))throw e;this[t(327)]()}}}[ao(243)](){const t=ao,e=this[t(250)][t(247)][t(320)](zn),n=this[t(250)][t(247)][t(320)](Xn);this[t(250)][t(382)](t(362)),n[t(308)][t(265)](this[t(333)])&&n[t(319)](this[t(333)]),e[t(407)](this),this[t(453)](),super[t(243)]()}async[ao(226)](t){const e=ao;if(this[e(434)]!==t[e(434)]&&this[e(402)]!==t[e(403)])throw new ho;return this[e(434)]=t[e(434)],this[e(424)]([],{...t,wereChangesApplied:!1,data:t[e(392)]},e(417))}async[ao(399)](t,e=!1){const n=ao,{connection:r}=this[n(250)][n(247)][n(320)](zn);po[n(404)][n(299)](r,this[n(333)])[n(322)](t=>this[n(416)](t))[n(413)](t=>{const e=n;this[e(296)](e(380),t)}),this[n(449)](this[n(401)],n(289),this[n(387)][n(230)](this)),this[n(449)](this[n(401)],n(373),(t,e)=>{const r=n;this[r(296)](r(355),e)}),this[n(449)](this[n(401)],n(368),()=>{this[n(437)]=!1});const s=this[n(330)][n(238)](t);this[n(334)]=!0;const o=await this[n(401)][n(397)](r,this[n(341)](t),s);if(this[n(434)]=o[n(434)],e){if(!o[n(455)])return void this[n(327)]();this[n(334)]=!1,this[n(240)](),this[n(338)][n(452)](),this[n(379)]=o[n(346)],this[n(338)][n(443)]=this[n(379)],await this[n(424)](t,o,n(295))}else await this[n(267)](o,t);this[n(317)](),this[n(437)]=!0}[ao(317)](){const t=ao,e=this[t(250)][t(247)][t(320)](Xn),n=this[t(250)][t(247)][t(320)](hr),r=e[t(308)][t(320)](this[t(333)]);r&&r[t(359)]>1?n[t(444)]():this[t(449)](e,t(396)+this[t(333)],()=>{const r=t;2===e[r(308)][r(320)](this[r(333)])[r(359)]&&n[r(444)]()})}async[ao(387)](t,e,n,r){const s=ao;if(!this[s(334)]&&this[s(206)][s(443)]==e){const t=this[s(291)](n,r);await this[s(286)](t),this[s(269)](t,e,n[s(403)])||this[s(296)](s(290))}}async[ao(252)](){const t=ao;this[t(453)]();const{locale:e}=this[t(250)];let n;try{n=await this[t(401)][t(451)]()}catch{const n=mr(e,t(339));return void this[t(327)](n)}const r=n[t(357)]||n[t(210)];if(this[t(402)]!==r[t(403)]){const n=mr(e,t(439));return void this[t(327)](n)}await this[t(399)](this[t(250)][t(231)][t(235)][t(411)][t(274)](),!0)}[ao(453)](){const t=ao;this[t(401)][t(354)](),this[t(440)]=[],clearTimeout(this[t(391)]),this[t(351)](this[t(401)])}[ao(416)](t){const e=ao,n=this[e(250)][e(247)][e(320)](Xn);this[e(449)](n,e(396)+this[e(333)],(t,{session:r})=>{const s=e;if(r.id===n[s(450)]){t[s(400)]();const e=this[s(250)][s(247)][s(265)](s(395))&&this[s(250)][s(247)][s(320)](s(395));let n=r[s(216)];e&&e[s(337)]&&(n=n[s(366)](t=>s(347)!==t)),this[s(250)][s(247)][s(320)](s(219))[s(200)](n,this[s(333)])}}),n[e(293)](this[e(333)],t)}[ao(331)](){const t=ao,e=this[t(250)][t(392)][t(372)];this[t(250)][t(392)][t(372)]=(...r)=>{const s=t;if(!r[r[s(359)]-1][s(409)])throw new n.CKEditorError(s(329),this);e[s(201)](this[s(250)][s(392)],r)}}[ao(249)](){const t=ao;this[t(250)][t(392)].on(t(227),(e,[r])=>{const o=t;if(this[o(206)][o(443)])throw new n.CKEditorError(o(350),this);e[o(431)](),this[o(242)]();const i=this[o(250)][o(436)][o(320)](o(307)),a=this[o(342)](r,i);0==a[o(359)]&&a[o(385)](new s.NoOperation(0)),e[o(340)]=this[o(399)](a)[o(322)](()=>{const t=o;this[t(250)][t(247)][t(320)](zn)[t(287)](this),this[t(250)][t(392)][t(205)](t(426))})[o(413)](t=>this[o(296)](o(224),t))[o(345)](()=>this[o(240)]())},{priority:t(388)}),this[t(250)].on(t(405),async(e,[n,r])=>{const s=t;e[s(431)]();const o=this[s(250)][s(231)][s(235)][s(199)](n);if(!this[s(323)][s(265)](n)){const t=r&&r[s(392)]?r[s(392)]:"",e=r&&r[s(214)]?r[s(214)]:{};await this[s(268)](n,t,e)}this[s(250)][s(231)][s(203)]({isUndoable:!1},()=>{const t=s;o[t(297)]=!0,this[t(250)][t(231)][t(235)][t(281)][t(220)](o)})},{priority:t(388)})}async[ao(286)](t){const e=ao,n=this[e(250)][e(247)][e(320)](Fn.Users),{connection:r}=this[e(250)][e(247)][e(320)](zn),s=new Set;for(const r of t){const t=r[e(386)];t&&!n[e(420)](t)&&s[e(381)](t)}if(0===s[e(313)])return;const o=await b[e(447)](r,Array[e(305)](s));for(const t of o)n[e(420)](t.id)||n[e(376)](t)}[ao(342)](t,e={}){const r=ao,o=this[r(250)][r(231)],i=[];let a=0;const c=r(343)==typeof t?{main:t}:t;for(const t of Object[r(212)](c)){if(!this[r(206)][r(418)][r(265)](t))throw new n.CKEditorError(r(241),this);const e=this[r(250)][r(392)][r(278)](c[t]),u=this[r(206)][r(199)](t),d=new s.InsertOperation(o[r(303)](u,0),e,a++);i[r(385)](d);for(const[t,n]of e[r(421)]){const e=o[r(336)](o[r(312)](u,n[r(271)][r(454)][r(217)]()),o[r(312)](u,n[r(361)][r(454)][r(217)]())),c=new s.MarkerOperation(t,null,e,o[r(421)],!0,a++);i[r(385)](c)}}if(e)for(const[t,c]of Object[r(209)](e)){const e=o[r(235)][r(199)](t);if(!e)throw new n.CKEditorError(r(300),null);for(const[t,n]of Object[r(209)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(385)](o)}}return i}async[ao(268)](t,e,n){const r=ao;this[r(342)]({[t]:e},{[t]:n})[r(360)]((t,e)=>{const n=r;t[n(442)]=this[n(206)][n(443)]+e,t[n(204)]=!0,this[n(215)](t)}),this[r(276)](),await this[r(428)]()}async[ao(267)](t,e){const n=ao;let r;this[n(379)]=t[n(346)];const s=t[n(455)]&&!t[n(258)],o=s?0:t[n(392)][n(442)];if(e[n(360)](e=>{const r=n;e[r(204)]=!0,e[r(316)]=t[r(288)],e[r(386)]=null}),s)r=e,this[n(239)](r,s);else{if(t[n(258)]){const e=this[n(342)](t[n(258)]);this[n(206)][n(411)][n(443)]=-e[n(359)],e[n(360)](r=>{const s=n;r[s(442)]-=e[s(359)],r[s(316)]=t[s(288)],r[s(204)]=!0,r[s(386)]=null}),this[n(239)](e,!0),this[n(338)][n(443)]=-e[n(359)]+this[n(379)],this[n(423)](e)}this[n(206)][n(411)][n(443)]=o,r=this[n(291)](t[n(392)],t[n(279)]),await this[n(286)](r),this[n(239)](r,s)}t[n(403)]&&(this[n(330)][n(261)](r,t[n(403)]),this[n(402)]=t[n(403)]),this[n(338)][n(443)]=o+this[n(379)],this[n(423)](r),e[n(366)](t=>{const e=n,r=this[e(232)](t);return r&&!this[e(323)][e(265)](r)})[n(360)]((t,e)=>{const r=n;t[r(442)]=this[r(206)][r(443)]+e,this[r(215)](t)}),this[n(254)]()?(this[n(256)]=0,this[n(276)](!0),await this[n(428)]()):(this[n(334)]=!1,this[n(240)]())}[ao(296)](t,e){const r=ao,s=e&&e[r(390)];if(s&&s[r(371)](r(292)))throw e;const o=this[r(250)][r(247)][r(320)](zn);throw this[r(334)]=!0,o[r(354)](),this[r(250)][r(382)](r(248)),new n.CKEditorError(t,this[r(250)],s?{originalError:s}:void 0)}[ao(215)](t){const e=ao;this[e(458)][e(265)](t)||(this[e(458)][e(381)](t),this[e(440)][e(385)](t),this[e(259)]||e(306)==t[e(335)]&&!t[e(389)]||this[e(242)]())}[ao(276)](t=!1){const e=ao;!t&&this[e(334)]||(this[e(334)]=!0,clearTimeout(this[e(391)]),this[e(391)]=setTimeout(()=>{const t=e;this[t(302)]()[t(322)](e=>{const n=t;e&&(this[n(240)](),this[n(334)]=!1)})[t(413)](e=>{const n=t;this[n(240)](),this[n(334)]=!1,function(t){const e=n;return t[e(390)][e(371)](e(294))||t[e(390)][e(371)](e(445))||t[e(390)][e(371)](e(415))}(e)||this[n(296)](e[n(390)],e)})},this[e(256)]))}[ao(428)](){return new Promise(t=>{const e=uo;this.on(e(353),()=>{t()})})}async[ao(302)](){const t=ao,e=this[t(250)][t(247)][t(320)](hr);if(this[t(432)]()&&(e[t(444)](),this[t(393)]=!1),!this[t(254)]())return!0;const n=[...this[t(440)]];for(const e of n)e[t(425)]=this[t(206)][t(411)][t(213)](e);const r=this[t(330)][t(238)](n),s=lo++,o=this[t(341)](n),i=await this[t(401)][t(262)](o,o[t(442)],r);try{return await this[t(424)](n,i,s)}catch(e){return this[t(296)](t(398),e)}}async[ao(424)](t,e,n){const r=ao;if(r(373)in e)throw e[r(373)];let s=!1;if(e[r(455)]){e[r(403)]&&(this[r(402)]=e[r(403)]),this[r(440)]=this[r(440)][r(366)](e=>!t[r(257)](e));for(const n of t)n[r(316)]=r(352)in e&&e[r(352)]||void 0;fo(t,e[r(443)]-t[r(359)]),this[r(423)](t);const n=t[r(366)](t=>{const e=r;if(!t[e(204)])return!1;const n=this[e(232)](t);return n&&!this[e(323)][e(265)](n)});fo(n,this[r(206)][r(443)]),this[r(239)](n),s=!0,this[r(256)]=this[r(264)]}else{const t=this[r(291)](e[r(392)],e[r(279)])[r(366)](t=>t[r(442)]>=this[r(234)]);t[r(360)](t=>this[r(414)](t)),this[r(440)]=this[r(440)][r(366)](t=>!t[r(204)]||!this[r(323)][r(265)](this[r(232)](t))),this[r(440)][r(359)]&&fo(this[r(440)],this[r(440)][0][r(442)]),await this[r(286)](t),s=this[r(269)](t,e[r(443)],e[r(403)]),this[r(256)]=Math[r(310)](this[r(256)]/2)}return s?!this[r(254)]()||(this[r(276)](!0),!1):this[r(296)](r(228))}[ao(269)](t,e,n){const r=ao;try{const o={document:this[r(206)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(440)],o);fo(i,this[r(206)][r(443)]),fo(a,e);for(const t of i){const e=c[r(320)](t);t[r(386)]=e?e[r(386)]:null}n&&(this[r(330)][r(261)](t,n),this[r(402)]=n),this[r(440)]=[...a],this[r(239)](i),this[r(423)](t)}catch(t){return console[r(373)](t),!1}return!0}[ao(239)](t,e=!1){const n=ao;this[n(250)][n(231)][n(203)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(458)][r(381)](n),this[r(414)](n),e[r(198)][r(273)](n),this[r(250)][r(231)][r(229)](n)})}[ao(414)](t){const e=ao,n=this[e(232)](t);n&&this[e(323)][e(381)](n)}[ao(232)](t){const e=ao;let n,r;switch(t[e(335)]){case e(275):n=t[e(406)][e(253)];break;case e(306):if(r=t[e(315)],!r)return null;n=r[e(253)];break;case e(309):n=t[e(253)];break;case e(456):n=t[e(344)];break;case e(358):n=t[e(263)][e(253)];break;default:return null}return n[e(223)]}[ao(423)](t){const e=ao;t[e(360)](t=>{const n=e,r=t[n(283)]();r[n(386)]=t[n(386)],r[n(204)]=!!t[n(204)],r[n(316)]=t[n(316)],r[n(442)]+=this[n(379)],t[n(237)]&&this[n(282)][n(381)](r),this[n(338)][n(273)](r)})}[ao(327)](t){const e=ao,n=this[e(250)][e(247)][e(320)](e(311)),r=this[e(250)][e(377)];t||(t=mr(r,e(356))),n[e(208)](t,{title:mr(r,e(301)),namespace:e(202)}),this[e(304)]=!0,clearTimeout(this[e(391)]),this[e(440)]=[],this[e(250)][e(247)][e(320)](zn)[e(354)]()}[ao(242)](){const t=ao;this[t(259)]||(this[t(259)]=this[t(250)][t(247)][t(320)](e.PendingActions)[t(381)](mr(this[t(250)][t(377)],t(277))))}[ao(240)](){const t=ao;this[t(259)]&&(this[t(250)][t(247)][t(320)](e.PendingActions)[t(332)](this[t(259)]),this[t(259)]=null)}[ao(341)](t){const e=ao,n=t[e(369)](t=>t[e(448)]());return this[e(419)][e(285)](n)}[ao(291)](t,e){const n=ao;return this[n(419)][n(349)](t)[n(369)]((t,r)=>{const o=n,i=o(227)==e[r][o(335)];if(o(236)==t[o(367)]){const e=t[o(406)][o(253)];!this[o(206)][o(199)](e)&&(this[o(206)][o(365)](o(211),e)[o(441)]=!1)}const a=s.OperationFactory[o(364)](t,this[o(206)]);return a[o(425)]=t[o(425)],a[o(204)]=i,a[o(386)]=i?null:e[r][o(325)],a[o(237)]=o(429)===e[r][o(335)],a[o(316)]=e[r][o(316)],a})}[ao(446)](){const t=ao;this[t(393)]=!0,this[t(432)]()?this[t(276)]():this[t(393)]=!1}[ao(432)](){const t=ao,e=this[t(250)][t(247)][t(320)](Xn)[t(308)][t(320)](this[t(333)]);return!this[t(250)][t(370)]&&!!e&&e[t(359)]>1&&this[t(393)]}[ao(254)](){const t=ao;return this[t(440)][t(359)]>0||this[t(432)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(442)]=e++}class mo{[ao(383)];[ao(225)];constructor(t){const e=ao;this[e(383)]=t,this[e(225)]=new WeakMap}[ao(238)](t){const e=ao;let r=t[e(359)];for(;r--;){const s=t[r];if(!this[e(383)][e(265)](s)){if(!this[e(225)][e(265)](s)){const t=(0,n.uid)()[e(217)](1,18);this[e(225)][e(372)](s,t)}return this[e(225)][e(320)](s)}}}[ao(261)](t,e){const n=ao;if(!e)return;let r=t[n(359)];for(;r--;){const s=t[r];this[n(383)][n(265)](s)||this[n(225)][n(372)](s,e)}}}var go=bo;function yo(){var t=["pluginName","3660WUBLav","189144OYNxTo","isPremiumPlugin","1325418bIseYq","27577wjpJPd","isOfficialPlugin","452318PbdlYF","2020815GfScTR","7EtxPyX","RealTimeCollaborativeEditing","4sMQnpa","10rbVOuE","944532qkIAOG","requires","792656kSHpsu"];return(yo=function(){return t})()}function bo(t,e){var n=yo();return(bo=function(t,e){return n[t-=195]})(t,e)}!function(t){for(var e=bo,n=t();;)try{if(524858===-parseInt(e(204))/1*(parseInt(e(208))/2)+-parseInt(e(199))/3+-parseInt(e(210))/4*(-parseInt(e(209))/5)+parseInt(e(201))/6*(-parseInt(e(206))/7)+parseInt(e(196))/8+parseInt(e(205))/9+parseInt(e(198))/10*(parseInt(e(202))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yo);class Io extends e.Plugin{static get[go(195)](){return[po]}static get[go(197)](){return go(207)}static get[go(203)](){return!0}static get[go(200)](){return!0}}const Oo=wo;function vo(){const t=["updateComment","6476310ArGyfz","cloud-services-internal-error: Request timeout.","commentThreadAdded","context","authorId","_services","245dkRKiv","reopenCommentThread","getComment","commentUpdated","map","isPremiumPlugin","_connectService","resolveCommentThread","CommentsService","connect","404","setPermissions","destroy","reopen","2430426vsrJOp","comments","resolvedAt","Permissions","disconnect","addUser","130792AqOxnv","get","userId","2296860gKzbQG","assign","4829byDWTU","code","add","pluginName","commentThreadReopened","deletedAt","updateCommentThread","5ALZHOM","resolvedBy","config","commentThreadUpdated","has","commentRemoved","keys","listenTo","getCommentThreads","addComment","40990bYrJci","commentThreadRemoved","set","473351cMXILX","removeCommentThread","sessionAdd:","from","attributes","_fetchMissingUsersForThreads","content","_terminateService","removeComment","catch","requires","_getService","startsWith","cloudservicescommentsadapter-service-not-exist","CloudServicesCommentsAdapter","commentAdded","1248272ohAeNv","message","init","reconnect","adapter","cloud-services-internal-error: Comments Service is not connected.","unregister","plugins","mySessionId","size","register","commentThreadResolved","collaboration.channelId","addToReconnectionStack","_setUpService","addCommentThread","getUser","resolve","permissions","CommentsRepository","remove","delete","createdAt","getConnectedSessions","update","2VkJimd","cloud-services-internal-error: Not connected.","isOfficialPlugin","commentThreadId","getCommentThread","getMany","cloudservicescommentsadapter-connect-already-connected","off","commentId","cloudservicescommentsadapter-disconnect-not-exist"];return(vo=function(){return t})()}function wo(t,e){const n=vo();return(wo=function(t,e){return n[t-=488]})(t,e)}!function(t){const e=wo,n=t();for(;;)try{if(524013===-parseInt(e(585))/1*(parseInt(e(523))/2)+parseInt(e(554))/3+-parseInt(e(498))/4*(-parseInt(e(572))/5)+parseInt(e(563))/6+parseInt(e(540))/7*(parseInt(e(560))/8)+parseInt(e(534))/9+parseInt(e(582))/10*(-parseInt(e(565))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vo);class So extends e.ContextPlugin{static[Oo(548)]=(()=>Ln)();[Oo(539)];static get[Oo(492)](){return[zn,Oo(517),Xn,Fn.Users]}static get[Oo(568)](){return Oo(496)}static get[Oo(525)](){return!0}static get[Oo(545)](){return!0}constructor(t){const e=Oo;super(t),this[e(539)]=new Map}async[Oo(500)](){const t=Oo,n=this[t(537)],r=n[t(505)][t(561)](t(517));if(n[t(505)][t(561)](zn)[t(511)](this),r[t(502)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(493)](e)[c(513)]({commentThreadId:n,comments:r[c(544)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(531)],userId:t[r(538)],content:t[r(488)],documentId:e,createdAt:t[r(520)],attributes:t[r(589)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(491)](Ao);return{threadId:u[c(526)],comments:u[c(555)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(493)](e)[r(527)](n)[r(491)](ko)[r(491)](Ao);return s?s[r(570)]?null:(await this[r(590)]([s]),{threadId:s[r(526)],comments:s[r(555)][r(544)](To),context:s[r(537)],resolvedAt:s[r(556)],resolvedBy:s[r(573)],attributes:s[r(589)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(493)](e)[t(571)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(491)](ko)[t(491)](Ao),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(493)](e)[r(547)](n)[r(491)](ko)[r(491)](Ao);return{threadId:s[r(526)],resolvedAt:s[r(556)],resolvedBy:s[r(573)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(493)](e)[t(541)](n)[t(491)](ko)[t(491)](Ao),removeCommentThread:({channelId:e,threadId:n})=>this[t(493)](e)[t(586)](n)[t(491)](ko)[t(491)](Ao),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(493)](e)[t(581)](n,r,s,o)[t(491)](Ao),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(493)](e)[t(533)](n,r,s,o)[t(491)](ko)[t(491)](Ao),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(493)](e)[t(490)](n,r)[t(491)](ko)[t(491)](Ao)},n instanceof e.Context){const e=n[t(574)][t(561)](t(510)),r=n[t(505)][t(561)](Xn);await this[t(512)](e);const s=await this[t(539)][t(561)](e)[t(521)]();this[t(579)](r,t(587)+e,(n,{session:s})=>{const o=t;s.id===r[o(506)]&&(n[o(530)](),this[o(537)][o(505)][o(561)](o(557))[o(551)](s[o(516)],e))}),r[t(508)](e,s)}}async[Oo(512)](t){const e=Oo;if(this[e(539)][e(576)](t))throw new n.CKEditorError(e(529),null,{channelId:t});const r=this[e(537)][e(505)][e(561)](e(517)),s=new(So[e(548)])(t);this[e(539)][e(584)](t,s),this[e(579)](s,e(536),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(527)](o)||r[s(513)]({threadId:o,channelId:i,comments:l?l[s(544)](To):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(579)](s,e(575),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(527)](n)&&r[c(571)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(579)](s,e(509),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(527)](n);a&&a[i(515)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(579)](s,e(569),(t,{commentThreadId:n})=>{const s=e,o=r[s(527)](n);o&&o[s(553)]({isFromAdapter:!0})}),this[e(579)](s,e(583),(t,{commentThreadId:n})=>{const s=e,o=r[s(527)](n);o&&o[s(518)]({isFromAdapter:!0})}),this[e(579)](s,e(497),(t,n)=>{const s=e,o=n[s(526)],i=r[s(527)](o);i&&i[s(581)]({...To(n),isFromAdapter:!0})}),this[e(579)](s,e(543),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(527)](n);if(c){const t=c[a(542)](s);t&&t[a(522)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(579)](s,e(577),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(527)](n);if(i){const t=i[o(542)](s);t&&t[o(518)]({isFromAdapter:!0})}}),await this[e(546)](t)}[Oo(552)](){const t=Oo;if(this[t(537)]instanceof e.Context){const e=this[t(537)][t(574)][t(561)](t(510));this[t(489)](e)}}[Oo(489)](t){const e=Oo;if(!this[e(539)][e(576)](t))throw new n.CKEditorError(e(532),null,{channelId:t});this[e(493)](t)[e(558)](),this[e(539)][e(519)](t)}async[Oo(501)](){const t=Oo;for(const e of this[t(539)][t(578)]())await this[t(546)](e);if(this[t(537)]instanceof e.Context){const e=this[t(537)][t(574)][t(561)](t(510)),n=this[t(537)][t(505)][t(561)](Xn);n[t(504)](e);const r=await this[t(539)][t(561)](e)[t(521)]();n[t(508)](e,r)}}async[Oo(546)](t){const e=Oo,{connection:n}=this[e(537)][e(505)][e(561)](zn),r=this[e(537)][e(505)][e(561)](e(517)),s=this[e(539)][e(561)](t),o=await s[e(549)](n);await this[e(590)](o);const i=new Set(Array[e(588)](r[e(580)]({channelId:t}),t=>t.id));for(const t of o)t[e(570)]||i[e(519)](t[e(526)]);for(const t of i)r[e(527)](t)[e(518)]({isFromAdapter:!0});for(const n of o){let s=r[e(527)](n[e(526)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(513)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(588)](s[e(555)],t=>t.id));for(const t of n[e(555)])p[e(519)](t[e(531)]);for(const t of p)s[e(542)](t)[e(518)]({isFromAdapter:!0});for(const t of n[e(555)]){const n=s[e(542)](t[e(531)]);n?n[e(488)]!==t[e(488)]&&n[e(522)]({content:t[e(488)],isFromAdapter:!0}):s[e(581)](Object[e(564)](To(t),{isFromAdapter:!0}))}}}[Oo(493)](t){const e=Oo;if(!this[e(539)][e(576)](t))throw new n.CKEditorError(e(495),null,{channelId:t});return this[e(539)][e(561)](t)}async[Oo(590)](t){const e=Oo,n=this[e(537)][e(505)][e(561)](Fn.Users),{connection:r}=this[e(537)][e(505)][e(561)](zn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(514)](r)&&s[e(567)](r);for(const{userId:t}of o)n[e(514)](t)||s[e(567)](t)}if(0===s[e(507)])return;const o=await b[e(528)](r,Array[e(588)](s));for(const t of o)n[e(514)](t.id)||n[e(559)](t)}}async function ko(t){const e=Oo;if(e(550)!==t[e(566)])throw t}function Ao(t){const e=Oo;if((n=t)[e(499)][e(494)](e(503))||n[e(499)][e(494)](e(524))||n[e(499)][e(494)](e(535)))return new Promise(()=>{});var n;throw t}function To(t){const e=Oo;return{threadId:t[e(526)],commentId:t[e(531)],content:t[e(488)],createdAt:t[e(520)],authorId:t[e(562)],attributes:t[e(589)]||{}}}const _o=Co;function Co(t,e){const n=Po();return(Co=function(t,e){return n[t-=132]})(t,e)}function Po(){const t=["then","adapter","isConnected","692JWivxE","2505nUrJPl","isPremiumPlugin","message","editor","catch","getMany","originalSuggestionId","135282lNQhNg","add","get","size","TrackChangesEditing","init","type","set","plugins","addUser","connected","update","values","2828640NBYVBU","1428350RDAPjI","844698EJpCrn","find","_bufferedRequests","reconnect","open","cloud-services-internal-error: Not connected.","data","hasSuggestion","config","connection","connect","105610hZDkXF","_trackChangesService","pluginName","576444pMkwET","attributes","from","CloudServicesTrackChangesAdapter","_saved","TrackChangesService","addSuggestionData","addToReconnectionStack","_waitForServiceReady","collaboration.channelId","_fetchMissingUsersForThreads","off","delete","startsWith","state","requires","isOfficialPlugin","listenTo","getSuggestion","getUser","suggestionUpdated","cloud-services-internal-error: Request timeout."];return(Po=function(){return t})()}!function(t){const e=Co,n=t();for(;;)try{if(114317===-parseInt(e(180))/1+-parseInt(e(154))/2+parseInt(e(183))/3+parseInt(e(146))/4*(parseInt(e(147))/5)+-parseInt(e(169))/6+-parseInt(e(168))/7+parseInt(e(167))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Po);class Eo extends e.Plugin{static[_o(188)]=(()=>Qe)();[_o(171)];[_o(181)];static get[_o(136)](){return[So,_o(158),zn]}static get[_o(182)](){return _o(186)}static get[_o(137)](){return!0}static get[_o(148)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(150)][e(177)][e(156)](e(192));this[e(171)]=new Map,this[e(181)]=new(Eo[e(188)])(n)}[_o(159)](){const t=_o,e=this[t(150)][t(162)][t(156)](zn),n=this[t(150)][t(162)][t(156)](t(158));return n[t(144)]={getSuggestion:async e=>{const n=t;await this[n(191)]();const r=await this[n(181)][n(156)](e)[n(151)](jo);return await this[n(193)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(191)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(181)][i(155)](e,n,r,s,o)[i(151)](t=>{if(Do(t))return new Promise(t=>{const n=Co;this[n(171)][n(161)](e,{resolve:t,suggestionData:a})});throw t});return this[i(171)][i(133)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(191)](),r(173)!==n[r(135)])return this[r(181)][r(165)](e,n)[r(151)](jo)}},this[t(138)](this[t(181)],t(141),(e,r)=>{const s=t;n[s(176)](r.id)&&(n[s(139)](r.id)[s(184)]=r[s(184)])}),this[t(181)][t(179)](e[t(178)])[t(143)](r=>(e[t(190)](this),this[t(193)](r)[t(143)](()=>{const e=t;for(const t of r)n[e(189)](t)[e(187)]=!0})))}async[_o(172)](){const t=_o,e=this[t(150)][t(162)][t(156)](t(158)),{connection:n}=this[t(150)][t(162)][t(156)](zn),r=await this[t(181)][t(179)](n);await this[t(193)](r);for(const{suggestionData:e,resolve:n}of this[t(171)][t(166)]()){let s=r[t(170)](t=>t.id===e.id);s||(s=await this[t(181)][t(155)](e.id,e[t(160)],e[t(175)],e[t(153)])),n(s)}for(const n of r)e[t(176)](n.id)||e[t(189)](n)}async[_o(191)](){const t=_o;this[t(181)][t(145)]||await new Promise(e=>{const n=t;this[n(138)](this[n(181)],n(164),t=>{t[n(132)](),e()})})}async[_o(193)](t){const e=_o,n=this[e(150)][e(162)][e(156)](Fn.Users),{connection:r}=this[e(150)][e(162)][e(156)](zn),s=new Set;for(const{authorId:r}of t)n[e(140)](r)||s[e(155)](r);if(0===s[e(157)])return;const o=await b[e(152)](r,Array[e(185)](s));for(const t of o)n[e(140)](t.id)||n[e(163)](t)}}function jo(t){if(Do(t))return new Promise(()=>{});throw t}function Do(t){const e=_o;return t[e(149)][e(134)](e(174))||t[e(149)][e(134)](e(142))}function xo(){const t=["requires","4664020hViLfd","9bBxjbK","_setUpService","4580382coIaQv","once","isThreadsLoadingPaused","1354468HMksEm","1556370QBRLbc","listenTo","ready","pluginName","get","destroy","plugins","6YDflCS","editor","isOfficialPlugin","config","6404168evoIcc","2353935aaRBeP","262296miNDxf","data","Comments","switchReadOnly","CommentsRepository","11gsgBrh","connected","change:state","7YGjqvw","RealTimeCollaborativeComments","init","_terminateService","collaboration.channelId","CommentsEditing","isPremiumPlugin"];return(xo=function(){return t})()}const Ro=No;function No(t,e){const n=xo();return(No=function(t,e){return n[t-=384]})(t,e)}!function(t){const e=No,n=t();for(;;)try{if(477917===-parseInt(e(410))/1*(-parseInt(e(416))/2)+-parseInt(e(415))/3+-parseInt(e(402))/4+parseInt(e(396))/5+parseInt(e(399))/6*(-parseInt(e(388))/7)+-parseInt(e(414))/8*(-parseInt(e(397))/9)+-parseInt(e(403))/10*(parseInt(e(385))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(xo);class Vo extends e.Plugin{static get[Ro(395)](){return[Ro(418),So,Io,zn]}static get[Ro(406)](){return Ro(389)}static get[Ro(412)](){return!0}static get[Ro(394)](){return!0}[Ro(390)](){const t=Ro,e=this[t(411)][t(409)][t(407)](zn),n=this[t(411)][t(409)][t(407)](t(393)),r=this[t(411)][t(409)][t(407)](So);return this[t(411)][t(417)][t(400)](t(405),()=>{const r=t;this[r(404)](e,r(387),(t,e,s)=>{const o=r;n[o(401)]=o(386)!==s})}),this[t(404)](e,t(387),(e,n,r)=>{const s=t;this[s(411)][s(409)][s(407)](s(384))[s(419)](s(386)!==r)}),r[t(398)](this[t(411)][t(413)][t(407)](t(392)))}[Ro(408)](){const t=Ro;this[t(411)][t(409)][t(407)](So)[t(391)](this[t(411)][t(413)][t(407)](t(392))),super[t(408)]()}}var Mo=Jo;function Bo(){var t=["TrackChanges","21hKubkv","14kRNYit","920wlAqVO","2463790fSWCxJ","RealTimeCollaborativeTrackChanges","pluginName","isPremiumPlugin","15108tcbZQS","220gbkykv","requires","isOfficialPlugin","364478EnZUdP","771705YDhQtA","501416jnDGma","188592mtxYnI","69308wnjFjE","2goAQwI"];return(Bo=function(){return t})()}function Jo(t,e){var n=Bo();return(Jo=function(t,e){return n[t-=403]})(t,e)}!function(t){for(var e=Jo,n=t();;)try{if(327145===-parseInt(e(414))/1*(parseInt(e(419))/2)+parseInt(e(403))/3*(-parseInt(e(418))/4)+-parseInt(e(405))/5*(-parseInt(e(410))/6)+-parseInt(e(404))/7*(parseInt(e(416))/8)+-parseInt(e(415))/9+parseInt(e(406))/10+-parseInt(e(411))/11*(-parseInt(e(417))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bo);class Uo extends e.Plugin{static get[Mo(412)](){return[Vo,Eo,Mo(420)]}static get[Mo(408)](){return Mo(407)}static get[Mo(413)](){return!0}static get[Mo(409)](){return!0}}function qo(){const t=["data","47686540OoMCIj","baseVersion","from","_bufferedUpdates","currentRevision","connected","isPremiumPlugin","reInit","code","_startingVersion","listenTo","getMany","has","_revisionHistoryService","2573268wHrdwR","CloudServicesRevisionHistoryAdapter","creatorId","50bgfIDe","bind","setSource","_getLatestVersion","_revisions","keys","sendBufferedUpdates","12403792ejceRJ","addUser","destroy","catch","length","change:_isConnected","_waitForServiceReady","_preventResendingRevisionData","diffData","wrongRequestId","reconnect","type","addToReconnectionStack","add","pluginName","_createCurrentRevision","_update","34420BqpNUQ","plugins","requires","editor","startsWith","RevisionHistoryService","affectsData","repository","_isConnected","_getLatestVersionFromServerOperations","_lastRequestId","message","cloud-services-internal-error: Revision History Service is not connected.","14722875vhEVQC","marker","1104QZDiPR","getUser","adapter","1099104zIDPfu","CONNECTED","cloud-services-internal-error: Request timeout.","addRevisionData","RevisionTracker","cloud-services-internal-error: Not connected.","isBundleUploaded","isConnected","_revisionDataBuilder","_handleReconnectionError","state","off","change:_isPendingUpdate","7TjDNTS","size","_isPendingUpdate","sessionId","serverHistory","reverse","400","connection","authorsIds","_fetchMissingUsers","_offset","once","map","max","isEmptyCurrent","70139dnwqgP","getOperations","remove","getRevision","collaboration.channelId","RevisionHistory","revisionsUpdated","authors","get","then","fromVersion","getRevisions","_handleRevisionsUpdate","isOfficialPlugin","_fixRevision","_bufferUpdate","connect","cloudServices.bundleVersion","buildRevisionData","toVersion","setRevisionData","_revisionTracker","_oldOffset","init","isEnabled","createdAt","config","updateRevisions"];return(qo=function(){return t})()}const Lo=Go;function Go(t,e){const n=qo();return(Go=function(t,e){return n[t-=232]})(t,e)}!function(t){const e=Go,n=t();for(;;)try{if(936592===-parseInt(e(306))/1*(-parseInt(e(236))/2)+-parseInt(e(233))/3+-parseInt(e(278))/4+-parseInt(e(260))/5*(parseInt(e(275))/6)+parseInt(e(291))/7*(-parseInt(e(243))/8)+-parseInt(e(273))/9+parseInt(e(335))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qo);class Yo extends e.Plugin{static[Lo(265)]=(()=>Ve)();[Lo(270)];[Lo(327)];[Lo(232)];[Lo(328)];static get[Lo(262)](){return[zn,po,Lo(311),Xn,Fn.Users]}static get[Lo(257)](){return Lo(234)}static get[Lo(319)](){return!0}static get[Lo(341)](){return!0}constructor(t){const e=Lo;super(t);const n=this[e(263)][e(332)][e(314)](e(310));this[e(270)]=null,this[e(327)]=this[e(263)][e(261)][e(314)](e(282)),this[e(232)]=new(Yo[e(265)])(n)}async[Lo(329)](){const t=Lo,e=this[t(263)][t(261)][t(314)](po),r=e[t(295)],s=this[t(263)][t(261)][t(314)](zn);this[t(327)][t(238)]({history:r,getLatestVersion:()=>this[t(239)](),getCurrentRevisionId:()=>e[t(294)]});const o=this[t(263)][t(332)][t(314)](t(323))||n.version,i=await Ae[t(284)](s[t(298)],o);this[t(263)][t(261)][t(314)](t(311))[t(277)]={getRevision:async({revisionId:e})=>(await this[t(249)](),await this[t(232)][t(309)](e)),updateRevisions:async e=>{const n=t;await this[n(249)]();const r=this[n(327)][n(339)];if(i&&1===e[n(247)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(305)]=t[n(316)]===t[n(325)]);return this[n(232)][n(333)](e,this[n(270)])[n(315)](t=>(this[n(270)]=t,e))[n(246)](t=>{const r=n;if(Ho(t)||r(297)===t[r(343)]&&void 0!==t[r(334)][r(252)]){for(const t of e)!this[r(327)][r(267)][r(309)](t.id)||this[r(327)][r(321)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(345)](this[t(232)],t(312),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(304)](...n[s(303)](t=>t[s(325)]))>this[s(269)]()-1?this[s(239)]()[s(315)](()=>{this[s(318)](n,r)}):this[s(318)](n,r)});const{revisions:a,requestId:c}=await this[t(232)][t(322)](s[t(298)]);s[t(255)](this),this[t(270)]=c,await this[t(300)](a);for(const e of a)this[t(327)][t(281)](e);this[t(345)](e,t(248),(n,r,s)=>{const o=t;s&&(this[o(328)]=e[o(301)],n[o(289)]())}),this[t(327)][t(237)](t(330)).to(s,t(288),e=>e===Ie[t(279)])}async[Lo(253)](){const t=Lo,e=this[t(263)][t(261)][t(314)](zn),n=this[t(263)][t(261)][t(314)](po),r=async()=>{const r=t,s=this[r(327)][r(339)],o=s.id,i=o!==n[r(294)];if(i){const t=n[r(301)]-this[r(328)],e=this[r(269)]();if(this[r(327)][r(286)][r(342)](),s[r(325)]+t!==e){const n=s[r(316)]+t,o=this[r(263)][r(261)][r(314)](Fn.Users),i=this[r(327)][r(324)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(299)][r(303)](t=>o[r(276)](t));s[r(259)]({...i,authors:a},!0),this[r(327)][r(321)](s.id,i,!0)}this[r(327)][r(344)]=e,s[r(325)]===s[r(316)]&&!this[r(327)][r(338)][r(347)](o)&&this[r(327)][r(267)][r(240)][r(308)](o),this[r(327)][r(258)](e)}const{revisions:a,requestId:c}=await this[r(232)][r(253)](e[r(298)],this[r(270)]);i&&a[r(247)]>0?n[r(287)]():(await this[r(300)](a),this[r(318)](a,c),this[r(327)][r(242)]())};return n[t(268)]?r():new Promise((e,s)=>{const o=t;n[o(302)](o(248),()=>{const t=o;r()[t(315)](e)[t(246)](s)})})}[Lo(245)](){super[Lo(245)]()}async[Lo(249)](){const t=Lo;this[t(232)][t(285)]||await new Promise(e=>{const n=t;this[n(345)](this[n(232)],n(340),t=>{t[n(289)](),e()})})}[Lo(269)](){const t=Lo,e=this[t(263)][t(261)][t(314)](po)[t(295)][t(307)]()[t(296)]();for(const n of e)if(t(274)!==n[t(254)]||n[t(266)])return n[t(336)]+1}[Lo(239)](){const t=Lo,e=this[t(263)][t(261)][t(314)](po);return new Promise(n=>{const r=t;e[r(293)]?e[r(302)](r(290),()=>{n(this[r(269)]())}):n(this[r(269)]())})}[Lo(318)](t,e){const n=Lo,r=this[n(327)][n(267)];this[n(270)]=e;for(const e of t){const t=r[n(309)](e.id);if(t){if((e[n(316)]||e[n(325)])&&(e[n(251)]=null),t===this[n(327)][n(339)]){const r=Math[n(304)](t[n(325)],e[n(325)]),s=Math[n(304)](t[n(316)],e[n(316)]);let o;t[n(325)]===e[n(325)]&&t[n(316)]===e[n(316)]?(o=!0,this[n(250)](e)):e[n(325)]===r&&e[n(316)]===s?o=!1:(t[n(325)]===r&&t[n(316)]===s||this[n(320)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(316)],delete e[n(325)],delete e[n(251)],delete e[n(331)],delete e[n(299)])}this[n(327)][n(326)](e),this[n(250)](e)}else this[n(327)][n(281)](e)}const s=r[n(317)]();s[n(296)]();for(let t=0;t<s[n(247)]-1;t++){const e=s[t],r=s[t+1];if(e[n(316)]<r[n(325)]){const t=r[n(325)],s=Math[n(304)](t,e[n(325)]);this[n(320)]({revision:e,from:t,to:s})}}}[Lo(320)]({revision:t,from:e,to:n}={}){const r=Lo,s=this[r(263)][r(261)][r(314)](Fn.Users),o=this[r(327)][r(324)]({revision:t,from:e,to:n});o[r(313)]=o[r(299)][r(303)](t=>s[r(276)](t)),t[r(259)](o)}[Lo(250)](t){const e=Lo,n={};n.id=t.id;for(const r of Object[e(241)](t))"id"!==r&&(n[r]=void 0);this[e(327)][e(321)](n.id,n,!0)}async[Lo(300)](t){const e=Lo,n=this[e(263)][e(261)][e(314)](Fn.Users),{connection:r}=this[e(263)][e(261)][e(314)](zn),s=new Set;for(const n of t){for(const t of n[e(299)])i(t);n[e(235)]&&i(n[e(235)])}if(0===s[e(292)])return;const o=await b[e(346)](r,Array[e(337)](s));for(const t of o)n[e(276)](t.id)||n[e(244)](t);function i(t){const r=e;n[r(276)](t)||s[r(256)](t)}}}function Ho(t){const e=Lo;return t[e(271)][e(264)](e(272))||t[e(271)][e(264)](e(283))||t[e(271)][e(264)](e(280))}function zo(t,e){var n=Fo();return(zo=function(t,e){return n[t-=156]})(t,e)}function Fo(){var t=["1831520eYWBlD","RevisionHistory","isPremiumPlugin","RealTimeCollaborativeRevisionHistory","790qUQqrq","945504yqeMzd","90684CKZFRg","2857428lmygFV","66120JMiuzw","requires","7azESwY","4PtVCfH","isOfficialPlugin","41632qZcCEE","26TlBKgu","pluginName","1481589oEuigm"];return(Fo=function(){return t})()}var Ko=zo;!function(t){for(var e=zo,n=t();;)try{if(306989===-parseInt(e(171))/1*(parseInt(e(170))/2)+-parseInt(e(156))/3*(parseInt(e(168))/4)+-parseInt(e(165))/5+parseInt(e(162))/6+-parseInt(e(167))/7*(-parseInt(e(157))/8)+parseInt(e(164))/9+parseInt(e(161))/10*(parseInt(e(163))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Fo);class Wo extends e.Plugin{static get[Ko(166)](){return[Ko(158),Yo,Io]}static get[Ko(172)](){return Ko(160)}static get[Ko(169)](){return!0}static get[Ko(159)](){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)}const Xo=Zo;function Zo(t,e){const n=$o();return(Zo=function(t,e){return n[t-=283]})(t,e)}function $o(){const t=["ck-presence-list__list-item","597868jaNLaZ","bind","setTemplate","1442620nLKRRF","ck-presence-list__users-counter__text","set","39848lnQeBR","usersCount","7tHLYmh","2112375RfmSee","isHidden","div","bindTemplate","ck-presence-list__users-counter","2683195NAJcdU","_collapseAt","227750yDRQlq","1413QVaQoW","listitem","toString","788556WoeMmX","ck-presence-list__counter--hidden"];return($o=function(){return t})()}!function(t){const e=Zo,n=t();for(;;)try{if(361543===parseInt(e(294))/1+-parseInt(e(287))/2+parseInt(e(303))/3+parseInt(e(297))/4+-parseInt(e(285))/5+-parseInt(e(291))/6*(-parseInt(e(302))/7)+parseInt(e(300))/8*(-parseInt(e(288))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}($o);class ti extends r.View{[Xo(286)];constructor(t,e=6){const n=Xo;super(t);const r=this[n(283)];this[n(299)](n(304),!0),this[n(299)](n(301),0),this[n(286)]=e,this[n(295)](n(304)).to(this,n(301),t=>t<e),this[n(296)]({tag:n(305),attributes:{class:["ck",n(293),r.if(n(304),n(292))],role:n(289)},children:[{tag:n(305),attributes:{class:["ck",n(284)]},children:[{tag:n(305),attributes:{class:["ck",n(298)]},children:[{text:r.to(n(301),t=>"+"+(t-this[n(286)]+2)[n(290)]())}]}]}]})}}const ei=ni;function ni(t,e){const n=si();return(ni=function(t,e){return n[t-=313]})(t,e)}!function(t){const e=ni,n=t();for(;;)try{if(946787===-parseInt(e(345))/1+-parseInt(e(333))/2+-parseInt(e(328))/3+-parseInt(e(322))/4*(parseInt(e(317))/5)+parseInt(e(331))/6*(parseInt(e(342))/7)+-parseInt(e(324))/8+parseInt(e(341))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(si);class ri extends r.View{[ei(339)];[ei(319)];constructor(t){const e=ei;super(t);const r=this[e(318)];this[e(339)]=this[e(335)](),this[e(319)]=new n.KeystrokeHandler,this[e(330)]({hasPopup:!1,isExpanded:!1}),this[e(332)]({tag:e(346),attributes:{"aria-haspopup":r.if(e(336)),"aria-expanded":r.to(e(320),t=>this[e(336)]&&String(t)),"aria-label":r.to(e(336),n=>mr(t,e(n?326:327))),role:e(315),tabindex:r.to(e(336),t=>!!t&&0),class:["ck",e(340)]},children:this[e(339)],on:{mouseenter:r.to(()=>this[e(337)](e(313))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(329)](n(349)),o=document[n(329)](n(321));s?.[n(348)](r[n(314)])||o?.[n(348)](r[n(314)])||this[n(337)](n(347))})}}),this.on(e(323),(t,n,r)=>{const s=e;this[s(338)]&&(r?this[s(338)][s(316)](s(334),String(this[s(320)])):this[s(338)][s(325)](s(334)))})}[ei(350)](){const t=ei;this[t(338)][t(350)]()}[ei(344)](){const t=ei;super[t(344)](),this[t(319)][t(343)](this[t(338)])}}function si(){const t=["list","setAttribute","110grhHMj","bindTemplate","keystrokes","isExpanded",".ck-balloon-panel_with-arrow","208748mwpyAw","change:hasPopup","3566616TmeUqw","removeAttribute","Collapsed connected users list (press ENTER to open it)","Connected users list","2194980coYPPI","querySelector","set","2534196CjxWHk","setTemplate","2588900kyRKsy","aria-expanded","createCollection","hasPopup","fire","element","items","ck-presence-list__list","35389368lLNrgG","28COvcMJ","listenTo","render","1054778oGwPjk","div","presencelist:hide","contains",".ck-presence-list__dropdown-list","focus","presencelist:show","relatedTarget"];return(si=function(){return t})()}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=ci;function ci(t,e){const n=ui();return(ci=function(t,e){return n[t-=220]})(t,e)}function ui(){const t=["counterView","locale","first","1631222bMCOej","3720310XfVeNR","set","bind","245940WFOOGo","listenTo","ck-presence-list","7745108fFYeZx","div","setTemplate","2250156xmXqYk","302028ImCjjd","tooltipPosition","items","ck-presence-list--collapsed","bindTemplate","ck-rounded-corners","inlineListView","change","ck-reset","471210zVzdbL","isCollapsed","hasPopup"];return(ui=function(){return t})()}!function(t){const e=ci,n=t();for(;;)try{if(414783===parseInt(e(244))/1+-parseInt(e(233))/2+parseInt(e(237))/3+parseInt(e(243))/4+-parseInt(e(234))/5+-parseInt(e(227))/6+parseInt(e(240))/7)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ui);class di extends r.View{[ai(230)];[ai(224)];constructor(t,e=6){const n=ai;super(t);const r=this[n(222)];this[n(235)](n(228),!0),this[n(230)]=new ti(this[n(231)],e),this[n(224)]=new ri(t),this[n(224)][n(236)](n(229)).to(this,n(228)),this[n(238)](this[n(224)][n(220)],n(225),()=>{const t=n;for(const e of this[t(224)][t(220)])e[t(245)]="s";this[t(224)][t(220)][t(232)]&&(this[t(224)][t(220)][t(232)][t(245)]="se")}),this[n(242)]({tag:n(241),attributes:{class:["ck",n(239),n(226),n(223),r.if(n(228),n(221))]},children:[this[n(224)]]})}}const li=pi;function pi(t,e){const n=hi();return(pi=function(t,e){return n[t-=456]})(t,e)}function hi(){const t=["presencelist:hide","resize","604473MqXaTk","4FkcadC","ck-reset","fire","application","scrollHeight","1691004mBbEgC","1893577zRciAh","699255inMdYg","1JOSIJg","_isScrollable","div","bindTemplate","items","listWrapperView","ariaLabel","relatedTarget","window","contains",".ck-balloon-panel_with-arrow","574502GFdPKd","render","checkIfScrollable","role","set","ck-presence-list__dropdown-list","1851896Yttapl","1411371EQIbic","ck-list","innerHeight","setTemplate","querySelector",".ck-presence-list__list","clientHeight","change","max","ck-presence-list__dropdown-list-wrapper","listenTo","ariaLabelledBy","element","ck-presence-list__dropdown-list-wrapper_scrollable","Connected users list dropdown menu"];return(hi=function(){return t})()}!function(t){const e=pi,n=t();for(;;)try{if(150916===parseInt(e(458))/1*(parseInt(e(469))/2)+parseInt(e(493))/3*(parseInt(e(494))/4)+parseInt(e(457))/5+-parseInt(e(499))/6+-parseInt(e(456))/7+parseInt(e(475))/8+-parseInt(e(476))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hi);class fi extends r.View{[li(463)];constructor(t,e){const n=li;super(t);const r=this[n(461)];this[n(463)]=new mi(t,e),this[n(479)]({tag:n(460),attributes:{tabindex:-1,role:n(497),class:["ck",n(474)],"aria-label":mr(t,n(490))},children:[this[n(463)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(480)](e(481)),o=document[e(480)](e(468));s?.[e(467)](r[e(465)])||o?.[e(467)](r[e(465)])||this[e(496)](e(491))})}})}}class mi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(461)];this[r(473)](r(459),!1),this[r(479)]({tag:e?r(460):"ul",attributes:{class:["ck",r(495),r(477),r(485),s.if(r(459),r(489))],role:s.to(r(472)),"aria-label":s.to(r(464)),"aria-labelledby":s.to(r(487))},children:this[r(462)]}),this[r(486)](n.global[r(466)],r(492),()=>this[r(471)]()),this[r(462)].on(r(483),()=>this[r(471)]())}[li(470)](){const t=li;super[t(470)](),this[t(471)]()}[li(471)](){const t=li,e=this[t(488)];e&&(this[t(459)]=Math[t(484)](e[t(498)],e[t(482)])>.8*window[t(478)])}}const gi=yi;function yi(t,e){const n=bi();return(yi=function(t,e){return n[t-=101]})(t,e)}function bi(){const t=["color","2906216tzfyyp","userView","ck-presence-list__marker","ck-user__full-name","bindTemplate","4929225DCwiIN","656616VoRGVG","setTemplate","presentation","element","312084YFUCLs","220ooNCXH","44804gQoubb","execute","button","427mELYnE","30ibToGY","span","ck-presence-list__dropdown-list-item","focus","tag","51016vMJuqE","true","name","2235669rKuvBX","getBackgroundColorClass","fire"];return(bi=function(){return t})()}!function(t){const e=yi,n=t();for(;;)try{if(709979===parseInt(e(128))/1*(parseInt(e(104))/2)+-parseInt(e(112))/3+parseInt(e(116))/4+-parseInt(e(121))/5+-parseInt(e(122))/6+parseInt(e(103))/7*(parseInt(e(109))/8)+parseInt(e(126))/9*(parseInt(e(127))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bi);class Ii extends r.ListItemView{[gi(117)];constructor(t,e,n){const r=gi;super(t);const s=this[r(120)];this[r(117)]=new Fn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(106)],tabindex:-1,role:r(124),"aria-label":e[r(111)]},children:[this[r(117)],{tag:r(105),attributes:{class:["ck",r(119)]},children:[{text:e[r(111)]}]},{tag:r(105),attributes:{class:["ck",r(118),e[r(115)][r(113)]()],"aria-hidden":r(110)}}]};n&&(o[r(108)]=r(102),o.on={click:s.to(()=>this[r(114)](r(101)))}),this[r(123)](o)}[gi(107)](){const t=gi;this[t(125)][t(107)]()}}const Oi=vi;function vi(t,e){const n=Si();return(vi=function(t,e){return n[t-=260]})(t,e)}!function(t){const e=vi,n=t();for(;;)try{if(806044===parseInt(e(275))/1+parseInt(e(263))/2+-parseInt(e(284))/3*(-parseInt(e(276))/4)+parseInt(e(290))/5+-parseInt(e(270))/6+parseInt(e(292))/7*(-parseInt(e(282))/8)+-parseInt(e(278))/9*(parseInt(e(288))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Si);class wi extends r.View{[Oi(289)];[Oi(262)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(285)];this[s(279)](s(272),!1),this[s(279)](s(273),!0),this[s(279)](s(266),""),this[s(289)]=new Fn.UserView(t,e),this[s(262)]=new ki(t,e);const i=new r.LabelView(t);i[s(287)][s(291)]=s(265),i[s(268)]=e[s(281)];const a={tag:s(293),attributes:{class:["ck",s(271)],role:s(267),tabindex:o.to(s(272),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(289)][s(281)],"data-cke-tooltip-position":o.to(s(266)),"data-cke-tooltip-disabled":o.to(s(273),t=>!t),"data-cke-tooltip-class":s(277)},children:[this[s(289)],this[s(262)],i]};n&&(a[s(291)]=s(283),a.on={click:o.to(()=>this[s(280)](s(264)))}),this[s(286)](a)}}function Si(){const t=["listitem","text","ck-presence-list__marker","1390542hwCOFN","ck-presence-list__list-item","isFocusable","hasTooltip","color","1084386TesMXH","620Pdzgyk","ck-presence-list__list-item__tooltip","7551bCyEuS","set","fire","name","30232XfQvQn","button","3507HSDhDz","bindTemplate","setTemplate","template","26210gXanPW","userView","7263785RSbdVj","tag","539gaBcoS","div","true","getBackgroundColorClass","markerView","1618930dOQCvr","execute","span","tooltipPosition"];return(Si=function(){return t})()}class ki extends r.View{constructor(t,e){const n=Oi;super(t),this[n(286)]({tag:n(265),attributes:{class:["ck",n(269),e[n(274)][n(261)]()],"aria-hidden":n(260)}})}}const Ai=_i;function Ti(){const t=["presenceList.collapseAt","focusTracker",':not([disabled]):not([tabindex="-1"])',"isCollapsed","reverse","Tab","PresenceListUI","locale","presenceDropdownView","attachToDom","checkIfScrollable","keystrokes","35704uMikVp","button","join","1413KywvWl","input","requires","render","presencelist-collapseat-invalid-format","listenTo","3218080SakNnp","isOfficialPlugin","_allConnectedUsers","element","indexOf","[contenteditable]","2322548ErHkkD","class","1QuaiIX","3nsvHBY","change:isFocused","presenceList","find","60683VJWgHd","map","min","bind","onClick","isFocusable","select","presenceList.displayMe","plugins","init","isMe","inlineListView","bindTo","destroy","appendChild","presencelist:show","557245AnplSS","execute","presenceList.container","detachFromDom","using","Enter","[tabindex]","number","isVisible","activeElement","config","set","_handleUserRemove","hideDropdown","from","hasTooltip","_createView","remove","presencelist:hide","filter","isPremiumPlugin","add","Esc","define","balloonPanelView","presencelist-missing-container","ck ck-presence-list__balloon","currentDisplayedUsers","body","626404kcChRM","offsetHeight","_bodyCollection","isExpanded","unpin","focus","pin","Shift+Tab","usersCount","allConnectedUsers","displayMe","content","isRendered","textarea","_handleUserAdd","context","get","tabIndex","counterView","view","showDropdown","offsetWidth","querySelectorAll","length","pluginName","3587880dVcaHt","items","sort"];return(Ti=function(){return t})()}function _i(t,e){const n=Ti();return(_i=function(t,e){return n[t-=303]})(t,e)}!function(t){const e=_i,n=t();for(;;)try{if(366540===parseInt(e(403))/1*(parseInt(e(346))/2)+-parseInt(e(404))/3*(-parseInt(e(401))/4)+-parseInt(e(317))/5+parseInt(e(371))/6+parseInt(e(408))/7+parseInt(e(386))/8*(-parseInt(e(389))/9)+-parseInt(e(395))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ti);const Ci={collapseAt:6,displayMe:!0};class Pi extends e.ContextPlugin{[Ai(344)];[Ai(341)];[Ai(365)];[Ai(382)];[Ai(348)]=null;static get[Ai(370)](){return Ai(380)}static get[Ai(396)](){return!0}static get[Ai(337)](){return!0}constructor(t){const e=Ai;super(t),this[e(361)][e(327)][e(340)](e(406),Ci);const s=t[e(327)][e(362)](e(374));if(e(324)!=typeof s)throw new n.CKEditorError(e(393),this);if(s<1)throw new n.CKEditorError(e(393),this);this[e(397)]=this[e(361)][e(309)][e(362)](Xn)[e(355)],this[e(328)](e(354),0),this[e(344)]=new n.Collection,this[e(341)]=new r.BalloonPanelView,this[e(341)][e(402)]=e(343),this[e(365)]=this[e(333)](),this[e(382)]=void 0}static get[Ai(391)](){return[Xn]}[Ai(310)](){const t=Ai;for(const e of this[t(397)])this[t(360)](e);this[t(394)](this[t(397)],t(338),(e,n)=>{this[t(360)](n)}),this[t(394)](this[t(397)],t(334),(e,n)=>{this[t(329)](n)})}[Ai(333)](){const t=Ai,e=this[t(361)],s=new di(this[t(361)][t(381)],this[t(361)][t(327)][t(362)](t(374))),o=this[t(341)];if(!Qo(e[t(327)][t(362)](t(319))))throw new n.CKEditorError(t(342),this);return s[t(364)][t(304)](t(354)).to(this),s[t(304)](t(377)).to(this,t(354),n=>{const r=t,{collapseAt:o}=e[r(327)][r(362)](r(406)),i=n>=o;if(i&&!s[r(312)][r(372)][r(407)](t=>t instanceof ti)){const t=this[r(361)][r(327)][r(362)](r(374))-1;this[r(344)][r(369)]==t&&this[r(344)][r(369)]>1&&this[r(344)][r(334)](this[r(344)][r(369)]-1),s[r(312)][r(372)][r(338)](s[r(364)])}return i||this[r(330)](),i}),s[t(312)][t(372)][t(313)](this[t(344)])[t(321)](n=>{const r=t,o=e[r(327)][r(362)](r(406)),i=new wi(e[r(381)],n,!!o[r(305)]);return i[r(304)](r(332)).to(s,r(377),t=>!t),i[r(304)](r(306)).to(s,r(377),t=>!t),o[r(305)]&&this[r(394)](i,r(318),()=>{const t=r;this[t(365)][t(377)]||o[t(305)](n,i[t(398)])}),i}),this[t(394)](s[t(312)],t(316),()=>{const e=t;this[e(365)][e(377)]&&this[e(366)]()}),this[t(394)](s[t(312)],t(335),()=>{const e=t;this[e(382)]&&this[e(330)]()}),s[t(312)][t(385)][t(328)](t(322),(e,n)=>{const r=t;this[r(365)][r(377)]&&(this[r(366)](),n())}),s[t(392)](),o[t(392)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(325)],contextElements:[o[t(398)],s[t(312)][t(398)]],callback:()=>this[t(330)]()}),e[t(327)][t(362)](t(319))[t(315)](s[t(398)]),this[t(348)]=new r.BodyCollection(this[t(361)][t(381)]),this[t(348)][t(383)](),this[t(348)][t(338)](this[t(341)]),s}[Ai(360)](t){const e=Ai;if(!this[e(361)][e(327)][e(362)](e(308))&&t[e(311)])return;const n=this[e(361)][e(327)][e(362)](e(374))-1;for(this[e(354)]++;this[e(344)][e(369)]>=n-(this[e(365)][e(377)]?1:0)&&this[e(344)][e(369)]>1;)this[e(344)][e(334)](1);const r=t[e(311)]?0:this[e(344)][e(369)];this[e(344)][e(338)](t,r)}[Ai(329)](t){const e=Ai;this[e(354)]--;const{collapseAt:n}=this[e(361)][e(327)][e(362)](e(406)),r=this[e(354)]>=n;if(this[e(344)][e(362)](t.id))this[e(344)][e(334)](t.id);else if(r&&this[e(344)][e(369)]+1===n-1)return;if(this[e(344)][e(369)]+(r?1:0)<this[e(354)])for(const t of Array[e(331)](this[e(397)])[e(378)]())if(!this[e(344)][e(362)](t.id)&&(this[e(344)][e(338)](t,Math[e(303)](this[e(344)][e(369)]-(r?1:0),1)),this[e(344)][e(369)]+(r?1:0)===n-1))return}[Ai(366)](){const t=Ai;if(this[t(382)])return;const e=this[t(361)][t(327)][t(362)](t(406));this[t(382)]=new fi(this[t(361)][t(381)],!!e[t(305)]),this[t(365)][t(312)][t(349)]=!0,this[t(394)](this[t(382)],t(335),()=>{const e=t;this[e(382)]&&this[e(330)]()});const{listWrapperView:n}=this[t(382)];n[t(372)][t(313)](this[t(397)])[t(321)](n=>{const r=t;if(!e[r(356)]&&n[r(311)])return null;const s=new Ii(this[r(361)][r(381)],n,!!e[r(305)]);return e[r(305)]&&this[r(394)](s,r(318),()=>{const t=r;e[t(305)](n,s[t(398)])}),s}),this[t(341)][t(357)][t(338)](this[t(382)]),this[t(341)][t(352)]({target:this[t(365)][t(312)][t(398)]}),n[t(351)](),n[t(384)]();const r=(e,n)=>{const r=t;this[r(330)](),this[r(365)][r(312)][r(351)](),n()};n[t(385)][t(328)](t(339),r),n[t(385)][t(328)](t(353),r),n[t(385)][t(328)](t(379),(e,n)=>{const r=t;!function(t){const e=_i,n=["a",e(387),e(390),e(307),e(359),e(323),e(400)][e(409)](t=>t+e(376))[e(388)](","),r=[...document[e(345)][e(368)](n)][e(336)](t=>t===document[e(326)]||t[e(367)]+t[e(347)]>0)[e(373)]((t,n)=>(t[e(363)]||0)-(n[e(363)]||0)),s=r[e(399)](t),o=r[(s+1)%r[e(369)]];o&&o[e(351)]()}(this[r(365)][r(398)]),this[r(330)](),n()}),n[t(375)][t(338)](this[t(365)][t(398)]),n[t(375)].on(t(405),(e,n,r)=>{r||this[t(330)]()})}[Ai(330)](){const t=Ai;this[t(382)]&&(this[t(365)][t(312)][t(349)]=!1,this[t(341)][t(350)](),this[t(341)][t(357)][t(334)](this[t(382)]),this[t(382)][t(314)](),this[t(382)]=void 0)}[Ai(314)](){const t=Ai;super[t(314)](),this[t(365)]&&this[t(365)][t(358)]&&this[t(365)][t(314)](),this[t(348)]&&(this[t(348)][t(320)](),this[t(348)][t(314)](),this[t(348)]=null)}}var Ei=ji;function ji(t,e){var n=xi();return(ji=function(t,e){return n[t-=179]})(t,e)}!function(t){for(var e=ji,n=t();;)try{if(518382===parseInt(e(192))/1+parseInt(e(194))/2*(-parseInt(e(181))/3)+-parseInt(e(185))/4*(parseInt(e(179))/5)+parseInt(e(186))/6+parseInt(e(191))/7+parseInt(e(180))/8*(parseInt(e(189))/9)+-parseInt(e(184))/10*(parseInt(e(183))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(xi);class Di extends e.ContextPlugin{static get[Ei(190)](){return[Xn,Pi]}static get[Ei(187)](){return Ei(182)}static get[Ei(193)](){return!0}static get[Ei(188)](){return!0}}function xi(){var t=["47316vZzpEG","790884rbgSPm","pluginName","isPremiumPlugin","9lUJbDr","requires","6984817FoxRcO","553099NWukGT","isOfficialPlugin","277796ipRxAc","405JoTHbf","2338128sVeVbA","6bRNhCy","PresenceList","11wEFJwV","2206830TQFPWT"];return(xi=function(){return t})()}function Ri(){var t=["3553497diXzzj","32391337MCCpNs","30sglNJu","5ERvUAj","53234gGAbJF","18UKZXhd","15SWoljz","9485480IjNFRI","3544476PbGdrT","5781512JQYHpw","332836CfMiPL"];return(Ri=function(){return t})()}function Ni(t,e){var n=Ri();return(Ni=function(t,e){return n[t-=235]})(t,e)}!function(t){for(var e=Ni,n=t();;)try{if(733884===parseInt(e(236))/1*(-parseInt(e(245))/2)+-parseInt(e(241))/3+parseInt(e(238))/4*(-parseInt(e(244))/5)+-parseInt(e(243))/6*(parseInt(e(240))/7)+parseInt(e(239))/8*(parseInt(e(235))/9)+-parseInt(e(237))/10+parseInt(e(242))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ri)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();